|  | @ -1,177 +0,0 @@
 | 
	
		
			
				|  |  | package com.yihu.ehr.standard.controller;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import com.yihu.ehr.framework.model.DetailModelResult;
 | 
	
		
			
				|  |  | import com.yihu.ehr.framework.model.DictItem;
 | 
	
		
			
				|  |  | import com.yihu.ehr.framework.model.DictionaryResult;
 | 
	
		
			
				|  |  | import com.yihu.ehr.framework.model.Result;
 | 
	
		
			
				|  |  | import com.yihu.ehr.framework.util.controller.BaseController;
 | 
	
		
			
				|  |  | import com.yihu.ehr.standard.model.adapter.AdapterSchemeModel;
 | 
	
		
			
				|  |  | import com.yihu.ehr.standard.model.standard.StandardModel;
 | 
	
		
			
				|  |  | import com.yihu.ehr.standard.model.standard.StandardVersionModel;
 | 
	
		
			
				|  |  | import com.yihu.ehr.standard.service.adapter.AdapterSchemeService;
 | 
	
		
			
				|  |  | import com.yihu.ehr.standard.service.standard.StandardService;
 | 
	
		
			
				|  |  | import com.yihu.ehr.standard.service.standard.StandardVersionService;
 | 
	
		
			
				|  |  | import com.yihu.ehr.standard.service.standard.StdPublisherService;
 | 
	
		
			
				|  |  | import com.yihu.ehr.system.model.SystemOrganization;
 | 
	
		
			
				|  |  | import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  | import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  | import io.swagger.annotations.ApiParam;
 | 
	
		
			
				|  |  | import org.springframework.web.bind.annotation.RequestMapping;
 | 
	
		
			
				|  |  | import org.springframework.web.bind.annotation.RequestParam;
 | 
	
		
			
				|  |  | import org.springframework.web.bind.annotation.RestController;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import javax.annotation.Resource;
 | 
	
		
			
				|  |  | import java.util.ArrayList;
 | 
	
		
			
				|  |  | import java.util.List;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | @RestController("AdapterController")
 | 
	
		
			
				|  |  | @RequestMapping("/adapter")
 | 
	
		
			
				|  |  | @Api(protocols = "https", value = "AdapterController", description = "适配管理", tags = {"适配"})
 | 
	
		
			
				|  |  | public class AdapterController extends BaseController {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @Resource(name = AdapterSchemeService.BEAN_ID)
 | 
	
		
			
				|  |  |     private AdapterSchemeService adapterSchemeService;
 | 
	
		
			
				|  |  |     @Resource(name = StandardService.BEAN_ID)
 | 
	
		
			
				|  |  |     private StandardService standardService;
 | 
	
		
			
				|  |  |     @Resource(name = StandardVersionService.BEAN_ID)
 | 
	
		
			
				|  |  |     private StandardVersionService standardVersionService;
 | 
	
		
			
				|  |  |     @Resource(name = StdPublisherService.BEAN_ID)
 | 
	
		
			
				|  |  |     private StdPublisherService stdPublisherService;
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 查询适配方案首页信息(get)
 | 
	
		
			
				|  |  |      * @param condition
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     @RequestMapping(value = "/searchSchemesList")
 | 
	
		
			
				|  |  |     @ApiOperation(value = "获取适配方案列表", response = DetailModelResult.class, responseContainer = "List", produces = "application/json", notes = "获取适配方案列表")
 | 
	
		
			
				|  |  |     public DetailModelResult getList(
 | 
	
		
			
				|  |  |             @ApiParam(name = "condition", value = "Search param,Must be json")
 | 
	
		
			
				|  |  |             @RequestParam(value = "condition", required = false) String condition,
 | 
	
		
			
				|  |  |             @ApiParam(name = "order", value = "Order param,Must be json.ascending:asc,descending:desc")
 | 
	
		
			
				|  |  |             @RequestParam(value = "order", required = false) String order,
 | 
	
		
			
				|  |  |             @ApiParam(name = "rows", value = "Limit the size of result set. Must be an integer")
 | 
	
		
			
				|  |  |             @RequestParam(value = "rows", required = false) Integer rows,
 | 
	
		
			
				|  |  |             @ApiParam(name = "page", value = "Start position of result set. Must be an integer")
 | 
	
		
			
				|  |  |             @RequestParam(value = "page", required = false) Integer page) {
 | 
	
		
			
				|  |  |        return adapterSchemeService.getEntityList(condition, order, rows, page);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 根据适配ID获取适配方案信息(get)
 | 
	
		
			
				|  |  |      * @param schemeId
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     @RequestMapping(value = "/getForSchemeId")
 | 
	
		
			
				|  |  |     @ApiOperation(value = "获取适配方案", response = Result.class, produces = "application/json", notes = "获取适配方案")
 | 
	
		
			
				|  |  |     public Result get(
 | 
	
		
			
				|  |  |             @ApiParam(name = "schemeId", value = "标准版本ID")
 | 
	
		
			
				|  |  |             @RequestParam(value = "schemeId") Integer schemeId) {
 | 
	
		
			
				|  |  |         return adapterSchemeService.get(schemeId);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 修改适配(PUT)
 | 
	
		
			
				|  |  |      * @param scheme
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     @RequestMapping("/updateScheme")
 | 
	
		
			
				|  |  |     @ApiOperation(value = "修改适配方案", response = Result.class, produces = "application/json", notes = "修改适配方案")
 | 
	
		
			
				|  |  |     public Result modify(
 | 
	
		
			
				|  |  |             @ApiParam(name = "scheme", value = "适配方案")
 | 
	
		
			
				|  |  |             @RequestParam(value = "scheme") String scheme) {
 | 
	
		
			
				|  |  |         return adapterSchemeService.update(scheme);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 新增适配(POST)
 | 
	
		
			
				|  |  |      * @param scheme
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     @RequestMapping(value = "/addScheme")
 | 
	
		
			
				|  |  |     @ApiOperation(value = "保存适配方案", response = Result.class, produces = "application/json", notes = "保存适配方案")
 | 
	
		
			
				|  |  |     public Result add(
 | 
	
		
			
				|  |  |             @ApiParam(name = "scheme", value = "适配方案信息")
 | 
	
		
			
				|  |  |             @RequestParam(value = "scheme") String scheme) {
 | 
	
		
			
				|  |  |         return adapterSchemeService.add(scheme);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 删除适配(DELETE)
 | 
	
		
			
				|  |  |      * @param  schemeId
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     @RequestMapping(value = "/deleteScheme")
 | 
	
		
			
				|  |  |     @ApiOperation(value = "删除适配方案", response = Result.class, produces = "application/json", notes = "删除适配方案")
 | 
	
		
			
				|  |  |     public Result delete(
 | 
	
		
			
				|  |  |             @ApiParam(name = "schemeId", value = "适配方案ID")
 | 
	
		
			
				|  |  |             @RequestParam(value = "schemeId") Integer schemeId) {
 | 
	
		
			
				|  |  |         return adapterSchemeService.delete(schemeId);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 获取平台标准名称/应用标准名称列表
 | 
	
		
			
				|  |  |      * @param condition
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     @RequestMapping(value = "/getStandards")
 | 
	
		
			
				|  |  |     @ApiOperation(value = "获取标准列表", response = DictionaryResult.class, produces = "application/json", notes = "获取标准列表")
 | 
	
		
			
				|  |  |     public DictionaryResult getStandardList(
 | 
	
		
			
				|  |  |             @ApiParam(name = "condition", value = "Must be Json,其中type为区分集成与应用标准")
 | 
	
		
			
				|  |  |             @RequestParam(value = "condition", required = false) String condition,
 | 
	
		
			
				|  |  |             @ApiParam(name = "order", value = "Must be Json")
 | 
	
		
			
				|  |  |             @RequestParam(value = "order", required = false) String order,
 | 
	
		
			
				|  |  |             @ApiParam(name = "rows", value = "Limit the size of result set. Must be an integer")
 | 
	
		
			
				|  |  |             @RequestParam(value = "rows", required = false) Integer rows,
 | 
	
		
			
				|  |  |             @ApiParam(name = "page", value = "Start position of result set. Must be an integer")
 | 
	
		
			
				|  |  |             @RequestParam(value = "page", required = false) Integer page) {
 | 
	
		
			
				|  |  |         DictionaryResult dictionaryResult = standardService.getDictionaryResult(condition, order, rows, page);
 | 
	
		
			
				|  |  |         return dictionaryResult;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 获取平台标准版本/应用标准版本列表
 | 
	
		
			
				|  |  |      * @param standardId
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     @RequestMapping(value = "/getVersions")
 | 
	
		
			
				|  |  |     @ApiOperation(value = "获取标准版本列表", response = DictionaryResult.class, produces = "application/json", notes = "获取标准版本列表")
 | 
	
		
			
				|  |  |     public DictionaryResult getVersionList(
 | 
	
		
			
				|  |  |             @ApiParam(name = "standardId", value = "标准ID")
 | 
	
		
			
				|  |  |             @RequestParam(value = "standardId") Integer standardId,
 | 
	
		
			
				|  |  |             @ApiParam(name = "condition", value = "Must be Json")
 | 
	
		
			
				|  |  |             @RequestParam(value = "condition", required = false) String condition,
 | 
	
		
			
				|  |  |             @ApiParam(name = "order", value = "Must be Json")
 | 
	
		
			
				|  |  |             @RequestParam(value = "order", required = false) String order,
 | 
	
		
			
				|  |  |             @ApiParam(name = "rows", value = "Limit the size of result set. Must be an integer")
 | 
	
		
			
				|  |  |             @RequestParam(value = "rows", required = false) Integer rows,
 | 
	
		
			
				|  |  |             @ApiParam(name = "page", value = "Start position of result set. Must be an integer")
 | 
	
		
			
				|  |  |             @RequestParam(value = "page", required = false) Integer page) {
 | 
	
		
			
				|  |  |         return standardService.getDictionaryResult(condition, order, rows, page);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 获取发布机构名称列表
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     @RequestMapping(value = "/getPublishers")
 | 
	
		
			
				|  |  |     @ApiOperation(value = "获取发布机构列表", response = DictionaryResult.class, produces = "application/json", notes = "获取发布机构列表")
 | 
	
		
			
				|  |  |     public DictionaryResult getPublishers(
 | 
	
		
			
				|  |  |             @ApiParam(name = "condition", value = "Must be Json")
 | 
	
		
			
				|  |  |             @RequestParam(value = "condition", required = false) String condition,
 | 
	
		
			
				|  |  |             @ApiParam(name = "order", value = "Must be Json")
 | 
	
		
			
				|  |  |             @RequestParam(value = "order", required = false) String order,
 | 
	
		
			
				|  |  |             @ApiParam(name = "rows", value = "Limit the size of result set. Must be an integer")
 | 
	
		
			
				|  |  |             @RequestParam(value = "rows", required = false) Integer rows,
 | 
	
		
			
				|  |  |             @ApiParam(name = "page", value = "Start position of result set. Must be an integer")
 | 
	
		
			
				|  |  |             @RequestParam(value = "page", required = false) Integer page) {
 | 
	
		
			
				|  |  |         return stdPublisherService.getDictionaryResult(condition, order, rows, page);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | }
 |