Jelajahi Sumber

离线设备数量

xiaoyunquan 2 tahun lalu
induk
melakukan
383fd0e3dd

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/statistics/StatisticsService.java

@ -3872,7 +3872,7 @@ public class StatisticsService {
        //离线设备数量
        String offLineDeviceSql="select count(distinct pd.device_sn) total from wlyy_patient_device pd INNER JOIN wlyy_devices dev on pd.device_sn = dev.device_code " +
                "                 INNER JOIN base_patient p on pd.user = p.id and pd.del=0 and p.del=1 " + teamCodeSql +
                "                where dev.contact_status=0  and pd.device_type = "+type+"  AND pd.user NOT IN ("+testUsqlSql+") group by pd.device_type";
                "                where ( dev.contact_status=0 or dev.contact_status IS NULL )  and pd.device_type = "+type+"  AND pd.user NOT IN ("+testUsqlSql+") group by pd.device_type";
        //设备总数
        String deviceTotalSql = "SELECT count(DISTINCT device_code) FROM wlyy_devices WHERE (device_code IS NOT NULL OR device_code <> '') AND device_type = "+type+"";