Bladeren bron

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

wangxx 2 weken geleden
bovenliggende
commit
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 116
         nm.put("terminalBonus", "航站楼加分");
117 117
         hm.put("terminalBonus", 2);
118 118
         cm.put("terminalBonus", new String[]{
119
-            "审核日期","姓名","班组","加分分数","队室内勤","总加分数","队室负责人"
119
+            "姓名","所属航站楼","记分值","记分日期","捡到物品金额","记分条款"
120 120
         });
121 121
 
122 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 20
     @TableId(type = IdType.AUTO)
21 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 23
     @Excel(name = "部门名称")
28 24
     private String deptName;
29 25
 
30 26
     private Long deptId;
31 27
 
32
-    @Excel(name = "队室/班组")
33 28
     private String teamName;
34 29
 
35 30
     private Long teamId;
36 31
 
32
+    private String groupName;
33
+
34
+    private Long groupId;
35
+
37 36
     @Excel(name = "姓名")
38 37
     private String personName;
39 38
 
40 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 57
     @Excel(name = "佐证附件")
54 58
     private String evidenceFile;
55 59
 
56
-    @Excel(name = "备注")
57
-    private String remark;
58
-
59 60
     private String importBatch;
60 61
 
61 62
     @Excel(name = "数据来源")
@@ -67,9 +68,6 @@ public class LedgerTerminalBonus extends BaseEntity {
67 68
     public Long getId() { return id; }
68 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 71
     public String getDeptName() { return deptName; }
74 72
     public void setDeptName(String deptName) { this.deptName = deptName; }
75 73
 
@@ -82,30 +80,36 @@ public class LedgerTerminalBonus extends BaseEntity {
82 80
     public Long getTeamId() { return teamId; }
83 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 83
     public String getGroupName() { return groupName; }
92 84
     public void setGroupName(String groupName) { this.groupName = groupName; }
93 85
 
94 86
     public Long getGroupId() { return groupId; }
95 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 98
     public BigDecimal getAddScore() { return addScore; }
101 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 110
     public String getEvidenceFile() { return evidenceFile; }
104 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 113
     public String getImportBatch() { return importBatch; }
110 114
     public void setImportBatch(String importBatch) { this.importBatch = importBatch; }
111 115
 
@@ -114,4 +118,4 @@ public class LedgerTerminalBonus extends BaseEntity {
114 118
 
115 119
     public String getSyncFlag() { return syncFlag; }
116 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 769
     /** 10. 航站楼加分 → ledger_terminal_bonus
770
-     * R2: 审核日期(0) 姓名(1) 班组(2) 加分分数(3) 队室内勤(4)
770
+     * R2: 姓名(0) 所属航站楼(1) 记分值(2) 记分日期(3) 捡到物品金额(4) 记分条款(5)
771 771
      */
772 772
     private int doTerminalBonus(Sheet sheet, String batchNo, String username) {
773 773
         List<LedgerTerminalBonus> list = new ArrayList<>();
774 774
         for (Object[] c : dataRows(sheet, 2)) {
775 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 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 783
             o.setImportBatch(batchNo);
783 784
             o.setSourceType("1");
784 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 445
             if (!hasName(row.getPersonName())) { skip++; continue; }
446 446
             BigDecimal sv = row.getAddScore() != null ? row.getAddScore() : POS_07;
447 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 449
                     null, sv, ZERO,
450 450
                     "航站楼加分", src, null);
451 451
             scoreEventMapper.insert(e);

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

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