|
@@ -2,10 +2,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.AlarmConfig;
|
|
|
-import com.jpsoft.smart.modules.base.entity.CompanyInfo;
|
|
|
-import com.jpsoft.smart.modules.base.entity.PersonDeviceFilterLog;
|
|
|
-import com.jpsoft.smart.modules.base.entity.PersonInfo;
|
|
|
+import com.jpsoft.smart.modules.base.entity.*;
|
|
|
import com.jpsoft.smart.modules.base.service.*;
|
|
|
import com.jpsoft.smart.modules.business.service.WorkAttendanceService;
|
|
|
import com.jpsoft.smart.modules.common.dto.MessageResult;
|
|
@@ -31,6 +28,9 @@ public class IndividualLogApiController {
|
|
|
@Autowired
|
|
|
private PersonInfoService personInfoService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private PersonDeviceLogService personDeviceLogService;
|
|
|
+
|
|
|
@Autowired
|
|
|
private PersonDeviceFilterLogService personDeviceFilterLogService;
|
|
|
|
|
@@ -120,9 +120,10 @@ public class IndividualLogApiController {
|
|
|
map.put("temperatureMax", temperatureConfig.getMax());
|
|
|
map.put("faceImageUrl",person.getFaceImageUrl());
|
|
|
|
|
|
- PersonDeviceFilterLog personDeviceFilterLog = personDeviceFilterLogService.lastPersonLog(person.getId());
|
|
|
+ PersonDeviceLog lastPersonLog = personDeviceLogService.findLastPersonLog(person.getId(),temperatureConfig.getMax());
|
|
|
+
|
|
|
+ BigDecimal lastTemperature = lastPersonLog.getTemperature();
|
|
|
|
|
|
- BigDecimal lastTemperature = personDeviceFilterLog.getTemperature();
|
|
|
DecimalFormat df = new DecimalFormat("##.#");
|
|
|
|
|
|
if(lastTemperature != null){
|
|
@@ -144,6 +145,7 @@ public class IndividualLogApiController {
|
|
|
//todo 最近14天未测体温数
|
|
|
Integer detectedCount = personDeviceFilterLogService.countDayByPersonIdAndDate(person.getId(),today.minusDays(13).toDate(),today.plusDays(1).toDate());
|
|
|
map.put("undetectedCount",14 - detectedCount);
|
|
|
+
|
|
|
//todo 获取连续检测天数
|
|
|
//最近一年的节假日
|
|
|
Set<String> holidaySet = holidayInfoService.getHolidaySetByDate(today.minusDays(364).toDate(),today.plusDays(1).toDate());
|