<?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.dhcc.finance.main.dao.CwHsOutcwBalanceMapper"> <resultMap id="BaseResultMap" type="com.dhcc.finance.main.domain.CwHsOutcwBalance"> <result column="L_ZTBH" jdbcType="INTEGER" property="lZtbh" /> <result column="D_DATE" jdbcType="TIMESTAMP" property="dDate" /> <result column="VC_DYKM" jdbcType="VARCHAR" property="vcDykm" /> <result column="EN_DEBIT" jdbcType="DECIMAL" property="enDebit" /> <result column="EN_CREDIT" jdbcType="DECIMAL" property="enCredit" /> <result column="ITEM1" jdbcType="VARCHAR" property="item1" /> <result column="NAME1" jdbcType="VARCHAR" property="name1" /> <result column="ITEM2" jdbcType="VARCHAR" property="item2" /> <result column="NAME2" jdbcType="VARCHAR" property="name2" /> <result column="ITEM3" jdbcType="VARCHAR" property="item3" /> <result column="NAME3" jdbcType="VARCHAR" property="name3" /> <result column="ITEM4" jdbcType="VARCHAR" property="item4" /> <result column="NAME4" jdbcType="VARCHAR" property="name4" /> <result column="ITEM5" jdbcType="VARCHAR" property="item5" /> <result column="NAME5" jdbcType="VARCHAR" property="name5" /> <result column="ITEM6" jdbcType="VARCHAR" property="item6" /> <result column="NAME6" jdbcType="VARCHAR" property="name6" /> <result column="ITEM7" jdbcType="VARCHAR" property="item7" /> <result column="NAME7" jdbcType="VARCHAR" property="name7" /> <result column="ITEM8" jdbcType="VARCHAR" property="item8" /> <result column="NAME8" jdbcType="VARCHAR" property="name8" /> <result column="ITEM9" jdbcType="VARCHAR" property="item9" /> <result column="NAME9" jdbcType="VARCHAR" property="name9" /> <result column="VC_HTBH" jdbcType="VARCHAR" property="vcHtbh" /> <result column="EN_DEBIT_BY" jdbcType="DECIMAL" property="enDebitBy" /> <result column="EN_CREDIT_BY" jdbcType="DECIMAL" property="enCreditBy" /> <result column="VC_ZQJC" jdbcType="VARCHAR" property="vcZqjc" /> <result column="VC_JKFS" jdbcType="VARCHAR" property="vcJkfs" /> <result column="VC_DYKMMC" jdbcType="VARCHAR" property="vcDykmmc" /> <result column="EN_DEBIT_BN" jdbcType="DECIMAL" property="enDebitBn" /> <result column="EN_CREDIT_BN" jdbcType="DECIMAL" property="enCreditBn" /> </resultMap> <sql id="Example_Where_Clause"> <where> <foreach collection="oredCriteria" item="criteria" separator="or"> <if test="criteria.valid"> <trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="criteria.criteria" item="criterion"> <choose> <when test="criterion.noValue"> and ${criterion.condition} </when> <when test="criterion.singleValue"> and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue"> and ${criterion.condition} <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Update_By_Example_Where_Clause"> <where> <foreach collection="example.oredCriteria" item="criteria" separator="or"> <if test="criteria.valid"> <trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="criteria.criteria" item="criterion"> <choose> <when test="criterion.noValue"> and ${criterion.condition} </when> <when test="criterion.singleValue"> and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue"> and ${criterion.condition} <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Base_Column_List"> L_ZTBH, D_DATE, VC_DYKM, EN_DEBIT, EN_CREDIT, ITEM1, NAME1, ITEM2, NAME2, ITEM3, NAME3, ITEM4, NAME4, ITEM5, NAME5, ITEM6, NAME6, ITEM7, NAME7, ITEM8, NAME8, ITEM9, NAME9, VC_HTBH, EN_DEBIT_BY, EN_CREDIT_BY, VC_ZQJC, VC_JKFS, VC_DYKMMC, EN_DEBIT_BN, EN_CREDIT_BN </sql> <select id="selectByExample" parameterType="com.dhcc.finance.main.domain.CwHsOutcwBalanceExample" resultMap="BaseResultMap"> select <if test="distinct"> distinct </if> <include refid="Base_Column_List" /> from cw_hs_outcw_balance <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order by ${orderByClause} </if> </select> <delete id="deleteByExample" parameterType="com.dhcc.finance.main.domain.CwHsOutcwBalanceExample"> delete from cw_hs_outcw_balance <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="com.dhcc.finance.main.domain.CwHsOutcwBalance"> insert into cw_hs_outcw_balance (L_ZTBH, D_DATE, VC_DYKM, EN_DEBIT, EN_CREDIT, ITEM1, NAME1, ITEM2, NAME2, ITEM3, NAME3, ITEM4, NAME4, ITEM5, NAME5, ITEM6, NAME6, ITEM7, NAME7, ITEM8, NAME8, ITEM9, NAME9, VC_HTBH, EN_DEBIT_BY, EN_CREDIT_BY, VC_ZQJC, VC_JKFS, VC_DYKMMC, EN_DEBIT_BN, EN_CREDIT_BN) values (#{lZtbh,jdbcType=INTEGER}, #{dDate,jdbcType=TIMESTAMP}, #{vcDykm,jdbcType=VARCHAR}, #{enDebit,jdbcType=DECIMAL}, #{enCredit,jdbcType=DECIMAL}, #{item1,jdbcType=VARCHAR}, #{name1,jdbcType=VARCHAR}, #{item2,jdbcType=VARCHAR}, #{name2,jdbcType=VARCHAR}, #{item3,jdbcType=VARCHAR}, #{name3,jdbcType=VARCHAR}, #{item4,jdbcType=VARCHAR}, #{name4,jdbcType=VARCHAR}, #{item5,jdbcType=VARCHAR}, #{name5,jdbcType=VARCHAR}, #{item6,jdbcType=VARCHAR}, #{name6,jdbcType=VARCHAR}, #{item7,jdbcType=VARCHAR}, #{name7,jdbcType=VARCHAR}, #{item8,jdbcType=VARCHAR}, #{name8,jdbcType=VARCHAR}, #{item9,jdbcType=VARCHAR}, #{name9,jdbcType=VARCHAR}, #{vcHtbh,jdbcType=VARCHAR}, #{enDebitBy,jdbcType=DECIMAL}, #{enCreditBy,jdbcType=DECIMAL}, #{vcZqjc,jdbcType=VARCHAR}, #{vcJkfs,jdbcType=VARCHAR}, #{vcDykmmc,jdbcType=VARCHAR}, #{enDebitBn,jdbcType=DECIMAL}, #{enCreditBn,jdbcType=DECIMAL}) </insert> <insert id="insertSelective" parameterType="com.dhcc.finance.main.domain.CwHsOutcwBalance"> insert into cw_hs_outcw_balance <trim prefix="(" suffix=")" suffixOverrides=","> <if test="lZtbh != null"> L_ZTBH, </if> <if test="dDate != null"> D_DATE, </if> <if test="vcDykm != null"> VC_DYKM, </if> <if test="enDebit != null"> EN_DEBIT, </if> <if test="enCredit != null"> EN_CREDIT, </if> <if test="item1 != null"> ITEM1, </if> <if test="name1 != null"> NAME1, </if> <if test="item2 != null"> ITEM2, </if> <if test="name2 != null"> NAME2, </if> <if test="item3 != null"> ITEM3, </if> <if test="name3 != null"> NAME3, </if> <if test="item4 != null"> ITEM4, </if> <if test="name4 != null"> NAME4, </if> <if test="item5 != null"> ITEM5, </if> <if test="name5 != null"> NAME5, </if> <if test="item6 != null"> ITEM6, </if> <if test="name6 != null"> NAME6, </if> <if test="item7 != null"> ITEM7, </if> <if test="name7 != null"> NAME7, </if> <if test="item8 != null"> ITEM8, </if> <if test="name8 != null"> NAME8, </if> <if test="item9 != null"> ITEM9, </if> <if test="name9 != null"> NAME9, </if> <if test="vcHtbh != null"> VC_HTBH, </if> <if test="enDebitBy != null"> EN_DEBIT_BY, </if> <if test="enCreditBy != null"> EN_CREDIT_BY, </if> <if test="vcZqjc != null"> VC_ZQJC, </if> <if test="vcJkfs != null"> VC_JKFS, </if> <if test="vcDykmmc != null"> VC_DYKMMC, </if> <if test="enDebitBn != null"> EN_DEBIT_BN, </if> <if test="enCreditBn != null"> EN_CREDIT_BN, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="lZtbh != null"> #{lZtbh,jdbcType=INTEGER}, </if> <if test="dDate != null"> #{dDate,jdbcType=TIMESTAMP}, </if> <if test="vcDykm != null"> #{vcDykm,jdbcType=VARCHAR}, </if> <if test="enDebit != null"> #{enDebit,jdbcType=DECIMAL}, </if> <if test="enCredit != null"> #{enCredit,jdbcType=DECIMAL}, </if> <if test="item1 != null"> #{item1,jdbcType=VARCHAR}, </if> <if test="name1 != null"> #{name1,jdbcType=VARCHAR}, </if> <if test="item2 != null"> #{item2,jdbcType=VARCHAR}, </if> <if test="name2 != null"> #{name2,jdbcType=VARCHAR}, </if> <if test="item3 != null"> #{item3,jdbcType=VARCHAR}, </if> <if test="name3 != null"> #{name3,jdbcType=VARCHAR}, </if> <if test="item4 != null"> #{item4,jdbcType=VARCHAR}, </if> <if test="name4 != null"> #{name4,jdbcType=VARCHAR}, </if> <if test="item5 != null"> #{item5,jdbcType=VARCHAR}, </if> <if test="name5 != null"> #{name5,jdbcType=VARCHAR}, </if> <if test="item6 != null"> #{item6,jdbcType=VARCHAR}, </if> <if test="name6 != null"> #{name6,jdbcType=VARCHAR}, </if> <if test="item7 != null"> #{item7,jdbcType=VARCHAR}, </if> <if test="name7 != null"> #{name7,jdbcType=VARCHAR}, </if> <if test="item8 != null"> #{item8,jdbcType=VARCHAR}, </if> <if test="name8 != null"> #{name8,jdbcType=VARCHAR}, </if> <if test="item9 != null"> #{item9,jdbcType=VARCHAR}, </if> <if test="name9 != null"> #{name9,jdbcType=VARCHAR}, </if> <if test="vcHtbh != null"> #{vcHtbh,jdbcType=VARCHAR}, </if> <if test="enDebitBy != null"> #{enDebitBy,jdbcType=DECIMAL}, </if> <if test="enCreditBy != null"> #{enCreditBy,jdbcType=DECIMAL}, </if> <if test="vcZqjc != null"> #{vcZqjc,jdbcType=VARCHAR}, </if> <if test="vcJkfs != null"> #{vcJkfs,jdbcType=VARCHAR}, </if> <if test="vcDykmmc != null"> #{vcDykmmc,jdbcType=VARCHAR}, </if> <if test="enDebitBn != null"> #{enDebitBn,jdbcType=DECIMAL}, </if> <if test="enCreditBn != null"> #{enCreditBn,jdbcType=DECIMAL}, </if> </trim> </insert> <select id="countByExample" parameterType="com.dhcc.finance.main.domain.CwHsOutcwBalanceExample" resultType="java.lang.Long"> select count(*) from cw_hs_outcw_balance <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map"> update cw_hs_outcw_balance <set> <if test="record.lZtbh != null"> L_ZTBH = #{record.lZtbh,jdbcType=INTEGER}, </if> <if test="record.dDate != null"> D_DATE = #{record.dDate,jdbcType=TIMESTAMP}, </if> <if test="record.vcDykm != null"> VC_DYKM = #{record.vcDykm,jdbcType=VARCHAR}, </if> <if test="record.enDebit != null"> EN_DEBIT = #{record.enDebit,jdbcType=DECIMAL}, </if> <if test="record.enCredit != null"> EN_CREDIT = #{record.enCredit,jdbcType=DECIMAL}, </if> <if test="record.item1 != null"> ITEM1 = #{record.item1,jdbcType=VARCHAR}, </if> <if test="record.name1 != null"> NAME1 = #{record.name1,jdbcType=VARCHAR}, </if> <if test="record.item2 != null"> ITEM2 = #{record.item2,jdbcType=VARCHAR}, </if> <if test="record.name2 != null"> NAME2 = #{record.name2,jdbcType=VARCHAR}, </if> <if test="record.item3 != null"> ITEM3 = #{record.item3,jdbcType=VARCHAR}, </if> <if test="record.name3 != null"> NAME3 = #{record.name3,jdbcType=VARCHAR}, </if> <if test="record.item4 != null"> ITEM4 = #{record.item4,jdbcType=VARCHAR}, </if> <if test="record.name4 != null"> NAME4 = #{record.name4,jdbcType=VARCHAR}, </if> <if test="record.item5 != null"> ITEM5 = #{record.item5,jdbcType=VARCHAR}, </if> <if test="record.name5 != null"> NAME5 = #{record.name5,jdbcType=VARCHAR}, </if> <if test="record.item6 != null"> ITEM6 = #{record.item6,jdbcType=VARCHAR}, </if> <if test="record.name6 != null"> NAME6 = #{record.name6,jdbcType=VARCHAR}, </if> <if test="record.item7 != null"> ITEM7 = #{record.item7,jdbcType=VARCHAR}, </if> <if test="record.name7 != null"> NAME7 = #{record.name7,jdbcType=VARCHAR}, </if> <if test="record.item8 != null"> ITEM8 = #{record.item8,jdbcType=VARCHAR}, </if> <if test="record.name8 != null"> NAME8 = #{record.name8,jdbcType=VARCHAR}, </if> <if test="record.item9 != null"> ITEM9 = #{record.item9,jdbcType=VARCHAR}, </if> <if test="record.name9 != null"> NAME9 = #{record.name9,jdbcType=VARCHAR}, </if> <if test="record.vcHtbh != null"> VC_HTBH = #{record.vcHtbh,jdbcType=VARCHAR}, </if> <if test="record.enDebitBy != null"> EN_DEBIT_BY = #{record.enDebitBy,jdbcType=DECIMAL}, </if> <if test="record.enCreditBy != null"> EN_CREDIT_BY = #{record.enCreditBy,jdbcType=DECIMAL}, </if> <if test="record.vcZqjc != null"> VC_ZQJC = #{record.vcZqjc,jdbcType=VARCHAR}, </if> <if test="record.vcJkfs != null"> VC_JKFS = #{record.vcJkfs,jdbcType=VARCHAR}, </if> <if test="record.vcDykmmc != null"> VC_DYKMMC = #{record.vcDykmmc,jdbcType=VARCHAR}, </if> <if test="record.enDebitBn != null"> EN_DEBIT_BN = #{record.enDebitBn,jdbcType=DECIMAL}, </if> <if test="record.enCreditBn != null"> EN_CREDIT_BN = #{record.enCreditBn,jdbcType=DECIMAL}, </if> </set> <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByExample" parameterType="map"> update cw_hs_outcw_balance set L_ZTBH = #{record.lZtbh,jdbcType=INTEGER}, D_DATE = #{record.dDate,jdbcType=TIMESTAMP}, VC_DYKM = #{record.vcDykm,jdbcType=VARCHAR}, EN_DEBIT = #{record.enDebit,jdbcType=DECIMAL}, EN_CREDIT = #{record.enCredit,jdbcType=DECIMAL}, ITEM1 = #{record.item1,jdbcType=VARCHAR}, NAME1 = #{record.name1,jdbcType=VARCHAR}, ITEM2 = #{record.item2,jdbcType=VARCHAR}, NAME2 = #{record.name2,jdbcType=VARCHAR}, ITEM3 = #{record.item3,jdbcType=VARCHAR}, NAME3 = #{record.name3,jdbcType=VARCHAR}, ITEM4 = #{record.item4,jdbcType=VARCHAR}, NAME4 = #{record.name4,jdbcType=VARCHAR}, ITEM5 = #{record.item5,jdbcType=VARCHAR}, NAME5 = #{record.name5,jdbcType=VARCHAR}, ITEM6 = #{record.item6,jdbcType=VARCHAR}, NAME6 = #{record.name6,jdbcType=VARCHAR}, ITEM7 = #{record.item7,jdbcType=VARCHAR}, NAME7 = #{record.name7,jdbcType=VARCHAR}, ITEM8 = #{record.item8,jdbcType=VARCHAR}, NAME8 = #{record.name8,jdbcType=VARCHAR}, ITEM9 = #{record.item9,jdbcType=VARCHAR}, NAME9 = #{record.name9,jdbcType=VARCHAR}, VC_HTBH = #{record.vcHtbh,jdbcType=VARCHAR}, EN_DEBIT_BY = #{record.enDebitBy,jdbcType=DECIMAL}, EN_CREDIT_BY = #{record.enCreditBy,jdbcType=DECIMAL}, VC_ZQJC = #{record.vcZqjc,jdbcType=VARCHAR}, VC_JKFS = #{record.vcJkfs,jdbcType=VARCHAR}, VC_DYKMMC = #{record.vcDykmmc,jdbcType=VARCHAR}, EN_DEBIT_BN = #{record.enDebitBn,jdbcType=DECIMAL}, EN_CREDIT_BN = #{record.enCreditBn,jdbcType=DECIMAL} <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <!--批量新增 --> <insert id="insertBeatch" parameterType="java.util.List"> insert into cw_hs_outcw_balance (L_ZTBH, D_DATE, VC_DYKM, EN_DEBIT, EN_CREDIT, ITEM1, NAME1, ITEM2, NAME2, ITEM3, NAME3, ITEM4, NAME4, ITEM5, NAME5, ITEM6, NAME6, ITEM7, NAME7, ITEM8, NAME8, ITEM9, NAME9, VC_HTBH, EN_DEBIT_BY, EN_CREDIT_BY, VC_ZQJC, VC_JKFS, VC_DYKMMC, EN_DEBIT_BN, EN_CREDIT_BN) values <foreach collection="list" item="item" index="index" separator=","> (#{item.lZtbh,jdbcType=INTEGER}, #{item.dDate,jdbcType=TIMESTAMP}, #{item.vcDykm,jdbcType=VARCHAR}, #{item.enDebit,jdbcType=DECIMAL}, #{item.enCredit,jdbcType=DECIMAL}, #{item.item1,jdbcType=VARCHAR}, #{item.name1,jdbcType=VARCHAR}, #{item.item2,jdbcType=VARCHAR}, #{item.name2,jdbcType=VARCHAR}, #{item.item3,jdbcType=VARCHAR}, #{item.name3,jdbcType=VARCHAR}, #{item.item4,jdbcType=VARCHAR}, #{item.name4,jdbcType=VARCHAR}, #{item.item5,jdbcType=VARCHAR}, #{item.name5,jdbcType=VARCHAR}, #{item.item6,jdbcType=VARCHAR}, #{item.name6,jdbcType=VARCHAR}, #{item.item7,jdbcType=VARCHAR}, #{item.name7,jdbcType=VARCHAR}, #{item.item8,jdbcType=VARCHAR}, #{item.name8,jdbcType=VARCHAR}, #{item.item9,jdbcType=VARCHAR}, #{item.name9,jdbcType=VARCHAR}, #{item.vcHtbh,jdbcType=VARCHAR}, #{item.enDebitBy,jdbcType=DECIMAL}, #{item.enCreditBy,jdbcType=DECIMAL}, #{item.vcZqjc,jdbcType=VARCHAR}, #{item.vcJkfs,jdbcType=VARCHAR}, #{item.vcDykmmc,jdbcType=VARCHAR}, #{item.enDebitBn,jdbcType=DECIMAL}, #{item.enCreditBn,jdbcType=DECIMAL}) </foreach> </insert> <!--删除数据 --> <delete id="deleteOutcwBalance" parameterType="java.util.Map"> delete from cw_hs_outcw_balance where date_format(D_DATE, '%Y-%m-%d')= #{endDate,jdbcType=VARCHAR} and L_ZTBH in <foreach collection="ztList" open="(" item="item" separator="," close=")"> #{item,jdbcType=VARCHAR} </foreach> </delete> </mapper>