package com.goafanti.order.service;

import com.goafanti.common.bo.Result;
import com.goafanti.common.bo.UserOrderTask;
import com.goafanti.common.model.TOrderTask;
import com.goafanti.common.model.TTaskHours;
import com.goafanti.core.mybatis.page.Pagination;
import com.goafanti.order.bo.*;
import com.goafanti.order.controller.InputTaskStopLog;
import com.goafanti.organization.bo.OutPaymentNode;

import java.util.List;

public interface OrderProjectService {

	/**
	 *
	 * @param taskId 项目ID
	 * @param taskReceiverId 受理人ID
	 * @param type 0管理员派单 1经理转交 2经理派单 3咨询师转交 4回退
	 * @return
	 */
	int updateProjectDistribution(Integer taskId, String taskReceiverId, String remarks,Integer type);

	Pagination<TOrderTaskListBo> orderTaskList(inuptTaskListBo ib);

	TOrderTaskDetailBo orderTaskDetail(Integer id);

	int updateOrderTask(TOrderTaskDetailBo t);

	int addTaskHours(TTaskHours t);

	Pagination<TOrderTaskListBo> taskHoursList(inuptTaskHoursListBo ib,
			Integer pageNo, Integer pageSize);


	Pagination<TOrderTaskListBo>  selectTaskList(String name, String orderNo, String taskId, Integer taskStatus, String adminName,
			Integer specially,String depId  ,String thchId,String typpe, Integer pageNo, Integer pageSize);

	List<TaskLogBo> TaskLogList(Integer id);

	int createTaskProgress(TaskProgressBo t);

	int delectTaskProgress(Integer id);

	List<TaskProgressBo> selectTaskProgress(Integer tid);


	List<TTaskHours> taskHoursDetailsList(String taskId);


	void checkProjiectAllocation(String orderNo);

	int pushSplitProject(Integer tid, String splitList);

	List<TOrderTaskListBo> splitProjectList(Integer tid,Integer type);

	void addNoticAndEmail(OutPaymentNode pn, Integer code);


	List<OutTaskProgressLog> selectTaskProgressLog(Integer tid);

	int updateTaskProgress(TaskProgressBo t);

	Pagination<managerListBo> managerSelect(String name, String orderNo, String contractNo, String cid, String projectType,String thchId, String depId,
			String techDepId, Integer declarationBatch, String commodityPrice, String startTime, String endTime, String type,Integer pageNo, Integer pageSize);

	int updateProjectStatus(UpdateProjectStatusBo b);

	List<taskAttributionLogBo> taskAttributionLog(Integer tid);


	List<UserOrderTask> selectUidByproject(String uid);

	int addProjectCheck(Integer tid);

	Object projectCheckLog(Integer tid);

	Object selectProjectCheck(InputProjectCheck in);


    List<OutHighNewRetrialStatistics> highNewRetrialStatistics(String depId, String startDate, String endDate);

	List<OutHighNewRetrialList> highNewRetrialList(String province, String depId, String aid, Integer sort, String startDate, String endDate);

	Pagination<OutMemberList> memberList(InputMemberList in);

	Result memberListExport(InputMemberList in);

    int updateMemberProject(InputAddTask t);

	int pushExamineMemberProject(InputMenber in);

	void addMemberLog(Integer id,Integer status ,String remarks,String aid);

	List<MemberLogBo> memberLog(Integer id);

	/**
	 *
	 * @return
	 */
	TOrderTask addMemberSonProject(InputSonProject in );

	/**
	 *
	 * @param type 消息类型
	 * @param b  订单信息
	 * @param shiroType  0财务 1特批
	 * @param  result 0审核 1通过
	 */
	void addNoticMember(Integer type,  TOrderNewBo b,Integer shiroType,Integer result);

	int deleteMemberSonProject(Integer id);

	/**
	 *
	 * @param tid 项目编号
	 * @param  processStatus 流程状态 0-已派营销员，1-已派营销员管理员，2-已派财务管理员，3-已派财务专员，4-已派咨询师管理员，5-已部分派咨询师经理，6-已部全部派咨询师经理
	 * @return
	 */
    boolean checkOrderProcessStatus(Integer tid, Integer processStatus);

	/**
	 * 根据订单编号获取项目编号来判断当前订单的流程状态
	 * 仅用于咨询师管理员以后
	 * @param orderNo
	 * @return
	 */
	Integer getOrderProcessStatus(String orderNo);

    void updateMidServiceProject(String orderNo);


    Integer addProjectStop(InputProjectStop in);
	Integer updateProjectStop(InputProjectStop in);

	Pagination<?> selectProjectStop(String orderNo, String userName, String deps, String contractNo, String projectName,
							 Integer status,String startTime,String endTime,String receiverId, Integer shiroType,Integer pageNo, Integer pageSize);

	List<TaskStopLogBo> projectStopList(Integer taskStopId);

	Object pushExamineProjectStop(InputTaskStopLog in);


    Object updateSatisfactionDegree(Integer id, Integer formRetrieve, Integer satisfactionDegree, String satisfactionDegreeUrl);

	Object dispatchTaskLog(Integer id);

    void pushProjectCompleteDate();


	boolean checkMemberType(InputSonProject in);

	Object updateMemberSonProject(InputSonProject in);

	boolean checkMember(InputSonProject in);

	void updateServiceYearBySplitSuper(InputSonProject in );
}
