package com.liang.service;

import com.liang.entity.PrjAnnualbudgetdetail;
import com.liang.entity.PrjProject;
import com.liang.entity.StaBudgetapproval;
import com.liang.entity.StaReimbursement;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

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

/**
 * (StaBudgetapproval)表服务接口
 *
 * @author makejava
 * @since 2023-04-14 10:55:01
 */
public interface StaBudgetapprovalService {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    StaBudgetapproval queryById(Integer id);

    /**
     * 分页查询
     *
     * @param staBudgetapproval 筛选条件
     * @param pageRequest      分页对象
     * @return 查询结果
     */
    Page<StaBudgetapproval> queryByPage(StaBudgetapproval staBudgetapproval, PageRequest pageRequest);

    /**
     * 新增数据
     *
     * @param staBudgetapproval 实例对象
     * @return 实例对象
     */
    int insert(StaBudgetapproval staBudgetapproval);
    int insertImprest(StaBudgetapproval staBudgetapproval);
    /**
     * 修改基础数据
     *
     * @param staBudgetapproval 实例对象
     * @return 实例对象
     */
    int update(StaBudgetapproval staBudgetapproval);

    int updatebmbg(StaBudgetapproval staBudgetapproval);
    int updateImprest(StaBudgetapproval staBudgetapproval);
    int ImprestConnect(StaBudgetapproval staBudgetapproval);

    /**
     * 修改审批状态
     *
     * @param staBudgetapproval 实例对象
     * @return 实例对象
     */

    int updateSpzt(StaBudgetapproval staBudgetapproval);
    /**
     * 新增数据（基本信息）
     *
     * @param  staBudgetapproval 实例对象
     * @return 影响行数
     */
    int tjrevokeApprove(StaBudgetapproval staBudgetapproval);

    /**
     * 更新是否报账
     * @param idList
     * @return
     */
    int clearReimburse(List<Integer> idList);

    /**
     * 更新报账数据
     *
     * @param staBudgetapproval 实例对象
     * @return 实例对象
     */
    int updateReimburse(StaBudgetapproval staBudgetapproval);

    /**
     * 修改其它数据
     *
     * @param staBudgetapproval 实例对象
     * @return 实例对象
     */
    int updateOthers(StaBudgetapproval staBudgetapproval);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(Integer id);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteApplyById(Integer id);

    /**
     * 批量删除费用申请
     * @param idList
     * @return
     */
    int batchDeleteApply(List<Integer> idList);

    /**
     * 获取费用申请列表
     * @return
     */
    List<StaBudgetapproval> getFysqList(Map map);

    /**
     * 获取费用申请
     * @param id
     * @return
     */
    StaBudgetapproval getFysqById(Integer id);
    /**
     * 获取已报账费用申请列表
     * @return
     */
    List<StaBudgetapproval> getYbzFysqList(Map map);

    /**
     * 获取备用金申请列表
     * @return
     */
    List<StaBudgetapproval> getByjsqList(Map map);

    /**
     * 获取全部申请列表（审批完成）
     * @return
     */
    List<StaBudgetapproval> getAllApplyList(Map map);

    /**
     * 获取审批中的申请列表
     * @return
     */
    List<StaBudgetapproval> getApprovingList(Map map);

    /**
     * 获取年份列表
     * @return
     */
    List<String> getYearList();

    /**
     * 批量作废费用申请
     * @param idList
     * @return
     */
    int batchNullify(List<Integer> idList);
    /**
     * 获取费用管理列表
     * @return
     */
    List<StaBudgetapproval> queryByBH(String bh);

    /**
     * 项目总体费用信息
     * @param nys
     * @return
     */
    StaBudgetapproval getXmFyInfo(Integer nys);

    /**
     * 项目分项费用信息
     * @param map
     * @return
     */
    StaBudgetapproval getKmFyInfo(Map map);


    /**
     * 未关联项目备用金
     * @return
     */
    List<StaBudgetapproval>unassociated(Map Map);

    /**
     * 项目备用金信息
     * @param nys
     * @return
     */
    StaBudgetapproval getByjInfo(Integer nys);

    String getBhById(String id);
    StaBudgetapproval getBayID(Integer ID);


    List<String> getXmlx();

    StaBudgetapproval getSqje(Map map);

    void updateSfbz(Integer fysq);

    StaBudgetapproval getId(Integer id);

    StaBudgetapproval getZbjje(Integer nys,Integer fylb);


    StaBudgetapproval getSqjes(Integer nys);


    /**
     * 获取小项费用申请总金额 （不包含备用金）
     */
    StaBudgetapproval getSqfyze(Map map);

    /**
     * 获取小项费用申请 备用总额
     */

    StaBudgetapproval getByjze (Map map);

    /**
     * 获取当前项目类型使用金额
     * @param map
     * @return
     */
    StaBudgetapproval getFyzz (Map map);


    // 获取备用金
    PrjAnnualbudgetdetail getByjzje(Map map);

    // 获取申请额
    StaBudgetapproval getSqe (Map map);


    List<StaBudgetapproval>getFylb(Map map);
}
