Bladeren bron

职业资格等级获取时间表开发

wangxx 6 dagen geleden
bovenliggende
commit
cc6c7af934

+ 25 - 0
airport-admin/src/main/java/com/sundot/airport/web/controller/ledger/LedgerImportController.java

@@ -16,6 +16,7 @@ import com.sundot.airport.ledger.domain.LedgerLeaderDuty;
16 16
 import com.sundot.airport.ledger.domain.LedgerHealthSoldier;
17 17
 import com.sundot.airport.ledger.domain.LedgerDormFireSafety;
18 18
 import com.sundot.airport.ledger.domain.LedgerTrainingIssue;
19
+import com.sundot.airport.ledger.domain.LedgerQualificationLevel;
19 20
 import org.springframework.beans.factory.annotation.Autowired;
20 21
 import org.springframework.security.access.prepost.PreAuthorize;
21 22
 import org.springframework.web.bind.annotation.*;
@@ -55,6 +56,7 @@ public class LedgerImportController extends BaseController {
55 56
     @Autowired private ILedgerRewardPenaltyService rewardPenaltyService;
56 57
     @Autowired private ILedgerLeaveSpecialService leaveSpecialService;
57 58
     @Autowired private ILedgerBannerLetterService bannerLetterService;
59
+    @Autowired private ILedgerQualificationLevelService qualificationLevelService;
58 60
 
59 61
 
60 62
     private String generateBatchNo() {
@@ -513,6 +515,29 @@ public class LedgerImportController extends BaseController {
513 515
         return AjaxResult.success("导入成功,共" + list.size() + "条");
514 516
     }
515 517
 
518
+    /**
519
+     * 职业资格等级获取时间表导入
520
+     * LedgerQualificationLevel
521
+     */
522
+    @PreAuthorize("@ss.hasPermi('ledger:import:qualificationLevel')")
523
+    @Log(title = "台账导入-职业资格等级获取时间", businessType = BusinessType.IMPORT)
524
+    @PostMapping("/qualificationLevel")
525
+    public AjaxResult importQualificationLevel(@RequestParam("file") MultipartFile file) throws Exception {
526
+        String batchNo = generateBatchNo();
527
+        ExcelUtil<LedgerQualificationLevel> util = new ExcelUtil<>(LedgerQualificationLevel.class);
528
+        List<LedgerQualificationLevel> list = util.importExcel(file.getInputStream(), 1);
529
+        // 过滤null元素,避免空指针异常
530
+        if (list != null) {
531
+            list.removeIf(item -> item == null);
532
+        }
533
+        if (list == null || list.isEmpty()) {
534
+            return AjaxResult.error("导入数据为空或解析失败,请检查Excel表头是否与模板一致");
535
+        }
536
+        list.forEach(item -> { item.setImportBatch(batchNo); item.setSourceType("1"); item.setCreateBy(getUsername()); });
537
+        qualificationLevelService.batchInsert(list);
538
+        return AjaxResult.success("导入成功,共" + list.size() + "条");
539
+    }
540
+
516 541
 
517 542
     /**
518 543
      * 一键全量导入 - 解析多Sheet合并Excel(旅检三部"三三"数字管理平台.xlsx)

+ 80 - 0
airport-admin/src/main/java/com/sundot/airport/web/controller/ledger/LedgerQualificationLevelController.java

@@ -0,0 +1,80 @@
1
+package com.sundot.airport.web.controller.ledger;
2
+
3
+import java.util.List;
4
+import javax.servlet.http.HttpServletResponse;
5
+
6
+import com.sundot.airport.common.annotation.Log;
7
+import com.sundot.airport.common.core.controller.BaseController;
8
+import com.sundot.airport.common.core.domain.AjaxResult;
9
+import com.sundot.airport.common.core.page.TableDataInfo;
10
+import com.sundot.airport.common.enums.BusinessType;
11
+import com.sundot.airport.common.utils.DateUtils;
12
+import com.sundot.airport.common.utils.poi.ExcelUtil;
13
+import com.sundot.airport.ledger.domain.LedgerQualificationLevel;
14
+import com.sundot.airport.ledger.service.ILedgerQualificationLevelService;
15
+import org.springframework.beans.factory.annotation.Autowired;
16
+import org.springframework.security.access.prepost.PreAuthorize;
17
+import org.springframework.validation.annotation.Validated;
18
+import org.springframework.web.bind.annotation.*;
19
+
20
+/**
21
+ * 职业资格等级获取时间Controller
22
+ */
23
+@RestController
24
+@RequestMapping("/ledger/qualificationLevel")
25
+public class LedgerQualificationLevelController extends BaseController {
26
+
27
+    @Autowired
28
+    private ILedgerQualificationLevelService service;
29
+
30
+    @PreAuthorize("@ss.hasPermi('ledger:qualificationLevel:list')")
31
+    @GetMapping("/list")
32
+    public TableDataInfo list(LedgerQualificationLevel query) {
33
+        startPage();
34
+        List<LedgerQualificationLevel> list = service.selectList(query);
35
+        return getDataTable(list);
36
+    }
37
+
38
+    @PreAuthorize("@ss.hasPermi('ledger:qualificationLevel:export')")
39
+    @Log(title = "职业资格等级获取时间", businessType = BusinessType.EXPORT)
40
+    @PostMapping("/export")
41
+    public void export(HttpServletResponse response, LedgerQualificationLevel query) {
42
+        List<LedgerQualificationLevel> list = service.selectList(query);
43
+        ExcelUtil<LedgerQualificationLevel> util = new ExcelUtil<>(LedgerQualificationLevel.class);
44
+        util.exportExcel(response, list, "职业资格等级获取时间");
45
+    }
46
+
47
+    @PreAuthorize("@ss.hasPermi('ledger:qualificationLevel:query')")
48
+    @GetMapping("/{id}")
49
+    public AjaxResult getInfo(@PathVariable Long id) {
50
+        return AjaxResult.success(service.getById(id));
51
+    }
52
+
53
+    @PreAuthorize("@ss.hasPermi('ledger:qualificationLevel:add')")
54
+    @Log(title = "职业资格等级获取时间", businessType = BusinessType.INSERT)
55
+    @PostMapping
56
+    public AjaxResult add(@Validated @RequestBody LedgerQualificationLevel entity) {
57
+        entity.setCreateBy(getUsername());
58
+        entity.setCreateTime(DateUtils.getNowDate());
59
+        return toAjax(service.save(entity));
60
+    }
61
+
62
+    @PreAuthorize("@ss.hasPermi('ledger:qualificationLevel:edit')")
63
+    @Log(title = "职业资格等级获取时间", businessType = BusinessType.UPDATE)
64
+    @PutMapping
65
+    public AjaxResult edit(@Validated @RequestBody LedgerQualificationLevel entity) {
66
+        entity.setUpdateBy(getUsername());
67
+        entity.setUpdateTime(DateUtils.getNowDate());
68
+        return toAjax(service.updateById(entity));
69
+    }
70
+
71
+    @PreAuthorize("@ss.hasPermi('ledger:qualificationLevel:remove')")
72
+    @Log(title = "职业资格等级获取时间", businessType = BusinessType.DELETE)
73
+    @DeleteMapping("/{ids}")
74
+    public AjaxResult remove(@PathVariable Long[] ids) {
75
+        for (Long id : ids) {
76
+            service.removeById(id);
77
+        }
78
+        return AjaxResult.success();
79
+    }
80
+}

+ 126 - 0
airport-ledger/src/main/java/com/sundot/airport/ledger/domain/LedgerQualificationLevel.java

@@ -0,0 +1,126 @@
1
+package com.sundot.airport.ledger.domain;
2
+
3
+import java.util.Date;
4
+
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import com.baomidou.mybatisplus.annotation.TableId;
7
+import com.baomidou.mybatisplus.annotation.TableName;
8
+import com.fasterxml.jackson.annotation.JsonFormat;
9
+import com.sundot.airport.common.annotation.Excel;
10
+import com.sundot.airport.common.core.domain.BaseEntity;
11
+
12
+/**
13
+ * 职业资格等级获取时间对象 ledger_qualification_level
14
+ */
15
+@TableName("ledger_qualification_level")
16
+public class LedgerQualificationLevel extends BaseEntity {
17
+    private static final long serialVersionUID = 1L;
18
+
19
+    @TableId(type = IdType.AUTO)
20
+    private Long id;
21
+
22
+    private Long userId;
23
+
24
+    private Long deptId;
25
+
26
+    private Long teamId;
27
+
28
+    private Long groupId;
29
+
30
+    @Excel(name = "姓名")
31
+    private String personName;
32
+
33
+    @Excel(name = "部门名称")
34
+    private String deptName;
35
+
36
+    @Excel(name = "队室/班组")
37
+    private String teamName;
38
+
39
+    @Excel(name = "小组名称")
40
+    private String groupName;
41
+
42
+    @JsonFormat(pattern = "yyyy-MM-dd")
43
+    @Excel(name = "一级发证时间", width = 20, dateFormat = "yyyy-MM-dd")
44
+    private Date levelOneTime;
45
+
46
+    @JsonFormat(pattern = "yyyy-MM-dd")
47
+    @Excel(name = "二级发证时间", width = 20, dateFormat = "yyyy-MM-dd")
48
+    private Date levelTwoTime;
49
+
50
+    @JsonFormat(pattern = "yyyy-MM-dd")
51
+    @Excel(name = "三级发证时间", width = 20, dateFormat = "yyyy-MM-dd")
52
+    private Date levelThreeTime;
53
+
54
+    @JsonFormat(pattern = "yyyy-MM-dd")
55
+    @Excel(name = "四级发证时间", width = 20, dateFormat = "yyyy-MM-dd")
56
+    private Date levelFourTime;
57
+
58
+    @JsonFormat(pattern = "yyyy-MM-dd")
59
+    @Excel(name = "五级发证时间", width = 20, dateFormat = "yyyy-MM-dd")
60
+    private Date levelFiveTime;
61
+
62
+    @Excel(name = "备注")
63
+    private String remark;
64
+
65
+    private String importBatch;
66
+
67
+    @Excel(name = "数据来源")
68
+    private String sourceType;
69
+
70
+    @Excel(name = "同步标志(0=未同步;1=已同步)")
71
+    private String syncFlag;
72
+
73
+    public Long getId() { return id; }
74
+    public void setId(Long id) { this.id = id; }
75
+
76
+    public Long getUserId() { return userId; }
77
+    public void setUserId(Long userId) { this.userId = userId; }
78
+
79
+    public Long getDeptId() { return deptId; }
80
+    public void setDeptId(Long deptId) { this.deptId = deptId; }
81
+
82
+    public Long getTeamId() { return teamId; }
83
+    public void setTeamId(Long teamId) { this.teamId = teamId; }
84
+
85
+    public Long getGroupId() { return groupId; }
86
+    public void setGroupId(Long groupId) { this.groupId = groupId; }
87
+
88
+    public String getPersonName() { return personName; }
89
+    public void setPersonName(String personName) { this.personName = personName; }
90
+
91
+    public String getDeptName() { return deptName; }
92
+    public void setDeptName(String deptName) { this.deptName = deptName; }
93
+
94
+    public String getTeamName() { return teamName; }
95
+    public void setTeamName(String teamName) { this.teamName = teamName; }
96
+
97
+    public String getGroupName() { return groupName; }
98
+    public void setGroupName(String groupName) { this.groupName = groupName; }
99
+
100
+    public Date getLevelOneTime() { return levelOneTime; }
101
+    public void setLevelOneTime(Date levelOneTime) { this.levelOneTime = levelOneTime; }
102
+
103
+    public Date getLevelTwoTime() { return levelTwoTime; }
104
+    public void setLevelTwoTime(Date levelTwoTime) { this.levelTwoTime = levelTwoTime; }
105
+
106
+    public Date getLevelThreeTime() { return levelThreeTime; }
107
+    public void setLevelThreeTime(Date levelThreeTime) { this.levelThreeTime = levelThreeTime; }
108
+
109
+    public Date getLevelFourTime() { return levelFourTime; }
110
+    public void setLevelFourTime(Date levelFourTime) { this.levelFourTime = levelFourTime; }
111
+
112
+    public Date getLevelFiveTime() { return levelFiveTime; }
113
+    public void setLevelFiveTime(Date levelFiveTime) { this.levelFiveTime = levelFiveTime; }
114
+
115
+    public String getRemark() { return remark; }
116
+    public void setRemark(String remark) { this.remark = remark; }
117
+
118
+    public String getImportBatch() { return importBatch; }
119
+    public void setImportBatch(String importBatch) { this.importBatch = importBatch; }
120
+
121
+    public String getSourceType() { return sourceType; }
122
+    public void setSourceType(String sourceType) { this.sourceType = sourceType; }
123
+
124
+    public String getSyncFlag() { return syncFlag; }
125
+    public void setSyncFlag(String syncFlag) { this.syncFlag = syncFlag; }
126
+}

+ 15 - 0
airport-ledger/src/main/java/com/sundot/airport/ledger/mapper/LedgerQualificationLevelMapper.java

@@ -0,0 +1,15 @@
1
+package com.sundot.airport.ledger.mapper;
2
+
3
+import java.util.List;
4
+
5
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
6
+import com.sundot.airport.ledger.domain.LedgerQualificationLevel;
7
+
8
+/**
9
+ * 职业资格等级获取时间Mapper接口
10
+ */
11
+public interface LedgerQualificationLevelMapper extends BaseMapper<LedgerQualificationLevel> {
12
+    List<LedgerQualificationLevel> selectList(LedgerQualificationLevel query);
13
+
14
+    int updateSyncFlag();
15
+}

+ 11 - 0
airport-ledger/src/main/java/com/sundot/airport/ledger/service/ILedgerQualificationLevelService.java

@@ -0,0 +1,11 @@
1
+package com.sundot.airport.ledger.service;
2
+
3
+import java.util.List;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+import com.sundot.airport.ledger.domain.LedgerQualificationLevel;
6
+
7
+public interface ILedgerQualificationLevelService extends IService<LedgerQualificationLevel> {
8
+    List<LedgerQualificationLevel> selectList(LedgerQualificationLevel query);
9
+
10
+    int batchInsert(List<LedgerQualificationLevel> list);
11
+}

+ 45 - 1
airport-ledger/src/main/java/com/sundot/airport/ledger/service/impl/LedgerCombinedImportServiceImpl.java

@@ -60,6 +60,7 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
60 60
     @Autowired private ILedgerRewardPenaltyService rewardPenaltyService;
61 61
     @Autowired private ILedgerLeaveSpecialService leaveSpecialService;
62 62
     @Autowired private ILedgerBannerLetterService bannerLetterService;
63
+    @Autowired private ILedgerQualificationLevelService qualificationLevelService;
63 64
     @Autowired private ILedgerDailyTrainingService dailyTrainingService;
64 65
     @Autowired private ILedgerLeaderDutyService leaderDutyService;
65 66
     @Autowired private ILedgerHealthSoldierService healthSoldierService;
@@ -93,6 +94,7 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
93 94
 //        SHEET_ROUTE.put("部门奖惩记录表",            "rewardPenalty");
94 95
         SHEET_ROUTE.put("请、休假记录表(特殊)",     "leaveSpecial");
95 96
 //        SHEET_ROUTE.put("锦旗及感谢信",              "bannerLetter");
97
+        SHEET_ROUTE.put("职业资格等级获取时间",      "qualificationLevel");
96 98
 //        SHEET_ROUTE.put("日常培训记录",              "dailyTraining");
97 99
 //        SHEET_ROUTE.put("组长履职情况记录表",         "leaderDuty");
98 100
 //        SHEET_ROUTE.put("健康锐兵(2026_3)",        "healthSoldier");
@@ -161,6 +163,7 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
161 163
 //            case "rewardPenalty":       return doRewardPenalty(sheet, batchNo, username);
162 164
             case "leaveSpecial":          return doLeaveSpecial(sheet, batchNo, username);
163 165
 //            case "bannerLetter":          return doBannerLetter(sheet, batchNo, username);
166
+            case "qualificationLevel":    return doQualificationLevel(sheet, batchNo, username);
164 167
 //            case "dailyTraining":         return doDailyTraining(sheet, batchNo, username);
165 168
 //            case "leaderDuty":            return doLeaderDuty(sheet, batchNo, username);
166 169
 //            case "healthSoldier":         return doHealthSoldier(sheet, batchNo, username);
@@ -1322,7 +1325,7 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
1322 1325
         if (v instanceof Double) return DateUtil.getJavaDate((Double) v);
1323 1326
         // try parse string
1324 1327
         String s = v.toString().trim();
1325
-        for (String fmt : new String[]{"yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM-dd", "yyyy/MM/dd", "HH:mm:ss", "HH:mm"}) {
1328
+        for (String fmt : new String[]{"yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM-dd", "yyyy/MM/dd","yyyy.MM.dd", "HH:mm:ss", "HH:mm"}) {
1326 1329
             try {
1327 1330
                 return new SimpleDateFormat(fmt).parse(s.substring(0, Math.min(s.length(), fmt.length())));
1328 1331
             } catch (Exception ignore) {}
@@ -1401,6 +1404,7 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
1401 1404
         result.put("部门奖惩记录",        clearOne(rewardPenaltyService,         beginTime, endTime));
1402 1405
         result.put("请休假记录(特殊)",  clearOne(leaveSpecialService,          beginTime, endTime));
1403 1406
         result.put("锦旗及感谢信",        clearOne(bannerLetterService,          beginTime, endTime));
1407
+        result.put("职业资格等级获取时间",  clearOne(qualificationLevelService,    beginTime, endTime));
1404 1408
         result.put("日常培训记录",        clearOne(dailyTrainingService,         beginTime, endTime));
1405 1409
         result.put("组长履职情况记录",    clearOne(leaderDutyService,            beginTime, endTime));
1406 1410
         result.put("健康锐兵",            clearOne(healthSoldierService,         beginTime, endTime));
@@ -1732,4 +1736,44 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
1732 1736
     private <T> T copyObject(T source, Class<T> targetClass) {
1733 1737
         return BeanUtil.toBean(source, targetClass);
1734 1738
     }
1739
+
1740
+    /** 职业资格等级获取时间 → ledger_qualification_level
1741
+     * 导入顺序:姓名(0) 一级发证时间(1) 二级发证时间(2) 三级发证时间(3)
1742
+     *          四级发证时间(4) 五级发证时间(5)
1743
+     */
1744
+    private int doQualificationLevel(Sheet sheet, String batchNo, String username) {
1745
+        List<LedgerQualificationLevel> list = new ArrayList<>();
1746
+        for (Object[] c : dataRows(sheet, 2)) {
1747
+            LedgerQualificationLevel o = new LedgerQualificationLevel();
1748
+
1749
+            String personName = str(c, 0);      // 姓名
1750
+            o.setPersonName(personName);
1751
+            o.setLevelOneTime(date(c, 1));      // 一级发证时间
1752
+            o.setLevelTwoTime(date(c, 2));      // 二级发证时间
1753
+            o.setLevelThreeTime(date(c, 3));    // 三级发证时间
1754
+            o.setLevelFourTime(date(c, 4));     // 四级发证时间
1755
+            o.setLevelFiveTime(date(c, 5));     // 五级发证时间
1756
+
1757
+            // 根据姓名查找组织ID和名称
1758
+            if (personName != null && !personName.trim().isEmpty()) {
1759
+                Map<String, Object> orgInfo = resolveOrgInfoByNameWithCache(personName);
1760
+                if (!orgInfo.isEmpty()) {
1761
+                    o.setUserId((Long) orgInfo.get("userId"));
1762
+                    o.setDeptId((Long) orgInfo.get("deptId"));
1763
+                    o.setDeptName((String) orgInfo.get("deptName"));
1764
+                    o.setTeamId((Long) orgInfo.get("teamId"));
1765
+                    o.setTeamName((String) orgInfo.get("teamName"));
1766
+                    o.setGroupId((Long) orgInfo.get("groupId"));
1767
+                    o.setGroupName((String) orgInfo.get("groupName"));
1768
+                }
1769
+            }
1770
+
1771
+            o.setImportBatch(batchNo);
1772
+            o.setSourceType("1");
1773
+            o.setCreateBy(username);
1774
+            list.add(o);
1775
+        }
1776
+        qualificationLevelService.batchInsert(list);
1777
+        return list.size();
1778
+    }
1735 1779
 }

+ 40 - 0
airport-ledger/src/main/java/com/sundot/airport/ledger/service/impl/LedgerQualificationLevelServiceImpl.java

@@ -0,0 +1,40 @@
1
+package com.sundot.airport.ledger.service.impl;
2
+
3
+import java.util.List;
4
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
5
+import com.sundot.airport.common.utils.DateUtils;
6
+import com.sundot.airport.ledger.domain.LedgerQualificationLevel;
7
+import com.sundot.airport.ledger.mapper.LedgerQualificationLevelMapper;
8
+import com.sundot.airport.ledger.service.ILedgerQualificationLevelService;
9
+import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.stereotype.Service;
11
+import org.springframework.transaction.annotation.Transactional;
12
+
13
+
14
+/**
15
+ * 职业资格等级获取时间Service实现
16
+ */
17
+@Service
18
+public class LedgerQualificationLevelServiceImpl extends ServiceImpl<LedgerQualificationLevelMapper, LedgerQualificationLevel>
19
+        implements ILedgerQualificationLevelService {
20
+
21
+    @Autowired
22
+    private LedgerQualificationLevelMapper mapper;
23
+
24
+    @Override
25
+    public List<LedgerQualificationLevel> selectList(LedgerQualificationLevel query) {
26
+        return mapper.selectList(query);
27
+    }
28
+
29
+    @Override
30
+    @Transactional(rollbackFor = Exception.class)
31
+    public int batchInsert(List<LedgerQualificationLevel> list) {
32
+        if (list == null || list.isEmpty()) {
33
+            return 0;
34
+        }
35
+        list.forEach(item -> item.setCreateTime(DateUtils.getNowDate()));
36
+        saveBatch(list, 500);
37
+        return list.size();
38
+    }
39
+
40
+}

+ 58 - 0
airport-ledger/src/main/resources/mapper/ledger/LedgerQualificationLevelMapper.xml

@@ -0,0 +1,58 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.sundot.airport.ledger.mapper.LedgerQualificationLevelMapper">
4
+
5
+    <resultMap id="BaseResultMap" type="com.sundot.airport.ledger.domain.LedgerQualificationLevel">
6
+        <id property="id" column="id" />
7
+        <result property="userId" column="user_id" />
8
+        <result property="deptId" column="dept_id" />
9
+        <result property="teamId" column="team_id" />
10
+        <result property="groupId" column="group_id" />
11
+        <result property="personName" column="person_name" />
12
+        <result property="deptName" column="dept_name" />
13
+        <result property="teamName" column="team_name" />
14
+        <result property="groupName" column="group_name" />
15
+        <result property="levelOneTime" column="level_one_time" />
16
+        <result property="levelTwoTime" column="level_two_time" />
17
+        <result property="levelThreeTime" column="level_three_time" />
18
+        <result property="levelFourTime" column="level_four_time" />
19
+        <result property="levelFiveTime" column="level_five_time" />
20
+        <result property="remark" column="remark" />
21
+        <result property="importBatch" column="import_batch" />
22
+        <result property="sourceType" column="source_type" />
23
+        <result property="createBy"   column="create_by"   />
24
+        <result property="createTime" column="create_time" />
25
+        <result property="updateBy"   column="update_by"   />
26
+        <result property="updateTime" column="update_time" />
27
+        <result property="syncFlag" column="sync_flag" />
28
+    </resultMap>
29
+
30
+    <sql id="selectVo">
31
+        SELECT id, user_id, dept_id, team_id, group_id, person_name, dept_name, team_name, group_name, 
32
+               level_one_time, level_two_time, level_three_time, level_four_time, level_five_time,
33
+               remark, import_batch, source_type, create_by, create_time, update_by, update_time, sync_flag
34
+        FROM ledger_qualification_level
35
+        WHERE del_flag = '0'
36
+    </sql>
37
+
38
+    <select id="selectList" parameterType="com.sundot.airport.ledger.domain.LedgerQualificationLevel" resultMap="BaseResultMap">
39
+        <include refid="selectVo"/>
40
+        <if test="personName != null and personName != ''">AND person_name LIKE CONCAT('%', #{personName}, '%')</if>
41
+        <if test="deptName != null and deptName != ''">AND dept_name LIKE CONCAT('%', #{deptName}, '%')</if>
42
+        <if test="teamName != null and teamName != ''">AND team_name LIKE CONCAT('%', #{teamName}, '%')</if>
43
+        <if test="syncFlag != null and syncFlag != ''">AND sync_flag = #{syncFlag}</if>
44
+        <if test="params != null and params.beginTime != null and params.beginTime != ''">
45
+            AND create_time &gt;= #{params.beginTime}
46
+        </if>
47
+        <if test="params != null and params.endTime != null and params.endTime != ''">
48
+            AND create_time &lt;= #{params.endTime}
49
+        </if>
50
+        ORDER BY id DESC
51
+    </select>
52
+
53
+    <update id="updateSyncFlag">
54
+        UPDATE ledger_qualification_level
55
+        SET sync_flag = '1'
56
+        WHERE sync_flag = '0'
57
+    </update>
58
+</mapper>