|
|
@@ -24,6 +24,7 @@ import com.sundot.airport.common.enums.BasePerformanceIndicatorLeaveTypeEnum;
|
|
24
|
24
|
import com.sundot.airport.common.enums.BasePerformanceIndicatorQcDeptTypeEnum;
|
|
25
|
25
|
import com.sundot.airport.common.enums.BasePerformanceIndicatorRewardPunishmentTypeTypeEnum;
|
|
26
|
26
|
import com.sundot.airport.common.enums.RoleTypeEnum;
|
|
|
27
|
+import com.sundot.airport.common.event.PersonnelEvent;
|
|
27
|
28
|
import com.sundot.airport.common.exception.ServiceException;
|
|
28
|
29
|
import com.sundot.airport.common.utils.DateUtils;
|
|
29
|
30
|
import com.sundot.airport.common.utils.MonthUtils;
|
|
|
@@ -36,6 +37,7 @@ import com.sundot.airport.system.domain.BasePerformanceIndicatorCategory;
|
|
36
|
37
|
import com.sundot.airport.system.service.IBasePerformanceIndicatorCategoryService;
|
|
37
|
38
|
import com.sundot.airport.system.service.ISysUserService;
|
|
38
|
39
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
40
|
+import org.springframework.context.ApplicationEventPublisher;
|
|
39
|
41
|
import org.springframework.stereotype.Service;
|
|
40
|
42
|
import com.sundot.airport.personnel.mapper.PersonnelNonCadreMonthlyAssessmentMapper;
|
|
41
|
43
|
import com.sundot.airport.personnel.domain.PersonnelNonCadreMonthlyAssessment;
|
|
|
@@ -65,6 +67,8 @@ public class PersonnelNonCadreMonthlyAssessmentServiceImpl extends ServiceImpl<P
|
|
65
|
67
|
private IBasePerformanceIndicatorCategoryService basePerformanceIndicatorCategoryService;
|
|
66
|
68
|
@Autowired
|
|
67
|
69
|
private ISysUserService sysUserService;
|
|
|
70
|
+ @Autowired
|
|
|
71
|
+ private ApplicationEventPublisher eventPublisher;
|
|
68
|
72
|
|
|
69
|
73
|
/**
|
|
70
|
74
|
* 查询非干部月度考核
|
|
|
@@ -95,8 +99,6 @@ public class PersonnelNonCadreMonthlyAssessmentServiceImpl extends ServiceImpl<P
|
|
95
|
99
|
});
|
|
96
|
100
|
}
|
|
97
|
101
|
}
|
|
98
|
|
- // 完善数据
|
|
99
|
|
- doImprove(result);
|
|
100
|
102
|
return result;
|
|
101
|
103
|
}
|
|
102
|
104
|
|
|
|
@@ -128,6 +130,8 @@ public class PersonnelNonCadreMonthlyAssessmentServiceImpl extends ServiceImpl<P
|
|
128
|
130
|
throw new ServiceException("该用户已存在该考核月份的考核记录");
|
|
129
|
131
|
}
|
|
130
|
132
|
personnelNonCadreMonthlyAssessment.setCreateTime(DateUtils.getNowDate());
|
|
|
133
|
+ // 完善数据
|
|
|
134
|
+ doImprove(personnelNonCadreMonthlyAssessment);
|
|
131
|
135
|
int result = personnelNonCadreMonthlyAssessmentMapper.insertPersonnelNonCadreMonthlyAssessment(personnelNonCadreMonthlyAssessment);
|
|
132
|
136
|
if (CollUtil.isNotEmpty(personnelNonCadreMonthlyAssessment.getPersonnelMonthlyAssessmentIndicatorDetailList())) {
|
|
133
|
137
|
personnelNonCadreMonthlyAssessment.getPersonnelMonthlyAssessmentIndicatorDetailList().forEach(personnelMonthlyAssessmentIndicatorDetail -> {
|
|
|
@@ -145,8 +149,7 @@ public class PersonnelNonCadreMonthlyAssessmentServiceImpl extends ServiceImpl<P
|
|
145
|
149
|
}
|
|
146
|
150
|
});
|
|
147
|
151
|
}
|
|
148
|
|
- PersonnelNonCadreMonthlyAssessment dto = selectPersonnelNonCadreMonthlyAssessmentById(personnelNonCadreMonthlyAssessment.getId());
|
|
149
|
|
- personnelNonCadreMonthlyAssessmentMapper.updatePersonnelNonCadreMonthlyAssessment(dto);
|
|
|
152
|
+ eventPublisher.publishEvent(new PersonnelEvent(this, personnelNonCadreMonthlyAssessment.getAssessmentMonth()));
|
|
150
|
153
|
return result;
|
|
151
|
154
|
}
|
|
152
|
155
|
|
|
|
@@ -174,6 +177,8 @@ public class PersonnelNonCadreMonthlyAssessmentServiceImpl extends ServiceImpl<P
|
|
174
|
177
|
personnelMonthlyAssessmentIndicatorRewardPunishmentDetailService.removeBatchByIds(personnelMonthlyAssessmentIndicatorRewardPunishmentDetailListOld);
|
|
175
|
178
|
}
|
|
176
|
179
|
}
|
|
|
180
|
+ // 完善数据
|
|
|
181
|
+ doImprove(personnelNonCadreMonthlyAssessment);
|
|
177
|
182
|
// 新增新数据
|
|
178
|
183
|
if (CollUtil.isNotEmpty(personnelNonCadreMonthlyAssessment.getPersonnelMonthlyAssessmentIndicatorDetailList())) {
|
|
179
|
184
|
personnelNonCadreMonthlyAssessment.getPersonnelMonthlyAssessmentIndicatorDetailList().forEach(personnelMonthlyAssessmentIndicatorDetail -> {
|
|
|
@@ -195,8 +200,7 @@ public class PersonnelNonCadreMonthlyAssessmentServiceImpl extends ServiceImpl<P
|
|
195
|
200
|
}
|
|
196
|
201
|
});
|
|
197
|
202
|
}
|
|
198
|
|
- PersonnelNonCadreMonthlyAssessment dto = selectPersonnelNonCadreMonthlyAssessmentById(personnelNonCadreMonthlyAssessment.getId());
|
|
199
|
|
- personnelNonCadreMonthlyAssessmentMapper.updatePersonnelNonCadreMonthlyAssessment(dto);
|
|
|
203
|
+ eventPublisher.publishEvent(new PersonnelEvent(this, personnelNonCadreMonthlyAssessment.getAssessmentMonth()));
|
|
200
|
204
|
return result;
|
|
201
|
205
|
}
|
|
202
|
206
|
|
|
|
@@ -258,7 +262,8 @@ public class PersonnelNonCadreMonthlyAssessmentServiceImpl extends ServiceImpl<P
|
|
258
|
262
|
* @param result 非干部月度考核
|
|
259
|
263
|
* @return 非干部月度考核
|
|
260
|
264
|
*/
|
|
261
|
|
- private void doImprove(PersonnelNonCadreMonthlyAssessment result) {
|
|
|
265
|
+ @Override
|
|
|
266
|
+ public void doImprove(PersonnelNonCadreMonthlyAssessment result) {
|
|
262
|
267
|
List<BasePerformanceIndicatorCategory> indicatorCategoryyList = basePerformanceIndicatorCategoryService.selectBasePerformanceIndicatorCategoryListTree(new BasePerformanceIndicatorCategory());
|
|
263
|
268
|
// 红线指标
|
|
264
|
269
|
BasePerformanceIndicatorCategory redLineIndexCategory = indicatorCategoryyList.stream().filter(item -> StrUtil.equals("红线指标", item.getName())).findFirst().orElse(null);
|
|
|
@@ -844,6 +849,18 @@ public class PersonnelNonCadreMonthlyAssessmentServiceImpl extends ServiceImpl<P
|
|
844
|
849
|
}
|
|
845
|
850
|
|
|
846
|
851
|
/**
|
|
|
852
|
+ * 修改非干部月度考核-仅更新主表数据
|
|
|
853
|
+ *
|
|
|
854
|
+ * @param personnelNonCadreMonthlyAssessment 非干部月度考核
|
|
|
855
|
+ * @return 结果
|
|
|
856
|
+ */
|
|
|
857
|
+ @Override
|
|
|
858
|
+ public int updatePersonnelNonCadreMonthlyAssessmentOnly(PersonnelNonCadreMonthlyAssessment personnelNonCadreMonthlyAssessment) {
|
|
|
859
|
+ personnelNonCadreMonthlyAssessment.setUpdateTime(DateUtils.getNowDate());
|
|
|
860
|
+ return personnelNonCadreMonthlyAssessmentMapper.updatePersonnelNonCadreMonthlyAssessment(personnelNonCadreMonthlyAssessment);
|
|
|
861
|
+ }
|
|
|
862
|
+
|
|
|
863
|
+ /**
|
|
847
|
864
|
* 自动生成指定月份非干部月度考核
|
|
848
|
865
|
*
|
|
849
|
866
|
* @param month 月份值
|