LedgerController.java 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. package com.sckw.freight.controller;
  2. import com.sckw.freight.model.vo.request.RequestLedgerLogisticsPageInfo;
  3. import com.sckw.freight.model.vo.request.RequestSaveLedgerLogisticsInfo;
  4. import com.sckw.freight.model.vo.response.ResponseKllOrderTask;
  5. import com.sckw.freight.model.vo.response.ResponseLedgerLogistics;
  6. import com.sckw.freight.model.vo.response.ResponseLedgerLogisticsStatistics;
  7. import com.sckw.freight.model.vo.response.ResponsePageData;
  8. import com.sckw.freight.service.freight.IKwpLedgerLogisticsService;
  9. import com.sckw.freight.util.R;
  10. import io.swagger.v3.oas.annotations.Operation;
  11. import io.swagger.v3.oas.annotations.Parameter;
  12. import io.swagger.v3.oas.annotations.Parameters;
  13. import io.swagger.v3.oas.annotations.tags.Tag;
  14. import lombok.extern.slf4j.Slf4j;
  15. import org.springframework.beans.factory.annotation.Autowired;
  16. import org.springframework.web.bind.annotation.*;
  17. import java.util.List;
  18. /**
  19. * @BelongsProject: Freight-Settlement-Backend
  20. * @BelongsPackage: com.sckw.freight.controller
  21. * @Author: xj
  22. * @CreateTime: 2025-01-10 10:18
  23. * @Description: 对账结算
  24. * @Version: 1.0
  25. */
  26. @RestController
  27. @RequestMapping("/ledger")
  28. @CrossOrigin(origins = "*") // 允许所有来源的请求跨域
  29. @Slf4j
  30. @Tag(name = "对账结算")
  31. public class LedgerController {
  32. @Autowired
  33. IKwpLedgerLogisticsService iKwpLedgerLogisticsService;
  34. /**
  35. * 保存对账结算
  36. *
  37. * @return
  38. */
  39. @PostMapping("/add")
  40. @Operation(summary = "新建物流对账单")
  41. public R<String> add(@RequestBody RequestSaveLedgerLogisticsInfo requestSaveLedgerSettlementInfo) {
  42. return iKwpLedgerLogisticsService.saveLedgerLogistics(requestSaveLedgerSettlementInfo);
  43. }
  44. /**
  45. * 分页查询对账单
  46. *
  47. * @return
  48. */
  49. @PostMapping("/list")
  50. @Operation(summary = "分页查询对账单")
  51. public R<ResponsePageData<ResponseLedgerLogistics>> list(@RequestBody RequestLedgerLogisticsPageInfo requestPageInfo) {
  52. return iKwpLedgerLogisticsService.queryLedgerLogistics(requestPageInfo);
  53. }
  54. /**
  55. * 根据对账单id查询运单列表信息
  56. *
  57. * @return
  58. */
  59. @GetMapping("/queryOrderTaskListByLedgerLogisticsId")
  60. @Operation(summary = "根据对账单id查询运单列表信息")
  61. @Parameters(value = {
  62. @Parameter(name = "ledgerLogisticsId", description = "对账单id"),
  63. @Parameter(name = "entId", description = "企业id")
  64. })
  65. public R<List<ResponseKllOrderTask>> queryOrderTaskListByLedgerLogisticsId(
  66. @RequestParam(value = "ledgerLogisticsId", required = true) Long ledgerLogisticsId,
  67. @RequestParam(value = "entId", required = true) Long entId) {
  68. return iKwpLedgerLogisticsService.queryOrderTaskListByLedgerLogisticsId(ledgerLogisticsId, entId);
  69. }
  70. @GetMapping("/queryLedgerLogisticsStatistics")
  71. @Operation(summary = "物流对账单-统计信息")
  72. @Parameters(value = {
  73. @Parameter(name = "entId", description = "企业id")
  74. })
  75. public R<ResponseLedgerLogisticsStatistics> queryLedgerLogisticsStatistics(@RequestParam(value = "entId", required = true) Long entId) {
  76. return iKwpLedgerLogisticsService.queryLedgerLogisticsStatistics(entId);
  77. }
  78. }