diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java index a816a1d6f..1876ca93d 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestEOServiceImpl.java @@ -327,7 +327,13 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl getConfigDataVOList(String controlType, ParamsConfigEO paramsConfigEO, ParamsConfigDataEO paramsConfigDataEO, ParamsCollectManifestEO paramsCollectManifestEO) { List paramsConfigDataVOList = new ArrayList<>(); - + List ossFiles = ossFileService.getFileInfosByConnectId(paramsCollectManifestEO.getFileTemplate()); + String templateId = null; + String templateName= null; + if (CollectionUtil.isNotEmpty(ossFiles)) { + templateId = ossFiles.get(0).getId(); + templateName = ossFiles.get(0).getFileName(); + } if (ControlTypeEnum.TEXT.getValue().equals(controlType)) { ParamsConfigDataVO configDataVO = new ParamsConfigDataVO(); @@ -370,6 +376,8 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(ParamsManifestEO::getTitle, paramsManifestEO.getTitle()); + queryWrapper.eq(ParamsManifestEO::getProjectId, paramsManifestEO.getProjectId()); + List paramsManifestEOList = list(queryWrapper); + if (CollectionUtil.isNotEmpty(paramsManifestEOList)) { + throw new JeroBootException("标题已存在!"); + } + String paramsManifestId = UUID.randomUUID().toString().replace("-",""); // 根据参数模板id发布版本查询对应参数项集合 @@ -135,6 +144,15 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(ParamsManifestEO::getTitle, oldParamsManifestEO.getTitle()); + queryWrapper.eq(ParamsManifestEO::getProjectId, oldParamsManifestEO.getProjectId()); + List paramsManifestEOList = list(queryWrapper); + if (CollectionUtil.isNotEmpty(paramsManifestEOList)) { + throw new JeroBootException("标题已存在!"); + } + ParamsManifestEO updateEO = new ParamsManifestEO(); updateEO.setId(paramsManifestEO.getId()); updateEO.setTitle(paramsManifestEO.getTitle()); diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/vo/ParamsConfigDataVO.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/vo/ParamsConfigDataVO.java index f639793f5..eb35f4d5c 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/vo/ParamsConfigDataVO.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/vo/ParamsConfigDataVO.java @@ -18,4 +18,6 @@ public class ParamsConfigDataVO { private String controlVerify; // 控件校验 private List> controlValue; // 控件备选值 private String dataValue; // 配置具体数据 + private String templateName; // 模板附件名称 + private String templateId; // 模板附件id }