|
|
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
4
|
4
|
import com.baomidou.mybatisplus.extension.service.IService;
|
|
5
|
5
|
import com.sundot.airport.common.core.domain.entity.SysDept;
|
|
6
|
6
|
import com.sundot.airport.common.core.domain.entity.SysUser;
|
|
|
7
|
+import com.sundot.airport.system.domain.SysPost;
|
|
|
8
|
+import com.sundot.airport.system.domain.BasePosition;
|
|
7
|
9
|
import com.sundot.airport.ledger.domain.*;
|
|
8
|
10
|
import com.sundot.airport.ledger.domain.LedgerDailyTraining;
|
|
9
|
11
|
import com.sundot.airport.ledger.domain.LedgerLeaderDuty;
|
|
|
@@ -18,6 +20,8 @@ import com.sundot.airport.ledger.service.ILedgerDormFireSafetyService;
|
|
18
|
20
|
import com.sundot.airport.ledger.service.ILedgerTrainingIssueService;
|
|
19
|
21
|
import com.sundot.airport.system.mapper.SysDeptMapper;
|
|
20
|
22
|
import com.sundot.airport.system.mapper.SysUserMapper;
|
|
|
23
|
+import com.sundot.airport.system.mapper.SysPostMapper;
|
|
|
24
|
+import com.sundot.airport.system.mapper.BasePositionMapper;
|
|
21
|
25
|
import org.apache.poi.ss.usermodel.*;
|
|
22
|
26
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
23
|
27
|
import org.springframework.stereotype.Service;
|
|
|
@@ -60,6 +64,8 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
|
|
60
|
64
|
@Autowired private IScoreEventService scoreEventService;
|
|
61
|
65
|
@Autowired private SysUserMapper sysUserMapper;
|
|
62
|
66
|
@Autowired private SysDeptMapper sysDeptMapper;
|
|
|
67
|
+ @Autowired private SysPostMapper sysPostMapper;
|
|
|
68
|
+ @Autowired private BasePositionMapper basePositionMapper;
|
|
63
|
69
|
|
|
64
|
70
|
// 导入缓存(在导入开始时构建,导入结束后释放)
|
|
65
|
71
|
private ImportCache importCache;
|
|
|
@@ -156,25 +162,77 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
|
|
156
|
162
|
// ════════════════════════════════════════════════════════════════
|
|
157
|
163
|
|
|
158
|
164
|
/** 1. 部门监察问题记录表 → ledger_supervision_problem
|
|
159
|
|
- * R2: 时间(0) 区域(1) 工作点(2) 岗位(3) 责任人(4) 问题描述(5)
|
|
160
|
|
- * 问题类型(6) 整改措施(7) 依据(8) 问题层级(9) 班组(10)
|
|
161
|
|
- * 队室质控员(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)
|
|
162
|
170
|
*/
|
|
163
|
171
|
private int doSupervisionProblem(Sheet sheet, String batchNo, String username) {
|
|
164
|
172
|
List<LedgerSupervisionProblem> list = new ArrayList<>();
|
|
165
|
173
|
for (Object[] c : dataRows(sheet, 2)) {
|
|
166
|
174
|
LedgerSupervisionProblem o = new LedgerSupervisionProblem();
|
|
167
|
|
- o.setRecordDate(date(c, 0));
|
|
168
|
|
- o.setLocation(str(c, 1));
|
|
169
|
|
- o.setChannelNo(str(c, 2));
|
|
170
|
|
- o.setInspectedName(str(c, 4));
|
|
171
|
|
- o.setProblemDesc(str(c, 5));
|
|
172
|
|
- o.setProblemType(str(c, 6));
|
|
173
|
|
- o.setResultHandling(str(c, 7));
|
|
174
|
|
- o.setRemark(str(c, 8));
|
|
175
|
|
- o.setTeamName(str(c, 10));
|
|
176
|
|
- o.setInspectorName(str(c, 11));
|
|
177
|
|
- 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
|
+
|
|
178
|
236
|
o.setImportBatch(batchNo);
|
|
179
|
237
|
o.setSourceType("1");
|
|
180
|
238
|
o.setCreateBy(username);
|
|
|
@@ -296,28 +354,99 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
|
|
296
|
354
|
}
|
|
297
|
355
|
|
|
298
|
356
|
/** 6. 安保测试记录表(部门)→ ledger_security_test
|
|
299
|
|
- * R2: 时间(0) 区域→deptName(1) 通道→groupName(2) 测试项目(3) 被测人员(4) 被测岗位→testType(5)
|
|
300
|
|
- * 测试物品→problemDesc(6) 图片→evidenceFile(7) 是否通过→testResult(8) 层级→scoreIndicator(9)
|
|
301
|
|
- * 整改措施→resultHandling(10) 扣分(11) 整改材料→remark(12) 班组(13)
|
|
|
357
|
+ * 导入顺序:开展时间(0) 测试区域(1) 测试通道(2) 测试项目(3) 被测试人员(4) 被测试岗位(5)
|
|
|
358
|
+ * 测试物品(6) 开展项目图片或视频(7) 是否通过(8) 层级(9) 整改措施(10)
|
|
|
359
|
+ * 复查地点及时间(11) 整改材料(12) 班组(13) 推送队室质控员(14) 推送质控队长(15)
|
|
|
360
|
+ * 队室内勤(16) 点击推送至相关人员(17) 队室负责人(18)
|
|
302
|
361
|
*/
|
|
303
|
362
|
private int doSecurityTest(Sheet sheet, String batchNo, String username) {
|
|
304
|
363
|
List<LedgerSecurityTest> list = new ArrayList<>();
|
|
305
|
364
|
for (Object[] c : dataRows(sheet, 2)) {
|
|
306
|
365
|
LedgerSecurityTest o = new LedgerSecurityTest();
|
|
307
|
|
- o.setRecordDate(date(c, 0));
|
|
308
|
|
- o.setDeptName(str(c, 1));
|
|
309
|
|
- o.setGroupName(str(c, 2));
|
|
310
|
|
- o.setTestItem(str(c, 3));
|
|
311
|
|
- o.setTestedName(str(c, 4));
|
|
|
366
|
+
|
|
|
367
|
+ // 按照新的导入顺序映射字段
|
|
|
368
|
+ o.setRecordDate(date(c, 0)); // 开展时间
|
|
|
369
|
+ o.setRegion(str(c, 1)); // 测试区域
|
|
|
370
|
+ o.setChannel(str(c, 2)); // 测试通道
|
|
|
371
|
+ o.setTestItem(str(c, 3)); // 测试项目
|
|
|
372
|
+
|
|
|
373
|
+ // 被测试人员
|
|
|
374
|
+ String testedName = str(c, 4);
|
|
|
375
|
+ o.setTestedName(testedName);
|
|
|
376
|
+
|
|
|
377
|
+ // 被测试岗位
|
|
312
|
378
|
o.setTestType(str(c, 5));
|
|
|
379
|
+
|
|
|
380
|
+ // 测试物品→problemDesc
|
|
313
|
381
|
o.setProblemDesc(str(c, 6));
|
|
|
382
|
+
|
|
|
383
|
+ // 开展项目图片或视频→evidenceFile
|
|
314
|
384
|
o.setEvidenceFile(str(c, 7));
|
|
|
385
|
+
|
|
|
386
|
+ // 是否通过→testResult
|
|
315
|
387
|
o.setTestResult(str(c, 8));
|
|
|
388
|
+
|
|
|
389
|
+ // 层级→scoreIndicator
|
|
316
|
390
|
o.setScoreIndicator(str(c, 9));
|
|
|
391
|
+
|
|
|
392
|
+ // 整改措施→resultHandling
|
|
317
|
393
|
o.setResultHandling(str(c, 10));
|
|
318
|
|
- o.setDeductScore(decimal(c, 11));
|
|
319
|
|
- o.setRemark(str(c, 12));
|
|
320
|
|
- o.setTeamName(str(c, 13));
|
|
|
394
|
+
|
|
|
395
|
+ // 复查地点及时间
|
|
|
396
|
+ o.setReviewLocationTime(str(c, 11));
|
|
|
397
|
+
|
|
|
398
|
+ // 整改材料
|
|
|
399
|
+ o.setReviewMaterial(str(c, 12));
|
|
|
400
|
+
|
|
|
401
|
+ // 班组→teamName
|
|
|
402
|
+ String teamName = str(c, 13);
|
|
|
403
|
+ o.setTeamName(teamName);
|
|
|
404
|
+
|
|
|
405
|
+ // 推送队室质控员
|
|
|
406
|
+ o.setPushTeamQc(str(c, 14));
|
|
|
407
|
+
|
|
|
408
|
+ // 推送质控队长
|
|
|
409
|
+ o.setPushQcCaptain(str(c, 15));
|
|
|
410
|
+
|
|
|
411
|
+ // 队室内勤
|
|
|
412
|
+ o.setTeamInternalDuty(str(c, 16));
|
|
|
413
|
+
|
|
|
414
|
+ // 点击推送至相关人员
|
|
|
415
|
+ o.setPushToRelevant(str(c, 17));
|
|
|
416
|
+
|
|
|
417
|
+ // 队室负责人
|
|
|
418
|
+ o.setTeamLeader(str(c, 18));
|
|
|
419
|
+
|
|
|
420
|
+ // 使用缓存查找组织信息(根据被测人名称)
|
|
|
421
|
+ if (testedName != null && !testedName.trim().isEmpty()) {
|
|
|
422
|
+ Map<String, Long> orgInfo = resolveOrgInfoByNameWithCache(testedName);
|
|
|
423
|
+ if (!orgInfo.isEmpty()) {
|
|
|
424
|
+ o.setTestedId(orgInfo.get("userId"));
|
|
|
425
|
+ o.setDeptId(orgInfo.get("deptId"));
|
|
|
426
|
+ o.setTeamId(orgInfo.get("teamId"));
|
|
|
427
|
+ o.setGroupId(orgInfo.get("groupId"));
|
|
|
428
|
+ }
|
|
|
429
|
+ }
|
|
|
430
|
+
|
|
|
431
|
+ // 根据岗位名称和区域名称查找ID
|
|
|
432
|
+ if (importCache != null) {
|
|
|
433
|
+ String positionName = str(c, 5); // 被测试岗位
|
|
|
434
|
+ if (positionName != null && !positionName.trim().isEmpty()) {
|
|
|
435
|
+ Long positionId = importCache.getPositionIdByName(positionName.trim());
|
|
|
436
|
+ if (positionId != null) {
|
|
|
437
|
+ o.setPositionId(positionId);
|
|
|
438
|
+ }
|
|
|
439
|
+ }
|
|
|
440
|
+
|
|
|
441
|
+ String areaName = str(c, 1); // 测试区域
|
|
|
442
|
+ if (areaName != null && !areaName.trim().isEmpty()) {
|
|
|
443
|
+ Long areaId = importCache.getAreaIdByName(areaName.trim());
|
|
|
444
|
+ if (areaId != null) {
|
|
|
445
|
+ o.setAreaId(areaId);
|
|
|
446
|
+ }
|
|
|
447
|
+ }
|
|
|
448
|
+ }
|
|
|
449
|
+
|
|
321
|
450
|
o.setImportBatch(batchNo);
|
|
322
|
451
|
o.setSourceType("1");
|
|
323
|
452
|
o.setCreateBy(username);
|
|
|
@@ -390,10 +519,44 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
|
|
390
|
519
|
o.setRecordDate(date(c, 0));
|
|
391
|
520
|
o.setEventDesc(str(c, 1));
|
|
392
|
521
|
o.setEventType(str(c, 2));
|
|
393
|
|
- o.setResponsibleName(str(c, 4));
|
|
|
522
|
+ o.setFlightNo(str(c, 3));
|
|
|
523
|
+ String responsibleName = str(c, 4);
|
|
|
524
|
+ o.setResponsibleName(responsibleName);
|
|
394
|
525
|
o.setTeamName(str(c, 5));
|
|
395
|
|
- o.setEvidenceFile(str(c, 10));
|
|
396
|
|
- o.setRemark(str(c, 8));
|
|
|
526
|
+ o.setInvolvedItems(str(c, 6));
|
|
|
527
|
+ o.setPosition(str(c, 7));
|
|
|
528
|
+ o.setArea(str(c, 8));
|
|
|
529
|
+ o.setChannelNo(str(c, 9));
|
|
|
530
|
+ o.setImage(str(c, 10));
|
|
|
531
|
+
|
|
|
532
|
+ // 使用缓存查找组织信息
|
|
|
533
|
+ Map<String, Long> orgInfo = resolveOrgInfoByNameWithCache(responsibleName);
|
|
|
534
|
+ if (!orgInfo.isEmpty()) {
|
|
|
535
|
+ o.setResponsibleId(orgInfo.get("userId"));
|
|
|
536
|
+ o.setDeptId(orgInfo.get("deptId"));
|
|
|
537
|
+ o.setTeamId(orgInfo.get("teamId"));
|
|
|
538
|
+ o.setGroupId(orgInfo.get("groupId"));
|
|
|
539
|
+ }
|
|
|
540
|
+
|
|
|
541
|
+ // 根据岗位名称和区域名称查找ID
|
|
|
542
|
+ if (importCache != null) {
|
|
|
543
|
+ String positionName = str(c, 7);
|
|
|
544
|
+ if (positionName != null && !positionName.trim().isEmpty()) {
|
|
|
545
|
+ Long positionId = importCache.getPositionIdByName(positionName.trim());
|
|
|
546
|
+ if (positionId != null) {
|
|
|
547
|
+ o.setPositionId(positionId);
|
|
|
548
|
+ }
|
|
|
549
|
+ }
|
|
|
550
|
+
|
|
|
551
|
+ String areaName = str(c, 8);
|
|
|
552
|
+ if (areaName != null && !areaName.trim().isEmpty()) {
|
|
|
553
|
+ Long areaId = importCache.getAreaIdByName(areaName.trim());
|
|
|
554
|
+ if (areaId != null) {
|
|
|
555
|
+ o.setAreaId(areaId);
|
|
|
556
|
+ }
|
|
|
557
|
+ }
|
|
|
558
|
+ }
|
|
|
559
|
+
|
|
397
|
560
|
o.setImportBatch(batchNo);
|
|
398
|
561
|
o.setSourceType("1");
|
|
399
|
562
|
o.setCreateBy(username);
|
|
|
@@ -448,6 +611,25 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
|
|
448
|
611
|
o.setTeamId(orgInfo.get("teamId"));
|
|
449
|
612
|
o.setGroupId(orgInfo.get("groupId"));
|
|
450
|
613
|
}
|
|
|
614
|
+
|
|
|
615
|
+ // 根据岗位名称和工作区域名称查找ID
|
|
|
616
|
+ if (importCache != null) {
|
|
|
617
|
+ String positionName = str(c, 7);
|
|
|
618
|
+ if (positionName != null && !positionName.trim().isEmpty()) {
|
|
|
619
|
+ Long positionId = importCache.getPositionIdByName(positionName.trim());
|
|
|
620
|
+ if (positionId != null) {
|
|
|
621
|
+ o.setPositionId(positionId);
|
|
|
622
|
+ }
|
|
|
623
|
+ }
|
|
|
624
|
+
|
|
|
625
|
+ String areaName = str(c, 4);
|
|
|
626
|
+ if (areaName != null && !areaName.trim().isEmpty()) {
|
|
|
627
|
+ Long areaId = importCache.getAreaIdByName(areaName.trim());
|
|
|
628
|
+ if (areaId != null) {
|
|
|
629
|
+ o.setAreaId(areaId);
|
|
|
630
|
+ }
|
|
|
631
|
+ }
|
|
|
632
|
+ }
|
|
451
|
633
|
|
|
452
|
634
|
o.setImportBatch(batchNo);
|
|
453
|
635
|
o.setSourceType("1");
|
|
|
@@ -920,10 +1102,15 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
|
|
920
|
1102
|
private static class ImportCache {
|
|
921
|
1103
|
private final Map<String, SysUser> userCache; // Map<昵称, 用户>
|
|
922
|
1104
|
private final Map<Long, SysDept> deptCache; // Map<部门ID, 部门>
|
|
|
1105
|
+ private final Map<String, Long> positionCache; // Map<岗位名称, 岗位ID>
|
|
|
1106
|
+ private final Map<String, Long> areaCache; // Map<区域名称, 区域ID>
|
|
923
|
1107
|
|
|
924
|
|
- public ImportCache(Map<String, SysUser> userCache, Map<Long, SysDept> deptCache) {
|
|
|
1108
|
+ public ImportCache(Map<String, SysUser> userCache, Map<Long, SysDept> deptCache,
|
|
|
1109
|
+ Map<String, Long> positionCache, Map<String, Long> areaCache) {
|
|
925
|
1110
|
this.userCache = userCache;
|
|
926
|
1111
|
this.deptCache = deptCache;
|
|
|
1112
|
+ this.positionCache = positionCache;
|
|
|
1113
|
+ this.areaCache = areaCache;
|
|
927
|
1114
|
}
|
|
928
|
1115
|
|
|
929
|
1116
|
public SysUser getUserByNickName(String nickName) {
|
|
|
@@ -933,6 +1120,14 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
|
|
933
|
1120
|
public SysDept getDeptById(Long deptId) {
|
|
934
|
1121
|
return deptCache.get(deptId);
|
|
935
|
1122
|
}
|
|
|
1123
|
+
|
|
|
1124
|
+ public Long getPositionIdByName(String positionName) {
|
|
|
1125
|
+ return positionCache.get(positionName);
|
|
|
1126
|
+ }
|
|
|
1127
|
+
|
|
|
1128
|
+ public Long getAreaIdByName(String areaName) {
|
|
|
1129
|
+ return areaCache.get(areaName);
|
|
|
1130
|
+ }
|
|
936
|
1131
|
}
|
|
937
|
1132
|
|
|
938
|
1133
|
// ════════════════════════════════════════════════════════════════
|
|
|
@@ -1019,8 +1214,33 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
|
|
1019
|
1214
|
}
|
|
1020
|
1215
|
}
|
|
1021
|
1216
|
|
|
|
1217
|
+ // 构建岗位缓存:Map<岗位名称, 岗位ID>
|
|
|
1218
|
+ Map<String, Long> positionCache = new HashMap<>();
|
|
|
1219
|
+ List<SysPost> allPosts = sysPostMapper.selectPostAll();
|
|
|
1220
|
+ if (allPosts != null) {
|
|
|
1221
|
+ for (SysPost post : allPosts) {
|
|
|
1222
|
+ if (post.getPostName() != null && !post.getPostName().trim().isEmpty()) {
|
|
|
1223
|
+ positionCache.put(post.getPostName().trim(), post.getPostId());
|
|
|
1224
|
+ }
|
|
|
1225
|
+ }
|
|
|
1226
|
+ }
|
|
|
1227
|
+
|
|
|
1228
|
+ // 构建区域缓存:Map<区域名称, 区域ID>
|
|
|
1229
|
+ // 从base_position表查询position_type='REGIONAL'的区域
|
|
|
1230
|
+ Map<String, Long> areaCache = new HashMap<>();
|
|
|
1231
|
+ BasePosition queryPosition = new BasePosition();
|
|
|
1232
|
+ queryPosition.setPositionType("REGIONAL");
|
|
|
1233
|
+ List<BasePosition> allAreas = basePositionMapper.selectBasePositionList(queryPosition);
|
|
|
1234
|
+ if (allAreas != null) {
|
|
|
1235
|
+ for (BasePosition area : allAreas) {
|
|
|
1236
|
+ if (area.getName() != null && !area.getName().trim().isEmpty()) {
|
|
|
1237
|
+ areaCache.put(area.getName().trim(), area.getId());
|
|
|
1238
|
+ }
|
|
|
1239
|
+ }
|
|
|
1240
|
+ }
|
|
|
1241
|
+
|
|
1022
|
1242
|
// 创建统一缓存对象
|
|
1023
|
|
- this.importCache = new ImportCache(userCache, deptCache);
|
|
|
1243
|
+ this.importCache = new ImportCache(userCache, deptCache, positionCache, areaCache);
|
|
1024
|
1244
|
}
|
|
1025
|
1245
|
|
|
1026
|
1246
|
/**
|