|
@@ -84,6 +84,79 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
where id = #{id}
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectImputationData" parameterType="com.business.domain.ImputationData" resultType="com.business.domain.ImputationData">
|
|
|
+ select interface_id from t_u_imputation_interface where year = #{year} and interface_id = #{interfaceId}
|
|
|
+ </select>
|
|
|
+ <insert id="insertImputationData" parameterType="com.business.domain.ImputationData">
|
|
|
+ insert into t_u_imputation_data
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="year != null">year,</if>
|
|
|
+ <if test="jan != null">jan,</if>
|
|
|
+ <if test="feb != null">feb,</if>
|
|
|
+ <if test="mar != null">mar,</if>
|
|
|
+ <if test="apr != null">apr,</if>
|
|
|
+ <if test="may != null">may,</if>
|
|
|
+ <if test="jun != null">jun,</if>
|
|
|
+ <if test="jul != null">jul,</if>
|
|
|
+ <if test="aug != null">aug,</if>
|
|
|
+ <if test="sep != null">sep,</if>
|
|
|
+ <if test="oct != null">oct,</if>
|
|
|
+ <if test="nov != null">nov,</if>
|
|
|
+ <if test="decb != null">decb,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="year != null">#{year},</if>
|
|
|
+ <if test="jan != null">#{jan},</if>
|
|
|
+ <if test="feb != null">#{feb},</if>
|
|
|
+ <if test="mar != null">#{mar},</if>
|
|
|
+ <if test="apr != null">#{apr},</if>
|
|
|
+ <if test="may != null">#{may},</if>
|
|
|
+ <if test="jun != null">#{jun},</if>
|
|
|
+ <if test="jul != null">#{jul},</if>
|
|
|
+ <if test="aug != null">#{aug},</if>
|
|
|
+ <if test="sep != null">#{sep},</if>
|
|
|
+ <if test="oct != null">#{oct},</if>
|
|
|
+ <if test="nov != null">#{nov},</if>
|
|
|
+ <if test="decb != null">#{decb},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateImputationData" parameterType="com.business.domain.ImputationData">
|
|
|
+ update t_u_imputation_data
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="jan != null">jan = #{jan},</if>
|
|
|
+ <if test="feb != null">feb = #{feb},</if>
|
|
|
+ <if test="mar != null">mar = #{mar},</if>
|
|
|
+ <if test="apr != null">apr = #{apr},</if>
|
|
|
+ <if test="may != null">may = #{may},</if>
|
|
|
+ <if test="jun != null">jun = #{jun},</if>
|
|
|
+ <if test="jul != null">jul = #{jul},</if>
|
|
|
+ <if test="aug != null">aug = #{aug},</if>
|
|
|
+ <if test="sep != null">sep = #{sep},</if>
|
|
|
+ <if test="oct != null">oct = #{oct},</if>
|
|
|
+ <if test="nov != null">nov = #{nov},</if>
|
|
|
+ <if test="decb != null">decb = #{decb},</if>
|
|
|
+ </trim>
|
|
|
+ where year = #{year} and interface_id = #{interfaceId}
|
|
|
+ </update>
|
|
|
+ <update id="updateImputationInterfaceByYearMonthInterfaceId" parameterType="com.business.domain.ImputationData">
|
|
|
+ update t_u_imputation_interface
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="month == '1'">jan = jan + 1,</if>
|
|
|
+ <if test="month == '2'">feb = feb + 1,</if>
|
|
|
+ <if test="month == '3'">mar = mar + 1,</if>
|
|
|
+ <if test="month == '4'">apr = apr + 1,</if>
|
|
|
+ <if test="month == '5'">may = may + 1,</if>
|
|
|
+ <if test="month == '6'">jun = jun + 1,</if>
|
|
|
+ <if test="month == '7'">jul = jul + 1,</if>
|
|
|
+ <if test="month == '8'">aug = aug + 1,</if>
|
|
|
+ <if test="month == '9'">sep = sep + 1,</if>
|
|
|
+ <if test="month == '10'">oct = oct + 1,</if>
|
|
|
+ <if test="month == '11'">nov = nov + 1,</if>
|
|
|
+ <if test="month == '12'">decb = decb + 1,</if>
|
|
|
+ </trim>
|
|
|
+ where year = #{year} and interface_id = #{interfaceId}
|
|
|
+ </update>
|
|
|
+
|
|
|
<insert id="insertTULog" parameterType="TULog">
|
|
|
insert into t_u_log
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|