| 
					
				 | 
			
			
				@ -179,11 +179,11 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        deviceDO.setSimNo(sim); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        iotDeviceDao.save(deviceDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //修改SIM卡管理列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        IotDeviceSimDO simDO = iotDeviceSimDao.findBySim(sim); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        simDO.setDeviceSn(deviceDO.getDeviceSn()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        simDO.setDeviceName(deviceDO.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        simDO.setDel("0"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        iotDeviceSimDao.save(simDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        IotDeviceSimDO simDO = iotDeviceSimDao.findBySim(sim); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        simDO.setDeviceSn(deviceDO.getDeviceSn()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        simDO.setDeviceName(deviceDO.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        simDO.setDel("0"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        iotDeviceSimDao.save(simDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return Envelop.getSuccess("修改成功"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -332,6 +332,23 @@ public class IotDeviceService extends BaseJpaService<IotDeviceDO,IotDeviceDao> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return MixEnvelop.getSuccessListWithPage(IotRequestMapping.Common.message_success_find_functions,iotDeviceVOList, page, size,count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public MixEnvelop<IotDeviceVO, IotDeviceVO> findDevice(Integer page, Integer size) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql ="SELECT DISTINCT c.* from iot_device c left join iot_patient_device t on t.del = 1 AND c.device_sn = t.device_sn  WHERE c.del=1 GROUP BY c.`name`"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<IotDeviceDO> list = jdbcTempalte.query(sql,new BeanPropertyRowMapper(IotDeviceDO.class)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //DO转VO 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<IotDeviceVO> iotDeviceVOList = convertToModels(list,new ArrayList<>(list.size()),IotDeviceVO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        translateDictForList(iotDeviceVOList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        long count = list.size(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return MixEnvelop.getSuccessListWithPage(IotRequestMapping.Common.message_success_find_functions,iotDeviceVOList, page, size,count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 根据设备序列号判断设备是否存在 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param deviceSn 
			 |