|
@@ -3979,6 +3979,20 @@ public class TdByTypeController extends TdBaseController {
|
|
|
///上面去查詢一遍,不懂
|
|
|
Long curUserId=token.getUser().getId();
|
|
|
JSONObject data = JSONObject.parseObject(ReqUtil.getString(request, "summaryData"));
|
|
|
+
|
|
|
+ //特殊处理下字段
|
|
|
+ Object field_51 = data.get("field_51");
|
|
|
+ if (null != field_51){
|
|
|
+ String regex = "^[+]{0,1}([0-9][0-9]{0,})$|^[+]{0,1}([1-9][0-9]{0,}\\.\\d+)$|^[+]{0,1}([0]\\.(?!0+$)\\d{1,})$";
|
|
|
+ boolean matches = field_51.toString().matches(regex);
|
|
|
+ if (!matches){
|
|
|
+ result.put("state","error");
|
|
|
+ result.put("message", "评价基础分值仅限为非负数字,允许小数");
|
|
|
+ RespUtil.rendJson(response,result);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//创建TaskBO 使用原任务保存方式,直接通过TaskBO进行保存
|
|
|
TaskBO taskBO = new TaskBO();
|
|
|
Boolean isEdit = ReqUtil.getBoolean(request, "isEdit", false);
|
|
@@ -5653,6 +5667,20 @@ public class TdByTypeController extends TdBaseController {
|
|
|
Integer status = ReqUtil.getInt(request, "status", 1);
|
|
|
// Integer reportSatus = ReqUtil.getInt(request,"reportSatus",0);
|
|
|
Map data = TaskByTypeUtil.transSummaryData(ReqUtil.getString(request, "summaryData"));
|
|
|
+
|
|
|
+ //特殊处理下字段
|
|
|
+ Object field_51 = data.get("field_51");
|
|
|
+ if (null != field_51){
|
|
|
+ String regex = "^[+]{0,1}([0-9][0-9]{0,})$|^[+]{0,1}([1-9][0-9]{0,}\\.\\d+)$|^[+]{0,1}([0]\\.(?!0+$)\\d{1,})$";
|
|
|
+ boolean matches = field_51.toString().matches(regex);
|
|
|
+ if (!matches){
|
|
|
+ result.put("state","error");
|
|
|
+ result.put("message", "评价基础分值仅限为非负数字,允许小数");
|
|
|
+ RespUtil.rendJson(response,result);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//创建TaskBO 使用原任务保存方式,直接通过TaskBO进行保存
|
|
|
TaskBO taskBO = new TaskBO();
|
|
|
Boolean isEdit = ReqUtil.getBoolean(request, "isEdit", false);
|
|
@@ -5964,6 +5992,20 @@ public class TdByTypeController extends TdBaseController {
|
|
|
Integer status = ReqUtil.getInt(request, "status", 1);
|
|
|
// Integer reportSatus = ReqUtil.getInt(request,"reportSatus",0);
|
|
|
Map data = TaskByTypeUtil.transSummaryData(ReqUtil.getString(request, "summaryData"));
|
|
|
+
|
|
|
+ //特殊处理下字段
|
|
|
+ Object field_51 = data.get("field_51");
|
|
|
+ if (null != field_51){
|
|
|
+ String regex = "^[+]{0,1}([0-9][0-9]{0,})$|^[+]{0,1}([1-9][0-9]{0,}\\.\\d+)$|^[+]{0,1}([0]\\.(?!0+$)\\d{1,})$";
|
|
|
+ boolean matches = field_51.toString().matches(regex);
|
|
|
+ if (!matches){
|
|
|
+ result.put("state","error");
|
|
|
+ result.put("message", "评价基础分值仅限为非负数字,允许小数");
|
|
|
+ RespUtil.rendJson(response,result);
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//创建TaskBO 使用原任务保存方式,直接通过TaskBO进行保存
|
|
|
TaskBO taskBO = new TaskBO();
|
|
|
Boolean isEdit = ReqUtil.getBoolean(request, "isEdit", false);
|