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

import com.jeeplus.common.persistence.CrudDao;
import com.jeeplus.common.persistence.annotation.MyBatisDao;
import com.jeeplus.modules.workclientinfo.entity.WorkClientInfo;
import com.jeeplus.modules.workcontractinfo.entity.WorkContractAnnex;
import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
import org.apache.ibatis.annotations.Param;

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

/**
 * 合同管理DAO接口
 *
 * @author 丁旭
 * @version 2017-03-21
 */
@MyBatisDao
public interface WorkContractInfoDao extends CrudDao<WorkContractInfo> {

    public List<WorkClientInfo> findListByclient(WorkClientInfo client);
    public List<WorkContractInfo> findLists(WorkContractInfo workContractInfo);
    public int updateProcessInstanceId(WorkContractInfo workContractInfo);
    public int updatealterProcessInstanceId(WorkContractInfo workContractInfo);
    public WorkContractInfo getByProcessInstanceId(String processInstanceId);

    public List<WorkContractInfo> findWaitAndFinishList(Map<Object, Object> map);

    public void inertContractManger(List<WorkContractAnnex> workContractAnnex);

    public WorkClientInfo getClientInfoByClientId(String id);
    public WorkContractInfo getByBeforeId(String alterBeforeId);

    public void deleteFile(String id);
    public int saveContractPrice(WorkContractInfo workContractInfo);
    public List<WorkContractInfo> findByList(WorkContractInfo workContractInfo);

    int updateInvalidateProcessInstanceId(WorkContractInfo workContractInfo);

    int updateInvalidateStatusAndUser(WorkContractInfo workContractInfo);

    WorkContractInfo getByInvalidateProcessInstanceId(String invalidateProcessInstanceId);

    public int findByReport(@Param("id")String id);

    public void updateId(@Param("id")String id ,@Param("beforeId")String beforeId);

    public void updateBeforeId(@Param("id")String id ,@Param("beforeId")String beforeId);

    public List<WorkContractInfo> ifindList(WorkContractInfo workContractInfo);

    public List<WorkContractInfo> afindList(WorkContractInfo workContractInfo);
    //调整调合同
    public List<WorkContractInfo> findListReceipts(WorkContractInfo workContractInfo);
    //月计划管理查询本部门已签未完成的合同
    public List<WorkContractInfo> findWorkContractInfoPage(WorkContractInfo workContractInfo);

    int countByOffice(String officeId);

    int updateStatus(WorkContractInfo workContractInfo);
}