#
zjj
2024-11-05 cdc12aeeb8aca9061796a27ecc2ceb3aa61c3737
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -2082,7 +2082,7 @@
                                && basDevp.getWrkNo() == 0 && basDevp.getCanining().equals("Y")){
//                             更新站点信息 且 下发plc命令
                            staProtocol.setWorkNo((short) 9997);
                            staProtocol.setStaNo(basDevp.getDevNo().shortValue());
                            staProtocol.setStaNo((short) (basDevp.getDevNo()==1004?1003:1013));
//                            staProtocol.setStaNo((short) 1013);
                            devpThread.setPakMk(staProtocol.getSiteId(), false);
                            boolean result = MessageQueue.offer(SlaveType.Devp, devpThread.getSlave().getId(), new Task(2, staProtocol));
@@ -2535,8 +2535,8 @@
                String batch2 = "";
                short type = 0;
                short type2 = 0;
                short anfme = 0;
                short anfme2 = 0;
                short anfme = 1;
                short anfme2 = 1;
                Double weight = 0d;
                Double weight2 = 0d;
@@ -2594,6 +2594,7 @@
                        work1 = true;
                        if (inStn.getSourcePlcId() == 4 || inStn.getSourcePlcId() ==5){ //灌装站需要获取输送线物料代码
                            matnr = staProtocol.getMatnr();
                            batch = staProtocol.getBatch();
                        }
                        devpThread.setPakMk(inStn.getSourceStaNo(),false);
@@ -2658,6 +2659,7 @@
                            work2 = true;
                            if (inStn.getSourcePlcId() == 4){
                                matnr2 = staProtocol.getMatnr();
                                batch2 = staProtocol.getBatch();
                            }
                            devpThread.setPakMk(inStn.getSourceStaNo(),false);
                            break;
@@ -3217,7 +3219,7 @@
                    WaitPakin waitPakin = waitPakinService.selectOne(new EntityWrapper<WaitPakin>().eq("zpallet", barcode).eq("io_status", "N"));
                    if (Cools.isEmpty(waitPakin)) {
                        try {
                            CreateComb(barcode, staProtocol.getMatnr(),staProtocol.getWorkNo().intValue(),staProtocol.getBatch());
                            CreateComb(barcode, staProtocol.getMatnr(),staProtocol.getWorkNo().intValue(),staProtocol.getBatch(),inSta);
                        }catch (IOException e) {
                            throw new CoolException(e);
                        }
@@ -3287,7 +3289,7 @@
    }
    public void CreateComb(String barcode,Integer code,Integer wrkNo,String batch) throws IOException {
    public void CreateComb(String barcode,Integer code,Integer wrkNo,String batch,DevpSlave.Sta inSta) throws IOException {
        Double anfme = 0d;
        Double weight = 0d;
@@ -3338,6 +3340,13 @@
        }else {
            log.error("请求接口失败!!!url:{};request:{};response:{}", wmsUrl + "/mobile/comb/auth", JSON.toJSONString(combParam), response);
//            log.info("{}号条码扫描器检测条码信息:{}", inSta.getBarcode(), barcode);
            //条码为空或者不符合,退库到
            LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, inSta.getLed());
            if (ledThread != null) {
                String errorMsg = "扫码失败,请重试";
                MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(3, errorMsg));
            }
        }
    }