YYC
2023-09-07 7243e0b4bd9a267a633d2e481e17646509b6868d
igds-protocol-bhzn/src/main/java/com/ld/igds/protocol/bhzn/grainv1/RemoteGrainV1ServiceImpl.java
@@ -37,8 +37,28 @@
    public GrainResponse checkGrain(CheckGrainRequest request) {
        try {
            // 生成粮情信息
            String hexStr = CommandBuild.getInstance().getMsgCheck(request.getSerId(), request.getDepotId());
            String hexStr = "";
            if("5323".equals(request.getCompanyId())){
                if("0P01".equals(request.getDepotId())){
                    hexStr = CommandBuild.getInstance().getMsgCheck(request.getSerId(), "1");
                }else if("0P02".equals(request.getDepotId())){
                    hexStr = CommandBuild.getInstance().getMsgCheck(request.getSerId(),  "1");
                }else if("0P03".equals(request.getDepotId())){
                    hexStr = CommandBuild.getInstance().getMsgCheck(request.getSerId(),  "2");
                }else if("0P04".equals(request.getDepotId())){
                    hexStr = CommandBuild.getInstance().getMsgCheck(request.getSerId(), "2");
                }else if("0P05".equals(request.getDepotId())){
                    hexStr = CommandBuild.getInstance().getMsgCheck(request.getSerId(), "3");
                }else if("0P06".equals(request.getDepotId())){
                    hexStr = CommandBuild.getInstance().getMsgCheck(request.getSerId(), "4");
                }else if("0P07".equals(request.getDepotId())){
                    hexStr = CommandBuild.getInstance().getMsgCheck(request.getSerId(), "4");
                }else if("0P08".equals(request.getDepotId())){
                    hexStr = CommandBuild.getInstance().getMsgCheck(request.getSerId(), "4");
                }
            }else{
                hexStr = CommandBuild.getInstance().getMsgCheck(request.getSerId(), request.getDepotId());
            }
//            //通讯使用的是主机通讯
//            DeviceSer mainSer = coreSerService.getCacheSer(ContextUtil.getDefaultCompanyId(), BhznGrainV1ServerUtils.DEFAULT_MAC_ID);