瀏覽代碼

1.如果为设置考勤时段,则查全天。
2.大屏修改。

zhengqiang 5 年之前
父節點
當前提交
93a62173c2

+ 6 - 17
web/src/main/java/com/jpsoft/smart/modules/business/controller/HealthPublicityController.java

@@ -67,16 +67,11 @@ public class HealthPublicityController {
         Page<PersonDeviceLog> personDeviceLogList1 = personDeviceLogService.findAllPersonLogByCompanyListAndDeviceNoList(DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()),
                 list, deviceNoList,1, 40);
 
-        Page<PersonDeviceLog> personDeviceLogList2 = personDeviceLogService.findVisitorLogByDeviceNoList(DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()), deviceNoList, 1, 1);
-        long visitTotal = personDeviceLogList2.getTotal();
-
-//        List<PersonDeviceLog> allList = new ArrayList<>();
-
-//        allList.addAll(personDeviceLogList1);
-//        allList.addAll(personDeviceLogList2);
-
-//        List<PersonDeviceLog> logList = allList.stream()
-//                .sorted(Comparator.comparing(PersonDeviceLog::getRecordTime).reversed()).collect(Collectors.toList());
+        //已测访客数
+        Integer checkedVisitorNum = 0;
+        if (deviceNoList.size() > 0) {
+            checkedVisitorNum = personDeviceLogService.getDayCheckedVistorNumByDeviceNoList(DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()), deviceNoList);
+        }
 
         List<Map> itemList = new ArrayList<>();
 
@@ -86,7 +81,7 @@ public class HealthPublicityController {
             Map<String, Object> map = new HashMap<>();
 
             if (item.getPerson() == null) {
-                map.put("name", "访客" + (visitTotal - i));
+                map.put("name", "访客" + (checkedVisitorNum - i));
             } else {
                 map.put("name", item.getPerson().getName());
             }
@@ -103,12 +98,6 @@ public class HealthPublicityController {
         Integer personNum = Math.toIntExact(personInfoService.countByCompanyList(list));
         Integer checkedPersonNum = personDeviceFilterLogService.getDayCheckedPersonNumByCompanyList(DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()), list, null);
 
-        //已测访客数
-        Integer checkedVisitorNum = 0;
-        if (deviceNoList.size() > 0) {
-            checkedVisitorNum = personDeviceLogService.getDayCheckedVistorNumByDeviceNoList(DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()), deviceNoList);
-        }
-
         //已测员工人次
         Integer checkPersonTotal = personDeviceLogService.getDayCheckedPersonTotalByCompanyList(DateUtil.beginOfDay(new Date()), DateUtil.endOfDay(new Date()), list, null);