hlf пре 5 месеци
родитељ
комит
0e30366b32

+ 4 - 2
ims-service/ims-eval/src/main/java/com/ims/eval/controller/CalculatorController.java

@@ -29,8 +29,10 @@ public class CalculatorController {
 
 	@GetMapping("/cron")
 	public R test(@RequestParam(value = "id", required = false) String id,
-				  @RequestParam(value = "indicatorId", required = false) String indicatorId) {
-		boolean b = organizationEvaluationInfoService.calculationByEvaluationId("", indicatorId, id, "");
+				  @RequestParam(value = "indicatorId", required = false) String indicatorId,
+				  @RequestParam(value = "binStage", required = false) String binStage,
+				  @RequestParam(value = "binSection", required = false) String binSection) {
+		boolean b = organizationEvaluationInfoService.calculationByEvaluationId("", indicatorId, id, "", binStage, binSection);
 		//boolean b = scoreCalculationSchedule.doTask(id);
 		if (b) {
 			return R.ok().data(b);

+ 2 - 2
ims-service/ims-eval/src/main/java/com/ims/eval/controller/OrganizationEvaluationInfoController.java

@@ -287,7 +287,7 @@ public class OrganizationEvaluationInfoController {
 				}
 				boolean b = organizationEvaluationInfoService.saveOrUpdateBatch(bindingList);
 				if (b) {
-					organizationEvaluationInfoService.calculationByEvaluationId("", "", bindingList.get(0).getOrganizationEvaluationId(), "");
+					organizationEvaluationInfoService.calculationByEvaluationId("", "", bindingList.get(0).getOrganizationEvaluationId(), "", "", "");
 					return R.ok().data(b);
 				} else {
 					return R.error().data("保存失败!");
@@ -311,7 +311,7 @@ public class OrganizationEvaluationInfoController {
 						 @RequestParam(value = "optionCode", required = false) String optionCode) {
 
 		try {
-			boolean b = organizationEvaluationInfoService.calculationByEvaluationId(id, indicatorId, organizationEvaluationId, optionCode);
+			boolean b = organizationEvaluationInfoService.calculationByEvaluationId(id, indicatorId, organizationEvaluationId, optionCode, "", "");
 			if (b) {
 				return R.ok().data(b);
 			} else {

+ 24 - 26
ims-service/ims-eval/src/main/java/com/ims/eval/dao/OrganizationEvaluationInfoMapper.java

@@ -12,8 +12,8 @@ import java.util.Map;
 /**
  * <p>
  * 考评指标明细
-
- Mapper 接口
+ * <p>
+ * Mapper 接口
  * </p>
  *
  * @author wang
@@ -23,21 +23,19 @@ import java.util.Map;
 public interface OrganizationEvaluationInfoMapper extends BaseMapper<OrganizationEvaluationInfo> {
 
 
-
-
 	List<OrganizationEvaluationInfoResDTO> selectListEvaluationInfoId(@Param("organizationEvaluationId") String organizationEvaluationId,
 																	  @Param("dept") String dept,
 																	  @Param("optionCode") String optionCode,
 																	  @Param("organizationId") String organizationId);
 
 	List<OrganizationEvaluationInfoResDTO> selectListEvaluationInfoId2(@Param("organizationEvaluationId") String organizationEvaluationId,
-																	  @Param("dept") String dept,
-																	  @Param("organizationShortName") String organizationShortName,
-																	  @Param("indicatorName") String indicatorName,
-																	  @Param("binSection") String binSection,
-																	  @Param("isQuantified")String isQuantified,
-																	  @Param("optionCode") String optionCode,
-																	  @Param("organizationId") String organizationId);
+																	   @Param("dept") String dept,
+																	   @Param("organizationShortName") String organizationShortName,
+																	   @Param("indicatorName") String indicatorName,
+																	   @Param("binSection") String binSection,
+																	   @Param("isQuantified") String isQuantified,
+																	   @Param("optionCode") String optionCode,
+																	   @Param("organizationId") String organizationId);
 
 	@DataPermission(isPermission = false)
 	List<OrganizationEvaluationInfo> selectByEvaluationInfoId(@Param("organizationEvaluationId") String organizationEvaluationId);
@@ -49,31 +47,32 @@ public interface OrganizationEvaluationInfoMapper extends BaseMapper<Organizatio
 
 	@DataPermission(isPermission = false)
 	List<OrganizationEvaluationInfoResDTO> selectByIdAndEvaluationInfoId(@Param("id") String id,
-																   @Param("indicatorId") String indicatorId,
-																   @Param("organizationEvaluationId") String organizationEvaluationId,
-																   @Param("optionCode") String optionCode);
+																		 @Param("indicatorId") String indicatorId,
+																		 @Param("organizationEvaluationId") String organizationEvaluationId,
+																		 @Param("optionCode") String optionCode,
+																		 @Param("binStage") String binStage,
+																		 @Param("binSection") String binSection);
 
-	@DataPermission(isPermission = true,zbtype = true,jbtype=true)
+	@DataPermission(isPermission = true, zbtype = true, jbtype = true)
 	List<Map> selectEvaluationIndicatorList(@Param("organizationEvaluationId") String organizationEvaluationId,
 											@Param("binSection") String binSection,
 											@Param("binStage") String binStage);
 
 
-	@DataPermission(type = true,isPermission = true,jbtype=true)
+	@DataPermission(type = true, isPermission = true, jbtype = true)
 	List<OrganizationEvaluationInfoResDTO> selectEvaluationInfoList(@Param("organizationEvaluationId") String organizationEvaluationId,
-											@Param("organizationShortName") String organizationShortName,
-											@Param("indicatorId") String indicatorId,
-											@Param("binSection") String binSection,
-											@Param("binStage") String binStage,
-											@Param("organizationId") String organizationId);
-
+																	@Param("organizationShortName") String organizationShortName,
+																	@Param("indicatorId") String indicatorId,
+																	@Param("binSection") String binSection,
+																	@Param("binStage") String binStage,
+																	@Param("organizationId") String organizationId);
 
 
 	int selectEvaluationInfoByStateCount(@Param("organizationEvaluationId") String organizationEvaluationId,
-											@Param("deptId") String deptId,
-											@Param("state") List<String> state);
+										 @Param("deptId") String deptId,
+										 @Param("state") List<String> state);
 
-    List<OrganizationEvaluationInfo> getOrganizationEvaluationInfoListByIndicatorDictionaryId(@Param("indicatorDictionaryId") String indicatorDictionaryId,
+	List<OrganizationEvaluationInfo> getOrganizationEvaluationInfoListByIndicatorDictionaryId(@Param("indicatorDictionaryId") String indicatorDictionaryId,
 																							  @Param("degreeYear") String degreeYear,
 																							  @Param("quarterlyMonth") String quarterlyMonth);
 
@@ -81,5 +80,4 @@ public interface OrganizationEvaluationInfoMapper extends BaseMapper<Organizatio
 //	void updateEvaluationInfo(@Param("evaluationInfos")  List<OrganizationEvaluationInfo> evaluationInfos);
 
 
-
 }

+ 13 - 11
ims-service/ims-eval/src/main/java/com/ims/eval/service/IOrganizationEvaluationInfoService.java

@@ -15,8 +15,8 @@ import java.util.Map;
 /**
  * <p>
  * 考评指标明细
-
- 服务类
+ * <p>
+ * 服务类
  * </p>
  *
  * @author wang
@@ -26,34 +26,35 @@ public interface IOrganizationEvaluationInfoService extends IService<Organizatio
 
 	Map finishValueList(String organizationEvaluationId, String dept, HttpServletRequest request);
 
-	boolean saveBatchDto(List<OrganizationEvaluationInfo>  organizationEvaluationInfoList) throws Exception;
+	boolean saveBatchDto(List<OrganizationEvaluationInfo> organizationEvaluationInfoList) throws Exception;
 
 
 	//公司名 指标名 业务属性
-	List<OrganizationEvaluationInfoResDTO> finishValueList(String organizationEvaluationId, String dept, String  organizationShortName, String indicatorName, String binSection, String isQuantified, HttpServletRequest request);
+	List<OrganizationEvaluationInfoResDTO> finishValueList(String organizationEvaluationId, String dept, String organizationShortName, String indicatorName, String binSection, String isQuantified, HttpServletRequest request);
 
 
-	boolean calculationByEvaluationId(String id ,String indicatorId,String organizationEvaluationId,String optionCode);
+	boolean calculationByEvaluationId(String id, String indicatorId, String organizationEvaluationId, String optionCode, String binStage, String binSection);
 
 	List<Map> getEvaluationIndicatorList(String organizationEvaluationId, String binSection, String binStage, HttpServletRequest request);
 
-	Map getEvaluationInfoList(String organizationEvaluationId, String organizationShortName,String indicatorId, String binSection, String binStage,HttpServletRequest request);
+	Map getEvaluationInfoList(String organizationEvaluationId, String organizationShortName, String indicatorId, String binSection, String binStage, HttpServletRequest request);
 
 	boolean updateEvaluationInfo(List<JSONObject> jsonObjects);
 
 	boolean addEvaluationInfo(List<AddEvaluationInfoDTO> addEvaluationInfoDTOs);
 
-	byte[] downloadExcel(String organizationEvaluationId, String indicatorId, String binSection, String binStage, HttpServletRequest request)throws Exception;
+	byte[] downloadExcel(String organizationEvaluationId, String indicatorId, String binSection, String binStage, HttpServletRequest request) throws Exception;
 
-	boolean importExcel(MultipartFile file,HttpServletRequest request) throws IOException;
+	boolean importExcel(MultipartFile file, HttpServletRequest request) throws IOException;
 
 
 	/**
 	 * 获取当前考评记录的指标项记录
+	 *
 	 * @param organizationEvaluationId 考评记录id
-	 * @param indicatorId 指标id
-	 * @param organizationId 组织id
-	 * @param childOptionCode 组合子指标和指标项
+	 * @param indicatorId              指标id
+	 * @param organizationId           组织id
+	 * @param childOptionCode          组合子指标和指标项
 	 * @return
 	 */
 	List<OrganizationEvaluationInfo> getEvaluationInfoByOptionCodeList(String organizationEvaluationId, String indicatorId, String organizationId, String childOptionCode);
@@ -61,6 +62,7 @@ public interface IOrganizationEvaluationInfoService extends IService<Organizatio
 
 	/**
 	 * 获取条数
+	 *
 	 * @param organizationEvaluationId
 	 * @param deptId
 	 * @param state

+ 198 - 207
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationEvaluationInfoServiceImpl.java

@@ -45,8 +45,8 @@ import static com.ims.eval.util.ExcelUtil.readExcel;
 /**
  * <p>
  * 考评指标明细
-
- 服务实现类
+ * <p>
+ * 服务实现类
  * </p>
  *
  * @author wang
@@ -81,7 +81,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 	private IOrganizationEvaluationService organizationEvaluationService;
 
 	@Autowired
-	private  IOrganizationEvaluationRuleService organizationEvaluationRuleService;
+	private IOrganizationEvaluationRuleService organizationEvaluationRuleService;
 
 	@Autowired
 	private WorkflowServiceImpl workflowService;
@@ -91,17 +91,14 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 	private ICiteCalculationIndicatorService citeCalculationIndicatorService;
 
 
-
-
-
 	@Override
 	public Map finishValueList(String organizationEvaluationId, String dept, HttpServletRequest request) {
 
-		List<OrganizationEvaluationInfoResDTO> list = baseMapper.selectListEvaluationInfoId(organizationEvaluationId,dept,"","");//默认获取指定的怎目标
-		list.stream().forEach(i->{
+		List<OrganizationEvaluationInfoResDTO> list = baseMapper.selectListEvaluationInfoId(organizationEvaluationId, dept, "", "");//默认获取指定的怎目标
+		list.stream().forEach(i -> {
 			i.setUpdateMark(true);
 		});
-		Map<String  ,List<OrganizationEvaluationInfoResDTO>> map  = list.stream().collect(Collectors.groupingBy(OrganizationEvaluationInfoResDTO::getIsQuantified));
+		Map<String, List<OrganizationEvaluationInfoResDTO>> map = list.stream().collect(Collectors.groupingBy(OrganizationEvaluationInfoResDTO::getIsQuantified));
 		map.put("quantifiedList", map.remove(true));
 		map.put("nonQuantifiedList", map.remove(false));
 		return map;
@@ -116,14 +113,14 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 				OrganizationEvaluationInfo info = baseMapper.selectById(entity.getId());
 
 				info.setQuantifiedValue(entity.getQuantifiedValue());//量化值
-				if(!entity.getIsQuantified() && "JKF".equals(info.getOptionCode())){//加扣分
-					if(StringUtils.isNumber(entity.getNonQuantifiedValue())){
+				if (!entity.getIsQuantified() && "JKF".equals(info.getOptionCode())) {//加扣分
+					if (StringUtils.isNumber(entity.getNonQuantifiedValue())) {
 						info.setQuantifiedValue(Double.valueOf(entity.getNonQuantifiedValue()));
 					}
 				}
 
-				if(!entity.getIsQuantified() && "JCF".equals(info.getOptionCode())){//基础分
-					if(StringUtils.isNumber(entity.getNonQuantifiedValue())){
+				if (!entity.getIsQuantified() && "JCF".equals(info.getOptionCode())) {//基础分
+					if (StringUtils.isNumber(entity.getNonQuantifiedValue())) {
 						info.setQuantifiedValue(Double.valueOf(entity.getNonQuantifiedValue()));
 					}
 				}
@@ -134,17 +131,17 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 				info.setRemark(entity.getRemark());//备注
 				info.setState(entity.getState());//初始状态
 				boolean b = super.saveOrUpdate(info);
-				if(!b){
+				if (!b) {
 					throw new CustomException("更新失败");
 				}
-			}else {
+			} else {
 				entity.setCreateTime(new Date());
 
 				if (StringUtils.isEmpty(entity.getIndicatorId())) {
 					throw new CustomException("保存失败");
 				}
-				List<IndicatorDictionary> dictionaryList =  indicatorDictionaryService.list("",entity.getIndicatorId(),"","");
-				for(IndicatorDictionary d : dictionaryList){
+				List<IndicatorDictionary> dictionaryList = indicatorDictionaryService.list("", entity.getIndicatorId(), "", "");
+				for (IndicatorDictionary d : dictionaryList) {
 
 					OrganizationEvaluationInfo addinfo = new OrganizationEvaluationInfo();
 					addinfo.setOrganizationEvaluationId(entity.getOrganizationEvaluationId());
@@ -156,14 +153,14 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 					addinfo.setIsQuantified(entity.getIsQuantified());
 					addinfo.setQuantifiedValue(entity.getQuantifiedValue());
 
-					if(!entity.getIsQuantified() && "JKF".equals(d.getOptionCode())){//加扣分
-						if(StringUtils.isNumber(entity.getNonQuantifiedValue())){
+					if (!entity.getIsQuantified() && "JKF".equals(d.getOptionCode())) {//加扣分
+						if (StringUtils.isNumber(entity.getNonQuantifiedValue())) {
 							addinfo.setQuantifiedValue(Double.valueOf(entity.getNonQuantifiedValue()));
 						}
 					}
 
-					if(!entity.getIsQuantified() && "JCF".equals(d.getOptionCode())){//基础分
-						if(StringUtils.isNumber(entity.getNonQuantifiedValue())){
+					if (!entity.getIsQuantified() && "JCF".equals(d.getOptionCode())) {//基础分
+						if (StringUtils.isNumber(entity.getNonQuantifiedValue())) {
 							addinfo.setQuantifiedValue(Double.valueOf(entity.getNonQuantifiedValue()));
 						}
 					}
@@ -172,7 +169,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 					addinfo.setCreateTime(new Date());
 
 					boolean b = super.saveOrUpdate(addinfo);
-					if(!b){
+					if (!b) {
 						throw new CustomException("保存失败");
 					}
 				}
@@ -198,28 +195,24 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 	}
 
 
-
-
-
-
 	@Override
-	public List<OrganizationEvaluationInfoResDTO> finishValueList(String organizationEvaluationId, String dept, String organizationShortName, String indicatorName, String binSection,String isQuantified, HttpServletRequest request) {
-		List<OrganizationEvaluationInfoResDTO> list = baseMapper.selectListEvaluationInfoId2(organizationEvaluationId,dept,organizationShortName,indicatorName,binSection,isQuantified,"","");//默认获取指定的怎目标
+	public List<OrganizationEvaluationInfoResDTO> finishValueList(String organizationEvaluationId, String dept, String organizationShortName, String indicatorName, String binSection, String isQuantified, HttpServletRequest request) {
+		List<OrganizationEvaluationInfoResDTO> list = baseMapper.selectListEvaluationInfoId2(organizationEvaluationId, dept, organizationShortName, indicatorName, binSection, isQuantified, "", "");//默认获取指定的怎目标
 		return list;
 	}
 
 	@Override
-	public boolean calculationByEvaluationId(String id, String indicatorId,String organizationEvaluationId,String optionCode) {
+	public boolean calculationByEvaluationId(String id, String indicatorId, String organizationEvaluationId, String optionCode, String binStage, String binSection) {
 		try {
-			List<OrganizationEvaluationInfoResDTO> list = baseMapper.selectByIdAndEvaluationInfoId(id,indicatorId,organizationEvaluationId,"");
+			List<OrganizationEvaluationInfoResDTO> list = baseMapper.selectByIdAndEvaluationInfoId(id, indicatorId, organizationEvaluationId, "", binStage, binSection);
 			//根据板块分组
 			Map<String, List<OrganizationEvaluationInfoResDTO>> binSectionGropList = list.stream().collect(Collectors.groupingBy(OrganizationEvaluationInfoResDTO::getBinSection));
 
 			//计算前置属性(差值、利润贡献、单位千瓦利润)的最大最小值
-			for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> binSectionGropEntry : binSectionGropList.entrySet()){
+			for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> binSectionGropEntry : binSectionGropList.entrySet()) {
 
 				List<OrganizationEvaluationInfo> listUpdateInfos = new ArrayList<>();
-				if (binSectionGropEntry.getValue().size() > 0){
+				if (binSectionGropEntry.getValue().size() > 0) {
 					//按照指标分组
 					Map<String, List<OrganizationEvaluationInfoResDTO>> indicatorGropList = binSectionGropEntry.getValue().stream().collect(Collectors.groupingBy(OrganizationEvaluationInfoResDTO::getIndicatorId));
 					for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> indicatorGropListEntry : indicatorGropList.entrySet()) {
@@ -239,8 +232,8 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 									for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> childCodeGropListEntry : childCodeGropList.entrySet()) {
 										for (OrganizationEvaluationInfoResDTO dto : childCodeGropListEntry.getValue()) {
 
-											if (!(dto.getOptionCode().equals("LRZE") || dto.getOptionCode().equals("CZ") ||  dto.getOptionCode().equals("LRGXKH")|| dto.getOptionCode().equals("LRGXL") || dto.getOptionCode().equals("DWQWLR")) || StringUtils.isEmpty(dto.getFormula())) {
-												System.out.println("前置跳过--|"+dto.getOptionCode());
+											if (!(dto.getOptionCode().equals("LRZE") || dto.getOptionCode().equals("CZ") || dto.getOptionCode().equals("LRGXKH") || dto.getOptionCode().equals("LRGXL") || dto.getOptionCode().equals("DWQWLR")) || StringUtils.isEmpty(dto.getFormula())) {
+												System.out.println("前置跳过--|" + dto.getOptionCode());
 												continue;//当前属性没有配置公式跳过
 											}
 
@@ -248,8 +241,8 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 											List<String> optionCodes = getOptionCode(dto.getFormula());
 
 											List<OrganizationEvaluationInfoResDTO> newInfoResInfo = childCodeGropListEntry.getValue().stream()
-																									.filter(item -> optionCodes.contains(item.getOptionCode()))
-																									.collect(Collectors.toList());
+												.filter(item -> optionCodes.contains(item.getOptionCode()))
+												.collect(Collectors.toList());
 
 											//循环替换属性
 											for (OrganizationEvaluationInfoResDTO f : newInfoResInfo) {
@@ -278,81 +271,81 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 						}
 						//计算差值等的最大值最小值
 
-						if(null != listUpdateInfos && listUpdateInfos.size()>0){
+						if (null != listUpdateInfos && listUpdateInfos.size() > 0) {
 							this.saveOrUpdateBatch(listUpdateInfos);
 						}
 
-						iCalculateIndicatorItemInfoService.saveIndicatorInfoDTO(organizationEvaluationId,indicatorGropListEntry.getValue(),indicatorGropListEntry.getKey());
+						iCalculateIndicatorItemInfoService.saveIndicatorInfoDTO(organizationEvaluationId, indicatorGropListEntry.getValue(), indicatorGropListEntry.getKey());
 					}
 				}
 			}
 
 			//获取计算的差值最大最小值
-			List<CalculateIndicatorItemInfo> calculateIndicatorItemInfos = calculateIndicatorItemInfoMapper.selectList("","","","","",organizationEvaluationId,"");
+			List<CalculateIndicatorItemInfo> calculateIndicatorItemInfos = calculateIndicatorItemInfoMapper.selectList("", "", "", "", "", organizationEvaluationId, "");
 			Map<String, List<CalculateIndicatorItemInfo>> groupedItemInfoMap = calculateIndicatorItemInfos.stream()
 				.collect(Collectors.groupingBy(item -> item.getIndicatorId() + "_" + item.getChildCode()));
 
 			//计算得分
-			for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> binSectionGropEntry : binSectionGropList.entrySet()){
+			for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> binSectionGropEntry : binSectionGropList.entrySet()) {
 
-				if (binSectionGropEntry.getValue().size() > 0){
+				if (binSectionGropEntry.getValue().size() > 0) {
 					List<OrganizationEvaluationInfo> listUpdateInfos = new ArrayList<>();
 					//按照指标分组
 					Map<String, List<OrganizationEvaluationInfoResDTO>> indicatorGropList = binSectionGropEntry.getValue().stream().collect(Collectors.groupingBy(OrganizationEvaluationInfoResDTO::getIndicatorId));
 
-					for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> indicatorGropListEntry : indicatorGropList.entrySet()){
-						for (OrganizationEvaluationInfoResDTO d : indicatorGropListEntry.getValue()){
-							System.out.println(d.getOrganizationShortName()+"|"+d.getIndicatorName()+"|"+d.getOptionName()+"|"+d.getQuantifiedValue());
+					for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> indicatorGropListEntry : indicatorGropList.entrySet()) {
+						for (OrganizationEvaluationInfoResDTO d : indicatorGropListEntry.getValue()) {
+							System.out.println(d.getOrganizationShortName() + "|" + d.getIndicatorName() + "|" + d.getOptionName() + "|" + d.getQuantifiedValue());
 						}
 
-						if (indicatorGropListEntry.getValue().size() > 0){
+						if (indicatorGropListEntry.getValue().size() > 0) {
 							//按照公司规则分组
 							Map<String, List<OrganizationEvaluationInfoResDTO>> ruleIdGropList = indicatorGropListEntry.getValue().stream().collect(Collectors.groupingBy(OrganizationEvaluationInfoResDTO::getOrganizationEvaluationRuleId));
 
 
 							//遍历公司指标
-							for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> ruleIdGropListEntry : ruleIdGropList.entrySet()){
-								if (ruleIdGropListEntry.getValue().size() > 0){
+							for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> ruleIdGropListEntry : ruleIdGropList.entrySet()) {
+								if (ruleIdGropListEntry.getValue().size() > 0) {
 
 									List<OrganizationEvaluationInfoResDTO> indicator = ruleIdGropListEntry.getValue();
 									Map<String, List<OrganizationEvaluationInfoResDTO>> childCodeGropList = indicator.stream().collect(Collectors.groupingBy(OrganizationEvaluationInfoResDTO::getChildCode));
 									double totalScore = 0.00;
 									EvaluationScoreCount scoreCount = new EvaluationScoreCount();
 									double standardScore = 0;
-									for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> childCodeGropListEntry : childCodeGropList.entrySet()){
+									for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> childCodeGropListEntry : childCodeGropList.entrySet()) {
 
 //										List<CalculateIndicatorItemInfo> calculateIndicatorItemInfo = calculateIndicatorItemInfoMapper.selectList("","","","",childCodeGropListEntry.getValue().get(0).getIndicatorId(),childCodeGropListEntry.getValue().get(0).getOrganizationEvaluationId(),childCodeGropListEntry.getValue().get(0).getChildCode());
-										List<CalculateIndicatorItemInfo> calculateIndicatorItemInfo = groupedItemInfoMap.get(childCodeGropListEntry.getValue().get(0).getIndicatorId()+"_"+childCodeGropListEntry.getValue().get(0).getChildCode());
+										List<CalculateIndicatorItemInfo> calculateIndicatorItemInfo = groupedItemInfoMap.get(childCodeGropListEntry.getValue().get(0).getIndicatorId() + "_" + childCodeGropListEntry.getValue().get(0).getChildCode());
 
-										Map<String ,Double>  map = new HashMap<>();
+										Map<String, Double> map = new HashMap<>();
 										if (null != calculateIndicatorItemInfo && calculateIndicatorItemInfo.size() > 0) {
 											for (CalculateIndicatorItemInfo itemInfo : calculateIndicatorItemInfo) {
 												map.put(itemInfo.getOptionCode(), itemInfo.getQuantifiedValue());
 											}
 										}
 
-										for (OrganizationEvaluationInfoResDTO dto: childCodeGropListEntry.getValue()){
+										for (OrganizationEvaluationInfoResDTO dto : childCodeGropListEntry.getValue()) {
 
 											//保存加减分原因
-											if("YY".equals(dto.getOptionCode()) || "JFYY".equals(dto.getOptionCode()) ||"KFYY".equals(dto.getOptionCode())){
-												scoreCount.setJfRemark(("YY".equals(dto.getOptionCode()) || "JFYY".equals(dto.getOptionCode()))?dto.getNonQuantifiedValue():"");
-												scoreCount.setKfRemark("KFYY".equals(dto.getOptionCode()) ? dto.getNonQuantifiedValue():"");
+											if ("YY".equals(dto.getOptionCode()) || "JFYY".equals(dto.getOptionCode()) || "KFYY".equals(dto.getOptionCode())) {
+												scoreCount.setJfRemark(("YY".equals(dto.getOptionCode()) || "JFYY".equals(dto.getOptionCode())) ? dto.getNonQuantifiedValue() : "");
+												scoreCount.setKfRemark("KFYY".equals(dto.getOptionCode()) ? dto.getNonQuantifiedValue() : "");
 											}
 
 											//保存加减分
-											if("JF".equals(dto.getOptionCode())){
+											if ("JF".equals(dto.getOptionCode())) {
 												scoreCount.setJfScore(dto.getQuantifiedValue());
 											}
-											if("KF".equals(dto.getOptionCode())){
+											if ("KF".equals(dto.getOptionCode())) {
 												scoreCount.setKfScore(dto.getQuantifiedValue());
 											}
 
 
-											if ((dto.getOptionCode().endsWith("MAX") ||dto.getOptionCode().endsWith("MIN")
-												||dto.getOptionCode().equals("CZ") || dto.getOptionCode().equals("LRGXL")
-												|| dto.getOptionCode().equals("DWQWLR")) || StringUtils.isEmpty(dto.getFormula())){
+											if ((dto.getOptionCode().endsWith("MAX") || dto.getOptionCode().endsWith("MIN")
+												|| dto.getOptionCode().equals("CZ") || dto.getOptionCode().equals("LRGXL")
+												|| dto.getOptionCode().equals("DWQWLR")) || StringUtils.isEmpty(dto.getFormula())) {
 
-												if(!(dto.getOptionCode().equals("DF")||dto.getOptionCode().equals("DF2")||dto.getOptionCode().equals("JHDF"))){
+												if (!(dto.getOptionCode().equals("DF") || dto.getOptionCode().equals("DF2") || dto.getOptionCode().equals("JHDF"))) {
 													continue;//当前属性没有配置公式跳过或者不需要参与此次计算的属性
 												}
 
@@ -366,60 +359,60 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 											//获取去参与计算的属性
 											List<String> optionCodes = getOptionCode(dto.getFormula());
 											List<OrganizationEvaluationInfoResDTO> newInfoResInfo = childCodeGropListEntry.getValue().stream()
-													.filter(item -> optionCodes.contains(item.getOptionCode()))
-													.collect(Collectors.toList());
+												.filter(item -> optionCodes.contains(item.getOptionCode()))
+												.collect(Collectors.toList());
 
 
 											//替换属性值
-											for (OrganizationEvaluationInfoResDTO f : newInfoResInfo){
-												if(f.getOptionCode().endsWith("MIN") || f.getOptionCode().endsWith("MAX")){
+											for (OrganizationEvaluationInfoResDTO f : newInfoResInfo) {
+												if (f.getOptionCode().endsWith("MIN") || f.getOptionCode().endsWith("MAX")) {
 													f.setQuantifiedValue(map.get(f.getOptionCode()));
 												}
-												dto.setFormula(dto.getFormula().replace("["+f.getOptionCode()+"]", f.getQuantifiedValue() + ""));
+												dto.setFormula(dto.getFormula().replace("[" + f.getOptionCode() + "]", f.getQuantifiedValue() + ""));
 											}
-											log.info("计算公式为:"+dto.getFormula());
+											log.info("计算公式为:" + dto.getFormula());
 											double score = 0.00;
-											if(StringUtils.isNotEmpty(dto.getFormula())){
+											if (StringUtils.isNotEmpty(dto.getFormula())) {
 												score = FormulaUtils.calculateFormula(dto.getFormula());
-											}else {
+											} else {
 												score = dto.getQuantifiedValue();
 											}
 
-											if(dto.getOptionCode().equals("DF")||dto.getOptionCode().equals("DF2")
-												||dto.getOptionCode().equals("JHDF")){
+											if (dto.getOptionCode().equals("DF") || dto.getOptionCode().equals("DF2")
+												|| dto.getOptionCode().equals("JHDF")) {
 												standardScore = dto.getStandardScore();
-												totalScore = totalScore+score;
+												totalScore = totalScore + score;
 												scoreCount.setRemark(dto.getIndicatorName());
 											}
 
-											log.info(dto.getOrganizationShortName()+"|"+dto.getIndicatorName()+"|"+dto.getOptionCode()+"----------"+dto.getFormula()+"="+score);
-											OrganizationEvaluationInfo info  = new OrganizationEvaluationInfo();
+											log.info(dto.getOrganizationShortName() + "|" + dto.getIndicatorName() + "|" + dto.getOptionCode() + "----------" + dto.getFormula() + "=" + score);
+											OrganizationEvaluationInfo info = new OrganizationEvaluationInfo();
 											//将计算结果保存
 											info.setId(dto.getId());
 											info.setQuantifiedValue(score);
-											info.setNonQuantifiedValue(score+"");
+											info.setNonQuantifiedValue(score + "");
 											dto.setQuantifiedValue(score);
-											dto.setNonQuantifiedValue(score+"");
+											dto.setNonQuantifiedValue(score + "");
 											listUpdateInfos.add(info);
 //											this.saveOrUpdate(info);
 										}
 									}
 
-									log.info("综合得分:"+totalScore);
-									if(null==scoreCount.getOrganizationEvaluationId()|| null== scoreCount.getOrganizationEvaluationRuleId() || null == scoreCount.getIndicatorId()){
+									log.info("综合得分:" + totalScore);
+									if (null == scoreCount.getOrganizationEvaluationId() || null == scoreCount.getOrganizationEvaluationRuleId() || null == scoreCount.getIndicatorId()) {
 										continue;
 									}
-									if(standardScore>0 && totalScore != standardScore){
-										scoreCount.setStandard(totalScore>standardScore?"1":"-1");
-									}else {
+									if (standardScore > 0 && totalScore != standardScore) {
+										scoreCount.setStandard(totalScore > standardScore ? "1" : "-1");
+									} else {
 										scoreCount.setStandard("0");
 									}
 									scoreCount.setScore(totalScore);
 									scoreCount.setObversionScore(totalScore);
 									scoreCount.setIsQuantified("1");
 
-									List<EvaluationScoreCount>  listcount = evaluatioinScoreCountService.getEvaluationScoreCountList(scoreCount.getOrganizationEvaluationId(),scoreCount.getOrganizationEvaluationRuleId(),scoreCount.getIndicatorId(),scoreCount.getBinSection());
-									if(null  != listcount && listcount.size() >0){
+									List<EvaluationScoreCount> listcount = evaluatioinScoreCountService.getEvaluationScoreCountList(scoreCount.getOrganizationEvaluationId(), scoreCount.getOrganizationEvaluationRuleId(), scoreCount.getIndicatorId(), scoreCount.getBinSection());
+									if (null != listcount && listcount.size() > 0) {
 										List<String> ids = listcount.stream().map(EvaluationScoreCount::getId).collect(Collectors.toList());
 										boolean cod = evaluatioinScoreCountService.removeByIds(ids);
 									}
@@ -433,7 +426,6 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 			}
 
 
-
 		} catch (Exception e) {
 			e.printStackTrace();
 			return false;
@@ -463,14 +455,14 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 //			}
 //
 //		}else {
-			indicatorMap = baseMapper.selectEvaluationIndicatorList(organizationEvaluationId,binSection,binStage);
+		indicatorMap = baseMapper.selectEvaluationIndicatorList(organizationEvaluationId, binSection, binStage);
 //		}
 
 		return indicatorMap;
 	}
 
 	@Override
-	public Map getEvaluationInfoList(String organizationEvaluationId,String organizationShortName, String indicatorId, String binSection, String binStage, HttpServletRequest request) {
+	public Map getEvaluationInfoList(String organizationEvaluationId, String organizationShortName, String indicatorId, String binSection, String binStage, HttpServletRequest request) {
 
 		Map data = new HashMap();
 
@@ -484,16 +476,15 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 //		data.put("editFlag",editFlag);
 
 
-
 		//获取用户信息 23031009
 		boolean deptFlag = false;
 		try {
 			MyuserResDTO user = userService.getSysUser(request);
-			if(null != user){
+			if (null != user) {
 //				String deptId = "23031009";
 				Optional<DataDictionary> any = CacheContext.ddSuperKeyMap.get("BM0001").stream().filter(t -> t.getKeyName().equals(user.getDeptName())).findAny();
-				if(any.isPresent()){
-					deptFlag = 	"ZZRSB".equals(any.get().getDataKey()) ? true: false;
+				if (any.isPresent()) {
+					deptFlag = "ZZRSB".equals(any.get().getDataKey()) ? true : false;
 				}
 
 			}
@@ -502,7 +493,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 		}
 
 		boolean titlemark = true;//标记生成标题
-		List<OrganizationEvaluationInfoResDTO> infoResDTOList = baseMapper.selectEvaluationInfoList(organizationEvaluationId,organizationShortName, indicatorId,binSection,binStage,"");
+		List<OrganizationEvaluationInfoResDTO> infoResDTOList = baseMapper.selectEvaluationInfoList(organizationEvaluationId, organizationShortName, indicatorId, binSection, binStage, "");
 		List<IndicatorDictionary> dictionaryList = indicatorDictionaryService.list("", indicatorId, "", "");
 		List<IndicatorDictionary> dictionaryList2 = dictionaryList.stream().filter(dl -> !"1642801934302707714".equals(dl.getIndicatorId()) || !"CZMAX".equals(dl.getOptionCode()) && !"CZMIN".equals(dl.getOptionCode())).collect(Collectors.toList());
 		Indicator indicator = indicatorService.getById(indicatorId);
@@ -511,7 +502,6 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 			.collect(Collectors.groupingBy(OrganizationEvaluationInfoResDTO::getOrganizationId));
 
 
-
 		List<Map> mapList = new ArrayList<>();
 
 		//设置数据标题
@@ -528,27 +518,27 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 						continue;
 					}
 					titlemap.put("key", d.getOptionName());//名称
-					titlemap.put("code",d.getChildCode()+"_"+d.getOptionCode());//名称
-					titlemap.put("flag", d.getIsQuantified()?"1":"2");//是否量化
+					titlemap.put("code", d.getChildCode() + "_" + d.getOptionCode());//名称
+					titlemap.put("flag", d.getIsQuantified() ? "1" : "2");//是否量化
 					titleArray.add(titlemap);
 
 				}
-				title.put(childCodeEntry.getKey().split(",")[1]+"-对标", titleArray);
+				title.put(childCodeEntry.getKey().split(",")[1] + "-对标", titleArray);
 			}
-			if(groupedChildCode.size()>1 || dictionaryList.get(0).getChildCode().endsWith("LRZE") || dictionaryList.get(0).getChildCode().endsWith("JLR")){
+			if (groupedChildCode.size() > 1 || dictionaryList.get(0).getChildCode().endsWith("LRZE") || dictionaryList.get(0).getChildCode().endsWith("JLR")) {
 				Map zhdfMap = new LinkedHashMap();
 				List<Map> zhdfArray = new ArrayList<>();
 				zhdfMap.put("key", "得分");//名称
-				zhdfMap.put("code","totalScore");//名称
+				zhdfMap.put("code", "totalScore");//名称
 				zhdfMap.put("flag", "1");//数值
 				zhdfArray.add(zhdfMap);
 				title.put("综合得分", zhdfArray);
 			}
-			if(deptFlag){
+			if (deptFlag) {
 				Map deptstateMap = new LinkedHashMap();
 				List<Map> titlestateArray = new ArrayList<>();
 				deptstateMap.put("key", "状态");//名称
-				deptstateMap.put("code","state");//名称
+				deptstateMap.put("code", "state");//名称
 				deptstateMap.put("flag", "3");//下拉
 				titlestateArray.add(deptstateMap);
 				title.put("填报状态", titlestateArray);
@@ -569,7 +559,6 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 		}
 
 
-
 		//获取行数据
 		//遍历按照公司分组后的数据
 		for (Map.Entry<String, List<OrganizationEvaluationInfoResDTO>> entry : groupedData.entrySet()) {
@@ -591,44 +580,44 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 					continue;
 				}
 				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("operation","PUBLIC".equals(resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getDeptId()));
-					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("operation", "PUBLIC".equals(resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getDeptId()));
+					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()).getIsQuantified2()?"1":"2");
+				indicatormap.put("IS_LH_" + d.getChildCode() + "_" + d.getOptionCode(), resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getIsQuantified2() ? "1" : "2");
 
 				//累计分数
-				if(d.getOptionCode().equals("DF")||d.getOptionCode().equals("DF2")||d.getOptionCode().equals("JHDF")){
-					score = score + resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getQuantifiedValue();
+				if (d.getOptionCode().equals("DF") || d.getOptionCode().equals("DF2") || d.getOptionCode().equals("JHDF")) {
+					score = score + resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getQuantifiedValue();
 
 					//判断最大最小值 ;是否存在值
-					if(null != resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getMinScore()){
-						minScore =resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getMinScore();
+					if (null != resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getMinScore()) {
+						minScore = resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getMinScore();
 					}
-					if(null != resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getMaxScore()){
-						maxScore =resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getMaxScore();
+					if (null != resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getMaxScore()) {
+						maxScore = resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getMaxScore();
 					}
 
 				}
 
 			}
 
-			indicatormap.put("totalScore",score);
+			indicatormap.put("totalScore", score);
 
-			if(score!=0 && (minScore!=0 || maxScore!=0)){
-				boolean valueFlag =  DoubleUtils.isIncludeValue(score,minScore,maxScore);
-				indicatormap.put("valueFlag",valueFlag);
-			}else {
-				indicatormap.put("valueFlag",true);
+			if (score != 0 && (minScore != 0 || maxScore != 0)) {
+				boolean valueFlag = DoubleUtils.isIncludeValue(score, minScore, maxScore);
+				indicatormap.put("valueFlag", valueFlag);
+			} else {
+				indicatormap.put("valueFlag", true);
 			}
 			mapList.add(indicatormap);
 		}
@@ -637,23 +626,23 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 	}
 
 	@Override
-	public byte[] downloadExcel(String organizationEvaluationId, String indicatorId, String binSection, String binStage,HttpServletRequest request) throws Exception{
+	public byte[] downloadExcel(String organizationEvaluationId, String indicatorId, String binSection, String binStage, HttpServletRequest request) throws Exception {
 
 		//获取用户信息 23031009
 		boolean deptFlag = false;
 		MyuserResDTO user = userService.getSysUser(request);
-		if(null != user){
+		if (null != user) {
 			String deptId = "23031009";
-			if(deptId.equals(user.getDeptId())){
+			if (deptId.equals(user.getDeptId())) {
 				deptFlag = true;
 			}
 		}
 		String[] values = new String[]{"不合格", "待确认", "已确认"};
 
-		Map<String ,List<Map<String,String>>> title = new LinkedHashMap();//标题
-		List<Map<String,String>> mapList = new ArrayList<>();//数据list
+		Map<String, List<Map<String, String>>> title = new LinkedHashMap();//标题
+		List<Map<String, String>> mapList = new ArrayList<>();//数据list
 		boolean titlemark = true;//标记生成标题
-		List<OrganizationEvaluationInfoResDTO> infoResDTOList = baseMapper.selectEvaluationInfoList(organizationEvaluationId, "",indicatorId,binSection,binStage,"");
+		List<OrganizationEvaluationInfoResDTO> infoResDTOList = baseMapper.selectEvaluationInfoList(organizationEvaluationId, "", indicatorId, binSection, binStage, "");
 		List<IndicatorDictionary> dictionaryList = indicatorDictionaryService.list("", indicatorId, "", "");
 
 		//根据组织(公司)id分组
@@ -681,24 +670,24 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 				for (Map.Entry<String, List<IndicatorDictionary>> childCodeEntry : groupedChildCode.entrySet()) {
 
 
-					List<Map<String,String>> titleArray = new ArrayList<>();
+					List<Map<String, String>> titleArray = new ArrayList<>();
 					Map titlemap = new LinkedHashMap();
 					for (IndicatorDictionary d : childCodeEntry.getValue()) {
 						if (!d.getIsShow()) {
 							continue;
 						}
-						titlemap.put(d.getChildCode()+"_"+d.getOptionCode(), d.getOptionName());//名称
+						titlemap.put(d.getChildCode() + "_" + d.getOptionCode(), d.getOptionName());//名称
 					}
 					titleArray.add(titlemap);
 					title.put(childCodeEntry.getKey().split(",")[1], 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;
 			}
@@ -714,15 +703,15 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 						indicatormap.put("organizationShortName", resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getOrganizationShortName());//公司名
 						indicatormap.put("organizationId", resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getOrganizationId());//公司编号
 
-						String  state2 = resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getState();//(-1:不合格;0:待确认;1:已确认)
-						state = stateConvert(state2,true);
+						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("state",state);//状态
+			indicatormap.put("state", state);//状态
 			mapList.add(indicatormap);
 		}
 
@@ -775,7 +764,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 		sheet.addMergedRegion(new CellRangeAddress(1, 2, 2, 2));
 
 		Cell header3Cell0 = headerRow3.createCell(0);
-		header3Cell0.setCellValue("zhidmap,evalId="+organizationEvaluationId+",indId="+indicatorId);
+		header3Cell0.setCellValue("zhidmap,evalId=" + organizationEvaluationId + ",indId=" + indicatorId);
 
 		Cell header3Cell1 = headerRow3.createCell(1);
 		header3Cell1.setCellValue("organizationShortName");
@@ -786,21 +775,21 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 
 		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);
 			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);
@@ -811,7 +800,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 					header2Cell2.setCellStyle(cellStyle);
 
 					// 隐藏列
-					if(key3.startsWith("ID_") || key3.startsWith("IS_LH_")){
+					if (key3.startsWith("ID_") || key3.startsWith("IS_LH_")) {
 						sheet.setColumnHidden(optioncols, true);
 					}
 					optioncols++;
@@ -820,19 +809,19 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 		}
 
 		Integer rowdate = 4;
-		for (Map<String,String >  datamaps  : mapList) {
+		for (Map<String, String> datamaps : mapList) {
 			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);
@@ -866,9 +855,8 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 	}
 
 
-
 	@Override
-	public boolean importExcel(MultipartFile file,HttpServletRequest request) throws IOException {
+	public boolean importExcel(MultipartFile file, HttpServletRequest request) throws IOException {
 
 		List<LinkedHashMap<String, Object>> dataList = new ArrayList<>();
 		try {
@@ -925,39 +913,41 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 				dataList.add(dataMap);
 			}
 			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("evalId",zhidmap[1].split("=")[1]);
+						idMap.put("evalId", zhidmap[1].split("=")[1]);
 						idMap.put("indId", zhidmap[2].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<OrganizationEvaluationInfo> evaluationInfos =new ArrayList<>();
-				for (Map.Entry<String,String > entry : valueMap.entrySet()) {
+				List<OrganizationEvaluationInfo> evaluationInfos = new ArrayList<>();
+				for (Map.Entry<String, String> entry : valueMap.entrySet()) {
 					try {
 						//organizationEvaluationId 考评记录id
 						// indicatorId 指标id
 						// organizationId 组织id
 						// childOptionCode 组合子指标和指标项
-						List<OrganizationEvaluationInfo>  organizationEvaluationInfoList = 	getEvaluationInfoByOptionCodeList(idMap.get("evalId"),idMap.get("indId"),idMap.get("organizationId"),entry.getKey());
+						List<OrganizationEvaluationInfo> organizationEvaluationInfoList = getEvaluationInfoByOptionCodeList(idMap.get("evalId"), idMap.get("indId"), idMap.get("organizationId"), entry.getKey());
 						OrganizationEvaluationInfo info = new OrganizationEvaluationInfo();
 						OrganizationEvaluationInfo oriinfo = null;
-						if(null !=organizationEvaluationInfoList &&  organizationEvaluationInfoList.size()>0){
-							 oriinfo = organizationEvaluationInfoList.get(0);//原始数据
+						if (null != organizationEvaluationInfoList && organizationEvaluationInfoList.size() > 0) {
+							oriinfo = organizationEvaluationInfoList.get(0);//原始数据
 							info.setId(oriinfo.getId());
 						} else {
 							continue;
@@ -971,8 +961,8 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 							}
 						}
 						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);
 						evaluationInfos.add(info);
 					} catch (NumberFormatException e) {
@@ -992,37 +982,37 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 	@Transactional
 	@Override
 	public boolean updateEvaluationInfo(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<OrganizationEvaluationInfo> evaluationInfos =new ArrayList<>();
+			List<OrganizationEvaluationInfo> evaluationInfos = new ArrayList<>();
 			//总分 加扣分
 			double score = 0.00;
 			double jfScore = 0.00;
 			double kfScore = 0.00;
 
 			//加扣分原因
-			String  jfRemark ="";
-			String  kfRemark ="";
+			String jfRemark = "";
+			String kfRemark = "";
 
-			String scoreid ="";
+			String scoreid = "";
 
-			for (Map.Entry<String,Object > entry : idMap.entrySet()) {
+			for (Map.Entry<String, Object> entry : idMap.entrySet()) {
 				OrganizationEvaluationInfo info = this.getById(entry.getValue().toString());
 				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();
 				scoreid = entry.getValue().toString();
-				if(null != valueMap.get(entry.getKey().replace("ID_", ""))) {
+				if (null != valueMap.get(entry.getKey().replace("ID_", ""))) {
 
 //					//加分 扣分 加扣分原因
 					if (entry.getKey().endsWith("_JFYY")) {
@@ -1059,7 +1049,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 					}
 
 					info.setNonQuantifiedValue(valueMap.get(entry.getKey().replace("ID_", "")).toString());
-				}else {
+				} else {
 					info.setQuantifiedValue(0);
 					info.setNonQuantifiedValue("");
 				}
@@ -1067,14 +1057,14 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 				evaluationInfos.add(info);
 			}
 
-			if(null == evaluationInfos || evaluationInfos.size()<=0){
+			if (null == evaluationInfos || evaluationInfos.size() <= 0) {
 				return false;
 			}
 			boolean b = this.saveOrUpdateBatch(evaluationInfos);
-			if(b && null !=evaluationInfos && evaluationInfos.size()>0){
+			if (b && null != evaluationInfos && evaluationInfos.size() > 0) {
 				OrganizationEvaluationInfo info = this.getById(scoreid);
-				List<EvaluationScoreCount>  listcount = evaluatioinScoreCountService.getEvaluationScoreCountList(info.getOrganizationEvaluationId(),info.getOrganizationEvaluationRuleId(),info.getIndicatorId(),"");
-				if(null != listcount && listcount.size()>0){
+				List<EvaluationScoreCount> listcount = evaluatioinScoreCountService.getEvaluationScoreCountList(info.getOrganizationEvaluationId(), info.getOrganizationEvaluationRuleId(), info.getIndicatorId(), "");
+				if (null != listcount && listcount.size() > 0) {
 					EvaluationScoreCount count = listcount.get(0);
 					count.setJfScore(jfScore);
 					count.setKfScore(kfScore);
@@ -1083,8 +1073,8 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 					count.setScore(score);
 					count.setObversionScore(score);
 					evaluatioinScoreCountService.saveOrUpdate(count);
-				}else {
-					calculationByEvaluationId("", info.getIndicatorId(),info.getOrganizationEvaluationId(),"");
+				} else {
+					calculationByEvaluationId("", info.getIndicatorId(), info.getOrganizationEvaluationId(), "", "", "");
 				}
 			}
 		}
@@ -1148,7 +1138,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 					info.setOptionCode(d.getOptionCode());
 					info.setIsQuantified(d.getIsQuantified());
 					if (null != optionMap.get(d.getChildCode() + "_" + d.getOptionCode())) {
-						Object value = optionMap.get(d.getChildCode() + "_" +d.getOptionCode());
+						Object value = optionMap.get(d.getChildCode() + "_" + d.getOptionCode());
 						if (null != value) {
 							info.setNonQuantifiedValue(String.valueOf(value));
 							if (d.getIsQuantified()) {
@@ -1173,29 +1163,29 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 	}
 
 	//todo  后续添加需要计算的指标项
-	public boolean calculateIdicatorItem(List<OrganizationEvaluationInfo> organizationEvaluationInfos){
+	public boolean calculateIdicatorItem(List<OrganizationEvaluationInfo> organizationEvaluationInfos) {
 
 
 		//根据考评规则分组
 		Map<String, List<OrganizationEvaluationInfo>> collect1 = organizationEvaluationInfos.stream().collect(Collectors.groupingBy(OrganizationEvaluationInfo::getOrganizationEvaluationRuleId));
-		for (Map.Entry<String, List<OrganizationEvaluationInfo>> entry1 : collect1.entrySet()){
+		for (Map.Entry<String, List<OrganizationEvaluationInfo>> entry1 : collect1.entrySet()) {
 			//根据指标id分组
 			Map<String, List<OrganizationEvaluationInfo>> collect = entry1.getValue().stream().collect(Collectors.groupingBy(OrganizationEvaluationInfo::getIndicatorId));
-			for(Map.Entry<String, List<OrganizationEvaluationInfo>> entry : collect.entrySet()){
+			for (Map.Entry<String, List<OrganizationEvaluationInfo>> entry : collect.entrySet()) {
 				//过滤差值考评指标明细
 				List<OrganizationEvaluationInfo> cz = entry.getValue().stream().filter(r -> r.getOptionCode().equals("CZ")).collect(Collectors.toList());
-				if (cz.size() == 1){
+				if (cz.size() == 1) {
 					List<OrganizationEvaluationInfo> wcz = entry.getValue().stream().filter(r -> r.getOptionCode().equals("WCZ")).collect(Collectors.toList());
 					List<OrganizationEvaluationInfo> value = entry.getValue().stream().filter(r -> r.getOptionCode().equals("JHZ") || r.getOptionCode().equals("DBZ") || r.getOptionCode().equals("MBZ")).collect(Collectors.toList());
 
 					//完成值与目标值 ||计划值||对标值进行计算
-					if (wcz.size() == 1 && value.size() == 1){
+					if (wcz.size() == 1 && value.size() == 1) {
 						double wczValue = wcz.get(0).getQuantifiedValue();
 						double dbzvalue = value.get(0).getQuantifiedValue();
 						cz.get(0).setQuantifiedValue(wczValue - dbzvalue);
 						cz.get(0).setCreateTime(new Date());
 						boolean b = super.saveOrUpdate(cz.get(0));
-						if(!b){
+						if (!b) {
 							throw new CustomException("更新失败");
 						}
 					}
@@ -1203,28 +1193,28 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 
 				//过滤单位千瓦利润考评指标明细
 				List<OrganizationEvaluationInfo> dwqwlr = entry.getValue().stream().filter(r -> r.getOptionCode().equals("DWQWLR")).collect(Collectors.toList());
-				if (dwqwlr.size() == 1){
+				if (dwqwlr.size() == 1) {
 					List<OrganizationEvaluationInfo> lrgxl = entry.getValue().stream().filter(r -> r.getOptionCode().equals("LRGXL")).collect(Collectors.toList());
 					List<OrganizationEvaluationInfo> zjrl = entry.getValue().stream().filter(r -> r.getOptionCode().equals("ZJRL")).collect(Collectors.toList());
 
 					//完成值与目标值 ||计划值||对标值进行计算
-					if (lrgxl.size() == 1 && zjrl.size() == 1){
+					if (lrgxl.size() == 1 && zjrl.size() == 1) {
 						double wczValue = lrgxl.get(0).getQuantifiedValue();
 						double dbzvalue = zjrl.get(0).getQuantifiedValue();
-						if (dbzvalue == 0 || dbzvalue == 0.0){
+						if (dbzvalue == 0 || dbzvalue == 0.0) {
 							dwqwlr.get(0).setQuantifiedValue(0);
 							dwqwlr.get(0).setCreateTime(new Date());
 							boolean b = super.saveOrUpdate(dwqwlr.get(0));
-							if(!b){
+							if (!b) {
 								throw new CustomException("更新失败");
 							}
-						}else{
+						} else {
 							//double保留两位小数
 							double v = new BigDecimal(wczValue / dbzvalue).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
 							dwqwlr.get(0).setQuantifiedValue(v);
 							dwqwlr.get(0).setCreateTime(new Date());
 							boolean b = super.saveOrUpdate(dwqwlr.get(0));
-							if(!b){
+							if (!b) {
 								throw new CustomException("更新失败");
 							}
 						}
@@ -1277,7 +1267,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 		}
 
 //		Integer count = baseMapper.selectCount(qw);
-		Integer count = baseMapper.selectEvaluationInfoByStateCount(organizationEvaluationId,deptId,state);
+		Integer count = baseMapper.selectEvaluationInfoByStateCount(organizationEvaluationId, deptId, state);
 		return count;
 
 	}
@@ -1323,13 +1313,14 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 
 	/**
 	 * 状态抓换 (-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;
 			}
@@ -1350,7 +1341,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 			}
 
 		} else {
-			if(StringUtils.isEmpty(state)){
+			if (StringUtils.isEmpty(state)) {
 				state2 = "0";
 				return state2;
 			}
@@ -1374,7 +1365,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 
 
 	private List<String> getOptionCode(String formula) {
-		List<String> setOptionCode =  new ArrayList<>();
+		List<String> setOptionCode = new ArrayList<>();
 		if (StringUtils.isEmpty(formula)) {
 			return setOptionCode;
 		}
@@ -1387,7 +1378,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 			optionCode.add(match);
 		}
 		Set<String> uniqueOptionCode = new HashSet<>(optionCode);
-		 setOptionCode = new ArrayList<>(uniqueOptionCode);
+		setOptionCode = new ArrayList<>(uniqueOptionCode);
 		return setOptionCode;
 	}
 

+ 8 - 0
ims-service/ims-eval/src/main/resources/mappers/OrganizationEvaluationInfoMapper.xml

@@ -267,6 +267,14 @@
                 and i.id = #{indicatorId}
             </if>
 
+            <if test="binStage !=null and binStage !=''">
+                and oer.bin_stage = #{binStage}
+            </if>
+
+            <if test="binSection !=null and binSection !=''">
+                and oer.bin_section = #{binSection}
+            </if>
+
 
         </where>