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 f3bdee2c6..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 @@ -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) @@ -100,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; + } 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; + } }