SettlementLogisticsController.java 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. package com.sckw.freight.controller;
  2. import com.sckw.freight.model.vo.request.RequestSettlementLogisticsPageInfo;
  3. import com.sckw.freight.model.vo.response.ResponsePageData;
  4. import com.sckw.freight.model.vo.response.ResponseSettlementLogistics;
  5. import com.sckw.freight.service.freight.IKwpSettlementLogisticsService;
  6. import com.sckw.freight.util.R;
  7. import io.swagger.v3.oas.annotations.Operation;
  8. import io.swagger.v3.oas.annotations.Parameter;
  9. import io.swagger.v3.oas.annotations.Parameters;
  10. import io.swagger.v3.oas.annotations.tags.Tag;
  11. import lombok.extern.slf4j.Slf4j;
  12. import org.springframework.beans.factory.annotation.Autowired;
  13. import org.springframework.format.annotation.DateTimeFormat;
  14. import org.springframework.web.bind.annotation.*;
  15. import java.math.BigDecimal;
  16. import java.time.LocalDateTime;
  17. /**
  18. * @BelongsProject: Freight-Settlement-Backend
  19. * @BelongsPackage: com.sckw.freight.controller
  20. * @Author: xj
  21. * @CreateTime: 2025-01-12 13:21
  22. * @Description: 收款记录
  23. * @Version: 1.0
  24. */
  25. @RestController
  26. @RequestMapping("/settlement")
  27. @Slf4j
  28. @Tag(name = "收款")
  29. public class SettlementLogisticsController {
  30. @Autowired
  31. IKwpSettlementLogisticsService iKwpSettlementLogisticsService;
  32. /**
  33. * @description:添加收款明细(用于支付完成后,支付中台回调)
  34. * @author: xj
  35. * @date: 2025/1/12 星期日 13:19
  36. * @param:
  37. * @return: null
  38. **/
  39. @GetMapping("/add")
  40. @Operation(summary = "添加收款")
  41. @Parameters(value = {
  42. @Parameter(name = "lLedgerId", description = "对账单id"),
  43. @Parameter(name = "price", description = "付款金额"),
  44. @Parameter(name = "slOrderNo", description = "付款单号"),
  45. @Parameter(name = "payTime", description = "支付时间"),
  46. @Parameter(name = "userid", description = "用户id"),
  47. })
  48. public R<String> addSettlementLogistics(
  49. @RequestParam(value = "lLedgerId", required = true)Long lLedgerId,
  50. @RequestParam(value = "price", required = true) BigDecimal price,
  51. @RequestParam(value = "slOrderNo", required = true)String slOrderNo,
  52. @RequestParam(value = "payTime", required = true)@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime payTime,
  53. @RequestParam(value = "userid", required = true)Long userid) {
  54. iKwpSettlementLogisticsService.addSettlementLogistics(lLedgerId, price, slOrderNo, payTime, userid);
  55. return R.ok();
  56. }
  57. /**
  58. * @description:分页查询收款
  59. * @author: xj
  60. * @date: 2025/1/12 星期日 13:49
  61. * @param:
  62. * @return: null
  63. **/
  64. @PostMapping("/list")
  65. @Operation(summary = "分页查询收款")
  66. public R<ResponsePageData<ResponseSettlementLogistics>> list(@RequestBody RequestSettlementLogisticsPageInfo requestPageInfo) {
  67. return iKwpSettlementLogisticsService.list(requestPageInfo);
  68. }
  69. }