|
@@ -1,6 +1,5 @@
|
|
1
|
package com.sundot.airport.ledger.service.impl;
|
1
|
package com.sundot.airport.ledger.service.impl;
|
|
2
|
|
2
|
|
|
3
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
4
|
import com.sundot.airport.common.core.domain.entity.SysDept;
|
3
|
import com.sundot.airport.common.core.domain.entity.SysDept;
|
|
5
|
import com.sundot.airport.common.core.domain.entity.SysUser;
|
4
|
import com.sundot.airport.common.core.domain.entity.SysUser;
|
|
6
|
import com.sundot.airport.ledger.domain.LedgerBannerLetter;
|
5
|
import com.sundot.airport.ledger.domain.LedgerBannerLetter;
|
|
@@ -207,13 +206,15 @@ public class EmployeePortraitServiceImpl implements IEmployeePortraitService {
|
|
207
|
// ── 考试成绩 ──────────────────────────────────────────────────────────────
|
206
|
// ── 考试成绩 ──────────────────────────────────────────────────────────────
|
|
208
|
|
207
|
|
|
209
|
private void fillExamScore(EmployeePortraitVO vo, String personName) {
|
208
|
private void fillExamScore(EmployeePortraitVO vo, String personName) {
|
|
210
|
- QueryWrapper<LedgerExamScore> qw = new QueryWrapper<>();
|
|
|
|
211
|
- qw.like("person_name", personName)
|
|
|
|
212
|
- .eq("del_flag", "0")
|
|
|
|
213
|
- .orderByDesc("exam_date")
|
|
|
|
214
|
- .last("LIMIT 1");
|
|
|
|
215
|
- List<LedgerExamScore> list = ledgerExamScoreMapper.selectList(qw);
|
|
|
|
|
|
209
|
+ LedgerExamScore q = new LedgerExamScore();
|
|
|
|
210
|
+ q.setPersonName(personName);
|
|
|
|
211
|
+ List<LedgerExamScore> list = ledgerExamScoreMapper.selectList(q);
|
|
216
|
if (list == null || list.isEmpty()) return;
|
212
|
if (list == null || list.isEmpty()) return;
|
|
|
|
213
|
+ list.sort((a, b) -> {
|
|
|
|
214
|
+ if (a.getExamDate() == null) return 1;
|
|
|
|
215
|
+ if (b.getExamDate() == null) return -1;
|
|
|
|
216
|
+ return b.getExamDate().compareTo(a.getExamDate());
|
|
|
|
217
|
+ });
|
|
217
|
LedgerExamScore exam = list.get(0);
|
218
|
LedgerExamScore exam = list.get(0);
|
|
218
|
vo.setTheoryScore(exam.getTheoryScore());
|
219
|
vo.setTheoryScore(exam.getTheoryScore());
|
|
219
|
vo.setImageScore(exam.getImageScore());
|
220
|
vo.setImageScore(exam.getImageScore());
|
|
@@ -228,8 +229,8 @@ public class EmployeePortraitServiceImpl implements IEmployeePortraitService {
|
|
228
|
List<EmployeePortraitVO.AwardRecord> awards = new ArrayList<>();
|
229
|
List<EmployeePortraitVO.AwardRecord> awards = new ArrayList<>();
|
|
229
|
|
230
|
|
|
230
|
// 锦旗及感谢信
|
231
|
// 锦旗及感谢信
|
|
231
|
- QueryWrapper<LedgerBannerLetter> bq = new QueryWrapper<>();
|
|
|
|
232
|
- bq.like("person_name", personName).eq("del_flag", "0").orderByDesc("record_date");
|
|
|
|
|
|
232
|
+ LedgerBannerLetter bq = new LedgerBannerLetter();
|
|
|
|
233
|
+ bq.setPersonName(personName);
|
|
233
|
for (LedgerBannerLetter b : ledgerBannerLetterMapper.selectList(bq)) {
|
234
|
for (LedgerBannerLetter b : ledgerBannerLetterMapper.selectList(bq)) {
|
|
234
|
EmployeePortraitVO.AwardRecord ar = new EmployeePortraitVO.AwardRecord();
|
235
|
EmployeePortraitVO.AwardRecord ar = new EmployeePortraitVO.AwardRecord();
|
|
235
|
ar.setType("1".equals(b.getType()) ? "锦旗" : "感谢信");
|
236
|
ar.setType("1".equals(b.getType()) ? "锦旗" : "感谢信");
|
|
@@ -240,8 +241,8 @@ public class EmployeePortraitServiceImpl implements IEmployeePortraitService {
|
|
240
|
}
|
241
|
}
|
|
241
|
|
242
|
|
|
242
|
// 航站楼加分
|
243
|
// 航站楼加分
|
|
243
|
- QueryWrapper<LedgerTerminalBonus> tq = new QueryWrapper<>();
|
|
|
|
244
|
- tq.like("person_name", personName).eq("del_flag", "0").orderByDesc("approve_date");
|
|
|
|
|
|
244
|
+ LedgerTerminalBonus tq = new LedgerTerminalBonus();
|
|
|
|
245
|
+ tq.setPersonName(personName);
|
|
245
|
for (LedgerTerminalBonus t : ledgerTerminalBonusMapper.selectList(tq)) {
|
246
|
for (LedgerTerminalBonus t : ledgerTerminalBonusMapper.selectList(tq)) {
|
|
246
|
EmployeePortraitVO.AwardRecord ar = new EmployeePortraitVO.AwardRecord();
|
247
|
EmployeePortraitVO.AwardRecord ar = new EmployeePortraitVO.AwardRecord();
|
|
247
|
ar.setType("航站楼加分");
|
248
|
ar.setType("航站楼加分");
|