lty
2025-05-21 cf262190df6df535ec898a1365d5c3612a7dd185
#BUG
2个文件已修改
28 ■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/SiemensDevpThread.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -158,9 +158,9 @@
                    errMsg = "扫码失败";
                    back = true;
                }
                if(staProtocol.getWeight() <= 0 ){
                    continue;
                }
//                if(staProtocol.getWeight() <= 0 ){
//                    continue;
//                }
//                if (!back && staProtocol.getWeight() == 0.0) {
//                    errMsg = "重量获取失败";
//                    back = true;
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -77,13 +77,13 @@
        add(10); add(11); add(12); add(13);
    }};
    public static final ArrayList<Integer> staNosErrList2 = new ArrayList<Integer>() {{
        add(101); add(104);add(106);add(108);
        add(202);add(204);add(207);add(210);
        add(102); add(105);add(107);add(109);
        add(203);add(205);add(208);add(211);
    }};
    public static final ArrayList<Integer> staNosErrList1 = new ArrayList<Integer>() {{
        add(122);
        add(222);add(224);add(227);add(230);
        add(123);
        add(223);add(225);add(228);add(231);
    }};
    public static final ArrayList<Integer> staNoWeight1 = new ArrayList<Integer>() {{
@@ -241,7 +241,7 @@
            OutputQueue.DEVP.offer(MessageFormat.format( "【{0}】输送线plc连接失败!!! ===>> [id:{1}] [ip:{2}] [port:{3}]  [rack:{4}] [slot:{5}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort(), slave.getRack(), slave.getSlot()));
            News.error("SiemensDevp"+" - 2"+" - 输送线plc连接失败!!! ===>> [id:{}] [ip:{}] [port:{}]", slave.getId(), slave.getIp(), slave.getPort());
        }
        siemensS7Net.ConnectClose();
//        siemensS7Net.ConnectClose();
        initSite();
        return result;
    }
@@ -273,7 +273,12 @@
        ArrayList<Integer> staNoWeight = getStaNoWeight();
        int staNoSize = staNos.size();
        OperateResultExOne<byte[]> result = siemensS7Net.Read("DB101.0", (short) (500 * 8));
        OperateResultExOne<byte[]> resultWeight = siemensS7Net.Read("DB102.0", (short)  (8 * 4));
        OperateResultExOne<byte[]> resultWeight = null;
        if(staNoWeight.size()>4){
            resultWeight = siemensS7Net.Read("DB102.0", (short)  (8 * 4));
        }else{
            resultWeight = siemensS7Net.Read("DB102.0", (short)  (4 * 4));
        }
        OperateResultExOne<byte[]> resultWeight2 = siemensS7Net.Read("DB102.0", (short)  (4 * 4));
        if (result.IsSuccess && resultWeight.IsSuccess) {
@@ -340,11 +345,6 @@
                    Integer siteId = staNoErrs.get(i); // 站点编号
                    boolean[] status = siemensS7Net.getByteTransform().TransBool(resultErr.Content, i * 4 + 2, 1);
                    StaProtocol staProtocol = station.get(siteId);
                    if (staProtocol == null) {
                        staProtocol = new StaProtocol();
                        staProtocol.setSiteId(siteId);
                        station.put(siteId, staProtocol);
                    }
                    staProtocol.setFrontErr(status[0]);
                    staProtocol.setBackErr(status[1]);
                    staProtocol.setHighErr(status[2]);