| | |
| | | if(details.size()>0){ |
| | | platformWmsDetailMapper.insert(details); |
| | | } |
| | | list.setJobIdList(jobIdList); |
| | | if(jobList.size()>0){ |
| | | list.setJobIdList(jobIdList); |
| | | startEndNoticeToDriver(jobList); |
| | | } |
| | | }catch (Exception e){ |
| | |
| | | private void dealCarPlatformAndDriverInfo(PlatformJob job,int type) { |
| | | //查询车辆是否自有车,以及jobNum表示但求作业数量(非已离园的作业数) |
| | | Cars car = carsMapper.selectOne(new QueryWrapper<Cars>() |
| | | .select("*,(select count(1) from platform_job b where b.plate_num='"+job.getCarCodeFront()+"' and b.status in("+ |
| | | Constants.PlatformJobStatus.LEAVED.getKey()+")) as jobNum") |
| | | .select("*,(select count(1) from platform_job b where b.plate_num='"+job.getCarCodeFront()+"' " + |
| | | "and b.status in("+ |
| | | Constants.PlatformJobStatus.WART_SIGN_IN.getKey()+","+ |
| | | Constants.PlatformJobStatus.WART_SIGN_IN.getKey()+","+ |
| | | Constants.PlatformJobStatus.WAIT_CALL.getKey()+","+ |
| | | Constants.PlatformJobStatus.IN_WAIT.getKey()+","+ |
| | | Constants.PlatformJobStatus.CALLED.getKey()+","+ |
| | | Constants.PlatformJobStatus.TRANSFERING.getKey()+","+ |
| | | Constants.PlatformJobStatus.EXCEPTION.getKey()+","+ |
| | | Constants.PlatformJobStatus.WORKING.getKey()+")) as jobNum") |
| | | .lambda() |
| | | .eq(Cars::getIsdeleted,Constants.ZERO) |
| | | .eq(Cars::getType,Constants.ONE) |
| | |
| | | //如果是自有物流车 |
| | | job.setType(type==0?Constants.platformJobType.zycxh:Constants.platformJobType.zyczh);//自有车卸货/装货 |
| | | job.setCarCodeBack(job.getCarCodeFront());//自有车默认前后车牌一样 |
| | | if(retentionMapper.selectCount(new QueryWrapper<Retention>().lambda().eq(Retention::getType,Constants.THREE) |
| | | .eq(Retention::getCarNo,car.getCode()))>Constants.ZERO && car.getJobNum() == 0){ |
| | | if(job.getType() ==Constants.platformJobType.zyczh |
| | | && retentionMapper.selectCount(new QueryWrapper<Retention>().lambda().eq(Retention::getType,Constants.THREE) |
| | | .eq(Retention::getCarNo,car.getCode()))>Constants.ZERO |
| | | && car.getJobNum() == 0){ |
| | | //如果车辆在园 |
| | | job.setStatus(Constants.PlatformJobStatus.WAIT_CALL.getKey());//在园无作业状态,则自动【已签到】处理 |
| | | job.setArriveDate(new Date()); |
| | |
| | | job.setContractNum(param.getContractNum()); |
| | | job.setDriverPhone(param.getDriverPhone()); |
| | | job.setDriverName(param.getDriverName()); |
| | | // job.setOrigin(Constants.ONE); |
| | | platformWmsJobMapper.insert(job); |
| | | } |
| | | jobIdList.add(job.getId()); |
| | |
| | | entity.setIocode(d.getIoCode()); |
| | | entity.setJobId(job.getJobId()); |
| | | entity.setWmsJobId(job.getId()); |
| | | entity.setContractNum(param.getContractNum()); |
| | | entity.setIoQty(d.getIoQty()); |
| | | entity.setRepertotyAddress(job.getRepertotyAddress()); |
| | | entity.setWmsJobId(job.getId()); |
| | |
| | | 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)); |
| | | } |
| | | } |
| | | /** |