| | |
| | | private RetentionMapper retentionMapper; |
| | | @Autowired |
| | | private WxNoticeConfigMapper wxNoticeConfigMapper; |
| | | @Autowired |
| | | private PlatformLogMapper platformLogMapper; |
| | | /** |
| | | * 入库通知任务业务处理 |
| | | * @param job 参数 |
| | |
| | | && response.getData().size()>0 && StringUtils.equals(response.getData().get(0).getSuccess(),WmsBaseResponse.CODE_SUCCESS)){ |
| | | //如果成功 |
| | | update.setWmsSendStatus(Constants.ONE); |
| | | update.setWmsSendInfo("通知WMS作业单分配月台成功"); |
| | | update.setWmsSendInfo("通知WMS作业单分配月台成功"+response.getData().get(0).getMsgDescr()); |
| | | }else{ |
| | | //如果失败 |
| | | update.setWmsSendStatus(Constants.TWO); |
| | |
| | | job.setIsdeleted(Constants.ZERO); |
| | | job.setIsNew(Constants.ONE); |
| | | job.setStatus(Constants.ONE); |
| | | job.setContractNum(param.getContractNum()); |
| | | job.setCarryBillCode(param.getCarrierBillCode()); |
| | | job.setIocode(param.getIoCode()); |
| | | job.setCarrierName(param.getCarrierName()); |
| | |
| | | platformWmsJobMapper.insert(job); |
| | | jobList.add(model); |
| | | } |
| | | jobIdList.add(job.getId()); |
| | | jobIdList.add(job.getJobId()); |
| | | if(param.getDetails()!=null && param.getDetails().size()>0){ |
| | | for(WmsInboundDetailRequest d :param.getDetails()){ |
| | | PlatformWmsDetail entity = new PlatformWmsDetail(); |
| | |
| | | entity.setIsdeleted(Constants.ZERO); |
| | | entity.setIocode(d.getIoCode()); |
| | | entity.setJobId(job.getJobId()); |
| | | entity.setContractNum(param.getContractNum()); |
| | | entity.setWmsJobId(job.getId()); |
| | | entity.setIoQty(d.getIoQty()); |
| | | entity.setStatus(Constants.ZERO); |
| | |
| | | if(details.size()>0){ |
| | | platformWmsDetailMapper.insert(details); |
| | | } |
| | | list.setJobIdList(jobIdList); |
| | | if(jobList.size()>0){ |
| | | list.setJobIdList(jobIdList); |
| | | startEndNoticeToDriver(jobList); |
| | | } |
| | | }catch (Exception e){ |
| | |
| | | job.setCompanyNamePath(driver.getCompanyNamePath()); |
| | | } |
| | | platformJobMapper.insert(job); |
| | | if(car !=null){ |
| | | //存储操作日志 |
| | | PlatformLog platformLog = new PlatformLog(); |
| | | platformLog.setIsdeleted(Constants.ZERO); |
| | | platformLog.setCreateDate(new Date()); |
| | | platformLog.setJobId(job.getId()); |
| | | platformLog.setObjType(Constants.PlatformJobLogType.SIGN.getKey()); |
| | | platformLog.setContent("自动签到"); |
| | | platformLog.setParam4(job.getCarCodeFront()); |
| | | platformLog.setAfterContent(JSONObject.toJSONString(job)); |
| | | platformLog.setObjId(job.getId().toString()); |
| | | platformLog.setParam3("0"); |
| | | platformLogMapper.insert(platformLog); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | private PlatformJob dealJobBizOutbound(WmsOutboundNoticeRequest param) { |
| | |
| | | job.setContractNum(param.getContractNum()); |
| | | job.setDriverPhone(param.getDriverPhone()); |
| | | job.setDriverName(param.getDriverName()); |
| | | // job.setOrigin(Constants.ONE); |
| | | platformWmsJobMapper.insert(job); |
| | | } |
| | | jobIdList.add(job.getId()); |
| | | jobIdList.add(job.getJobId()); |
| | | if(param.getDetails()!=null && param.getDetails().size()>0){ |
| | | for(WmsOutboundDetailRequest d :param.getDetails()){ |
| | | PlatformWmsDetail entity = new PlatformWmsDetail(); |
| | |
| | | if(details.size()>0){ |
| | | platformWmsDetailMapper.insert(details); |
| | | } |
| | | list.setJobIdList(jobIdList); |
| | | if(jobList.size()>0){ |
| | | list.setJobIdList(jobIdList); |
| | | startEndNoticeToDriver(jobList); |
| | | } |
| | | }catch (Exception e){ |
| | |
| | | .eq(PlatformWmsDetail::getIsdeleted, Constants.ZERO)); |
| | | if(details!=null && details.size()>0){ |
| | | for(PlatformWmsDetail d :details){ |
| | | num.add(Constants.formatBigdecimal(d.getIoQty())); |
| | | num = num.add(Constants.formatBigdecimal(d.getIoQty())); |
| | | } |
| | | platformJobMapper.update(null,new UpdateWrapper<PlatformJob>().lambda() |
| | | .set(PlatformJob::getTotalNum,num) |
| | | .eq(PlatformJob::getOrigin, Constants.ZERO) |
| | | .eq(PlatformJob::getId, jobId)); |
| | | } |
| | | |
| | | platformJobMapper.update(null,new UpdateWrapper<PlatformJob>().lambda() |
| | | .set(PlatformJob::getTotalNum,num) |
| | | .eq(PlatformJob::getOrigin, Constants.ONE) |
| | | .eq(PlatformJob::getId, jobId)); |
| | | } |
| | | } |
| | | /** |