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

import com.jeeplus.common.persistence.CrudDao;
import com.jeeplus.common.persistence.annotation.MyBatisDao;
import com.jeeplus.modules.sys.entity.Workattachment;
import com.jeeplus.modules.workbidingdocument.entity.WorkBidingDocument;
import com.jeeplus.modules.workbidproject.entity.WorkBidProject;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 标书DAO接口
 * @author fgy
 * @version 2017-10-16
 */
@MyBatisDao
public interface WorkBidingDocumentDao extends CrudDao<WorkBidingDocument> {

	List<WorkBidProject> findListByworkBidProject(WorkBidProject workBidProject);

    List<WorkBidingDocument> findlistWithWorkBidProject(WorkBidingDocument workBidingDocument);

    WorkBidingDocument get(String id);

    //根据投标项目id查询标书
    WorkBidingDocument getByWorkBidProject(String id);

    //单个更改投标项目负责人
    void updateMasterOfWorkBidProject(@Param("workBidProjectId") String workBidProjectId, @Param("projectMaster") String projectMaster);

    //删除原有记录，work_project_user中master对应关系
    int deleteProjectMasterOfWorkProjectUser(@Param("workBidProjectId") String workBidProjectId);
    //插入最新，work_project_user中master对应关系
    int insertProjectMasterOfWorkProjectUser(Map<String,Object> map);

    //修改work_bid_project的负责人和成员
    int updateMasterAndMemberOfWorkBidProject(WorkBidProject workBidProject);

    //项目组成员
    int updateMemberOfWorkBidProject(@Param("workBidProjectId") String workBidProjectId, @Param("projectMember") String projectMember);

    int deleteProjectMemberOfWorkProjectUser(@Param("workBidProjectId") String workBidProjectId);

    int insertProjectMemberOfWorkProjectUser(Map<String, Object> map);

    List<Workattachment> getListOfAttachment(String attachmentId);

    int updateProcessInstanceId(WorkBidingDocument workBidingDocument);

    WorkBidingDocument getByProcessInstanceId(String processInstanceId);

    //标书维护列表
    List<WorkBidingDocument> findMaintainlistWithWorkBidProject(WorkBidingDocument workBidingDocument);

    //确认定投标
    List<WorkBidingDocument> findConfirmlistWithWorkBidProject(WorkBidingDocument workBidingDocument);

    //确认定投标
    void updateBidStatus(WorkBidingDocument workBidingDocument);

    //更新送标员
    int updateSender(Map<String, String> map);

    //更新审核状态
    void updateStatus(WorkBidingDocument workBidingDocument);
}