Kaynağa Gözat

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

wangxx 2 hafta önce
ebeveyn
işleme
fa8d34b20f

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

@@ -99,7 +99,7 @@ public class LedgerTemplateController extends BaseController {
99 99
         nm.put("unsafeEvent", "不安全事件");
100 100
         hm.put("unsafeEvent", 2);
101 101
         cm.put("unsafeEvent", new String[]{
102
-            "时间","事件描述","类别","航班号","责任人","涉及班组","涉及物品","岗位","区域","通道号","图像"
102
+            "时间","事件描述","类别","航班号","责任人","涉及物品","岗位","区域","通道号","附件"
103 103
         });
104 104
 
105 105
         // 9. 2026查获违规品统计 (23列)

+ 11 - 31
airport-ledger/src/main/java/com/sundot/airport/ledger/domain/LedgerUnsafeEvent.java

@@ -21,7 +21,7 @@ public class LedgerUnsafeEvent extends BaseEntity {
21 21
     private Long id;
22 22
 
23 23
     @JsonFormat(pattern = "yyyy-MM-dd")
24
-    @Excel(name = "事件日期", width = 20, dateFormat = "yyyy-MM-dd")
24
+    @Excel(name = "时间", width = 20, dateFormat = "yyyy-MM-dd")
25 25
     private Date recordDate;
26 26
 
27 27
     @Excel(name = "航班号")
@@ -30,27 +30,22 @@ public class LedgerUnsafeEvent extends BaseEntity {
30 30
     @Excel(name = "部门名称")
31 31
     private String deptName;
32 32
 
33
-    @Excel(name = "队室/班组")
33
+    private Long deptId;
34
+
34 35
     private String teamName;
35 36
 
36
-    @Excel(name = "队室内勤")
37
-    private String teamInternalDuty;
37
+    private Long teamId;
38 38
 
39
-    @Excel(name = "小组")
40 39
     private String groupName;
41 40
 
42 41
     private Long groupId;
43 42
 
44
-    private Long deptId;
45
-
46
-    private Long teamId;
47
-
48 43
     @Excel(name = "责任人")
49 44
     private String responsibleName;
50 45
 
51 46
     private Long responsibleId;
52 47
 
53
-    @Excel(name = "事件类型")
48
+    @Excel(name = "类别")
54 49
     private String eventType;
55 50
 
56 51
     @Excel(name = "涉及物品")
@@ -69,24 +64,18 @@ public class LedgerUnsafeEvent extends BaseEntity {
69 64
     @Excel(name = "通道号")
70 65
     private String channelNo;
71 66
 
72
-    @Excel(name = "图像")
67
+    @Excel(name = "附件")
73 68
     private String image;
74 69
 
75 70
     @Excel(name = "事件描述")
76 71
     private String eventDesc;
77 72
 
78
-    @Excel(name = "处理结果")
79
-    private String resultHandling;
80
-
81 73
     @Excel(name = "扣分")
82 74
     private BigDecimal deductScore;
83 75
 
84 76
     @Excel(name = "佐证附件")
85 77
     private String evidenceFile;
86 78
 
87
-    @Excel(name = "备注")
88
-    private String remark;
89
-
90 79
     private String importBatch;
91 80
 
92 81
     @Excel(name = "数据来源")
@@ -107,11 +96,14 @@ public class LedgerUnsafeEvent extends BaseEntity {
107 96
     public String getDeptName() { return deptName; }
108 97
     public void setDeptName(String deptName) { this.deptName = deptName; }
109 98
 
99
+    public Long getDeptId() { return deptId; }
100
+    public void setDeptId(Long deptId) { this.deptId = deptId; }
101
+
110 102
     public String getTeamName() { return teamName; }
111 103
     public void setTeamName(String teamName) { this.teamName = teamName; }
112 104
 
113
-    public String getTeamInternalDuty() { return teamInternalDuty; }
114
-    public void setTeamInternalDuty(String teamInternalDuty) { this.teamInternalDuty = teamInternalDuty; }
105
+    public Long getTeamId() { return teamId; }
106
+    public void setTeamId(Long teamId) { this.teamId = teamId; }
115 107
 
116 108
     public String getGroupName() { return groupName; }
117 109
     public void setGroupName(String groupName) { this.groupName = groupName; }
@@ -119,12 +111,6 @@ public class LedgerUnsafeEvent extends BaseEntity {
119 111
     public Long getGroupId() { return groupId; }
120 112
     public void setGroupId(Long groupId) { this.groupId = groupId; }
121 113
 
122
-    public Long getDeptId() { return deptId; }
123
-    public void setDeptId(Long deptId) { this.deptId = deptId; }
124
-
125
-    public Long getTeamId() { return teamId; }
126
-    public void setTeamId(Long teamId) { this.teamId = teamId; }
127
-
128 114
     public String getResponsibleName() { return responsibleName; }
129 115
     public void setResponsibleName(String responsibleName) { this.responsibleName = responsibleName; }
130 116
 
@@ -158,18 +144,12 @@ public class LedgerUnsafeEvent extends BaseEntity {
158 144
     public String getEventDesc() { return eventDesc; }
159 145
     public void setEventDesc(String eventDesc) { this.eventDesc = eventDesc; }
160 146
 
161
-    public String getResultHandling() { return resultHandling; }
162
-    public void setResultHandling(String resultHandling) { this.resultHandling = resultHandling; }
163
-
164 147
     public BigDecimal getDeductScore() { return deductScore; }
165 148
     public void setDeductScore(BigDecimal deductScore) { this.deductScore = deductScore; }
166 149
 
167 150
     public String getEvidenceFile() { return evidenceFile; }
168 151
     public void setEvidenceFile(String evidenceFile) { this.evidenceFile = evidenceFile; }
169 152
 
170
-    public String getRemark() { return remark; }
171
-    public void setRemark(String remark) { this.remark = remark; }
172
-
173 153
     public String getImportBatch() { return importBatch; }
174 154
     public void setImportBatch(String importBatch) { this.importBatch = importBatch; }
175 155
 

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

@@ -630,7 +630,7 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
630 630
 
631 631
     /** 8. 不安全事件 → ledger_unsafe_event
632 632
      * R2: 时间(0) 事件描述(1) 类别(2) 航班号(3) 责任人(4)
633
-     *     涉及班组(5) 涉及物品(6) 岗位(7) 区域(8) 通道号(9) 图像(10)
633
+     *     涉及物品(5) 岗位(6) 区域(7) 通道号(8) 附件(9)
634 634
      */
635 635
     private int doUnsafeEvent(Sheet sheet, String batchNo, String username) {
636 636
         List<LedgerUnsafeEvent> list = new ArrayList<>();
@@ -642,12 +642,11 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
642 642
             o.setFlightNo(str(c, 3));
643 643
             String responsibleName = str(c, 4);
644 644
             o.setResponsibleName(responsibleName);
645
-            o.setTeamName(str(c, 5));
646
-            o.setInvolvedItems(str(c, 6));
647
-            o.setPosition(str(c, 7));
648
-            o.setArea(str(c, 8));
649
-            o.setChannelNo(str(c, 9));
650
-            o.setImage(str(c, 10));
645
+            o.setInvolvedItems(str(c, 5));
646
+            o.setPosition(str(c, 6));
647
+            o.setArea(str(c, 7));
648
+            o.setChannelNo(str(c, 8));
649
+            o.setImage(str(c, 9));
651 650
             
652 651
             // 使用缓存查找组织信息和名称
653 652
             Map<String, Object> orgInfo = resolveOrgInfoByNameWithCache(responsibleName);

+ 7 - 6
airport-ledger/src/main/resources/mapper/ledger/LedgerUnsafeEventMapper.xml

@@ -9,7 +9,6 @@
9 9
         <result property="deptName" column="dept_name" />
10 10
         <result property="deptId" column="dept_id" />
11 11
         <result property="teamName" column="team_name" />
12
-        <result property="teamInternalDuty" column="team_internal_duty" />
13 12
         <result property="teamId" column="team_id" />
14 13
         <result property="groupName" column="group_name" />
15 14
         <result property="groupId" column="group_id" />
@@ -24,10 +23,8 @@
24 23
         <result property="channelNo" column="channel_no" />
25 24
         <result property="image" column="image" />
26 25
         <result property="eventDesc" column="event_desc" />
27
-        <result property="resultHandling" column="result_handling" />
28 26
         <result property="deductScore" column="deduct_score" />
29 27
         <result property="evidenceFile" column="evidence_file" />
30
-        <result property="remark" column="remark" />
31 28
         <result property="importBatch" column="import_batch" />
32 29
         <result property="sourceType" column="source_type" />
33 30
         <result property="createBy"   column="create_by"   />
@@ -38,7 +35,11 @@
38 35
     </resultMap>
39 36
 
40 37
     <sql id="selectVo">
41
-        SELECT id, record_date, flight_no, dept_name, dept_id, team_name, team_internal_duty, team_id, group_name, group_id, responsible_name, responsible_id, event_type, involved_items, position, position_id, area, area_id, channel_no, image, event_desc, result_handling, deduct_score, evidence_file, remark, import_batch, source_type, create_by, create_time, update_by, update_time, sync_flag
38
+        SELECT id, record_date, flight_no, dept_name, dept_id, team_name, team_id, group_name, group_id,
39
+               responsible_name, responsible_id, event_type, involved_items,
40
+               position, position_id, area, area_id, channel_no, image, event_desc,
41
+               deduct_score, evidence_file,
42
+               import_batch, source_type, create_by, create_time, update_by, update_time, sync_flag
42 43
         FROM ledger_unsafe_event
43 44
         WHERE del_flag = '0'
44 45
     </sql>
@@ -50,10 +51,10 @@
50 51
         <if test="responsibleName != null and responsibleName != ''">AND responsible_name LIKE CONCAT('%', #{responsibleName}, '%')</if>
51 52
         <if test="syncFlag != null and syncFlag != ''">AND sync_flag = #{syncFlag}</if>
52 53
         <if test="params != null and params.beginTime != null and params.beginTime != ''">
53
-            AND (record_date &gt;= #{params.beginTime} OR approve_date &gt;= #{params.beginTime} OR exam_date &gt;= #{params.beginTime})
54
+            AND record_date &gt;= #{params.beginTime}
54 55
         </if>
55 56
         <if test="params != null and params.endTime != null and params.endTime != ''">
56
-            AND (record_date &lt;= #{params.endTime} OR approve_date &lt;= #{params.endTime} OR exam_date &lt;= #{params.endTime})
57
+            AND record_date &lt;= #{params.endTime}
57 58
         </if>
58 59
         ORDER BY id DESC
59 60
     </select>