CcbController.java 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. package com.ruoyi.web.controller.plugin;
  2. import com.ruoyi.ccb.domain.*;
  3. import com.ruoyi.ccb.domain.basic.Page;
  4. import com.ruoyi.ccb.service.CcbHttpService;
  5. import lombok.AllArgsConstructor;
  6. import org.springframework.web.bind.annotation.*;
  7. /**
  8. * CCB接口
  9. *
  10. * @author s
  11. */
  12. @AllArgsConstructor
  13. @RestController
  14. @RequestMapping("/ccb")
  15. public class CcbController {
  16. private final CcbHttpService ccbHttpService;
  17. /**
  18. * 查询保管凭证号
  19. *
  20. * @param voucher 报文
  21. * @return 结果
  22. */
  23. @PostMapping("/takeVoucherIsExist")
  24. public VoucherR takeVoucherIsExist(@RequestBody Voucher voucher) {
  25. return ccbHttpService.takeVoucherIsExist(voucher);
  26. }
  27. /**
  28. * 保管凭证号详情
  29. *
  30. * @param voucher 报文
  31. * @return 结果
  32. */
  33. @PostMapping("/takeVoucherDetail")
  34. public VoucherDetailR takeVoucherDetail(@RequestBody Voucher voucher) {
  35. return ccbHttpService.takeVoucherDetail(voucher);
  36. }
  37. /**
  38. * 同步出质
  39. *
  40. * @param pledge 报文
  41. * @return 结果
  42. */
  43. @PostMapping("/cargoPledge")
  44. public PledgeR cargoPledge(@RequestBody Pledge pledge) {
  45. return ccbHttpService.cargoPledge(pledge);
  46. }
  47. /**
  48. * 同步提货
  49. *
  50. * @param pledge 报文
  51. * @return 结果
  52. */
  53. @PostMapping("/cargoPledgeOut")
  54. public PledgeR cargoPledgeOut(@RequestBody Pledge pledge) {
  55. return ccbHttpService.cargoPledgeOut(pledge);
  56. }
  57. /**
  58. * 入库请求
  59. *
  60. * @param inOutCargo 报文
  61. * @return 结果
  62. */
  63. @PostMapping("/inCargoReq")
  64. public InOutCargoR inCargoReq(@RequestBody InOutCargo inOutCargo) {
  65. return ccbHttpService.inCargoReq(inOutCargo);
  66. }
  67. /**
  68. * 出库请求
  69. *
  70. * @param inOutCargo 报文
  71. * @return 结果
  72. */
  73. @PostMapping("/outCargoReq")
  74. public InOutCargoR outCargoReq(@RequestBody InOutCargo inOutCargo) {
  75. return ccbHttpService.outCargoReq(inOutCargo);
  76. }
  77. /**
  78. * 同步用户信息
  79. *
  80. * @param syncOrg 报文
  81. * @return 结果
  82. */
  83. @PostMapping("/syncOrg")
  84. public Page syncOrg(@RequestBody SyncOrg syncOrg) {
  85. return ccbHttpService.syncOrg(syncOrg);
  86. }
  87. /**
  88. * 生成仓单编号
  89. *
  90. * @param pledge 报文
  91. * @return 结果
  92. */
  93. @PostMapping("/generateWrNumber")
  94. public PledgeR generateWrNumber(@RequestBody Pledge pledge) {
  95. return ccbHttpService.generateWrNumber(pledge);
  96. }
  97. /**
  98. * 作废仓单编号指令
  99. *
  100. * @param pledge 报文
  101. * @return 结果
  102. */
  103. @PostMapping("/cancelWrNumber")
  104. public PledgeR cancelWrNumber(@RequestBody Pledge pledge) {
  105. return ccbHttpService.cancelWrNumber(pledge);
  106. }
  107. }