| | |
| | | Date now = new Date(); |
| | | |
| | | try { |
| | | // 料箱机器人任务执行状态反馈到wcs,这里不调用 |
| | | if (singleRobotCode.equals("14") || singleRobotCode.equals("15")) { // 两台CTU库机器人编号 |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("task_no", robotTaskCode)); |
| | | if(wrkMast != null) { |
| | |
| | | mesService.outStation(apply); |
| | | // agv继续执行 |
| | | // 源站点是产线,离站完成后给rcs反馈继续执行 |
| | | if(task.getSourceStaNo().contains("TOOL")) { |
| | | TransInOutStationAllow inOutStationAllow = new TransInOutStationAllow(); |
| | | inOutStationAllow.setTaskno(robotTaskCode); |
| | | inOutStationAllow.setStatus("Y"); |
| | | inOutStationAllow.setAgvCode(singleRobotCode); |
| | | mesService.allowOutStation(inOutStationAllow); |
| | | } |
| | | // if(task.getSourceStaNo().contains("TOOL")) { |
| | | // TransInOutStationAllow inOutStationAllow = new TransInOutStationAllow(); |
| | | // inOutStationAllow.setTaskno(robotTaskCode); |
| | | // inOutStationAllow.setStatus("Y"); |
| | | // inOutStationAllow.setAgvCode(singleRobotCode); |
| | | // mesService.allowOutStation(inOutStationAllow); |
| | | // } |
| | | } |
| | | } break; |
| | | case ARRIVE_ON_STATION: { |
| | |
| | | } |
| | | if(transType.equals("01") && arrivalStation.getStationID().contains("XL") || arrivalStation.getStationID().contains("TOOL")) { |
| | | path = "ToolArrivalNotice"; |
| | | } |
| | | if (arrivalStation.getStationID().startsWith("LG") || arrivalStation.getStationID().startsWith("LT")) { |
| | | path = "Aprs/" + path; |
| | | } |
| | | mesService.arriveOnStation(arrivalStation,path); |
| | | } break; |
| | |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public RcsReturn siteBind(SiteBind siteBind) { |
| | | RcsReturn rcsReturn = new RcsReturn(); |
| | | String url = HIK_URL + "api/robot/controller/site/bind"; |
| | | String response = sendPost(url, JSONObject.toJSONString(siteBind)); |
| | | if (!StringUtils.isEmpty(response) && response.contains("code")){ |
| | | rcsReturn = JSONObject.parseObject(response, RcsReturn.class); |
| | | } else { |
| | | rcsReturn.setCode("ERROR"); |
| | | rcsReturn.setMessage("调用绑定接口RCS无返回"); |
| | | } |
| | | return rcsReturn; |
| | | } |
| | | |
| | | // endregion |
| | | |
| | | // region httpUtil |