aiccs-api/src/main/resources/mybatis/mapper/crgs/punish/TbIlcPunInfoQueryMapper.xml

164 lines
7.6 KiB
XML
Raw Normal View History

2025-12-27 16:19:56 +08:00
<?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.crgs.punish.mapper.TbIlcPunInfoQueryMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.chinaweal.aiccs.crgs.punish.entity.TbIlcPunInfoQuery">
<id column="ID" property="id" />
<result column="ZCH" property="zch" />
<result column="UNISCID" property="uniscid" />
<result column="SDSJ" property="sdsj" />
<result column="DSRMC" property="dsrmc" />
<result column="WFXW" property="wfxw" />
<result column="CFYJ" property="cfyj" />
<result column="SPUNCONTENT" property="spuncontent" />
<result column="CZSJ" property="czsj" />
<result column="S_SIGN_DATA" property="sSignData" />
<result column="S_SIGN_CERT" property="sSignCert" />
<result column="CFDJJG" property="cfdjjg" />
<result column="CFJDSJ" property="cfjdsj" />
<result column="XZCFLXFS" property="xzcflxfs" />
<result column="XZCFLXSJ" property="xzcflxsj" />
<result column="GSQX" property="gsqx" />
<result column="PENAM" property="penam" />
<result column="FORFAM" property="forfam" />
<result column="DTUPDATE" property="dtupdate" />
<result column="SCASECODE" property="scasecode" />
<result column="SREALCASECODE" property="srealcasecode" />
<result column="SBOOKCODE" property="sbookcode" />
<result column="SFLAG" property="sflag" />
<result column="UPDATETIME" property="updatetime" />
<result column="SSTATE" property="sstate" />
<result column="SGISTTYPECODE" property="sgisttypecode" />
<result column="SGISTTYPENAME" property="sgisttypename" />
<result column="SPUNTYPECODE" property="spuntypecode" />
<result column="SPUNTYPENAME" property="spuntypename" />
<result column="DSRTYPE" property="dsrtype" />
<result column="SYSTYPE" property="systype" />
<result column="DTCASEDATE" property="dtcasedate" />
<result column="SCHECKTYPE" property="schecktype" />
<result column="SCHECKTYPENAME" property="schecktypename" />
<result column="SPRINCIPAL" property="sprincipal" />
<result column="SPRINCIPALNO" property="sprincipalno" />
</resultMap>
<!--使用视图查询,改用表查询-->
<!-- &lt;!&ndash; 通用查询结果列 &ndash;&gt;-->
<!-- <sql id="Base_Column_List">-->
<!-- ID, ZCH, UNISCID, SDSJ, DSRMC, WFXW, CFYJ, SPUNCONTENT, CZSJ, S_SIGN_DATA, S_SIGN_CERT, CFDJJG, CFJDSJ, XZCFLXFS, XZCFLXSJ, GSQX, PENAM, FORFAM, DTUPDATE, SCASECODE, SREALCASECODE, SBOOKCODE, SFLAG, UPDATETIME, SSTATE, SGISTTYPECODE, SGISTTYPENAME, SPUNTYPECODE, SPUNTYPENAME, DSRTYPE, SYSTYPE, DTCASEDATE, SCHECKTYPE, SCHECKTYPENAME, SPRINCIPAL, SPRINCIPALNO-->
<!-- </sql>-->
<!-- <select id="searchByPage" resultMap="BaseResultMap">-->
<!-- &#45;&#45; 清洗过后的行政处罚试图-->
<!-- select * from V_CASE_PUB_NBASEINFO-->
<!-- <where>-->
<!-- <if test="params.uniscid != null and params.uniscid!= ''">-->
<!-- and uniscid = #{params.uniscid}-->
<!-- </if>-->
<!-- <if test="params.dsrmc != null and params.dsrmc != ''">-->
<!-- and dsrmc like concat('%', #{params.dsrmc}, '%')-->
<!-- </if>-->
<!-- <if test="params.cfdjjg != null and params.cfdjjg != ''">-->
<!-- and cfdjjg = #{params.cfdjjg}-->
<!-- </if>-->
<!-- </where>-->
<!-- </select>-->
<!-- <select id="findById" resultType="com.chinaweal.aiccs.crgs.punish.entity.TbIlcPunInfoQuery">-->
<!-- select * from V_CASE_PUB_NBASEINFO where id = #{id}-->
<!-- </select>-->
<!-- 通用查询结果列 -->
<sql id="As_Base_Column_List">
CASEID as id, REGNO as zch, UNISCID as uniscid, ENTNAME as dsrmc, PENDECNO as sbookcode, ILLEGACTTYPE as sgisttypename, PENAUTH_CN as cfdjjg, PENDECISSDATE as cfjdsj, PENCONTENT as spuncontent
</sql>
<!--使用表查询-->
<select id="searchByPage" resultMap="BaseResultMap">
select
<include refid="As_Base_Column_List"/>
from case_pub_nbaseinfo
where ACTYPE = '1'
<if test="params.region != null and params.region!= '' and params.region!= '市'.toString()">
2026-01-05 21:46:20 +08:00
and PENAUTH like concat(#{params.region}, '%')
2025-12-27 16:19:56 +08:00
</if>
<if test="params.uniscid != null and params.uniscid!= ''">
2026-01-05 21:46:20 +08:00
and (uniscid = #{params.uniscid} or REGNO = #{params.uniscid})
2025-12-27 16:19:56 +08:00
</if>
<if test="params.dsrmc != null and params.dsrmc != ''">
and ENTNAME like concat('%', #{params.dsrmc}, '%')
</if>
<if test="params.cfdjjg != null and params.cfdjjg != ''">
and PENAUTH_CN = #{params.cfdjjg}
</if>
</select>
<select id="findById" resultType="com.chinaweal.aiccs.crgs.punish.entity.TbIlcPunInfoQuery">
select <include refid="As_Base_Column_List"/> from case_pub_nbaseinfo where ACTYPE = '1' and CASEID = #{id}
</select>
2026-04-02 10:36:36 +08:00
<!-- 行政处罚记录UNION查询本省+外省) -->
2026-04-21 14:53:50 +08:00
<select id="searchUnionByPage" resultType="com.chinaweal.aiccs.crgs.punish.entity.TbIlcPunInfoQuery">
2026-04-02 10:36:36 +08:00
(
SELECT
2026-04-21 14:53:50 +08:00
CASEID AS id,
REGNO AS zch,
2026-04-02 10:36:36 +08:00
UNISCID AS uniscid,
2026-04-21 14:53:50 +08:00
ENTNAME AS dsrmc,
PENDECNO AS sbookcode,
ILLEGACTTYPE AS sgisttypename,
PENAUTH_CN AS cfdjjg,
PENDECISSDATE AS cfjdsj,
PENCONTENT AS spuncontent,
2026-04-02 10:36:36 +08:00
PENAM AS penam,
2026-04-21 14:53:50 +08:00
'外省' AS sflag
2026-04-02 10:36:36 +08:00
FROM QG_CASE_PUB_NBASEINFO
WHERE ACTYPE = '1'
<if test="params.uniscid != null and params.uniscid != ''">
AND (UNISCID = #{params.uniscid} OR REGNO = #{params.uniscid})
</if>
<if test="params.entname != null and params.entname != ''">
AND ENTNAME LIKE '%' || #{params.entname} || '%'
</if>
<if test="params.penAuthCn != null and params.penAuthCn != ''">
AND PENAUTH_CN = #{params.penAuthCn}
</if>
<if test="params.penDecNo != null and params.penDecNo != ''">
AND PENDECNO = #{params.penDecNo}
</if>
AND (OPFLAG IS NULL OR OPFLAG != 'D')
)
UNION ALL
(
SELECT
2026-04-21 14:53:50 +08:00
CASEID AS id,
REGNO AS zch,
2026-04-02 10:36:36 +08:00
UNISCID AS uniscid,
2026-04-21 14:53:50 +08:00
ENTNAME AS dsrmc,
PENDECNO AS sbookcode,
ILLEGACTTYPE AS sgisttypename,
PENAUTH_CN AS cfdjjg,
PENDECISSDATE AS cfjdsj,
PENCONTENT AS spuncontent,
2026-04-02 10:36:36 +08:00
PENAM AS penam,
2026-04-21 14:53:50 +08:00
'本省' AS sflag
2026-04-02 10:36:36 +08:00
FROM case_pub_nbaseinfo
WHERE ACTYPE = '1'
<if test="params.region != null and params.region != '' and params.region != '市'.toString()">
AND PENAUTH LIKE concat(#{params.region}, '%')
</if>
<if test="params.uniscid != null and params.uniscid != ''">
2026-04-15 15:30:25 +08:00
AND (UNISCID = #{params.uniscid} OR REGNO = #{params.uniscid})
2026-04-02 10:36:36 +08:00
</if>
<if test="params.entname != null and params.entname != ''">
2026-04-15 15:30:25 +08:00
AND ENTNAME LIKE concat('%', #{params.entname}, '%')
2026-04-02 10:36:36 +08:00
</if>
<if test="params.penAuthCn != null and params.penAuthCn != ''">
2026-04-15 15:30:25 +08:00
AND PENAUTH_CN = #{params.penAuthCn}
2026-04-02 10:36:36 +08:00
</if>
)
</select>
2025-12-27 16:19:56 +08:00
</mapper>