package com.xunhong.erp.turbo.biz.domain.gateway;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xunhong.erp.turbo.api.biz.dto.cmd.*;
import com.xunhong.erp.turbo.api.biz.dto.qry.*;
import com.xunhong.erp.turbo.biz.domain.entity.Order;

import java.util.List;

/**
 * @author shenyifei
 */
public interface OrderGateway {
	Order save(OrderCreateCmd orderCreateCmd);

	// 新增分步提交方法
	Order saveStep1(OrderStep1Cmd orderStep1Cmd);
	void saveStep2(OrderStep2Cmd orderStep2Cmd);
	void saveStep3(OrderStep3Cmd orderStep3Cmd);

	IPage<Order> page(OrderPageQry orderPageQry);

	List<Order> list(OrderListQry orderListQry);

	Order update(OrderUpdateCmd orderUpdateCmd);

	Order show(OrderShowQry orderShowQry);

	void destroy(OrderDestroyCmd orderDestroyCmd);

	void approve(OrderApproveCmd orderApproveCmd);

	void submitReview(OrderSubmitReviewCmd orderSubmitReviewCmd);

	void withdrawReview(OrderWithdrawReviewCmd orderWithdrawReviewCmd);

	void rejectApprove(OrderRejectApproveCmd orderRejectApproveCmd);

	void finalApprove(OrderFinalApproveCmd orderFinalApproveCmd);

	void rejectFinal(OrderRejectFinalCmd orderRejectFinalCmd);

	Long countBy(OrderCountQry orderCountQry);

	/**
	 * 获取上一车的车次号
	 *
	 * @param lastVehicleNoQry 查询参数
	 * @return 车次号
	 */
	String getLastVehicleNo(LastVehicleNoQry lastVehicleNoQry);
}
