|  |  | 
 |  |  |  | 
 |  |  |     List<Map<String, Object>> getOfflineDevice(); | 
 |  |  |  | 
 |  |  |     List<Map<String, Object>> getOfflineDeviceOfDiseaseCenter(String orgId); | 
 |  |  |  | 
 |  |  | } | 
 
 |  |  | 
 |  |  |         } | 
 |  |  |         return new ReturnT(500, "无掉线设备,不发送邮件"); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @XxlJob("OffLineDiseaseDevices") | 
 |  |  |     public ReturnT OffLineDiseaseDevicesAlarm(String params) { | 
 |  |  |         String orgId = "174"; | 
 |  |  |         List<Map<String, Object>> devices = deviceMapper.getOfflineDeviceOfDiseaseCenter(orgId); | 
 |  |  |         List<String> list = new ArrayList<>(); | 
 |  |  |         for (Map<String, Object> device : devices) { | 
 |  |  |             String name = device.get("name").toString(); | 
 |  |  |             String mac = device.get("mac").toString(); | 
 |  |  |             String s = name + "(" + mac + ")"; | 
 |  |  |             list.add(s); | 
 |  |  |         } | 
 |  |  |         if (list.size() != 0) { | 
 |  |  |             try { | 
 |  |  |                 AlarmUtils_2.sendMail("lili@nieh.chinacdc.cn", "设备掉线警报!", list.toString() + ",共" + list.size() + "台设备掉线!"); | 
 |  |  |                 return new ReturnT(200, "执行成功!有邮件发送!" + list.size()); | 
 |  |  |             } catch (Exception e) { | 
 |  |  |                 XxlJobLogger.log("OffLineDevices:" + e.getMessage()); | 
 |  |  |                 logger.error(e.getMessage()); | 
 |  |  |                 e.printStackTrace(); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         return new ReturnT(500, "无掉线设备,不发送邮件"); | 
 |  |  |     } | 
 |  |  | } | 
 
 |  |  | 
 |  |  |         (SELECT id FROM monitor_point WHERE city_code!=130900 or (city_code=130900 and  organization_id  in (60, 65, 159, 165, 166) and id!=56 and id!=83 and id!=84)) | 
 |  |  |         and mac not in (SELECT mac FROM special_device_config); | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <select id="getOfflineDeviceOfDiseaseCenter" resultType="java.util.Map"> | 
 |  |  |        SELECT name,mac | 
 |  |  |        FROM `device` | 
 |  |  |        WHERE state=4 and is_delete=0 | 
 |  |  |        and monitor_point_id in( | 
 |  |  |         SELECT id FROM monitor_point WHERE organization_id=#{orgId} | 
 |  |  |     ); | 
 |  |  |     </select> | 
 |  |  | </mapper> |