and mod.order_id = #{order_id}
and mod.matnr like '%' + #{matnr} + '%'
and mod.maktx like '%' + #{maktx} + '%'
and mod.batch like '%' + #{batch} + '%'
update man_order_detl
set anfme = anfme + #{qty}
where 1=1
and order_id = #{orderId}
and matnr = #{matnr}
and batch = #{batch}
and (batch IS NULL OR batch = '')
and three_code = #{csocode}
and (three_code IS NULL OR three_code = '')
and dead_time = #{isocode}
and (dead_time IS NULL OR dead_time = '')
update man_order_detl
set qty = qty + #{qty}
where 1=1
and order_id = #{orderId}
and matnr = #{matnr}
and batch = #{batch}
and (batch IS NULL OR batch = '')
and three_code = #{csocode}
and (three_code IS NULL OR three_code = '')
and dead_time = #{isocode}
and (dead_time IS NULL OR dead_time = '')
update man_order_detl
set qty = qty - #{qty}
where 1=1
and order_no = #{orderNo}
and matnr = #{matnr}
and batch = #{batch}
and (batch IS NULL OR batch = '')
and three_code = #{csocode}
and (three_code IS NULL OR three_code = '')
and dead_time = #{isocode}
and (dead_time IS NULL OR dead_time = '')
update man_order_detl
set status = #{status}
where 1=1
and order_id = #{orderId}