AdapterOrgClient.java 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. package com.yihu.ehr.adapter.service;
  2. import com.yihu.ehr.constants.ApiVersion;
  3. import com.yihu.ehr.constants.MicroServices;
  4. import com.yihu.ehr.model.adaption.MAdapterOrg;
  5. import io.swagger.annotations.ApiOperation;
  6. import io.swagger.annotations.ApiParam;
  7. import org.springframework.cloud.netflix.feign.FeignClient;
  8. import org.springframework.http.MediaType;
  9. import org.springframework.http.ResponseEntity;
  10. import org.springframework.web.bind.annotation.*;
  11. import springfox.documentation.annotations.ApiIgnore;
  12. import java.util.Collection;
  13. /**
  14. * Created by AndyCai on 2016/2/29.
  15. */
  16. @FeignClient(name=MicroServices.Adaption)
  17. @RequestMapping(ApiVersion.Version1_0)
  18. @ApiIgnore
  19. public interface AdapterOrgClient {
  20. @RequestMapping(value = "/adapter/orgs", method = RequestMethod.GET)
  21. @ApiOperation(value = "适配采集标准")
  22. ResponseEntity<Collection<MAdapterOrg>> searchAdapterOrg(
  23. @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段", defaultValue = "")
  24. @RequestParam(value = "fields", required = false) String fields,
  25. @ApiParam(name = "filters", value = "过滤器,为空检索所有条件", defaultValue = "")
  26. @RequestParam(value = "filters", required = false) String filters,
  27. @ApiParam(name = "sorts", value = "排序,规则参见说明文档", defaultValue = "")
  28. @RequestParam(value = "sorts", required = false) String sorts,
  29. @ApiParam(name = "size", value = "分页大小", defaultValue = "15")
  30. @RequestParam(value = "size", required = false) int size,
  31. @ApiParam(name = "page", value = "页码", defaultValue = "1")
  32. @RequestParam(value = "page", required = false) int page);
  33. @RequestMapping(value = "/adapter/org/{code}", method = RequestMethod.GET)
  34. @ApiOperation(value = "获取适配采集标准")
  35. MAdapterOrg getAdapterOrg(
  36. @ApiParam(name = "code", value = "代码", defaultValue = "")
  37. @PathVariable(value = "code") String code) ;
  38. @RequestMapping(value = "/adapter/org", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
  39. @ApiOperation(value = "新增采集标准")
  40. MAdapterOrg addAdapterOrg(
  41. @ApiParam(name = "json_data", value = "采集机构模型", defaultValue = "")
  42. @RequestBody String jsonData) ;
  43. @RequestMapping(value = "/adapter/org/{code}", method = RequestMethod.PUT)
  44. @ApiOperation(value = "更新采集标准")
  45. MAdapterOrg updateAdapterOrg(
  46. @ApiParam(name = "code", value = "代码", defaultValue = "")
  47. @PathVariable(value = "code") String code,
  48. @ApiParam(name = "name", value = "名称", defaultValue = "")
  49. @RequestParam(value = "name") String name,
  50. @ApiParam(name = "description", value = "描述", defaultValue = "")
  51. @RequestParam(value = "description", required = false) String description) ;
  52. @RequestMapping(value = "/adapter/orgs", method = RequestMethod.DELETE)
  53. @ApiOperation(value = "删除采集标准")
  54. boolean delAdapterOrg(
  55. @ApiParam(name = "codes", value = "代码", defaultValue = "")
  56. @RequestParam(value = "codes") String codes);
  57. @RequestMapping(value = "/adapter/isExistAdapterData/{org}", method = RequestMethod.GET)
  58. @ApiOperation(value = "判断采集机构是否存在采集数据")
  59. boolean orgIsExistData(
  60. @ApiParam(name = "org", value = "机构", defaultValue = "")
  61. @PathVariable(value = "org") String org) ;
  62. @RequestMapping(value = "/adapter/isExistAdapterOrg/{org}", method = RequestMethod.GET)
  63. @ApiOperation(value = "判断采集机构是否存在采集数据")
  64. boolean isExistAdapterOrg(@ApiParam(name = "org", value = "机构", defaultValue = "")
  65. @PathVariable(value = "org") String org);
  66. }