| | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.tms.model.request.TmsLockStatusQueryRequest; |
| | | import com.doumee.core.tms.model.response.TmsBaseResponse; |
| | | import com.doumee.core.tms.model.response.TmsLockStatusQueryResponse; |
| | | import com.doumee.core.utils.*; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.join.PlatformJobJoinMapper; |
| | |
| | | import com.doumee.service.business.impl.hksync.HkSyncPushServiceImpl; |
| | | import com.doumee.service.business.impl.thrid.WmsServiceImpl; |
| | | import com.doumee.service.business.third.EmayService; |
| | | import com.doumee.service.business.third.TmsService; |
| | | import com.doumee.service.business.third.WmsService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | @Autowired |
| | | private PlatformJobMapper platformJobMapper; |
| | | @Autowired |
| | | private TmsService tmsService; |
| | | |
| | | @Autowired |
| | | private PlatformDeviceMapper platformDeviceMapper; |
| | |
| | | " ( " + |
| | | " ( t.`STATUS` = "+Constants.PlatformJobStatus.WAIT_CALL.getKey()+" and t.PLATFORM_GROUP_ID = ( SELECT p.group_id FROM platform p WHERE p.id = "+pageWrap.getModel().getPlatformId()+" LIMIT 1 ) )" + |
| | | " or " + |
| | | " (t.`STATUS` = "+Constants.PlatformJobStatus.IN_WAIT.getKey()+" and t.PLATFORM_ID = "+pageWrap.getModel().getPlatformId()+" )" + |
| | | " (t.`STATUS` = "+Constants.PlatformJobStatus.IN_WAIT.getKey()+" and t.PLATFORM_GROUP_ID = ( SELECT p.group_id FROM platform p WHERE p.id = "+pageWrap.getModel().getPlatformId()+" LIMIT 1 ) )" + |
| | | " or " + |
| | | " (t.`STATUS` = "+Constants.PlatformJobStatus.TRANSFERING.getKey()+" and t.PLATFORM_ID = "+pageWrap.getModel().getPlatformId()+" ) " + |
| | | ") " |
| | |
| | | ); |
| | | |
| | | platformJob.setPlatformName(platform.getName()); |
| | | this.broadcastAndLEed(platformJob, StringUtils.isBlank(oldPlatform.getRemark())?Constants.PlatformLedContent.IDEL_CONTNET.getName():oldPlatform.getLedContent(), |
| | | this.broadcastAndLEed(platformJob, StringUtils.isBlank(oldPlatform.getLedContent())?Constants.PlatformLedContent.IDEL_CONTNET.getName():oldPlatform.getLedContent(), |
| | | null |
| | | ); |
| | | |
| | |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(), |
| | | SmsConstants.platformJobContent.platformJobError,platform.getName(),null |
| | | ); |
| | | |
| | | platformJob.setPlatformName(platform.getName()); |
| | | this.broadcastAndLEed(platformJob, StringUtils.isBlank(platform.getLedContent())?Constants.PlatformLedContent.IDEL_CONTNET.getName():platform.getLedContent(), |
| | | null |
| | | ); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | savePlatformLog(Constants.PlatformJobLogType.DONE.getKey(),oldPlatformJob,platformJob , |
| | | Constants.PlatformJobLogType.DONE.getInfo()); |
| | | |
| | | if(Constants.equalsInteger(platformJob.getType(),Constants.TWO)){ |
| | | //TODO 外协车装货 查询TMS 电子锁情况 |
| | | if(Constants.equalsInteger(platformJob.getType(),Constants.THREE)){ |
| | | // 外协车装货 查询TMS 电子锁情况 |
| | | List<PlatformWmsDetail> details = platformWmsDetailMapper.selectList(new QueryWrapper<PlatformWmsDetail>().lambda() |
| | | .eq(PlatformWmsDetail::getJobId,platformJob.getId()) |
| | | .eq(PlatformWmsDetail::getIsdeleted,Constants.ZERO) |
| | | ); |
| | | if(details!=null && details.size()>0){ |
| | | Date date = new Date(); |
| | | List<String> codeList =new ArrayList<>(); |
| | | for(PlatformWmsDetail d : details){ |
| | | codeList.add(d.getIocode()); |
| | | } |
| | | TmsLockStatusQueryRequest tmsLock = new TmsLockStatusQueryRequest(); |
| | | tmsLock.setContractNumbers(codeList); |
| | | TmsBaseResponse<List<TmsLockStatusQueryResponse>> lockResult = tmsService.lockStatusQuery(tmsLock); |
| | | if(lockResult!=null && lockResult.isSuccess()&& lockResult.getData()!=null ){ |
| | | for(TmsLockStatusQueryResponse s : lockResult.getData()){ |
| | | platformWmsDetailMapper.update(null,new UpdateWrapper<PlatformWmsDetail>().lambda() |
| | | .eq(PlatformWmsDetail::getIocode,s.getContractNumber()) |
| | | .set(PlatformWmsDetail::getEditDate,date) |
| | | .set(PlatformWmsDetail::getLockDate,s.getOutDate()) |
| | | .set(PlatformWmsDetail::getLockStatus,Constants.ONE) |
| | | .eq(PlatformWmsDetail::getJobId,platformJob.getId()) |
| | | .eq(PlatformWmsDetail::getIsdeleted,Constants.ZERO)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | }else if(Constants.equalsInteger(platformJob.getType(),Constants.ONE) || Constants.equalsInteger(platformJob.getType(),Constants.FOUR)){ |
| | | //TODO 外协车卸货 或者 市公司车卸货 则根据任务情况 |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //发送短信信息 |
| | | SmsEmailServiceImpl.sendPlatformJobSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(), |
| | | SmsConstants.platformJobContent.platformJobFinish,platform.getName(),null |
| | | ); |
| | | |
| | | //广播 led通知 |
| | | platformJob.setPlatformName(platform.getName()); |
| | | this.broadcastAndLEed(platformJob,null, |
| | | this.broadcastAndLEed(platformJob,Constants.PlatformLedContent.DONE.getInfo(), |
| | | Constants.PlatformBroadcastContent.DONE.getInfo()); |
| | | return platformJob; |
| | | } |
| | |
| | | .selectAs(PlatformWmsJob::getCarrierName,PlatformJob::getCarrierName) |
| | | .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId) |
| | | .leftJoin(PlatformWmsJob.class,PlatformWmsJob::getJobId,PlatformJob::getId) |
| | | .eq(PlatformJob::getPlatformId,platformId) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .in(PlatformJob::getStatus, |
| | | Constants.PlatformJobStatus.WAIT_CALL.getKey(), |
| | |
| | | Constants.PlatformJobStatus.CALLED.getKey(), |
| | | Constants.PlatformJobStatus.WORKING.getKey(), |
| | | Constants.PlatformJobStatus.EXCEPTION.getKey(), |
| | | Constants.PlatformJobStatus.OVER_NUMBER.getKey() |
| | | Constants.PlatformJobStatus.OVER_NUMBER.getKey(), |
| | | Constants.PlatformJobStatus.TRANSFERING.getKey() |
| | | ) |
| | | .like(PlatformJob::getArriveDate, DateUtil.getCurrDate()) |
| | | .orderByDesc(PlatformJob::getId) |
| | | ); |
| | | for (PlatformJob platformJob:platformJobList) { |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |