|
@@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import java.util.*;
|
|
|
import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -65,6 +66,11 @@ public class EvaluateReportServiceImpl extends ServiceImpl<EvaluateReportMapper,
|
|
|
|
|
|
@Autowired
|
|
|
private IPartyBuildingMultiplierService partyBuildingMultiplierService;
|
|
|
+
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private IOrganizationRatingService iOrganizationRatingService;
|
|
|
+
|
|
|
//考评结果报告
|
|
|
//按照业务类型生成
|
|
|
//业务阶综合展示
|
|
@@ -81,7 +87,7 @@ public class EvaluateReportServiceImpl extends ServiceImpl<EvaluateReportMapper,
|
|
|
|
|
|
OrganizationEvaluation evaluation = organizationEvaluationService.getById(organizationEvaluationId);
|
|
|
if (null == evaluation) {
|
|
|
- throw new CustomException("没有此靠考评");
|
|
|
+ throw new CustomException("没有此考评");
|
|
|
}
|
|
|
//获取到对应组织考评规则
|
|
|
String evaluationRuleId = evaluation.getOrganizationEvaluationRuleId();
|
|
@@ -101,7 +107,7 @@ public class EvaluateReportServiceImpl extends ServiceImpl<EvaluateReportMapper,
|
|
|
.collect(Collectors.toMap(OrganizationEvaluationRule::getOrganizationId, rule -> rule));
|
|
|
|
|
|
for (BinSection bi : sections) {
|
|
|
-
|
|
|
+ IPage<OrganizationRating> orgRatingList = iOrganizationRatingService.list(1, 100000, null, null, bi.getSectionCode(), evaluation.getYear(), null, null, null, null, null, null, null, null, null, null);
|
|
|
|
|
|
EvaluateReport evaluateReport = new EvaluateReport();
|
|
|
|
|
@@ -494,6 +500,7 @@ public class EvaluateReportServiceImpl extends ServiceImpl<EvaluateReportMapper,
|
|
|
}
|
|
|
}else {
|
|
|
reportInfo.setScore(DoubleUtils.keepPrecision(zhScore, 2));
|
|
|
+
|
|
|
reportInfo.setDiscountScore(1.0);
|
|
|
portal.setScore(DoubleUtils.keepPrecision(zhScore, 2));//保存到首页排行
|
|
|
}
|
|
@@ -501,12 +508,27 @@ public class EvaluateReportServiceImpl extends ServiceImpl<EvaluateReportMapper,
|
|
|
evaluateRuleInfoList.add(reportInfo);
|
|
|
}
|
|
|
|
|
|
+ List<OrganizationRating> orlist = new ArrayList<>();
|
|
|
for (EvaluateReportInfo info : evaluateRuleInfoList) {
|
|
|
b = evaluateReportInfoService.saveOrUpdate(info);
|
|
|
if (!b) {
|
|
|
throw new CustomException("综合考核评分汇总明细存储失败");
|
|
|
}
|
|
|
+ if ("NDKP".equals(evaluation.getCheckCycle())) {
|
|
|
+ List<OrganizationRating> records = orgRatingList.getRecords();
|
|
|
+ if (records.isEmpty()) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ for (OrganizationRating or : records) {
|
|
|
+ if (info.getOrganizationName().equals(or.getOrganizationShortName()) && info.getOrganizationId().equals(or.getOrganizationId())) {
|
|
|
+ or.setScore(String.valueOf(info.getScore()));
|
|
|
+ orlist.add(or);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+ boolean orgRat = iOrganizationRatingService.saveOrUpdateBatch(orlist);
|
|
|
+ System.out.println(orgRat);
|
|
|
|
|
|
if(null !=portalList && portalList.size()>0){
|
|
|
|