| | |
| | | import com.doumee.core.wms.model.request.*; |
| | | import com.doumee.core.wms.model.response.WmsBaseDataResponse; |
| | | import com.doumee.core.wms.model.response.WmsBaseResponse; |
| | | import com.doumee.core.wms.model.response.WmsCarInParkDataResponse; |
| | | import com.doumee.core.wx.wxPlat.WxPlatConstants; |
| | | import com.doumee.core.wx.wxPlat.WxPlatNotice; |
| | | import com.doumee.dao.business.*; |
| | |
| | | @Override |
| | | public WmsBaseResponse<WmsBaseDataResponse> orderPlatformBind(PlatformJob job) { |
| | | if(StringUtils.isBlank(job.getBillCode()) || StringUtils.isBlank(job.getPlatformWmsCode())){ |
| | | |
| | | return null; |
| | | } |
| | | int type = 0; |
| | |
| | | entity.setJobId(job.getJobId()); |
| | | entity.setContractNum(param.getContractNum()); |
| | | entity.setWmsJobId(job.getId()); |
| | | entity.setIoQty(d.getIoQty()); |
| | | entity.setStatus(Constants.ZERO); |
| | | entity.setRate(d.getRate()); |
| | | entity.setIoQty(Constants.formatBigdecimal(d.getIoQty()).multiply(Constants.formatBigdecimal( d.getRate()))); |
| | | entity.setRate(Objects.nonNull(d.getRate())?Constants.formatBigdecimal(d.getRate()).doubleValue()+"":"1"); |
| | | entity.setMaterialName(d.getMaterialName()); |
| | | entity.setInRepertotyCode(d.getInRepertotyCode()); |
| | | iocodeList.add(d.getIoCode()); |
| | |
| | | Constants.PlatformJobStatus.IN_WAIT.getKey()+","+ |
| | | Constants.PlatformJobStatus.CALLED.getKey()+","+ |
| | | Constants.PlatformJobStatus.TRANSFERING.getKey()+","+ |
| | | Constants.PlatformJobStatus.OVER_NUMBER.getKey()+","+ |
| | | Constants.PlatformJobStatus.EXCEPTION.getKey()+","+ |
| | | Constants.PlatformJobStatus.WORKING.getKey()+")) as jobNum") |
| | | .lambda() |
| | |
| | | } |
| | | } |
| | | PlatformGroup group = platformGroupMapper.selectOne(new QueryWrapper<PlatformGroup>().lambda() |
| | | .eq(PlatformGroup::getIsVirtual,Constants.ZERO)//非虚拟月台 |
| | | .eq(PlatformGroup::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformGroup::getType,type==0?Constants.ZERO:Constants.ONE) |
| | | .last("limit 1") );//查询卸货月台组编码 |
| | |
| | | entity.setJobId(job.getJobId()); |
| | | entity.setWmsJobId(job.getId()); |
| | | entity.setContractNum(param.getContractNum()); |
| | | entity.setIoQty(d.getIoQty()); |
| | | entity.setRepertotyAddress(job.getRepertotyAddress()); |
| | | entity.setRepertotyAddress(param.getRepertotyAddress()); |
| | | entity.setWmsJobId(job.getId()); |
| | | entity.setStatus(Constants.ZERO); |
| | | entity.setRate(d.getRate()); |
| | | entity.setIoQty(Constants.formatBigdecimal(d.getIoQty()).multiply(Constants.formatBigdecimal( d.getRate()))); |
| | | entity.setRate(Objects.nonNull(d.getRate())?Constants.formatBigdecimal(d.getRate()).doubleValue()+"":"1"); |
| | | // entity.setIoQty(d.getIoQty()); |
| | | // entity.setRate(d.getRate()); |
| | | entity.setMaterialName(d.getMaterialName()); |
| | | iocodeList.add(d.getIoCode()); |
| | | details.add(entity); |
| | |
| | | response.getData().add(rData); |
| | | return response; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public WmsBaseResponse<List<WmsCarInParkDataResponse>> getCarInPark(WmsBaseRequest<String> param) { |
| | | try { |
| | | WmsBaseResponse<List<WmsCarInParkDataResponse>> wmsBaseResponse = new WmsBaseResponse(); |
| | | List<Retention> retentionList = retentionMapper.selectList(new QueryWrapper<Retention>().lambda() |
| | | .eq(Retention::getIsdeleted,Constants.ZERO) |
| | | .in(Retention::getCarNo,param.getData())); |
| | | List list = new ArrayList<>(); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(retentionList)){ |
| | | for (String carNo:param.getData()) { |
| | | WmsCarInParkDataResponse wmsCarInParkDataResponse = new WmsCarInParkDataResponse(); |
| | | wmsCarInParkDataResponse.setCarNo(carNo); |
| | | List<Retention> retentions = retentionList.stream().filter(i->i.getCarNo().equals(carNo)).collect(Collectors.toList()); |
| | | wmsCarInParkDataResponse.setInPark(retentions.size()>Constants.ZERO?true:false); |
| | | if(wmsCarInParkDataResponse.getInPark()){ |
| | | wmsCarInParkDataResponse.setEventDate(retentions.get(Constants.ZERO).getEventDate()); |
| | | } |
| | | list.add(wmsCarInParkDataResponse); |
| | | } |
| | | |
| | | } |
| | | wmsBaseResponse.setSuccess(true); |
| | | wmsBaseResponse.setMessage("获取成功"); |
| | | wmsBaseResponse.setData(list); |
| | | return wmsBaseResponse; |
| | | }catch (Exception e){ |
| | | log.error("【WMS】出库取消通知任务业务处理===============业务处理异常"+e.getMessage()); |
| | | return returnFailReuslt("业务处理异常"); |
| | | } |
| | | } |
| | | |
| | | } |