<?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.business.qcck.mapper.DataCrkywCkrmdjDefaultMapper">

        <!-- 通用查询映射结果 -->
        <resultMap id="BaseResultMap" type="com.unis.crk.business.qcck.entity.DataCrkywCkrmdjDefault">
            <id column="DataID" property="DataID" />
            <result column="UnitID" property="UnitID" />
            <result column="PeriodID" property="PeriodID" />
            <result column="RoundID" property="RoundID" />
            <result column="builder" property="builder" />
            <result column="UPDATE_TIME" property="updateTime" />
            <result column="SytelInfoID" property="SytelInfoID" />
            <result column="BuildDate" property="BuildDate" />
            <result column="editor" property="editor" />
            <result column="ModifyDate" property="ModifyDate" />
            <result column="DeptID" property="DeptID" />
            <result column="BizNo" property="bizNo" />
            <result column="PreOrder" property="PreOrder" />
            <result column="ShowOrder" property="ShowOrder" />
            <result column="rmsj" property="rmsj" />
            <result column="tzdID" property="tzdID" />
            <result column="mlrxm" property="mlrxm" />
            <result column="cllx" property="cllx" />
            <result column="cph" property="cph" />
            <result column="gch" property="gch" />
            <result column="sswp" property="sswp" />
            <result column="cyrdz" property="cyrdz" />
            <result column="cyrdh" property="cyrdh" />
            <result column="djr" property="djr" />
            <result column="sycksl" property="sycksl" />
            <result column="jhcksl" property="jhcksl" />
            <result column="chID" property="chID" />
            <result column="lspz" property="lspz" />
            <result column="mxpz" property="mxpz" />
            <result column="ywlx" property="ywlx" />
            <result column="chbh" property="chbh" />
            <result column="htID" property="htID" />
            <result column="jhdID" property="jhdID" />
            <result column="hwID" property="hwID" />
            <result column="hwbh" property="hwbh" />
            <result column="tzdbh" property="tzdbh" />
            <result column="htbh" property="htbh" />
            <result column="jhdbh" property="jhdbh" />
            <result column="cyr" property="cyr" />
            <result column="cyrsfzh" property="cyrsfzh" />
            <result column="djsj" property="djsj" />
            <result column="thdh" property="thdh" />
            <result column="glhcph" property="glhcph" />
            <result column="fyz" property="fyz" />
            <result column="zt" property="zt" />
            <result column="hw" property="hw" />
            <result column="kfmc" property="kfmc" />
            <result column="rmdh" property="rmdh" />
            <result column="xzjs" property="xzjs" />
            <result column="thjs" property="thjs" />
            <result column="ggxh" property="ggxh" />
            <result column="djzl" property="djzl" />
            <result column="slrsfzh" property="slrsfzh" />
            <result column="slrdz" property="slrdz" />
            <result column="slr" property="slr" />
            <result column="slrdh" property="slrdh" />
            <result column="ckywlx" property="ckywlx" />
            <result column="jhfl" property="jhfl" />
            <result column="tzdcbid" property="tzdcbid" />
            <result column="lyxz" property="lyxz" />
            <result column="rcsj" property="rcsj" />
            <result column="lydj" property="lydj" />
            <result column="cydw" property="cydw" />
            <result column="shdw" property="shdw" />
            <result column="cchlx" property="cchlx" />
            <result column="scnf" property="scnf" />
            <result column="cd" property="cd" />
        </resultMap>

    <select id="getOne" resultType="java.util.Map">
        SELECT
        a.djr AS "djr",
        a.sycksl AS "sycksl",
        a.cyrdh AS "cyrdh",
        a.ckywlx AS "ckywlx",
        a.tzdcbid AS "tzdcbid",
        a.lyxz AS "lyxz",
        a.jhdID AS "jhdID",
        a.cydw AS "cydw",
        a.cyrdz AS "cyrdz",
        a.cph AS "cph",
        a.chID AS "chID",
        a.rmsj AS "rmsj",
        a.jhfl AS "jhfl",
        a.htbh AS "htbh",
        a.htID AS "htID",
        a.tzdID AS "tzdID",
        a.jhdbh AS "jhdbh",
        a.tzdbh AS "tzdbh",
        a.cllx AS "cllx",
        a.jhcksl AS "jhcksl",
        a.slrsfzh AS "slrsfzh",
        a.slr AS "slr",
        a.lspz AS "lspz",
        a.rcsj AS "rcsj",
        a.cchlx AS "cchlx",
        a.cyr AS "cyr",
        a.mxpz AS "mxpz",
        a.slrdh AS "slrdh",
        a.cyrsfzh AS "cyrsfzh",
        a.BizNo AS "BizNo",
        a.shdw AS "shdw",
        a.slrdz AS "slrdz",
        a.lydj AS "lydj",
        a.DataID AS "dataID"
        FROM
        DATA_CRKYW_CKRMDJ_DEFAULT a
        <where>
            <if test='id != null and id != ""'>
                 a.DataID = #{id}
            </if>
            <if test='bizNo != null and bizNo != ""'>
                and a.bizNo = #{bizNo}
            </if>
        </where>
    </select>
    <select id="selectMyMapsPage" resultType="java.util.Map">
        SELECT DISTINCT
        a.ModifyDate AS "ModifyDate",
        a.cyrdh AS "cyrdh",
        a.slr AS "slr",
        a.lspz AS "lspz",
        b_2.enumName AS "lspz_value",
        a.BizNo AS "BizNo",
        a.cph AS "cph",
        a.cydw AS "cydw",
        a.cyr AS "cyr",
        a.rmsj AS "rmsj",
        a.djr AS "djr",
        a.DataID AS DataID
        FROM
        DATA_CRKYW_CKRMDJ_DEFAULT a
        LEFT JOIN basic_enum b_2 ON a.lspz = b_2.enumId
        WHERE
        ifnull(
        a.SytelInfoID,
        ''
        ) = '4028814763a546b20163aab53ee8001a'
        AND a.PeriodID = '11'
        AND a.RoundId = 0
        <if test="ew.sqlSegment != null and ew.sqlSegment != ''">
            and  ${ew.sqlSegment}
        </if>
    </select>
</mapper>