| | |
| | | |
| | | import java.io.IOException; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | @Service |
| | | @Slf4j |
| | |
| | | |
| | | // TODO 判断规则 |
| | | private boolean checkWrkSts(AgvWrkMast agvWrkMast,long wrkSts){ |
| | | |
| | | |
| | | |
| | | return true; |
| | |
| | | response = new HttpHandler.Builder() |
| | | .setUri(url) |
| | | .setPath(path) |
| | | .setTimeout(30, TimeUnit.SECONDS) |
| | | .setJson(JSONObject.toJSONString(requestParam)) |
| | | .build() |
| | | .doPost(); |
| | |
| | | |
| | | int code = Integer.parseInt(jsonObject.get("code").toString()); |
| | | if(code != 0){ |
| | | //TODO 张超 |
| | | if (code == 6) { |
| | | log.info("AGV任务单号已上报:{}", response); |
| | | String message = jsonObject.getString("message"); |
| | | if (!Cools.isEmpty(message) && message.contains("已存在任务单头为")) { |
| | | success = true; |
| | | return 0; |
| | | } |
| | | } |
| | | throw new CoolException("调用AGV响应错误"); |
| | | //return code; |
| | | } |