|
|
@ -467,11 +467,12 @@ public class KpiRuleServiceImpl extends BaseServiceImpl<KpiRuleDao, KpiRuleEntit |
|
|
|
private void saveOrUpdateKpiResult(KpiResultGridEntity kpiResultGridEntity) { |
|
|
|
//运算结果存储在 网格考核最终得分表 manual_score字段,:唯一性条件(deptId,scoreStartDate,scoreEndDate)
|
|
|
|
KpiResultGridDTO kpiResultGridDto = getKpiresultGrid(kpiResultGridEntity.getGridId(), kpiResultGridEntity.getStartDate(), kpiResultGridEntity.getEndDate()); |
|
|
|
DeptLevelAndLeaderDTO deptLevelInfo = deptUtils.getDeptLevelInfo(kpiResultGridEntity.getGridId(), YesOrNoEnum.YES); |
|
|
|
if (kpiResultGridDto != null) { |
|
|
|
kpiResultGridEntity.setId(kpiResultGridDto.getId()); |
|
|
|
kpiResultGridEntity.setLeaderName(deptLevelInfo.getLeaderName()); |
|
|
|
kpiResultGridDao.updateById(kpiResultGridEntity); |
|
|
|
} else { |
|
|
|
DeptLevelAndLeaderDTO deptLevelInfo = deptUtils.getDeptLevelInfo(kpiResultGridEntity.getGridId(), YesOrNoEnum.YES); |
|
|
|
kpiResultGridEntity.setParentDeptIds(deptLevelInfo.getParentDeptIds()); |
|
|
|
kpiResultGridEntity.setParentDeptNames(deptLevelInfo.getParentDeptNames()); |
|
|
|
kpiResultGridEntity.setAllDeptIds(deptLevelInfo.getAllDeptIds()); |
|
|
@ -526,7 +527,7 @@ public class KpiRuleServiceImpl extends BaseServiceImpl<KpiRuleDao, KpiRuleEntit |
|
|
|
} |
|
|
|
kpiResultSuperiorEntity.setKpiCycle(kpiCycle); |
|
|
|
|
|
|
|
// 根据 考核规则表-主键,查询公式参数表,排序:1,2,3,4,5
|
|
|
|
// 根据 考核规则表-主键,查询公式参数表,排序:1,2,3,4,5,6
|
|
|
|
List<KpiRuleParamDTO> ruleParamList = kpiRuleParamDao.queryFormulaParam(kpiRuleDTO.getId()); |
|
|
|
List<String> metaDateCodeList = Lists.newArrayList(); |
|
|
|
for (int i = 0; i < ruleParamList.size(); i++) { |
|
|
|