17,137
社区成员
发帖
与我相关
我的任务
分享
<update id="batchUpdateFundNumber" parameterType="list" databaseId="oracle">
BEGIN
<foreach collection="list" item="item" index="index">
update mad_project t
left join mad_project_aux m on t.mad_id = m.mad_id set
t.approval_amt=#{item.approvalAmt},
t.acitem19_code=#{item.acitem19Code},
m.fund_number=#{item.fundNumber}
where
t.agy_code=#{item.agyCode}
and t.mof_div_code=#{item.mofDivCode}
and t.mad_code=#{item.madCode}
and t.pro_status=#{item.proStatus}
and t.fiscal=#{item.fiscal};
</foreach>
END;
</update>
update mad_project t left join mad_project_aux m on t.mad_id = m.mad_id set t.approval_amt=#{item.approvalAmt}, t.acitem19_code=#{item.acitem19Code}, m.fund_number=#{item.fundNumber} where t.agy_code=#{item.agyCode} and t.mof_div_code=#{item.mofDivCode} and t.mad_code=#{item.madCode} and t.pro_status=#{item.proStatus} and t.fiscal=#{item.fiscal};
UPDATE mad_project t INNER JOIN mad_project_aux m ON t.mad_id = m.mad_id SET t.approval_amt = #{item.approvalAmt}, t.acitem19_code = #{item.acitem19Code}, m.fund_number = #{item.fundNumber} WHERE t.agy_code = #{item.agyCode} AND t.mof_div_code = #{item.mofDivCode} AND t.mad_code = #{item.madCode} AND t.pro_status = #{item.proStatus} AND t.fiscal = #{item.fiscal}