yaozhixue hace 1 año
padre
commit
134202928d

BIN
g/1710917054665228289.jpeg


BIN
g/1710917070649720834.jpeg


BIN
g/1710924670338498562.jpeg


BIN
g/1710924671911362561.jpeg


+ 14 - 2
src/main/java/com/zfire/jiasm/syncdata/service/impl/GLPPGFWebsitWorkerServiceImpl.java

@@ -297,19 +297,31 @@ public class GLPPGFWebsitWorkerServiceImpl implements GLPPGFWebsitWorkerService
                                                                   List<WorkerBrandAccount> upWorkerBrandAccounts,
                                               Map<Long,ItfTblWangdianWxgDownload> uprecs) {
         List<String> WebsitWorkers = new ArrayList<>();
+        List<WorkerBrandAccount>  oldwbas = new ArrayList<>();
 
         for (ItfTblWangdianWxgDownload m : addRec){
             // 只有存在网点对应关系才可以新增师傅到网点信息中来 存在品牌网点对应平台多网点
             if (!websitOrderSignMap.containsKey(m.getWdno())){
                 continue;
             }
+
             // 看师傅+网点信息 在品牌商网点信息是否存在 存在修改,不存在新增 会存在多条记录
-            List<WorkerBrandAccount>  oldwbas = workerBrandAccountService.lambdaQuery()
+            // 1:按总部师傅已同步并写入表处理
+            oldwbas = workerBrandAccountService.lambdaQuery()
                     .eq(WorkerBrandAccount::getBrandWebsitId,m.getWdno())
                     .eq(WorkerBrandAccount::getBrandWorkerId,m.getWxgid()).list();
 
+            // 无数据时 会存在平台已添加了师傅入驻对应的网点但并未同步到总部时需再次查询
+            if (oldwbas.size()<=0){
+                if (workerIdCardMap.containsKey(m.getSfzen().trim())){
+                    oldwbas = workerBrandAccountService.lambdaQuery()
+                            .eq(WorkerBrandAccount::getWorkerId,workerIdCardMap.get(m.getSfzen().trim()).get(0).getWorkerId())
+                            .eq(WorkerBrandAccount::getBrandWebsitId,m.getWdno()).list();
+                }
+            }
+
             // 存在只修改师傅帐号状态 + 网点编号因为平台会删除
-            if (CollectionUtils.isNotEmpty(oldwbas)){
+            if (oldwbas.size()>0){
                 for (WorkerBrandAccount wba : oldwbas){
                     // 修改网点师傅信息
                     wba.setBrandWorkerStatus(DictTypeEnum.DICT_TYPE_OFF.getCode());

+ 3 - 3
src/main/java/com/zfire/jiasm/syncdata/service/impl/UploadWorkeCertificateServiceImpl.java

@@ -91,10 +91,10 @@ public class UploadWorkeCertificateServiceImpl implements UploadWorkeCertificate
 
 
         // 获取待同步到格力总部师傅的证件信息
-        recs = getWorkerUploads();
+        // recs = getWorkerUploads();
 
         // 测试用
-        // recs =  getWorkerUploadstest();
+        recs =  getWorkerUploadstest();
 
         for (WorkerCert item:recs){
             count = 0;
@@ -1307,7 +1307,7 @@ public class UploadWorkeCertificateServiceImpl implements UploadWorkeCertificate
     private List<WorkerCert> getWorkerUploadstest() {
         // 同步标志-synStatus(0:待同步;1:已同步;99:同步失败)
         return workerCertService.lambdaQuery()
-                .eq(WorkerCert::getWorkerId,"S15112152395")
+                .eq(WorkerCert::getId,"469044823285893")
                 .list();
     }