Commit 6008be7a by dengwei

权重配置,多层权重计算逻辑优化

parent c2085ae8
......@@ -39,8 +39,8 @@ public class ObjScoreIndWeightCfgCtrl {
@ApiOperation("分页查询权重配置信息")
@GetMapping("/findByPage")
public Page<ObjScoreIndWeightCfg> findByPage(@ApiParam("搜索关键字(名字)")@RequestParam(value = "keyword", required=false) String keyword,
@ApiParam("页码,从1开始") @RequestParam(value ="page",defaultValue = "1") int page,
@ApiParam("每页条数") @RequestParam(value ="pageSize", defaultValue = "10") int pageSize,
@ApiParam("页码,从1开始") @RequestParam("page") int page,
@ApiParam("每页条数") @RequestParam("pageSize") int pageSize,
@ApiParam("机构编号") @RequestParam(value = "orgNo",required=false) String orgNo) {
LogManager.logInfo(Constants.LOG_INDICATOR_WEIGHTCFG_API, "根据参数分页查询权重配置信息{}", keyword);
return weightCfgService.findByPage(page, pageSize, keyword, orgNo);
......
......@@ -545,10 +545,8 @@ public class ScoreRuleService {
objScoreCalResult = this.calGroupIndAverageOrSum(compareCatalog,objScoreCalResult,
scoreRule, compareObj, date, scoreRule.getCalType(),code,dateMark);
}else {//4:多层权重
logger.info("多层权重结果1:" + objScoreCalResult);
objScoreCalResult = this.calMoreIndWeight(compareCatalog,objScoreCalResult ,scoreRule,
compareObj, date, code, dateMark);
logger.info("多层权重结果2:" + objScoreCalResult);
}
objScoreCalResult.setCompareCatalog(compareCatalog);
objScoreCalResult.setCompareId(compareId);
......@@ -581,7 +579,6 @@ public class ScoreRuleService {
}
datas = null;
}
logger.info("最终存表的结果集合:" + dbDatas);
//批量新增或修改
if(!dbDatas.isEmpty()) {
this.batchSaveOrUpdateObjScoreCalResult(dbDatas);
......@@ -624,7 +621,7 @@ public class ScoreRuleService {
//根据考核指标id获取考核指标
DriveIndDef driveIndDef = driveIndDefService.getIndById(calResult.getIndId(), true);
WeightIndValue weightIndValue = weightIndValueMapper.findByIndIdAndObjId(calResult.getIndId(), compareObj);
if(driveIndDef != null) {
if(driveIndDef != null && weightIndValue != null) {
//如果考核指标是参与单位计分的
if(StringUtils.isBlank(driveIndDef.getIsUnitCalScore()) || "1".equals(driveIndDef.getIsUnitCalScore())) {
// 判断该指标是否为多合一指标(是:1 否:0)
......
......@@ -5,12 +5,12 @@
<insert id="batchInsert" parameterType="list">
insert into obj_score_ind_weight_detail
(cfg_id, code, level_name, date_value, org_no, org_name, org_type, ind_id, ind_name, weight, ind_weight, ind_improve_weight,
weight_two, weight_one , big_weight)
weight_two, weight_one , big_weight, create_time)
values
<foreach collection="valueList" item="val" separator=",">
(#{val.cfgId}, #{val.code}, #{val.levelName}, #{val.dataValue}, #{val.orgNo}, #{val.orgName}, #{val.orgType},
#{val.indId}, #{val.indName}, #{val.weight}, #{val.indWeight}, #{val.indImproveWeight},
#{val.weightTwo}, #{val.weightOne}, #{val.bigWeight})
#{val.weightTwo}, #{val.weightOne}, #{val.bigWeight}, #{val.createTime})
</foreach>
</insert>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment