package com.hs.api.mapper;

import com.hs.api.model.SerProjValue;
import com.hs.api.model.respmodel.SerProjValueResp;
import com.hs.api.model.respmodel.Summary;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface SerProjValueMapper {
    int deleteByPrimaryKey(BigDecimal id);

    int insert(SerProjValue record);

    SerProjValue selectByPrimaryKey(BigDecimal id);

    List<SerProjValue> selectAll();

    int updateByPrimaryKey(SerProjValue record);

    List<SerProjValueResp> selectValue(@Param("projType") Integer projType,
                                       @Param("typeState") Integer typeState,
                                       @Param("exponentId") Integer exponentId,
                                       @Param("dept") String dept, @Param("date") Integer date,
                                       @Param("budgetType") Integer budgetType, @Param("hosCode") String hosCode);

    int deleteByDeptWithDate(@Param("dept") String dept, @Param("date") BigDecimal date,
                             @Param("projType") Integer projType, @Param("orgCode") String orgCode);

    int insertToHistory(@Param("dept") String dept, @Param("date") BigDecimal date,
                        @Param("projType") Integer projType, @Param("orgCode") String orgCode);

    void updateValue(@Param("date") BigDecimal date, @Param("hosCode") String hosCode);

    List<Summary> selectSummary(@Param("date") Integer date, @Param("hosCode") String hosCode);
}