vince
2023-10-17 b193c7ade86d2eb0f5150afb7ef8a7b1021d49a6
igds-protocol-bhzn/src/main/java/com/ld/igds/protocol/bhzn/grainv2/msg/AnalysisService.java
@@ -436,6 +436,7 @@
            th.setCompanyId(ContextUtil.getDefaultCompanyId());
            String data = message.getContent();
            String houseNo = data.substring(0, 2);
            int depotId = BytesUtil.hexToInt(houseNo);
            String t = data.substring(4, 8);
            String h = data.substring(8, 12);
            double temp, humy;
@@ -452,9 +453,9 @@
            th.setTempIn(temp);
            th.setHumidityIn(humy);
            log.info("主机--------->>>平台,解析仓温仓湿信息,仓库={},结果={}", houseNo, th.toString());
            log.info("主机--------->>>平台,解析仓温仓湿信息,仓库={},结果={}", depotId, th.toString());
            String key = "TH_" + houseNo;
            String key = "TH_" + depotId;
            contextMapTH.put(key, th);
        } catch (Exception e) {
@@ -469,8 +470,8 @@
    private THDto getTH(IoMessage message) {
        String data = message.getContent();
        String houseNo = data.substring(0, 2);
        String key = "TH_" + houseNo;
        Integer depotId = BytesUtil.hexToInt(houseNo);
        String key = "TH_" + depotId;
        return contextMapTH.get(key);
    }