|
@@ -87,10 +87,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<select id="selectImputationData" parameterType="com.business.domain.ImputationData" resultType="com.business.domain.ImputationData">
|
|
<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 interface_id from t_u_imputation_interface where year = #{year} and interface_id = #{interfaceId}
|
|
</select>
|
|
</select>
|
|
- <insert id="insertImputationData" parameterType="com.business.domain.ImputationData">
|
|
|
|
- insert into t_u_imputation_data
|
|
|
|
|
|
+ <insert id="insertImputationInterface" parameterType="com.business.domain.ImputationData">
|
|
|
|
+ insert into t_u_imputation_interface
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="year != null">year,</if>
|
|
<if test="year != null">year,</if>
|
|
|
|
+ <if test="interfaceId != null">interface_id,</if>
|
|
|
|
+ <if test="interfaceName != null">interface_name,</if>
|
|
<if test="jan != null">jan,</if>
|
|
<if test="jan != null">jan,</if>
|
|
<if test="feb != null">feb,</if>
|
|
<if test="feb != null">feb,</if>
|
|
<if test="mar != null">mar,</if>
|
|
<if test="mar != null">mar,</if>
|
|
@@ -106,6 +108,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="year != null">#{year},</if>
|
|
<if test="year != null">#{year},</if>
|
|
|
|
+ <if test="year != null">#{interfaceId},</if>
|
|
|
|
+ <if test="interfaceName != null">#{interfaceName},</if>
|
|
<if test="jan != null">#{jan},</if>
|
|
<if test="jan != null">#{jan},</if>
|
|
<if test="feb != null">#{feb},</if>
|
|
<if test="feb != null">#{feb},</if>
|
|
<if test="mar != null">#{mar},</if>
|
|
<if test="mar != null">#{mar},</if>
|
|
@@ -120,8 +124,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="decb != null">#{decb},</if>
|
|
<if test="decb != null">#{decb},</if>
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
- <update id="updateImputationData" parameterType="com.business.domain.ImputationData">
|
|
|
|
- update t_u_imputation_data
|
|
|
|
|
|
+ <update id="updateImputationInterface" parameterType="com.business.domain.ImputationData">
|
|
|
|
+ update t_u_imputation_interface
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="jan != null">jan = #{jan},</if>
|
|
<if test="jan != null">jan = #{jan},</if>
|
|
<if test="feb != null">feb = #{feb},</if>
|
|
<if test="feb != null">feb = #{feb},</if>
|
|
@@ -141,18 +145,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<update id="updateImputationInterfaceByYearMonthInterfaceId" parameterType="com.business.domain.ImputationData">
|
|
<update id="updateImputationInterfaceByYearMonthInterfaceId" parameterType="com.business.domain.ImputationData">
|
|
update t_u_imputation_interface
|
|
update t_u_imputation_interface
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<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>
|
|
|
|
|
|
+ <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>
|
|
</trim>
|
|
where year = #{year} and interface_id = #{interfaceId}
|
|
where year = #{year} and interface_id = #{interfaceId}
|
|
</update>
|
|
</update>
|