package com.sckw.transport.controller.enterpriseApp;

import com.sckw.core.web.response.BaseResult;
import com.sckw.transport.model.param.SalesWaybillOrderQueryParam;
import com.sckw.transport.model.param.SalesWaybillOrderResp;
import com.sckw.transport.service.KwtLogisticsConsignmentService;
import com.sckw.transport.service.KwtWaybillManagementService;
import com.sckw.transport.service.KwtWaybillManagementV1Service;
import com.sckw.transport.service.app.SalesWaybillOrderService;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jc
 * @description 企业端app运单controller
 * @date 2023-08-21 16:08:41
 */
@Slf4j
@RestController
@RequestMapping("/appSalesWaybill")
public class AppSalesWayBillController {

    @Autowired
    KwtWaybillManagementService waybillManagementService;
    @Autowired
    KwtWaybillManagementV1Service waybillManagementV1Service;
    @Autowired
    KwtLogisticsConsignmentService logisticsConsignmentService;
    @Autowired
    SalesWaybillOrderService salesWaybillOrderService;


    /**
     * 分页查询运单
     *
     * @param param
     * @return
     */
    @Operation(summary = "分页查询运单", description = "查询司机关联车辆接单的运单")
    @PostMapping("/querySalesStatistics")
    public BaseResult<SalesWaybillOrderResp> querySalesStatistics(@RequestBody @Valid SalesWaybillOrderQueryParam param){
        SalesWaybillOrderResp salesWaybillOrderResp = salesWaybillOrderService.querySalesStatistics(param);
        return BaseResult.success(salesWaybillOrderResp);
    }



}

