package com.njcn.process.mapper;

import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import com.njcn.process.pojo.param.SurveyPlanQuestionQueryParm;
import com.njcn.process.pojo.po.RGeneralSurveyPlanDetail;
import com.njcn.process.pojo.vo.RGeneralSurveyPlanDetailOnQuestionVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *
 * Description:
 * 接口文档访问地址：http://serverIP:port/swagger-ui.html
 * Date: 2022/11/11  11:28【需求编号】
 *
 * @author clam
 * @version V1.0.0
 */
public interface RGeneralSurveyPlanDetailMapper extends MppBaseMapper<RGeneralSurveyPlanDetail> {
//    @Select ({"<script>",
//            "SELECT\n" +
//            "\ta.plan_name as planName,\n" +
//            "\tb.voltage_level as voltageLevel,\n" +
//            "\tb.sub_id as subId,\n" +
//            "\tb.sub_name as subName,\n" +
//            "\tb.busbar_id as busbarId,\n" +
//            "\tb.busbar_name as busbarName, b.measurement_point_id as measurementPointId\n" +
//            "FROM\n" +
//            "\tr_general_survey_plan a\n" +
//            "INNER JOIN r_general_survey_plan_detail b ON a.plan_no = b.plan_no\n" +
//            "WHERE b.is_problem=1 and\n" +
//            "\ta.org_no = #{questionQueryParm.orgNo} " +
//                    "<when test='questionQueryParm.planName!=null and questionQueryParm.planName!=\"\"'>",
//        "and a.plan_name = #{questionQueryParm.planName}\n" +
//        "</when>",
//        "AND DATE_FORMAT(a.upload_time, '%Y%m') = DATE_FORMAT(#{questionQueryParm.planStartTime}, '%Y%m')",
//        "</script>"})
        List<RGeneralSurveyPlanDetailOnQuestionVO> querySurveyPlanOnQuestion(@Param("questionQueryParm") SurveyPlanQuestionQueryParm questionQueryParm,@Param("deptIdList") List<String> deptIdList);
}