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.JgChangeRegistrationNameDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationName;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
import org.apache.ibatis.annotations.Param;

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

/**
 * 更名变更登记 Mapper 接口
 *
 * @author system_generator
 * @date 2023-12-25
 */
public interface JgChangeRegistrationNameMapper extends BaseMapper<JgChangeRegistrationName> {

    List<Map<String, Object>> getEquipInfoByOrgCode(@Param("code") String code);

    void deleteByChangeRegistrationId(@Param("changeRegistrationId") Long changeRegistrationId);

    void deleteHistoryInfoById(@Param("code") String code);

    Page<Map<String, Object>> getListPage(@Param("page") Page<Map<String, Object>> page,
                                          @Param("sort") SortVo sortMap,
                                          @Param("dto") JgChangeRegistrationNameDto dto,
                                          @Param("roleIds") List<String> roleIds,
                                          @Param("companyCode") String companyCode,
                                          @Param("currentUserId") String exeUserId);

    List<CompanyEquipCountDto> queryForFlowingEquipList();
}
