YpDictController.java 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. package thyyxxk.webserver.controller.yp;
  2. import org.springframework.validation.annotation.Validated;
  3. import org.springframework.web.bind.annotation.GetMapping;
  4. import org.springframework.web.bind.annotation.PostMapping;
  5. import org.springframework.web.bind.annotation.RequestBody;
  6. import org.springframework.web.bind.annotation.RequestMapping;
  7. import org.springframework.web.bind.annotation.RequestParam;
  8. import org.springframework.web.bind.annotation.RestController;
  9. import thyyxxk.webserver.entity.ResultVo;
  10. import thyyxxk.webserver.entity.dictionary.CodeName;
  11. import thyyxxk.webserver.entity.inpatient.YpZdDict;
  12. import thyyxxk.webserver.entity.yp.YpPrintName;
  13. import thyyxxk.webserver.entity.yp.YpZdChargeGroup;
  14. import thyyxxk.webserver.entity.yp.YpZdClass;
  15. import thyyxxk.webserver.entity.yp.YpZdDictVo;
  16. import thyyxxk.webserver.entity.yp.YpZdDosage;
  17. import thyyxxk.webserver.entity.yp.YpZdDrugKind;
  18. import thyyxxk.webserver.entity.yp.YpZdManuFactory;
  19. import thyyxxk.webserver.entity.yp.YpZdSupply;
  20. import thyyxxk.webserver.entity.yp.YpZdUnit;
  21. import thyyxxk.webserver.service.yp.YpDictService;
  22. import java.util.List;
  23. import java.util.Map;
  24. /**
  25. * @ClassName YpDictController
  26. * @Author Administrator
  27. * @Date 2023/12/27 16:23
  28. * @Version 1.0
  29. * @Description 药品字典
  30. **/
  31. @RestController
  32. @RequestMapping("/ypDict")
  33. public class YpDictController {
  34. private final YpDictService service;
  35. public YpDictController(YpDictService service) {
  36. this.service = service;
  37. }
  38. @GetMapping("/selectYpClass")
  39. public ResultVo<List<YpZdClass>> selectYpClass(@RequestParam("text") String text){
  40. return service.selectYpClass(text);
  41. }
  42. @PostMapping("/saveYpClass")
  43. public ResultVo<Map<String, Object>> saveYpClass(@RequestBody @Validated YpZdClass ypZdClass){
  44. return service.saveYpClass(ypZdClass);
  45. }
  46. @GetMapping("/delYpClassByCode")
  47. public ResultVo<Map<String, Object>> delYpClassByCode(@RequestParam("code") String code){
  48. return service.delYpClassByCode(code);
  49. }
  50. @GetMapping("/selectDrugKind")
  51. public ResultVo<List<YpZdDrugKind>> selectDrugKind(@RequestParam("text") String text){
  52. return service.selectDrugKind(text);
  53. }
  54. @PostMapping("/saveDrugKind")
  55. public ResultVo<Map<String, Object>> saveDrugKind(@RequestBody @Validated YpZdDrugKind drugKind){
  56. return service.saveDrugKind(drugKind);
  57. }
  58. @GetMapping("/delDrugKindByCode")
  59. public ResultVo<Map<String, Object>> delDrugKindByCode(@RequestParam("code") String code){
  60. return service.delDrugKindByCode(code);
  61. }
  62. @GetMapping("/selectYpDosage")
  63. public ResultVo<List<YpZdDosage>> selectYpDosage(@RequestParam("text") String text){
  64. return service.selectYpDosage(text);
  65. }
  66. @PostMapping("/saveYpDosage")
  67. public ResultVo<Map<String, Object>> saveYpDosage(@RequestBody @Validated YpZdDosage ypDosage){
  68. return service.saveYpDosage(ypDosage);
  69. }
  70. @GetMapping("/delYpDosageByCode")
  71. public ResultVo<Map<String, Object>> delYpDosageByCode(@RequestParam("code") String code){
  72. return service.delYpDosageByCode(code);
  73. }
  74. @GetMapping("/selectYpUnit")
  75. public ResultVo<List<YpZdUnit>> selectYpUnit(@RequestParam("text") String text){
  76. return service.selectYpUnit(text);
  77. }
  78. @PostMapping("/saveYpUnit")
  79. public ResultVo<Map<String, Object>> saveYpUnit(@RequestBody @Validated YpZdUnit ypUnit){
  80. return service.saveYpUnit(ypUnit);
  81. }
  82. @GetMapping("/delYpUnitByCode")
  83. public ResultVo<Map<String, Object>> delYpUnitByCode(@RequestParam("code") String code){
  84. return service.delYpUnitByCode(code);
  85. }
  86. @GetMapping("/selectYpChargeGroup")
  87. public ResultVo<List<YpZdChargeGroup>> selectYpChargeGroup(@RequestParam("text") String text){
  88. return service.selectYpChargeGroup(text);
  89. }
  90. @PostMapping("/saveYpChargeGroup")
  91. public ResultVo<Map<String, Object>> saveYpChargeGroup(@RequestBody @Validated YpZdChargeGroup ypChargeGroup){
  92. return service.saveYpChargeGroup(ypChargeGroup);
  93. }
  94. @GetMapping("/delYpChargeGroupByCode")
  95. public ResultVo<Map<String, Object>> delYpChargeGroupByCode(@RequestParam("code") String code){
  96. return service.delYpChargeGroupByCode(code);
  97. }
  98. @GetMapping("/selectYpVisibleFlag")
  99. public ResultVo<List<Map<String, Object>>> selectYpVisibleFlag(@RequestParam("text") String text){
  100. return service.selectYpVisibleFlag(text);
  101. }
  102. @PostMapping("/updateYpVisibleFlag")
  103. public ResultVo<Map<String, Object>> updateYpVisibleFlag(@RequestBody @Validated Map<String, Object> map){
  104. return service.updateYpVisibleFlag(map);
  105. }
  106. @GetMapping("/selectYpSupply")
  107. public ResultVo<List<YpZdSupply>> selectYpSupply(@RequestParam("text") String text){
  108. return service.selectYpSupply(text);
  109. }
  110. @PostMapping("/saveYpSupply")
  111. public ResultVo<Map<String, Object>> saveYpSupply(@RequestBody @Validated YpZdSupply ypZdSupply){
  112. return service.saveYpSupply(ypZdSupply);
  113. }
  114. @GetMapping("/delYpSupplyByCode")
  115. public ResultVo<Map<String, Object>> delYpSupplyByCode(@RequestParam("code") String code){
  116. return service.delYpSupplyByCode(code);
  117. }
  118. @GetMapping("/selectYpManuFactory")
  119. public ResultVo<List<YpZdManuFactory>> selectYpManuFactory(@RequestParam("text") String text){
  120. return service.selectYpManuFactory(text);
  121. }
  122. @PostMapping("/saveYpManuFactory")
  123. public ResultVo<Map<String, Object>> saveYpManuFactory(@RequestBody @Validated YpZdManuFactory ypZdManuFactory){
  124. return service.saveYpManuFactory(ypZdManuFactory);
  125. }
  126. @GetMapping("/delYpManuFactoryByCode")
  127. public ResultVo<Map<String, Object>> delYpManuFactoryByCode(@RequestParam("code") String code){
  128. return service.delYpManuFactoryByCode(code);
  129. }
  130. @GetMapping("/selectYpDict")
  131. public ResultVo<List<Map<String, String>>> selectYpDict(@RequestParam("text") String text,
  132. @RequestParam("groupNo") String groupNo,
  133. @RequestParam("isSee") String isSee){
  134. return service.selectYpDict(text, groupNo, isSee);
  135. }
  136. @GetMapping("/updateYpStopOrUsed")
  137. public ResultVo<Map<String, Object>> updateYpStopOrUsed(@RequestParam("code") String code, @RequestParam("serial") String serial, @RequestParam("delFlag") String delFlag){
  138. return service.updateYpStopOrUsed(code, serial, delFlag);
  139. }
  140. @GetMapping("/selectYpDictByCode")
  141. public ResultVo<YpZdDict> selectYpDictByCode(@RequestParam("code") String code, @RequestParam("serial") String serial){
  142. return service.selectYpDictByCode(code, serial);
  143. }
  144. @GetMapping("/selectYpDictData")
  145. public ResultVo<Map<String, List<CodeName>>> selectYpDictData(){
  146. return service.selectYpDictData();
  147. }
  148. @PostMapping("/saveYpDict")
  149. public ResultVo<Map<String, Object>> saveYpDict(@RequestBody @Validated YpZdDictVo ypZdDictVo){
  150. return service.saveYpDict(ypZdDictVo);
  151. }
  152. @GetMapping("/selectYpPrintNameData")
  153. public ResultVo<List<YpPrintName>> selectYpPrintNameData(@RequestParam("chargeCode") String chargeCode){
  154. return service.selectYpPrintNameData(chargeCode);
  155. }
  156. @PostMapping("/savePrintName")
  157. public ResultVo<Map<String, Object>> savePrintName(@RequestBody @Validated YpPrintName ypPrintName){
  158. return service.savePrintName(ypPrintName);
  159. }
  160. @GetMapping("/delYpPrintNameByPrintName")
  161. public ResultVo<Map<String, Object>> delYpPrintNameByPrintName(@RequestParam("chargeCode") String chargeCode,
  162. @RequestParam("printName") String printName){
  163. return service.delYpPrintNameByPrintName(chargeCode, printName);
  164. }
  165. @GetMapping("/selectYpGroupNameByYfFlag")
  166. public ResultVo<List<CodeName>> selectYpGroupNameByYfFlag(@RequestParam("text") String text, @RequestParam("yfFlag") String yfFlag){
  167. return service.selectYpGroupNameByYfFlag(text, yfFlag);
  168. }
  169. @GetMapping("/selectYpGroupNameAll")
  170. public ResultVo<List<Map<String, Object>>> selectYpGroupNameAll(@RequestParam("text") String text){
  171. return service.selectYpGroupNameAll(text);
  172. }
  173. @GetMapping("/updateYpTempPurchase")
  174. public ResultVo<Map<String, Object>> updateYpTempPurchase(@RequestParam("code") String code, @RequestParam("serial") String serial, @RequestParam("tempPurchaseFlag") String tempPurchaseFlag){
  175. return service.updateYpTempPurchase(code, serial, tempPurchaseFlag);
  176. }
  177. @GetMapping("/updateYkYpStopOrUsed")
  178. public ResultVo<Map<String, Object>> updateYkYpStopOrUsed(@RequestParam("groupNo") String groupNo, @RequestParam("code") String code,
  179. @RequestParam("serial") String serial, @RequestParam("delFlag") String delFlag){
  180. return service.updateYkYpStopOrUsed(groupNo, code, serial, delFlag);
  181. }
  182. @GetMapping("/updateYpJbFlag")
  183. public ResultVo<Map<String, Object>> updateYpJbFlag(@RequestParam("code") String code, @RequestParam("serial") String serial, @RequestParam("jbFlag") String jbFlag){
  184. return service.updateYpJbFlag(code, serial, jbFlag);
  185. }
  186. @GetMapping("/selectYpStorageInfo")
  187. public ResultVo<Map<String, Object>> selectYpStorageInfo(@RequestParam("code") String code, @RequestParam("groupNo") String groupNo){
  188. return service.selectYpStorageInfo(code, groupNo);
  189. }
  190. @GetMapping("/updateYpHighWarning")
  191. public ResultVo<Map<String, Object>> updateYpHighWarning(@RequestParam("code") String code, @RequestParam("serial") String serial, @RequestParam("flag") String flag){
  192. return service.updateYpHighWarning(code, serial, flag);
  193. }
  194. @GetMapping("/updateYpWinningBidder")
  195. public ResultVo<Map<String, Object>> updateYpWinningBidder(@RequestParam("code") String code, @RequestParam("serial") String serial, @RequestParam("flag") String flag){
  196. return service.updateYpWinningBidder(code, serial, flag);
  197. }
  198. }