소스 검색

ledger_supervision_problem表新增字段和导入功能字段数据新增

wangxx 4 주 전
부모
커밋
20fc3185ec

+ 127 - 0
airport-ledger/src/main/java/com/sundot/airport/ledger/domain/LedgerSupervisionProblem.java

@@ -27,21 +27,34 @@ public class LedgerSupervisionProblem extends BaseEntity {
27 27
     @Excel(name = "部门名称")
28 28
     private String deptName;
29 29
 
30
+    private Long deptId;
31
+
30 32
     @Excel(name = "队室/班组")
31 33
     private String teamName;
32 34
 
35
+    private Long teamId;
36
+
33 37
     @Excel(name = "小组")
34 38
     private String groupName;
35 39
 
40
+    private Long groupId;
41
+
42
+    private Long areaId;
43
+
36 44
     @Excel(name = "巡查人")
37 45
     private String inspectorName;
38 46
 
39 47
     @Excel(name = "被查人")
40 48
     private String inspectedName;
41 49
 
50
+    private Long inspectedId;
51
+
42 52
     @Excel(name = "问题类型")
43 53
     private String problemType;
44 54
 
55
+    @Excel(name = "问题层级")
56
+    private String problemLevel;
57
+
45 58
     @Excel(name = "问题描述")
46 59
     private String problemDesc;
47 60
 
@@ -51,9 +64,57 @@ public class LedgerSupervisionProblem extends BaseEntity {
51 64
     @Excel(name = "通道号")
52 65
     private String channelNo;
53 66
 
67
+    @Excel(name = "岗位")
68
+    private String position;
69
+
70
+    private Long positionId;
71
+
54 72
     @Excel(name = "处理结果")
55 73
     private String resultHandling;
56 74
 
75
+    @Excel(name = "依据")
76
+    private String basis;
77
+
78
+    @Excel(name = "队室质控员")
79
+    private String qualityOfficer;
80
+
81
+    @Excel(name = "质控推送队室负责人")
82
+    private String qualityPushLeader;
83
+
84
+    @Excel(name = "整改情况")
85
+    private String rectificationStatus;
86
+
87
+    @Excel(name = "佐证材料")
88
+    private String evidenceMaterial;
89
+
90
+    @Excel(name = "发送至相关人员")
91
+    private String sendToRelevant;
92
+
93
+    @Excel(name = "本月内发生问题次数")
94
+    private Integer monthlyProblemCount;
95
+
96
+    @Excel(name = "上月质控问题超过三次人员")
97
+    private String lastMonthExceedThree;
98
+
99
+    @Excel(name = "检查人员")
100
+    private String checkPersonnel;
101
+
102
+    @Excel(name = "分管质控经理")
103
+    private String manageQcManager;
104
+
105
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
106
+    @Excel(name = "录入时间", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
107
+    private Date inputTime;
108
+
109
+    @Excel(name = "部门培训教员")
110
+    private String deptTrainingInstructor;
111
+
112
+    @Excel(name = "队室内勤")
113
+    private String teamInternalDuty;
114
+
115
+    @Excel(name = "队室负责人")
116
+    private String teamLeader;
117
+
57 118
     @Excel(name = "扣分")
58 119
     private BigDecimal deductScore;
59 120
 
@@ -86,21 +147,39 @@ public class LedgerSupervisionProblem extends BaseEntity {
86 147
     public String getDeptName() { return deptName; }
87 148
     public void setDeptName(String deptName) { this.deptName = deptName; }
88 149
 
150
+    public Long getDeptId() { return deptId; }
151
+    public void setDeptId(Long deptId) { this.deptId = deptId; }
152
+
89 153
     public String getTeamName() { return teamName; }
90 154
     public void setTeamName(String teamName) { this.teamName = teamName; }
91 155
 
156
+    public Long getTeamId() { return teamId; }
157
+    public void setTeamId(Long teamId) { this.teamId = teamId; }
158
+
92 159
     public String getGroupName() { return groupName; }
93 160
     public void setGroupName(String groupName) { this.groupName = groupName; }
94 161
 
162
+    public Long getGroupId() { return groupId; }
163
+    public void setGroupId(Long groupId) { this.groupId = groupId; }
164
+
165
+    public Long getAreaId() { return areaId; }
166
+    public void setAreaId(Long areaId) { this.areaId = areaId; }
167
+
95 168
     public String getInspectorName() { return inspectorName; }
96 169
     public void setInspectorName(String inspectorName) { this.inspectorName = inspectorName; }
97 170
 
98 171
     public String getInspectedName() { return inspectedName; }
99 172
     public void setInspectedName(String inspectedName) { this.inspectedName = inspectedName; }
100 173
 
174
+    public Long getInspectedId() { return inspectedId; }
175
+    public void setInspectedId(Long inspectedId) { this.inspectedId = inspectedId; }
176
+
101 177
     public String getProblemType() { return problemType; }
102 178
     public void setProblemType(String problemType) { this.problemType = problemType; }
103 179
 
180
+    public String getProblemLevel() { return problemLevel; }
181
+    public void setProblemLevel(String problemLevel) { this.problemLevel = problemLevel; }
182
+
104 183
     public String getProblemDesc() { return problemDesc; }
105 184
     public void setProblemDesc(String problemDesc) { this.problemDesc = problemDesc; }
106 185
 
@@ -110,9 +189,57 @@ public class LedgerSupervisionProblem extends BaseEntity {
110 189
     public String getChannelNo() { return channelNo; }
111 190
     public void setChannelNo(String channelNo) { this.channelNo = channelNo; }
112 191
 
192
+    public String getPosition() { return position; }
193
+    public void setPosition(String position) { this.position = position; }
194
+
195
+    public Long getPositionId() { return positionId; }
196
+    public void setPositionId(Long positionId) { this.positionId = positionId; }
197
+
113 198
     public String getResultHandling() { return resultHandling; }
114 199
     public void setResultHandling(String resultHandling) { this.resultHandling = resultHandling; }
115 200
 
201
+    public String getBasis() { return basis; }
202
+    public void setBasis(String basis) { this.basis = basis; }
203
+
204
+    public String getQualityOfficer() { return qualityOfficer; }
205
+    public void setQualityOfficer(String qualityOfficer) { this.qualityOfficer = qualityOfficer; }
206
+
207
+    public String getQualityPushLeader() { return qualityPushLeader; }
208
+    public void setQualityPushLeader(String qualityPushLeader) { this.qualityPushLeader = qualityPushLeader; }
209
+
210
+    public String getRectificationStatus() { return rectificationStatus; }
211
+    public void setRectificationStatus(String rectificationStatus) { this.rectificationStatus = rectificationStatus; }
212
+
213
+    public String getEvidenceMaterial() { return evidenceMaterial; }
214
+    public void setEvidenceMaterial(String evidenceMaterial) { this.evidenceMaterial = evidenceMaterial; }
215
+
216
+    public String getSendToRelevant() { return sendToRelevant; }
217
+    public void setSendToRelevant(String sendToRelevant) { this.sendToRelevant = sendToRelevant; }
218
+
219
+    public Integer getMonthlyProblemCount() { return monthlyProblemCount; }
220
+    public void setMonthlyProblemCount(Integer monthlyProblemCount) { this.monthlyProblemCount = monthlyProblemCount; }
221
+
222
+    public String getLastMonthExceedThree() { return lastMonthExceedThree; }
223
+    public void setLastMonthExceedThree(String lastMonthExceedThree) { this.lastMonthExceedThree = lastMonthExceedThree; }
224
+
225
+    public String getCheckPersonnel() { return checkPersonnel; }
226
+    public void setCheckPersonnel(String checkPersonnel) { this.checkPersonnel = checkPersonnel; }
227
+
228
+    public String getManageQcManager() { return manageQcManager; }
229
+    public void setManageQcManager(String manageQcManager) { this.manageQcManager = manageQcManager; }
230
+
231
+    public Date getInputTime() { return inputTime; }
232
+    public void setInputTime(Date inputTime) { this.inputTime = inputTime; }
233
+
234
+    public String getDeptTrainingInstructor() { return deptTrainingInstructor; }
235
+    public void setDeptTrainingInstructor(String deptTrainingInstructor) { this.deptTrainingInstructor = deptTrainingInstructor; }
236
+
237
+    public String getTeamInternalDuty() { return teamInternalDuty; }
238
+    public void setTeamInternalDuty(String teamInternalDuty) { this.teamInternalDuty = teamInternalDuty; }
239
+
240
+    public String getTeamLeader() { return teamLeader; }
241
+    public void setTeamLeader(String teamLeader) { this.teamLeader = teamLeader; }
242
+
116 243
     public BigDecimal getDeductScore() { return deductScore; }
117 244
     public void setDeductScore(BigDecimal deductScore) { this.deductScore = deductScore; }
118 245
 

+ 66 - 14
airport-ledger/src/main/java/com/sundot/airport/ledger/service/impl/LedgerCombinedImportServiceImpl.java

@@ -162,25 +162,77 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
162 162
     // ════════════════════════════════════════════════════════════════
163 163
 
164 164
     /** 1. 部门监察问题记录表 → ledger_supervision_problem
165
-     * R2: 时间(0) 区域(1) 工作点(2) 岗位(3) 责任人(4) 问题描述(5)
166
-     *     问题类型(6) 整改措施(7) 依据(8) 问题层级(9) 班组(10)
167
-     *     队室质控员(11) ... 附件(13)
165
+     * 导入顺序:时间(0) 区域(1) 工作点(2) 岗位(3) 责任人(4) 问题描述(5)
166
+     *          问题类型(6) 整改措施(7) 依据(8) 问题层级(9) 班组(10)
167
+     *          队室质控员(11) 质控推送队室负责人(12) 附件(13) 整改情况(14) 佐证材料(15)
168
+     *          发送至相关人员(16) 本月内发生问题次数(17) 上月质控问题超过三次人员(18)
169
+     *          检查人员(19) 分管质控经理(20) 录入时间(21) 部门培训教员(22) 队室内勤(23) 队室负责人(24)
168 170
      */
169 171
     private int doSupervisionProblem(Sheet sheet, String batchNo, String username) {
170 172
         List<LedgerSupervisionProblem> list = new ArrayList<>();
171 173
         for (Object[] c : dataRows(sheet, 2)) {
172 174
             LedgerSupervisionProblem o = new LedgerSupervisionProblem();
173
-            o.setRecordDate(date(c, 0));
174
-            o.setLocation(str(c, 1));
175
-            o.setChannelNo(str(c, 2));
176
-            o.setInspectedName(str(c, 4));
177
-            o.setProblemDesc(str(c, 5));
178
-            o.setProblemType(str(c, 6));
179
-            o.setResultHandling(str(c, 7));
180
-            o.setRemark(str(c, 8));
181
-            o.setTeamName(str(c, 10));
182
-            o.setInspectorName(str(c, 11));
183
-            o.setEvidenceFile(str(c, 13));
175
+            
176
+            // 按导入顺序映射字段
177
+            o.setRecordDate(date(c, 0));        // 时间
178
+            o.setLocation(str(c, 1));           // 区域
179
+            o.setChannelNo(str(c, 2));          // 工作点
180
+            o.setPosition(str(c, 3));           // 岗位
181
+            String inspectedName = str(c, 4);   // 责任人
182
+            o.setInspectedName(inspectedName);
183
+            o.setProblemDesc(str(c, 5));        // 问题描述
184
+            o.setProblemType(str(c, 6));        // 问题类型
185
+            o.setResultHandling(str(c, 7));     // 整改措施
186
+            o.setBasis(str(c, 8));              // 依据
187
+            o.setProblemLevel(str(c, 9));       // 问题层级
188
+            o.setTeamName(str(c, 10));          // 班组
189
+            o.setQualityOfficer(str(c, 11));    // 队室质控员
190
+            o.setQualityPushLeader(str(c, 12)); // 质控推送队室负责人
191
+            o.setEvidenceFile(str(c, 13));      // 附件
192
+            o.setRectificationStatus(str(c, 14)); // 整改情况
193
+            o.setEvidenceMaterial(str(c, 15));  // 佐证材料
194
+            o.setSendToRelevant(str(c, 16));    // 发送至相关人员
195
+            o.setMonthlyProblemCount(integer(c, 17)); // 本月内发生问题次数
196
+            o.setLastMonthExceedThree(str(c, 18)); // 上月质控问题超过三次人员
197
+            o.setCheckPersonnel(str(c, 19));    // 检查人员
198
+            o.setManageQcManager(str(c, 20));   // 分管质控经理
199
+            o.setInputTime(date(c, 21));        // 录入时间
200
+            o.setDeptTrainingInstructor(str(c, 22)); // 部门培训教员
201
+            o.setTeamInternalDuty(str(c, 23));  // 队室内勤
202
+            o.setTeamLeader(str(c, 24));        // 队室负责人
203
+            
204
+            // 根据责任人名称查找组织ID
205
+            if (inspectedName != null && !inspectedName.trim().isEmpty()) {
206
+                Map<String, Long> orgInfo = resolveOrgInfoByNameWithCache(inspectedName);
207
+                if (!orgInfo.isEmpty()) {
208
+                    o.setInspectedId(orgInfo.get("userId"));
209
+                    o.setDeptId(orgInfo.get("deptId"));
210
+                    o.setTeamId(orgInfo.get("teamId"));
211
+                    o.setGroupId(orgInfo.get("groupId"));
212
+                }
213
+            }
214
+            
215
+            // 根据岗位和区域查找对应ID
216
+            if (importCache != null) {
217
+                // 岗位ID
218
+                String positionName = o.getPosition();
219
+                if (positionName != null && !positionName.trim().isEmpty()) {
220
+                    Long positionId = importCache.getPositionIdByName(positionName.trim());
221
+                    if (positionId != null) {
222
+                        o.setPositionId(positionId);
223
+                    }
224
+                }
225
+                
226
+                // 区域ID
227
+                String areaName = o.getLocation();
228
+                if (areaName != null && !areaName.trim().isEmpty()) {
229
+                    Long areaId = importCache.getAreaIdByName(areaName.trim());
230
+                    if (areaId != null) {
231
+                        o.setAreaId(areaId);
232
+                    }
233
+                }
234
+            }
235
+            
184 236
             o.setImportBatch(batchNo);
185 237
             o.setSourceType("1");
186 238
             o.setCreateBy(username);

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

@@ -182,8 +182,8 @@ public class LedgerSyncServiceImpl implements ILedgerSyncService {
182 182
             String src = "supervision_problem:" + row.getId();
183 183
             if (existsBySrc(src)) { skip++; continue; }
184 184
             if (!hasName(row.getInspectedName())) { skip++; continue; }
185
-            // 按问题层级选取L3指标和默认分值
186
-            String level = row.getProblemType() != null ? row.getProblemType() : "";
185
+            // 按问题层级选取L3指标和默认分值(修正:取problemLevel字段)
186
+            String level = row.getProblemLevel() != null ? row.getProblemLevel() : "";
187 187
             long l3Id; BigDecimal defaultSv;
188 188
             if (level.contains("上级")) { l3Id = IND_SUPERVISION_L3_LEADER; defaultSv = BigDecimal.valueOf(-1.20); }
189 189
             else if (level.contains("部门")) { l3Id = IND_SUPERVISION_L3_DEPT; defaultSv = BigDecimal.valueOf(-0.80); }

+ 28 - 4
airport-ledger/src/main/resources/mapper/ledger/LedgerSupervisionProblemMapper.xml

@@ -6,15 +6,37 @@
6 6
         <id     property="id"               column="id"               />
7 7
         <result property="recordDate"       column="record_date"      />
8 8
         <result property="deptName"         column="dept_name"        />
9
+        <result property="deptId"           column="dept_id"          />
9 10
         <result property="teamName"         column="team_name"        />
11
+        <result property="teamId"           column="team_id"          />
10 12
         <result property="groupName"        column="group_name"       />
13
+        <result property="groupId"          column="group_id"         />
14
+        <result property="areaId"           column="area_id"          />
11 15
         <result property="inspectorName"    column="inspector_name"   />
12 16
         <result property="inspectedName"    column="inspected_name"   />
17
+        <result property="inspectedId"      column="inspected_id"     />
13 18
         <result property="problemType"      column="problem_type"     />
19
+        <result property="problemLevel"     column="problem_level"    />
14 20
         <result property="problemDesc"      column="problem_desc"     />
15 21
         <result property="location"         column="location"         />
16 22
         <result property="channelNo"        column="channel_no"       />
23
+        <result property="position"         column="position"         />
24
+        <result property="positionId"       column="position_id"      />
17 25
         <result property="resultHandling"   column="result_handling"  />
26
+        <result property="basis"            column="basis"            />
27
+        <result property="qualityOfficer"   column="quality_officer"  />
28
+        <result property="qualityPushLeader" column="quality_push_leader" />
29
+        <result property="rectificationStatus" column="rectification_status" />
30
+        <result property="evidenceMaterial" column="evidence_material" />
31
+        <result property="sendToRelevant"   column="send_to_relevant" />
32
+        <result property="monthlyProblemCount" column="monthly_problem_count" />
33
+        <result property="lastMonthExceedThree" column="last_month_exceed_three" />
34
+        <result property="checkPersonnel"   column="check_personnel"  />
35
+        <result property="manageQcManager"  column="manage_qc_manager" />
36
+        <result property="inputTime"        column="input_time"       />
37
+        <result property="deptTrainingInstructor" column="dept_training_instructor" />
38
+        <result property="teamInternalDuty" column="team_internal_duty" />
39
+        <result property="teamLeader"       column="team_leader"      />
18 40
         <result property="deductScore"      column="deduct_score"     />
19 41
         <result property="addScore"         column="add_score"        />
20 42
         <result property="scoreDimension"   column="score_dimension"  />
@@ -30,10 +52,12 @@
30 52
     </resultMap>
31 53
 
32 54
     <sql id="selectVo">
33
-        SELECT id, record_date, dept_name, team_name, group_name,
34
-               inspector_name, inspected_name, problem_type, problem_desc, location,
35
-               channel_no, result_handling, deduct_score, add_score,
36
-               score_dimension, score_indicator, evidence_file, remark,
55
+        SELECT id, record_date, dept_name, dept_id, team_name, team_id, group_name, group_id, area_id,
56
+               inspector_name, inspected_name, inspected_id, problem_type, problem_level, problem_desc, location,
57
+               channel_no, position, position_id, result_handling, basis, quality_officer, quality_push_leader,
58
+               rectification_status, evidence_material, send_to_relevant, monthly_problem_count, last_month_exceed_three,
59
+               check_personnel, manage_qc_manager, input_time, dept_training_instructor, team_internal_duty, team_leader,
60
+               deduct_score, add_score, score_dimension, score_indicator, evidence_file, remark,
37 61
                import_batch, source_type, create_by, create_time, update_by, update_time
38 62
         FROM ledger_supervision_problem
39 63
         WHERE del_flag = '0'