package com.bonus.material.toolLedger.mapper;

import com.bonus.material.device.domain.vo.DevInfoPropertyVo;
import com.bonus.material.toolLedger.domain.ToolLedgerAllEntity;
import com.bonus.material.toolLedger.domain.ToolLedgerEntity;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ToolLedgerMapper {
    /**
     * 工具台账表格
     *
     * @param entity 实体
     * @return 表格
     */
    List<ToolLedgerAllEntity> list(ToolLedgerAllEntity entity);


    /**
     * 工具台账表格
     *
     * @param entity 实体
     * @return 表格
     */
    List<ToolLedgerEntity> listCode(ToolLedgerEntity entity);

    /**
     * 新增台账
     *
     * @param entity 实体
     * @return 条数
     */
    Integer add(ToolLedgerEntity entity);

    String getCode();

    ToolLedgerEntity getByType(@Param("typeId") Long typeId, @Param("companyId") Long companyId);

    Integer updateByTypeAndId(ToolLedgerEntity entity);

    List<DevInfoPropertyVo> getProperties(Long toolId);

    Integer updateById(ToolLedgerEntity entity);

    void delProperties(Long toolId);

    Integer insertDevInfoProperties(@Param("list") List<DevInfoPropertyVo> item, @Param("toolId") Long toolId);

    List<ToolLedgerEntity> getToolByTypeId(ToolLedgerEntity entity);

    List<ToolLedgerEntity> getToolByPro(ToolLedgerEntity entity);

    List<ToolLedgerEntity> getToolByOrder(ToolLedgerEntity entity);
}
