bug:企标计划评分问题修改
This commit is contained in:
+35
-35
@@ -165,41 +165,41 @@ public class EsRevisePlanController extends BaseController<EsRevisePlan> {
|
||||
}
|
||||
}
|
||||
revisePlan.setArea(area);
|
||||
//查评分
|
||||
if (ObjectUtils.isNotEmpty(revisePlan.getStandId())) {
|
||||
List<Double> last = new ArrayList<>();
|
||||
List<QualityEvaluation> evaluations = qualityEvaluationDao.getEvaluationForm(new QueryWrapper<QualityEvaluation>().eq("law_id", revisePlan.getStandId()).eq("evaluation_type", "quality"));
|
||||
for (QualityEvaluation evaluation : evaluations) {
|
||||
Double score;
|
||||
String value;
|
||||
if (evaluation.getProcessNode()==null){
|
||||
value="";
|
||||
}else {
|
||||
value=evaluation.getProcessNode();
|
||||
}
|
||||
String evaluationScore = ObjectUtils.isEmpty(evaluation.getScore()) ? "0" : evaluation.getScore();
|
||||
switch (value){
|
||||
case "征求意见":
|
||||
score=Double.valueOf(evaluationScore) * 0.3;
|
||||
break;
|
||||
case "技术委员会评审、评审意见修改":
|
||||
score=Double.valueOf(evaluationScore) * 0.4;
|
||||
break;
|
||||
case "重新技术委员会评审、评审意见修改":
|
||||
score=Double.valueOf(evaluationScore) * 0.4;
|
||||
break;
|
||||
case "标准化复审":
|
||||
score=Double.valueOf(evaluationScore) * 0.15;
|
||||
break;
|
||||
case "标准法规部高级经理审核":
|
||||
score=Double.valueOf(evaluationScore) * 0.15;
|
||||
break;
|
||||
default: score=Double.valueOf(evaluationScore);
|
||||
}
|
||||
last.add(score);
|
||||
}
|
||||
revisePlan.setScore(last.stream().mapToDouble(Double::doubleValue).sum());
|
||||
}
|
||||
// //查评分
|
||||
// if (ObjectUtils.isNotEmpty(revisePlan.getStandId())) {
|
||||
// List<Double> last = new ArrayList<>();
|
||||
// List<QualityEvaluation> evaluations = qualityEvaluationDao.getEvaluationForm(new QueryWrapper<QualityEvaluation>().eq("law_id", revisePlan.getStandId()).eq("evaluation_type", "quality"));
|
||||
// for (QualityEvaluation evaluation : evaluations) {
|
||||
// Double score;
|
||||
// String value;
|
||||
// if (evaluation.getProcessNode()==null){
|
||||
// value="";
|
||||
// }else {
|
||||
// value=evaluation.getProcessNode();
|
||||
// }
|
||||
// String evaluationScore = ObjectUtils.isEmpty(evaluation.getScore()) ? "0" : evaluation.getScore();
|
||||
// switch (value){
|
||||
// case "征求意见":
|
||||
// score=Double.valueOf(evaluationScore) * 0.3;
|
||||
// break;
|
||||
// case "技术委员会评审、评审意见修改":
|
||||
// score=Double.valueOf(evaluationScore) * 0.4;
|
||||
// break;
|
||||
// case "重新技术委员会评审、评审意见修改":
|
||||
// score=Double.valueOf(evaluationScore) * 0.4;
|
||||
// break;
|
||||
// case "标准化复审":
|
||||
// score=Double.valueOf(evaluationScore) * 0.15;
|
||||
// break;
|
||||
// case "标准法规部高级经理审核":
|
||||
// score=Double.valueOf(evaluationScore) * 0.15;
|
||||
// break;
|
||||
// default: score=Double.valueOf(evaluationScore);
|
||||
// }
|
||||
// last.add(score);
|
||||
// }
|
||||
// revisePlan.setScore(last.stream().mapToDouble(Double::doubleValue).sum());
|
||||
// }
|
||||
}
|
||||
PageInfo<EsRevisePlan> pageInfo = getPageInfo(esRevisePlan.getPager(),esRevisePlans);
|
||||
return Result.success(pageInfo);
|
||||
|
||||
+18
@@ -15,6 +15,7 @@ import com.adc.da.slrs.esStandRelation.entity.EsStandRelation;
|
||||
import com.adc.da.slrs.esStandRelation.service.IEsStandRelationService;
|
||||
import com.adc.da.slrs.sarBussionessStand.entity.SarBussionessStand;
|
||||
import com.adc.da.slrs.sarBussionessStand.service.ISarBussionessStandService;
|
||||
import com.adc.da.slrs.sarEnterpriseStandardEvaluation.service.IQualityEvaluationService;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
@@ -26,6 +27,9 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.NumberFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -56,6 +60,9 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
||||
@Autowired
|
||||
private IEsRevisePlanLogService esRevisePlanLogService;
|
||||
|
||||
@Resource
|
||||
private IQualityEvaluationService qualityEvaluationService;
|
||||
|
||||
@Override
|
||||
public List<EsRevisePlan> getAllPlans(EsRevisePlan esRevisePlan) {
|
||||
Integer count = esRevisePlanDao.getTotal();
|
||||
@@ -73,6 +80,17 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
||||
Integer count = esRevisePlanDao.getQueryTotal(esRevisePlan);
|
||||
esRevisePlan.getPager().setRowCount(count);
|
||||
List<EsRevisePlan> esRevisePlans = esRevisePlanDao.queryAll(esRevisePlan);
|
||||
// 获取质量评分
|
||||
NumberFormat nf = NumberFormat.getNumberInstance();
|
||||
nf.setMaximumFractionDigits(2);
|
||||
nf.setRoundingMode(RoundingMode.UP);
|
||||
for (EsRevisePlan revisePlan : esRevisePlans) {
|
||||
if (StringUtils.isNotBlank(revisePlan.getStandId())) {
|
||||
Map<String, Double> scoreMap = qualityEvaluationService.getScore(revisePlan.getStandId());
|
||||
String quality = nf.format(scoreMap.get("quality"));
|
||||
revisePlan.setScore(Double.valueOf(quality));
|
||||
}
|
||||
}
|
||||
return esRevisePlans;
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -196,32 +196,32 @@ public class QualityEvaluationServiceImpl extends ServiceImpl<QualityEvaluationD
|
||||
Integer countBZSHStr = null;
|
||||
if(!list.isEmpty()){
|
||||
for (QualityEvaluation qualityEvaluations :list){
|
||||
if(qualityEvaluations.getProcessNode().equals("征求意见")) {
|
||||
if("征求意见".equals(qualityEvaluations.getProcessNode())) {
|
||||
List<Integer> countZQYJList = qualityEvaluationDao.selectCountZQYJ(qualityEvaluations.getProcessNode(), qualityEvaluations.getLawId());
|
||||
if(!countZQYJList.isEmpty()){
|
||||
countZQYJStr = countZQYJList.size();
|
||||
}
|
||||
}
|
||||
|
||||
if(qualityEvaluations.getProcessNode().equals("技术委员会评审、评审意见修改")) {
|
||||
if("技术委员会评审、评审意见修改".equals(qualityEvaluations.getProcessNode())) {
|
||||
List<Integer> countJSWYList = qualityEvaluationDao.selectCountJSWY(qualityEvaluations.getProcessNode(), qualityEvaluations.getLawId());
|
||||
if(!countJSWYList.isEmpty()){
|
||||
countJSWYStr = countJSWYList.size();
|
||||
}
|
||||
}
|
||||
if(qualityEvaluations.getProcessNode().equals("重新技术委员会评审、评审意见修改")) {
|
||||
if("重新技术委员会评审、评审意见修改".equals(qualityEvaluations.getProcessNode())) {
|
||||
List<Integer> countCXJSWYList = qualityEvaluationDao.selectCXJSWY(qualityEvaluations.getProcessNode(), qualityEvaluations.getLawId());
|
||||
if(!countCXJSWYList.isEmpty()){
|
||||
countCXJSWYStr = countCXJSWYList.size();
|
||||
}
|
||||
}
|
||||
if(qualityEvaluations.getProcessNode().equals("标准化复审")) {
|
||||
if("标准化复审".equals(qualityEvaluations.getProcessNode())) {
|
||||
List<Integer> countBZHFSList = qualityEvaluationDao.selectBZHFS(qualityEvaluations.getProcessNode(), qualityEvaluations.getLawId());
|
||||
if(!countBZHFSList.isEmpty()){
|
||||
countBZHFSStr = countBZHFSList.size();
|
||||
}
|
||||
}
|
||||
if(qualityEvaluations.getProcessNode().equals("标准法规部高级经理审核")) {
|
||||
if("标准法规部高级经理审核".equals(qualityEvaluations.getProcessNode())) {
|
||||
List<Integer> countBZSHList = qualityEvaluationDao.selectBZSH(qualityEvaluations.getProcessNode(), qualityEvaluations.getLawId());
|
||||
if(!countBZSHList.isEmpty()){
|
||||
countBZSHStr = countBZSHList.size();
|
||||
|
||||
Reference in New Issue
Block a user