| 
					
				 | 
			
			
				@@ -39,6 +39,8 @@ public class GLPPGFWebsitWorkerServiceImpl implements GLPPGFWebsitWorkerService 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     WorkerBrandAccountService workerBrandAccountService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     WebsitService websitService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    WorkerIdGeneratorService workerIdGeneratorService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -705,7 +707,7 @@ public class GLPPGFWebsitWorkerServiceImpl implements GLPPGFWebsitWorkerService 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sfzens.add(m.getSfzen() + m.getWxgmc().trim() + m.getYddh()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private Worker addWorkerInfo(ItfTblWangdianWxgDownload m,Boolean flag, String workerId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private Worker addWorkerInfo(ItfTblWangdianWxgDownload m,Boolean flag, Integer workerId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Worker v = new Worker(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //  S + 手机号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // v.setWorkerId(IdWorker.getIdStr()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -993,10 +995,11 @@ 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<Integer> workdids = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<Integer> workdidsUp = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 提取师傅ID数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        workdids = publicService.getWorkerId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // select worker_id from worker_id_generator where is_used=0 and worker_id > 2000000 order by sort_num limit 100 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1021,8 +1024,7 @@ public class GLPPGFWebsitWorkerServiceImpl implements GLPPGFWebsitWorkerService 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // 生成对象 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // Worker v = addWorkerInfo(m, flag,workdids.get(0)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            Worker v = addWorkerInfo(m, flag,""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Worker v = addWorkerInfo(m, flag,workdids.get(0)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // 存在修改,不存在新增 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (sfzens.contains(m.getSfzen().trim())){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1045,6 +1047,8 @@ public class GLPPGFWebsitWorkerServiceImpl implements GLPPGFWebsitWorkerService 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 mobiles.add(m.getYddh().trim()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 addWorkerRec.add(v); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 workerIdCardMap.put(v.getIdcard(),v); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                workdidsUp.add(workdids.get(0)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                workdids.remove(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // 新增的插入到表 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1052,6 +1056,14 @@ public class GLPPGFWebsitWorkerServiceImpl implements GLPPGFWebsitWorkerService 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 workerService.saveOrUpdateBatch(addWorkerRec); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 log.info("本地网点维修工人员信息表新增插入了{}条数据", addWorkerRec.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 addWorkerRec.clear(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (workdidsUp.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    workerIdGeneratorService.lambdaUpdate() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            .set(WorkerIdGenerator::getIsUsed,1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            .in(WorkerIdGenerator::getWorkerId,workdidsUp).update(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    workdidsUp.clear(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // 修改的 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1067,6 +1079,13 @@ public class GLPPGFWebsitWorkerServiceImpl implements GLPPGFWebsitWorkerService 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             workerService.saveBatch(addWorkerRec); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             log.info("本地网点维修工人员信息表新增插入了{}条数据", addWorkerRec.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             addWorkerRec.clear(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (workdidsUp.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                workerIdGeneratorService.lambdaUpdate() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        .set(WorkerIdGenerator::getIsUsed,1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        .in(WorkerIdGenerator::getWorkerId,workdidsUp).update(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                workdidsUp.clear(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 修改的 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1082,6 +1101,8 @@ public class GLPPGFWebsitWorkerServiceImpl implements GLPPGFWebsitWorkerService 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sfzens.clear(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         mobiles.clear(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         workerIdCardMap.clear(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        workdids.clear(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        workdids.clear(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |