|
@@ -1726,6 +1726,32 @@
|
|
order by TLFR.SEGMENT_SQE
|
|
order by TLFR.SEGMENT_SQE
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="allOutFactoryJudge" resultType="int" parameterType="java.math.BigDecimal">
|
|
|
|
+ select TLFR.RESULT_ID
|
|
|
|
+ from OMSTRUCK_ORDER OO
|
|
|
|
+ left join TMSTRUCK_TOTAL_RESULT TTR on TTR.ORDER_ID = OO.ORDER_ID
|
|
|
|
+ left join TMSTRUCK_LEAVE_FACTORY_RESULT TLFR on TTR.RESULT_TOTAL_ID = TLFR.RESULT_TOTAL_ID
|
|
|
|
+ where OO.ORDER_ID = #{orderId}
|
|
|
|
+ and TLFR.RESULT_OUT_GATE_TIME is not null
|
|
|
|
+ and TLFR.RESULT_OUT_MODE = '未装货出厂'
|
|
|
|
+ order by TLFR.SEGMENT_SQE
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <update id="updateLoadSeq">
|
|
|
|
+ UPDATE OMSTRUCK_ORDER
|
|
|
|
+ SET ORDER_LINE_SEQUENCE =
|
|
|
|
+ (
|
|
|
|
+ SELECT
|
|
|
|
+ TLR.SEGMENT_SQE
|
|
|
|
+ FROM TMSTRUCK_LOAD_RESULT TLR
|
|
|
|
+ LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR ON TLR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
|
|
|
|
+ WHERE TTR.ORDER_ID = #{orderId}
|
|
|
|
+ ORDER BY SEGMENT_SQE
|
|
|
|
+ FETCH NEXT 1 ROWS ONLY
|
|
|
|
+ )
|
|
|
|
+ WHERE ORDER_ID = #{orderId}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
<update id="updateSqe" parameterType="java.util.Map">
|
|
<update id="updateSqe" parameterType="java.util.Map">
|
|
update OMSTRUCK_ORDER OO
|
|
update OMSTRUCK_ORDER OO
|
|
set OO.ORDER_LINE_SEQUENCE =
|
|
set OO.ORDER_LINE_SEQUENCE =
|
|
@@ -1778,5 +1804,12 @@
|
|
select TLR.RESULT_LOAD_END_TIME "loadEndTime" from TMSTRUCK_LOAD_RESULT TLR
|
|
select TLR.RESULT_LOAD_END_TIME "loadEndTime" from TMSTRUCK_LOAD_RESULT TLR
|
|
WHERE TLR.RESULT_TOTAL_ID = #{resultTotalId}
|
|
WHERE TLR.RESULT_TOTAL_ID = #{resultTotalId}
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="countJudgeLeave" resultType="java.lang.Integer">
|
|
|
|
+ SELECT
|
|
|
|
+ COUNT(TLFR.RESULT_ID)
|
|
|
|
+ FROM TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
|
|
|
|
+ LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR ON TLFR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
|
|
|
|
+ WHERE TLFR.RESULT_OUT_MODE = '未装货出厂' AND TTR.ORDER_ID = #{orderId}
|
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|