| | |
| | | } catch (Exception e){ |
| | | basCrnpWmsParam.setCrnErrM("未知异常"); |
| | | } |
| | | if (crnProtocol.getMode()!=3){ |
| | | basCrnpWmsParam.setCrnErr(999L); |
| | | basCrnpWmsParam.setCrnErrM("非自动!!!"); |
| | | } |
| | | basCrnpWmsParamList.add(basCrnpWmsParam); |
| | | |
| | | // list.add(basCrnpWmsParam); |
| | |
| | | basRgvWmsParam.setSteErrM(basRgvErr.getErrName()); |
| | | } catch (Exception e){ |
| | | basRgvWmsParam.setSteErrM("未知异常"); |
| | | } |
| | | if (rgvStatus.getMode()!=1){ |
| | | basRgvWmsParam.setSteErr(999L); |
| | | basRgvWmsParam.setSteErrM("非自动!!!"); |
| | | } |
| | | // list.add(basRgvWmsParam); |
| | | wcsStatusResponseModel.getRgvList().add(basRgvWmsParam); |
| | |
| | | } catch (Exception e){ |
| | | basCrnpWmsParam.setCrnErrM("未知异常"); |
| | | } |
| | | if (crnProtocol.getMode()!=3){ |
| | | basCrnpWmsParam.setCrnErr(999L); |
| | | basCrnpWmsParam.setCrnErrM("非自动!!!"); |
| | | } |
| | | basCrnpWmsParamList.add(basCrnpWmsParam); |
| | | |
| | | // list.add(basCrnpWmsParam); |
| | |
| | | } catch (Exception e){ |
| | | basRgvWmsParam.setSteErrM("未知异常"); |
| | | } |
| | | if (rgvStatus.getMode()!=1){ |
| | | basRgvWmsParam.setSteErr(999L); |
| | | basRgvWmsParam.setSteErrM("非自动!!!"); |
| | | } |
| | | // list.add(basRgvWmsParam); |
| | | wcsStatusResponseModel.getRgvList().add(basRgvWmsParam); |
| | | |
| | |
| | | private List<Integer> canInboundTunnels; |
| | | |
| | | // 容器编码 |
| | | private String barCode; |
| | | private String barcode; |
| | | //容器类型 |
| | | private String ioType; |
| | |
| | | private Integer locType; |
| | | private Integer status;//空满版 |
| | | private Double grossWt; |
| | | private Double weight; |
| | | |
| | | // public ToWmsDTO(String barcode, Integer stationCode, Integer locType){ |
| | | // this.barcode = barcode; |
| | |
| | | |
| | | public ToWmsDTO(String barcode, Integer stationCode, Integer status){ |
| | | this.barcode = barcode; |
| | | this.barCode = barcode; |
| | | this.stationCode = stationCode; |
| | | this.status = status; |
| | | } |
| | | |
| | | public ToWmsDTO(Integer stationCode, Double grossWt, String barcode, Integer status) { |
| | | this.stationCode = stationCode; |
| | | this.weight = grossWt; |
| | | this.grossWt = grossWt; |
| | | this.barcode = barcode; |
| | | this.barCode = barcode; |
| | | this.status = status; |
| | | } |
| | | |
| | |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | Integer workNo = staProtocol.getWorkNo(); |
| | | if (workNo!=9998){ |
| | | if (workNo!=9998 && workNo!=9997){ |
| | | continue; |
| | | } |
| | | Integer stano = staProtocol.getStaNo(); |
| | |
| | | // 判断是否满足入库条件 |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() |
| | | && staProtocol.isInEnable() |
| | | && workNo == 9998 |
| | | && (workNo == 9998 || workNo == 9997) |
| | | && staProtocol.isPakMk() |
| | | && staProtocol.isPakMkWalk() |
| | | ) { |
| | |
| | | continue; |
| | | } |
| | | String barcode = barcodeThread.getBarcode(); |
| | | if (!Cools.isEmpty(barcode) && !barcode.equals("99999999")) { |
| | | if (!Cools.isEmpty(barcode) && !barcode.equals("99999999") && !barcode.equals("000000")) { |
| | | // 请求wms接口,获取工作号和目标库位 |
| | | ToWmsDTO toWmsDTO = new ToWmsDTO(staProtocol.getSiteId(),staProtocol.getGrossWt(),barcode, 0); |
| | | ToWmsDTO toWmsDTO = new ToWmsDTO(staProtocol.getSiteId(),staProtocol.getGrossWt(),barcode, workNo == 9998? 0 : 1); |
| | | |
| | | TaskWrk taskWrk1 = taskWrkService.selectOne(new EntityWrapper<TaskWrk>().eq("barcode", barcode)); |
| | | if (!Cools.isEmpty(taskWrk1)) { |
| | | log.info("托盘码:" + barcode + "任务档存在"); |
| | |
| | | } else { |
| | | staProtocol.setWorkNo(taskWrk1.getWrkNo()); |
| | | staProtocol.setStaNo(staProtocol.getSiteId()); |
| | | devpThread.setPakMkWalk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | } |
| | | } |
| | |
| | | staProtocol.setWorkNo(9999); |
| | | staProtocol.setStaNo(inSta.getBackSta()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | devpThread.setPakMkWalk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | continue; |
| | | } |
| | |
| | | ); |
| | | log.info("入库请求参数{}" + JSON.toJSONString(toWmsDTO)); |
| | | log.info("入库请求返回参数{}" + JSON.toJSONString(response)); |
| | | if (jsonObject.getInteger("code").equals(200)) { |
| | | if (!Cools.isEmpty(jsonObject.getInteger("code")) && jsonObject.getInteger("code").equals(200)) { |
| | | try { |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | } catch (Exception e) { |
| | |
| | | && staProtocol.isPakMk() |
| | | && staProtocol.isPakMkWalk() |
| | | ) { |
| | | // 获取条码扫描仪信息 |
| | | BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, inSta.getBarcode()); |
| | | if (barcodeThread == null) { |
| | | continue; |
| | | } |
| | | String barcode = barcodeThread.getBarcode(); |
| | | if (Cools.isEmpty(barcode) || barcode.equals("0") || barcode.equals("000000")) { |
| | | staProtocol.setWorkNo(9999); |
| | | staProtocol.setStaNo(inSta.getBackSta()); |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol)); |
| | | continue; |
| | | } |
| | | // 请求wms接口,获取工作号和目标库位 |
| | | ToWmsDTO toWmsDTO = new ToWmsDTO("", staProtocol.getSiteId(), 1); |
| | | |
| | | ToWmsDTO toWmsDTO = new ToWmsDTO(staProtocol.getSiteId(),staProtocol.getGrossWt(),barcode, 1); |
| | | HashMap<String, Object> headParam = new HashMap<>(); |
| | | headParam.put("Content-Type", "application/json"); |
| | | String response; |
| | |
| | | ); |
| | | log.info("入库请求参数{}" + JSON.toJSONString(toWmsDTO)); |
| | | log.info("入库请求返回参数{}" + JSON.toJSONString(response)); |
| | | if (jsonObject.getInteger("code").equals(200)) { |
| | | if (!Cools.isEmpty(jsonObject.getInteger("code")) && jsonObject.getInteger("code").equals(200)) { |
| | | try { |
| | | devpThread.setPakMk(staProtocol.getSiteId(), false); |
| | | } catch (Exception e) { |
| | |
| | | // //开始运行 |
| | | // String response = CrnStartRunning(taskWrk); |
| | | // JSONObject jsonObject = JSON.parseObject(response); |
| | | // if (jsonObject.getInteger("code").equals(200)) { |
| | | // if (!Cools.isEmpty(jsonObject.getInteger("code")) && jsonObject.getInteger("code").equals(200)) { |
| | | // |
| | | // }else { |
| | | // log.error("入库开始运行通讯失败,"+jsonObject.get("msg")); |
| | |
| | | ,true |
| | | ); |
| | | |
| | | if (jsonObject.getInteger("code").equals(200)) { |
| | | if (!Cools.isEmpty(jsonObject.getInteger("code")) && jsonObject.getInteger("code").equals(200)) { |
| | | //解析 |
| | | List<WMSAndAGVInterfaceParam> params = new ArrayList<>(); |
| | | params.add(param); |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.domain.enums.TaskStatusType; |
| | | import com.zy.asrs.entity.*; |
| | |
| | | .doPost(); |
| | | jsonObject = JSON.parseObject(response); |
| | | |
| | | if (jsonObject.getInteger("code").equals(200)) { |
| | | if (!Cools.isEmpty(jsonObject.getInteger("code")) && jsonObject.getInteger("code").equals(200)) { |
| | | if (taskWrkService.saveToHistory(taskWrk.getTaskNo()) == 0) { |
| | | log.error("任务档转任务历史档失败" + taskWrk); |
| | | return ; |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | |
| | | System.out.println("response:"+response); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | |
| | | if (jsonObject.getInteger("code").equals(200)) { |
| | | if (!Cools.isEmpty(jsonObject.getInteger("code")) && jsonObject.getInteger("code").equals(200)) { |
| | | success = true; |
| | | } else { |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", URL+"/"+mesPath, JSON.toJSONString(combParam), response); |
| | |
| | | */ |
| | | public class HttpHandler { |
| | | |
| | | private static final Integer DEFAULT_TIMEOUT_SECONDS = 5; |
| | | private static final Integer DEFAULT_TIMEOUT_SECONDS = 10; |
| | | private static final MediaType MEDIA_TYPE = MediaType.parse("application/json"); |
| | | |
| | | private String uri; |
| | |
| | | |
| | | // 入库 ===>> 入库站到堆垛机站,根据条码扫描生成入库工作档 |
| | | mainService.generateStoreWrkFile(); // 组托 |
| | | mainService.generateStoreWrkFileIsEmptyMk(); // 组托 空托 |
| | | // mainService.generateStoreWrkFileIsEmptyMk(); // 组托 空托 |
| | | |
| | | mainService.generateStoreWrkFileWalk(); // 任务下发 |
| | | |
| | |
| | | barcode: ${wcs-slave.barcode[1].id} |
| | | backSta: 1012 |
| | | barcodeSign: false |
| | | # 入库下发口1 |
| | | inWalkSta[3]: |
| | | staNo: 1020 |
| | | barcode: ${wcs-slave.barcode[2].id} |
| | | backSta: 1021 |
| | | barcodeSign: false |
| | | # 入库下发口1 |
| | | inWalkSta[4]: |
| | | staNo: 1004 |
| | | barcode: ${wcs-slave.barcode[0].id} |
| | | backSta: 1005 |
| | | barcodeSign: false |
| | | |
| | | # 出库口1 |
| | | outSta[0]: |
| | |
| | | # username: sa |
| | | # password: sa@123 |
| | | driver-class-name: dm.jdbc.driver.DmDriver |
| | | # url: jdbc:dm://27.172.2.102:5236/SOURCE |
| | | url: jdbc:dm://27.172.1.129:5236/SOURCE |
| | | url: jdbc:dm://27.172.2.102:5236/SOURCE |
| | | # url: jdbc:dm://27.172.1.129:5236/SOURCE |
| | | # url: jdbc:dm://127.0.0.1:5236/SOURCE |
| | | # username: SYSDBA |
| | | # password: Zy@12345 |
| | | username: SYSDBA |
| | | password: Zy@12345 |
| | | # username: ZOS_ZEMIC |
| | | # password: k3Mq6xRv9frOxb7n |
| | | # username: ENC(++MryJD2j+X3rpmocG4vPH5vxXbpJNrF) |
| | |
| | | #url: 10.32.53.195:8080 |
| | | # WMS系统ip |
| | | # url: 10.210.157.109:8090 |
| | | url: 27.172.1.135:9027 |
| | | url: 27.172.1.135:20006 |
| | | # url: 27.172.2.104:9027 |
| | | # 入库任务申请接口 |
| | | #inboundTaskApplyPath: api/InterFace/inboundTaskApply |
| | | inboundTaskApplyPath: api/external/wcs/inboundTaskApply |
| | | inboundTaskApplyPath: xf-management/api/external/wcs/inboundTaskApply |
| | | # inboundTaskApplyPath: api/external/wcs/inboundTaskApply |
| | | # inboundTaskApplyPath: open/asrs/inboundTaskApply |
| | | # 任务状态反馈接口 |
| | | taskStatusFeedbackPath: api/external/wcs/taskStatusFeedback |
| | | taskStatusFeedbackPath: xf-management/api/external/wcs/taskStatusFeedback |
| | | # taskStatusFeedbackPath: api/external/wcs/taskStatusFeedback |
| | | # 货位状态更新接口 |
| | | # locationUpdatePath: api/InterFace/get_InterFace_TestStorage |
| | | # 移库申请接口 |
| | | # movePath: api/InterFace/get_InterFace_TestStorage |
| | | wmsHeartBeat: api/external/wcs/wmsHeartBeat |
| | | wmsHeartBeat: xf-management/api/external/wcs/wmsHeartBeat |
| | | # wmsHeartBeat: api/external/wcs/wmsHeartBeat |
| | |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1010", |
| | | "text": "1010", |
| | | "top": 231, |
| | | "left": 240, |
| | | "width": 45, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1011", |
| | | "text": "1011", |
| | | "top": 231, |
| | | "left": 193, |
| | | "width": 45, |
| | | "left": 220, |
| | | "width": 65, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1015", |
| | | "text": "1015", |
| | | "top": 172, |
| | | "left": 240, |
| | | "width": 45, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1016", |
| | | "text": "1016", |
| | | "top": 172, |
| | | "left": 193, |
| | | "width": 45, |
| | | "left": 220, |
| | | "width": 65, |
| | | "height": 23 |
| | | }, { |
| | | "type": "stn", |
| | | "id": "site-1012", |
| | | "text": "1012", |
| | | "top": 196, |
| | | "left": 193, |
| | | "left": 220, |
| | | "width": 45, |
| | | "height": 34 |
| | | }, { |