Переглянути джерело

1.修改测温记录查询,可以查看单位拥有设备中的测温记录。

zhengqiang 5 роки тому
батько
коміт
0a3c00a3f8

+ 7 - 0
common/src/main/resources/mapper/base/PersonDeviceLog.xml

@@ -158,6 +158,13 @@
                     and t2.code_ like #{searchParams.companyCode}
                     and t1.del_flag=0 and t1.id_ = a.person_id
                 )
+                or
+                exists (
+                    select t1.id_ from base_device_info t1,base_company_info t2
+                    where t1.company_id =t2.id_
+                    and t2.code_ like #{searchParams.companyCode}
+                    and t1.device_no = a.device_no
+                )
             </if>
             <if test="searchParams.personId != null">
                 and a.person_id = #{searchParams.personId}

+ 5 - 0
web/src/main/java/com/jpsoft/smart/modules/business/controller/HealthPublicityController.java

@@ -3,6 +3,7 @@ package com.jpsoft.smart.modules.business.controller;
 import cn.hutool.core.date.DateTime;
 import cn.hutool.core.date.DateUtil;
 import com.github.pagehelper.Page;
+import com.jpsoft.smart.config.TemperatureConfig;
 import com.jpsoft.smart.modules.base.entity.CompanyInfo;
 import com.jpsoft.smart.modules.base.entity.DeviceInfo;
 import com.jpsoft.smart.modules.base.entity.PersonDeviceLog;
@@ -44,6 +45,9 @@ public class HealthPublicityController {
     @Autowired
     private PersonCompanyService personCompanyService;
 
+    @Autowired
+    private TemperatureConfig temperatureConfig;
+
     @GetMapping("/healthPublicity")
     public String index(String companyId, Model model) {
         CompanyInfo companyInfo = companyInfoService.get(companyId);
@@ -126,6 +130,7 @@ public class HealthPublicityController {
         model.addAttribute("dayAbnormalNum", dayAbnormalNum);
         model.addAttribute("totalAbnormalNum", totalAbnormalNum);
         model.addAttribute("normalDays", normalDays);
+        model.addAttribute("temperatureConfig", temperatureConfig);
 
         return "motemwall_pc";
     }

+ 1 - 1
web/src/main/resources/templates/motemwall_pc.html

@@ -188,7 +188,7 @@
 							</div>
 							<div class="mui-media-body">
 								<span th:text="${item.name}"></span>
-								<span class="mui-pull-right color05c8af" th:text="${item.temperature}"></span>
+								<span class="mui-pull-right" th:class="${item.temperature>37.2 ? 'colorfe616c': 'color05c8af'}" th:text="${item.temperature}"></span>
 							</div>
 							<p th:text="${#dates.format(item.recordTime, 'MM-dd HH:mm')}"></p>
 						</div>