|
|
@@ -413,22 +413,76 @@ public class LedgerCombinedImportServiceImpl implements ILedgerCombinedImportSer
|
|
413
|
413
|
}
|
|
414
|
414
|
|
|
415
|
415
|
/** 4. 服务巡查 → ledger_service_patrol
|
|
416
|
|
- * R2: 时间(0) 区域(1) 工作点(2) 岗位(3) 责任人(4) 问题描述(5)
|
|
417
|
|
- * 问题类型(6) 整改措施(7) 班组(8) ... 附件(12) ... 检查人员(17)
|
|
|
416
|
+ * 导入顺序:时间(0) 区域(1) 工作点(2) 岗位(3) 责任人(4) 问题描述(5)
|
|
|
417
|
+ * 问题类型(6) 整改措施(7) 班组(8) 问题层级(9) 队室服务联络人(10)
|
|
|
418
|
+ * 服务推送队室负责人(11) 附件(12) 整改情况(13) 佐证材料(14)
|
|
|
419
|
+ * 发送至相关人员(15) 本月内发生问题次数(16) 检查人员(17)
|
|
|
420
|
+ * 分管服务经理(18) 队室内勤(19) 队室负责人(20)
|
|
418
|
421
|
*/
|
|
419
|
422
|
private int doServicePatrol(Sheet sheet, String batchNo, String username) {
|
|
420
|
423
|
List<LedgerServicePatrol> list = new ArrayList<>();
|
|
421
|
424
|
for (Object[] c : dataRows(sheet, 2)) {
|
|
422
|
425
|
LedgerServicePatrol o = new LedgerServicePatrol();
|
|
423
|
|
- o.setRecordDate(date(c, 0));
|
|
424
|
|
- o.setLocation(str(c, 1));
|
|
425
|
|
- o.setInspectedName(str(c, 4));
|
|
426
|
|
- o.setProblemDesc(str(c, 5));
|
|
427
|
|
- o.setServiceType(str(c, 6));
|
|
428
|
|
- o.setResultHandling(str(c, 7));
|
|
429
|
|
- o.setTeamName(str(c, 8));
|
|
430
|
|
- o.setEvidenceFile(str(c, 12));
|
|
431
|
|
- o.setInspectorName(str(c, 17));
|
|
|
426
|
+
|
|
|
427
|
+ // 按照新的导入顺序映射字段
|
|
|
428
|
+ o.setRecordDate(date(c, 0)); // 时间
|
|
|
429
|
+ o.setLocation(str(c, 1)); // 区域
|
|
|
430
|
+ o.setChannelNo(str(c, 2)); // 工作点
|
|
|
431
|
+ String positionName = str(c, 3); // 岗位
|
|
|
432
|
+ o.setPosition(positionName);
|
|
|
433
|
+ String inspectedName = str(c, 4); // 责任人
|
|
|
434
|
+ o.setInspectedName(inspectedName);
|
|
|
435
|
+ o.setProblemDesc(str(c, 5)); // 问题描述
|
|
|
436
|
+ o.setServiceType(str(c, 6)); // 问题类型
|
|
|
437
|
+ o.setResultHandling(str(c, 7)); // 整改措施
|
|
|
438
|
+ o.setTeamName(str(c, 8)); // 班组
|
|
|
439
|
+ o.setProblemLevel(str(c, 9)); // 问题层级
|
|
|
440
|
+ o.setServiceContactPerson(str(c, 10)); // 队室服务联络人
|
|
|
441
|
+ o.setServicePushLeader(str(c, 11)); // 服务推送队室负责人
|
|
|
442
|
+ o.setEvidenceFile(str(c, 12)); // 附件
|
|
|
443
|
+ o.setRectificationStatus(str(c, 13)); // 整改情况
|
|
|
444
|
+ o.setEvidenceMaterial(str(c, 14)); // 佐证材料
|
|
|
445
|
+ o.setSendToRelevant(str(c, 15)); // 发送至相关人员
|
|
|
446
|
+ o.setMonthlyProblemCount(integer(c, 16)); // 本月内发生问题次数
|
|
|
447
|
+ o.setCheckPersonnel(str(c, 17)); // 检查人员
|
|
|
448
|
+ o.setManageServiceManager(str(c, 18)); // 分管服务经理
|
|
|
449
|
+ o.setTeamInternalDuty(str(c, 19)); // 队室内勤
|
|
|
450
|
+ o.setTeamLeader(str(c, 20)); // 队室负责人
|
|
|
451
|
+
|
|
|
452
|
+ // 根据责任人名称查找组织ID和名称
|
|
|
453
|
+ if (inspectedName != null && !inspectedName.trim().isEmpty()) {
|
|
|
454
|
+ Map<String, Object> orgInfo = resolveOrgInfoByNameWithCache(inspectedName);
|
|
|
455
|
+ if (!orgInfo.isEmpty()) {
|
|
|
456
|
+ o.setInspectedId((Long) orgInfo.get("userId"));
|
|
|
457
|
+ o.setDeptId((Long) orgInfo.get("deptId"));
|
|
|
458
|
+ o.setDeptName((String) orgInfo.get("deptName"));
|
|
|
459
|
+ o.setTeamId((Long) orgInfo.get("teamId"));
|
|
|
460
|
+ o.setTeamName((String) orgInfo.get("teamName"));
|
|
|
461
|
+ o.setGroupId((Long) orgInfo.get("groupId"));
|
|
|
462
|
+ o.setGroupName((String) orgInfo.get("groupName"));
|
|
|
463
|
+ }
|
|
|
464
|
+ }
|
|
|
465
|
+
|
|
|
466
|
+ // 根据岗位和区域查找对应ID
|
|
|
467
|
+ if (importCache != null) {
|
|
|
468
|
+ // 岗位ID
|
|
|
469
|
+ if (positionName != null && !positionName.trim().isEmpty()) {
|
|
|
470
|
+ Long positionId = importCache.getPositionIdByName(positionName.trim());
|
|
|
471
|
+ if (positionId != null) {
|
|
|
472
|
+ o.setPositionId(positionId);
|
|
|
473
|
+ }
|
|
|
474
|
+ }
|
|
|
475
|
+
|
|
|
476
|
+ // 区域ID
|
|
|
477
|
+ String areaName = o.getLocation();
|
|
|
478
|
+ if (areaName != null && !areaName.trim().isEmpty()) {
|
|
|
479
|
+ Long areaId = importCache.getAreaIdByName(areaName.trim());
|
|
|
480
|
+ if (areaId != null) {
|
|
|
481
|
+ o.setAreaId(areaId);
|
|
|
482
|
+ }
|
|
|
483
|
+ }
|
|
|
484
|
+ }
|
|
|
485
|
+
|
|
432
|
486
|
o.setImportBatch(batchNo);
|
|
433
|
487
|
o.setSourceType("1");
|
|
434
|
488
|
o.setCreateBy(username);
|