package com.goafanti.order.service;

import java.io.IOException;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletResponse;

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.InputNewOrderRefund;
import com.goafanti.order.bo.InputTChangeTask;
import com.goafanti.order.bo.NewOderCahngeListBo;
import com.goafanti.order.bo.NewOrderChangeBo;
import com.goafanti.order.bo.OrderChangeLogBo;
import com.goafanti.order.bo.OutNewOrderRefund;
import com.goafanti.order.bo.TChangeDunOut;
import com.goafanti.order.bo.TChangeTaskOut;
import com.goafanti.order.bo.TOrderNewBo;

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);

	Pagination<NewOderCahngeListBo> selectOrderChangeList(String userName,Integer  processState,Integer timeType,String startTime,String endTime,
			String depId,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 depId, String salesmanName, Integer complete,String orderNo, String contractNo,Integer type, Integer pageSize,
			Integer pageNo) throws IOException ;



	int addChangeTask(TChangeTask 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);


}
