|
@@ -1,6 +1,7 @@
|
|
|
package com.jpsoft.smart.modules.mobile.controller;
|
|
|
|
|
|
import com.github.pagehelper.Page;
|
|
|
+import com.jpsoft.smart.config.TemperatureConfig;
|
|
|
import com.jpsoft.smart.modules.base.entity.PersonDeviceFilterLog;
|
|
|
import com.jpsoft.smart.modules.base.entity.PersonInfo;
|
|
|
import com.jpsoft.smart.modules.base.service.PersonDeviceFilterLogService;
|
|
@@ -28,6 +29,8 @@ public class IndividualLogApiController {
|
|
|
private PersonInfoService personInfoService;
|
|
|
@Autowired
|
|
|
private PersonDeviceFilterLogService personDeviceFilterLogService;
|
|
|
+ @Autowired
|
|
|
+ private TemperatureConfig temperatureConfig;
|
|
|
|
|
|
@PostMapping("healthyPersonList")
|
|
|
@ApiOperation(value="健康公示列表")
|
|
@@ -62,7 +65,7 @@ public class IndividualLogApiController {
|
|
|
if(personDeviceFilterLog!=null){
|
|
|
personInfo.setLastTemperatureLog(personDeviceFilterLog.getTemperature());
|
|
|
double temperature = personDeviceFilterLog.getTemperature().doubleValue();
|
|
|
- if(temperature>=37){
|
|
|
+ if(temperature>temperatureConfig.getMax()){
|
|
|
personInfo.setIsNormal(false);
|
|
|
}
|
|
|
else{
|
|
@@ -115,7 +118,7 @@ public class IndividualLogApiController {
|
|
|
}
|
|
|
map.put("lastTemperature",lastTemperatureStr);
|
|
|
|
|
|
- if(lastTemperatureDou>=37){
|
|
|
+ if(lastTemperatureDou>temperatureConfig.getMax()){
|
|
|
map.put("isNormal",false);
|
|
|
}
|
|
|
else{
|
|
@@ -131,7 +134,7 @@ public class IndividualLogApiController {
|
|
|
DateTime today = DateTime.now().withTimeAtStartOfDay();
|
|
|
|
|
|
//最多查一年
|
|
|
- while (curTemperature < 37 && i<=365) {
|
|
|
+ while (i<=365) {
|
|
|
DateTime startTime = today.minusDays(i+1);
|
|
|
DateTime endTime = today.minusDays(i);
|
|
|
|
|
@@ -146,7 +149,7 @@ public class IndividualLogApiController {
|
|
|
if(item!=null){
|
|
|
curTemperature = item.getTemperature().doubleValue();
|
|
|
|
|
|
- if(curTemperature<37){
|
|
|
+ if(curTemperature<=temperatureConfig.getMax()){
|
|
|
totalDays++;
|
|
|
i++;
|
|
|
}
|
|
@@ -224,7 +227,7 @@ public class IndividualLogApiController {
|
|
|
map1.put("name", hour);
|
|
|
map1.put("value", personDeviceFilterLog.getTemperature());
|
|
|
double temperatureDou = Double.parseDouble(personDeviceFilterLog.getTemperature().toString());
|
|
|
- if (temperatureDou >= 37) {
|
|
|
+ if (temperatureDou > temperatureConfig.getMax()) {
|
|
|
isDanger = true;
|
|
|
}
|
|
|
|