<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nantian.cloud.jljc.mapper.EnergyCheckMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.nantian.cloud.jljc.entity.EnergyCheck">
        <id column="id" property="id" />
        <result column="name" property="name" />
        <result column="comments" property="comments" />
        <result column="epc" property="epc" />
        <result column="update_time" property="updateTime" />
        <result column="status" property="status" />
        <result column="userid" property="userid" />
        <result column="del_flag" property="delFlag" />
        <result column="dept_id" property="deptId" />
    </resultMap>


    <resultMap id="EnergyCheckVo" type="com.nantian.cloud.jljc.vo.EnergyCheckVo">
        <id column="id" property="id" />
        <result column="name" property="name" />
        <result column="comments" property="comments" />
        <result column="epc" property="epc" />
        <result column="cmp_name" property="cmpName" />
        <result column="update_time" property="updateTime" />
        <result column="status" property="status" />
        <result column="userid" property="userid" />
        <result column="del_flag" property="delFlag" />
        <result column="dept_id" property="deptId" />
    </resultMap>



    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, name, comments, epc, update_time, status,userid,del_flag,dept_id
    </sql>

    <select id="getPageScope" resultType="com.nantian.cloud.jljc.vo.EnergyCheckVo">
		SELECT
         t.id, t.name, t.comments, t.epc,e.cmp_name, t.update_time, t.status,t.userid,t.del_flag ,t.dept_id
		FROM
		t_energy_check t,enterprise_info e
		where
		t.epc=e.enterprise_code
		and
		t.del_flag = "1"
	</select>



</mapper>
