|
@@ -884,7 +884,17 @@
|
|
order by "insertTime" desc
|
|
order by "insertTime" desc
|
|
</if>
|
|
</if>
|
|
</sql>
|
|
</sql>
|
|
-
|
|
|
|
|
|
+ <sql id="orderBySteel">
|
|
|
|
+ <if test="orderField != null and orderField != ''">
|
|
|
|
+ order by "${orderField}"
|
|
|
|
+ <if test="orderType != null and orderType != ''">
|
|
|
|
+ ${orderType}
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="orderField == null ">
|
|
|
|
+ order by "orderId" desc
|
|
|
|
+ </if>
|
|
|
|
+ </sql>
|
|
<!-- 根据运单id查询运单类型 -->
|
|
<!-- 根据运单id查询运单类型 -->
|
|
<select id="getOrderType" parameterType="DECIMAL" resultType="DECIMAL">
|
|
<select id="getOrderType" parameterType="DECIMAL" resultType="DECIMAL">
|
|
SELECT ORDER_TYPE
|
|
SELECT ORDER_TYPE
|
|
@@ -2044,11 +2054,11 @@
|
|
and RC2.CARRIER_ID = #{carrierId}
|
|
and RC2.CARRIER_ID = #{carrierId}
|
|
</if>
|
|
</if>
|
|
<if test="oneDate != null">
|
|
<if test="oneDate != null">
|
|
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= bdo.INSERT_TIME
|
|
|
|
|
|
+ and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= twr.RESULT_GROSS_WEIGHT_TIME
|
|
</if>
|
|
</if>
|
|
<if test="startDate != null">
|
|
<if test="startDate != null">
|
|
- and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= bdo.INSERT_TIME
|
|
|
|
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= bdo.INSERT_TIME
|
|
|
|
|
|
+ and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= twr.RESULT_GROSS_WEIGHT_TIME
|
|
|
|
+ and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= twr.RESULT_GROSS_WEIGHT_TIME
|
|
</if>
|
|
</if>
|
|
order by oo.order_id desc
|
|
order by oo.order_id desc
|
|
)
|
|
)
|
|
@@ -2156,14 +2166,8 @@
|
|
"receiveMoneyCus" like '%${item}%'
|
|
"receiveMoneyCus" like '%${item}%'
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
- <if test="orderissuetime!= null">
|
|
|
|
- and
|
|
|
|
- <foreach collection="orderissuetime" item="item" open="(" separator="or" close=")">
|
|
|
|
- "orderissuetime" like '%${item}%'
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
</where>
|
|
</where>
|
|
- <include refid="orderBy"></include>
|
|
|
|
|
|
+ <include refid="orderBySteel"></include>
|
|
</select>
|
|
</select>
|
|
<select id="selectDetailsByOrder" resultType="java.lang.Integer" parameterType="decimal">
|
|
<select id="selectDetailsByOrder" resultType="java.lang.Integer" parameterType="decimal">
|
|
SELECT count(BDO.DETAILS_ID) FROM BMSTRUCK_DETAILS_ORDER BDO
|
|
SELECT count(BDO.DETAILS_ID) FROM BMSTRUCK_DETAILS_ORDER BDO
|
|
@@ -2290,4 +2294,20 @@
|
|
ON AIR.REQUIREMENT_ID = ARP.REQUIREMENT_ID
|
|
ON AIR.REQUIREMENT_ID = ARP.REQUIREMENT_ID
|
|
where oo.ORDER_ID = #{orderId}
|
|
where oo.ORDER_ID = #{orderId}
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="getIsHaveDetailsOrder" resultType="java.lang.Integer" parameterType="java.math.BigDecimal">
|
|
|
|
+ SELECT COUNT(BDO.DETAILS_ID) FROM BMSTRUCK_DETAILS_ORDER BDO
|
|
|
|
+ WHERE BDO.WEIGHT_TASK_RESULT_ID = #{weightTaskResultId}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="getSteelWeightTaskResultId" resultType="java.util.Map">
|
|
|
|
+ SELECT
|
|
|
|
+ TWR.WEIGHT_TASK_RESULT_ID AS "weightTaskResultId",
|
|
|
|
+ TWR.RESULT_NET_WEIGHT AS "netWeight"
|
|
|
|
+ FROM OMSTRUCK_ORDER OO
|
|
|
|
+ LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
|
|
|
|
+ ON TTR.ORDER_ID = OO.ORDER_ID
|
|
|
|
+ LEFT JOIN TMSTRUCK_WEIGHT_RESULT TWR
|
|
|
|
+ ON TTR.RESULT_TOTAL_ID = TWR.RESULT_TOTAL_ID
|
|
|
|
+ WHERE OO.ORDER_ID = #{orderId}
|
|
|
|
+ order by twr.GROSS_SEGMENT_SQE desc
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|