合并分支 'feature_dev_20221010_extend' 到 'dev_2nd_period_test'
Feature dev 20221010 extend 查看合并请求 laws-nio/laws-weilai!235
This commit is contained in:
+1
-1
@@ -169,7 +169,7 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
|
||||
void exportDre(ParamsCollectManifestVO paramsCollectManifestVO, HttpServletResponse response, HttpServletRequest request);
|
||||
|
||||
// 填写人角色下导入
|
||||
Result<?> importDre(MultipartFile file, String cut, String paramsManifestId) throws IOException;
|
||||
Result<?> importDre(MultipartFile file, String cut, String paramsManifestId);
|
||||
|
||||
Result<?> importData(List<Map<String, Object>> dataList,
|
||||
String unzipfilepath,
|
||||
|
||||
+293
-93
@@ -2518,7 +2518,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
+ "1.Import data starts at the third line, the first line is the header, the second line is the description, the third line is the example, and the fourth line is the official data\n"
|
||||
+ "2.All fields is filled in according to Validate Component and Component Value\n"
|
||||
+ "3.If the control type is drop-down multi-selection, multiple entries are separated by English or Chinese exclamation points\n"
|
||||
+ "4.Configuration data is filled in according to the control type, and if there are multiple control types, it needs to be separated by \"#\"\n"
|
||||
+ "4.Configuration data is filled in according to the sequence of control type, and if there are multiple control types, it needs to be separated by \"#\"\n"
|
||||
+ "5.When filling in, start in column G and do not modify information such as NIO number and parameter name\n"
|
||||
+ "6.File fields are file type, must create a folder in the directory of the same level as the file with the name of the nio number and place the file in the folder. Assume that the file is saved in the A number B.pdf,Should fill in A/B.pdf\n"
|
||||
+ "7.When importing into the system, you need to put the Excel into a folder, place other attachment files correctly as required, and finally compress the folder into zip format for import\n";
|
||||
@@ -2527,7 +2527,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
+ "1.导入数据从第三行开始,第一行为表头,第二行为填写说明,第三行是示例数据,需要从第四行开始填写\n"
|
||||
+ "2.填写时需按照控件校验和控件备选值进行填写\n"
|
||||
+ "3.控件类型为下拉多选时,填写多个时采用英文或中文感叹号分割\n"
|
||||
+ "4.配置数据按照控件类型进行填写,若存在多种控件类型填写时需要通过“#”隔开\n"
|
||||
+ "4.配置数据按照控件类型顺序进行填写,若存在多种控件类型填写时需要通过“#”隔开\n"
|
||||
+ "5.填写时从G列开始,请勿修改NIO编号和参数名称等信息\n"
|
||||
+ "6.上传附件为文件属性,填写时需要在本文件同级目录下以NIO编号为名称建立文件夹,并在文件夹下放置文件且该文件夹下只能有一层级,假设在NIO.XXXX下放置了B.pdf,则应填写NIO.XXXX/B.pdf\n"
|
||||
+ "7.导入系统时,需要将该Excel放入文件夹内,并按照要求正确放置其他附件文件,最后将文件夹压缩为zip格式进行导入\n";
|
||||
@@ -2628,7 +2628,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> importDre(MultipartFile file, String cut, String paramsManifestId) throws IOException {
|
||||
public Result<?> importDre(MultipartFile file, String cut, String paramsManifestId) {
|
||||
//验证文件名是否合格
|
||||
/* 截取后缀名 */
|
||||
int pos = file.getOriginalFilename().lastIndexOf(".");
|
||||
@@ -2806,7 +2806,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
MultipartFile multipartFile =
|
||||
new MockMultipartFile(nowFileList.get(0).getName(), nowFileList.get(0).getName(), "text/plain", input);
|
||||
//文件存入文件表
|
||||
OSSFile ossFile = ossFileService.uploadLocalOfCos(multipartFile, "", null, null);
|
||||
OSSFile ossFile = ossFileService.uploadLocalOfCos(multipartFile, "", null, cut);
|
||||
if (ObjectUtils.isNotEmpty(ossFile)) {
|
||||
String connectId = UUID.randomUUID().toString().replace("-", "");
|
||||
OSSFile ossFileUpdate = new OSSFile();
|
||||
@@ -3265,26 +3265,101 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
|
||||
if (CollectionUtil.isNotEmpty(paramsConfigDataEOS)) {
|
||||
ParamsConfigDataEO paramsConfigDataEO = paramsConfigDataEOS.get(0);
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
configDataBuilder.append(paramsConfigDataEO.getTextData()).append("#");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
configDataBuilder.append(paramsConfigDataEO.getPullData().replaceAll(",", "!")).append("#");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||
configDataBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName()).append("#");
|
||||
|
||||
fileList.addAll(ossFileList);
|
||||
if (ControlTypeEnum.TEXT.getValue().equals(controlType)) {
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
configDataBuilder.append(paramsConfigDataEO.getTextData());
|
||||
}
|
||||
|
||||
} else if (ControlTypeEnum.PULL_SINGLE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.PULL_MORE.getValue().equals(controlType)) {
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
configDataBuilder.append(paramsConfigDataEO.getPullData().replaceAll(",", "!"));
|
||||
}
|
||||
|
||||
} else if (ControlTypeEnum.FILE.getValue().equals(controlType)) {
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||
configDataBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName());
|
||||
|
||||
fileList.addAll(ossFileList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_PULL_SINGLE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.TEXT_PULL_MORE.getValue().equals(controlType)) {
|
||||
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
configDataBuilder.append(paramsConfigDataEO.getTextData());
|
||||
}
|
||||
|
||||
configDataBuilder.append("#");
|
||||
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
configDataBuilder.append(paramsConfigDataEO.getPullData().replaceAll(",", "!"));
|
||||
}
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_FILE.getValue().equals(controlType)) {
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
configDataBuilder.append(paramsConfigDataEO.getTextData());
|
||||
}
|
||||
|
||||
configDataBuilder.append("#");
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||
configDataBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName());
|
||||
|
||||
fileList.addAll(ossFileList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else if (ControlTypeEnum.PULL_SINGLE_FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.PULL_MORE_FILE.getValue().equals(controlType)) {
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
configDataBuilder.append(paramsConfigDataEO.getPullData().replaceAll(",", "!"));
|
||||
}
|
||||
|
||||
configDataBuilder.append("#");
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||
configDataBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName());
|
||||
|
||||
fileList.addAll(ossFileList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue().equals(controlType)) {
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
configDataBuilder.append(paramsConfigDataEO.getTextData());
|
||||
}
|
||||
configDataBuilder.append("#");
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
configDataBuilder.append(paramsConfigDataEO.getPullData().replaceAll(",", "!"));
|
||||
}
|
||||
configDataBuilder.append("#");
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||
configDataBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName());
|
||||
|
||||
fileList.addAll(ossFileList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
String configData = configDataBuilder.toString();
|
||||
if (configData.contains("#")) {
|
||||
configData = configData.substring(0, configData.lastIndexOf("#"));
|
||||
if (StringUtils.isNotEmpty(configData) && "".equals(configData.replace("#", ""))) {
|
||||
configData = configData.replace("#", "");
|
||||
}
|
||||
|
||||
record1.put(paramsConfigEO.getId(), configData);
|
||||
@@ -3826,22 +3901,43 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
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]);
|
||||
if (StringUtils.isNotEmpty(value)) {
|
||||
if (countChar(value, "#") != 1) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "控件类型顺序填写不正确;";
|
||||
} else {
|
||||
errorMsg += configMap.get(key) + "'s control type order is filled in incorrectly; ";
|
||||
}
|
||||
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]);
|
||||
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 (value.split("#").length == 1 && value.endsWith("#")) {
|
||||
// 校验必填
|
||||
if (IsMustEnum.YES.getValue().equals(isMust)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "下拉单选为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += configMap.get(key) + " is mandatory and cannot be empty; ";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
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]);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3855,21 +3951,42 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
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]);
|
||||
if (StringUtils.isNotEmpty(value)) {
|
||||
if (countChar(value, "#") != 1) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "控件类型顺序填写不正确;";
|
||||
} else {
|
||||
errorMsg += configMap.get(key) + "'s control type order is filled in incorrectly; ";
|
||||
}
|
||||
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 {
|
||||
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 = 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("#")) {
|
||||
// 校验必填
|
||||
if (IsMustEnum.YES.getValue().equals(isMust)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "下拉多选为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += configMap.get(key) + " is mandatory and cannot be empty; ";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
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]);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3882,18 +3999,35 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
errorMsg += configMap.get(key) + " is mandatory and cannot be empty; ";
|
||||
}
|
||||
countError++;
|
||||
} else {
|
||||
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 (StringUtils.isNotEmpty(value)) {
|
||||
if (countChar(value, "#") != 1) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "控件类型顺序填写不正确;";
|
||||
} else {
|
||||
errorMsg += configMap.get(key) + "'s control type order is filled in incorrectly; ";
|
||||
}
|
||||
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]);
|
||||
|
||||
if (value.split("#").length > 1) {
|
||||
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]);
|
||||
}
|
||||
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)) {
|
||||
@@ -3906,16 +4040,32 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
countError++;
|
||||
} 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]);
|
||||
if (StringUtils.isNotEmpty(value)) {
|
||||
if (countChar(value, "#") != 1) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "控件类型顺序填写不正确;";
|
||||
} else {
|
||||
errorMsg += configMap.get(key) + "'s control type order is filled in incorrectly; ";
|
||||
}
|
||||
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]);
|
||||
|
||||
if (value.split("#").length > 1) {
|
||||
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]);
|
||||
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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3929,16 +4079,33 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
countError++;
|
||||
} 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 (StringUtils.isNotEmpty(value)) {
|
||||
if (countChar(value, "#") != 1) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "控件类型顺序填写不正确;";
|
||||
} else {
|
||||
errorMsg += configMap.get(key) + "'s control type order is filled in incorrectly; ";
|
||||
}
|
||||
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]);
|
||||
|
||||
if (value.split("#").length > 1) {
|
||||
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]);
|
||||
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]);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3952,28 +4119,51 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
}
|
||||
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]);
|
||||
if(StringUtils.isNotEmpty(value)) {
|
||||
if (countChar(value, "#") != 2) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "控件类型顺序填写不正确;";
|
||||
} else {
|
||||
errorMsg += configMap.get(key) + "'s control type order is filled in incorrectly; ";
|
||||
}
|
||||
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]);
|
||||
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]);
|
||||
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("#")) {
|
||||
// 校验必填
|
||||
if (IsMustEnum.YES.getValue().equals(isMust)) {
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
errorMsg += configMap.get(key) + "下拉单选为必填项,不能为空;";
|
||||
} else {
|
||||
errorMsg += configMap.get(key) + " is mandatory and cannot be empty; ";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
|
||||
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]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4389,4 +4579,14 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
stringList.add("NIO-" + collectManifestEO.getNioNumber());
|
||||
}
|
||||
}
|
||||
|
||||
private int countChar(String str, String searchChar) {
|
||||
int count = 0;
|
||||
int origialLength = str.length();
|
||||
str = str.replace(searchChar, "");
|
||||
int newLength = str.length();
|
||||
count = origialLength - newLength;
|
||||
return count;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user