فهرست منبع

标准模块规范整合

lingfeng 9 سال پیش
والد
کامیت
5e8d92440f

+ 0 - 175
Hos-resource/src/main/java/com/yihu/ehr/standard/controller/AdapterController.java

@ -1,175 +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 = 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);
    }
}

+ 0 - 117
Hos-resource/src/main/java/com/yihu/ehr/standard/controller/AdapterVersionController.java

@ -1,117 +0,0 @@
package com.yihu.ehr.standard.controller;
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.service.adapter.AdapterSchemeVersionService;
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;
/**
 * Created by LLH on 2016/1/6.
 */
@RestController("AdapterVersionController")
@RequestMapping("/adapterversion")
@Api(protocols = "https", value = "AdapterVersionController", description = "适配版本管理", tags = {"适配"})
public class AdapterVersionController extends BaseController {
    @Resource(name = AdapterSchemeVersionService.BEAN_ID)
    private AdapterSchemeVersionService adapterSchemeVersion;
    /**
     * 根据版本id获取适配方案信息(get)
     * @param versionId
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/getForVersionId")
    @ApiOperation(value = "获取适配版本", response = Result.class, produces = "application/json", notes = "获取适配版本")
    public Result getForVersionId(
            @ApiParam(name = "versionId", value = "适配版本ID")
            @RequestParam(value = "versionId") Integer versionId) {
        return adapterSchemeVersion.get(versionId);
    }
    /**
     * 新增版本(post)
     * @param version
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/addVersion")
    @ApiOperation(value = "保存适配版本", response = Result.class, produces = "application/json", notes = "保存适配版本")
    public Result add(
            @ApiParam(name = "version", value = "适配版本信息")
            @RequestParam(value = "version") String version) {
        return adapterSchemeVersion.add(version);
    }
    /**
     * 修改版本(put)
     * @param version
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/updateVersion")
    @ApiOperation(value = "修改适配版本", response = Result.class, produces = "application/json", notes = "修改适配版本")
    public Result updateVersion(
            @ApiParam(name = "version", value = "标准版本")
            @RequestParam(value = "version") String version) {
        return adapterSchemeVersion.update(version);
    }
    /**
     * 发布版本(put)
     * @param version
     * @return
     * @throws Exception
     */
    @RequestMapping("/publishVersion")
    @ApiOperation(value = "发布适配版本", response = Result.class, produces = "application/json", notes = "修改适配版本")
    public Result publishVersion(
            @ApiParam(name = "version", value = "标准版本")
            @RequestParam(value = "version") String version) {
        return adapterSchemeVersion.publish(version);
    }
    /**
     * 删除版本(put)
     * @param versionId
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/deleteVersion")
    @ApiOperation(value = "删除版本", response = Result.class, produces = "application/json", notes = "删除版本")
    public Result delete(
            @ApiParam(name = "versionId", value = "标准版本ID")
            @RequestParam(value = "versionId") Integer versionId) {
        return adapterSchemeVersion.delete(versionId);
    }
    /**
     * 获取基础版本列表
     * @param schemeId
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/getVersions")
    @ApiOperation(value = "获取适配方案版本列表", response = DictionaryResult.class, produces = "application/json", notes = "获取标准版本列表")
    public DictionaryResult getList(
            @ApiParam(name = "schemeId", value = "适配方案ID")
            @RequestParam(value = "schemeId") Integer schemeId,
            @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 adapterSchemeVersion.getDictionaryResult(schemeId, condition, order, rows, page);
    }
}

+ 20 - 0
Hos-resource/src/main/java/com/yihu/ehr/standard/controller/PublisherController.java

@ -1,5 +1,6 @@
package com.yihu.ehr.standard.controller;
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.service.standard.StdPublisherService;
@ -42,4 +43,23 @@ public class PublisherController extends BaseController {
    public Result getStandardPublisher(){
        return stdPublisherService.getStandardPublisher();
    }
    /**
     * 获取发布机构名称列表
     * @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);
    }
}

+ 5 - 5
Hos-resource/src/main/java/com/yihu/ehr/standard/controller/SchemeController.java

@ -41,7 +41,7 @@ public class SchemeController extends BaseController {
     */
    @RequestMapping(value = "/getForSchemeId")
    @ApiOperation(value = "获取适配方案", response = Result.class, produces = "application/json", notes = "获取适配方案")
    public Result getForSchemeId(
    public Result get(
            @ApiParam(name = "schemeId", value = "标准版本ID")
            @RequestParam(value = "schemeId") Integer schemeId) {
        return adapterSchemeService.get(schemeId);
@ -53,9 +53,9 @@ public class SchemeController extends BaseController {
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/updateScheme")
    @RequestMapping("/updateScheme")
    @ApiOperation(value = "修改适配方案", response = Result.class, produces = "application/json", notes = "修改适配方案")
    public Result updateScheme(
    public Result modify(
            @ApiParam(name = "scheme", value = "适配方案")
            @RequestParam(value = "scheme") String scheme) {
        return adapterSchemeService.update(scheme);
@ -69,7 +69,7 @@ public class SchemeController extends BaseController {
     */
    @RequestMapping(value = "/addScheme")
    @ApiOperation(value = "保存适配方案", response = Result.class, produces = "application/json", notes = "保存适配方案")
    public Result addScheme(
    public Result add(
            @ApiParam(name = "scheme", value = "适配方案信息")
            @RequestParam(value = "scheme") String scheme) {
        return adapterSchemeService.add(scheme);
@ -83,7 +83,7 @@ public class SchemeController extends BaseController {
     */
    @RequestMapping(value = "/deleteScheme")
    @ApiOperation(value = "删除适配方案", response = Result.class, produces = "application/json", notes = "删除适配方案")
    public Result deleteScheme(
    public Result delete(
            @ApiParam(name = "schemeId", value = "适配方案ID")
            @RequestParam(value = "schemeId") Integer schemeId) {
        return adapterSchemeService.delete(schemeId);

+ 23 - 0
Hos-resource/src/main/java/com/yihu/ehr/standard/controller/SchemeVersionController.java

@ -1,6 +1,7 @@
package com.yihu.ehr.standard.controller;
import com.yihu.ehr.framework.model.DataGridResult;
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.service.adapter.AdapterSchemeVersionService;
@ -101,4 +102,26 @@ public class SchemeVersionController extends BaseController {
            return null;
        }
    }
    /**
     * 获取基础版本列表
     * @param schemeId
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/getVersions")
    @ApiOperation(value = "获取适配方案版本列表", response = DictionaryResult.class, produces = "application/json", notes = "获取标准版本列表")
    public DictionaryResult getList(
            @ApiParam(name = "schemeId", value = "适配方案ID")
            @RequestParam(value = "schemeId") Integer schemeId,
            @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 adapterSchemeVersion.getDictionaryResult(schemeId, condition, order, rows, page);
    }
}

+ 22 - 0
Hos-resource/src/main/java/com/yihu/ehr/standard/controller/StandardController.java

@ -2,6 +2,7 @@ package com.yihu.ehr.standard.controller;
import com.yihu.ehr.framework.constrant.Constants;
import com.yihu.ehr.framework.model.DetailModelResult;
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.standard.resultModel.StandardParamResultModel;
@ -104,4 +105,25 @@ public class StandardController extends BaseController {
            @RequestParam(value = "standardId") Integer standardId) {
        return standardService.delete(standardId);
    }
    /**
     * 获取平台标准名称/应用标准名称列表
     * @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;
    }
}