Browse Source

1、温湿度传感器解析代码修复

dev
3067418132@qq.com 3 weeks ago
parent
commit
1150bf4cac
  1. 2
      mh-admin/src/main/resources/application.yml
  2. 2
      mh-common/src/main/java/com/mh/common/utils/AnalysisReceiveOrder485.java
  3. 6
      mh-system/src/main/java/com/mh/system/mapper/device/CollectionParamsManageMapper.java

2
mh-admin/src/main/resources/application.yml

@ -1,6 +1,6 @@
spring: spring:
profiles: profiles:
active: dev active: prod
# 用户配置 # 用户配置
user: user:

2
mh-common/src/main/java/com/mh/common/utils/AnalysisReceiveOrder485.java

@ -368,7 +368,7 @@ public class AnalysisReceiveOrder485 {
BigDecimal bigDecimal = new BigDecimal(data); BigDecimal bigDecimal = new BigDecimal(data);
if (deviceCodeParam.getParamType().equals("12")){ if (deviceCodeParam.getParamType().equals("12")){
// 温度 // 温度
bigDecimal = bigDecimal.multiply(new BigDecimal(550)).divide(new BigDecimal(1650)).subtract(new BigDecimal(40)); bigDecimal = bigDecimal.multiply(new BigDecimal(165)).divide(new BigDecimal(1650)).subtract(new BigDecimal(40));
} else if (deviceCodeParam.getParamType().equals("35")) { } else if (deviceCodeParam.getParamType().equals("35")) {
// 湿度 // 湿度
bigDecimal = bigDecimal.multiply(new BigDecimal(100)); bigDecimal = bigDecimal.multiply(new BigDecimal(100));

6
mh-system/src/main/java/com/mh/system/mapper/device/CollectionParamsManageMapper.java

@ -350,16 +350,18 @@ public interface CollectionParamsManageMapper extends BaseMapper<CollectionParam
List<String> OffLine(); List<String> OffLine();
@Select("select * from collection_params_manage cpm " + @Select("select * from collection_params_manage cpm " +
" where (cpm.system_type = '1' or cpm.system_type = '6') and is_use = 0 " + " where (cpm.system_type = '1' or cpm.system_type = '6' or cpm.system_type = '0') and is_use = 0 " +
" and (param_type= '16' " + " and (param_type= '16' " +
" or param_type='18' " + " or param_type='18' " +
" or param_type = '5' " + " or param_type = '5' " +
" or param_type = '2' " + " or param_type = '2' " +
" or param_type = '10' " + " or param_type = '10' " +
" or param_type = '12' " + " or param_type = '12' " +
" or param_type = '13' " +
" or param_type = '35' " +
" or param_type = '14' " + " or param_type = '14' " +
" or param_type = '11' " + " or param_type = '11' " +
" or param_type = '46' " + " or param_type = '46' " +
" or param_type = '48')") " or param_type = '48') and cpm.gateway_id != '99'")
List<CollectionParamsManage> createOrderList(); List<CollectionParamsManage> createOrderList();
} }

Loading…
Cancel
Save