| | |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject1 = JSON.parseObject(response2); |
| | | apiLogService.save("wcs派发库位不为空上报wms" |
| | | apiLogService.save("wcs派发库位==》不为空《==上报wms" |
| | | ,wmsUrl+taskStatusFeedbackPath |
| | | ,null |
| | | ,"127.0.0.1" |
| | |
| | | ,true |
| | | ); |
| | | }catch (Exception e){ |
| | | log.error("wcs派发库位不为空上报wms", getWmsDto.getWrkNo()); |
| | | throw new CoolException("wcs派发入库任务上报wms失败,异常信息:"+e); |
| | | log.error("wcs派发库位==》不为空《==上报wms", getWmsDto.getWrkNo()); |
| | | throw new CoolException("wcs派发入库任务上报wms失败,派发库位==》不为空《==,异常信息:"+e); |
| | | } |
| | | } |
| | | |
| | |
| | | continue; |
| | | } |
| | | |
| | | int workNo = commonService.getWorkNo(WorkNoType.PAKIN.type);//获取入库工作号 |
| | | taskWrk.setWrkNo(workNo);//工作号 |
| | | // int workNo = commonService.getWorkNo(WorkNoType.PAKIN.type);//获取入库工作号 |
| | | // taskWrk.setWrkNo(workNo);//工作号 |
| | | taskWrk.setStatus(TaskStatusType.DISTRIBUTE.id);//派发状态 |
| | | taskWrk.setAssignTime(new Date());//派发时间 |
| | | taskWrk.setWrkSts(3);//工作状态 3.吊车入库 |
| | |
| | | ,response |
| | | ,true |
| | | ); |
| | | }catch (Exception e){ |
| | | log.error("wcs派发入库任务上报wms失败", taskWrk); |
| | | throw new CoolException("wcs派发入库任务上报wms失败"); |
| | | } catch (Exception e){ |
| | | log.error("wcs派发入库任务上报wms失败", JSON.toJSONString(taskWrk)); |
| | | // throw new CoolException("wcs派发入库任务上报wms失败"); |
| | | } |
| | | |
| | | } |
| | |
| | | break; |
| | | } |
| | | |
| | | |
| | | // 修改工作档状态 11.生成出库ID => 12.吊车出库中 |
| | | Date now = new Date(); |
| | | taskWrk.setWrkSts(12); |
| | |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | apiLogService.save("wcs派发入库任务上报wms" |
| | | apiLogService.save("wcs派发出库任务上报wms" |
| | | ,wmsUrl+taskStatusFeedbackPath |
| | | ,null |
| | | ,"127.0.0.1" |
| | |
| | | ,true |
| | | ); |
| | | }catch (Exception e){ |
| | | log.error("wcs派发出库任务上报wms失败", taskWrk); |
| | | throw new CoolException("wcs派发入库任务上报wms失败"); |
| | | log.error("wcs派发出库任务上报wms失败", JSON.toJSONString(taskWrk)); |
| | | // throw new CoolException("wcs派发入库任务上报wms失败"); |
| | | } |
| | | |
| | | } |
| | | |
| | | // // 双深库位且浅库位有货,则需先对浅库位进行库位移转 |
| | | // if (Utils.isDeepLoc(slaveProperties, taskWrk.getStartPoint())) { |
| | | // |
| | | // taskWrkMapper.selectPakOutIoType(taskWrk.getCrnNo()); |
| | | // |
| | | // List<TaskWrk> taskWrks1 = taskWrkMapper.selectPakOutIoType(taskWrk.getCrnNo()); |
| | | // if (Cools.isEmpty(taskWrks1) && taskWrks1.size()!=0){ |
| | | // continue; |
| | | // } |
| | | // String shallowLocNo = Utils.getShallowLoc(slaveProperties, taskWrk.getStartPoint()); |
| | | // TaskWrk hallowLocNoTask = taskWrkMapper.selectByStartPoint(shallowLocNo); |
| | | // if (!Cools.isEmpty(hallowLocNoTask)){ |
| | | // continue; |
| | | // } |
| | | // } |
| | | // |
| | | // //取出命令 |
| | | // List<CommandInfo> commandInfos = commandInfoService.selectByTaskNo(taskWrk.getTaskNo()); |
| | | // Integer commandStep = taskWrk.getCommandStep(); |
| | | // if (commandInfos.isEmpty()) { |
| | | // continue;//命令空 |
| | | // } |
| | | // |
| | | // //判断末端命令是否执行 |
| | | // CommandInfo commandInfo2 = commandInfos.get(commandInfos.size() - 1); |
| | | // if (commandInfo2.getCommandStatus() != CommandStatusType.CREATE.id) { |
| | | // continue;//指令已执行 |
| | | // } |
| | | // |
| | | // CommandInfo commandInfo = commandInfos.get(commandStep); |
| | | // CommandPackage commandPackage = JSON.parseObject(commandInfo.getCommand(), CommandPackage.class);//取出命令报文 |
| | | // CrnCommand crnCommand = JSON.parseObject(commandPackage.getCommand().toString(), CrnCommand.class); |
| | | // |
| | | // if (!MessageQueue.offer(SlaveType.Crn, taskWrk.getCrnNo(), new Task(2, crnCommand))) { |
| | | // log.error("堆垛机命令下发失败,堆垛机号={},任务数据={}", taskWrk.getCrnNo(), JSON.toJSON(crnCommand)); |
| | | // } else { |
| | | // |
| | | // //开始运行 |
| | | // String response = CrnStartRunning(taskWrk); |
| | | // JSONObject jsonObject = JSON.parseObject(response); |
| | | // if (jsonObject.getInteger("code").equals(200)) { |
| | | // |
| | | // }else { |
| | | // log.error("出库开始运行通讯失败,"+jsonObject.get("msg")); |
| | | // |
| | | // } |
| | | // } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | ,true |
| | | ); |
| | | }catch (Exception e){ |
| | | log.error("wcs派发出库任务上报wms失败", taskWrk); |
| | | throw new CoolException("wcs派发入库任务上报wms失败"); |
| | | log.error("wcs派发移库库任务上报wms失败", taskWrk); |
| | | // throw new CoolException("wcs派发移库库任务上报wms失败"); |
| | | } |
| | | |
| | | } |