修改附加费操作
This commit is contained in:
+1
-1
@@ -161,7 +161,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where d.psv_id = #{psvId}
|
||||
and ifnull(s.sc_name, '') <> ''
|
||||
and s.charge_value is not null
|
||||
and lower(ifnull(s.ss_code, '')) <> 'of'
|
||||
and lower(ifnull(s.ss_code, '')) not in ('of', 'vd')
|
||||
and (r.detail_id is null or r.detail_id = d.product_country_id)
|
||||
and (
|
||||
s.country_code is null or s.country_code = ''
|
||||
|
||||
@@ -48,9 +48,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="roundMode != null and roundMode != ''">
|
||||
AND round_mode = #{roundMode}
|
||||
</if>
|
||||
<if test="ssCode != null and ssCode != ''">
|
||||
AND ss_code = #{ssCode}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="ssCode != null and ssCode != ''">
|
||||
AND lower(ss_code) = lower(#{ssCode})
|
||||
</when>
|
||||
<otherwise>
|
||||
<!-- 默认排除已作废记录,可在状态筛选中选择作废查看历史 -->
|
||||
AND lower(ifnull(ss_code, '')) <> 'vd'
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="countryCode != null and countryCode != ''">
|
||||
AND country_code = #{countryCode}
|
||||
</if>
|
||||
@@ -91,30 +97,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updatePrcSurcharge" parameterType="PrcSurcharge">
|
||||
<!-- 状态原地更新(不新增数据):停用置 of,版本化作废旧记录置 vd -->
|
||||
<update id="updateSsCodeByIds">
|
||||
update prc_surcharge
|
||||
<set>
|
||||
<if test="scName != null and scName != ''">sc_name = #{scName},</if>
|
||||
<if test="feeType != null and feeType != ''">fee_type = #{feeType},</if>
|
||||
<if test="chargeType != null and chargeType != ''">charge_type = #{chargeType},</if>
|
||||
<if test="chargeValue != null">charge_value = #{chargeValue},</if>
|
||||
<if test="currency != null and currency != ''">currency = #{currency},</if>
|
||||
<if test="roundMode != null and roundMode != ''">round_mode = #{roundMode},</if>
|
||||
<if test="ssCode != null and ssCode != ''">ss_code = #{ssCode},</if>
|
||||
country_code = #{countryCode},
|
||||
<if test="scNote != null">sc_note = #{scNote},</if>
|
||||
<if test="tmsId != null">tms_id = #{tmsId},</if>
|
||||
<if test="updateBy != null and updateBy != ''">updated_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where sc_id = #{scId}
|
||||
</update>
|
||||
|
||||
<delete id="deletePrcSurchargeByIds" parameterType="Long">
|
||||
delete from prc_surcharge where sc_id in
|
||||
<foreach item="scId" collection="array" open="(" separator="," close=")">
|
||||
set ss_code = #{ssCode}, updated_by = #{operator}, update_time = sysdate()
|
||||
where sc_id in
|
||||
<foreach item="scId" collection="scIds" open="(" separator="," close=")">
|
||||
#{scId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -81,4 +81,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 附加费版本化编辑后,产品关联重指向新记录 -->
|
||||
<update id="rebindRelScId">
|
||||
update prc_surcharge_rel
|
||||
set sc_id = #{newScId}, updated_by = #{operator}, update_time = sysdate()
|
||||
where sc_id = #{oldScId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user