/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.workengineeringproject.dao;

import com.jeeplus.common.persistence.CrudDao;
import com.jeeplus.common.persistence.annotation.MyBatisDao;
import com.jeeplus.modules.workbidproject.entity.WorkBidProject;
import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
import com.jeeplus.modules.workengineeringproject.entity.WorkEngineeringProject;
import com.jeeplus.modules.workengineeringproject.entity.WorkProjectPlan;
import com.jeeplus.modules.workengineeringproject.entity.WorkProjectPlanEdit;
import com.jeeplus.modules.workproject.entity.WorkProject;

import java.util.List;

/**
 * 工程项目信息DAO接口
 * @author 杨帆
 * @version 2017-10-23
 */
@MyBatisDao
public interface WorkEngineeringProjectDao extends CrudDao<WorkEngineeringProject> {

	 List<WorkContractInfo> findListBycontractId(WorkContractInfo contractId);
	 List<WorkProjectPlan> findProjectPlans(WorkEngineeringProject workEngineeringProject);
	 List<WorkProjectPlanEdit> findProjectPlanEdit(WorkEngineeringProject workEngineeringProject);
	 List<WorkEngineeringProject> findProjectManagementList(WorkEngineeringProject workEngineeringProject);
	 List<WorkBidProject> findListByprojectId(WorkBidProject projectId);

	 int insertPlan(WorkEngineeringProject workEngineeringProject);
	 int deletePlan(WorkEngineeringProject workEngineeringProject);
	 int updateRemakes(WorkEngineeringProject workEngineeringProject);
	 int updateProjectPlan(WorkProjectPlan workProjectPlan);
	/**
	 * 更新流程实例ID
	 * @param workEngineeringProject
	 * @return
	 */
	 int updateProcessInstanceId(WorkEngineeringProject workEngineeringProject);
	/**
	 * 更新流程实例ID
	 * @param workEngineeringProject
	 * @return
	 */
	 int updateProcessInstanceProofreadId(WorkEngineeringProject workEngineeringProject);

	/**
	 * 根据流程实例ID获取Leave
	 * @param processInstanceId
	 * @return
	 */
	WorkEngineeringProject getByProcessInstanceId(String processInstanceId);
	/**
	 * 根据流程实例ID获取Leave
	 * @param processInstanceProofreadId
	 * @return
	 */
	WorkEngineeringProject getByProcessInstanceProofreadId(String processInstanceProofreadId);

	 WorkProjectPlan getProjectPlan(String id);

	//根据总项目外键获取
	public WorkEngineeringProject getByPId(WorkProject workProject);

	public List<WorkEngineeringProject> findListByprojectt(WorkEngineeringProject workEngineeringProject);

	public List<WorkEngineeringProject> findByList(WorkEngineeringProject workEngineeringProject);

}