hlf 1 سال پیش
والد
کامیت
031f79c4c9

+ 33 - 66
ims-service/ims-eval/src/main/java/com/ims/eval/controller/EvaluationRevisionController.java

@@ -1,22 +1,18 @@
 package com.ims.eval.controller;
 
-import cn.hutool.core.date.DateUtil;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.ims.eval.config.CustomException;
 import com.ims.eval.entity.EvaluationRevision;
-import com.ims.eval.entity.ResponsibilityIndicatorInfo;
 import com.ims.eval.entity.dto.response.ResponsibilityIndicatorInfoResDTO;
 import com.ims.eval.entity.dto.result.R;
 import com.ims.eval.service.IEvaluationRevisionService;
 import com.ims.eval.service.IResponsibilityIndicatorInfoService;
-import com.ims.eval.util.ExcelUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
 
-import java.io.InputStream;
-import java.util.ArrayList;
+import javax.servlet.http.HttpServletRequest;
 import java.util.List;
 import java.util.Map;
 
@@ -38,6 +34,9 @@ public class EvaluationRevisionController {
 	@Autowired
 	private IResponsibilityIndicatorInfoService responsibilityIndicatorInfoService;
 
+	@Autowired
+	private HttpServletRequest request;
+
 	/**
 	 * 单位考评目标修订列表信息(分页)
 	 *
@@ -91,8 +90,8 @@ public class EvaluationRevisionController {
 	 * @param id 考评目标主键
 	 * @return 结果
 	 */
-	@PostMapping(value = "/revise/{id}")
-	public R revise(@PathVariable String id) {
+	@GetMapping(value = "/revise")
+	public R revise(@RequestParam(value = "id") String id) {
 		try {
 			boolean b = evaluationRevisionService.save(id);
 			if (b) {
@@ -108,31 +107,48 @@ public class EvaluationRevisionController {
 	/**
 	 * 详情
 	 *
-	 * @param deptResponsibilityId 考评目标主键
+	 * @param responsibilityId      业务主键
+	 * @param indicatorId           indicatorId
+	 * @param organizationShortName organizationShortName
+	 * @param binSection            binSection
+	 * @param binStage              binStage
 	 * @return 结果
 	 */
-	@GetMapping(value = "/details/{deptResponsibilityId}")
-	public R details(@PathVariable String deptResponsibilityId) {
-		Map<Object, List<ResponsibilityIndicatorInfoResDTO>> map = responsibilityIndicatorInfoService.selectResponsibilityIndicatorInfoList(deptResponsibilityId, null, "有效");
-		return R.ok().data(map);
+	@GetMapping(value = "/details")
+	public R details(@RequestParam(value = "responsibilityId", required = false) String responsibilityId,
+					 @RequestParam(value = "indicatorId", required = false) String indicatorId,
+					 @RequestParam(value = "organizationShortName", required = false) String organizationShortName,
+					 @RequestParam(value = "binSection", required = false) String binSection,
+					 @RequestParam(value = "binStage", required = false) String binStage) {
+		try {
+			Map list = responsibilityIndicatorInfoService.getResponsibilityInfoList(responsibilityId, indicatorId, organizationShortName, binSection, binStage, request);
+			return R.ok().data(list);
+		} catch (CustomException e1) {
+			e1.printStackTrace();
+			return R.error().customError(e1.getMessage());
+		} catch (Exception e) {
+			e.printStackTrace();
+			return R.error().customError("查询失败");
+		}
 	}
 
 	/**
 	 * 详情-批量新增/修改
 	 *
-	 * @param responsibilityIndicatorInfoList 修改内容
+	 * @param jsonObjects 修改内容
 	 * @return 结果
 	 */
 	@PostMapping(value = "/save")
-	public R addAll(@RequestBody List<ResponsibilityIndicatorInfo> responsibilityIndicatorInfoList) {
+	public R addAll(@RequestBody List<JSONObject> jsonObjects) {
 		try {
-			boolean b = responsibilityIndicatorInfoService.saveOrUpdateBatch2(responsibilityIndicatorInfoList);
+			boolean b = responsibilityIndicatorInfoService.revisionResponsibilityIndicatorInfo(jsonObjects);
 			if (b) {
 				return R.ok().data(b);
 			} else {
 				return R.customError("保存失败!");
 			}
-		} catch (CustomException e) {
+		} catch (Exception e) {
+			log.error("错误", e);
 			return R.customError(e.getMessage()).data("失败!");
 		}
 	}
@@ -151,53 +167,4 @@ public class EvaluationRevisionController {
 		return R.ok().data(list);
 	}
 
-	/**
-	 * 导入
-	 *
-	 * @param file         文件
-	 * @param isQuantified 是否量化
-	 * @return 结果
-	 */
-	@PostMapping(value = "/import")
-	public R importData(@RequestParam("file") MultipartFile file, @RequestParam("isQuantified") String isQuantified) {
-		if (!file.isEmpty()) {
-			try {
-				//获取原始的文件名
-				String originalFilename = file.getOriginalFilename();
-				//获取文件类型
-				String fileType = originalFilename.substring(originalFilename.lastIndexOf(".") + 1, originalFilename.length());
-				//默认从第一行开始读取
-				int startRows = 1;
-				//获取输入流
-				InputStream is = file.getInputStream();
-				List<ResponsibilityIndicatorInfo> responsibilityIndicatorInfoList = new ArrayList<>();
-				//Excel导入导出的单元类
-				List<String[]> strings = ExcelUtil.readData(fileType, startRows, true, is);
-				//遍历Excel表每一行的数据
-				for (String[] str : strings) {
-					ResponsibilityIndicatorInfo responsibilityIndicatorInfo = new ResponsibilityIndicatorInfo();
-					responsibilityIndicatorInfo.setId(str[0]);
-					if ("是".equals(isQuantified)) {
-						responsibilityIndicatorInfo.setQuantifiedValue(Double.parseDouble(str[7]));
-						responsibilityIndicatorInfo.setState(str[9]);
-					} else if ("否".equals(isQuantified)) {
-						responsibilityIndicatorInfo.setNonQuantifiedValue(str[7]);
-						responsibilityIndicatorInfo.setState(str[8]);
-					}
-					responsibilityIndicatorInfo.setUpdateTime(DateUtil.date());
-					responsibilityIndicatorInfoList.add(responsibilityIndicatorInfo);
-				}
-				boolean b = responsibilityIndicatorInfoService.updateBatchById(responsibilityIndicatorInfoList);
-				if (b) {
-					return R.ok().data(b);
-				} else {
-					return R.customError("导入失败!");
-				}
-			} catch (Exception e) {
-				log.error("错误", e);
-				return R.customError(e.getMessage()).data("失败!");
-			}
-		}
-		return R.customError("上传文件为空!");
-	}
 }

+ 0 - 5
ims-service/ims-eval/src/main/java/com/ims/eval/entity/EvaluationRevision.java

@@ -23,11 +23,6 @@ public class EvaluationRevision extends Model {
 	private String id;
 
 	/**
-	 * 考评目标主键
-	 */
-	private String deptResponsibilityId;
-
-	/**
 	 * 业务编码
 	 */
 	private String responsibilityCode;

+ 1 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/service/IResponsibilityIndicatorInfoService.java

@@ -36,7 +36,7 @@ public interface IResponsibilityIndicatorInfoService extends IService<Responsibi
 
 	Map<String ,Object> getResponsibilityIdMap(String deptResponsibilityId);
 
-	boolean saveOrUpdateBatch2(List<ResponsibilityIndicatorInfo> responsibilityIndicatorInfoList);
+	boolean revisionResponsibilityIndicatorInfo(List<JSONObject> jsonObjects);
 
 	List<ResponsibilityIndicatorInfoResDTO> selectPopUpData(String deptResponsibilityId, String isQuantified, String dataState);
 

+ 1 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluationRevisionServiceImpl.java

@@ -93,7 +93,7 @@ public class EvaluationRevisionServiceImpl extends ServiceImpl<EvaluationRevisio
 		DeptResponsibility deptResponsibility = deptResponsibilityService.getById(id);
 		if (null != deptResponsibility) {
 			EvaluationRevision evaluationRevision = new EvaluationRevision();
-			evaluationRevision.setDeptResponsibilityId(deptResponsibility.getId());
+			evaluationRevision.setId(deptResponsibility.getId());
 			String responsibilityCode = deptResponsibility.getResponsibilityCode();
 			int index = responsibilityCode.indexOf("_");
 			evaluationRevision.setResponsibilityCode("MBXD" + responsibilityCode.substring(index).toUpperCase());

+ 143 - 122
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/ResponsibilityIndicatorInfoServiceImpl.java

@@ -3,7 +3,6 @@ package com.ims.eval.service.impl;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.ims.common.utils.Constant;
 import com.ims.common.utils.StringUtils;
 import com.ims.eval.cache.CacheContext;
 import com.ims.eval.config.CustomException;
@@ -155,34 +154,55 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 	}
 
 	@Override
-	public boolean saveOrUpdateBatch2(List<ResponsibilityIndicatorInfo> responsibilityIndicatorInfoList) {
-		boolean b = false;
-		for (ResponsibilityIndicatorInfo obj : responsibilityIndicatorInfoList) {
-			ResponsibilityIndicatorInfo responsibilityIndicatorInfo = super.getById(obj.getId());
-			if (!"失效".equals(responsibilityIndicatorInfo.getDataState())) {
-				obj.setDataState("失效");
-				b = super.updateById(obj);
-				if (b) {
+	public boolean revisionResponsibilityIndicatorInfo(List<JSONObject> jsonObjects) {
+		for (JSONObject json : jsonObjects) {
+			Map<String, Object> idMap = new HashMap();
+			Map valueMap = new HashMap();
+			for (String key : json.keySet()) {
+				Object value = json.get(key);
+				if (key.startsWith("ID_")) {
+					idMap.put(key, value);
+				} else {
+					valueMap.put(key, value);
+				}
+			}
+			for (Map.Entry<String, Object> entry : idMap.entrySet()) {
+				ResponsibilityIndicatorInfo responsibilityIndicatorInfo = super.getById(entry.getValue().toString());
+				String quantified = valueMap.get(entry.getKey().replace("ID_", "IS_LH_")).toString();
+				double quantifiedValue = 0;
+				if ("1".equals(quantified)) {
+					if (MathCalculatorUtil.isNumber(String.valueOf(valueMap.get(entry.getKey().replace("ID_", "")).toString()))) {
+						quantifiedValue = Double.valueOf(valueMap.get(entry.getKey().replace("ID_", "")).toString());
+					}
+				}
+				String nonQuantifiedValue = valueMap.get(entry.getKey().replace("ID_", "")).toString();
+				if (quantifiedValue != responsibilityIndicatorInfo.getQuantifiedValue() || !nonQuantifiedValue.equals(responsibilityIndicatorInfo.getNonQuantifiedValue())) {
 					ResponsibilityIndicatorInfo info = new ResponsibilityIndicatorInfo();
 					info.setDeptResponsibilityId(responsibilityIndicatorInfo.getDeptResponsibilityId());
 					info.setOrganizationEvaluationRuleId(responsibilityIndicatorInfo.getOrganizationEvaluationRuleId());
 					info.setIndicatorId(responsibilityIndicatorInfo.getIndicatorId());
 					info.setIndicatorDictionaryId(responsibilityIndicatorInfo.getIndicatorDictionaryId());
 					info.setOptionCode(responsibilityIndicatorInfo.getOptionCode());
-					info.setIsQuantified(obj.getIsQuantified());
-					info.setQuantifiedValue(obj.getQuantifiedValue());
-					info.setNonQuantifiedValue(obj.getNonQuantifiedValue());
+					info.setIsQuantified(responsibilityIndicatorInfo.getIsQuantified());
+					info.setQuantifiedValue(quantifiedValue);
+					info.setNonQuantifiedValue(nonQuantifiedValue);
 					info.setCreateTime(new Date());
-					info.setState(obj.getState());
+					info.setRemark(responsibilityIndicatorInfo.getRemark());
+					info.setState(valueMap.get("state").toString());
 					info.setDataState("有效");
-					b = super.save(info);
+					info.setDeptId(responsibilityIndicatorInfo.getDeptId());
+					info.setChildCode(responsibilityIndicatorInfo.getChildCode());
+					info.setEvaluateRuleInfoId(responsibilityIndicatorInfo.getEvaluateRuleInfoId());
+					info.setOrganizationId(responsibilityIndicatorInfo.getOrganizationId());
+					boolean b = this.save(info);
+					if (b) {
+						responsibilityIndicatorInfo.setDataState("失效");
+						this.updateById(responsibilityIndicatorInfo);
+					}
 				}
-			} else {
-				obj.setUpdateTime(new Date());
-				b = super.updateById(obj);
 			}
 		}
-		return b;
+		return true;
 	}
 
 	@Override
@@ -197,19 +217,19 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 
 		//判断是否是(重点专项和管理事项)
 		List<Map> indicatorMap = new ArrayList<>();
-		if("ZDZX".equals(CacheContext.bseIdObject.get(binStage).getStageCode()) || "GLSX".equals(CacheContext.bseIdObject.get(binStage).getStageCode())){
+		if ("ZDZX".equals(CacheContext.bseIdObject.get(binStage).getStageCode()) || "GLSX".equals(CacheContext.bseIdObject.get(binStage).getStageCode())) {
 
-			List<Indicator> indicatorList = indicatorService.listAll("","","",binSection,binStage,"","");
-			if(null != indicatorList && indicatorList.size()>0){
-				for (Indicator i : indicatorList){
+			List<Indicator> indicatorList = indicatorService.listAll("", "", "", binSection, binStage, "", "");
+			if (null != indicatorList && indicatorList.size() > 0) {
+				for (Indicator i : indicatorList) {
 					Map map = new HashMap();
-					map.put("id",i.getId());
-					map.put("indicator_name",i.getIndicatorName());
+					map.put("id", i.getId());
+					map.put("indicator_name", i.getIndicatorName());
 					indicatorMap.add(map);
 				}
 			}
 
-		}else{
+		} else {
 			indicatorMap = baseMapper.selectResponsibilityIndicatorList(responsibilityId, binSection, binStage);
 		}
 
@@ -224,13 +244,13 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 
 		boolean titlemark = true;//标记生成标题
 
-		List<Map> indicatorMap  = getResponsibilityIndicatorList(responsibilityId, binSection, binStage,request);
+		List<Map> indicatorMap = getResponsibilityIndicatorList(responsibilityId, binSection, binStage, request);
 
 		List<String> idList = indicatorMap.stream()
 			.map(map -> String.valueOf(map.get("id"))) // 提取每个Map中key为"id"的值,并转换成String
 			.collect(Collectors.toList()); // 将提取的值收集到List中
-		if(null == idList || idList.size()<=0){
-				throw  new CustomException("未查询到数据");
+		if (null == idList || idList.size() <= 0) {
+			throw new CustomException("未查询到数据");
 		}
 		List<IndicatorResDTO> indicatorResDTOS = indicatorService.getGroupChildCodeByIds(idList);
 
@@ -238,35 +258,35 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 			// 遍历分组后的Map
 			Map title = new LinkedHashMap();//保存所有的指标名
 
-				for (IndicatorResDTO dto : indicatorResDTOS) {
-					List<Map> titleArray = new ArrayList<>();
-					// 处理每个分组中的元素
-					Map titlemap = new LinkedHashMap();
-					titlemap.put("childName",dto.getChildName());//子指标名
-					titlemap.put("key", dto.getDeptName());//名称
-					titlemap.put("code",dto.getChildCode()+"_"+dto.getOptionCode());//名称
-					titlemap.put("flag", dto.getIsQuantified());//是否量化
-					titleArray.add(titlemap);
-					title.put(dto.getChildName(), titleArray);
-				}
+			for (IndicatorResDTO dto : indicatorResDTOS) {
+				List<Map> titleArray = new ArrayList<>();
+				// 处理每个分组中的元素
+				Map titlemap = new LinkedHashMap();
+				titlemap.put("childName", dto.getChildName());//子指标名
+				titlemap.put("key", dto.getDeptName());//名称
+				titlemap.put("code", dto.getChildCode() + "_" + dto.getOptionCode());//名称
+				titlemap.put("flag", dto.getIsQuantified());//是否量化
+				titleArray.add(titlemap);
+				title.put(dto.getChildName(), titleArray);
+			}
 
 			//状态标题头
 			Map deptstateMap = new LinkedHashMap();
 			List<Map> titlestateArray = new ArrayList<>();
 			deptstateMap.put("key", "填报状态");//名称
-			deptstateMap.put("code","state");//名称
+			deptstateMap.put("code", "state");//名称
 			deptstateMap.put("flag", false);//是否编辑
 			titlestateArray.add(deptstateMap);
 			title.put("状态", titlestateArray);
 
-			data.put("title",title);
+			data.put("title", title);
 			titlemark = false;
 		}
 
 
 		//获取数据
 		List<Map> datamapList = new ArrayList<>();
-		List<ResponsibilityIndicatorInfoResDTO> dataList = baseMapper.getResponsibilityInfoList(responsibilityId, indicatorId,organizationShortName, binSection, binStage);
+		List<ResponsibilityIndicatorInfoResDTO> dataList = baseMapper.getResponsibilityInfoList(responsibilityId, indicatorId, organizationShortName, binSection, binStage);
 
 		Map<String, List<ResponsibilityIndicatorInfoResDTO>> groupeddataMap = dataList.stream().collect(Collectors.groupingBy(ResponsibilityIndicatorInfoResDTO::getOrganizationId)); // 根据organizationId进行分组
 
@@ -287,18 +307,18 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 			for (IndicatorResDTO d : indicatorResDTOS) {
 				boolean mark = true;//标记给公司名赋值
 				if (mark) {
-					indicatormap.put("organizationShortName", resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getOrganizationShortName());//公司名
-					indicatormap.put("organizationId", resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getOrganizationId());//公司id
-					indicatormap.put("state",resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getState());
-					indicatormap.put("IS_LH_state","3");
+					indicatormap.put("organizationShortName", resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getOrganizationShortName());//公司名
+					indicatormap.put("organizationId", resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getOrganizationId());//公司id
+					indicatormap.put("state", resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getState());
+					indicatormap.put("IS_LH_state", "3");
 					mark = false;
 				}
 				//指标属性
-				indicatormap.put(d.getChildCode() + "_" + d.getOptionCode(), null == resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getNonQuantifiedValue() ? "" : resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getNonQuantifiedValue());
+				indicatormap.put(d.getChildCode() + "_" + d.getOptionCode(), null == resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getNonQuantifiedValue() ? "" : resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getNonQuantifiedValue());
 				//指标id
-				indicatormap.put("ID_" + d.getChildCode() + "_" + d.getOptionCode(), resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getId());
+				indicatormap.put("ID_" + d.getChildCode() + "_" + d.getOptionCode(), resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getId());
 				//是否量化
-				indicatormap.put("IS_LH_" +d.getChildCode() + "_" + d.getOptionCode(),resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getIsQuantified()?"1":"2");
+				indicatormap.put("IS_LH_" + d.getChildCode() + "_" + d.getOptionCode(), resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getIsQuantified() ? "1" : "2");
 			}
 			datamapList.add(indicatormap);
 		}
@@ -311,24 +331,24 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 	@Override
 	public boolean updateResponsibilityIndicatorInfo(List<JSONObject> jsonObjects) {
 
-		for (JSONObject json :jsonObjects){
+		for (JSONObject json : jsonObjects) {
 
-			Map<String,Object > idMap = new HashMap();
-			Map valueMap =  new HashMap();
+			Map<String, Object> idMap = new HashMap();
+			Map valueMap = new HashMap();
 			for (String key : json.keySet()) {
 				Object value = json.get(key);
-				if(key.startsWith("ID_")){
-					idMap.put(key,value);
-				}else {
-					valueMap.put(key,value);
+				if (key.startsWith("ID_")) {
+					idMap.put(key, value);
+				} else {
+					valueMap.put(key, value);
 				}
 			}
 
-			List<ResponsibilityIndicatorInfo> responsibilityInfos =new ArrayList<>();
-			for (Map.Entry<String,Object > entry : idMap.entrySet()) {
+			List<ResponsibilityIndicatorInfo> responsibilityInfos = new ArrayList<>();
+			for (Map.Entry<String, Object> entry : idMap.entrySet()) {
 				ResponsibilityIndicatorInfo info = new ResponsibilityIndicatorInfo();
 				info.setId(entry.getValue().toString());
-				String quantified = valueMap.get(entry.getKey().replace("ID_","IS_LH_")).toString();
+				String quantified = valueMap.get(entry.getKey().replace("ID_", "IS_LH_")).toString();
 
 				if ("1".equals(quantified)) {
 
@@ -340,12 +360,12 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 				}
 
 
-				info.setNonQuantifiedValue(valueMap.get(entry.getKey().replace("ID_","")).toString());
+				info.setNonQuantifiedValue(valueMap.get(entry.getKey().replace("ID_", "")).toString());
 				info.setState(valueMap.get("state").toString());//
 				responsibilityInfos.add(info);
 			}
-			 boolean b =  this.saveOrUpdateBatch(responsibilityInfos);
-			if(!b){
+			boolean b = this.saveOrUpdateBatch(responsibilityInfos);
+			if (!b) {
 				return false;
 			}
 		}
@@ -361,14 +381,14 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 		//获取指标名称
 		String[] values = new String[]{"不合格", "待确认", "已确认"};
 		boolean titlemark = true;//标记生成标题
-		Map<String ,List<Map<String,String>>> title = new LinkedHashMap();//保存所有的指标名
-		List<Map> indicatorMap  = getResponsibilityIndicatorList(responsibilityId, binSection, binStage,request);
+		Map<String, List<Map<String, String>>> title = new LinkedHashMap();//保存所有的指标名
+		List<Map> indicatorMap = getResponsibilityIndicatorList(responsibilityId, binSection, binStage, request);
 
 		List<String> idList = indicatorMap.stream()
 			.map(map -> String.valueOf(map.get("id"))) // 提取每个Map中key为"id"的值,并转换成String
 			.collect(Collectors.toList()); // 将提取的值收集到List中
-		if(null == idList || idList.size()<=0){
-			throw  new CustomException("未查询导数据");
+		if (null == idList || idList.size() <= 0) {
+			throw new CustomException("未查询导数据");
 		}
 		List<IndicatorResDTO> indicatorResDTOS = indicatorService.getGroupChildCodeByIds(idList);
 
@@ -387,23 +407,23 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 //				// 进一步处理每个分组
 
 
-				for (IndicatorResDTO dto : indicatorResDTOS) {
-					Map titlemap = new LinkedHashMap();
-					List<Map<String,String>> titleArray = new ArrayList<>();
-					// 处理每个分组中的元素
-					titlemap.put(dto.getChildCode()+"_"+dto.getOptionCode(),dto.getDeptName());//名称
-					titleArray.add(titlemap);
-					title.put(dto.getChildName(), titleArray);
-				}
+			for (IndicatorResDTO dto : indicatorResDTOS) {
+				Map titlemap = new LinkedHashMap();
+				List<Map<String, String>> titleArray = new ArrayList<>();
+				// 处理每个分组中的元素
+				titlemap.put(dto.getChildCode() + "_" + dto.getOptionCode(), dto.getDeptName());//名称
+				titleArray.add(titlemap);
+				title.put(dto.getChildName(), titleArray);
+			}
 
 //			}
 
 			//状态标题头
-			List<Map<String,String>> titleStateArray = new ArrayList<>();
+			List<Map<String, String>> titleStateArray = new ArrayList<>();
 			Map titleStateMap = new LinkedHashMap();
-			titleStateMap.put("state","填报状态");
+			titleStateMap.put("state", "填报状态");
 			titleStateArray.add(titleStateMap);
-			title.put("状态",titleStateArray);
+			title.put("状态", titleStateArray);
 
 			titlemark = false;
 		}
@@ -411,7 +431,7 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 
 		//获取数据
 		List<Map> datamapList = new ArrayList<>();
-		List<ResponsibilityIndicatorInfoResDTO> dataList = baseMapper.getResponsibilityInfoList(responsibilityId, indicatorId,"", binSection, binStage);
+		List<ResponsibilityIndicatorInfoResDTO> dataList = baseMapper.getResponsibilityInfoList(responsibilityId, indicatorId, "", binSection, binStage);
 
 		Map<String, List<ResponsibilityIndicatorInfoResDTO>> groupeddataMap = dataList.stream().collect(Collectors.groupingBy(ResponsibilityIndicatorInfoResDTO::getOrganizationId)); // 根据organizationId进行分组
 
@@ -433,22 +453,20 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 			for (IndicatorResDTO d : indicatorResDTOS) {
 				boolean mark = true;//标记给公司名赋值
 				if (mark) {
-					indicatormap.put("organizationShortName", resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getOrganizationShortName());//公司名
-					indicatormap.put("organizationId", resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getOrganizationId());//公司id
-					String  state2 = resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getState();//(-1:不合格;0:待确认;1:已确认)
-					state = stateConvert(state2,true);
+					indicatormap.put("organizationShortName", resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getOrganizationShortName());//公司名
+					indicatormap.put("organizationId", resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getOrganizationId());//公司id
+					String state2 = resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getState();//(-1:不合格;0:待确认;1:已确认)
+					state = stateConvert(state2, true);
 					mark = false;
 				}
 				//指标属性
-				indicatormap.put(d.getChildCode() + "_" + d.getOptionCode(), null == resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getNonQuantifiedValue() ? "" : resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getNonQuantifiedValue());
+				indicatormap.put(d.getChildCode() + "_" + d.getOptionCode(), null == resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getNonQuantifiedValue() ? "" : resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getNonQuantifiedValue());
 			}
-			indicatormap.put("state",state);//状态
+			indicatormap.put("state", state);//状态
 			datamapList.add(indicatormap);
 		}
 
 
-
-
 		//获取主表对象
 
 		DeptResponsibility responsibility = deptResponsibilityService.getById(responsibilityId);
@@ -503,7 +521,7 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 
 
 		Cell header3Cell0 = headerRow3.createCell(0);
-		header3Cell0.setCellValue("zhidmap,respId="+responsibilityId);
+		header3Cell0.setCellValue("zhidmap,respId=" + responsibilityId);
 
 		Cell header3Cell1 = headerRow3.createCell(1);
 		header3Cell1.setCellValue("organizationShortName");
@@ -514,29 +532,29 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 
 		Integer colsize = 2;
 		Integer optioncols = 3;
-		for (String  key : title.keySet()) {//存在多个标题
-			List<Map<String,String>> titleArray2 = title.get(key);
-			Cell headerCellcolsize = headerRow1.createCell(colsize+1);
+		for (String key : title.keySet()) {//存在多个标题
+			List<Map<String, String>> titleArray2 = title.get(key);
+			Cell headerCellcolsize = headerRow1.createCell(colsize + 1);
 			headerCellcolsize.setCellValue(key);
 
 
 			//设置宽度
 			int contentWidth = headerCellcolsize.getStringCellValue().length() * 310;
-			contentWidth = (contentWidth<=4000) ? 4000 :5000;
+			contentWidth = (contentWidth <= 4000) ? 4000 : 5000;
 			// 设置指定列的宽度为计算得到的宽度值
-			sheet.setColumnWidth(colsize+1, contentWidth);
+			sheet.setColumnWidth(colsize + 1, contentWidth);
 
 			headerCellcolsize.setCellStyle(cellStyle);
 			headerCellcolsize.setCellStyle(cellStyle);
 
-			System.out.println("key="+key);
+			System.out.println("key=" + key);
 
-			for (Map<String,String>  key2 : titleArray2) {
-				if(key2.size()>1){
-					sheet.addMergedRegion(new CellRangeAddress(1, 1, colsize+1, colsize + key2.size()));
+			for (Map<String, String> key2 : titleArray2) {
+				if (key2.size() > 1) {
+					sheet.addMergedRegion(new CellRangeAddress(1, 1, colsize + 1, colsize + key2.size()));
 				}
 				colsize = colsize + key2.size();
-				for (String  key3 : key2.keySet()) {
+				for (String key3 : key2.keySet()) {
 
 					Cell header3Cell3 = headerRow3.createCell(optioncols);
 					header3Cell3.setCellValue(key3);
@@ -547,7 +565,7 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 					header2Cell2.setCellStyle(cellStyle);
 
 					// 隐藏列
-					if(key3.startsWith("ID_") || key3.startsWith("IS_LH_")){
+					if (key3.startsWith("ID_") || key3.startsWith("IS_LH_")) {
 						sheet.setColumnHidden(optioncols, true);
 					}
 					optioncols++;
@@ -557,19 +575,19 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 
 
 		Integer rowdate = 4;
-		for (Map<String,String >  datamaps  : datamapList) {
+		for (Map<String, String> datamaps : datamapList) {
 			Integer colsdata = 1;
 			Row headerRowdate = sheet.createRow(rowdate);
 			Cell dataCell0 = headerRowdate.createCell(0);
-			dataCell0.setCellValue(rowdate-3);
+			dataCell0.setCellValue(rowdate - 3);
 			dataCell0.setCellStyle(cellStyle);
-			for (String datakey: datamaps.keySet()) {
+			for (String datakey : datamaps.keySet()) {
 
 				Cell dataCell1 = headerRowdate.createCell(colsdata);
 				dataCell1.setCellValue(datamaps.get(datakey).toString());
 				dataCell1.setCellStyle(cellStyle);
 
-				if("state".equals(datakey)){
+				if ("state".equals(datakey)) {
 					// 创建一个数据验证对象
 					DataValidationHelper validationHelper = sheet.getDataValidationHelper();
 					DataValidationConstraint constraint = validationHelper.createExplicitListConstraint(values);
@@ -658,35 +676,37 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 			}
 			workbook.close();
 
-			for(Map<String, Object> map : dataList){
-				Map<String,String > idMap =  new HashMap();
-				Map<String,String > valueMap =  new HashMap();
+			for (Map<String, Object> map : dataList) {
+				Map<String, String> idMap = new HashMap();
+				Map<String, String> valueMap = new HashMap();
 				for (String key : map.keySet()) {
 					String value = String.valueOf(map.get(key));
-					if(key.startsWith("zhidmap")){
+					if (key.startsWith("zhidmap")) {
 						String[] zhidmap = key.split(",");
-						idMap.put("respId",zhidmap[1].split("=")[1]);
+						idMap.put("respId", zhidmap[1].split("=")[1]);
 						continue;
-					}if(key.startsWith("organization")){
-						idMap.put(key,value);
+					}
+					if (key.startsWith("organization")) {
+						idMap.put(key, value);
 						continue;
-					}if(key.startsWith("state")){
-						idMap.put(key,value);
+					}
+					if (key.startsWith("state")) {
+						idMap.put(key, value);
 						continue;
-					}else {
-						valueMap.put(key,value);
+					} else {
+						valueMap.put(key, value);
 						continue;
 					}
 				}
-				List<ResponsibilityIndicatorInfo> responsibilityInfos =new ArrayList<>();
-				for (Map.Entry<String,String > entry : valueMap.entrySet()) {
+				List<ResponsibilityIndicatorInfo> responsibilityInfos = new ArrayList<>();
+				for (Map.Entry<String, String> entry : valueMap.entrySet()) {
 					//organizationEvaluationId 考评记录id
 					// organizationId 组织id
 					// childOptionCode 组合子指标和指标项
-					List<ResponsibilityIndicatorInfo>  responsibilityInfoList = 	getResponsibilityInfooByOptionCodeList(idMap.get("respId"),idMap.get("organizationId"),entry.getKey());
+					List<ResponsibilityIndicatorInfo> responsibilityInfoList = getResponsibilityInfooByOptionCodeList(idMap.get("respId"), idMap.get("organizationId"), entry.getKey());
 					ResponsibilityIndicatorInfo info = new ResponsibilityIndicatorInfo();
 					ResponsibilityIndicatorInfo oriinfo = null;
-					if(null !=responsibilityInfoList &&  responsibilityInfoList.size()>0){
+					if (null != responsibilityInfoList && responsibilityInfoList.size() > 0) {
 						oriinfo = responsibilityInfoList.get(0);//原始数据
 						info.setId(oriinfo.getId());
 					}
@@ -699,8 +719,8 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 						}
 					}
 					info.setNonQuantifiedValue(entry.getValue());
-					String  state2 = idMap.get("state").toString();
-					String state = stateConvert(state2,false);
+					String state2 = idMap.get("state").toString();
+					String state = stateConvert(state2, false);
 					info.setState(state);
 					responsibilityInfos.add(info);
 				}
@@ -735,13 +755,14 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 
 	/**
 	 * 状态抓换 (-1:不合格;0:待确认;1:已确认)
+	 *
 	 * @return
 	 */
-	private String stateConvert(String state,boolean flge) {
+	private String stateConvert(String state, boolean flge) {
 //		(-1:不合格;0:待确认;1:已确认)
 		String state2 = "";
 		if (flge) {
-			if(StringUtils.isEmpty(state)){
+			if (StringUtils.isEmpty(state)) {
 				state2 = "待确认";
 				return state2;
 			}
@@ -762,7 +783,7 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
 			}
 
 		} else {
-			if(StringUtils.isEmpty(state)){
+			if (StringUtils.isEmpty(state)) {
 				state2 = "0";
 				return state2;
 			}