2 Commits 91ae3fc5ee ... 2bb703d6f3

Author SHA1 Message Date
  全业务考评 2bb703d6f3 Merge remote-tracking branch 'origin/master' 11 months ago
  全业务考评 1e9a74c265 报告汇总处理 11 months ago

+ 8 - 4
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluateReportServiceImpl.java

@@ -258,9 +258,13 @@ public class EvaluateReportServiceImpl extends ServiceImpl<EvaluateReportMapper,
 				}
 
 
+				boolean tag = true;
+				if("FD".equals(bi.getSectionCode())){
+					tag = rule.getBinSection().contains(bi.getId());
+				}
 
 				//判断多块牌子  是否在该序列加权平均
-				List<MultipleBrand> dkpz = multipleBrandService.getMultipleBranList2(rule.getOrganizationId(), "", bi.getId(), evaluation.getCheckCycle(), evaluation.getYear(), month);
+				List<MultipleBrand> dkpz = multipleBrandService.getMultipleBranList2(rule.getOrganizationId(), "", tag ? bi.getId() :bi.getMemo3() , evaluation.getCheckCycle(), evaluation.getYear(), month);
 				List<MultipleBrand> filteredList = dkpz.stream()
 					.filter(multipleBrand -> !"0".equals(multipleBrand.getParentId()))
 					.collect(Collectors.toList());
@@ -272,7 +276,7 @@ public class EvaluateReportServiceImpl extends ServiceImpl<EvaluateReportMapper,
 
 
 				//存储多块牌子数据
-				List<MultipleBrand> brands = multipleBrandService.getMultipleBranList2(rule.getOrganizationId(), "0", bi.getId(), evaluation.getCheckCycle(), evaluation.getYear(), month);
+				List<MultipleBrand> brands = multipleBrandService.getMultipleBranList2(rule.getOrganizationId(), "0", tag ? bi.getId() :bi.getMemo3(), evaluation.getCheckCycle(), evaluation.getYear(), month);
 
 				Double totalProfit = 0.00;//累加收入
 				Double spMultiply = 0.00;//收入
@@ -287,7 +291,7 @@ public class EvaluateReportServiceImpl extends ServiceImpl<EvaluateReportMapper,
 					totalProfit = totalProfit + mb.getProfit();
 					//累加收入和分数的积
 
-					List<EvaluationScoreCount> scoreCount1 = evaluationScoreCountService.getEvaluationScoreCountList(organizationEvaluationId, rule.getId(), null, Arrays.asList("SCJY".split(",")),bi.getId());
+					List<EvaluationScoreCount> scoreCount1 = evaluationScoreCountService.getEvaluationScoreCountList(organizationEvaluationId, rule.getId(), null, Arrays.asList("SCJY".split(",")),tag ? bi.getId() :bi.getMemo3());
 
 					//基准分
 					heighStandard = scoreCount1.stream().filter(s->s.getStandard().equals("1")).map(EvaluationScoreCount::getRemark).collect(Collectors.joining(System.lineSeparator()));
@@ -349,7 +353,7 @@ public class EvaluateReportServiceImpl extends ServiceImpl<EvaluateReportMapper,
 
 				}else {
 					//保存到考评报告
-					List<EvaluationScoreCount> scjyScoreCount = evaluationScoreCountService.getEvaluationScoreCountList(organizationEvaluationId, rule.getId(), null, Arrays.asList("SCJY".split(",")),bi.getId());
+					List<EvaluationScoreCount> scjyScoreCount = evaluationScoreCountService.getEvaluationScoreCountList(organizationEvaluationId, rule.getId(), null, Arrays.asList("SCJY".split(",")),tag ? bi.getId() :bi.getMemo3());
 					scjyScore = scjyScoreCount.stream().mapToDouble(EvaluationScoreCount::getScore).sum();
 					reportInfo.setScjyScore(DoubleUtils.keepPrecision(scjyScore, 2));