package com.goafanti.techproject.service;

import java.util.Date;
import java.util.List;

import com.goafanti.common.model.Contract;
import com.goafanti.common.model.ContractTask;
import com.goafanti.common.model.TechProject;
import com.goafanti.common.model.TechProjectLog;
import com.goafanti.core.mybatis.page.Pagination;
import com.goafanti.techproject.bo.ProjectDetailBo;
import com.goafanti.techproject.bo.ProjectListBo;
import com.goafanti.techproject.bo.TaskDetailBo;
import com.goafanti.techproject.bo.TaskListBo;
import com.goafanti.techproject.bo.TechProjectClientListBo;
import com.goafanti.techproject.bo.TechProjectContractListBo;
import com.goafanti.techproject.bo.TechProjectDetailBo;
import com.goafanti.techproject.bo.TechProjectManageListBo;
import com.goafanti.user.bo.OrgUnitNames;

public interface TechProjectService {

	Pagination<TechProjectClientListBo> listClientTechProject(String userId, Integer pNo, Integer pSize);

	int updateTechProject(TechProject t, TechProjectLog l, Date recordTime);

	TechProject saveTechProject(TechProject techProject, String salesman);

	Pagination<TechProjectManageListBo> listManageTechProject(String contractId, Integer province, String unitName, String uid, Integer pNo, Integer pSize);

	TechProjectDetailBo selectProjectDetail(String pid);

	int deleteByPrimaryKey(List<String> id);

	TechProject selectByPrimaryKey(String id);

	List<OrgUnitNames> selectWebsiteUnitNames();

	TechProject insertTechProject(TechProject tp, String aid);

	List<TechProjectContractListBo> listContractTechProjectByContractId(String contractId);

	void batchInsertContractRecord(Contract c);

	/**
	 * 项目管理列表
	 * @param bo
	 * @param depId
	 * @param orderStartTime
	 * @param orderEndTime
	 * @param setUpStartDate
	 * @param setUpEndDate
	 * @return
	 */
	Pagination<ProjectListBo> listProject(ProjectListBo bo, String depId, String orderStartDate,
			String orderEndDate, String setUpStartDate, String setUpEndDate,Integer pageNo,Integer pageSize);


	/**
	 * 查询项目详情
	 * @param contractId
	 * @return
	 */
	ProjectDetailBo selectTechProjectDetail(String contractId,Integer buyerType);

	/**
	 * 项目管理任务列表
	 * @param contractId
	 * @return
	 */
	List<TaskListBo> selectProjectTask(String contractId);



	/**
	 * 查询任务详情
	 * @param taskId
	 * @return
	 */
	TaskDetailBo selectProjectTaskDetail(String taskId);

	/**
	 * 修改任务
	 * @param taskId
	 * @param commodityId
	 * @param commodityMode
	 * @param taskComment
	 * @return
	 */
	int updateProjectTask(ContractTask task);
	
	/**
	 * 项目任务列表
	 * @param projectNo	
	 * @param buyerName
	 * @param taskReceiver
	 * @param startDate
	 * @param endDate
	 * @param taskStatus
	 * @param categoryId
	 * @param deletedSign 
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	Pagination<TaskListBo> selectProjectTask(String projectNo,String buyerName,String taskReceiverId, String taskReceiverName,
			String startDate,String endDate, Integer taskStatus,String categoryId,String deleteSign,String publishStatus, Integer pageNo, Integer pageSize);
	
	/**
	 * 根据任务id查询任务
	 * @param taskId
	 * @return
	 */
	ContractTask selectTaskById(String taskId);


	Pagination<ProjectListBo> salesmanListProject(ProjectListBo bo, String depId, String orderStartDate, String orderEndDate,
			String setUpStartDate, String setUpEndDate, Integer pageNo, Integer pageSize);

	Pagination<TaskListBo> selectMyProjectTask(String projectNo, String buyerName, String taskReceiverId,
			String taskReceiverName, String startDate, String endDate, Integer taskStatus, String categoryId,
			String deleteSign, String publishStatus, Integer pageNo, Integer pageSize);
	
}
