#
ynhfasrs
7 天以前 75d0daa4f8dc2010ec92f35cac08a19d240ca45d
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -150,9 +150,9 @@
                    if (staProtocol.isAutoing()
                            && staProtocol.isLoading()
                            && staProtocol.isInEnable()
                            && !staProtocol.isEmptyMk()
//                            && !staProtocol.isEmptyMk()
                            && staProtocol.isPakMk()
                            && staProtocol.getWorkNo() == 9999
                            && (staProtocol.getWorkNo() == 9999 || staProtocol.getWorkNo() == 9998)
                    ) {
                        // 获取条码扫描仪信息
                        BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, inSta.getBarcode());
@@ -183,10 +183,10 @@
                            requestParam.put("wcsStatus", 0);//成功
                        }
                        String response = "";
                        String response = "None";
                        Boolean success = false;
                        try {
                            Object object = redisUtil.get(RedisKeyType.IN_TASK_LOCK.key);
                            Object object = redisUtil.get(RedisKeyType.IN_TASK_LOCK.key + inSta.getStaNo());
                            if(object != null) {
                                continue;
                            }
@@ -198,15 +198,16 @@
                                    .build()
                                    .doPost();
                            JSONObject jsonObject = JSON.parseObject(response);
                            redisUtil.set(RedisKeyType.IN_TASK_LOCK.key, "lock", 5);
                            log.info(response);
                            redisUtil.set(RedisKeyType.IN_TASK_LOCK.key + inSta.getStaNo(), "lock", 5);
                            if (jsonObject.getInteger("code") == 200) {
                            } else if (jsonObject.getInteger("code") == 500) {
                                News.watchInfo(String.valueOf(staProtocol.getSiteId()), "条码:" + barcode + "申请WMS失败,系统回退,response=" + JSON.toJSONString(jsonObject));
                                staProtocol.setWorkNo(9997);
                                staProtocol.setStaNo(inSta.getBackSta().shortValue());
                                MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
//                                staProtocol.setWorkNo(9997);
//                                staProtocol.setStaNo(inSta.getBackSta().shortValue());
//                                MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                                continue;
                            }else {
                                News.watchInfo(String.valueOf(staProtocol.getSiteId()), "条码:" + barcode + "申请WMS失败,response=" + JSON.toJSONString(jsonObject));
@@ -248,7 +249,7 @@
                            taskWrk.setBarcode(barcode);//条码
                            taskWrk.setCrnNo(locMast.getCrnNo());
                            taskWrk.setTargetPoint(resultLocNo);
                            taskWrk.setStartPoint(String.valueOf(staProtocol.getStaNo()));
                            taskWrk.setStartPoint(String.valueOf(inSta.getStaNo()));
                            if (!Cools.isEmpty(taskWrk.getTargetPoint())) {
                                taskWrk.setOriginTargetPoint(taskWrk.getTargetPoint());
                            }
@@ -456,7 +457,7 @@
                    flag = true;
                }
                if (!flag) {
                    News.watchError(crnStn.getStaNo() + "站点", "入库 ===>> 堆垛机站点状态检测失败,站点需要满足:自动、有物、有工作号、站点可入");
//                    News.watchError(crnStn.getStaNo() + "站点", "入库 ===>> 堆垛机站点状态检测失败,站点需要满足:自动、有物、有工作号、站点可入");
                    continue;
                }