|
@@ -689,11 +689,13 @@ public class GLPPGFWebsitWorkerServiceImpl implements GLPPGFWebsitWorkerService
|
|
|
sfzens.add(m.getSfzen() + m.getWxgmc().trim() + m.getYddh());
|
|
|
}
|
|
|
|
|
|
- private Worker addWorkerInfo(ItfTblWangdianWxgDownload m,Boolean flag) {
|
|
|
+ private Worker addWorkerInfo(ItfTblWangdianWxgDownload m,Boolean flag, String workerId) {
|
|
|
Worker v = new Worker();
|
|
|
// S + 手机号
|
|
|
// v.setWorkerId(IdWorker.getIdStr());
|
|
|
- v.setWorkerId("S" + m.getYddh());
|
|
|
+ // v.setWorkerId("S" + m.getYddh());
|
|
|
+ v.setWorkerId("W" + workerId);
|
|
|
+
|
|
|
|
|
|
v.setWorkerName(m.getWxgmc().trim());
|
|
|
v.setFirstWord(PinyinUtil.getPinyin(v.getWorkerName().substring(0,1)).substring(0,1).toUpperCase(Locale.ROOT));
|
|
@@ -975,6 +977,8 @@ public class GLPPGFWebsitWorkerServiceImpl implements GLPPGFWebsitWorkerService
|
|
|
List<Worker> addWorkerRec = new ArrayList<>();
|
|
|
List<Worker> uupWorkerRec = new ArrayList<>();
|
|
|
Map<String,Worker> workerIdCardMap = new HashMap<>();
|
|
|
+ List<String> workdids = new ArrayList<>();
|
|
|
+ List<String> workdidsUp = new ArrayList<>();
|
|
|
|
|
|
// 提取原有的信息
|
|
|
List<Worker> oldWorkerRec = workerService.lambdaQuery().list();
|
|
@@ -997,7 +1001,7 @@ public class GLPPGFWebsitWorkerServiceImpl implements GLPPGFWebsitWorkerService
|
|
|
*/
|
|
|
|
|
|
// 生成对象
|
|
|
- Worker v = addWorkerInfo(m, flag);
|
|
|
+ Worker v = addWorkerInfo(m, flag,workdids.get(0));
|
|
|
|
|
|
// 存在修改,不存在新增
|
|
|
if (sfzens.contains(m.getSfzen().trim())){
|
|
@@ -1011,9 +1015,11 @@ public class GLPPGFWebsitWorkerServiceImpl implements GLPPGFWebsitWorkerService
|
|
|
}
|
|
|
} else {
|
|
|
// S + 手机号 作为ID主键,手机号是不能重的 不再新增,会报错主键冲突
|
|
|
- if (mobiles.contains(m.getYddh().trim())){
|
|
|
+ /*if (mobiles.contains(m.getYddh().trim())){
|
|
|
continue;
|
|
|
- }
|
|
|
+ }*/
|
|
|
+ workdidsUp.add(workdids.get(0));
|
|
|
+ workdids.remove(0);
|
|
|
sfzens.add(m.getSfzen().trim());
|
|
|
mobiles.add(m.getYddh().trim());
|
|
|
addWorkerRec.add(v);
|
|
@@ -1048,6 +1054,13 @@ public class GLPPGFWebsitWorkerServiceImpl implements GLPPGFWebsitWorkerService
|
|
|
log.info("本地网点维修工人员信息表修改了{}条数据", uupWorkerRec.size());
|
|
|
uupWorkerRec.clear();
|
|
|
}
|
|
|
+
|
|
|
+ // 修改被使用状态
|
|
|
+ if (uupWorkerRec.size()>=500){
|
|
|
+ workerService.updateBatchById(uupWorkerRec);
|
|
|
+ log.info("本地网点维修工人员信息表修改了{}条数据", uupWorkerRec.size());
|
|
|
+ uupWorkerRec.clear();
|
|
|
+ }
|
|
|
|
|
|
sfzens.clear();
|
|
|
mobiles.clear();
|