package com.hdkj.lt.bf.service.voltageLimitViolation.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.hdkj.lt.bf.entity.dto.VolPowerCutDTO;
import com.hdkj.lt.bf.mapper.FhzgVoltageLimitViolationPowerCutMapper;
import com.hdkj.lt.bf.service.voltageLimitViolation.FhzgVoltageLimitViolationPowerCutService;
import com.hdkj.lt.core.bizms.modle.po.voltageLimitViolation.FhzgVoltageLimitViolationPowerCut;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author userlrk
 * @description 针对表【fhzg_voltage_limit_violation_power_cut(成片电压越限事件表)】的数据库操作Service实现
 * @createDate 2025-09-24 15:24:11
 */
@Service
public class FhzgVoltageLimitViolationPowerCutServiceImpl extends ServiceImpl<FhzgVoltageLimitViolationPowerCutMapper, FhzgVoltageLimitViolationPowerCut>
        implements FhzgVoltageLimitViolationPowerCutService {

    @Autowired
    private FhzgVoltageLimitViolationPowerCutMapper volPowerCutMapper;

    /**
     * 全口径低电压列表查询接口
     *
     * @param dto
     * @return
     */
    @Override
    public Page<FhzgVoltageLimitViolationPowerCut> getVolPowerCutList(VolPowerCutDTO dto) {
        Page<FhzgVoltageLimitViolationPowerCut> page = new Page<>();
        page.setCurrent(dto.getPageNum());
        page.setSize(dto.getPageSize());
        Page<FhzgVoltageLimitViolationPowerCut> result = new Page<>();
        List<FhzgVoltageLimitViolationPowerCut> list = volPowerCutMapper.getVolPowerCutList(dto);
        result.setRecords(list);
        result.setTotal(list.size());
        return result;
    }
}




