| | |
| | | @Value("${wms.url}") |
| | | private String wmsUrl; |
| | | public ArrayList<String> wharfCode1 = new ArrayList<String>(){{ |
| | | add("J-1101"); add("J-1103"); add("J-1105"); add("J-1107"); add("J-1109"); add("J-1111"); |
| | | add("J-1101"); add("J-1103"); add("J-1105"); add("J-1107"); add("J-1109"); add("J-1111");add("H-1101"); |
| | | add("G-1101"); |
| | | }}; |
| | | |
| | | |
| | |
| | | taskWrk.setOriginStartPoint(param.getStartPoint()); |
| | | } |
| | | taskWrk.setTargetPoint(param.getTargetPoint()); |
| | | }else if (param.getIoType() == 3){ |
| | | taskWrk.setWrkSts(11); |
| | | if (!Cools.isEmpty(param.getStartPoint())) { |
| | | taskWrk.setStartPoint(param.getStartPoint());//起点 |
| | | taskWrk.setOriginStartPoint(param.getStartPoint()); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | ,wmsUrl+"wcsManager/wcsInterface/inboundTaskApply" |
| | | ,null |
| | | ,"127.0.0.1" |
| | | ,JSON.toJSONString(param) |
| | | ,JSON.toJSONString(toWmsDTO) |
| | | ,response |
| | | ,true |
| | | ); |
| | |
| | | staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>() |
| | | .eq("crn_no",data.getTaskTunnel()) |
| | | .eq("type_no",1) |
| | | .lt("crn_stn",200)); |
| | | .lt("stn_no",200)); |
| | | }else if (param.getWharfSource().contains("H")){ |
| | | staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>() |
| | | .eq("crn_no",data.getTaskTunnel()) |
| | | .eq("type_no",1) |
| | | .lt("stn_no",400) |
| | | .gt("stn_no",200)); |
| | | }else { |
| | | staDesc = staDescService.selectOne(new EntityWrapper<StaDesc>() |
| | | .eq("crn_no",data.getTaskTunnel()) |
| | | .eq("type_no",1) |
| | | .ge("crn_stn",200)); |
| | | .lt("stn_no",500) |
| | | .ge("stn_no",400)); |
| | | } |
| | | //map1.put("taskTunnel", staDesc.getStnDesc()); |
| | | map1.put("taskTunnel", "J-1104"); |
| | | map1.put("taskTunnel", staDesc.getStnDesc()); |
| | | //map1.put("taskTunnel", "J-1104"); |
| | | return R.ok(map1); |
| | | } |
| | | return R.error((String) jsonObject.get("msg")); |
| | |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | Short workNo = staProtocol.getWorkNo(); |
| | | for (DevpSlave.Sta inSta : devp.getInSta()) { |
| | | if (inSta.getBackSta().equals(staDesc.getStnNo())){ |
| | | if (wharfCode1.contains(param.getWharfCode())){ |
| | | if (!staProtocol.isLoading() && !staProtocol.isCar()){ |
| | | //AGV出库完成以后 |
| | | } |
| | | if (wharfCode1.contains(param.getWharfCode())){ |
| | | if (!staProtocol.isLoading() && !staProtocol.isCar() && staProtocol.getWorkNo() >0){ |
| | | //AGV出库完成以后 |
| | | staProtocol.setWorkNo((short) 0); |
| | | staProtocol.setStaNo((short)0); |
| | | boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol)); |
| | | if (result) { |
| | | |
| | | }else { |
| | | } else { |
| | | throw new RuntimeException("agv返回完成后,命令下发失败"); |
| | | } |
| | | } |
| | | }else { |
| | | for (DevpSlave.Sta inSta : devp.getInSta()) { |
| | | if (inSta.getBackSta().equals(staDesc.getStnNo())){ |
| | | |
| | | if (staProtocol.isLoading() && !staProtocol.isCar() && workNo == 0){ |
| | | //AGV入库完成以后 |
| | | staProtocol.setWorkNo((short) 9999); |
| | |
| | | throw new RuntimeException("agv返回完成后,命令下发失败"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |