package com.njcn.process.mapper;

import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.process.pojo.po.RStatElectricQualityProblemLogPO;
import com.njcn.process.pojo.vo.RStatElectricQualityProblemLogVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 
 * Description:
 * 接口文档访问地址：http://serverIP:port/swagger-ui.html
 * Date: 2023/2/22  18:59【需求编号】
 *
 * @author clam
 * @version V1.0.0
 */
public interface RStatElectricQualityProblemLogMapper extends MppBaseMapper<RStatElectricQualityProblemLogPO> {
    @Select ("SELECT\n" +
            "\tb.power_quality_problem_no,\n" +
            "\ta.org_no org_name,\n" +
            "b.data_date,\n" +
            "b.checker,\n" +
            "b.description,\n" +
            "b.report_process,\n" +
            "b.report_process_content,\n" +
            "b.type\n" +
            "FROM\n" +
            "\tr_stat_electric_quality_problem_flow a,\n" +
            "\tr_stat_electric_quality_problem_log b\n" +
            "WHERE\n" +
            "\ta.power_quality_problem_no = b.power_quality_problem_no\n" +
            "AND b.power_quality_problem_no = #{powerQualityProblemNo}")
    List<RStatElectricQualityProblemLogVO> selectByProblemNo(@Param ("powerQualityProblemNo") String powerQualityProblemNo);
}