JudicialCasesStatisticsMapper.xml 14.8 KB
<?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.lhcredit.project.business.judicialCasesStatistics.mapper.JudicialCasesStatisticsMapper">
    
    <resultMap type="JudicialCasesStatistics" id="JudicialCasesStatisticsResult">
        <result property="id"    column="id"    />
        <result property="caseType"    column="caseType"    />
        <result property="caseTypeStr"    column="caseTypeStr"    />
        <result property="oneyear"    column="oneyear"    />
        <result property="onetothreeyear"    column="onetothreeyear"    />
        <result property="threetofiveyear"    column="threetofiveyear"    />
        <result property="fiveyear"    column="fiveyear"    />
        <result property="countTotal"    column="countTotal"    />
        <result property="countJieTotal"    column="countJieTotal"    />
        <result property="countWeiTotal"    column="countWeiTotal"    />
        <result property="countYuangao"    column="countYuangao"    />
        <result property="countJieYuangao"    column="countJieYuangao"    />
        <result property="countWeiYuangao"    column="countWeiYuangao"    />
        <result property="countBeigao"    column="countBeigao"    />
        <result property="countJieBeigao"    column="countJieBeigao"    />
        <result property="countWeiBeigao"    column="countWeiBeigao"    />
        <result property="countJieOther"    column="countJieOther"    />
        <result property="countWeiOther"    column="countWeiOther"    />
        <result property="sstotal"    column="sstotal"    />
        <result property="ssyja"    column="ssyja"    />
        <result property="sswja"    column="sswja"    />
        <result property="ygyjass"    column="ygyjass"    />
        <result property="ygyjabs"    column="ygyjabs"    />
        <result property="ygyjawz"    column="ygyjawz"    />
        <result property="ygwja"    column="ygwja"    />
        <result property="bgyjass"    column="bgyjass"    />
        <result property="bgyjabs"    column="bgyjabs"    />
        <result property="bgyjawz"    column="bgyjawz"    />
        <result property="bgwja"    column="bgwja"    />
        <result property="dsryjass"    column="dsryjass"    />
        <result property="dsryjabs"    column="dsryjabs"    />
        <result property="dsryjawz"    column="dsryjawz"    />
        <result property="dsrwja"    column="dsrwja"    />
        <result property="paramsdata"    column="paramsdata"    />
        <result property="reportId"    column="report_id"    />
        <result property="dataStatus"    column="dataStatus"    />
        <result property="ename"    column="ename"    />
        <result property="lastUpdateTime"    column="lastUpdateTime"    />
        <result property="cgId"    column="cg_id"    />
    </resultMap>
	
	<sql id="selectJudicialCasesStatisticsVo">
        select id, caseType, caseTypeStr, oneyear, onetothreeyear, threetofiveyear, fiveyear, countTotal, countJieTotal, countWeiTotal, countYuangao, countJieYuangao, countWeiYuangao, countBeigao, countJieBeigao, countWeiBeigao, countJieOther, countWeiOther, sstotal, ssyja, sswja, ygyjass, ygyjabs, ygyjawz, ygwja, bgyjass, bgyjabs, bgyjawz, bgwja, dsryjass, dsryjabs, dsryjawz, dsrwja, paramsdata, report_id, dataStatus, ename, lastUpdateTime, cg_id from judicial_cases_statistics
    </sql>
	
    <select id="selectJudicialCasesStatisticsList" parameterType="JudicialCasesStatistics" resultMap="JudicialCasesStatisticsResult">
        <include refid="selectJudicialCasesStatisticsVo"/>
        <where>  
            <if test="id != null "> and id = #{id}</if>
            <if test="caseType != null "> and caseType = #{caseType}</if>
            <if test="caseTypeStr != null  and caseTypeStr != '' "> and caseTypeStr = #{caseTypeStr}</if>
            <if test="oneyear != null "> and oneyear = #{oneyear}</if>
            <if test="onetothreeyear != null "> and onetothreeyear = #{onetothreeyear}</if>
            <if test="threetofiveyear != null "> and threetofiveyear = #{threetofiveyear}</if>
            <if test="fiveyear != null "> and fiveyear = #{fiveyear}</if>
            <if test="countTotal != null "> and countTotal = #{countTotal}</if>
            <if test="countJieTotal != null "> and countJieTotal = #{countJieTotal}</if>
            <if test="countWeiTotal != null "> and countWeiTotal = #{countWeiTotal}</if>
            <if test="countYuangao != null "> and countYuangao = #{countYuangao}</if>
            <if test="countJieYuangao != null "> and countJieYuangao = #{countJieYuangao}</if>
            <if test="countWeiYuangao != null "> and countWeiYuangao = #{countWeiYuangao}</if>
            <if test="countBeigao != null "> and countBeigao = #{countBeigao}</if>
            <if test="countJieBeigao != null "> and countJieBeigao = #{countJieBeigao}</if>
            <if test="countWeiBeigao != null "> and countWeiBeigao = #{countWeiBeigao}</if>
            <if test="countJieOther != null "> and countJieOther = #{countJieOther}</if>
            <if test="countWeiOther != null "> and countWeiOther = #{countWeiOther}</if>
            <if test="sstotal != null "> and sstotal = #{sstotal}</if>
            <if test="ssyja != null "> and ssyja = #{ssyja}</if>
            <if test="sswja != null "> and sswja = #{sswja}</if>
            <if test="ygyjass != null "> and ygyjass = #{ygyjass}</if>
            <if test="ygyjabs != null "> and ygyjabs = #{ygyjabs}</if>
            <if test="ygyjawz != null "> and ygyjawz = #{ygyjawz}</if>
            <if test="ygwja != null "> and ygwja = #{ygwja}</if>
            <if test="bgyjass != null "> and bgyjass = #{bgyjass}</if>
            <if test="bgyjabs != null "> and bgyjabs = #{bgyjabs}</if>
            <if test="bgyjawz != null "> and bgyjawz = #{bgyjawz}</if>
            <if test="bgwja != null "> and bgwja = #{bgwja}</if>
            <if test="dsryjass != null "> and dsryjass = #{dsryjass}</if>
            <if test="dsryjabs != null "> and dsryjabs = #{dsryjabs}</if>
            <if test="dsryjawz != null "> and dsryjawz = #{dsryjawz}</if>
            <if test="dsrwja != null "> and dsrwja = #{dsrwja}</if>
            <if test="paramsdata != null  and paramsdata != '' "> and paramsdata = #{paramsdata}</if>
            <if test="reportId != null  and reportId != '' "> and report_id = #{reportId}</if>
            <if test="dataStatus != null "> and dataStatus = #{dataStatus}</if>
            <if test="ename != null  and ename != '' "> and ename = #{ename}</if>
            <if test="lastUpdateTime != null "> and lastUpdateTime = #{lastUpdateTime}</if>
            <if test="cgId != null "> and cg_id = #{cgId}</if>
        </where>
    </select>
    
    <select id="selectJudicialCasesStatisticsById" parameterType="Integer" resultMap="JudicialCasesStatisticsResult">
        <include refid="selectJudicialCasesStatisticsVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertJudicialCasesStatistics" parameterType="JudicialCasesStatistics" useGeneratedKeys="true" keyProperty="id">
        insert into judicial_cases_statistics
		<trim prefix="(" suffix=")" suffixOverrides=",">
			<if test="caseType != null  ">caseType,</if>
			<if test="caseTypeStr != null  and caseTypeStr != ''  ">caseTypeStr,</if>
			<if test="oneyear != null  ">oneyear,</if>
			<if test="onetothreeyear != null  ">onetothreeyear,</if>
			<if test="threetofiveyear != null  ">threetofiveyear,</if>
			<if test="fiveyear != null  ">fiveyear,</if>
			<if test="countTotal != null  ">countTotal,</if>
			<if test="countJieTotal != null  ">countJieTotal,</if>
			<if test="countWeiTotal != null  ">countWeiTotal,</if>
			<if test="countYuangao != null  ">countYuangao,</if>
			<if test="countJieYuangao != null  ">countJieYuangao,</if>
			<if test="countWeiYuangao != null  ">countWeiYuangao,</if>
			<if test="countBeigao != null  ">countBeigao,</if>
			<if test="countJieBeigao != null  ">countJieBeigao,</if>
			<if test="countWeiBeigao != null  ">countWeiBeigao,</if>
			<if test="countJieOther != null  ">countJieOther,</if>
			<if test="countWeiOther != null  ">countWeiOther,</if>
			<if test="sstotal != null  ">sstotal,</if>
			<if test="ssyja != null  ">ssyja,</if>
			<if test="sswja != null  ">sswja,</if>
			<if test="ygyjass != null  ">ygyjass,</if>
			<if test="ygyjabs != null  ">ygyjabs,</if>
			<if test="ygyjawz != null  ">ygyjawz,</if>
			<if test="ygwja != null  ">ygwja,</if>
			<if test="bgyjass != null  ">bgyjass,</if>
			<if test="bgyjabs != null  ">bgyjabs,</if>
			<if test="bgyjawz != null  ">bgyjawz,</if>
			<if test="bgwja != null  ">bgwja,</if>
			<if test="dsryjass != null  ">dsryjass,</if>
			<if test="dsryjabs != null  ">dsryjabs,</if>
			<if test="dsryjawz != null  ">dsryjawz,</if>
			<if test="dsrwja != null  ">dsrwja,</if>
			<if test="paramsdata != null  and paramsdata != ''  ">paramsdata,</if>
			<if test="reportId != null  and reportId != ''  ">report_id,</if>
			<if test="dataStatus != null  ">dataStatus,</if>
			<if test="ename != null  and ename != ''  ">ename,</if>
			<if test="lastUpdateTime != null  ">lastUpdateTime,</if>
			<if test="cgId != null  ">cg_id,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
			<if test="caseType != null  ">#{caseType},</if>
			<if test="caseTypeStr != null  and caseTypeStr != ''  ">#{caseTypeStr},</if>
			<if test="oneyear != null  ">#{oneyear},</if>
			<if test="onetothreeyear != null  ">#{onetothreeyear},</if>
			<if test="threetofiveyear != null  ">#{threetofiveyear},</if>
			<if test="fiveyear != null  ">#{fiveyear},</if>
			<if test="countTotal != null  ">#{countTotal},</if>
			<if test="countJieTotal != null  ">#{countJieTotal},</if>
			<if test="countWeiTotal != null  ">#{countWeiTotal},</if>
			<if test="countYuangao != null  ">#{countYuangao},</if>
			<if test="countJieYuangao != null  ">#{countJieYuangao},</if>
			<if test="countWeiYuangao != null  ">#{countWeiYuangao},</if>
			<if test="countBeigao != null  ">#{countBeigao},</if>
			<if test="countJieBeigao != null  ">#{countJieBeigao},</if>
			<if test="countWeiBeigao != null  ">#{countWeiBeigao},</if>
			<if test="countJieOther != null  ">#{countJieOther},</if>
			<if test="countWeiOther != null  ">#{countWeiOther},</if>
			<if test="sstotal != null  ">#{sstotal},</if>
			<if test="ssyja != null  ">#{ssyja},</if>
			<if test="sswja != null  ">#{sswja},</if>
			<if test="ygyjass != null  ">#{ygyjass},</if>
			<if test="ygyjabs != null  ">#{ygyjabs},</if>
			<if test="ygyjawz != null  ">#{ygyjawz},</if>
			<if test="ygwja != null  ">#{ygwja},</if>
			<if test="bgyjass != null  ">#{bgyjass},</if>
			<if test="bgyjabs != null  ">#{bgyjabs},</if>
			<if test="bgyjawz != null  ">#{bgyjawz},</if>
			<if test="bgwja != null  ">#{bgwja},</if>
			<if test="dsryjass != null  ">#{dsryjass},</if>
			<if test="dsryjabs != null  ">#{dsryjabs},</if>
			<if test="dsryjawz != null  ">#{dsryjawz},</if>
			<if test="dsrwja != null  ">#{dsrwja},</if>
			<if test="paramsdata != null  and paramsdata != ''  ">#{paramsdata},</if>
			<if test="reportId != null  and reportId != ''  ">#{reportId},</if>
			<if test="dataStatus != null  ">#{dataStatus},</if>
			<if test="ename != null  and ename != ''  ">#{ename},</if>
			<if test="lastUpdateTime != null  ">#{lastUpdateTime},</if>
			<if test="cgId != null  ">#{cgId},</if>
         </trim>
    </insert>
	 
    <update id="updateJudicialCasesStatistics" parameterType="JudicialCasesStatistics">
        update judicial_cases_statistics
        <trim prefix="SET" suffixOverrides=",">
            <if test="caseType != null  ">caseType = #{caseType},</if>
            <if test="caseTypeStr != null  and caseTypeStr != ''  ">caseTypeStr = #{caseTypeStr},</if>
            <if test="oneyear != null  ">oneyear = #{oneyear},</if>
            <if test="onetothreeyear != null  ">onetothreeyear = #{onetothreeyear},</if>
            <if test="threetofiveyear != null  ">threetofiveyear = #{threetofiveyear},</if>
            <if test="fiveyear != null  ">fiveyear = #{fiveyear},</if>
            <if test="countTotal != null  ">countTotal = #{countTotal},</if>
            <if test="countJieTotal != null  ">countJieTotal = #{countJieTotal},</if>
            <if test="countWeiTotal != null  ">countWeiTotal = #{countWeiTotal},</if>
            <if test="countYuangao != null  ">countYuangao = #{countYuangao},</if>
            <if test="countJieYuangao != null  ">countJieYuangao = #{countJieYuangao},</if>
            <if test="countWeiYuangao != null  ">countWeiYuangao = #{countWeiYuangao},</if>
            <if test="countBeigao != null  ">countBeigao = #{countBeigao},</if>
            <if test="countJieBeigao != null  ">countJieBeigao = #{countJieBeigao},</if>
            <if test="countWeiBeigao != null  ">countWeiBeigao = #{countWeiBeigao},</if>
            <if test="countJieOther != null  ">countJieOther = #{countJieOther},</if>
            <if test="countWeiOther != null  ">countWeiOther = #{countWeiOther},</if>
            <if test="sstotal != null  ">sstotal = #{sstotal},</if>
            <if test="ssyja != null  ">ssyja = #{ssyja},</if>
            <if test="sswja != null  ">sswja = #{sswja},</if>
            <if test="ygyjass != null  ">ygyjass = #{ygyjass},</if>
            <if test="ygyjabs != null  ">ygyjabs = #{ygyjabs},</if>
            <if test="ygyjawz != null  ">ygyjawz = #{ygyjawz},</if>
            <if test="ygwja != null  ">ygwja = #{ygwja},</if>
            <if test="bgyjass != null  ">bgyjass = #{bgyjass},</if>
            <if test="bgyjabs != null  ">bgyjabs = #{bgyjabs},</if>
            <if test="bgyjawz != null  ">bgyjawz = #{bgyjawz},</if>
            <if test="bgwja != null  ">bgwja = #{bgwja},</if>
            <if test="dsryjass != null  ">dsryjass = #{dsryjass},</if>
            <if test="dsryjabs != null  ">dsryjabs = #{dsryjabs},</if>
            <if test="dsryjawz != null  ">dsryjawz = #{dsryjawz},</if>
            <if test="dsrwja != null  ">dsrwja = #{dsrwja},</if>
            <if test="paramsdata != null  and paramsdata != ''  ">paramsdata = #{paramsdata},</if>
            <if test="reportId != null  and reportId != ''  ">report_id = #{reportId},</if>
            <if test="dataStatus != null  ">dataStatus = #{dataStatus},</if>
            <if test="ename != null  and ename != ''  ">ename = #{ename},</if>
            <if test="lastUpdateTime != null  ">lastUpdateTime = #{lastUpdateTime},</if>
            <if test="cgId != null  ">cg_id = #{cgId},</if>
        </trim>
        where id = #{id}
    </update>

	<delete id="deleteJudicialCasesStatisticsById" parameterType="Integer">
        delete from judicial_cases_statistics where id = #{id}
    </delete>
	
    <delete id="deleteJudicialCasesStatisticsByIds" parameterType="String">
        delete from judicial_cases_statistics where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
    
</mapper>