<?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.unis.crk.cplbusiness.mapper.DataKcglCplqckcDefaultMapper">

        <!-- 通用查询映射结果 -->
        <resultMap id="BaseResultMap" type="com.unis.crk.cplbusiness.entity.DataKcglCplqckcDefault">
                    <id column="dataId" property="dataId" />
                    <result column="unitid" property="unitid" />
                    <result column="zdmc" property="zdmc" />
                    <result column="zdbm" property="zdbm" />
                    <result column="ch" property="ch" />
                    <result column="hwh" property="hwh" />
                    <result column="chmc" property="chmc" />
                    <result column="hwmc" property="hwmc" />
                    <result column="builder" property="builder" />
                    <result column="cjsj" property="cjsj" />
                    <result column="editor" property="editor" />
                    <result column="modifyDate" property="modifyDate" />
                    <result column="updateTime" property="updateTime" />
                    <result column="scrq" property="scrq" />
                    <result column="bzq" property="bzq" />
                    <result column="xz" property="xz" />
                    <result column="deptId" property="deptId" />
                    <result column="sjjlpzmc" property="sjjlpzmc" />
                    <result column="sjjlpzbh" property="sjjlpzbh" />
                    <result column="sjjlppmc" property="sjjlppmc" />
                    <result column="sjjlppbh" property="sjjlppbh" />
                    <result column="sjjldjbh" property="sjjldjbh" />
                    <result column="sjjldjmc" property="sjjldjmc" />
                    <result column="sjjlspmc" property="sjjlspmc" />
                    <result column="sjjlspmcbh" property="sjjlspmcbh" />
                    <result column="qcbh" property="qcbh" />
                    <result column="gysbh" property="gysbh" />
                    <result column="gys" property="gys" />
                    <result column="cd" property="cd" />
                    <result column="scnf" property="scnf" />
                    <result column="gg" property="gg" />
                    <result column="jldw" property="jldw" />
                    <result column="jldwmc" property="jldwmc" />
                    <result column="scpc" property="scpc" />
                    <result column="js" property="js" />
                    <result column="kcsl" property="kcsl" />
                    <result column="dj" property="dj" />
                    <result column="rq" property="rq" />
                    <result column="bz" property="bz" />
                    <result column="isstaging" property="isstaging" />
        </resultMap>

    <select id="selectMyMapsPage" resultType="java.util.Map">
        SELECT a.dataId,
               a.qcbh,
               a.rq,
               a.scrq,
               a.gg,
               a.jldw,
               a.kcsl,
               a.scpc,
               a.sjjlppbh,
               sjjlppmc_enum.enumName as sjjlppmc,
               a.sjjlpzbh,
               sjjlpzmc_enum.enumName as sjjlpzmc,
               a.sjjlspmcbh,
               sjjlspmc_enum.sjjlspmc as sjjlspmc,
               a.sjjldjbh,
               sjjldjmc_enum.enumName as sjjldjmc,
               jldwmc_enum.enumName as jldwmc
               FROM  data_kcgl_cplqckc_default a
        LEFT JOIN basic_enum sjjlppmc_enum ON sjjlppmc_enum.enumId = a.sjjlppbh
        LEFT JOIN basic_enum sjjlpzmc_enum ON sjjlpzmc_enum.enumId = a.sjjlpzbh
        LEFT JOIN data_crkyw_cplsp_default sjjlspmc_enum ON sjjlspmc_enum.sjjlspmcbh = a.sjjlspmcbh
        and  sjjlspmc_enum.unitId = a.unitId
        LEFT JOIN basic_enum sjjldjmc_enum ON sjjldjmc_enum.enumId = a.sjjldjbh
        LEFT JOIN basic_enum jldwmc_enum ON jldwmc_enum.enumId = a.jldw
        <if test="ew.sqlSegment != null and ew.sqlSegment != ''">
            where  ${ew.sqlSegment}
        </if>
    </select>
</mapper>
