package org.jeecg.modules.projectManagement.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.basedata.entity.FdPersonnel;
import org.jeecg.modules.projectManagement.entity.FdProjectQuotation;
import com.baomidou.mybatisplus.extension.service.IService;

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

/**
 * @Description: 项目报价表
 * @author： jeecg-boot
 * @date：   2019-05-20
 * @version： V1.0
 */
public interface IFdProjectQuotationService extends IService<FdProjectQuotation> {

    IPage<FdProjectQuotation> findByPage(Page<FdProjectQuotation> page,QueryWrapper<FdProjectQuotation> queryWrapper);

    public void saveProjectQuotation(FdProjectQuotation fdProjectQuotation);

    //public void saveProjectQuotation1(FdProjectQuotation fdProjectQuotation, FdContract fdContract);

    public void updateQuotation(FdProjectQuotation fdProjectQuotation);

    // public void deleteProjectQuotation(String ids);


    void contractOfFormation(String id);

    Map<String,Object> close(List<String> ids);

    void deleteCompound(String id);


    void deleteContracts(String id);


    Map<String,Object> reviewBatch(@Param("list") List<String> list);

    void copy(String id,String status,String curId);

    FdProjectQuotation export(String id);

    Map<String,Object> auditBatch(List<String> ids);

    List<FdPersonnel> getProjectManagerList();

    List<Map<Object,Object>> getPersonnelByRole(String roleId);

    void managerAudit(FdProjectQuotation fdProjectQuotation);

    List<FdProjectQuotation> totalProportion(Date quotationDate, Date endDate,FdProjectQuotation fdProjectQuotation);

    List<FdProjectQuotation> signed(Date quotationDate,Date endDate,FdProjectQuotation fdProjectQuotation);

    List<FdProjectQuotation> monthlyGrouping(String smallMonth,String largeMonth,FdProjectQuotation fdProjectQuotation);

    boolean judge(String id);

    void supplementaryCopy(FdProjectQuotation fdProjectQuotations);

    List<Map<Object, Object>> getPersonnelByRoleList(List<String> roleIds,String typeName);
    
    /***
     * @Title:删除
            * @Description:TODO
            * @param [fdProjectQuotation]
            * @return void
            * @exception 
            * @author 陈创
            * @date 2019/11/1 13:55
            * @updatehistory:
     *   2019/11/1 13:55 新增
            */
    void deleteProjectQuotation(FdProjectQuotation fdProjectQuotation);

    int updataStatusShared(List<String> list,String status);

    int updateStatusAndPersonnelStatus(List<String> list,String status);

    FdProjectQuotation getQuotationById(String id);

    void reAuditSave(FdProjectQuotation fdProjectQuotation);

    /***
     * @Title:
            * @Description:TODO 关联报价号 修改关联报价号与关联状态
            * @param [fdProjectQuotation]
            * @return void
            * @exception
            * @author 陈创
            * @date 2020/3/6 14:20
            * @updatehistory:
     *   2020/3/6 14:20 新增
            */
    boolean updateRelationCode(FdProjectQuotation fdProjectQuotation);

    /***
     * @Title:
            * @Description:TODO 根据多个项目档案id查询报价id
            * @param [list]
            * @return java.util.List<java.lang.String>
            * @exception
            * @author 陈创
            * @date 2020/4/8 17:21
            * @updatehistory:
     *   2020/4/8 17:21 新增
            */
    List<String> getQuotationIdsByfileIds(List<String> list);

    /***
     * @Title:
            * @Description:TODO 给审核人发送消息通知
            * @param [fdProjectQuotation]
            * @return void
            * @exception
            * @author 陈创
            * @date 2020/4/20 17:22
            * @updatehistory:
     *   2020/4/20 17:22 新增
            */
    void reviewedByMessage(FdProjectQuotation fdProjectQuotation);

    IPage<FdProjectQuotation> getReportPage(Page<FdProjectQuotation> page,QueryWrapper<FdProjectQuotation> queryWrapper);

    /**
    * @Author chenchuang
    * @Description //TODO 根据报价信息修改最终申办方
    * @Date 2020/8/14 17:33
    * @Param [fdProjectQuotation]
    * @return void
    */
    void updateSponsorName(FdProjectQuotation fdProjectQuotation);

}
