vince
2025-02-17 320350eb18e32a9a008c4e6409441730732e2e97
src/main/java/com/fzzy/protocol/bhzn/service/Bhzn2GatewayGrainService.java
@@ -35,7 +35,7 @@
        GatewayDevice device = reqData.getDevice();
        //获取连接中的设备信息
        ApiCommonDevice apiCommonDevice = Constant.getCommonDeviceCache(device.getIp());
        ApiCommonDevice apiCommonDevice = Constant.getCommonDeviceCacheByIp(device.getIp());
        if (null == apiCommonDevice) {
            resp.setCode(500);
@@ -58,14 +58,14 @@
        try {
            //Step 请求信息放入内存
            ProtocolUtils.addSyncReq2Map(device.getDepotIdSys(), reqData);
            ProtocolUtils.addSyncReq2Map(device.getDeviceSn(), reqData);
            // 生成粮情信息
            String hexStr = CommandBuild.getInstance().getMsgCheck(device.getDeviceSn(), device.getDepotIdSys());
            String hexStr = CommandBuild.getInstance().getMsgCheck(device.getDeviceSn(), device.getBhId());
            // 发送命令
            InvokeResult message = BhznGrainV2ServerEngine.push(device.getIp(), device.getPort(), BytesUtil.hexStrToBytes(hexStr));
            log.error("平台------>>>>控制柜:发送粮情检测命令-{}", message);
            log.info("平台------>>>>控制柜:发送粮情检测命令-{}-{}", message,hexStr);
            // 封装返回信息
            if (!InvokeResult.SUCCESS.getCode().equals(message.getCode())) {
@@ -84,6 +84,11 @@
    }
    @Override
    public BaseResp syncGrainTh(BaseReqData reqData) {
        return new BaseResp();
    }
    @Override
    public BaseResp syncConf(BaseReqData reqData) {
        return new BaseResp();
    }