| | |
| | | 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.*; |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public WmsBaseResponse<WmsBaseDataResponse> orderPlatformBind(PlatformJob job) { |
| | | public WmsBaseResponse<WmsBaseDataResponse> orderPlatformBind(PlatformJob job,int optType) { |
| | | if(StringUtils.isBlank(job.getBillCode()) || StringUtils.isBlank(job.getPlatformWmsCode())){ |
| | | return null; |
| | | } |
| | |
| | | String url = type == 0?systemDictDataBiz.queryByCode(Constants.WMS_PARAM,Constants.WMS_INBOUND_PLATFROM_URL).getCode(): |
| | | systemDictDataBiz.queryByCode(Constants.WMS_PARAM,Constants.WMS_OUTBOUND_PLATFROM_URL).getCode();; |
| | | String name = type ==0?"【WMS】入库作业单分配月台":"【WMS】出库作业的分配月台"; |
| | | if(optType == 1){ |
| | | name = type ==0?"【WMS】入库作业单清空月台":"【WMS】出库作业的清空月台"; |
| | | } |
| | | // int sendSuccess = 0; |
| | | // int sendError = 0; |
| | | List<String> errorMassge = new ArrayList<>(); |
| | |
| | | WmsOrderPlatformInfoRequest o = new WmsOrderPlatformInfoRequest(); |
| | | o.setCarrierBillCode(platformWmsDetail.getIocode()); |
| | | o.setRailwayNo(job.getPlatformWmsCode()); |
| | | o.setOptionType(optType); |
| | | param.getData().add(o); |
| | | response = sendHttpRequest(url,name,JSONObject.toJSONString(param),new TypeReference< WmsBaseResponse<WmsBaseDataResponse>>(){}); |
| | | if(response!=null && response.getData() !=null |
| | |
| | | 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("业务处理异常"); |
| | | } |
| | | } |
| | | |
| | | } |