Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage

This commit is contained in:
wangzhijiang
2022-08-09 11:39:01 +08:00
9 changed files with 174 additions and 70 deletions
@@ -10,6 +10,7 @@ import com.jero.common.aspect.annotation.AutoLog;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.system.base.controller.JeroController;
import com.jero.modules.cert.template.entity.ParamsInfoEO;
import com.jero.modules.cert.template.enums.ControlTypeEnum;
import com.jero.modules.cert.template.service.IParamsInfoEOService;
import com.jero.modules.cert.template.service.IParamsInfoPublishEOService;
import com.jero.modules.cert.template.vo.ParamsInfoVO;
@@ -136,7 +137,8 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
@PostMapping(value = "/add")
// @RequiresPermissions("params:paramsInfo:add")
public Result<?> add(@Validated @RequestBody ParamsInfoEO paramsInfoEO) {
if (StringUtils.isEmpty(paramsInfoEO.getCertCategory())) {
if (StringUtils.isEmpty(paramsInfoEO.getCertCategory())
&& !ControlTypeEnum.Title.getValue().equals(paramsInfoEO.getControlType())) {
return Result.error("认证类别不能为空!");
}
boolean isSuccess = paramsInfoEOService.add(paramsInfoEO);
@@ -158,7 +160,8 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
@PostMapping(value = "/edit")
@RequiresPermissions("params:paramsInfo:edit")
public Result<?> edit(@Validated @RequestBody ParamsInfoEO paramsInfoEO) {
if (StringUtils.isEmpty(paramsInfoEO.getCertCategory())) {
if (StringUtils.isEmpty(paramsInfoEO.getCertCategory())
&& !ControlTypeEnum.Title.getValue().equals(paramsInfoEO.getControlType())) {
return Result.error("认证类别不能为空!");
}
boolean isSuccess = paramsInfoEOService.editById(paramsInfoEO);
@@ -1171,7 +1171,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
List<String> stringMessage = new ArrayList<>();
List<String> nioNumberImport = new ArrayList<>(); // 记录导入的nio编号
int i = 1; //记录行号
int i = 2; //记录行号
//循环验证数据
for (ParamsInfoCnImport dto : paramsInfoEOList) {
//判断此行数据是否全部为空,是则不读取
@@ -1278,13 +1278,6 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
errorMsg += (String)resultMap.get("errorMsg");
countError += (int)resultMap.get("countError");
// 认证类别
// 来源:认证类别sheet页
resultMap = validateMustAndLength(nioCertCategoryMap.get(nioNumber), "认证类别", "Cert Category", IsMustEnum.YES.getValue(), "1000", false, cut);
errorMsg += (String)resultMap.get("errorMsg");
countError += (int)resultMap.get("countError");
dto.setCertCategory(nioCertCategoryMap.get(nioNumber));
// String certCategory = dto.getCertCategory();
// resultMap = validateMustAndLength(certCategory, "认证类别", "cert category", IsMustEnum.YES.getValue(), "1000", false, cut);
// errorMsg += (String)resultMap.get("errorMsg");
@@ -1306,6 +1299,17 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
controlType = (String)resultMap.get("value");
dto.setControlType(controlType);
// 认证类别
// 来源:认证类别sheet页
if (ControlTypeEnum.Title.getValue().equals(controlType)) {
resultMap = validateMustAndLength(nioCertCategoryMap.get(nioNumber), "认证类别", "Cert Category", IsMustEnum.NO.getValue(), "1000", false, cut);
} else {
resultMap = validateMustAndLength(nioCertCategoryMap.get(nioNumber), "认证类别", "Cert Category", IsMustEnum.YES.getValue(), "1000", false, cut);
}
errorMsg += (String)resultMap.get("errorMsg");
countError += (int)resultMap.get("countError");
dto.setCertCategory(nioCertCategoryMap.get(nioNumber));
// 控件备选值
String controlValues = dto.getControlValues();
if (ControlTypeEnum.PULL_SINGLE.getValue().equals(controlType)
@@ -1352,7 +1356,6 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
dto.setControlVerify(null);
}
// 标题默认值
String titleDefaultValue = dto.getTitleDefaultValue();
if (ControlTypeEnum.Title.getValue().equals(controlType)) {
@@ -1427,7 +1430,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
List<String> ccNioNumberImport = new ArrayList<>(); // 记录导入的nio编号
int j = 1;
int j = 2;
for (CertCategoryParamsInfoCnImport ccDto : ccDtoList) {
//判断此行数据是否全部为空,是则不读取
if (checkObjAllFieldsIsNull(ccDto)) {