Просмотр исходного кода

ledger_reward_approval字段删除和调整、相关代码调整、一键导入功能导入模版调整调整

wangxx недель назад: 2
Родитель
Сommit
d42219c4d9

+ 1 - 2
airport-admin/src/main/java/com/sundot/airport/web/controller/ledger/LedgerTemplateController.java

@@ -130,8 +130,7 @@ public class LedgerTemplateController extends BaseController {
130
         nm.put("rewardApproval", "小额奖励审批单-安检-质控");
130
         nm.put("rewardApproval", "小额奖励审批单-安检-质控");
131
         hm.put("rewardApproval", 1);
131
         hm.put("rewardApproval", 1);
132
         cm.put("rewardApproval", new String[]{
132
         cm.put("rewardApproval", new String[]{
133
-            "员工编码","姓名","查获(事件)时间","奖励类别","查获物品","类别(一类/二类)",
134
-            "奖励事由(安全)","人员类别","主要事由简述"
133
+            "姓名","查获(事件)时间","奖励类别","查获物品","人员类别","主要事由简述","处置结果","证明材料"
135
         });
134
         });
136
 
135
 
137
         // 13. 部门奖惩记录表 (5列)
136
         // 13. 部门奖惩记录表 (5列)

+ 58 - 56
airport-ledger/src/main/java/com/sundot/airport/ledger/domain/LedgerRewardApproval.java

@@ -20,30 +20,45 @@ public class LedgerRewardApproval extends BaseEntity {
20
     @TableId(type = IdType.AUTO)
20
     @TableId(type = IdType.AUTO)
21
     private Long id;
21
     private Long id;
22
 
22
 
23
-    @JsonFormat(pattern = "yyyy-MM-dd")
24
-    @Excel(name = "审批日期", width = 20, dateFormat = "yyyy-MM-dd")
25
-    private Date approveDate;
26
-
27
     @Excel(name = "部门名称")
23
     @Excel(name = "部门名称")
28
     private String deptName;
24
     private String deptName;
29
 
25
 
30
-    @Excel(name = "队室/班组")
26
+    private Long deptId;
27
+
31
     private String teamName;
28
     private String teamName;
32
 
29
 
30
+    private Long teamId;
31
+
32
+    private String groupName;
33
+
34
+    private Long groupId;
35
+
33
     @Excel(name = "姓名")
36
     @Excel(name = "姓名")
34
     private String personName;
37
     private String personName;
35
 
38
 
36
-    @Excel(name = "奖励类型")
39
+    private Long personId;
40
+
41
+    @JsonFormat(pattern = "yyyy-MM-dd")
42
+    @Excel(name = "查获(事件)时间", width = 20, dateFormat = "yyyy-MM-dd")
43
+    private Date approveDate;
44
+
45
+    @Excel(name = "奖励类别")
37
     private String rewardType;
46
     private String rewardType;
38
 
47
 
39
-    @Excel(name = "奖励金额")
40
-    private BigDecimal rewardAmount;
48
+    @Excel(name = "查获物品")
49
+    private String seizedItem;
50
+
51
+    @Excel(name = "人员类别")
52
+    private String personCategory;
41
 
53
 
42
-    @Excel(name = "审批状态")
43
-    private String approvalStatus;
54
+    @Excel(name = "主要事由简述")
55
+    private String rewardReason;
44
 
56
 
45
-    @Excel(name = "备注")
46
-    private String remark;
57
+    @Excel(name = "处置结果")
58
+    private String disposalResult;
59
+
60
+    @Excel(name = "证明材料")
61
+    private String proofMaterial;
47
 
62
 
48
     private String importBatch;
63
     private String importBatch;
49
 
64
 
@@ -53,46 +68,53 @@ public class LedgerRewardApproval extends BaseEntity {
53
     @Excel(name = "同步标志(0=未同步;1=已同步)")
68
     @Excel(name = "同步标志(0=未同步;1=已同步)")
54
     private String syncFlag;
69
     private String syncFlag;
55
 
70
 
56
-    @Excel(name = "查获物品")
57
-    private String seizedItem;
58
-
59
-    @Excel(name = "奖励事由(安全)")
60
-    private String rewardReason;
61
-
62
-    @Excel(name = "人员类别")
63
-    private String personCategory;
64
-
65
-    // ========== ID字段 ==========
66
-    private Long personId;
67
-    private Long deptId;
68
-    private Long teamId;
69
-
70
     public Long getId() { return id; }
71
     public Long getId() { return id; }
71
     public void setId(Long id) { this.id = id; }
72
     public void setId(Long id) { this.id = id; }
72
 
73
 
73
-    public Date getApproveDate() { return approveDate; }
74
-    public void setApproveDate(Date approveDate) { this.approveDate = approveDate; }
75
-
76
     public String getDeptName() { return deptName; }
74
     public String getDeptName() { return deptName; }
77
     public void setDeptName(String deptName) { this.deptName = deptName; }
75
     public void setDeptName(String deptName) { this.deptName = deptName; }
78
 
76
 
77
+    public Long getDeptId() { return deptId; }
78
+    public void setDeptId(Long deptId) { this.deptId = deptId; }
79
+
79
     public String getTeamName() { return teamName; }
80
     public String getTeamName() { return teamName; }
80
     public void setTeamName(String teamName) { this.teamName = teamName; }
81
     public void setTeamName(String teamName) { this.teamName = teamName; }
81
 
82
 
83
+    public Long getTeamId() { return teamId; }
84
+    public void setTeamId(Long teamId) { this.teamId = teamId; }
85
+
86
+    public String getGroupName() { return groupName; }
87
+    public void setGroupName(String groupName) { this.groupName = groupName; }
88
+
89
+    public Long getGroupId() { return groupId; }
90
+    public void setGroupId(Long groupId) { this.groupId = groupId; }
91
+
82
     public String getPersonName() { return personName; }
92
     public String getPersonName() { return personName; }
83
     public void setPersonName(String personName) { this.personName = personName; }
93
     public void setPersonName(String personName) { this.personName = personName; }
84
 
94
 
95
+    public Long getPersonId() { return personId; }
96
+    public void setPersonId(Long personId) { this.personId = personId; }
97
+
98
+    public Date getApproveDate() { return approveDate; }
99
+    public void setApproveDate(Date approveDate) { this.approveDate = approveDate; }
100
+
85
     public String getRewardType() { return rewardType; }
101
     public String getRewardType() { return rewardType; }
86
     public void setRewardType(String rewardType) { this.rewardType = rewardType; }
102
     public void setRewardType(String rewardType) { this.rewardType = rewardType; }
87
 
103
 
88
-    public BigDecimal getRewardAmount() { return rewardAmount; }
89
-    public void setRewardAmount(BigDecimal rewardAmount) { this.rewardAmount = rewardAmount; }
104
+    public String getSeizedItem() { return seizedItem; }
105
+    public void setSeizedItem(String seizedItem) { this.seizedItem = seizedItem; }
106
+
107
+    public String getPersonCategory() { return personCategory; }
108
+    public void setPersonCategory(String personCategory) { this.personCategory = personCategory; }
109
+
110
+    public String getRewardReason() { return rewardReason; }
111
+    public void setRewardReason(String rewardReason) { this.rewardReason = rewardReason; }
90
 
112
 
91
-    public String getApprovalStatus() { return approvalStatus; }
92
-    public void setApprovalStatus(String approvalStatus) { this.approvalStatus = approvalStatus; }
113
+    public String getDisposalResult() { return disposalResult; }
114
+    public void setDisposalResult(String disposalResult) { this.disposalResult = disposalResult; }
93
 
115
 
94
-    public String getRemark() { return remark; }
95
-    public void setRemark(String remark) { this.remark = remark; }
116
+    public String getProofMaterial() { return proofMaterial; }
117
+    public void setProofMaterial(String proofMaterial) { this.proofMaterial = proofMaterial; }
96
 
118
 
97
     public String getImportBatch() { return importBatch; }
119
     public String getImportBatch() { return importBatch; }
98
     public void setImportBatch(String importBatch) { this.importBatch = importBatch; }
120
     public void setImportBatch(String importBatch) { this.importBatch = importBatch; }
@@ -102,24 +124,4 @@ public class LedgerRewardApproval extends BaseEntity {
102
 
124
 
103
     public String getSyncFlag() { return syncFlag; }
125
     public String getSyncFlag() { return syncFlag; }
104
     public void setSyncFlag(String syncFlag) { this.syncFlag = syncFlag; }
126
     public void setSyncFlag(String syncFlag) { this.syncFlag = syncFlag; }
105
-
106
-
107
-    public String getSeizedItem() { return seizedItem; }
108
-    public void setSeizedItem(String seizedItem) { this.seizedItem = seizedItem; }
109
-
110
-    public String getRewardReason() { return rewardReason; }
111
-    public void setRewardReason(String rewardReason) { this.rewardReason = rewardReason; }
112
-
113
-    public String getPersonCategory() { return personCategory; }
114
-    public void setPersonCategory(String personCategory) { this.personCategory = personCategory; }
115
-
116
-    // ========== ID字段的getter/setter ==========
117
-    public Long getPersonId() { return personId; }
118
-    public void setPersonId(Long personId) { this.personId = personId; }
119
-
120
-    public Long getDeptId() { return deptId; }
121
-    public void setDeptId(Long deptId) { this.deptId = deptId; }
122
-
123
-    public Long getTeamId() { return teamId; }
124
-    public void setTeamId(Long teamId) { this.teamId = teamId; }
125
-}
127
+}

+ 11 - 12
airport-ledger/src/main/java/com/sundot/airport/ledger/service/impl/LedgerCombinedImportServiceImpl.java

@@ -843,23 +843,23 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
843
 
843
 
844
     /** 12. 小额奖励审批单-安检-质控 → ledger_reward_approval
844
     /** 12. 小额奖励审批单-安检-质控 → ledger_reward_approval
845
      * 特殊:只有1行表头(headerRow=1)
845
      * 特殊:只有1行表头(headerRow=1)
846
-     * R1: 员工编码(0) 姓名(1) 查获时间(2) 奖励类别(3) 查获物品(4)
847
-     *     类别(5) 奖励事由(6) 人员类别(7) 主要事由简述(8)
846
+     * R1: 姓名(0) 查获(事件)时间(1) 奖励类别(2) 查获物品(3) 人员类别(4)
847
+     *     主要事由简述(5) 处置结果(6) 证明材料(7)
848
      */
848
      */
849
     private int doRewardApproval(Sheet sheet, String batchNo, String username) {
849
     private int doRewardApproval(Sheet sheet, String batchNo, String username) {
850
         List<LedgerRewardApproval> list = new ArrayList<>();
850
         List<LedgerRewardApproval> list = new ArrayList<>();
851
         for (Object[] c : dataRows(sheet, 1)) {  // 只跳1行表头
851
         for (Object[] c : dataRows(sheet, 1)) {  // 只跳1行表头
852
             LedgerRewardApproval o = new LedgerRewardApproval();
852
             LedgerRewardApproval o = new LedgerRewardApproval();
853
-            String personName = str(c, 1);      // 姓名
853
+            String personName = str(c, 0);       // 姓名
854
             o.setPersonName(personName);
854
             o.setPersonName(personName);
855
-            o.setApproveDate(date(c, 2) != null ? new java.sql.Date(date(c, 1).getTime()) : null);  // 查获时间
856
-            o.setRewardType(str(c, 3));         // 奖励类别
857
-            o.setSeizedItem(str(c, 4));         // 查获物品
858
-            o.setApprovalStatus(str(c, 5));     // 类别
859
-            o.setRewardReason(str(c, 6));       // 奖励事由
860
-            o.setPersonCategory(str(c, 7));     // 人员类别
861
-            o.setRemark(str(c, 8));             // 主要事由简述
862
-            
855
+            o.setApproveDate(date(c, 1));         // 查获(事件)时间
856
+            o.setRewardType(str(c, 2));           // 奖励类别
857
+            o.setSeizedItem(str(c, 3));           // 查获物品
858
+            o.setPersonCategory(str(c, 4));       // 人员类别
859
+            o.setRewardReason(str(c, 5));         // 主要事由简述
860
+            o.setDisposalResult(str(c, 6));       // 处置结果
861
+            o.setProofMaterial(str(c, 7));        // 证明材料
862
+
863
             // 根据姓名查找组织ID和名称
863
             // 根据姓名查找组织ID和名称
864
             if (personName != null && !personName.trim().isEmpty()) {
864
             if (personName != null && !personName.trim().isEmpty()) {
865
                 Map<String, Object> orgInfo = resolveOrgInfoByNameWithCache(personName);
865
                 Map<String, Object> orgInfo = resolveOrgInfoByNameWithCache(personName);
@@ -872,7 +872,6 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
872
                 }
872
                 }
873
             }
873
             }
874
             
874
             
875
-            o.setApprovalStatus("待审批");
876
             o.setImportBatch(batchNo);
875
             o.setImportBatch(batchNo);
877
             o.setSourceType("1");
876
             o.setSourceType("1");
878
             o.setCreateBy(username);
877
             o.setCreateBy(username);

+ 10 - 6
airport-ledger/src/main/java/com/sundot/airport/ledger/service/impl/LedgerSyncServiceImpl.java

@@ -346,7 +346,11 @@ public class LedgerSyncServiceImpl implements ILedgerSyncService {
346
         return new SyncResult(ins, skip, "");
346
         return new SyncResult(ins, skip, "");
347
     }
347
     }
348
 
348
 
349
-    /** 6. 小额奖励审批单(安全类查获加分,按类别选L3) */
349
+    /** 6. 小额奖励审批单(安全类查获加分,按处置结果选L3)
350
+     *  一类:移交公安处置
351
+     *  二类:公安批评教育放行
352
+     *  特殊查获:其他
353
+     */
350
     private SyncResult syncRewardApproval() {
354
     private SyncResult syncRewardApproval() {
351
         LedgerRewardApproval query = new LedgerRewardApproval();
355
         LedgerRewardApproval query = new LedgerRewardApproval();
352
         query.setSyncFlag(LedgerSyncFlagEnum.ZERO.getCode());
356
         query.setSyncFlag(LedgerSyncFlagEnum.ZERO.getCode());
@@ -358,16 +362,16 @@ public class LedgerSyncServiceImpl implements ILedgerSyncService {
358
             String src = "reward_approval:" + row.getId();
362
             String src = "reward_approval:" + row.getId();
359
             if (existsBySrc(src)) { skip++; continue; }
363
             if (existsBySrc(src)) { skip++; continue; }
360
             if (!hasName(row.getPersonName())) { skip++; continue; }
364
             if (!hasName(row.getPersonName())) { skip++; continue; }
361
-            String cat = row.getRewardType() != null ? row.getRewardType() : "";
365
+            String result = row.getDisposalResult() != null ? row.getDisposalResult() : "";
362
             long l3Id; BigDecimal sv;
366
             long l3Id; BigDecimal sv;
363
-            if (cat.contains("一类"))      { l3Id = IND_SEIZURE_L3_A; sv = POS_ONE; }
364
-            else if (cat.contains("二类")) { l3Id = IND_SEIZURE_L3_B; sv = POS_HALF; }
365
-            else                           { l3Id = IND_SEIZURE_L3_C; sv = POS_015; }
367
+            if (result.contains("移交公安处置"))        { l3Id = IND_SEIZURE_L3_A; sv = POS_ONE; }
368
+            else if (result.contains("公安批评教育放行")) { l3Id = IND_SEIZURE_L3_B; sv = POS_HALF; }
369
+            else                                       { l3Id = IND_SEIZURE_L3_C; sv = POS_015; }
366
             ScoreIndicator lv3 = getIndicator(l3Id);
370
             ScoreIndicator lv3 = getIndicator(l3Id);
367
             ScoreEvent e = buildEvent(dimId, lv2, lv3, row.getPersonName(),
371
             ScoreEvent e = buildEvent(dimId, lv2, lv3, row.getPersonName(),
368
                     row.getTeamName(), row.getApproveDate() != null ? new java.util.Date(row.getApproveDate().getTime()) : null,
372
                     row.getTeamName(), row.getApproveDate() != null ? new java.util.Date(row.getApproveDate().getTime()) : null,
369
                     null, sv, ZERO,
373
                     null, sv, ZERO,
370
-                    row.getRemark(), src, null);
374
+                    row.getRewardReason(), src, null);
371
             scoreEventMapper.insert(e);
375
             scoreEventMapper.insert(e);
372
             ins++;
376
             ins++;
373
         }
377
         }

+ 16 - 14
airport-ledger/src/main/resources/mapper/ledger/LedgerRewardApprovalMapper.xml

@@ -6,12 +6,19 @@
6
         <id property="id" column="id" />
6
         <id property="id" column="id" />
7
         <result property="approveDate" column="approve_date" />
7
         <result property="approveDate" column="approve_date" />
8
         <result property="deptName" column="dept_name" />
8
         <result property="deptName" column="dept_name" />
9
+        <result property="deptId" column="dept_id" />
9
         <result property="teamName" column="team_name" />
10
         <result property="teamName" column="team_name" />
11
+        <result property="teamId" column="team_id" />
12
+        <result property="groupName" column="group_name" />
13
+        <result property="groupId" column="group_id" />
10
         <result property="personName" column="person_name" />
14
         <result property="personName" column="person_name" />
15
+        <result property="personId" column="person_id" />
11
         <result property="rewardType" column="reward_type" />
16
         <result property="rewardType" column="reward_type" />
12
-        <result property="rewardAmount" column="reward_amount" />
13
-        <result property="approvalStatus" column="approval_status" />
14
-        <result property="remark" column="remark" />
17
+        <result property="seizedItem" column="seized_item" />
18
+        <result property="personCategory" column="person_category" />
19
+        <result property="rewardReason" column="reward_reason" />
20
+        <result property="disposalResult" column="disposal_result" />
21
+        <result property="proofMaterial" column="proof_material" />
15
         <result property="importBatch" column="import_batch" />
22
         <result property="importBatch" column="import_batch" />
16
         <result property="sourceType" column="source_type" />
23
         <result property="sourceType" column="source_type" />
17
         <result property="createBy" column="create_by" />
24
         <result property="createBy" column="create_by" />
@@ -19,18 +26,13 @@
19
         <result property="updateBy" column="update_by" />
26
         <result property="updateBy" column="update_by" />
20
         <result property="updateTime" column="update_time" />
27
         <result property="updateTime" column="update_time" />
21
         <result property="syncFlag" column="sync_flag" />
28
         <result property="syncFlag" column="sync_flag" />
22
-        <result property="seizedItem" column="seized_item" />
23
-        <result property="rewardReason" column="reward_reason" />
24
-        <result property="personCategory" column="person_category" />
25
-        <!-- ID字段 -->
26
-        <result property="personId" column="person_id" />
27
-        <result property="deptId" column="dept_id" />
28
-        <result property="teamId" column="team_id" />
29
     </resultMap>
29
     </resultMap>
30
 
30
 
31
     <sql id="selectVo">
31
     <sql id="selectVo">
32
-        SELECT id, approve_date, dept_name, team_name, person_name, reward_type, reward_amount, approval_status, remark, import_batch, source_type, create_by, create_time, update_by, update_time, sync_flag,
33
-               employee_code, seized_item, reward_reason, person_category, person_id, dept_id, team_id
32
+        SELECT id, approve_date, dept_name, dept_id, team_name, team_id, group_name, group_id,
33
+               person_name, person_id, reward_type, seized_item, person_category,
34
+               reward_reason, disposal_result, proof_material,
35
+               import_batch, source_type, create_by, create_time, update_by, update_time, sync_flag
34
         FROM ledger_reward_approval
36
         FROM ledger_reward_approval
35
         WHERE del_flag = '0'
37
         WHERE del_flag = '0'
36
     </sql>
38
     </sql>
@@ -42,10 +44,10 @@
42
         <if test="personName != null and personName != ''">AND person_name LIKE CONCAT('%', #{personName}, '%')</if>
44
         <if test="personName != null and personName != ''">AND person_name LIKE CONCAT('%', #{personName}, '%')</if>
43
         <if test="syncFlag != null and syncFlag != ''">AND sync_flag = #{syncFlag}</if>
45
         <if test="syncFlag != null and syncFlag != ''">AND sync_flag = #{syncFlag}</if>
44
         <if test="params != null and params.beginTime != null and params.beginTime != ''">
46
         <if test="params != null and params.beginTime != null and params.beginTime != ''">
45
-            AND (record_date &gt;= #{params.beginTime} OR approve_date &gt;= #{params.beginTime} OR exam_date &gt;= #{params.beginTime})
47
+            AND record_date &gt;= #{params.beginTime}
46
         </if>
48
         </if>
47
         <if test="params != null and params.endTime != null and params.endTime != ''">
49
         <if test="params != null and params.endTime != null and params.endTime != ''">
48
-            AND (record_date &lt;= #{params.endTime} OR approve_date &lt;= #{params.endTime} OR exam_date &lt;= #{params.endTime})
50
+            AND record_date &lt;= #{params.endTime}
49
         </if>
51
         </if>
50
         ORDER BY id DESC
52
         ORDER BY id DESC
51
     </select>
53
     </select>