소스 검색

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

wangxx 2 주 전
부모
커밋
035fb2f3ee

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

@@ -116,7 +116,7 @@ public class LedgerTemplateController extends BaseController {
116
         nm.put("terminalBonus", "航站楼加分");
116
         nm.put("terminalBonus", "航站楼加分");
117
         hm.put("terminalBonus", 2);
117
         hm.put("terminalBonus", 2);
118
         cm.put("terminalBonus", new String[]{
118
         cm.put("terminalBonus", new String[]{
119
-            "审核日期","姓名","班组","加分分数","队室内勤","总加分数","队室负责人"
119
+            "姓名","所属航站楼","记分值","记分日期","捡到物品金额","记分条款"
120
         });
120
         });
121
 
121
 
122
         // 11. 成绩收集 (9列)
122
         // 11. 成绩收集 (9列)

+ 34 - 30
airport-ledger/src/main/java/com/sundot/airport/ledger/domain/LedgerTerminalBonus.java

@@ -20,42 +20,43 @@ public class LedgerTerminalBonus 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
     private Long deptId;
26
     private Long deptId;
31
 
27
 
32
-    @Excel(name = "队室/班组")
33
     private String teamName;
28
     private String teamName;
34
 
29
 
35
     private Long teamId;
30
     private Long teamId;
36
 
31
 
32
+    private String groupName;
33
+
34
+    private Long groupId;
35
+
37
     @Excel(name = "姓名")
36
     @Excel(name = "姓名")
38
     private String personName;
37
     private String personName;
39
 
38
 
40
     private Long personId;
39
     private Long personId;
41
 
40
 
42
-    @Excel(name = "小组")
43
-    private String groupName;
41
+    @Excel(name = "所属航站楼")
42
+    private String terminalBuilding;
44
 
43
 
45
-    private Long groupId;
44
+    @Excel(name = "记分值")
45
+    private BigDecimal addScore;
46
+
47
+    @JsonFormat(pattern = "yyyy-MM-dd")
48
+    @Excel(name = "记分日期", width = 20, dateFormat = "yyyy-MM-dd")
49
+    private Date scoreDate;
46
 
50
 
47
-    @Excel(name = "加分类型")
48
-    private String bonusType;
51
+    @Excel(name = "捡到物品金额")
52
+    private BigDecimal itemAmount;
49
 
53
 
50
-    @Excel(name = "加分")
51
-    private BigDecimal addScore;
54
+    @Excel(name = "记分条款")
55
+    private String scoreClause;
52
 
56
 
53
     @Excel(name = "佐证附件")
57
     @Excel(name = "佐证附件")
54
     private String evidenceFile;
58
     private String evidenceFile;
55
 
59
 
56
-    @Excel(name = "备注")
57
-    private String remark;
58
-
59
     private String importBatch;
60
     private String importBatch;
60
 
61
 
61
     @Excel(name = "数据来源")
62
     @Excel(name = "数据来源")
@@ -67,9 +68,6 @@ public class LedgerTerminalBonus extends BaseEntity {
67
     public Long getId() { return id; }
68
     public Long getId() { return id; }
68
     public void setId(Long id) { this.id = id; }
69
     public void setId(Long id) { this.id = id; }
69
 
70
 
70
-    public Date getApproveDate() { return approveDate; }
71
-    public void setApproveDate(Date approveDate) { this.approveDate = approveDate; }
72
-
73
     public String getDeptName() { return deptName; }
71
     public String getDeptName() { return deptName; }
74
     public void setDeptName(String deptName) { this.deptName = deptName; }
72
     public void setDeptName(String deptName) { this.deptName = deptName; }
75
 
73
 
@@ -82,30 +80,36 @@ public class LedgerTerminalBonus extends BaseEntity {
82
     public Long getTeamId() { return teamId; }
80
     public Long getTeamId() { return teamId; }
83
     public void setTeamId(Long teamId) { this.teamId = teamId; }
81
     public void setTeamId(Long teamId) { this.teamId = teamId; }
84
 
82
 
85
-    public String getPersonName() { return personName; }
86
-    public void setPersonName(String personName) { this.personName = personName; }
87
-
88
-    public Long getPersonId() { return personId; }
89
-    public void setPersonId(Long personId) { this.personId = personId; }
90
-
91
     public String getGroupName() { return groupName; }
83
     public String getGroupName() { return groupName; }
92
     public void setGroupName(String groupName) { this.groupName = groupName; }
84
     public void setGroupName(String groupName) { this.groupName = groupName; }
93
 
85
 
94
     public Long getGroupId() { return groupId; }
86
     public Long getGroupId() { return groupId; }
95
     public void setGroupId(Long groupId) { this.groupId = groupId; }
87
     public void setGroupId(Long groupId) { this.groupId = groupId; }
96
 
88
 
97
-    public String getBonusType() { return bonusType; }
98
-    public void setBonusType(String bonusType) { this.bonusType = bonusType; }
89
+    public String getPersonName() { return personName; }
90
+    public void setPersonName(String personName) { this.personName = personName; }
91
+
92
+    public Long getPersonId() { return personId; }
93
+    public void setPersonId(Long personId) { this.personId = personId; }
94
+
95
+    public String getTerminalBuilding() { return terminalBuilding; }
96
+    public void setTerminalBuilding(String terminalBuilding) { this.terminalBuilding = terminalBuilding; }
99
 
97
 
100
     public BigDecimal getAddScore() { return addScore; }
98
     public BigDecimal getAddScore() { return addScore; }
101
     public void setAddScore(BigDecimal addScore) { this.addScore = addScore; }
99
     public void setAddScore(BigDecimal addScore) { this.addScore = addScore; }
102
 
100
 
101
+    public Date getScoreDate() { return scoreDate; }
102
+    public void setScoreDate(Date scoreDate) { this.scoreDate = scoreDate; }
103
+
104
+    public BigDecimal getItemAmount() { return itemAmount; }
105
+    public void setItemAmount(BigDecimal itemAmount) { this.itemAmount = itemAmount; }
106
+
107
+    public String getScoreClause() { return scoreClause; }
108
+    public void setScoreClause(String scoreClause) { this.scoreClause = scoreClause; }
109
+
103
     public String getEvidenceFile() { return evidenceFile; }
110
     public String getEvidenceFile() { return evidenceFile; }
104
     public void setEvidenceFile(String evidenceFile) { this.evidenceFile = evidenceFile; }
111
     public void setEvidenceFile(String evidenceFile) { this.evidenceFile = evidenceFile; }
105
 
112
 
106
-    public String getRemark() { return remark; }
107
-    public void setRemark(String remark) { this.remark = remark; }
108
-
109
     public String getImportBatch() { return importBatch; }
113
     public String getImportBatch() { return importBatch; }
110
     public void setImportBatch(String importBatch) { this.importBatch = importBatch; }
114
     public void setImportBatch(String importBatch) { this.importBatch = importBatch; }
111
 
115
 
@@ -114,4 +118,4 @@ public class LedgerTerminalBonus extends BaseEntity {
114
 
118
 
115
     public String getSyncFlag() { return syncFlag; }
119
     public String getSyncFlag() { return syncFlag; }
116
     public void setSyncFlag(String syncFlag) { this.syncFlag = syncFlag; }
120
     public void setSyncFlag(String syncFlag) { this.syncFlag = syncFlag; }
117
-}
121
+}

+ 7 - 6
airport-ledger/src/main/java/com/sundot/airport/ledger/service/impl/LedgerCombinedImportServiceImpl.java

@@ -767,18 +767,19 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
767
     }
767
     }
768
 
768
 
769
     /** 10. 航站楼加分 → ledger_terminal_bonus
769
     /** 10. 航站楼加分 → ledger_terminal_bonus
770
-     * R2: 审核日期(0) 姓名(1) 班组(2) 加分分数(3) 队室内勤(4)
770
+     * R2: 姓名(0) 所属航站楼(1) 记分值(2) 记分日期(3) 捡到物品金额(4) 记分条款(5)
771
      */
771
      */
772
     private int doTerminalBonus(Sheet sheet, String batchNo, String username) {
772
     private int doTerminalBonus(Sheet sheet, String batchNo, String username) {
773
         List<LedgerTerminalBonus> list = new ArrayList<>();
773
         List<LedgerTerminalBonus> list = new ArrayList<>();
774
         for (Object[] c : dataRows(sheet, 2)) {
774
         for (Object[] c : dataRows(sheet, 2)) {
775
             LedgerTerminalBonus o = new LedgerTerminalBonus();
775
             LedgerTerminalBonus o = new LedgerTerminalBonus();
776
-            o.setApproveDate(date(c, 0) != null ? new java.sql.Date(date(c, 0).getTime()) : null);
777
-            String personName = str(c, 1);
776
+            String personName = str(c, 0);
778
             o.setPersonName(personName);
777
             o.setPersonName(personName);
779
-            o.setTeamName(str(c, 2));
780
-            o.setAddScore(decimal(c, 3) != null ? decimal(c, 3) : BigDecimal.ZERO);
781
-            o.setRemark(str(c, 4));
778
+            o.setTerminalBuilding(str(c, 1));
779
+            o.setAddScore(decimal(c, 2));
780
+            o.setScoreDate(date(c, 3));
781
+            o.setItemAmount(decimal(c, 4));
782
+            o.setScoreClause(str(c, 5));
782
             o.setImportBatch(batchNo);
783
             o.setImportBatch(batchNo);
783
             o.setSourceType("1");
784
             o.setSourceType("1");
784
             o.setCreateBy(username);
785
             o.setCreateBy(username);

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

@@ -445,7 +445,7 @@ public class LedgerSyncServiceImpl implements ILedgerSyncService {
445
             if (!hasName(row.getPersonName())) { skip++; continue; }
445
             if (!hasName(row.getPersonName())) { skip++; continue; }
446
             BigDecimal sv = row.getAddScore() != null ? row.getAddScore() : POS_07;
446
             BigDecimal sv = row.getAddScore() != null ? row.getAddScore() : POS_07;
447
             ScoreEvent e = buildEvent(dimId, lv2, lv3, row.getPersonName(),
447
             ScoreEvent e = buildEvent(dimId, lv2, lv3, row.getPersonName(),
448
-                    row.getTeamName(), row.getApproveDate() != null ? new java.util.Date(row.getApproveDate().getTime()) : null,
448
+                    row.getTeamName(), row.getScoreDate(),
449
                     null, sv, ZERO,
449
                     null, sv, ZERO,
450
                     "航站楼加分", src, null);
450
                     "航站楼加分", src, null);
451
             scoreEventMapper.insert(e);
451
             scoreEventMapper.insert(e);

+ 13 - 9
airport-ledger/src/main/resources/mapper/ledger/LedgerTerminalBonusMapper.xml

@@ -4,17 +4,20 @@
4
 
4
 
5
     <resultMap id="BaseResultMap" type="com.sundot.airport.ledger.domain.LedgerTerminalBonus">
5
     <resultMap id="BaseResultMap" type="com.sundot.airport.ledger.domain.LedgerTerminalBonus">
6
         <id property="id" column="id" />
6
         <id property="id" column="id" />
7
-        <result property="approveDate" column="approve_date" />
8
         <result property="deptName" column="dept_name" />
7
         <result property="deptName" column="dept_name" />
9
         <result property="deptId" column="dept_id" />
8
         <result property="deptId" column="dept_id" />
10
         <result property="teamName" column="team_name" />
9
         <result property="teamName" column="team_name" />
11
         <result property="teamId" column="team_id" />
10
         <result property="teamId" column="team_id" />
11
+        <result property="groupName" column="group_name" />
12
+        <result property="groupId" column="group_id" />
12
         <result property="personName" column="person_name" />
13
         <result property="personName" column="person_name" />
13
         <result property="personId" column="person_id" />
14
         <result property="personId" column="person_id" />
14
-        <result property="bonusType" column="bonus_type" />
15
+        <result property="terminalBuilding" column="terminal_building" />
15
         <result property="addScore" column="add_score" />
16
         <result property="addScore" column="add_score" />
17
+        <result property="scoreDate" column="score_date" />
18
+        <result property="itemAmount" column="item_amount" />
19
+        <result property="scoreClause" column="score_clause" />
16
         <result property="evidenceFile" column="evidence_file" />
20
         <result property="evidenceFile" column="evidence_file" />
17
-        <result property="remark" column="remark" />
18
         <result property="importBatch" column="import_batch" />
21
         <result property="importBatch" column="import_batch" />
19
         <result property="sourceType" column="source_type" />
22
         <result property="sourceType" column="source_type" />
20
         <result property="createBy"   column="create_by"   />
23
         <result property="createBy"   column="create_by"   />
@@ -22,12 +25,13 @@
22
         <result property="updateBy"   column="update_by"   />
25
         <result property="updateBy"   column="update_by"   />
23
         <result property="updateTime" column="update_time" />
26
         <result property="updateTime" column="update_time" />
24
         <result property="syncFlag" column="sync_flag" />
27
         <result property="syncFlag" column="sync_flag" />
25
-        <result property="groupName" column="group_name" />
26
-        <result property="groupId" column="group_id" />
27
     </resultMap>
28
     </resultMap>
28
 
29
 
29
     <sql id="selectVo">
30
     <sql id="selectVo">
30
-        SELECT id, approve_date, dept_name, dept_id, team_name, team_id, person_name, person_id, bonus_type, add_score, evidence_file, remark, import_batch, source_type, create_by, create_time, update_by, update_time, sync_flag, group_name, group_id
31
+        SELECT id, dept_name, dept_id, team_name, team_id, group_name, group_id,
32
+               person_name, person_id, terminal_building, add_score, score_date,
33
+               item_amount, score_clause, evidence_file,
34
+               import_batch, source_type, create_by, create_time, update_by, update_time, sync_flag
31
         FROM ledger_terminal_bonus
35
         FROM ledger_terminal_bonus
32
         WHERE del_flag = '0'
36
         WHERE del_flag = '0'
33
     </sql>
37
     </sql>
@@ -38,10 +42,10 @@
38
         <if test="teamName != null and teamName != ''">AND team_name LIKE CONCAT('%', #{teamName}, '%')</if>
42
         <if test="teamName != null and teamName != ''">AND team_name LIKE CONCAT('%', #{teamName}, '%')</if>
39
         <if test="syncFlag != null and syncFlag != ''">AND sync_flag = #{syncFlag}</if>
43
         <if test="syncFlag != null and syncFlag != ''">AND sync_flag = #{syncFlag}</if>
40
         <if test="params != null and params.beginTime != null and params.beginTime != ''">
44
         <if test="params != null and params.beginTime != null and params.beginTime != ''">
41
-            AND (record_date &gt;= #{params.beginTime} OR approve_date &gt;= #{params.beginTime} OR exam_date &gt;= #{params.beginTime})
45
+            AND record_date &gt;= #{params.beginTime}
42
         </if>
46
         </if>
43
         <if test="params != null and params.endTime != null and params.endTime != ''">
47
         <if test="params != null and params.endTime != null and params.endTime != ''">
44
-            AND (record_date &lt;= #{params.endTime} OR approve_date &lt;= #{params.endTime} OR exam_date &lt;= #{params.endTime})
48
+            AND record_date &lt;= #{params.endTime}
45
         </if>
49
         </if>
46
         ORDER BY id DESC
50
         ORDER BY id DESC
47
     </select>
51
     </select>
@@ -51,4 +55,4 @@
51
         set sync_flag = '1'
55
         set sync_flag = '1'
52
         where sync_flag = '0'
56
         where sync_flag = '0'
53
     </update>
57
     </update>
54
-</mapper>
58
+</mapper>