pjb
2024-06-30 cd81647ca01d3afedabe40ccc2ba02c3f5be821a
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -210,22 +210,22 @@
                        }
                    }
                    if (wrkMast != null) {
//                        News.warn(""+mark+" - 4"+" - 工作档中已存在该站状态为( 2.设备上走 )的数据,工作号={}", wrkMast.getWrkNo());
//                        if (devp.getId() == 2) {
//                            staProtocol.setWorkNo((short)9999);
//                            staProtocol.setStaNo(inSta.getBackSta().shortValue());
//                            devpThread.setPakMk(staProtocol.getSiteId(), false);
//                            boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
//                            if (!result) {
//                                throw new CoolException("更新plc站点信息失败");
//                            }
//                        }
//
//                        // led 异常显示
//                        if (ledThread != null) {
//                            String errorMsg = "工作档已存在该条码号===>>" + barcode;
//                            MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(5, errorMsg));
//                        }
                        News.warn(""+mark+" - 4"+" - 满托盘入库工作档中已存在该站状态为( 2.设备上走 )的数据,工作号={}", wrkMast.getWrkNo());
                        if (devp.getId() == 2) {
                            staProtocol.setWorkNo((short)9999);
                            staProtocol.setStaNo(inSta.getBackSta().shortValue());
                            devpThread.setPakMk(staProtocol.getSiteId(), false);
                            boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                            if (!result) {
                                throw new CoolException("更新plc站点信息失败");
                            }
                        }
                        // led 异常显示
                        if (ledThread != null) {
                            String errorMsg = "工作档已存在该条码号===>>" + barcode;
                            MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(5, errorMsg));
                        }
                        continue;
                    }
@@ -286,7 +286,7 @@
//                                ledThread.errorReset();
                            }
                        } else {
                            News.error(""+mark+" - 5"+" - 请求接口失败!!!url:{};request:{};response:{}", wmsUrl + "/rpc/pakin/loc/v1", JSON.toJSONString(param), response);
                            News.error(""+mark+" - 5"+" - 满板入库请求接口失败!!!url:{};request:{};response:{}", wmsUrl + "/rpc/pakin/loc/v1", JSON.toJSONString(param), response);
                            if(devp.getId() == 2) {
                                staProtocol.setWorkNo((short)9999);
                                staProtocol.setStaNo(inSta.getBackSta().shortValue());
@@ -1608,6 +1608,7 @@
                                }
//                                ledThread.errorReset();
                            }
                            Thread.sleep(500);
                        } else {
                            staProtocol.setWorkNo((short)9991);
                            staProtocol.setStaNo((short)100);
@@ -1624,7 +1625,7 @@
                                    MessageQueue.offer(SlaveType.Led, emptyInSta.getLed(), new Task(5, errorMsg));
                                }
                            }
                            News.error(""+mark+" - 3"+" - 请求接口失败!!!url:{};request:{};response:{}", wmsUrl + "/rpc/pakin/loc/v1", JSON.toJSONString(param), response);
                            News.error(""+mark+" - 3"+" - 空板入库请求接口失败!!!url:{};request:{};response:{}", wmsUrl + "/rpc/pakin/loc/v1", JSON.toJSONString(param), response);
                        }
                    } catch (Exception e) {
                        e.printStackTrace();