自动化立体仓库 - WCS系统
tqs
2022-10-11 9ff1f1f221aeafc99653c846b2c2442f9c033ee5
Merge remote-tracking branch 'gitbit/gzynwcs' into gzynwcs
9个文件已修改
83 ■■■■ 已修改文件
src/main/java/com/zy/asrs/entity/LocMast.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/netty/constant/FireDataType.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/netty/domain/fire/Fire_3030.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/netty/handle/PackageServerHandler.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/SiemensDevpThread.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/LocMastMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/console.map.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/index.html 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/LocMast.java
@@ -195,6 +195,9 @@
    @TableField("pack_status")
    private Integer packStatus;
    @ApiModelProperty(value= "通道")
    private Integer channel;
    public String getIoTime$(){
        if (Cools.isEmpty(this.ioTime)){
            return "";
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -2019,6 +2019,16 @@
                                newStatus = 0;
                                newSingle = 0;//测试复核,寄存器地址,8===>>0
                                break;
                            case 11://入库前判断充电线是否放好
                                olsStatus = 99;
                                newStatus = 0;
                                newSingle = 11;//不变
                                break;
                            case 12://充电线放好
                                olsStatus = 99;
                                newStatus = 0;
                                newSingle = 0;//测试复核,寄存器地址,12===>>0
                                break;
                        }
                        TestMast testMast = testMastService.selectOne(new EntityWrapper<TestMast>()
@@ -2044,6 +2054,7 @@
                            }
                        }else if (devpThread.startSignal[i] == 5){
                            SearchLocParam param = new SearchLocParam();
                            param.setBarcode(i+1+"");
                            String response = new HttpHandler.Builder()
                                    .setUri(wmsUrl)
                                    .setPath("/mobile/test/suspend/auth")
@@ -2086,8 +2097,45 @@
                                devpThread.startSignal[i] = newSingle;
                            }
                        }else if (devpThread.startSignal[i] == 8){
                        }
                            //复位PLC信号,借用输送站点实体类
                            StaProtocol staProtocol = new StaProtocol();
                            staProtocol.setSiteId(i*2);//寄存器地址
                            staProtocol.setStaNo(newSingle);//修改PLC寄存器地址值,8==>0
                            boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol));
                            if(!result){
//                                log.error("更新库位紧急出库信号失败===>>[channel:{},locNo:{},barcode:{}]", i+1, locMast.getLocNo(), locMast.getBarcode());
//                                throw new CoolException("更新测试信号失败===>>" + i);
                            } else {
                                devpThread.startSignal[i] = newSingle;
                            }
                        }else if (devpThread.startSignal[i] == 11){
                            LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>()
                                    .eq("channel",(i+1)));
                            if (locMast.getLocSts().equals("O")){
                                locMast.setLocSts("X");
                                locMastService.update(locMast,new EntityWrapper<LocMast>()
                                        .eq("channel",(i+1)));
                            }
                        }else if (devpThread.startSignal[i] == 12){
                            LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>()
                                    .eq("channel",(i+1)));
                            if (locMast.getLocSts().equals("X")){
                                locMast.setLocSts("O");
                                locMastService.update(locMast,new EntityWrapper<LocMast>()
                                        .eq("channel",(i+1)));
                                //复位PLC信号,借用输送站点实体类
                                StaProtocol staProtocol = new StaProtocol();
                                staProtocol.setSiteId(i*2);//寄存器地址
                                staProtocol.setStaNo(newSingle);//修改PLC寄存器地址值,12==>0
                                boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(3, staProtocol));
                                if(!result){
//                                log.error("更新库位紧急出库信号失败===>>[channel:{},locNo:{},barcode:{}]", i+1, locMast.getLocNo(), locMast.getBarcode());
//                                throw new CoolException("更新测试信号失败===>>" + i);
                                } else {
                                    devpThread.startSignal[i] = newSingle;
                                }
                            }
                        }else { }
                    }
src/main/java/com/zy/core/netty/constant/FireDataType.java
@@ -2,7 +2,7 @@
public enum FireDataType {
    HEARTBEAT(0x30, 0x30, "心跳信息"),
    HEARTBEAT(0x36, 0x39, "心跳信息"),
    FIRE_ALARM(0x38, 0x30, "火警"),
src/main/java/com/zy/core/netty/domain/fire/Fire_3030.java
@@ -72,7 +72,7 @@
//        System.out.println(byteBuf.refCnt());
        this.no = analyze(new byte[]{bytes[3], bytes[4]});
        this.loop = analyze(new byte[]{bytes[5], bytes[6]});
        this.partNo = analyze(new byte[]{bytes[7], bytes[8]});
        this.partNo = analyze(new byte[]{bytes[7], bytes[8]});  //0100201 对应  30 31   0200201 对应 34 35
        this.year = analyze(new byte[]{bytes[11], bytes[12]});
        this.month = analyze(new byte[]{bytes[13], bytes[14]});
        this.day = analyze(new byte[]{bytes[15], bytes[16]});
src/main/java/com/zy/core/netty/handle/PackageServerHandler.java
@@ -44,10 +44,18 @@
            case HEARTBEAT:
                ChannelCache.setChannel(String.valueOf(fire3030.getNo()), ctx.channel());
                Constant.errorMap.remove(fire3030.getNo());
                LocMastService locMastService2 = SpringUtils.getBean(LocMastService.class);
                LocMast locMast2 = locMastService2.selectOne(new EntityWrapper<LocMast>().eq("loc_no","01001804"));
                if(null != locMast2) {
                    locMast2.setChannel(1000);
                    locMast2.setModiTime(new Date());
                    locMastService2.update(locMast2, new EntityWrapper<LocMast>().eq("loc_no", "01001804"));
                }
                break;
            case FIRE_ALARM:
                //消防IO点编号
                String fireNo = fire3030.getNo().toString() + fire3030.getLoop().toString() + fire3030.getPartNo().toString();
//                String fireNo = fire3030.getNo().toString() + fire3030.getLoop().toString() + fire3030.getPartNo().toString();
                String fireNo =fire3030.getPartNo().toString();  //0100201 对应  30 31   0200201 对应 34 35
                String fireTime = "20" + fire3030.getYear() + "-" + fire3030.getMonth() + "-" + fire3030.getDay()
                        + " " + fire3030.getHour() + ":" + fire3030.getMinute() + ":" + fire3030.getSeconds();
                Date dt = DateUtils.convert(fireTime);
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -82,7 +82,7 @@
                    //复位测试信号
                    case 3:
                        StaProtocol staProtocol = (StaProtocol)task.getData();
                        siemensS7Net.Write("DB200." + staProtocol.getSiteId(), staProtocol.getStaNo());
                        siemensS7Net.Write("DB102.0" + staProtocol.getSiteId(), staProtocol.getStaNo());
                        break;
                    default:
                        break;
src/main/resources/mapper/LocMastMapper.xml
@@ -34,6 +34,7 @@
        <result column="mk" property="mk" />
        <result column="barcode" property="barcode" />
        <result column="ctn_no" property="ctnNo" />
        <result column="channel" property="channel" />
    </resultMap>
src/main/webapp/static/js/console.map.js
@@ -8,7 +8,7 @@
    "floors": 1,
    "racks": [{
        "type": "rack",
        "id": "rack1",
        "id": "rack2",
        "top": 168,
        "left": 463,
        "width": 826,
@@ -17,7 +17,7 @@
        "maxBayNo": 18
    }, {
        "type": "rack",
        "id": "rack2",
        "id": "rack1",
        "top": 226,
        "left": 463,
        "width": 826,
src/main/webapp/views/index.html
@@ -7,9 +7,10 @@
    <script src="../static/js/jquery/jquery-3.3.1.min.js"></script>
    <style>
        html{
            transform: scale(0.5) translate(-50%,-50%);
            height: 200%;
            width: 200%;
            transform: scale(1) translate(0,0);
            /*transform: scale(0.5) translate(-50%,-50%);*/
            height: 150%;
            width: 150%;
        }
    </style>