|
@@ -1,14 +1,24 @@
|
|
1
|
package com.sundot.airport.personnel.service.impl;
|
1
|
package com.sundot.airport.personnel.service.impl;
|
|
2
|
|
2
|
|
|
3
|
import java.util.List;
|
3
|
import java.util.List;
|
|
|
|
4
|
+import java.util.Map;
|
|
|
|
5
|
+import java.util.stream.Collectors;
|
|
4
|
|
6
|
|
|
|
|
7
|
+import cn.hutool.core.collection.CollUtil;
|
|
|
|
8
|
+import cn.hutool.core.util.ObjUtil;
|
|
|
|
9
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
5
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
10
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
6
|
import com.sundot.airport.common.utils.DateUtils;
|
11
|
import com.sundot.airport.common.utils.DateUtils;
|
|
|
|
12
|
+import com.sundot.airport.personnel.domain.PersonnelMonthlyAssessmentIndicatorDetail;
|
|
|
|
13
|
+import com.sundot.airport.personnel.domain.PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail;
|
|
|
|
14
|
+import com.sundot.airport.personnel.service.IPersonnelMonthlyAssessmentIndicatorDetailService;
|
|
|
|
15
|
+import com.sundot.airport.personnel.service.IPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailService;
|
|
7
|
import org.springframework.beans.factory.annotation.Autowired;
|
16
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
8
|
import org.springframework.stereotype.Service;
|
17
|
import org.springframework.stereotype.Service;
|
|
9
|
import com.sundot.airport.personnel.mapper.PersonnelNonCadreMonthlyAssessmentMapper;
|
18
|
import com.sundot.airport.personnel.mapper.PersonnelNonCadreMonthlyAssessmentMapper;
|
|
10
|
import com.sundot.airport.personnel.domain.PersonnelNonCadreMonthlyAssessment;
|
19
|
import com.sundot.airport.personnel.domain.PersonnelNonCadreMonthlyAssessment;
|
|
11
|
import com.sundot.airport.personnel.service.IPersonnelNonCadreMonthlyAssessmentService;
|
20
|
import com.sundot.airport.personnel.service.IPersonnelNonCadreMonthlyAssessmentService;
|
|
|
|
21
|
+import org.springframework.transaction.annotation.Transactional;
|
|
12
|
|
22
|
|
|
13
|
/**
|
23
|
/**
|
|
14
|
* 非干部月度考核Service业务层处理
|
24
|
* 非干部月度考核Service业务层处理
|
|
@@ -20,6 +30,10 @@ import com.sundot.airport.personnel.service.IPersonnelNonCadreMonthlyAssessmentS
|
|
20
|
public class PersonnelNonCadreMonthlyAssessmentServiceImpl extends ServiceImpl<PersonnelNonCadreMonthlyAssessmentMapper, PersonnelNonCadreMonthlyAssessment> implements IPersonnelNonCadreMonthlyAssessmentService {
|
30
|
public class PersonnelNonCadreMonthlyAssessmentServiceImpl extends ServiceImpl<PersonnelNonCadreMonthlyAssessmentMapper, PersonnelNonCadreMonthlyAssessment> implements IPersonnelNonCadreMonthlyAssessmentService {
|
|
21
|
@Autowired
|
31
|
@Autowired
|
|
22
|
private PersonnelNonCadreMonthlyAssessmentMapper personnelNonCadreMonthlyAssessmentMapper;
|
32
|
private PersonnelNonCadreMonthlyAssessmentMapper personnelNonCadreMonthlyAssessmentMapper;
|
|
|
|
33
|
+ @Autowired
|
|
|
|
34
|
+ private IPersonnelMonthlyAssessmentIndicatorDetailService personnelMonthlyAssessmentIndicatorDetailService;
|
|
|
|
35
|
+ @Autowired
|
|
|
|
36
|
+ private IPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailService personnelMonthlyAssessmentIndicatorRewardPunishmentDetailService;
|
|
23
|
|
37
|
|
|
24
|
/**
|
38
|
/**
|
|
25
|
* 查询非干部月度考核
|
39
|
* 查询非干部月度考核
|
|
@@ -29,7 +43,30 @@ public class PersonnelNonCadreMonthlyAssessmentServiceImpl extends ServiceImpl<P
|
|
29
|
*/
|
43
|
*/
|
|
30
|
@Override
|
44
|
@Override
|
|
31
|
public PersonnelNonCadreMonthlyAssessment selectPersonnelNonCadreMonthlyAssessmentById(Long id) {
|
45
|
public PersonnelNonCadreMonthlyAssessment selectPersonnelNonCadreMonthlyAssessmentById(Long id) {
|
|
32
|
- return personnelNonCadreMonthlyAssessmentMapper.selectPersonnelNonCadreMonthlyAssessmentById(id);
|
|
|
|
|
|
46
|
+ PersonnelNonCadreMonthlyAssessment result = personnelNonCadreMonthlyAssessmentMapper.selectPersonnelNonCadreMonthlyAssessmentById(id);
|
|
|
|
47
|
+ if (ObjUtil.isNull(result)) {
|
|
|
|
48
|
+ return result;
|
|
|
|
49
|
+ }
|
|
|
|
50
|
+ // 指标明细列表
|
|
|
|
51
|
+ LambdaQueryWrapper<PersonnelMonthlyAssessmentIndicatorDetail> detailQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
52
|
+ detailQueryWrapper.eq(PersonnelMonthlyAssessmentIndicatorDetail::getSourceId, result.getId());
|
|
|
|
53
|
+ List<PersonnelMonthlyAssessmentIndicatorDetail> personnelMonthlyAssessmentIndicatorDetailList = personnelMonthlyAssessmentIndicatorDetailService.getBaseMapper().selectList(detailQueryWrapper);
|
|
|
|
54
|
+ if (CollUtil.isEmpty(personnelMonthlyAssessmentIndicatorDetailList)) {
|
|
|
|
55
|
+ return result;
|
|
|
|
56
|
+ }
|
|
|
|
57
|
+ result.setPersonnelMonthlyAssessmentIndicatorDetailList(personnelMonthlyAssessmentIndicatorDetailList);
|
|
|
|
58
|
+ // 奖罚明细列表
|
|
|
|
59
|
+ LambdaQueryWrapper<PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail> rewardPunishmentDetailQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
60
|
+ rewardPunishmentDetailQueryWrapper.in(PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail::getSourceId, personnelMonthlyAssessmentIndicatorDetailList.stream().map(PersonnelMonthlyAssessmentIndicatorDetail::getId).toArray());
|
|
|
|
61
|
+ List<PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail> personnelMonthlyAssessmentIndicatorRewardPunishmentDetailList = personnelMonthlyAssessmentIndicatorRewardPunishmentDetailService.getBaseMapper().selectList(rewardPunishmentDetailQueryWrapper);
|
|
|
|
62
|
+ if (CollUtil.isEmpty(personnelMonthlyAssessmentIndicatorRewardPunishmentDetailList)) {
|
|
|
|
63
|
+ return result;
|
|
|
|
64
|
+ }
|
|
|
|
65
|
+ Map<Long, List<PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail>> rewardPunishmentDetailMap = personnelMonthlyAssessmentIndicatorRewardPunishmentDetailList.stream().collect(Collectors.groupingBy(PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail::getSourceId));
|
|
|
|
66
|
+ personnelMonthlyAssessmentIndicatorDetailList.forEach(item -> {
|
|
|
|
67
|
+ item.setPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailList(rewardPunishmentDetailMap.get(item.getId()));
|
|
|
|
68
|
+ });
|
|
|
|
69
|
+ return result;
|
|
33
|
}
|
70
|
}
|
|
34
|
|
71
|
|
|
35
|
/**
|
72
|
/**
|
|
@@ -49,10 +86,28 @@ public class PersonnelNonCadreMonthlyAssessmentServiceImpl extends ServiceImpl<P
|
|
49
|
* @param personnelNonCadreMonthlyAssessment 非干部月度考核
|
86
|
* @param personnelNonCadreMonthlyAssessment 非干部月度考核
|
|
50
|
* @return 结果
|
87
|
* @return 结果
|
|
51
|
*/
|
88
|
*/
|
|
|
|
89
|
+ @Transactional(rollbackFor = Exception.class)
|
|
52
|
@Override
|
90
|
@Override
|
|
53
|
public int insertPersonnelNonCadreMonthlyAssessment(PersonnelNonCadreMonthlyAssessment personnelNonCadreMonthlyAssessment) {
|
91
|
public int insertPersonnelNonCadreMonthlyAssessment(PersonnelNonCadreMonthlyAssessment personnelNonCadreMonthlyAssessment) {
|
|
54
|
personnelNonCadreMonthlyAssessment.setCreateTime(DateUtils.getNowDate());
|
92
|
personnelNonCadreMonthlyAssessment.setCreateTime(DateUtils.getNowDate());
|
|
55
|
- return personnelNonCadreMonthlyAssessmentMapper.insertPersonnelNonCadreMonthlyAssessment(personnelNonCadreMonthlyAssessment);
|
|
|
|
|
|
93
|
+ int result = personnelNonCadreMonthlyAssessmentMapper.insertPersonnelNonCadreMonthlyAssessment(personnelNonCadreMonthlyAssessment);
|
|
|
|
94
|
+ if (CollUtil.isNotEmpty(personnelNonCadreMonthlyAssessment.getPersonnelMonthlyAssessmentIndicatorDetailList())) {
|
|
|
|
95
|
+ personnelNonCadreMonthlyAssessment.getPersonnelMonthlyAssessmentIndicatorDetailList().forEach(personnelMonthlyAssessmentIndicatorDetail -> {
|
|
|
|
96
|
+ personnelMonthlyAssessmentIndicatorDetail.setSourceId(personnelNonCadreMonthlyAssessment.getId());
|
|
|
|
97
|
+ personnelMonthlyAssessmentIndicatorDetail.setCreateBy(personnelNonCadreMonthlyAssessment.getCreateBy());
|
|
|
|
98
|
+ personnelMonthlyAssessmentIndicatorDetail.setCreateTime(DateUtils.getNowDate());
|
|
|
|
99
|
+ personnelMonthlyAssessmentIndicatorDetailService.insertPersonnelMonthlyAssessmentIndicatorDetail(personnelMonthlyAssessmentIndicatorDetail);
|
|
|
|
100
|
+ if (CollUtil.isNotEmpty(personnelMonthlyAssessmentIndicatorDetail.getPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailList())) {
|
|
|
|
101
|
+ personnelMonthlyAssessmentIndicatorDetail.getPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailList().forEach(personnelMonthlyAssessmentIndicatorRewardPunishmentDetail -> {
|
|
|
|
102
|
+ personnelMonthlyAssessmentIndicatorRewardPunishmentDetail.setSourceId(personnelMonthlyAssessmentIndicatorDetail.getId());
|
|
|
|
103
|
+ personnelMonthlyAssessmentIndicatorRewardPunishmentDetail.setCreateBy(personnelMonthlyAssessmentIndicatorDetail.getCreateBy());
|
|
|
|
104
|
+ personnelMonthlyAssessmentIndicatorRewardPunishmentDetail.setCreateTime(DateUtils.getNowDate());
|
|
|
|
105
|
+ personnelMonthlyAssessmentIndicatorRewardPunishmentDetailService.insertPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail(personnelMonthlyAssessmentIndicatorRewardPunishmentDetail);
|
|
|
|
106
|
+ });
|
|
|
|
107
|
+ }
|
|
|
|
108
|
+ });
|
|
|
|
109
|
+ }
|
|
|
|
110
|
+ return result;
|
|
56
|
}
|
111
|
}
|
|
57
|
|
112
|
|
|
58
|
/**
|
113
|
/**
|
|
@@ -61,10 +116,46 @@ public class PersonnelNonCadreMonthlyAssessmentServiceImpl extends ServiceImpl<P
|
|
61
|
* @param personnelNonCadreMonthlyAssessment 非干部月度考核
|
116
|
* @param personnelNonCadreMonthlyAssessment 非干部月度考核
|
|
62
|
* @return 结果
|
117
|
* @return 结果
|
|
63
|
*/
|
118
|
*/
|
|
|
|
119
|
+ @Transactional(rollbackFor = Exception.class)
|
|
64
|
@Override
|
120
|
@Override
|
|
65
|
public int updatePersonnelNonCadreMonthlyAssessment(PersonnelNonCadreMonthlyAssessment personnelNonCadreMonthlyAssessment) {
|
121
|
public int updatePersonnelNonCadreMonthlyAssessment(PersonnelNonCadreMonthlyAssessment personnelNonCadreMonthlyAssessment) {
|
|
66
|
personnelNonCadreMonthlyAssessment.setUpdateTime(DateUtils.getNowDate());
|
122
|
personnelNonCadreMonthlyAssessment.setUpdateTime(DateUtils.getNowDate());
|
|
67
|
- return personnelNonCadreMonthlyAssessmentMapper.updatePersonnelNonCadreMonthlyAssessment(personnelNonCadreMonthlyAssessment);
|
|
|
|
|
|
123
|
+ int result = personnelNonCadreMonthlyAssessmentMapper.updatePersonnelNonCadreMonthlyAssessment(personnelNonCadreMonthlyAssessment);
|
|
|
|
124
|
+ // 删除旧数据
|
|
|
|
125
|
+ LambdaQueryWrapper<PersonnelMonthlyAssessmentIndicatorDetail> detailQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
126
|
+ detailQueryWrapper.eq(PersonnelMonthlyAssessmentIndicatorDetail::getSourceId, personnelNonCadreMonthlyAssessment.getId());
|
|
|
|
127
|
+ List<PersonnelMonthlyAssessmentIndicatorDetail> personnelMonthlyAssessmentIndicatorDetailListOld = personnelMonthlyAssessmentIndicatorDetailService.getBaseMapper().selectList(detailQueryWrapper);
|
|
|
|
128
|
+ if (CollUtil.isNotEmpty(personnelMonthlyAssessmentIndicatorDetailListOld)) {
|
|
|
|
129
|
+ personnelMonthlyAssessmentIndicatorDetailService.removeBatchByIds(personnelMonthlyAssessmentIndicatorDetailListOld);
|
|
|
|
130
|
+ LambdaQueryWrapper<PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail> rewardPunishmentDetailQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
131
|
+ rewardPunishmentDetailQueryWrapper.in(PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail::getSourceId, personnelMonthlyAssessmentIndicatorDetailListOld.stream().map(PersonnelMonthlyAssessmentIndicatorDetail::getId).toArray());
|
|
|
|
132
|
+ List<PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail> personnelMonthlyAssessmentIndicatorRewardPunishmentDetailListOld = personnelMonthlyAssessmentIndicatorRewardPunishmentDetailService.getBaseMapper().selectList(rewardPunishmentDetailQueryWrapper);
|
|
|
|
133
|
+ if (CollUtil.isNotEmpty(personnelMonthlyAssessmentIndicatorRewardPunishmentDetailListOld)) {
|
|
|
|
134
|
+ personnelMonthlyAssessmentIndicatorRewardPunishmentDetailService.removeBatchByIds(personnelMonthlyAssessmentIndicatorRewardPunishmentDetailListOld);
|
|
|
|
135
|
+ }
|
|
|
|
136
|
+ }
|
|
|
|
137
|
+ // 新增新数据
|
|
|
|
138
|
+ if (CollUtil.isNotEmpty(personnelNonCadreMonthlyAssessment.getPersonnelMonthlyAssessmentIndicatorDetailList())) {
|
|
|
|
139
|
+ personnelNonCadreMonthlyAssessment.getPersonnelMonthlyAssessmentIndicatorDetailList().forEach(personnelMonthlyAssessmentIndicatorDetail -> {
|
|
|
|
140
|
+ personnelMonthlyAssessmentIndicatorDetail.setSourceId(personnelNonCadreMonthlyAssessment.getId());
|
|
|
|
141
|
+ personnelMonthlyAssessmentIndicatorDetail.setCreateBy(personnelNonCadreMonthlyAssessment.getCreateBy());
|
|
|
|
142
|
+ personnelMonthlyAssessmentIndicatorDetail.setCreateTime(DateUtils.getNowDate());
|
|
|
|
143
|
+ personnelMonthlyAssessmentIndicatorDetail.setUpdateBy(personnelNonCadreMonthlyAssessment.getCreateBy());
|
|
|
|
144
|
+ personnelMonthlyAssessmentIndicatorDetail.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
145
|
+ personnelMonthlyAssessmentIndicatorDetailService.insertPersonnelMonthlyAssessmentIndicatorDetail(personnelMonthlyAssessmentIndicatorDetail);
|
|
|
|
146
|
+ if (CollUtil.isNotEmpty(personnelMonthlyAssessmentIndicatorDetail.getPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailList())) {
|
|
|
|
147
|
+ personnelMonthlyAssessmentIndicatorDetail.getPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetailList().forEach(personnelMonthlyAssessmentIndicatorRewardPunishmentDetail -> {
|
|
|
|
148
|
+ personnelMonthlyAssessmentIndicatorRewardPunishmentDetail.setSourceId(personnelMonthlyAssessmentIndicatorDetail.getId());
|
|
|
|
149
|
+ personnelMonthlyAssessmentIndicatorRewardPunishmentDetail.setCreateBy(personnelMonthlyAssessmentIndicatorDetail.getCreateBy());
|
|
|
|
150
|
+ personnelMonthlyAssessmentIndicatorRewardPunishmentDetail.setCreateTime(DateUtils.getNowDate());
|
|
|
|
151
|
+ personnelMonthlyAssessmentIndicatorRewardPunishmentDetail.setUpdateBy(personnelMonthlyAssessmentIndicatorDetail.getCreateBy());
|
|
|
|
152
|
+ personnelMonthlyAssessmentIndicatorRewardPunishmentDetail.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
153
|
+ personnelMonthlyAssessmentIndicatorRewardPunishmentDetailService.insertPersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail(personnelMonthlyAssessmentIndicatorRewardPunishmentDetail);
|
|
|
|
154
|
+ });
|
|
|
|
155
|
+ }
|
|
|
|
156
|
+ });
|
|
|
|
157
|
+ }
|
|
|
|
158
|
+ return result;
|
|
68
|
}
|
159
|
}
|
|
69
|
|
160
|
|
|
70
|
/**
|
161
|
/**
|
|
@@ -73,9 +164,25 @@ public class PersonnelNonCadreMonthlyAssessmentServiceImpl extends ServiceImpl<P
|
|
73
|
* @param ids 需要删除的非干部月度考核主键
|
164
|
* @param ids 需要删除的非干部月度考核主键
|
|
74
|
* @return 结果
|
165
|
* @return 结果
|
|
75
|
*/
|
166
|
*/
|
|
|
|
167
|
+ @Transactional(rollbackFor = Exception.class)
|
|
76
|
@Override
|
168
|
@Override
|
|
77
|
public int deletePersonnelNonCadreMonthlyAssessmentByIds(Long[] ids) {
|
169
|
public int deletePersonnelNonCadreMonthlyAssessmentByIds(Long[] ids) {
|
|
78
|
- return personnelNonCadreMonthlyAssessmentMapper.deletePersonnelNonCadreMonthlyAssessmentByIds(ids);
|
|
|
|
|
|
170
|
+ int result = personnelNonCadreMonthlyAssessmentMapper.deletePersonnelNonCadreMonthlyAssessmentByIds(ids);
|
|
|
|
171
|
+ for (Long id : ids) {
|
|
|
|
172
|
+ LambdaQueryWrapper<PersonnelMonthlyAssessmentIndicatorDetail> detailQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
173
|
+ detailQueryWrapper.eq(PersonnelMonthlyAssessmentIndicatorDetail::getSourceId, id);
|
|
|
|
174
|
+ List<PersonnelMonthlyAssessmentIndicatorDetail> personnelMonthlyAssessmentIndicatorDetailListOld = personnelMonthlyAssessmentIndicatorDetailService.getBaseMapper().selectList(detailQueryWrapper);
|
|
|
|
175
|
+ if (CollUtil.isNotEmpty(personnelMonthlyAssessmentIndicatorDetailListOld)) {
|
|
|
|
176
|
+ personnelMonthlyAssessmentIndicatorDetailService.removeBatchByIds(personnelMonthlyAssessmentIndicatorDetailListOld);
|
|
|
|
177
|
+ LambdaQueryWrapper<PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail> rewardPunishmentDetailQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
178
|
+ rewardPunishmentDetailQueryWrapper.in(PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail::getSourceId, personnelMonthlyAssessmentIndicatorDetailListOld.stream().map(PersonnelMonthlyAssessmentIndicatorDetail::getId).toArray());
|
|
|
|
179
|
+ List<PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail> personnelMonthlyAssessmentIndicatorRewardPunishmentDetailListOld = personnelMonthlyAssessmentIndicatorRewardPunishmentDetailService.getBaseMapper().selectList(rewardPunishmentDetailQueryWrapper);
|
|
|
|
180
|
+ if (CollUtil.isNotEmpty(personnelMonthlyAssessmentIndicatorRewardPunishmentDetailListOld)) {
|
|
|
|
181
|
+ personnelMonthlyAssessmentIndicatorRewardPunishmentDetailService.removeBatchByIds(personnelMonthlyAssessmentIndicatorRewardPunishmentDetailListOld);
|
|
|
|
182
|
+ }
|
|
|
|
183
|
+ }
|
|
|
|
184
|
+ }
|
|
|
|
185
|
+ return result;
|
|
79
|
}
|
186
|
}
|
|
80
|
|
187
|
|
|
81
|
/**
|
188
|
/**
|
|
@@ -84,8 +191,22 @@ public class PersonnelNonCadreMonthlyAssessmentServiceImpl extends ServiceImpl<P
|
|
84
|
* @param id 非干部月度考核主键
|
191
|
* @param id 非干部月度考核主键
|
|
85
|
* @return 结果
|
192
|
* @return 结果
|
|
86
|
*/
|
193
|
*/
|
|
|
|
194
|
+ @Transactional(rollbackFor = Exception.class)
|
|
87
|
@Override
|
195
|
@Override
|
|
88
|
public int deletePersonnelNonCadreMonthlyAssessmentById(Long id) {
|
196
|
public int deletePersonnelNonCadreMonthlyAssessmentById(Long id) {
|
|
89
|
- return personnelNonCadreMonthlyAssessmentMapper.deletePersonnelNonCadreMonthlyAssessmentById(id);
|
|
|
|
|
|
197
|
+ int result = personnelNonCadreMonthlyAssessmentMapper.deletePersonnelNonCadreMonthlyAssessmentById(id);
|
|
|
|
198
|
+ LambdaQueryWrapper<PersonnelMonthlyAssessmentIndicatorDetail> detailQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
199
|
+ detailQueryWrapper.eq(PersonnelMonthlyAssessmentIndicatorDetail::getSourceId, id);
|
|
|
|
200
|
+ List<PersonnelMonthlyAssessmentIndicatorDetail> personnelMonthlyAssessmentIndicatorDetailListOld = personnelMonthlyAssessmentIndicatorDetailService.getBaseMapper().selectList(detailQueryWrapper);
|
|
|
|
201
|
+ if (CollUtil.isNotEmpty(personnelMonthlyAssessmentIndicatorDetailListOld)) {
|
|
|
|
202
|
+ personnelMonthlyAssessmentIndicatorDetailService.removeBatchByIds(personnelMonthlyAssessmentIndicatorDetailListOld);
|
|
|
|
203
|
+ LambdaQueryWrapper<PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail> rewardPunishmentDetailQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
204
|
+ rewardPunishmentDetailQueryWrapper.in(PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail::getSourceId, personnelMonthlyAssessmentIndicatorDetailListOld.stream().map(PersonnelMonthlyAssessmentIndicatorDetail::getId).toArray());
|
|
|
|
205
|
+ List<PersonnelMonthlyAssessmentIndicatorRewardPunishmentDetail> personnelMonthlyAssessmentIndicatorRewardPunishmentDetailListOld = personnelMonthlyAssessmentIndicatorRewardPunishmentDetailService.getBaseMapper().selectList(rewardPunishmentDetailQueryWrapper);
|
|
|
|
206
|
+ if (CollUtil.isNotEmpty(personnelMonthlyAssessmentIndicatorRewardPunishmentDetailListOld)) {
|
|
|
|
207
|
+ personnelMonthlyAssessmentIndicatorRewardPunishmentDetailService.removeBatchByIds(personnelMonthlyAssessmentIndicatorRewardPunishmentDetailListOld);
|
|
|
|
208
|
+ }
|
|
|
|
209
|
+ }
|
|
|
|
210
|
+ return result;
|
|
90
|
}
|
211
|
}
|
|
91
|
}
|
212
|
}
|