Newspaper 2 vuotta sitten
vanhempi
commit
6e502e0f6f

+ 1 - 1
src/main/java/com/huimv/admin/timer/DeviceTimer.java

@@ -37,7 +37,7 @@ public class DeviceTimer {
         Integer total = deviceOff+deviceOn;
         LocalDateTime now = LocalDateTime.now();
         try {
-            rate = deviceOn/total;
+            rate = (deviceOn/total)*100;
         }catch (ArithmeticException e){
             System.out.println(e);
         }

+ 1 - 1
src/main/resources/mapper/EnvWarningMapper.xml

@@ -14,7 +14,7 @@
     </select>
 
     <select id="listWarning" resultType="com.huimv.admin.entity.vo.WarningVo">
-        SELECT CONCAT(b.build_name,a.build_name) AS  'location',w.warning_content,w.update_time AS DATE
+        SELECT CONCAT(b.build_name,a.build_name) AS  'location',w.warning_content as warningContent,w.update_time AS DATE
         FROM `base_pigpen` a INNER JOIN `base_pigpen` b ON a.parent_id =b.id AND b.parent_id != 0
         LEFT JOIN `env_warning` w ON w.unit_id = a.id
         WHERE w.farm_id = #{farmId}