add: 评分错误修改
This commit is contained in:
-6
@@ -66,12 +66,6 @@ public class ActSarItemsBussEOController extends BaseController<ActSarItemsEO> {
|
|||||||
}
|
}
|
||||||
Object issueTime = jsonObject.get("issueTime");
|
Object issueTime = jsonObject.get("issueTime");
|
||||||
Object standSort = jsonObject.get("standSort");
|
Object standSort = jsonObject.get("standSort");
|
||||||
// 如果是企标制修定流程 类别是修改则不修改 发布日期
|
|
||||||
String reviseStatus = jsonObject.getString("reviseStatus");
|
|
||||||
if ("buss1_3".equals(reviseStatus)) {
|
|
||||||
issueTime = null;
|
|
||||||
jsonObject.put("issueTime",null);
|
|
||||||
}
|
|
||||||
if(issueTime!=null && standSort!=null){
|
if(issueTime!=null && standSort!=null){
|
||||||
String issueTimeStr =issueTime.toString();
|
String issueTimeStr =issueTime.toString();
|
||||||
String standSortStr = standSort.toString();
|
String standSortStr = standSort.toString();
|
||||||
|
|||||||
+5
-6
@@ -561,17 +561,16 @@ public class ActSarItemsBussEOService {
|
|||||||
evaluation.setCreateTime(date);
|
evaluation.setCreateTime(date);
|
||||||
evaluation.setModifyTime(date);
|
evaluation.setModifyTime(date);
|
||||||
evaluations.add(evaluation);
|
evaluations.add(evaluation);
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
qualityEvaluationService.saveBatch(evaluations);
|
qualityEvaluationService.saveBatch(evaluations);
|
||||||
//当新增完成之后进行循环校验查出流程是重新技术委员会评审、评审意见修改就根据标准id将技术委员会评审、评审意见修改的评分赋值为0
|
//当新增完成之后进行循环校验查出流程是重新技术委员会评审、评审意见修改就根据标准id将技术委员会评审、评审意见修改的评分赋值为0
|
||||||
for (QualityEvaluation qualityEvaluation :evaluations){
|
// for (QualityEvaluation qualityEvaluation :evaluations){
|
||||||
if (qualityEvaluation.getProcessNode().equals("重新技术委员会评审、评审意见修改")){
|
// if (qualityEvaluation.getProcessNode().equals("重新技术委员会评审、评审意见修改")){
|
||||||
qualityEvaluationDao.updateByProcessNode(qualityEvaluation.getLawId());
|
// qualityEvaluationDao.updateByProcessNode(qualityEvaluation.getLawId());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+11
@@ -238,6 +238,12 @@ public class EsRevisePlanController extends BaseController<EsRevisePlan> {
|
|||||||
return Result.success(iEsRevisePlanService.modPlanByState(esRevisePlan));
|
return Result.success(iEsRevisePlanService.modPlanByState(esRevisePlan));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "编辑企标计划-企标技术更新计划状态-计算质量评分")
|
||||||
|
@PostMapping("modPlanByStateAndScore")
|
||||||
|
public ResponseMessage<Object> modPlanByStateAndScore(EsRevisePlan esRevisePlan){
|
||||||
|
return Result.success(iEsRevisePlanService.modPlanByStateAndScore(esRevisePlan));
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "编辑企标计划-流程")
|
@ApiOperation(value = "编辑企标计划-流程")
|
||||||
@PostMapping("modPlanByProcess")
|
@PostMapping("modPlanByProcess")
|
||||||
public ResponseMessage<Object> modPlanByProcess(@RequestBody EsRevisePlan esRevisePlan){
|
public ResponseMessage<Object> modPlanByProcess(@RequestBody EsRevisePlan esRevisePlan){
|
||||||
@@ -286,4 +292,9 @@ public class EsRevisePlanController extends BaseController<EsRevisePlan> {
|
|||||||
return Result.success(iEsRevisePlanService.oaUpdatePlans(esId,date,s));
|
return Result.success(iEsRevisePlanService.oaUpdatePlans(esId,date,s));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/updateScore")
|
||||||
|
public ResponseMessage<String> updateScore(){
|
||||||
|
return iEsRevisePlanService.updateScore();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ public class EsRevisePlan extends BasePage {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String standNumber;
|
private String standNumber;
|
||||||
@ApiModelProperty(value = "质量评分")
|
@ApiModelProperty(value = "质量评分")
|
||||||
@TableField(exist = false)
|
|
||||||
private Double score;
|
private Double score;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+3
@@ -37,4 +37,7 @@ public interface IEsRevisePlanService extends IService<EsRevisePlan> {
|
|||||||
|
|
||||||
List<EsRevisePlan> batchToDoTasks(String json);
|
List<EsRevisePlan> batchToDoTasks(String json);
|
||||||
|
|
||||||
|
String modPlanByStateAndScore(EsRevisePlan esRevisePlan);
|
||||||
|
|
||||||
|
ResponseMessage<String> updateScore();
|
||||||
}
|
}
|
||||||
|
|||||||
+35
-5
@@ -20,7 +20,9 @@ import com.adc.da.sys.entity.UserEO;
|
|||||||
import com.adc.da.util.UUIDUtils;
|
import com.adc.da.util.UUIDUtils;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@@ -83,11 +85,13 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
|||||||
NumberFormat nf = NumberFormat.getNumberInstance();
|
NumberFormat nf = NumberFormat.getNumberInstance();
|
||||||
nf.setMaximumFractionDigits(2);
|
nf.setMaximumFractionDigits(2);
|
||||||
nf.setRoundingMode(RoundingMode.UP);
|
nf.setRoundingMode(RoundingMode.UP);
|
||||||
for (EsRevisePlan revisePlan : esRevisePlans) {
|
if (esRevisePlan.getScore() == null){
|
||||||
if (StringUtils.isNotBlank(revisePlan.getStandId())) {
|
for (EsRevisePlan revisePlan : esRevisePlans) {
|
||||||
Map<String, Double> scoreMap = qualityEvaluationService.getScore(revisePlan.getStandId());
|
if (StringUtils.isNotBlank(revisePlan.getStandId())) {
|
||||||
String quality = nf.format(scoreMap.get("quality"));
|
Map<String, Double> scoreMap = qualityEvaluationService.getScore(revisePlan.getStandId());
|
||||||
revisePlan.setScore(Double.valueOf(quality));
|
String quality = nf.format(scoreMap.get("quality"));
|
||||||
|
revisePlan.setScore(Double.valueOf(quality));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return esRevisePlans;
|
return esRevisePlans;
|
||||||
@@ -279,4 +283,30 @@ public class EsRevisePlanServiceImpl extends ServiceImpl<EsRevisePlanDao, EsRevi
|
|||||||
}
|
}
|
||||||
return esRevisePlans;
|
return esRevisePlans;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String modPlanByStateAndScore(EsRevisePlan esRevisePlan) {
|
||||||
|
if (StringUtils.isBlank(esRevisePlan.getStandId())) {
|
||||||
|
return "失败";
|
||||||
|
}
|
||||||
|
modPlanByState(esRevisePlan);
|
||||||
|
Map<String, Double> score = qualityEvaluationService.getScore(esRevisePlan.getStandId());
|
||||||
|
LambdaUpdateWrapper<EsRevisePlan> wrapper = new LambdaUpdateWrapper<>();
|
||||||
|
wrapper.eq(EsRevisePlan::getStandId, esRevisePlan.getStandId());
|
||||||
|
wrapper.set(EsRevisePlan::getScore, score.get("quality"));
|
||||||
|
update(wrapper);
|
||||||
|
return "修改成功";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResponseMessage<String> updateScore() {
|
||||||
|
LambdaQueryWrapper<EsRevisePlan> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(EsRevisePlan::getPlanStatus, "4");
|
||||||
|
wrapper.isNotNull(EsRevisePlan::getStandId);
|
||||||
|
List<EsRevisePlan> esRevisePlans = esRevisePlanDao.selectList(wrapper);
|
||||||
|
for (EsRevisePlan esRevisePlan : esRevisePlans) {
|
||||||
|
esRevisePlan.setScore(qualityEvaluationService.getScore(esRevisePlan.getStandId()).get("quality"));
|
||||||
|
}
|
||||||
|
return Result.success("更新成功");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-1
@@ -240,6 +240,16 @@ public class QualityEvaluationServiceImpl extends ServiceImpl<QualityEvaluationD
|
|||||||
result.put("quality",0.0);
|
result.put("quality",0.0);
|
||||||
|
|
||||||
|
|
||||||
|
if (list.size() > 0) {
|
||||||
|
// 如果存在 技术委员会评审、评审意见修改 节点 和 重新技术委员会评审、评审意见修改 节点,则仅计算 重新技术委员会评审、评审意见修改
|
||||||
|
List<QualityEvaluation> collect = list.stream().filter(item -> item.getProcessNode() != null
|
||||||
|
&& "重新技术委员会评审、评审意见修改".equals(item.getProcessNode())).collect(Collectors.toList());
|
||||||
|
if (collect.size()>0) {
|
||||||
|
List<QualityEvaluation> collect1 = list.stream().filter(item -> item.getProcessNode() != null
|
||||||
|
&& "技术委员会评审、评审意见修改".equals(item.getProcessNode())).collect(Collectors.toList());
|
||||||
|
list.removeAll(collect1);
|
||||||
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 同一节点为多人评价时,需要取多人评价的平均分用以计算最终得分。
|
* 同一节点为多人评价时,需要取多人评价的平均分用以计算最终得分。
|
||||||
* 各环节评分权重分别设置为30%、40%、30%,
|
* 各环节评分权重分别设置为30%、40%、30%,
|
||||||
@@ -249,7 +259,7 @@ public class QualityEvaluationServiceImpl extends ServiceImpl<QualityEvaluationD
|
|||||||
.collect(Collectors.groupingBy(QualityEvaluation::getEvaluationType,
|
.collect(Collectors.groupingBy(QualityEvaluation::getEvaluationType,
|
||||||
Collectors.summingDouble(item ->{
|
Collectors.summingDouble(item ->{
|
||||||
|
|
||||||
Double score;
|
double score;
|
||||||
String value;
|
String value;
|
||||||
if (item.getProcessNode()==null){
|
if (item.getProcessNode()==null){
|
||||||
value="";
|
value="";
|
||||||
|
|||||||
@@ -70,6 +70,7 @@
|
|||||||
<result property="area" column="area"></result>
|
<result property="area" column="area"></result>
|
||||||
<result property="rqbJson" column="rqb_json"></result>
|
<result property="rqbJson" column="rqb_json"></result>
|
||||||
<result property="tsJson" column="ts_json"></result>
|
<result property="tsJson" column="ts_json"></result>
|
||||||
|
<result property="score" column="score" />
|
||||||
<result property="esMatingRelations" column="es_mating_relations"/>
|
<result property="esMatingRelations" column="es_mating_relations"/>
|
||||||
<result property="esStandRelations" column="es_stand_relations"/>
|
<result property="esStandRelations" column="es_stand_relations"/>
|
||||||
<result property="isRelate" column="is_relate"/>
|
<result property="isRelate" column="is_relate"/>
|
||||||
@@ -147,6 +148,7 @@
|
|||||||
es_revise_plan.technologic,
|
es_revise_plan.technologic,
|
||||||
es_revise_plan.buss_sort,
|
es_revise_plan.buss_sort,
|
||||||
es_revise_plan.LXD,
|
es_revise_plan.LXD,
|
||||||
|
es_revise_plan.score,
|
||||||
sar_bussioness_stand.STAND_CODE as rqbName,
|
sar_bussioness_stand.STAND_CODE as rqbName,
|
||||||
sar_bussioness_stand.STAND_SORT as standType,
|
sar_bussioness_stand.STAND_SORT as standType,
|
||||||
(select group_concat(ts_institution.name order by ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit) ORDER BY find_in_set(ts_institution.id,unit)) as unitName,
|
(select group_concat(ts_institution.name order by ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit) ORDER BY find_in_set(ts_institution.id,unit)) as unitName,
|
||||||
@@ -219,6 +221,7 @@
|
|||||||
es_revise_plan.technologic,
|
es_revise_plan.technologic,
|
||||||
es_revise_plan.buss_sort,
|
es_revise_plan.buss_sort,
|
||||||
es_revise_plan.LXD,
|
es_revise_plan.LXD,
|
||||||
|
es_revise_plan.score,
|
||||||
sar_bussioness_stand.STAND_CODE as rqbName,
|
sar_bussioness_stand.STAND_CODE as rqbName,
|
||||||
sar_bussioness_stand.STAND_SORT as standType,
|
sar_bussioness_stand.STAND_SORT as standType,
|
||||||
sar_bussioness_stand.stand_number as standNum,
|
sar_bussioness_stand.stand_number as standNum,
|
||||||
@@ -301,6 +304,7 @@
|
|||||||
es_revise_plan.technologic,
|
es_revise_plan.technologic,
|
||||||
es_revise_plan.buss_sort,
|
es_revise_plan.buss_sort,
|
||||||
es_revise_plan.LXD,
|
es_revise_plan.LXD,
|
||||||
|
es_revise_plan.score,
|
||||||
sar_bussioness_stand.STAND_CODE as rqbName,
|
sar_bussioness_stand.STAND_CODE as rqbName,
|
||||||
sar_bussioness_stand.STAND_SORT as standType,
|
sar_bussioness_stand.STAND_SORT as standType,
|
||||||
(select group_concat(ts_institution.name order by ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit) ORDER BY find_in_set(ts_institution.id,unit)) as unitName,
|
(select group_concat(ts_institution.name order by ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit) ORDER BY find_in_set(ts_institution.id,unit)) as unitName,
|
||||||
@@ -544,6 +548,7 @@
|
|||||||
es_revise_plan.technologic,
|
es_revise_plan.technologic,
|
||||||
es_revise_plan.buss_sort,
|
es_revise_plan.buss_sort,
|
||||||
es_revise_plan.LXD,
|
es_revise_plan.LXD,
|
||||||
|
es_revise_plan.score,
|
||||||
sar_bussioness_stand.STAND_CODE as rqbName,
|
sar_bussioness_stand.STAND_CODE as rqbName,
|
||||||
sar_bussioness_stand.STAND_SORT as standType,
|
sar_bussioness_stand.STAND_SORT as standType,
|
||||||
(select group_concat(ts_institution.name order by ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit) ORDER BY find_in_set(ts_institution.id,unit)) as unitName,
|
(select group_concat(ts_institution.name order by ts_institution.name) from ts_institution where find_in_set(ts_institution.id,unit) ORDER BY find_in_set(ts_institution.id,unit)) as unitName,
|
||||||
|
|||||||
Reference in New Issue
Block a user