| 
					
				 | 
			
			
				@ -1,60 +0,0 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				package com.yihu.jw.hospital.endpoint.dict; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.fasterxml.jackson.databind.ObjectMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.dict.service.HospitalParameterService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.hospital.dict.BaseHospitalParameterDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.hospital.prescription.BaseNationalDrugDictDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.Envelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.MixEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.ObjEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.Api; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.ApiOperation; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.ApiParam; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.web.bind.annotation.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				@RestController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				@RequestMapping(value = BaseHospitalRequestMapping.PatientNoLogin.PREFIX) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				@Api(value = "系统参数配置", description = "系统参数配置", tags = {"系统参数配置"}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				public class HospitalParameterEndpoint extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private HospitalParameterService hospitalParameterService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private ObjectMapper objectMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = BaseHospitalRequestMapping.PatientNoLogin.createOrUpdateParameter) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "保存编辑系统参数") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop createOrUpdateParameter(@ApiParam(name = "jsonData", value = "系统参数json串") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                       @RequestParam(name = "jsonData", required = true) String jsonData) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        BaseHospitalParameterDO hospitalParameterDO = objectMapper.readValue(jsonData, BaseHospitalParameterDO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(hospitalParameterService.createOrUpdateParameter(hospitalParameterDO)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = BaseHospitalRequestMapping.PatientNoLogin.getHospitalParameterList) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取系统参数列表") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public MixEnvelop getHospitalParameterList(@ApiParam(name = "name", value = "参数名称或编码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                          @RequestParam(name = "name", required = false) String name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                          @ApiParam(name = "number", value = "药品编码") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                          @RequestParam(name = "number", required = false) String number, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                          @ApiParam(name = "hospital", value = "所属机构") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                          @RequestParam(name = "hospital", required = false) String hospital, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                          @ApiParam(name = "del", value = "状态") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                          @RequestParam(name = "del", required = false) Integer del, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                          @ApiParam(name = "page", value = "当前页") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                          @RequestParam(name = "page", required = false) Integer page, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                          @ApiParam(name = "pageSize", value = "页面大小") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                          @RequestParam(name = "pageSize", required = false) Integer pageSize) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return hospitalParameterService.getHospitalParameterList(name, hospital, del, page, pageSize); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = BaseHospitalRequestMapping.PatientNoLogin.delHospitalParameter) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "删除系统参数") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop delHospitalParameter(@ApiParam(name = "id", value = "药品id") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            @RequestParam(name = "id", required = true) Integer id){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        hospitalParameterService.delHospitalParameter(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |