|
@@ -1021,4 +1021,44 @@
|
|
|
from TMSTRUCK_WEIGHT_RESULT TWR
|
|
|
where TWR.RESULT_NET_WEIGHT is null and TWR.RESULT_TOTAL_ID = #{resultTotalId}
|
|
|
</select>
|
|
|
+
|
|
|
+<!-- 通过订单ID获取零星订单父级收货单位 -->
|
|
|
+ <select id="getLxRealReceiveIdByOrderId" parameterType="java.math.BigDecimal" resultType="java.lang.Integer">
|
|
|
+ select RCON.CONSIGNEE_FAR_ID
|
|
|
+ from OMSTRUCK_ORDER OO
|
|
|
+ left join AMSTRUCK_SPORADIC_ORDER ASO
|
|
|
+ on OO.ORDER_PLAN_ID = ASO.SPORADIC_ORDER_ID
|
|
|
+ left join RMS_CONSIGNEE RCON
|
|
|
+ on RCON.CONSIGNEE_ID = ASO.RECEIVE_UNIT_ID
|
|
|
+ where OO.ORDER_ID = #{orderId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+<!-- 通过订单ID获取零星订单父级收货单位 -->
|
|
|
+ <select id="getLxRealSendUnitIdByOrderId" parameterType="java.math.BigDecimal" resultType="java.lang.Integer">
|
|
|
+ select RS.SUPPLIER_FAR_ID
|
|
|
+ from OMSTRUCK_ORDER OO
|
|
|
+ left join AMSTRUCK_SPORADIC_ORDER ASO
|
|
|
+ on OO.ORDER_PLAN_ID = ASO.SPORADIC_ORDER_ID
|
|
|
+ left join RMS_SUPPLIER RS
|
|
|
+ on RS.SUPPLIER_ID = ASO.SEND_UNIT_ID
|
|
|
+ where OO.ORDER_ID = #{orderId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+<!-- 查询零星订单收货单位ID -->
|
|
|
+ <select id="getPtLxReceiveIdByOrderId" resultType="java.lang.Integer">
|
|
|
+ select ASO.RECEIVE_UNIT_ID
|
|
|
+ from OMSTRUCK_ORDER OO
|
|
|
+ left join AMSTRUCK_SPORADIC_ORDER ASO
|
|
|
+ on ASO.SPORADIC_ORDER_ID = OO.ORDER_PLAN_ID
|
|
|
+ where OO.ORDER_ID = #{orderId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+<!-- 查询零星订单发货单位ID -->
|
|
|
+ <select id="getPtLxSendUnitIdByOrderId" resultType="java.lang.Integer">
|
|
|
+ select ASO.SEND_UNIT_ID
|
|
|
+ from OMSTRUCK_ORDER OO
|
|
|
+ left join AMSTRUCK_SPORADIC_ORDER ASO
|
|
|
+ on ASO.SPORADIC_ORDER_ID = OO.ORDER_PLAN_ID
|
|
|
+ where OO.ORDER_ID = #{orderId}
|
|
|
+ </select>
|
|
|
</mapper>
|