package com.yeejoin.amos.boot.module.jg.api.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationReformDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationReform;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

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

/**
 * 改造变更登记 Mapper 接口
 *
 * @author system_generator
 * @date 2023-12-20
 */
public interface JgChangeRegistrationReformMapper extends BaseMapper<JgChangeRegistrationReform> {
    Page<Map<String, Object>> getListPage(@Param("page")Page<Map<String, Object>> page,
                                          @Param("sort") SortVo sortMap,
                                          @Param("dto") JgChangeRegistrationReformDto dto ,
                                          @Param("roleIds") List<String> roleIds,
                                          @Param("currentUserId")String currentUserId);

    Map<String, Object> getDetail(@Param("id")String id);

    Map<String, Object> getInspectDetail(@Param("id")String id);

    Map<String, Object> getUseDetail(@Param("id")String id);

    Page<Map<String, Object>> getEquipListPage(@Param("page")Page<Map<String, Object>> page,@Param("factoryNum") String factoryNum,@Param("equList")String equList,@Param("equCategory")String equCategory);

    void updatePromoter(@Param("id")Long id);

    @Select("select name from tz_equipment_category  where code=#{code}")
    String getEquiplistNameByEquiplist(String code);

    List<Map<String, Object>> getDetailById(@Param("id") Long id);

    List<CompanyEquipCountDto> queryForFlowingEquipList();
}
