| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- package com.sckw.freight.controller;
- import com.sckw.freight.model.vo.request.RequestLedgerLogisticsPageInfo;
- import com.sckw.freight.model.vo.request.RequestSaveLedgerLogisticsInfo;
- import com.sckw.freight.model.vo.response.ResponseKllOrderTask;
- import com.sckw.freight.model.vo.response.ResponseLedgerLogistics;
- import com.sckw.freight.model.vo.response.ResponseLedgerLogisticsStatistics;
- import com.sckw.freight.model.vo.response.ResponsePageData;
- import com.sckw.freight.service.freight.IKwpLedgerLogisticsService;
- import com.sckw.freight.util.R;
- import io.swagger.v3.oas.annotations.Operation;
- import io.swagger.v3.oas.annotations.Parameter;
- import io.swagger.v3.oas.annotations.Parameters;
- import io.swagger.v3.oas.annotations.tags.Tag;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import java.util.List;
- /**
- * @BelongsProject: Freight-Settlement-Backend
- * @BelongsPackage: com.sckw.freight.controller
- * @Author: xj
- * @CreateTime: 2025-01-10 10:18
- * @Description: 对账结算
- * @Version: 1.0
- */
- @RestController
- @RequestMapping("/ledger")
- @CrossOrigin(origins = "*") // 允许所有来源的请求跨域
- @Slf4j
- @Tag(name = "对账结算")
- public class LedgerController {
- @Autowired
- IKwpLedgerLogisticsService iKwpLedgerLogisticsService;
- /**
- * 保存对账结算
- *
- * @return
- */
- @PostMapping("/add")
- @Operation(summary = "新建物流对账单")
- public R<String> add(@RequestBody RequestSaveLedgerLogisticsInfo requestSaveLedgerSettlementInfo) {
- return iKwpLedgerLogisticsService.saveLedgerLogistics(requestSaveLedgerSettlementInfo);
- }
- /**
- * 分页查询对账单
- *
- * @return
- */
- @PostMapping("/list")
- @Operation(summary = "分页查询对账单")
- public R<ResponsePageData<ResponseLedgerLogistics>> list(@RequestBody RequestLedgerLogisticsPageInfo requestPageInfo) {
- return iKwpLedgerLogisticsService.queryLedgerLogistics(requestPageInfo);
- }
- /**
- * 根据对账单id查询运单列表信息
- *
- * @return
- */
- @GetMapping("/queryOrderTaskListByLedgerLogisticsId")
- @Operation(summary = "根据对账单id查询运单列表信息")
- @Parameters(value = {
- @Parameter(name = "ledgerLogisticsId", description = "对账单id"),
- @Parameter(name = "entId", description = "企业id")
- })
- public R<List<ResponseKllOrderTask>> queryOrderTaskListByLedgerLogisticsId(
- @RequestParam(value = "ledgerLogisticsId", required = true) Long ledgerLogisticsId,
- @RequestParam(value = "entId", required = true) Long entId) {
- return iKwpLedgerLogisticsService.queryOrderTaskListByLedgerLogisticsId(ledgerLogisticsId, entId);
- }
- @GetMapping("/queryLedgerLogisticsStatistics")
- @Operation(summary = "物流对账单-统计信息")
- @Parameters(value = {
- @Parameter(name = "entId", description = "企业id")
- })
- public R<ResponseLedgerLogisticsStatistics> queryLedgerLogisticsStatistics(@RequestParam(value = "entId", required = true) Long entId) {
- return iKwpLedgerLogisticsService.queryLedgerLogisticsStatistics(entId);
- }
- }
|