Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
@@ -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`;
|
||||
|
||||
+7
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
+44
@@ -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<LawsOpinionGatherEOMapper, LawsOpinionGatherEO> implements ILawsOpinionGatherEOService {
|
||||
|
||||
@Autowired
|
||||
private SysCategoryServiceImpl sysCategoryService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -130,11 +139,46 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
@Override
|
||||
public void disposeData(List<LawsOpinionGatherEO> lawsOpinionGatherEOList,String cut) {
|
||||
if(CollectionUtils.isNotEmpty(lawsOpinionGatherEOList)){
|
||||
//树形数据字典
|
||||
List<SysCategory> 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<SysCategory> technologyTerritoryList,String technologyTerritory,String cut){
|
||||
String result = "";
|
||||
// technology_territory
|
||||
if(StringUtils.isNotEmpty(technologyTerritory)){
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String technologyTerritoryId : technologyTerritory.split(",")) {
|
||||
List<SysCategory> 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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user