From 000d46e4702e6c9465c2dc3e67c23f30de385154 Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Wed, 6 Jul 2022 14:22:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B3=95=E8=A7=84=E6=84=8F=E8=A7=81?= =?UTF-8?q?=E6=94=B6=E9=9B=86=EF=BC=8C=E5=88=97=E8=A1=A8=E5=9B=9E=E6=98=BE?= =?UTF-8?q?=E6=8A=80=E6=9C=AF=E9=A2=86=E5=9F=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/LawsOpinionGatherEO.java | 3 ++ .../impl/LawsOpinionGatherEOServiceImpl.java | 44 +++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/entity/LawsOpinionGatherEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/entity/LawsOpinionGatherEO.java index f3bdee2c6..54bdb668d 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/entity/LawsOpinionGatherEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/entity/LawsOpinionGatherEO.java @@ -73,6 +73,9 @@ public class LawsOpinionGatherEO implements Serializable { @Excel(name = "技术领域", width = 15) @ApiModelProperty(value = "技术领域") private String technologyTerritory; + @TableField(exist = false) + /**技术领域展示字段*/ + private String technologyTerritoryShow; /**收集结果*/ @Excel(name = "收集结果", width = 15) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionGatherEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionGatherEOServiceImpl.java index da95056f0..241da71dc 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionGatherEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionGatherEOServiceImpl.java @@ -2,6 +2,7 @@ package com.jero.modules.lawsOpinionGather.service.impl; import com.alibaba.fastjson.JSONObject; import com.jero.common.api.vo.Result; +import com.jero.common.constant.enums.CutEnum; import com.jero.common.exception.JeroBootException; import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO; import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum; @@ -9,11 +10,16 @@ import com.jero.modules.lawsOpinionGather.mapper.LawsOpinionGatherEOMapper; import com.jero.modules.lawsOpinionGather.service.ILawsOpinionGatherEOService; import com.jero.modules.project.enums.OperatorTypeEnum; import com.jero.modules.project.enums.RequestSourceEnum; +import com.jero.modules.system.entity.SysCategory; +import com.jero.modules.system.service.impl.SysCategoryServiceImpl; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; import java.util.Date; +import java.util.stream.Collectors; + import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; /** @@ -25,6 +31,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @Service public class LawsOpinionGatherEOServiceImpl extends ServiceImpl implements ILawsOpinionGatherEOService { + @Autowired + private SysCategoryServiceImpl sysCategoryService; + /** * 保存 * @@ -130,11 +139,46 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl lawsOpinionGatherEOList,String cut) { if(CollectionUtils.isNotEmpty(lawsOpinionGatherEOList)){ + //树形数据字典 + List technologyTerritoryList = sysCategoryService.list(); lawsOpinionGatherEOList.forEach(lawsOpinionGather -> { if(StringUtils.isNotEmpty(lawsOpinionGather.getGatherResult())){ lawsOpinionGather.setGatherResultShow(GatherResultEnum.getTextByValue(lawsOpinionGather.getGatherResult(),cut)); } + if(StringUtils.isNotEmpty(lawsOpinionGather.getTechnologyTerritory())){ + String technologyTerritoryShow = disposeTechnologyTerritory(technologyTerritoryList, lawsOpinionGather.getTechnologyTerritory(), cut); + lawsOpinionGather.setTechnologyTerritoryShow(technologyTerritoryShow); + } }); } } + + /** + * 处理技术领域展示字段 + * @param technologyTerritoryList + * @param technologyTerritory + * @param cut + * @return + */ + public String disposeTechnologyTerritory(List technologyTerritoryList,String technologyTerritory,String cut){ + String result = ""; + // technology_territory + if(StringUtils.isNotEmpty(technologyTerritory)){ + StringBuilder sb = new StringBuilder(); + for (String technologyTerritoryId : technologyTerritory.split(",")) { + List collect = technologyTerritoryList.stream().filter(e -> e.getId().equals(technologyTerritoryId)).collect(Collectors.toList()); + if(collect.size() != 0){ + if(CutEnum.CN.getValue().equals(cut)){ + sb.append(collect.get(0).getName()+","); + }else{ + sb.append(collect.get(0).getEnName()+","); + } + } + } + if(StringUtils.isNotEmpty(sb)){ + result = sb.substring(0, sb.length() - 1); + } + } + return result; + } } From b8ca777f585531525f1c86e98cca430c940e4be0 Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Wed, 6 Jul 2022 14:26:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B3=95=E8=A7=84=E6=84=8F=E8=A7=81?= =?UTF-8?q?=E6=94=B6=E9=9B=86=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5=20=20?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=BA=93/=E6=A0=87=E5=87=86id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-boot/db/蔚来标准sql/dev_third_record.sql | 5 +++++ .../lawsOpinionGather/entity/LawsOpinionGatherEO.java | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/jero-boot/db/蔚来标准sql/dev_third_record.sql b/jero-boot/db/蔚来标准sql/dev_third_record.sql index b61270de9..fa6abf466 100644 --- a/jero-boot/db/蔚来标准sql/dev_third_record.sql +++ b/jero-boot/db/蔚来标准sql/dev_third_record.sql @@ -177,3 +177,8 @@ SET FOREIGN_KEY_CHECKS = 1; -- 上报库配置表添加字段 ALTER TABLE `laws_weilai`.`params_report_config` ADD COLUMN `old_params_config_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '收集库参数配置id' AFTER `display_seq`; + + +-- 法规意见收集添加字段 文档库/标准id +ALTER TABLE `laws_opinion_gather` + ADD COLUMN `stand_id` varchar(64) NULL COMMENT '文档库/标准id' AFTER `acti_proc_inst_id`; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/entity/LawsOpinionGatherEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/entity/LawsOpinionGatherEO.java index 54bdb668d..d21113dd0 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/entity/LawsOpinionGatherEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/entity/LawsOpinionGatherEO.java @@ -103,4 +103,8 @@ public class LawsOpinionGatherEO implements Serializable { @ApiModelProperty(value = "流程实例id") private String actiProcInstId; + @Excel(name = "文档库/标准id", width = 15) + @ApiModelProperty(value = "文档库/标准id") + private String standId; + }