Bläddra i källkod

所有单元环境温湿度

Newspaper 2 år sedan
förälder
incheckning
ab54278c38

+ 1 - 1
huimv-farm-environ/src/main/resources/com/huimv/environ/eco/mapper/EcoDeviceFlowMapper.xml

@@ -37,7 +37,7 @@
     <select id="getLastFlow" resultType="com.huimv.environ.eco.entity.dto.LastFlowDto">
        SELECT CONCAT(b.pigpen_name,a.pigpen_name) room,a.id unit_id,df.id1_value 'tem',df.id2_value 'hum'
         FROM `base_pigpen` a INNER JOIN `base_pigpen` b ON a.parent_id =b.id AND a.farm_code = #{farmId}
-        LEFT JOIN `eco_device` d ON d.unit_id = a.id AND d.device_type ='1'
+        INNER JOIN `eco_device` d ON d.unit_id = a.id AND d.device_type ='1'
         LEFT JOIN `eco_device_flow` df ON d.device_code = df.device_code
         AND df.id IN (SELECT MAX(df.id) FROM `eco_device_flow` df GROUP BY device_code)
         ORDER BY a.id DESC,a.parent_id DESC