全业务考评 hai 1 ano
pai
achega
96b4a29721

+ 9 - 5
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/CalculateIndicatorItemInfoServiceImpl.java

@@ -8,6 +8,7 @@ import com.ims.eval.entity.dto.response.OrganizationEvaluationInfoResDTO;
 import com.ims.eval.entity.dto.response.OrganizationEvaluationResDTO;
 import com.ims.eval.service.ICalculateIndicatorItemInfoService;
 import com.ims.eval.service.ICiteCalculationIndicatorService;
+import com.ims.eval.service.IIndicatorService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -41,8 +42,8 @@ public class CalculateIndicatorItemInfoServiceImpl extends ServiceImpl<Calculate
 	private ICalculateIndicatorItemInfoService calculateIndicatorItemInfoService;
 
 
-	@Resource
-	private IndicatorMapper indicatorMapper;
+	@Autowired
+	private IIndicatorService indicatorservice;
 
 	@Autowired
 	private ICiteCalculationIndicatorService citeCalculationIndicatorService;
@@ -84,12 +85,15 @@ public class CalculateIndicatorItemInfoServiceImpl extends ServiceImpl<Calculate
 					if (null != cciList && cciList.size() > 0) {
 						for (CiteCalculationIndicator cci : cciList) {
 							List<String> indicatorIds = Arrays.asList(cci.getIndicatorIds().split(","));
+
 							List<CalculateIndicatorItemInfo> ciiList = calculateIndicatorItemInfoMapper.selectItemInfoByIndicatorIdList("", organizationEvaluationId, indicatorIds);
 							Map<String, List<CalculateIndicatorItemInfo>> optionCodeGropList = ciiList.stream().collect(Collectors.groupingBy(CalculateIndicatorItemInfo::getOptionCode));
 							for (Map.Entry<String, List<CalculateIndicatorItemInfo>> optionCodeGropListEntry : optionCodeGropList.entrySet()) {
 
+								List<CalculateIndicatorItemInfo> values2 = optionCodeGropListEntry.getValue().stream().filter(f->cci.getBinSection().contains(f.getSectionId())).collect(Collectors.toList());
+
 								//从小到大的顺序排序
-								Collections.sort(optionCodeGropListEntry.getValue(), new Comparator<CalculateIndicatorItemInfo>() {
+								Collections.sort(values2, new Comparator<CalculateIndicatorItemInfo>() {
 									@Override
 									public int compare(CalculateIndicatorItemInfo u1, CalculateIndicatorItemInfo u2) {
 										double diff = u1.getQuantifiedValue() - u2.getQuantifiedValue();
@@ -106,10 +110,10 @@ public class CalculateIndicatorItemInfoServiceImpl extends ServiceImpl<Calculate
 
 								double value = 0.0;
 								if (optionCodeGropListEntry.getKey().endsWith("MAX")) {
-									CalculateIndicatorItemInfo maxNum = (CalculateIndicatorItemInfo) optionCodeGropListEntry.getValue().get(optionCodeGropListEntry.getValue().size() - 1).clone();
+									CalculateIndicatorItemInfo maxNum = (CalculateIndicatorItemInfo) values2.get(values2.size() - 1).clone();
 									value = maxNum.getQuantifiedValue();
 								} else if (optionCodeGropListEntry.getKey().endsWith("MIN")) {
-									CalculateIndicatorItemInfo minNum = (CalculateIndicatorItemInfo) optionCodeGropListEntry.getValue().get(0).clone();
+									CalculateIndicatorItemInfo minNum = (CalculateIndicatorItemInfo) values2.get(0).clone();
 									value = minNum.getQuantifiedValue();
 								} else {
 									continue;

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

@@ -282,7 +282,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 							this.saveOrUpdateBatch(listUpdateInfos);
 						}
 
-						iCalculateIndicatorItemInfoService.saveIndicatorInfoDTO(organizationEvaluationId,indicatorGropListEntry.getValue(),indicatorId);
+						iCalculateIndicatorItemInfoService.saveIndicatorInfoDTO(organizationEvaluationId,indicatorGropListEntry.getValue(),indicatorGropListEntry.getKey());
 					}
 				}
 			}
@@ -531,7 +531,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 				}
 				title.put(childCodeEntry.getKey().split(",")[1]+"-对标", titleArray);
 			}
-			if(groupedChildCode.size()>1 || dictionaryList.get(0).getChildCode().endsWith("LRZE")){
+			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", "得分");//名称