#
LSH
2022-11-04 5252d40ed210204c9055207a834f1162f9616e08
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -192,7 +192,21 @@
                            if (!result) {
                                throw new CoolException("更新plc站点信息失败");
                            }
                        } else {
                        } else if (jsonObject.getInteger("code").equals(700) && (!barcodeThread.getBarcode().equals("NG"))){
                            StartupDto dto = jsonObject.getObject("data", StartupDto.class);
                            barcodeThread.setBarcode("");
                            staProtocol.setWorkNo((short)9998);
                            staProtocol.setStaNo((short)101);
                            devpThread.setPakMk(staProtocol.getSiteId(), false);
                            boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                            log.error("url:{};request:{};response:{}", wmsUrl+"/rpc/pakin/loc/v1", JSON.toJSONString(param), response);
                        }else {
                            StartupDto dto = jsonObject.getObject("data", StartupDto.class);
                            barcodeThread.setBarcode("");
                            staProtocol.setWorkNo((short)9998);
                            staProtocol.setStaNo((short)101);
                            devpThread.setPakMk(staProtocol.getSiteId(), false);
                            boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
                            log.error("请求接口失败!!!url:{};request:{};response:{}", wmsUrl+"/rpc/pakin/loc/v1", JSON.toJSONString(param), response);
                        }
@@ -473,7 +487,7 @@
                } else {
                    staProtocol = staProtocol.clone();
                }
                if (staProtocol.isAutoing() && staProtocol.isLoading() && (staProtocol.getWorkNo() == 0 || staProtocol.getStaNo() == null)) {
                if (staProtocol.isAutoing() && (staProtocol.isLoading()||staProtocol.getSiteId()==109) && (staProtocol.getWorkNo() == 0 || staProtocol.getStaNo() == null)) {
                    // 查询工作档
                    WrkMast wrkMast = wrkMastMapper.selectPakOutStep2(staProtocol.getSiteId());
                    if (wrkMast == null) {
@@ -2082,7 +2096,7 @@
                            LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>()
                                    .eq("channel",(i+1)));
                            if (locMast.getLocSts().equals("F")){
                                locMast.setPackStatus(7); //7.紧急出库
                                locMast.setPackStatus(8); //8.紧急出库
                                locMastService.update(locMast,new EntityWrapper<LocMast>()
                                        .eq("channel",(i+1)));
                            }
@@ -2162,12 +2176,12 @@
                LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("fire_status", 1));
                if (!Cools.isEmpty(locMast)){
                    //报警信号写入1
                    if (!MessageQueue.offer(SlaveType.Crn, locMast.getCrnNo(), new Task(4, (short)1))) {
                    if (!MessageQueue.offer(SlaveType.Crn, 1, new Task(4, (short)1))) {
                        log.error("火警  ===>> 给堆垛机发送报警信号失败");
                    }
                } else {
                    //报警信号没有后,复位地址
                    if (!MessageQueue.offer(SlaveType.Crn, locMast.getCrnNo(), new Task(4, (short)0))) {
                    if (!MessageQueue.offer(SlaveType.Crn, 1, new Task(4, (short)0))) {
                        log.error("火警  ===>> 给堆垛机清零复位报警信号失败");
                    }
                }