| 
					
				 | 
			
			
				@ -2184,7 +2184,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public JSONObject getOutOfStockDeviceListByUserId(String userId, String content) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public JSONObject getOutOfStockDeviceListByUserId(String userId, String content,String community,String town) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONObject result = new JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isEmpty(userId)) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -2265,6 +2265,12 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "t.`status` = 0 and ',"+ deviceIds +",' LIKE CONCAT('%,',t.id,',%')\n"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (!StringUtils.isEmpty(content)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sencodSql += " AND ( t.equ_name like '%"+content+"%' or t.equ_num like '%"+content+"%')\n"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (!StringUtils.isEmpty(community)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sencodSql += "AND t.belong_community = '" + community +"'\n"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (!StringUtils.isEmpty(town)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sencodSql += "AND t.belong_community IN(SELECT  d.code FROM  dm_hospital d where d.town = '"+town+"' )\n "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             deviceList = hibenateUtils.createSQLQuery(sencodSql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } else { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -2359,6 +2365,12 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (!StringUtils.isEmpty(content)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sencodSql += " AND (t.`equ_name` like '%" + content + "%' or t.`equ_num` like '%" + content + "%')\n"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (!StringUtils.isEmpty(community)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sencodSql += "AND t.belong_community = '" + community +"'\n"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (!StringUtils.isEmpty(town)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                sencodSql += "AND t.belong_community IN(SELECT  d.code FROM  dm_hospital d where d.town = '"+town+"' )\n "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            deviceList = hibenateUtils.createSQLQuery(sencodSql); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -2480,7 +2492,7 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public JSONObject getDeviceListByUserId(String content,String networkStatus, String community, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public JSONObject getDeviceListByUserId(String content,String networkStatus, String community,String town, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            String saleStatus,String equType,String userId, int page, int size) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONObject result = new JSONObject(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -2626,6 +2638,9 @@ public class MedicinedeviceService  extends BaseJpaService<Mediicinedevice, Medi 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (!StringUtils.isEmpty(community)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            conditionSql += "AND t.belong_community = '" + community +"'\n"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (!StringUtils.isEmpty(town)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            conditionSql += "AND t.belong_community IN(SELECT  d.code FROM  dm_hospital d where d.town = '"+town+"' )\n "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (!StringUtils.isEmpty(saleStatus)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            conditionSql += "AND t.sale_status = '" + saleStatus +"'\n"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 |