66949 认证参数收集-填写人导入逻辑修改,去掉必填校验。
This commit is contained in:
+199
-9
@@ -4007,6 +4007,14 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
}
|
||||
|
||||
for (ParamsConfigDataEO paramsConfigDataEO : configDataList) {
|
||||
// 删除之前的参数项
|
||||
QueryWrapper<ParamsConfigDataEO> targetConfigDataRemoveWrap = new QueryWrapper<>();
|
||||
targetConfigDataRemoveWrap.lambda().eq(ParamsConfigDataEO::getParamsConfigId, paramsConfigDataEO.getParamsConfigId());
|
||||
targetConfigDataRemoveWrap.lambda().eq(ParamsConfigDataEO::getParamsCollectManifestId, paramsConfigDataEO.getParamsCollectManifestId());
|
||||
this.paramsConfigDataEOService.remove(targetConfigDataRemoveWrap);
|
||||
}
|
||||
|
||||
// 批量新增参数项
|
||||
Boolean isSuccess = paramsConfigDataEOService.saveOrUpdateBatch(configDataList);
|
||||
|
||||
@@ -5416,7 +5424,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_PULL_SINGLE.getValue().equals(controlType)) {
|
||||
// 校验必填
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(isMust) && StringUtils.isEmpty(value)) {
|
||||
/*if (ParamsIsMustEnum.YES.getValue().equals(isMust) && StringUtils.isEmpty(value)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "为必填项,不能为空;";
|
||||
} else {
|
||||
@@ -5462,11 +5470,41 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
// 处理禅道66949 问题,导入的时候将必填校验去掉,填写人在提交的时候还有必填校验。
|
||||
if (StringUtils.isNotEmpty(value)) {
|
||||
if (countChar(value, "#") != 1) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "格式不正确;";
|
||||
} else {
|
||||
errorMsg += configMap.get(key) + " format is incorrect; ";
|
||||
}
|
||||
countError++;
|
||||
} else {
|
||||
if (value.split("#").length > 1) {
|
||||
resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[1], isMust, true, cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setPullData(value.split("#")[1]);
|
||||
|
||||
resultMap = validateText(configMap.get(key), controlVerify, value.split("#")[0], ParamsIsMustEnum.NO.getValue(), "1000", cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setTextData(value.split("#")[0]);
|
||||
|
||||
} else if (value.split("#").length == 1 && value.endsWith("#")) {
|
||||
resultMap = validateText(configMap.get(key), controlVerify, value.split("#")[0], ParamsIsMustEnum.NO.getValue(), "1000", cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setTextData(value.split("#")[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_PULL_MORE.getValue().equals(controlType)) {
|
||||
// 校验必填
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(isMust) && StringUtils.isEmpty(value)) {
|
||||
/*if (ParamsIsMustEnum.YES.getValue().equals(isMust) && StringUtils.isEmpty(value)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "为必填项,不能为空;";
|
||||
} else {
|
||||
@@ -5511,11 +5549,39 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
// 处理禅道66949 问题,导入的时候将必填校验去掉,填写人在提交的时候还有必填校验。
|
||||
if (StringUtils.isNotEmpty(value)) {
|
||||
if (countChar(value, "#") != 1) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "格式不正确;";
|
||||
} else {
|
||||
errorMsg += configMap.get(key) + " format is incorrect; ";
|
||||
}
|
||||
countError++;
|
||||
} else {
|
||||
if (value.split("#").length > 1) {
|
||||
resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[1], isMust, false, cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setPullData(value.split("#")[1]);
|
||||
|
||||
resultMap = validateText(configMap.get(key), controlVerify, value.split("#")[0], ParamsIsMustEnum.NO.getValue(), "1000", cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setTextData(value.split("#")[0]);
|
||||
} else if (value.split("#").length == 1 && value.endsWith("#")) {
|
||||
resultMap = validateText(configMap.get(key), controlVerify, value.split("#")[0], ParamsIsMustEnum.NO.getValue(), "1000", cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setTextData(value.split("#")[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (ControlTypeEnum.TEXT_FILE.getValue().equals(controlType)) {
|
||||
// 校验必填
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(isMust) && StringUtils.isEmpty(value)) {
|
||||
/*if (ParamsIsMustEnum.YES.getValue().equals(isMust) && StringUtils.isEmpty(value)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "为必填项,不能为空;";
|
||||
} else {
|
||||
@@ -5551,11 +5617,40 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
// 处理禅道66949 问题,导入的时候将必填校验去掉,填写人在提交的时候还有必填校验。
|
||||
if (StringUtils.isNotEmpty(value)) {
|
||||
if (countChar(value, "#") != 1) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "格式不正确;";
|
||||
} else {
|
||||
errorMsg += configMap.get(key) + " format is incorrect; ";
|
||||
}
|
||||
countError++;
|
||||
} else {
|
||||
if (value.split("#").length > 1) {
|
||||
resultMap = validateText(configMap.get(key), controlVerify, value.split("#")[0], isMust, "1000", cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setTextData(value.split("#")[0]);
|
||||
|
||||
resultMap = validateFile(configMap.get(key), unzipfilepath, value.split("#")[1], ParamsIsMustEnum.NO.getValue(), cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setFileConnectId(value.split("#")[1]);
|
||||
} else if (value.split("#").length == 1 && value.endsWith("#")) {
|
||||
resultMap = validateText(configMap.get(key), controlVerify, value.split("#")[0], isMust, "1000", cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setTextData(value.split("#")[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else if (ControlTypeEnum.PULL_SINGLE_FILE.getValue().equals(controlType)) {
|
||||
// 校验必填
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(isMust) && StringUtils.isEmpty(value)) {
|
||||
/*if (ParamsIsMustEnum.YES.getValue().equals(isMust) && StringUtils.isEmpty(value)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "为必填项,不能为空;";
|
||||
} else {
|
||||
@@ -5590,11 +5685,40 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
// 处理禅道66949 问题,导入的时候将必填校验去掉,填写人在提交的时候还有必填校验。
|
||||
if (StringUtils.isNotEmpty(value)) {
|
||||
if (countChar(value, "#") != 1) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "格式不正确;";
|
||||
} else {
|
||||
errorMsg += configMap.get(key) + " format is incorrect; ";
|
||||
}
|
||||
countError++;
|
||||
} else {
|
||||
if (value.split("#").length > 1) {
|
||||
resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[0], isMust, true, cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setPullData(value.split("#")[0]);
|
||||
|
||||
resultMap = validateFile(configMap.get(key), unzipfilepath, value.split("#")[1], ParamsIsMustEnum.NO.getValue(), cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setFileConnectId(value.split("#")[1]);
|
||||
} else if (value.split("#").length == 1 && value.endsWith("#")) {
|
||||
resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[0], isMust, true, cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setPullData(value.split("#")[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else if (ControlTypeEnum.PULL_MORE_FILE.getValue().equals(controlType)) {
|
||||
// 校验必填
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(isMust) && StringUtils.isEmpty(value)) {
|
||||
/*if (ParamsIsMustEnum.YES.getValue().equals(isMust) && StringUtils.isEmpty(value)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "为必填项,不能为空;";
|
||||
} else {
|
||||
@@ -5630,11 +5754,40 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
// 处理禅道66949 问题,导入的时候将必填校验去掉,填写人在提交的时候还有必填校验。
|
||||
if (StringUtils.isNotEmpty(value)) {
|
||||
if (countChar(value, "#") != 1) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "格式不正确;";
|
||||
} else {
|
||||
errorMsg += configMap.get(key) + " format is incorrect; ";
|
||||
}
|
||||
countError++;
|
||||
} else {
|
||||
if (value.split("#").length > 1) {
|
||||
resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[0], isMust, false, cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setPullData(value.split("#")[0]);
|
||||
|
||||
resultMap = validateFile(configMap.get(key), unzipfilepath, value.split("#")[1], ParamsIsMustEnum.NO.getValue(), cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setFileConnectId(value.split("#")[1]);
|
||||
} else if (value.split("#").length == 1 && value.endsWith("#")) {
|
||||
resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[0], isMust, false, cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setPullData(value.split("#")[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue().equals(controlType)) {
|
||||
// 校验必填
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(isMust) && StringUtils.isEmpty(value)) {
|
||||
/*if (ParamsIsMustEnum.YES.getValue().equals(isMust) && StringUtils.isEmpty(value)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "为必填项,不能为空;";
|
||||
} else {
|
||||
@@ -5689,6 +5842,42 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
}
|
||||
|
||||
}*/
|
||||
|
||||
// 处理禅道66949 问题,导入的时候将必填校验去掉,填写人在提交的时候还有必填校验。
|
||||
if (StringUtils.isNotEmpty(value)) {
|
||||
if (countChar(value, "#") != 2) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "格式不正确;";
|
||||
} else {
|
||||
errorMsg += configMap.get(key) + " format is incorrect; ";
|
||||
}
|
||||
countError++;
|
||||
} else {
|
||||
if (value.split("#").length > 1) {
|
||||
resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[1], isMust, true, cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setPullData(value.split("#")[1]);
|
||||
|
||||
resultMap = validateText(configMap.get(key), controlVerify, value.split("#")[0], ParamsIsMustEnum.NO.getValue(), "1000", cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setTextData(value.split("#")[0]);
|
||||
|
||||
if (!value.endsWith("#")) { //3
|
||||
resultMap = validateFile(configMap.get(key), unzipfilepath, value.split("#")[2], ParamsIsMustEnum.NO.getValue(), cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setFileConnectId(value.split("#")[2]);
|
||||
}
|
||||
} else if (value.split("#").length == 1 && value.endsWith("#")) {
|
||||
resultMap = validateText(configMap.get(key), controlVerify, value.split("#")[0], ParamsIsMustEnum.NO.getValue(), "1000", cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setTextData(value.split("#")[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -5701,9 +5890,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
countError++;
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotEmpty(configDataEO.getId())) {
|
||||
/*if (StringUtils.isNotEmpty(configDataEO.getId())) {
|
||||
configDataList.add(configDataEO);
|
||||
}
|
||||
}*/
|
||||
configDataList.add(configDataEO);
|
||||
}
|
||||
|
||||
if (countError > 0) {
|
||||
|
||||
Reference in New Issue
Block a user