|
@@ -12,42 +12,49 @@
|
|
|
</select>
|
|
|
|
|
|
<update id="updateAssembledPacking">
|
|
|
- update sy_pre_assembled_packing_list
|
|
|
- set elements_id = #{newElmentId}
|
|
|
- where elements_id = #{elmentId} and del_flag = '0'
|
|
|
-
|
|
|
+ update sy_pre_assembled_packing_list a
|
|
|
+ left join sy_pre_assembled_packing b
|
|
|
+ on a.sy_pre_assembled_packing_list_id = b.id
|
|
|
+ set a.elements_id = #{newElmentId}
|
|
|
+ where a.elements_id = #{elmentId} and a.del_flag = '0' and b.push_status ='0'
|
|
|
|
|
|
</update>
|
|
|
|
|
|
<update id="updateFabric">
|
|
|
- update sy_packing_list_fabric_item
|
|
|
- set elements_Id = #{newElmentId}
|
|
|
+ update sy_packing_list_fabric_item a
|
|
|
+ left join sy_packing_list_fabric b
|
|
|
+ on a.sy_packing_list_fabric_id = b.id
|
|
|
+ set a.elements_Id = #{newElmentId}
|
|
|
<if test='type !="0"'>
|
|
|
- where elements_Id = #{elmentId} and del_flag = '0'
|
|
|
+ where a.elements_Id = #{elmentId} and a.del_flag = '0' and b.push_State = '0'
|
|
|
</if>
|
|
|
<if test='type =="0"'>
|
|
|
|
|
|
- where elements_id = #{elmentId} and del_flag = '0' and order_Number = #{code}
|
|
|
+ where a.elements_id = #{elmentId} and a.del_flag = '0' and a.order_Number = #{code} and b.push_State = '0'
|
|
|
</if>
|
|
|
|
|
|
</update>
|
|
|
|
|
|
<update id="updateTailoring">
|
|
|
- update sy_packing_list_tailoring_item
|
|
|
- set elements_Id = #{newElmentId}
|
|
|
- where elements_Id = #{elmentId} and del_flag = '0'
|
|
|
+ update sy_packing_list_tailoring_item a
|
|
|
+ left join sy_packing_list_tailoring b
|
|
|
+ on a.sy_packing_list_tailoring_id = b.id
|
|
|
+ set a.elements_Id = #{newElmentId}
|
|
|
+ where a.elements_Id = #{elmentId} and a.del_flag = '0' and b.Push_state = '0'
|
|
|
|
|
|
|
|
|
</update>
|
|
|
|
|
|
<update id="updatesyShippingOrderItem">
|
|
|
- update sy_shipping_order_item
|
|
|
- set elements_Id = #{newElmentId}
|
|
|
+ update sy_shipping_order_item a
|
|
|
+ left join sy_shipping_order b
|
|
|
+ on a.sy_shipping_order_item_id = b.id
|
|
|
+ set a.elements_Id = #{newElmentId}
|
|
|
<if test='type !="0"'>
|
|
|
- where elements_Id = #{elmentId} and del_flag = '0'
|
|
|
+ where a.elements_Id = #{elmentId} and a.del_flag = '0' and b.sy_stuta = '0'
|
|
|
</if>
|
|
|
<if test='type =="0"'>
|
|
|
- where elements_Id = #{elmentId} and del_flag = '0' and order_number = #{code}
|
|
|
+ where a.elements_Id = #{elmentId} and a.del_flag = '0' and a.order_number = #{code} and b.sy_stuta = '0'
|
|
|
</if>
|
|
|
|
|
|
</update>
|