package com.xunhong.erp.turbo.api.biz.api;

import com.xunhong.erp.turbo.api.biz.dto.cmd.*;
import com.xunhong.erp.turbo.api.biz.dto.qry.*;
import com.xunhong.erp.turbo.api.biz.dto.vo.AuditVO;
import com.xunhong.erp.turbo.api.biz.dto.vo.OrderVO;
import com.xunhong.erp.turbo.base.dto.PageDTO;

import java.util.List;

/**
 * @author shenyifei
 */
public interface OrderServiceI {
	OrderVO create(OrderCreateCmd orderCreateCmd);

	PageDTO<OrderVO> page(OrderPageQry orderPageQry);

	List<OrderVO> list(OrderListQry orderListQry);

	OrderVO update(OrderUpdateCmd orderUpdateCmd);

	OrderVO show(OrderShowQry orderShowQry);

	void destroy(OrderDestroyCmd orderDestroyCmd);

	AuditVO approve(OrderApproveCmd orderApproveCmd);

	AuditVO submitReview(OrderSubmitReviewCmd orderSubmitReviewCmd);

	AuditVO withdrawReview(OrderWithdrawReviewCmd orderWithdrawReviewCmd);

	AuditVO rejectApprove(OrderRejectApproveCmd orderRejectApproveCmd);

	AuditVO finalApprove(OrderFinalApproveCmd orderFinalApproveCmd);

	AuditVO rejectFinal(OrderRejectFinalCmd orderRejectFinalCmd);

	Long countOrderByState(OrderCountQry orderCountQry);

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

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