jiangping
2025-06-10 c996e23943007e749f06c8b54f46a576a59fb055
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
@@ -1628,7 +1628,7 @@
                TmsBaseResponse<List<TmsLockStatusQueryResponse>>  lockResult =  tmsService.lockStatusQuery(tmsLock);
                if(lockResult!=null && lockResult.getCode()!=null && lockResult.getCode().equals("0")&& lockResult.getData()!=null ){
                     for(TmsLockStatusQueryResponse s : lockResult.getData()){
                       if(StringUtils.isBlank(s.getContractNumber())){
                       if(StringUtils.isBlank(s.getOutDate())){
                           continue;
                       }
                         platformWmsDetailMapper.update(null,new UpdateWrapper<PlatformWmsDetail>().lambda()
@@ -1678,28 +1678,37 @@
           Date date = new Date();
           List<String> codeList =new ArrayList<>();
           for(PlatformWmsDetail d : details){
               codeList.add(d.getContractNum());
               if(StringUtils.isNotBlank(d.getContractNum())){
                   if(StringUtils.isNotBlank(d.getContractNum())){
                       codeList.add(d.getContractNum());
                   }
               }
           }
           TmsLockStatusQueryRequest tmsLock = new TmsLockStatusQueryRequest();
           tmsLock.setContractNumbers(codeList);
           List<Integer> jobIds = new ArrayList<>();
           TmsBaseResponse<List<TmsLockStatusQueryResponse>>  lockResult =  tmsService.lockStatusQuery(tmsLock);
           if(lockResult!=null && lockResult.getCode()!=null && lockResult.getCode().equals("0")&& lockResult.getData()!=null ){
               for(TmsLockStatusQueryResponse s : lockResult.getData()){
                   try {
                       //异常处理,能处理一个是一个
                       platformWmsDetailMapper.update(null,new UpdateWrapper<PlatformWmsDetail>().lambda()
                               .eq(PlatformWmsDetail::getContractNum,s.getContractNumber())
                               .set(PlatformWmsDetail::getEditDate,date)
                               .set(PlatformWmsDetail::getLockDate,s.getOutDate())
                               .set(PlatformWmsDetail::getLockStatus,Constants.ONE)
                               .eq(PlatformWmsDetail::getIsdeleted,Constants.ZERO));
                       PlatformWmsDetail job = getJobByContractnumFromDetail(s.getContractNumber(),details);
                       if(job != null){
                           jobIds.add(job.getJobId());
           if(codeList.size()>0){
               TmsLockStatusQueryRequest tmsLock = new TmsLockStatusQueryRequest();
               tmsLock.setContractNumbers(codeList);
               TmsBaseResponse<List<TmsLockStatusQueryResponse>>  lockResult =  tmsService.lockStatusQuery(tmsLock);
               if(lockResult!=null && lockResult.getCode()!=null && lockResult.getCode().equals("0")&& lockResult.getData()!=null ){
                   for(TmsLockStatusQueryResponse s : lockResult.getData()){
                       try {
                           if(StringUtils.isBlank(s.getOutDate())){
                               continue;
                           }
                           //异常处理,能处理一个是一个
                           platformWmsDetailMapper.update(null,new UpdateWrapper<PlatformWmsDetail>().lambda()
                                   .eq(PlatformWmsDetail::getContractNum,s.getContractNumber())
                                   .set(PlatformWmsDetail::getEditDate,date)
                                   .set(PlatformWmsDetail::getLockDate,s.getOutDate())
                                   .set(PlatformWmsDetail::getLockStatus,Constants.ONE)
                                   .eq(PlatformWmsDetail::getIsdeleted,Constants.ZERO));
                           PlatformWmsDetail job = getJobByContractnumFromDetail(s.getContractNumber(),details);
                           if(job != null){
                               jobIds.add(job.getJobId());
                           }
                       }catch (Exception e){
                           logger.error("=============更新电子锁状态信息异常:"+e.getMessage());
                       }
                   }catch (Exception e){
                        logger.error("=============更新电子锁状态信息异常:"+e.getMessage());
                   }
               }
           }
@@ -2450,7 +2459,6 @@
                    .in(PlatformJob::getId,jobIdList)
            );
            if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platformJobList)){
                platformJobMapper.update(null,new UpdateWrapper<PlatformJob>().lambda()
                        .set(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey())
                        .set(PlatformJob::getDoneDate,new Date())