Browse Source

202103

recovery
zy_Java 4 years ago
parent
commit
d2a436897e
  1. 2
      beneficiation/src/main/java/com/ccsens/beneficiation/api/DebugController.java
  2. 5
      beneficiation/src/main/java/com/ccsens/beneficiation/bean/vo/ParameterVo.java
  3. 22
      beneficiation/src/main/java/com/ccsens/beneficiation/service/ParameterService.java
  4. 4
      beneficiation/src/main/resources/application.yml
  5. 5
      tall/src/main/resources/application-greenvalley.yml
  6. 4
      tall/src/main/resources/application.yml

2
beneficiation/src/main/java/com/ccsens/beneficiation/api/DebugController.java

@ -23,7 +23,7 @@ public class DebugController {
@RequestMapping(value="",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"})
public JsonResponse debug(HttpServletRequest request) throws Exception {
return JsonResponse.newInstance().ok("测");
return JsonResponse.newInstance().ok("测aaaaaa11");
}

5
beneficiation/src/main/java/com/ccsens/beneficiation/bean/vo/ParameterVo.java

@ -154,6 +154,11 @@ public class ParameterVo {
this.maxValue = maxValue;
}
public ThresholdValue(String type, String key) {
this.type = type;
this.key = key;
}
public ThresholdValue() {
}
}

22
beneficiation/src/main/java/com/ccsens/beneficiation/service/ParameterService.java

@ -71,7 +71,7 @@ public class ParameterService implements IParameterService{
});
}
parameterInfo.setTransducers(transducers);
//查询变频器和电磁阀
//查询电耳
List<ParameterVo.Parameter> parameters = recordDao.queryParameter();
if(CollectionUtil.isNotEmpty(parameters)){
parameters.forEach(parameter -> {
@ -82,11 +82,25 @@ public class ParameterService implements IParameterService{
value.setKey("实时" + a);
value.setType("thresholdValue" + a);
//查询设备的阀值1
value.setThresholdValue1(recordDao.getThresholdValue(value.getId(),1));
ParameterVo.ThresholdValue thresholdValue1 = recordDao.getThresholdValue(value.getId(), 1);
if(ObjectUtil.isNull(thresholdValue1)){
thresholdValue1 = new ParameterVo.ThresholdValue("thresholdValue1","阀值1");
}
value.setThresholdValue1(thresholdValue1);
//阀值2
value.setThresholdValue2(recordDao.getThresholdValue(value.getId(),2));
ParameterVo.ThresholdValue thresholdValue2 = recordDao.getThresholdValue(value.getId(), 1);
if(ObjectUtil.isNull(thresholdValue2)){
thresholdValue2 = new ParameterVo.ThresholdValue("thresholdValue2","阀值2");
}
value.setThresholdValue2(thresholdValue2);
//阀值3
value.setThresholdValue3(recordDao.getThresholdValue(value.getId(),3));
ParameterVo.ThresholdValue thresholdValue3 = recordDao.getThresholdValue(value.getId(), 1);
if(ObjectUtil.isNull(thresholdValue3)){
thresholdValue3 = new ParameterVo.ThresholdValue("thresholdValue3","阀值3");
}
value.setThresholdValue3(thresholdValue3);
i++;
}
}

4
beneficiation/src/main/resources/application.yml

@ -1,6 +1,6 @@
spring:
profiles:
active: test
include: common, util-test
active: dev
include: common, util-dev

5
tall/src/main/resources/application-greenvalley.yml

@ -12,9 +12,9 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
host: 127.0.0.1
password: admin
password: 111111
port: 5672
username: 111111
username: admin
redis:
database: 0
host: 127.0.0.1
@ -34,6 +34,7 @@ eureka:
ip-address: 82.156.116.247
gatewayUrl: http://82.156.116.247 /gateway/
notGatewayUrl: http://82.156.116.247 /
smsCode: 1
file:
domain: http://82.156.116.247 /gateway/tall/v1.0/
imgDomain: http://82.156.116.247 /gateway/tall/v1.0/uploads

4
tall/src/main/resources/application.yml

@ -1,5 +1,5 @@
spring:
profiles:
active: dev
include: util-dev,common
active: greenvalley
include: util-greenvalley,common

Loading…
Cancel
Save