| 
					
				 | 
			
			
				@ -124,10 +124,12 @@ public class IotDeviceSimService  extends BaseJpaService<IotDeviceSimDO, IotDevi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public MixEnvelop<IotDeviceSimDO, IotDeviceSimDO> conditionQueryPage(Integer page, Integer size, String status, String sim, String sn){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        StringBuffer sql = new StringBuffer("SELECT c.* from iot_device_sim c WHERE del=0 "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        StringBuffer sql = new StringBuffer("SELECT c.*,d.patient_name,d.mobile,w.device_sn sn,w.name   FROM iot_device_sim c LEFT JOIN iot_patient_device d ON c.del=0 AND d.del=1 AND c.sim=d.sim" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " LEFT JOIN iot_device w ON c.del = 0 AND w.del = 1 AND c.sim=w.sim_no "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        StringBuffer sqlCount = new StringBuffer("SELECT  COUNT(c.id) count  FROM iot_device_sim c LEFT JOIN iot_patient_device d ON c.del=0 AND d.del=1 AND c.sim=d.sim " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "LEFT JOIN iot_device w ON c.del = 0 AND w.del = 1 AND c.sim=w.sim_no "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        StringBuffer sql = new StringBuffer("SELECT c.* FROM " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " (SELECT c.*,d.patient_name,d.mobile,w.device_sn sn,w.name   FROM iot_device_sim c LEFT JOIN iot_patient_device d ON c.del=0 AND d.del=1 AND c.sim=d.sim LEFT JOIN iot_device w ON c.del = 0 AND w.del = 1 AND c.sim=w.sim_no) c" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " WHERE  c.del=0 "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        StringBuffer sqlCount = new StringBuffer("SELECT  COUNT(c.id) count FROM " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " (SELECT c.*,d.patient_name,d.mobile,w.device_sn sn,w.name   FROM iot_device_sim c LEFT JOIN iot_patient_device d ON c.del=0 AND d.del=1 AND c.sim=d.sim LEFT JOIN iot_device w ON c.del = 0 AND w.del = 1 AND c.sim=w.sim_no) c" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " WHERE  c.del=0 "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Object> args = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(StringUtils.isNotBlank(status)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql.append(" and c.status=").append(status); 
			 |