diff --git a/casic-device/src/main/java/com/casic/missiles/modular/system/service/impl/BusH2sConfigServiceImpl.java b/casic-device/src/main/java/com/casic/missiles/modular/system/service/impl/BusH2sConfigServiceImpl.java index f38cea9..c4e9e8b 100644 --- a/casic-device/src/main/java/com/casic/missiles/modular/system/service/impl/BusH2sConfigServiceImpl.java +++ b/casic-device/src/main/java/com/casic/missiles/modular/system/service/impl/BusH2sConfigServiceImpl.java @@ -80,10 +80,13 @@ dto.setRetryTimes(configItems[0]); dto.setCollectInterval(configItems[1]); dto.setUploadPeriod(configItems[2]); - if (configItems.length == 5) { + if (configItems.length >= 5) { dto.setIp(configItems[3]); dto.setPort(configItems[4]); } + if (configItems.length >= 6) { + dto.setThreshold(Float.parseFloat(configItems[5])); + } } busConfigDTOList.add(dto); } @@ -115,8 +118,7 @@ + busConfigDTO.getIp() + "," + busConfigDTO.getPort() + "," + busConfigDTO.getThreshold();//按照重传次数、采集间隔、上传周期 busConfig.setFramecontent(str); save(busConfig); - redisCommon.sendMsg(DeviceTypeEnum.H2s.toString(), - busConfig.getDeviceId(), busConfig.getFramecontent(), busConfigDTO.getAttemptsMax()); + redisCommon.sendMsg(DeviceTypeEnum.H2s.toString(), busConfig.getDeviceId(), busConfig.getFramecontent(), busConfigDTO.getAttemptsMax()); // //发布消息订阅 // if (StrUtil.isNotBlank(concentratorCode)) { // RedisPublisherUtil.getInstance().publishMessage(concentratorCode); diff --git a/casic-device/src/main/java/com/casic/missiles/modular/system/service/impl/BusH2sConfigServiceImpl.java b/casic-device/src/main/java/com/casic/missiles/modular/system/service/impl/BusH2sConfigServiceImpl.java index f38cea9..c4e9e8b 100644 --- a/casic-device/src/main/java/com/casic/missiles/modular/system/service/impl/BusH2sConfigServiceImpl.java +++ b/casic-device/src/main/java/com/casic/missiles/modular/system/service/impl/BusH2sConfigServiceImpl.java @@ -80,10 +80,13 @@ dto.setRetryTimes(configItems[0]); dto.setCollectInterval(configItems[1]); dto.setUploadPeriod(configItems[2]); - if (configItems.length == 5) { + if (configItems.length >= 5) { dto.setIp(configItems[3]); dto.setPort(configItems[4]); } + if (configItems.length >= 6) { + dto.setThreshold(Float.parseFloat(configItems[5])); + } } busConfigDTOList.add(dto); } @@ -115,8 +118,7 @@ + busConfigDTO.getIp() + "," + busConfigDTO.getPort() + "," + busConfigDTO.getThreshold();//按照重传次数、采集间隔、上传周期 busConfig.setFramecontent(str); save(busConfig); - redisCommon.sendMsg(DeviceTypeEnum.H2s.toString(), - busConfig.getDeviceId(), busConfig.getFramecontent(), busConfigDTO.getAttemptsMax()); + redisCommon.sendMsg(DeviceTypeEnum.H2s.toString(), busConfig.getDeviceId(), busConfig.getFramecontent(), busConfigDTO.getAttemptsMax()); // //发布消息订阅 // if (StrUtil.isNotBlank(concentratorCode)) { // RedisPublisherUtil.getInstance().publishMessage(concentratorCode); diff --git a/casic-web/pom.xml b/casic-web/pom.xml index bb25e4d..c23b7f6 100644 --- a/casic-web/pom.xml +++ b/casic-web/pom.xml @@ -242,6 +242,9 @@ + src/main/resources + + src/main/java **/*.xml diff --git a/casic-device/src/main/java/com/casic/missiles/modular/system/service/impl/BusH2sConfigServiceImpl.java b/casic-device/src/main/java/com/casic/missiles/modular/system/service/impl/BusH2sConfigServiceImpl.java index f38cea9..c4e9e8b 100644 --- a/casic-device/src/main/java/com/casic/missiles/modular/system/service/impl/BusH2sConfigServiceImpl.java +++ b/casic-device/src/main/java/com/casic/missiles/modular/system/service/impl/BusH2sConfigServiceImpl.java @@ -80,10 +80,13 @@ dto.setRetryTimes(configItems[0]); dto.setCollectInterval(configItems[1]); dto.setUploadPeriod(configItems[2]); - if (configItems.length == 5) { + if (configItems.length >= 5) { dto.setIp(configItems[3]); dto.setPort(configItems[4]); } + if (configItems.length >= 6) { + dto.setThreshold(Float.parseFloat(configItems[5])); + } } busConfigDTOList.add(dto); } @@ -115,8 +118,7 @@ + busConfigDTO.getIp() + "," + busConfigDTO.getPort() + "," + busConfigDTO.getThreshold();//按照重传次数、采集间隔、上传周期 busConfig.setFramecontent(str); save(busConfig); - redisCommon.sendMsg(DeviceTypeEnum.H2s.toString(), - busConfig.getDeviceId(), busConfig.getFramecontent(), busConfigDTO.getAttemptsMax()); + redisCommon.sendMsg(DeviceTypeEnum.H2s.toString(), busConfig.getDeviceId(), busConfig.getFramecontent(), busConfigDTO.getAttemptsMax()); // //发布消息订阅 // if (StrUtil.isNotBlank(concentratorCode)) { // RedisPublisherUtil.getInstance().publishMessage(concentratorCode); diff --git a/casic-web/pom.xml b/casic-web/pom.xml index bb25e4d..c23b7f6 100644 --- a/casic-web/pom.xml +++ b/casic-web/pom.xml @@ -242,6 +242,9 @@ + src/main/resources + + src/main/java **/*.xml diff --git a/casic-web/src/main/resources/config/application-dm.yml b/casic-web/src/main/resources/config/application-dm.yml index e0c79d7..7360352 100644 --- a/casic-web/src/main/resources/config/application-dm.yml +++ b/casic-web/src/main/resources/config/application-dm.yml @@ -3,30 +3,30 @@ ################### spring配置 ################### spring: datasource: - url: jdbc:dm://10.80.1.157:5236/schema=XLJC?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull + url: jdbc:dm://111.198.10.15:11211/SMARTWELL driver-class-name: dm.jdbc.driver.DmDriver - username: XLJC - password: Xljc@2023 + username: SMARTWELL + password: Casic203! dynamic: primary: master #设置默认的数据源或者数据源组,默认值即为master strict: false #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源 datasource: master: - url: jdbc:dm://10.80.1.157:5236/schema=XLJC?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull + url: jdbc:dm://111.198.10.15:11211/SMARTWELL driver-class-name: dm.jdbc.driver.DmDriver - username: XLJC - password: Xljc@2023 + username: SMARTWELL + password: Casic203! log: - url: jdbc:dm://10.80.1.158:5236/CASIC203?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&zeroDateTimeBehavior=convertToNull + url: jdbc:dm://111.198.10.15:11211/SMARTWELL driver-class-name: dm.jdbc.driver.DmDriver - username: XLJC - password: Xljc@2023 + username: SMARTWELL + password: Casic203! session: store-type: redis redis: - host: 10.80.1.124 - port: 31681 - password: + host: 111.198.10.15 + port: 11412 + password: ew5T4K3#203lwh redisValueSerializer: org.springframework.data.redis.serializer.JdkSerializationRedisSerializer jms: pub-sub-domain: true @@ -40,6 +40,9 @@ user: password: broker-url: tcp://192.168.0.203:61616 + web: + resources: + static-locations: file:C:\tmp\ #flowable数据源和多数据源配置 casic: kaptcha-open: false #是否开启登录时验证码 (true/false) @@ -48,7 +51,8 @@ db: init: enable: false - file-upload-path: D:\java\boot\guns-web-1.0.0-SNAPSHOT\upload + file: + uploadPath: C:\tmp\ #必须配置项,该项配置完成后 静态资源路径配置才生效 spring-session-open: false #开启spring session smartcity: config: @@ -60,8 +64,8 @@ device: redis: invalid-time: 86400 - host: 127.0.0.1 - port: 6379 + host: 111.198.10.15 + port: 11412 password: ew5T4K3#203lwh config-prefix: 'Casic:' getui: @@ -69,8 +73,9 @@ appKey: 5cV2rugxAb8o28WK6RSFU6 masterSecret: fQsKrOaFZy5tvKb3Vd3vv5 logging: - level.root: info - level.com.casic: debug + level: + root: info + com.casic: debug file: path: logs/ name: missiles.log \ No newline at end of file