package com.goafanti.order.service;

import java.math.BigDecimal;
import java.text.ParseException;
import java.util.List;

import com.goafanti.common.model.Department;
import com.goafanti.common.model.TOrderDetail;
import com.goafanti.core.mybatis.page.Pagination;
import com.goafanti.customer.bo.FollowBusinessBo;
import com.goafanti.order.bo.BillDetailBo;
import com.goafanti.order.bo.BillListBo;
import com.goafanti.order.bo.OrderListBo;
import com.goafanti.order.bo.ServiceOrderDetailBo;
import com.goafanti.order.bo.C2BOrderDetailBo;
import com.goafanti.order.bo.C2COrderDetailBo;
import com.goafanti.order.bo.OrderChangeBo;

public interface OrderService {












	/**
	 * 用户查询流水记录
	 * @param orderNo
	 * @return
	 */
	Pagination<BillListBo> selectOrderBillList(String orderNo,Integer pageNo,Integer pageSize);






	/**
	 *
	 * @param bo
	 * @param startDate 开始时间
	 * @param endDate 结束时间
	 * @param intention 是否包含意向
	 * @param formal 是否包含正式
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	Pagination<OrderListBo> selectServiceOrder(OrderListBo bo,String startDate,String endDate,Integer intention,Integer formal,
			Integer pageNo, Integer pageSize);










	/**
	 * 查询分管部门、查询管理部门
	 * @return
	 */
	List<Department> selectMyDeps();

	/**
	 *
	 * @param bo
	 * @param startDate 开始时间
	 * @param endDate 结束时间
	 * @param intention 是否包含意向
	 * @param formal 是否包含正式
	 * @param depIds 部门id
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	Pagination<OrderListBo> selectDepServiceOrder(OrderListBo bo,String startDate,String endDate,Integer intention,Integer formal,
			String depIds,Integer pageNo, Integer pageSize);

	/**
	 *
	 * @param bo
	 * @param startDate 开始时间
	 * @param endDate 结束时间
	 * @param depIds 部门id
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	Pagination<OrderListBo> selectApprovalServiceOrder(OrderListBo bo,String startDate,String endDate,
			String depIds,Integer approvalHistory,Integer pageNo, Integer pageSize);



	/**
	 * 查询公共订单
	 * @return
	 */
	Pagination<OrderListBo> selectPublicOrder(OrderListBo bo,String startDate,String endDate,Integer pageNo, Integer pageSize);



	/**
	 *
	 * @param orderNo
	 * @param depId
	 * @param buyerName
	 * @param salesmanName
	 * @param financeName
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	Pagination<OrderListBo> selectSettlementList(String orderNo, String depId,String buyerName,String salesmanName,
			String financeId,String financeName,Integer orderStatus,Integer liquidationStatus,Integer approval,Integer isDistributionFinance,
			String startDate,String endDate,Integer pageNo, Integer pageSize);

	/**
	 * 我的订单流水(财务负责人课件)
	 * @param payeeName 收款人
	 * @param payerName 付款人
	 * @param depId 部门id
	 * @param salesmanName 营销员
	 * @param orderNo 订单编号
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	Pagination<BillListBo> selectMyBillList(String payeeName,String payerName,String depId,String salesmanName,String orderNo,
			 Integer confirmSign,Integer deleteSign,Integer pageNo,Integer pageSize);


	/**
	 * 我的订单流水查询（与订单相关的人员可见）
	 * @param payeeName 收款人
	 * @param payerName 付款人
	 * @param depId 部门id
	 * @param salesmanName 营销员
	 * @param orderNo 订单编号
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	Pagination<BillListBo> queryMyBillList(String payeeName,String payerName,String depId,String salesmanName,String orderNo,
			 Integer confirmSign,Integer deleteSign,Integer pageNo,Integer pageSize);


	/**
	 * 所有订单流水查询
	 * @param payeeName
	 * @param payerName
	 * @param depId
	 * @param salesmanName
	 * @param orderNo
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	Pagination<BillListBo> queryAllBillList(String payeeName,String payerName,String depId,String salesmanName,String financeName,String orderNo,
			 Integer confirmSign,Integer deleteSign,Integer pageNo,Integer pageSize);






	/**
	 * 修改露水订单
	 * @param billNo
	 * @param orderNo
	 * @return
	 */
	int updateBill(String billNo,String orderNo,String financialPayNo,String financialPayTime,String remarks);


	/**
	 * 查询待立项订单
	 * @param depId
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	Pagination<OrderListBo> listSetUpServiceOrder(String buyerName,String salesmanName, String financeName,
			String depId,Integer approval, Integer pageNo, Integer pageSize);

















	/**
	 * 查看变更记录列表
	 * @param orderNo
	 * @return
	 */
	List<OrderChangeBo> selectOrderChange(String orderNo);





	/**
	 * 修复订单数据
	 * @return
	 */
	int updateRepairData();

	void addContractTaskLog();


	int addBusinessProjectId(FollowBusinessBo fbb);


    int pushOrderImg(String orderNo, String imageUrl,String sign);

    int deleteOrderImg(String fileName,String orderNo, String sign);
}
