<?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.CcFactorMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.nantian.cloud.jljc.entity.CcFactor">
        <id column="id" property="id" />
        <result column="energy_id" property="energyId" />
        <result column="hot_value" property="hotValue" />
        <result column="hot_value_unit" property="hotValueUnit" />
        <result column="cc_value" property="ccValue" />
        <result column="cc_value_unit" property="ccValueUnit" />
        <result column="ofs" property="ofs" />
        <result column="userid" property="userid"/>
        <result column="update_time" property="updateTime"/>
        <result column="del_flag" property="delFlag"/>
        <result column="dept_id" property="deptId"/>
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id,energy_id,hot_value,hot_value_unit,cc_value,cc_value_unit,ofs,userid, update_time, del_flag, dept_id
    </sql>

    <select id="getFactors" resultType="com.nantian.cloud.jljc.vo.CcFactorVo">
        select
            t.id,t.energy_id,e.energy_name,t.hot_value,t.hot_value_unit,t.cc_value,t.cc_value_unit,t.ofs,
            t.userid, t.update_time, t.del_flag
        from t_cc_factor t,energy_info e
        where
        t.energy_id=e.id and t.del_flag = "1"
    </select>

</mapper>
