| 
					
				 | 
			
			
				@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.iot.dao.equipment.IotEquipmentDetailDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.iot.util.excel.EntityUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.iot.util.excel.HibenateUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.hospital.message.BaseBannerDoctorDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.iot.equipment.IotEquipmentDetailDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.util.date.DateUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.mysql.query.BaseJpaService; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -92,6 +93,13 @@ public class IotEqtDetailService  extends BaseJpaService<IotEquipmentDetailDO, I 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            params.put("area", area); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Map<String,Object>> total = hibenateUtils.createSQLQuery(sql,params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for (Map<String,Object> map:total){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(null!=map.get("create_time")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String createTime= map.get("create_time").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                map.put("create_time",DateUtil.dateToStrLong(DateUtil.strToDateLong(createTime))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        result.put("equipmentDetails",total); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Map<String, Object>> areCount = hibenateUtils.createSQLQuery(areCountSql.toString(),params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (areCount.size()>=0){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -129,5 +137,25 @@ public class IotEqtDetailService  extends BaseJpaService<IotEquipmentDetailDO, I 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return count; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public List<Map<String,Object>> getHosptital(String name,String code,String town,String city){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        StringBuffer sql = new StringBuffer(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Map<String,Object> params = new HashedMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        sql.append("select * from wlyy.dm_hospital t where 1=1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if (StringUtils.isNotEmpty(name)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           sql.append(" and t.name like '%"+name+"%'"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }if (StringUtils.isNotEmpty(code)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql.append(" and t.code =:code"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            params.put("code",code); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }if (StringUtils.isNotEmpty(town)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql.append(" and t.town =:town"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            params.put("town",town); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNotEmpty(city)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql.append(" and t.city =:city"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            params.put("city",city); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql.toString(),params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return list; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |