package com.liang.service;

import com.liang.entity.PrjAnnualBudgetRecord;
import com.liang.entity.PrjAnnualbudgetdetail;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

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

/**
 * 年度预算明细(PrjAnnualbudgetdetail)表服务接口
 *
 * @author makejava
 * @since 2023-05-19 21:59:14
 */
public interface PrjAnnualbudgetdetailService {

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

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

    /**
     * 新增数据
     *
     * @param prjAnnualbudgetdetail 实例对象
     * @return 实例对象
     */
    PrjAnnualbudgetdetail insert(PrjAnnualbudgetdetail prjAnnualbudgetdetail);

    /**
     * 修改数据
     *
     * @param prjAnnualbudgetdetail 实例对象
     * @return 实例对象
     */
    int update(PrjAnnualbudgetdetail prjAnnualbudgetdetail);

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

    /**
     * 根据项目任务书插入
     *
     * @return
     */
    int insertBatchByXm(Integer xm, Integer nys);

    /**
     * 获取年度预算列表
     *
     * @return
     */
    List<PrjAnnualbudgetdetail> getBudgetList(Integer nys);

    /**
     * 获取年度预算列表
     *
     * @return
     */
    List<PrjAnnualbudgetdetail> getFysqBudgetList(Integer nys);

    List<PrjAnnualbudgetdetail> getSubNode(Integer nys, Integer page, Integer limit, String mc);

    List<PrjAnnualbudgetdetail> getBz(Map map);
    /**
     * 更新预算
     *
     * @param budgetDetails
     * @return
     */
    int updateBatch(List<PrjAnnualbudgetdetail> budgetDetails);


    Integer getSubNodeCount(@Param("nys") Integer nys, @Param("page") Integer page, @Param("limit") Integer limit);

    List<PrjAnnualbudgetdetail> listAllBudgetDetail(@Param("nys") Integer nys);

    List<PrjAnnualbudgetdetail> getXGJL(int xmid);

    Double getXMZYS(String id);

    int updateXg(List<PrjAnnualBudgetRecord> record);

    List<PrjAnnualbudgetdetail> getSptgZt(Integer id);

    PrjAnnualbudgetdetail getByj(Map map);

    Double getKmXmzys(Integer nys, String fymc);
}
