<?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.chinaweal.aiccs.aiccs.nonIocalCirculation.mapper.EOtCaseMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.chinaweal.aiccs.aiccs.nonIocalCirculation.entity.EOtCase">
        <id column="id" property="id" />
        <result column="CASEID" property="caseid" />
        <result column="REGNO" property="regno" />
        <result column="UNISCID" property="uniscid" />
        <result column="ENTNAME" property="entname" />
        <result column="PENDECNO" property="pendecno" />
        <result column="ILLEGACTTYPE" property="illegacttype" />
        <result column="PENTYPE" property="pentype" />
        <result column="PENTYPE_CN" property="pentypeCn" />
        <result column="PENAM" property="penam" />
        <result column="FORFAM" property="forfam" />
        <result column="PENCONTENT" property="pencontent" />
        <result column="JUDAUTH" property="judauth" />
        <result column="PENDECISSDATE" property="pendecissdate" />
        <result column="Remark" property="remark" />
        <result column="PublicDate" property="publicDate" />
        <result column="DATADEPT" property="datadept" />
        <result column="UPLOADPROV" property="uploadprov" />
        <result column="TARGETPROV" property="targetprov" />
        <result column="OPFLAG" property="opflag" />
        <result column="insert_time" property="insertTime" />
        <result column="lastupdate_time" property="lastupdateTime" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, CASEID, REGNO, UNISCID, ENTNAME, PENDECNO, ILLEGACTTYPE, PENTYPE, PENTYPE_CN, PENAM, FORFAM, PENCONTENT, JUDAUTH, PENDECISSDATE, Remark, PublicDate, DATADEPT, UPLOADPROV, TARGETPROV, OPFLAG, insert_time, lastupdate_time
    </sql>

    <select id="queryByUNISCID" parameterType="String" resultMap="BaseResultMap">
        select * from e_ot_case where
  		UNISCID = #{UNISCID} or REGNO = #{UNISCID}
  		order by insert_time desc
    </select>
</mapper>
