package com.goafanti.order.service;

import com.goafanti.common.model.NewOrderChange;
import com.goafanti.common.model.OrderRefundInvoice;
import com.goafanti.common.model.TChangeDun;
import com.goafanti.common.model.TChangeTask;
import com.goafanti.core.mybatis.page.Pagination;
import com.goafanti.order.bo.*;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface OrderChangeService {

	int addOrderChange(NewOrderChangeBo t, String startRemarks);

	List<NewOrderChangeBo> orderChangeDetails(String orderNo);

	int pushOrderChangeAudit(String changeId, String remarks, Integer status,Integer processState, Integer rejectState);

	boolean checkOderNo(String orderNo);

	List<OrderChangeLogBo> selectOrderChangeLogList(String changeId);

	/**
	 *
	 * @param userName
	 * @param processState 流程状态 0营销员 1营销管理员 2技术员 3技术经理 4技术总监 5财务专员(退单) 6财务总监 7总裁 8董事长
	 * @param timeType
	 * @param startTime
	 * @param endTime
	 * @param salesmanName
	 * @param complete
	 * @param orderNo
	 * @param contractNo
	 * @param type
	 * @param pageSize
	 * @param pageNo
	 * @return
	 */
	Pagination<NewOderCahngeListBo> selectOrderChangeList(String userName,Integer  processState,Integer timeType,String startTime,String endTime,
														  String deps,String salesmanName,Integer complete,String orderNo, String contractNo,Integer type, Integer pageSize, Integer pageNo );

	int updateOrderChange(NewOrderChangeBo t, Integer changeType,String startRemarks);

	NewOrderChangeBo orderChangeDetailsById(Integer id);

	int addOrderRefundInvoice(OrderRefundInvoice o);

	int deleteOrderRefundInvoice(Integer id);

	List<OrderRefundInvoice> listOrderRefundInvoice(String orderNo);

	int pushCompleteOrderChange(NewOrderChangeBo nb);

	Map<String ,Object> listOrderInvoiceAndBill(String orderNo);

	void exportMyChange(HttpServletResponse response, String userName, Integer processState, Integer timeType,
			String startTime, String endTime, String deps, String salesmanName, Integer complete,String orderNo, String contractNo,Integer type, Integer pageSize,
			Integer pageNo) throws IOException ;

	void pushOrderCangeProcess(NewOrderChange noc);
	void pushZXS(NewOrderChangeBo nb, Date date, Integer type);
	void pushZXSJL(NewOrderChangeBo nb,  Date date,Integer type);


	Object addChangeTask(InputTChangeTaskBo t);

	int addChangeDun(TChangeDun d);

	int deleteChangeTask(Integer id);

	int deleteChangeDun(Integer id);

	List<TChangeTaskOut> selectChangeTask(Integer cid);

	List<TChangeDunOut> selectChangeDun(Integer cid);

	int updateChangeTask(InputTChangeTask t);

	int updateChangeDun(TChangeDun t);

	List<TOrderNewBo> orderChangeUsed(String orderNo);

	List<Map<String, String>> getOrderChange(String orderNo);

	int addOrderRefund(InputNewOrderRefund or);

	int deleteRefund(Integer id);

	List<OutNewOrderRefund> listRefund(Integer id);

	int pushRefund(Integer id, String refundUrl);

	boolean checkrefund(InputNewOrderRefund or);

	int updateCancelOrderChange(NewOrderChangeBo nb);


	int pushCompleteRefund(NewOrderChangeBo nb);

    boolean checkChangeId(Integer id);

    Object addMemberSonProject(InputAddSonProject in );

	int deleteMemberSonProject(Integer id);

    Object updateMemberSonProject(InputAddSonProject in);



	Object gerProcessName(Integer id);

    boolean checkTaskMain(TChangeTask t);

	/**
	 *
	 * @param taskReceiverId 转交接受人
	 * @param type  3咨询师 4咨询师经理
	 */
	void pushChangeProcess(String taskReceiverId, Integer type);

    boolean checkMember(InputAddSonProject in);

	void pushSuerProject(InputAddSonProject in);
}
