|  | @ -1,8 +1,10 @@
 | 
	
		
			
				|  |  | package com.yihu.jw.base.endpoint.equipment;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import com.alibaba.fastjson.JSON;
 | 
	
		
			
				|  |  | import com.alibaba.fastjson.JSONObject;
 | 
	
		
			
				|  |  | import com.yihu.jw.base.service.equipment.BaseHospitalEquipmentService;
 | 
	
		
			
				|  |  | import com.yihu.jw.base.util.ConstantUtils;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.equipment.BaseHospitalEquipmentDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.web.Envelop;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.web.ListEnvelop;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
 | 
	
	
		
			
				|  | @ -10,12 +12,22 @@ import com.yihu.jw.rm.base.BaseRequestMapping;
 | 
	
		
			
				|  |  | import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  | import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  | import io.swagger.annotations.ApiParam;
 | 
	
		
			
				|  |  | import io.swagger.models.auth.In;
 | 
	
		
			
				|  |  | import org.apache.http.HttpEntity;
 | 
	
		
			
				|  |  | import org.apache.http.HttpResponse;
 | 
	
		
			
				|  |  | import org.apache.http.HttpStatus;
 | 
	
		
			
				|  |  | import org.apache.http.client.methods.HttpPost;
 | 
	
		
			
				|  |  | import org.apache.http.entity.StringEntity;
 | 
	
		
			
				|  |  | import org.apache.http.impl.client.DefaultHttpClient;
 | 
	
		
			
				|  |  | import org.apache.http.util.EntityUtils;
 | 
	
		
			
				|  |  | import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | import org.springframework.web.bind.annotation.PostMapping;
 | 
	
		
			
				|  |  | import org.springframework.web.bind.annotation.RequestMapping;
 | 
	
		
			
				|  |  | import org.springframework.web.bind.annotation.RequestParam;
 | 
	
		
			
				|  |  | import org.springframework.web.bind.annotation.RestController;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import java.nio.charset.Charset;
 | 
	
		
			
				|  |  | import java.util.List;
 | 
	
		
			
				|  |  | import java.util.Map;
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -46,4 +58,23 @@ public class EquipmentEndpoint extends EnvelopRestEndpoint {
 | 
	
		
			
				|  |  |         return listEnvelop;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @PostMapping(value = BaseRequestMapping.Equipment.selectEquipment)
 | 
	
		
			
				|  |  |     @ApiOperation(value = "查询机器(分配投放地址)")
 | 
	
		
			
				|  |  |     public ListEnvelop selectEquipment(@ApiParam(name = "code", value = "设备编码", required = false)
 | 
	
		
			
				|  |  |                                    @RequestParam(value = "code", required = false) String code,
 | 
	
		
			
				|  |  |                                        @ApiParam(name = "typeName", value = "设备分类名称", required = false)
 | 
	
		
			
				|  |  |                                    @RequestParam(value = "typeName", required = false) String typeName,
 | 
	
		
			
				|  |  |                                        @ApiParam(name = "adress", value = "投放地址", required = false)
 | 
	
		
			
				|  |  |                                    @RequestParam(value = "adress", required = false) String address,
 | 
	
		
			
				|  |  |                                        @ApiParam(name = "hospitalName", value = "所属社区", required = false)
 | 
	
		
			
				|  |  |                                    @RequestParam(value = "hospitalName", required = false) String hospitalName){
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         List<Map<String,Object>> map = hospitalEquipmentService.selectEquipment(code,typeName,address,hospitalName);
 | 
	
		
			
				|  |  |         ListEnvelop listEnvelop = new ListEnvelop();
 | 
	
		
			
				|  |  |         listEnvelop.setMessage("success");
 | 
	
		
			
				|  |  |         listEnvelop.setDetailModelList(map);
 | 
	
		
			
				|  |  |         return listEnvelop;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | }
 |