|
@@ -341,6 +341,7 @@
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|
|
</delete>
|
|
</delete>
|
|
|
|
+
|
|
<!-- 友情提示!!!-->
|
|
<!-- 友情提示!!!-->
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
<!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
|
|
|
@@ -525,11 +526,11 @@
|
|
SELECT distinct ADDRESS_DISTRICT FROM RMS_RECEIVE_ADDRESS where ADDRESS_TOWN is null
|
|
SELECT distinct ADDRESS_DISTRICT FROM RMS_RECEIVE_ADDRESS where ADDRESS_TOWN is null
|
|
</select>
|
|
</select>
|
|
<select id="getTotalIdByOrderNumber" resultType="java.math.BigDecimal">
|
|
<select id="getTotalIdByOrderNumber" resultType="java.math.BigDecimal">
|
|
- select RESULT_TOTAL_ID "totalId"
|
|
|
|
|
|
+ select MAX(RESULT_TOTAL_ID) "totalId"
|
|
from TMSTRUCK_TOTAL_RESULT t_total
|
|
from TMSTRUCK_TOTAL_RESULT t_total
|
|
left join OMSTRUCK_ORDER o_order
|
|
left join OMSTRUCK_ORDER o_order
|
|
on t_total.ORDER_ID=o_order.ORDER_ID
|
|
on t_total.ORDER_ID=o_order.ORDER_ID
|
|
- where o_order.ORDER_NUMBER = #{orderNumber} and o_order.ORDER_STATUS=5
|
|
|
|
|
|
+ where o_order.ORDER_NUMBER = #{orderNumber}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
@@ -541,4 +542,32 @@
|
|
</if>
|
|
</if>
|
|
</if>
|
|
</if>
|
|
</sql>
|
|
</sql>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteAllArrival">
|
|
|
|
+ DELETE
|
|
|
|
+ FROM TMSTRUCK_ARRIVAL_RESULT
|
|
|
|
+ WHERE RESULT_ID IN (
|
|
|
|
+ select distinct t_arrival.RESULT_ID
|
|
|
|
+ from TMSTRUCK_ARRIVAL_RESULT t_arrival
|
|
|
|
+ left join TMSTRUCK_TOTAL_RESULT t_total
|
|
|
|
+ on t_arrival.RESULT_TOTAL_ID = t_total.RESULT_TOTAL_ID
|
|
|
|
+ left join OMSTRUCK_ORDER o_torder
|
|
|
|
+ on t_total.ORDER_ID = o_torder.ORDER_ID
|
|
|
|
+ where o_torder.ORDER_NUMBER = #{orderNumber}
|
|
|
|
+ )
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteAllReceipt">
|
|
|
|
+ DELETE
|
|
|
|
+ FROM TMSTRUCK_RECEIPT_RESULT
|
|
|
|
+ WHERE RESULT_ID IN (
|
|
|
|
+ select distinct TRR.RESULT_ID
|
|
|
|
+ from TMSTRUCK_RECEIPT_RESULT TRR
|
|
|
|
+ left join TMSTRUCK_TOTAL_RESULT TTR
|
|
|
|
+ on TRR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
|
|
|
|
+ left join OMSTRUCK_ORDER OO
|
|
|
|
+ on TTR.ORDER_ID = OO.ORDER_ID
|
|
|
|
+ where OO.ORDER_NUMBER = #{orderNumber}
|
|
|
|
+ )
|
|
|
|
+ </delete>
|
|
</mapper>
|
|
</mapper>
|