Browse Source

街道/区直考核定时任务,增加删除逻辑

feature/dangjian
zhangyongzhangyong 6 years ago
parent
commit
4d842a9938
  1. 21
      esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/java/com/elink/esua/epdc/service/impl/KpiRuleServiceImpl.java

21
esua-epdc/epdc-module/epdc-kpi/epdc-kpi-server/src/main/java/com/elink/esua/epdc/service/impl/KpiRuleServiceImpl.java

@ -503,6 +503,9 @@ public class KpiRuleServiceImpl extends BaseServiceImpl<KpiRuleDao, KpiRuleEntit
* @date 2019/12/25 10:54
*/
private void saveSuperiorKpiResult(Long deptId, Double score, Date startDate, Date endDate, String kpiCycle) {
//先删除 在插入
this.deletedSuperiorKpiResult(deptId, startDate, endDate);
DeptLevelAndLeaderDTO deptLevelInfo = deptUtils.getDeptLevelInfo(deptId, YesOrNoEnum.YES);
KpiResultSuperiorEntity kpiResultSuperiorEntity = new KpiResultSuperiorEntity();
kpiResultSuperiorEntity.setStartDate(startDate);
@ -518,6 +521,24 @@ public class KpiRuleServiceImpl extends BaseServiceImpl<KpiRuleDao, KpiRuleEntit
kpiResultSuperiorDao.insert(kpiResultSuperiorEntity);
}
/**
* 删除 街道/区直考核结果表
*
* @param deptId 部门id
* @param startDate 开始日
* @param endDate 结束日
* @return void
* @author zhangyong
* @date 2019/12/25
*/
private void deletedSuperiorKpiResult(Long deptId, Date startDate, Date endDate) {
QueryWrapper<KpiResultSuperiorEntity> wrapper = new QueryWrapper<>();
wrapper.eq(KpiFieldConstant.DEPT_ID, deptId)
.eq(KpiFieldConstant.START_DATE, startDate)
.eq(KpiFieldConstant.END_DATE, endDate);
kpiResultSuperiorDao.delete(wrapper);
}
/**
* 获取公式所有参数对应的元数据编码升序排列
*

Loading…
Cancel
Save