lange 5 anos atrás
pai
commit
916b529eea

+ 4 - 4
whepi-web/src/main/java/com/bofeng/dao/MsReportMapper.java

@@ -32,11 +32,11 @@ public interface MsReportMapper extends BaseMapper<MsReport> {
     Integer selectSingleRoomNum(@Param("reportId") Long reportId, @Param("singleRoom") Integer singleRoom);
 
     //正常
-    @Select("select count(*) from ms_suspected where report_id=#{reportId} and  #{temperature}<![CDATA[ >=]]> 36 and #{temperature}<![CDATA[ <= ]]>37.3")
-    Integer selectisSuspectedNum(@Param("reportId") Long reportId, @Param("temperature") BigDecimal temperature);
+    @Select("select count(*) from ms_suspected where report_id=#{reportId} and  temperature>= 36 and temperature<=37.3")
+    Integer selectisSuspectedNum(@Param("reportId") Long reportId);
 
     //疑似
-    @Select("select count(*) from ms_suspected where report_id=#{reportId} and (#{temperature} &lt; 36 or 37.3 &lt; #{temperature})")
-    Integer selectisNoSuspectedNum(@Param("reportId") Long reportId, @Param("temperature") BigDecimal temperature);
+    @Select("select count(*) from ms_suspected where report_id=#{reportId} and (temperature<36 or 37.3>temperature)")
+    Integer selectisNoSuspectedNum(@Param("reportId") Long reportId);
 
 }

+ 2 - 2
whepi-web/src/main/java/com/bofeng/service/MsSuspectedService.java

@@ -157,8 +157,8 @@ public class MsSuspectedService {
         //疑似
         if (temperature.compareTo(new BigDecimal(0)) == 1) {
             //正常
-            isSuspected = msReportMapper.selectisSuspectedNum(reportId, temperature);
-            isNoSuspected = msReportMapper.selectisNoSuspectedNum(reportId, temperature);
+            isSuspected = msReportMapper.selectisSuspectedNum(reportId);
+            isNoSuspected = msReportMapper.selectisNoSuspectedNum(reportId);
         }
         //今日居家
         List<MsSuspected> list = msSuspectedMapper.selectByReportId(reportId);