| | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.HttpsUtil; |
| | | import com.doumee.core.utils.SmsConstants; |
| | | 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.WmsInventoryDataResponse; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.service.business.impl.SmsEmailServiceImpl; |
| | | import com.doumee.service.business.third.EmayService; |
| | | import com.doumee.service.business.third.WmsService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | @Autowired |
| | | private WmsInterfaceLogMapper wmsInterfaceLogMapper; |
| | | |
| | | @Autowired |
| | | private SmsConfigMapper smsConfigMapper; |
| | | @Autowired |
| | | private SmsEmailMapper smsEmailMapper; |
| | | @Autowired |
| | | private EmayService emayService; |
| | | /** |
| | | * 入库通知任务业务处理 |
| | | * @param job 参数 |
| | |
| | | o.setCarrierBillCode(job.getBillCode()); |
| | | o.setRailwayNo(job.getPlatformWmsCode()); |
| | | param.getData().add(o); |
| | | String url = type == 0?systemDictDataBiz.queryByCode(Constants.WSM_PARAM,Constants.WMS_INBOUND_PLATFROM_URL).getCode():systemDictDataBiz.queryByCode(Constants.WSM_PARAM,Constants.WMS_OUTBOUND_PLATFROM_URL).getCode();; |
| | | String name = type ==0?"【WMS】入庫作业单分配月台":"【WMS】出库作业的分配月台"; |
| | | 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】出库作业的分配月台"; |
| | | WmsBaseResponse<WmsBaseDataResponse> response = sendHttpRequest(url,name,JSONObject.toJSONString(param),new TypeReference< WmsBaseResponse<WmsBaseDataResponse>>(){}); |
| | | PlatformJob update = new PlatformJob(); |
| | | update.setId(job.getId()); |
| | | update.setWmsSendDate(new Date()); |
| | | update.setWmsSendNum(job.getWmsSendNum() + 1); |
| | | if(Objects.isNull(job.getWmsSendNum())){ |
| | | job.setWmsSendNum(1); |
| | | }else{ |
| | | update.setWmsSendNum(job.getWmsSendNum() + 1); |
| | | } |
| | | update.setWmsSendPlatformCode(job.getPlatformWmsCode()); |
| | | if(response!=null && response.getData() !=null |
| | | && response.getData().size()>0 && StringUtils.equals(response.getData().get(0).getSuccess(),WmsBaseResponse.CODE_SUCCESS)){ |
| | |
| | | */ |
| | | @Override |
| | | public WmsBaseResponse<WmsInventoryDataResponse> getInventoryList(){ |
| | | String url = systemDictDataBiz.queryByCode(Constants.WSM_PARAM,Constants.WMS_GET_INVENTORYLIST_URL).getCode() ; |
| | | String url = systemDictDataBiz.queryByCode(Constants.WMS_PARAM,Constants.WMS_GET_INVENTORYLIST_URL).getCode() ; |
| | | String name = "【WMS】库存查询" ; |
| | | WmsBaseResponse<WmsInventoryDataResponse> response = sendHttpRequest(url,name,JSONObject.toJSONString(new JSONObject()),new TypeReference< WmsBaseResponse<WmsInventoryDataResponse>>(){}); |
| | | if(response!=null |
| | |
| | | return returnSuccessReuslt(null); |
| | | } |
| | | |
| | | |
| | | private void startEndNoticeToDriver(List<PlatformJob> jobList) { |
| | | for(PlatformJob job : jobList){ |
| | | //-----TODO-----------任康,发送司机公众号和短信通知 |
| | | //-----TODO-----------任康,发送司机公众号和 |
| | | //短信通知 |
| | | if(Constants.equalsInteger(job.getStatus(),Constants.PlatformJobStatus.WAIT_CONFIRM.getKey())){ |
| | | SmsEmailServiceImpl.sendPlatformJobSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,job.getId(), |
| | | SmsConstants.platformJobContent.platformJobNewJob,null,null |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | if(Constants.equalsInteger(car.getInStatus(),Constants.ONE) && car.getJobNum() == 0) { |
| | | //如果车辆在园 |
| | | job.setStatus(Constants.PlatformJobStatus.WAIT_CALL.getKey());//在园无作业状态,则自动【已签到】处理 |
| | | job.setArriveDate(new Date()); |
| | | job.setSingType(Constants.TWO); |
| | | job.setSignDate(new Date()); |
| | | } |
| | | } |
| | | PlatformGroup group = platformGroupMapper.selectOne(new QueryWrapper<PlatformGroup>().lambda() |