| | |
| | | log.info("Modbus电表----->>>平台:能耗数据解析完成-仓库={}", esData.getDepotId()); |
| | | esService.saveAndUpdateInc(esData); |
| | | } |
| | | |
| | | /** |
| | | * 解析空调状态 |
| | | * |
| | | * @param request |
| | | * @param result |
| | | */ |
| | | public void analysisTempStatus(BaseRequest request, Number result) { |
| | | |
| | | log.debug("----------开始执行能耗结果解析----{}", request.getDepotId()); |
| | | |
| | | |
| | | //有功电能判断是否返回有效数据 |
| | | if (null == result) { |
| | | log.error("---能耗数据返回数据不完整,停止解析----{}", result.toString()); |
| | | return; |
| | | } |
| | | |
| | | EsData esData = new EsData(); |
| | | esData.setCompanyId(request.getCompanyId()); |
| | | esData.setDepotId(request.getDepotId()); |
| | | esData.setUpdateTime(new Date()); |
| | | |
| | | esData.setEp(result.doubleValue()); |
| | | esData.setEs(result.doubleValue()); |
| | | |
| | | log.info("Modbus电表----->>>平台:能耗数据解析完成-仓库={}", esData.getDepotId()); |
| | | esService.saveAndUpdateInc(esData); |
| | | } |
| | | } |