From 70c78b04f03c33a31a9ceb8d6a02ed3a158b763e Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Wed, 6 Dec 2023 16:12:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E6=B8=85=E5=8D=95=E5=85=B3?= =?UTF-8?q?=E8=81=94=E6=8C=89=E5=B9=B3=E5=8F=B0=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ectCertificationInventoryEOController.java | 12 ++++ .../ProjectCertificationInventoryEO.java | 3 + ...rojectCertificationInventoryEOService.java | 2 + ...ctCertificationInventoryEOServiceImpl.java | 69 +++++++++++++++++++ 4 files changed, 86 insertions(+) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java index b630cae1a..c1f931bd8 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java @@ -386,4 +386,16 @@ public class ProjectCertificationInventoryEOController extends JeroController matchRelevantPeople(@RequestBody Map params){ return this.projectCertificationInventoryEOService.matchRelevantPeople(params); } + + @AutoLog(value = "认证清单关联按平台件") + @ApiOperation(value="认证清单关联按平台件", notes="认证清单关联按平台件") + @GetMapping(value = "/connectPlatform") + public Result connectPlatform(String id,String cut) { + ProjectCertificationInventoryEO projectCertificationInventoryEO = projectCertificationInventoryEOService.connectPlatform(id,cut); + if(projectCertificationInventoryEO==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(projectCertificationInventoryEO); + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java index 816d2d002..cca2bfad4 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java @@ -268,4 +268,7 @@ public class ProjectCertificationInventoryEO implements Serializable { @ApiModelProperty(value = "关联平台件数据") @TableField(exist = false) private List projectCertificationInventoryEOS; + + @TableField(exist = false) + private String projectName; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java index f205301bb..ac71eb7d0 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/IProjectCertificationInventoryEOService.java @@ -345,4 +345,6 @@ public interface IProjectCertificationInventoryEOService extends IService params); + + ProjectCertificationInventoryEO connectPlatform(String id,String cut); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java index f87f528f6..c8efaa9ce 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java @@ -208,6 +208,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl wrapper = new LambdaQueryWrapper<>(); + wrapper.in(LawsInventoryPlatformEO::getLawsInventoryId,id); + List lawsInventoryPlatformEOList = lawsInventoryPlatformEOService.list(wrapper); + if(ObjectUtils.isEmpty(lawsInventoryPlatformEOList)){ + return new ProjectCertificationInventoryEO(); + } + ProjectCertificationInventoryEO certificationInventoryEO = projectCertificationInventoryEOService.queryById(lawsInventoryPlatformEOList.get(0).getLawsInventoryId()); + + //交付物模板 + String deliverableTemplate = certificationInventoryEO.getDeliverableTemplate(); + if(StringUtils.isNotBlank(deliverableTemplate)){ + List fileInfos = iOSSFileService.getFileInfos(StringUtils.join(deliverableTemplate, ",")); + certificationInventoryEO.setDeliverableTemplateName(fileInfos.get(0).getFileName()); + } + //交付物类型 + String deliverableType = certificationInventoryEO.getDeliverableType(); + if(StringUtils.isNotBlank(deliverableType)){ + List categoryList = sysCategoryService.list(); + String name = getTreeName(cut, categoryList, Arrays.asList(deliverableType.split(","))); + certificationInventoryEO.setDeliverableTypeName(name); + } + //平台件项目名称 + String projectLibraryId = certificationInventoryEO.getProjectLibraryId(); + List projectLibraryBaseList = projectLibraryBaseMapper.queryById(projectLibraryId); + if(ObjectUtils.isNotEmpty(projectLibraryBaseList)){ + ProjectLibraryBase projectLibraryBase = projectLibraryBaseList.get(0); + //目标市场 英文 + List targetMarketList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode()); + Map paramEn = new HashMap<>(); + paramEn.put("cut",cut); + String targetMarket = projectLibraryBaseServiceImpl.getMarket(paramEn, targetMarketList, projectLibraryBase); + String projectName = projectLibraryBase.getPlatformType()+"-"+projectLibraryBase.getPower()+"-"+projectLibraryBase.getProducer()+"-"+targetMarket; + certificationInventoryEO.setProjectName(projectName); + } + return certificationInventoryEO; + } + + + + + + + + + + + + + + + + + + + + + // @Override // public void listPlatform(Map params) { // String cut = (String) params.get("cut");//