认证-参数收集清单-填写人导出导入
This commit is contained in:
+114
-93
@@ -33,7 +33,6 @@ import com.jero.modules.cert.collect.vo.ParamsManifestVO;
|
||||
import com.jero.modules.cert.report.entity.*;
|
||||
import com.jero.modules.cert.report.service.*;
|
||||
import com.jero.modules.cert.template.entity.CertCategoryParamsInfoPublishEO;
|
||||
import com.jero.modules.cert.template.entity.ParamsInfoEO;
|
||||
import com.jero.modules.cert.template.entity.ParamsInfoPublishEO;
|
||||
import com.jero.modules.cert.template.enums.ControlTypeEnum;
|
||||
import com.jero.modules.cert.template.enums.ControlVerifyEnum;
|
||||
@@ -2552,8 +2551,6 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
List<Map<String, Object>> datas = result;
|
||||
if(datas!=null &&!datas.isEmpty()){
|
||||
try {
|
||||
//获取全部sheet页中表格
|
||||
XSSFWorkbook workbook=new XSSFWorkbook(new FileInputStream(excelfile));
|
||||
int i = 0 ;
|
||||
List<Map<String, Object>> datasUpdate = new ArrayList<>();
|
||||
//处理空行数据,当读取exceL出现空行过多时,空行数为20以上时中断读取,将数据清洗为新的list
|
||||
@@ -2639,9 +2636,6 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
//将导入数据循环合并整理后 新增至相应表
|
||||
List<ParamsConfigDataEO> configDataList = (List<ParamsConfigDataEO>) map.get("configDataList");
|
||||
|
||||
|
||||
|
||||
List<ParamsInfoEO> paramsInfoEOS = new ArrayList<>();
|
||||
for (ParamsConfigDataEO importDto : configDataList) {
|
||||
//判断此行数据是否全部为空,是则不读取
|
||||
if (checkObjAllFieldsIsNull(importDto)) {
|
||||
@@ -2668,8 +2662,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
|
||||
// 处理下拉值
|
||||
String newPullData = importDto.getPullData().replaceAll("!", "!").replaceAll("!",",");
|
||||
importDto.setPullData(newPullData);
|
||||
if (StringUtils.isNotEmpty(importDto.getPullData())) {
|
||||
String newPullData = importDto.getPullData().replaceAll("!", "!").replaceAll("!", ",");
|
||||
importDto.setPullData(newPullData);
|
||||
}
|
||||
}
|
||||
|
||||
// 批量新增参数项
|
||||
@@ -2677,7 +2673,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|
||||
String msg = "";
|
||||
if (isSuccess) {
|
||||
int countSuccess = paramsInfoEOS.size();
|
||||
int countSuccess = configDataList.size();
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
msg = "成功导入" + countSuccess + "条";
|
||||
} else {
|
||||
@@ -2849,7 +2845,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
OnlCgformField onlCgformField = fieldList.get(i);
|
||||
String dbFieldName = onlCgformField.getDbFieldName();
|
||||
if ("nio_number".equals(dbFieldName) || "params_name".equals(dbFieldName) || "description".equals(dbFieldName)
|
||||
|| "control_type".equals(dbFieldName) || "control_verify".equals(dbFieldName) || "control_values".equals(dbFieldName)) {
|
||||
|| "control_type".equals(dbFieldName) || "control_verify".equals(dbFieldName) || "control_values".equals(dbFieldName)
|
||||
|| "is_must".equals(dbFieldName)) {
|
||||
dbFieldList.add(dbFieldName);
|
||||
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
@@ -2862,9 +2859,12 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
} else if("control_verify".equals(dbFieldName)) {
|
||||
dbFieldExampleList.add("数据来源于参数模版管理中控件校验数据");
|
||||
|
||||
} else if("control_values".equals(dbFieldName)) {
|
||||
} else if("control_values".equals(dbFieldName)) {
|
||||
dbFieldExampleList.add("数据来源于参数模版管理中控件备选值数据");
|
||||
|
||||
} else if("is_must".equals(dbFieldName)) {
|
||||
dbFieldExampleList.add("是/否");
|
||||
|
||||
} else {
|
||||
dbFieldExampleList.add("下拉多选#文本");
|
||||
}
|
||||
@@ -2878,9 +2878,12 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
} else if("control_verify".equals(dbFieldName)) {
|
||||
dbFieldExampleList.add("The data comes from Validate Component in the parameter template management");
|
||||
|
||||
} else if("control_values".equals(dbFieldName)) {
|
||||
} else if("control_values".equals(dbFieldName)) {
|
||||
dbFieldExampleList.add("The data comes from Component Value in the parameter template management");
|
||||
|
||||
} else if("is_must".equals(dbFieldName)) {
|
||||
dbFieldExampleList.add("Yes/No");
|
||||
|
||||
} else {
|
||||
dbFieldExampleList.add("Pull more+File");
|
||||
}
|
||||
@@ -3303,7 +3306,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
//设置单元格类型
|
||||
cell.setCellType(CellType.STRING);
|
||||
String cellValue = cell.getStringCellValue();
|
||||
if(!cellValue.startsWith("填写说明") || !cellValue.startsWith("Filling explanation")){
|
||||
if(!cellValue.startsWith("填写说明") && !cellValue.startsWith("Filling explanation")){
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
throw new JeroBootException("请导入正确模板!");
|
||||
} else {
|
||||
@@ -3331,7 +3334,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
//设置单元格类型
|
||||
cell.setCellType(CellType.STRING);
|
||||
String cellValue = cell.getStringCellValue();
|
||||
if(!cellValue.startsWith("例") || !cellValue.startsWith("Example")){
|
||||
if(!cellValue.startsWith("例") && !cellValue.startsWith("Example")){
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
throw new JeroBootException("请导入正确模板!");
|
||||
} else {
|
||||
@@ -3367,14 +3370,12 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
Cell cell = row.getCell(y); // cell 为空时会抛空指针异常
|
||||
if(ObjectUtil.isNull(cell)) {
|
||||
map.put(dbfieldList.get(y), "");
|
||||
continue;
|
||||
} else {
|
||||
|
||||
cell.setCellType(CellType.STRING); //设置单元格类型
|
||||
String cellValue = cell.getStringCellValue();
|
||||
map.put(dbfieldList.get(y), cellValue);
|
||||
}
|
||||
|
||||
cell.setCellType(CellType.STRING); //设置单元格类型
|
||||
String cellValue = cell.getStringCellValue();
|
||||
|
||||
//
|
||||
map.put(dbfieldList.get(y), cellValue);
|
||||
if (map.get(dbfieldList.get(y)) == null || "".equals(map.get(dbfieldList.get(y)))) {
|
||||
a++;
|
||||
}
|
||||
@@ -3394,7 +3395,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
String paramsManifestId) {
|
||||
// 查询清单的配置列信息
|
||||
List<ParamsConfigEO> paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId);
|
||||
Map<String, String> configMap = paramsConfigEOList.stream().collect(Collectors.toMap(ParamsConfigEO::getConfigName, ParamsConfigEO::getId));
|
||||
Map<String, String> configMap = paramsConfigEOList.stream().collect(Collectors.toMap(ParamsConfigEO::getId, ParamsConfigEO::getConfigName));
|
||||
// 查询清单参数项
|
||||
LambdaQueryWrapper<ParamsCollectManifestEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ParamsCollectManifestEO::getParamsManifestId, paramsManifestId);
|
||||
@@ -3411,8 +3412,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
//存放数据验证结果信息
|
||||
List<ParamsConfigDataEO> configDataList = new ArrayList<>();
|
||||
List<String> stringMessage = new ArrayList<>();
|
||||
int i = 2; //记录行号
|
||||
int num = 0; //记录是第几条数据
|
||||
int i = 3; //记录行号
|
||||
//循环验证数据
|
||||
for (Map<String, Object> dto : dataList) {
|
||||
i++;
|
||||
@@ -3435,201 +3435,219 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
String value = (String) entry.getValue();
|
||||
|
||||
if ("nio_number".equals(key) || "params_name".equals(key) || "description".equals(key)
|
||||
|| "control_type".equals(key) || "control_verify".equals(key) || "control_values".equals(key)) {
|
||||
|| "control_type".equals(key) || "control_verify".equals(key) || "control_values".equals(key)
|
||||
|| "is_must".equals(key)) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
ParamsConfigDataEO configDataEO = new ParamsConfigDataEO();
|
||||
List<ParamsConfigDataEO> list = paramsConfigDataEOList.stream().filter(e-> collectManifestMap.get(nioNumber).equals(e.getParamsCollectManifestId())
|
||||
&& configMap.get(key).equals(e.getParamsConfigId())).collect(Collectors.toList());
|
||||
&& key.equals(e.getParamsConfigId())).collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
configDataEO.setId(list.get(0).getId());
|
||||
}
|
||||
configDataEO.setParamsCollectManifestId(collectManifestMap.get(nioNumber));
|
||||
configDataEO.setParamsConfigId(configMap.get(key));
|
||||
configDataEO.setParamsConfigId(key);
|
||||
|
||||
|
||||
// 校验配置列
|
||||
if (ControlTypeEnum.TEXT.getValue().equals(value)) {
|
||||
resultMap = validateText(key, controlVerify, value, isMust, "1000", cut);
|
||||
if (ControlTypeEnum.TEXT.getValue().equals(controlType)) {
|
||||
resultMap = validateText(configMap.get(key), controlVerify, value, isMust, "1000", cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
|
||||
configDataEO.setTextData(value);
|
||||
|
||||
} else if (ControlTypeEnum.PULL_SINGLE.getValue().equals(value)) {
|
||||
resultMap = validatePull(key, controlValues, value, isMust, true, cut);
|
||||
} else if (ControlTypeEnum.PULL_SINGLE.getValue().equals(controlType)) {
|
||||
resultMap = validatePull(configMap.get(key), controlValues, value, isMust, true, cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
|
||||
configDataEO.setPullData(value);
|
||||
|
||||
} else if (ControlTypeEnum.PULL_MORE.getValue().equals(value)) {
|
||||
resultMap = validatePull(key, controlValues, value, isMust, false, cut);
|
||||
} else if (ControlTypeEnum.PULL_MORE.getValue().equals(controlType)) {
|
||||
resultMap = validatePull(configMap.get(key), controlValues, value, isMust, false, cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
|
||||
configDataEO.setPullData(value);
|
||||
|
||||
} else if (ControlTypeEnum.FILE.getValue().equals(value)) {
|
||||
resultMap = validateFile(key, unzipfilepath, value, isMust , cut);
|
||||
} else if (ControlTypeEnum.FILE.getValue().equals(controlType)) {
|
||||
resultMap = validateFile(configMap.get(key), unzipfilepath, value, isMust , cut);
|
||||
errorMsg += (String)resultMap.get("errorMsg");
|
||||
countError += (int)resultMap.get("countError");
|
||||
|
||||
configDataEO.setFileConnectId(value);
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_PULL_SINGLE.getValue().equals(value)) {
|
||||
} else if (ControlTypeEnum.TEXT_PULL_SINGLE.getValue().equals(controlType)) {
|
||||
// 校验必填
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(isMust) && StringUtils.isEmpty(value)) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += key + "为必填项,不能为空;";
|
||||
errorMsg += configMap.get(key) + "为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += key + " is mandatory and cannot be empty; ";
|
||||
errorMsg += configMap.get(key) + " is mandatory and cannot be empty; ";
|
||||
}
|
||||
countError++;
|
||||
} else {
|
||||
resultMap = validatePull(key, controlValues, value.split("#")[0], isMust, true, cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setPullData(value.split("#")[0]);
|
||||
|
||||
if (value.split("#").length > 1) {
|
||||
resultMap = validateText(key, controlVerify, value.split("#")[1], ParamsIsMustEnum.NO.getValue(), "1000", cut);
|
||||
resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[1], isMust, true, cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setTextData(value.split("#")[1]);
|
||||
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 {
|
||||
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.TEXT_PULL_MORE.getValue().equals(value)) {
|
||||
} else if (ControlTypeEnum.TEXT_PULL_MORE.getValue().equals(controlType)) {
|
||||
// 校验必填
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(isMust) && StringUtils.isEmpty(value)) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += key + "为必填项,不能为空;";
|
||||
errorMsg += configMap.get(key) + "为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += key + " is mandatory and cannot be empty; ";
|
||||
errorMsg += configMap.get(key) + " is mandatory and cannot be empty; ";
|
||||
}
|
||||
countError++;
|
||||
} else {
|
||||
resultMap = validatePull(key, controlValues, value.split("#")[0], isMust, false, cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setPullData(value.split("#")[0]);
|
||||
|
||||
if (value.split("#").length > 1) {
|
||||
resultMap = validateText(key, controlVerify, value.split("#")[1], ParamsIsMustEnum.NO.getValue(), "1000", cut);
|
||||
resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[1], isMust, false, cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setTextData(value.split("#")[1]);
|
||||
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 {
|
||||
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_FILE.getValue().equals(value)) {
|
||||
} else if (ControlTypeEnum.TEXT_FILE.getValue().equals(controlType)) {
|
||||
// 校验必填
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(isMust) && StringUtils.isEmpty(value)) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += key + "为必填项,不能为空;";
|
||||
errorMsg += configMap.get(key) + "为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += key + " is mandatory and cannot be empty; ";
|
||||
errorMsg += configMap.get(key) + " is mandatory and cannot be empty; ";
|
||||
}
|
||||
countError++;
|
||||
} else {
|
||||
resultMap = validateText(key, controlVerify, value.split("#")[0], isMust, "1000", cut);
|
||||
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]);
|
||||
|
||||
if (value.split("#").length > 1) {
|
||||
resultMap = validateFile(key, unzipfilepath, value.split("#")[1], ParamsIsMustEnum.NO.getValue(), cut);
|
||||
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 (ControlTypeEnum.PULL_SINGLE_FILE.getValue().equals(value)) {
|
||||
} else if (ControlTypeEnum.PULL_SINGLE_FILE.getValue().equals(controlType)) {
|
||||
// 校验必填
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(isMust) && StringUtils.isEmpty(value)) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += key + "为必填项,不能为空;";
|
||||
errorMsg += configMap.get(key) + "为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += key + " is mandatory and cannot be empty; ";
|
||||
errorMsg += configMap.get(key) + " is mandatory and cannot be empty; ";
|
||||
}
|
||||
countError++;
|
||||
} else {
|
||||
resultMap = validatePull(key, controlValues, value.split("#")[0], isMust, true, cut);
|
||||
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]);
|
||||
|
||||
if (value.split("#").length > 1) {
|
||||
resultMap = validateFile(key, unzipfilepath, value.split("#")[1], ParamsIsMustEnum.NO.getValue(), cut);
|
||||
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 (ControlTypeEnum.PULL_MORE_FILE.getValue().equals(value)) {
|
||||
} else if (ControlTypeEnum.PULL_MORE_FILE.getValue().equals(controlType)) {
|
||||
// 校验必填
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(isMust) && StringUtils.isEmpty(value)) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += key + "为必填项,不能为空;";
|
||||
errorMsg += configMap.get(key) + "为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += key + " is mandatory and cannot be empty; ";
|
||||
errorMsg += configMap.get(key) + " is mandatory and cannot be empty; ";
|
||||
}
|
||||
countError++;
|
||||
} else {
|
||||
resultMap = validatePull(key, controlValues, value.split("#")[0], isMust, false, cut);
|
||||
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]);
|
||||
|
||||
if (value.split("#").length > 1) {
|
||||
resultMap = validateFile(key, unzipfilepath, value.split("#")[1], ParamsIsMustEnum.NO.getValue(), cut);
|
||||
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 (ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue().equals(value)) {
|
||||
} else if (ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue().equals(controlType)) {
|
||||
// 校验必填
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(isMust) && StringUtils.isEmpty(value)) {
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += key + "为必填项,不能为空;";
|
||||
errorMsg += configMap.get(key) + "为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += key + " is mandatory and cannot be empty; ";
|
||||
errorMsg += configMap.get(key) + " is mandatory and cannot be empty; ";
|
||||
}
|
||||
countError++;
|
||||
} else {
|
||||
resultMap = validatePull(key, controlValues, value.split("#")[0], isMust, false, cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setPullData(value.split("#")[0]);
|
||||
|
||||
if (value.split("#").length > 1) {
|
||||
resultMap = validateText(key, controlVerify, value.split("#")[1], ParamsIsMustEnum.NO.getValue(), "1000", cut);
|
||||
resultMap = validatePull(configMap.get(key), controlValues, value.split("#")[1], isMust, true, cut);
|
||||
errorMsg += (String) resultMap.get("errorMsg");
|
||||
countError += (int) resultMap.get("countError");
|
||||
configDataEO.setTextData(value.split("#")[1]);
|
||||
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.split("#").length > 2) {
|
||||
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 {
|
||||
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]);
|
||||
}
|
||||
|
||||
if (value.split("#").length > 2) {
|
||||
resultMap = validateFile(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 (CutEnum.EN.getValue().equals(cut)) {
|
||||
errorMsg += key + "did not match the Control Component in the system; ";
|
||||
errorMsg += configMap.get(key) + "did not match the Control Component in the system; ";
|
||||
countError ++;
|
||||
} else {
|
||||
errorMsg += key + "未匹配到系统中的控件类型";
|
||||
errorMsg += configMap.get(key) + "未匹配到系统中的控件类型";
|
||||
countError ++;
|
||||
}
|
||||
}
|
||||
@@ -3730,7 +3748,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
// 判断是否符合备选值
|
||||
if (!controlValueList.contains(value)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configName + "中的" + value + "不正确;";
|
||||
errorMsg += configName + "下拉单选中的" + value + "不正确;";
|
||||
} else {
|
||||
errorMsg += configName + " " + value + " is not correct; ";
|
||||
}
|
||||
@@ -3744,7 +3762,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
for(String v : valueList) {
|
||||
if (!controlValueList.contains(v)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configName + "中的" + value + "不正确;";
|
||||
errorMsg += configName + "下拉多选中的" + value + "不正确;";
|
||||
} else {
|
||||
errorMsg += configName + " " + value + " is not correct; ";
|
||||
}
|
||||
@@ -3791,7 +3809,10 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
String regex = "";
|
||||
Boolean result = false;
|
||||
Boolean flag = false;
|
||||
if (ControlVerifyEnum.CHINESE.getValue().equals(controlVerify)) {
|
||||
if (ControlVerifyEnum.NULL.getValue().equals(controlVerify)) {
|
||||
result = true;
|
||||
|
||||
} else if (ControlVerifyEnum.CHINESE.getValue().equals(controlVerify)) {
|
||||
regex = "^[\\u4e00-\\u9fa5]{0,}$";
|
||||
result = value.matches(regex);
|
||||
|
||||
@@ -3832,7 +3853,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
errorMsg += configName + " did not match the Validate Component in the system; ";
|
||||
countError++;
|
||||
} else {
|
||||
if(result) {
|
||||
if(!result) {
|
||||
errorMsg += configName + " Validate Component is wrong; ";
|
||||
countError++;
|
||||
}
|
||||
@@ -3843,7 +3864,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
errorMsg += configName + "未匹配到系统中的控件校验;";
|
||||
countError++;
|
||||
} else {
|
||||
if(result) {
|
||||
if(!result) {
|
||||
errorMsg += configName + "文本的控件校验不正确;";
|
||||
countError++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user