CdssClient.java 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. package com.diagbot.client;
  2. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  3. import com.diagbot.client.hystrix.CdssHystrix;
  4. import com.diagbot.dto.RespDTO;
  5. import com.diagbot.entity.MappingConfig;
  6. import com.diagbot.entity.wrapper.MappingConfigWrapper;
  7. import com.diagbot.vo.IdListVO;
  8. import com.diagbot.vo.IdVO;
  9. import com.diagbot.vo.MappingConfigPageVO;
  10. import com.diagbot.vo.MappingConfigVO;
  11. import org.springframework.cloud.openfeign.FeignClient;
  12. import org.springframework.http.MediaType;
  13. import org.springframework.transaction.annotation.Transactional;
  14. import org.springframework.web.bind.annotation.PostMapping;
  15. import org.springframework.web.bind.annotation.RequestBody;
  16. import org.springframework.web.bind.annotation.RequestParam;
  17. import org.springframework.web.bind.annotation.RequestPart;
  18. import org.springframework.web.multipart.MultipartFile;
  19. import javax.servlet.http.HttpServletResponse;
  20. import javax.validation.Valid;
  21. import java.util.List;
  22. /**
  23. * @Description:
  24. * @Author:zhaops
  25. * @time: 2021/6/21 15:33
  26. */
  27. @FeignClient(name = "cdss", url = "${cdss.url}", fallback = CdssHystrix.class)
  28. public interface CdssClient {
  29. /**
  30. * 数据导入模板导出
  31. *
  32. * @param mappingConfigVO
  33. */
  34. @PostMapping("/tran/mappingConfig/exportExcelModule")
  35. void exportExcelModule(@RequestBody @Valid MappingConfigVO mappingConfigVO);
  36. /**
  37. * 预匹配导入术语校验
  38. *
  39. * @param file
  40. * @param type
  41. */
  42. @PostMapping(value = "/tran/mappingConfig/dataVerify", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
  43. RespDTO<Boolean> dataVerify(@RequestPart("file") MultipartFile file,
  44. @RequestParam("type") Integer type);
  45. /**
  46. * 预匹配
  47. *
  48. * @param file
  49. * @param response
  50. * @param type
  51. */
  52. @PostMapping(value = "/tran/mappingConfig/precDataMatch", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
  53. void precDataMatch(@RequestParam("file") MultipartFile file,
  54. HttpServletResponse response,
  55. @RequestParam("type") Integer type);
  56. /**
  57. * 预匹配_远程调用
  58. *
  59. * @param file
  60. * @param type
  61. * @return
  62. */
  63. @PostMapping(value = "/tran/mappingConfig/precDataMatch_remote", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
  64. RespDTO<List<MappingConfigWrapper>> precDataMatch_remote(@RequestPart("file") MultipartFile file,
  65. @RequestParam("type") Integer type);
  66. /**
  67. * 数据导入校验
  68. *
  69. * @param file
  70. * @param hospitalId
  71. * @param type
  72. * @param userId
  73. */
  74. @PostMapping(value = "/tran/mappingConfig/importExcelDataVerify", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
  75. RespDTO<Boolean> importExcelDataVerify(@RequestPart("file") MultipartFile file,
  76. @RequestParam("hospitalId") Long hospitalId,
  77. @RequestParam("type") Integer type,
  78. @RequestParam("uesrId") String userId);
  79. /**
  80. * 数据导入
  81. *
  82. * @param file
  83. * @param hospitalId
  84. * @param type
  85. * @param userId
  86. */
  87. @PostMapping(value = "/tran/mappingConfig/importExcel", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
  88. RespDTO<Boolean> importExcel(@RequestPart("file") MultipartFile file,
  89. @RequestParam("hospitalId") Long hospitalId,
  90. @RequestParam("type") Integer type,
  91. @RequestParam("uesrId") String userId);
  92. /**
  93. * 数据导入
  94. *
  95. * @param file
  96. * @param hospitalId
  97. * @param type
  98. * @param userId
  99. */
  100. @PostMapping(value = "/tran/mappingConfig/importExcel_remote", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
  101. RespDTO<List<MappingConfigWrapper>> importExcel_remote(@RequestPart("file") MultipartFile file,
  102. @RequestParam("hospitalId") Long hospitalId,
  103. @RequestParam("type") Integer type,
  104. @RequestParam("uesrId") String userId);
  105. /**
  106. * 数据导出_远程调用
  107. *
  108. * @param mappingConfigPageVO
  109. * @return
  110. */
  111. @PostMapping("/tran/mappingConfig/exportExcel_remote")
  112. RespDTO<List<MappingConfigWrapper>> exportExcel_remote(@RequestBody @Valid MappingConfigPageVO mappingConfigPageVO);
  113. /**
  114. * 分页查询
  115. *
  116. * @param mappingConfigPageVO
  117. * @return
  118. */
  119. @PostMapping("/tran/mappingConfig/getPage")
  120. RespDTO<Page<MappingConfigWrapper>> getPage(@RequestBody @Valid MappingConfigPageVO mappingConfigPageVO);
  121. /**
  122. * 获取映射关系
  123. *
  124. * @param idVO
  125. * @return
  126. */
  127. @PostMapping("/tran/mappingConfig/getRecord")
  128. @Transactional
  129. RespDTO<MappingConfigWrapper> getRecord(@RequestBody @Valid IdVO idVO);
  130. /**
  131. * 映射关系是否已存在
  132. *
  133. * @param mappingConfig
  134. * @return
  135. */
  136. @PostMapping("/tran/mappingConfig/isExistRecord")
  137. RespDTO<Boolean> isExistRecord(@RequestBody @Valid MappingConfig mappingConfig);
  138. /**
  139. * 查询已映射关系
  140. *
  141. * @param mappingConfigVO
  142. * @return
  143. */
  144. @PostMapping("/tran/mappingConfig/getRelatedMapping")
  145. RespDTO<List<MappingConfigWrapper>> getRelatedMapping(@RequestBody @Valid MappingConfigVO mappingConfigVO);
  146. /**
  147. * 保存或修改映射关系
  148. *
  149. * @param mappingConfig
  150. * @return
  151. */
  152. @PostMapping("/tran/mappingConfig/saveOrUpdateRecord")
  153. RespDTO<Boolean> saveOrUpdateRecord(@RequestBody @Valid MappingConfig mappingConfig);
  154. /**
  155. * 删除映射关系
  156. *
  157. * @param idVO
  158. * @return
  159. */
  160. @PostMapping("/tran/mappingConfig/deleteRecord")
  161. RespDTO<Boolean> deleteRecord(@RequestBody @Valid IdVO idVO);
  162. /**
  163. * 批量删除映射关系
  164. *
  165. * @param idListVO
  166. * @return
  167. */
  168. @PostMapping("/tran/mappingConfig/deleteRecords")
  169. RespDTO<Boolean> deleteRecords(@RequestBody @Valid IdListVO idListVO);
  170. }