|
@@ -1620,6 +1620,25 @@
|
|
|
</if>
|
|
|
order by twr.result_tare_weight_time desc
|
|
|
)
|
|
|
+ <where>
|
|
|
+ <if test="capacityNo!= null">
|
|
|
+ and
|
|
|
+ "capacityNumber" like #{capacityNo}
|
|
|
+ </if>
|
|
|
+ <if test="shipperNames!= null">
|
|
|
+ and
|
|
|
+ "shipperName" like #{shipperNames}
|
|
|
+ </if>
|
|
|
+ <if test="transRangeValues!= null">
|
|
|
+ and
|
|
|
+ "transRangeValue" like #{transRangeValues}
|
|
|
+ </if>
|
|
|
+ <if test="materialTypeNames!= null">
|
|
|
+ and
|
|
|
+ "materialTypeName" like #{materialTypeNames}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+
|
|
|
|
|
|
</select>
|
|
|
<select id="getPriceInfoPur" resultType="java.util.Map" parameterType="DECIMAL">
|
|
@@ -1728,11 +1747,11 @@
|
|
|
AND AIR.INSERT_USERNAME LIKE #{userId}
|
|
|
</if>
|
|
|
<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') <= GREATEST(TWR.RESULT_GROSS_WEIGHT_TIME, TWR.RESULT_TARE_WEIGHT_TIME)
|
|
|
</if>
|
|
|
<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') <= GREATEST(TWR.RESULT_GROSS_WEIGHT_TIME, TWR.RESULT_TARE_WEIGHT_TIME)
|
|
|
+ and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= GREATEST(TWR.RESULT_GROSS_WEIGHT_TIME, TWR.RESULT_TARE_WEIGHT_TIME)
|
|
|
</if>
|
|
|
UNION ALL
|
|
|
select rc.capacity_number "capacityNumber",
|
|
@@ -1809,11 +1828,11 @@
|
|
|
AND AIR.INSERT_USERNAME LIKE #{userId}
|
|
|
</if>
|
|
|
<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') <= GREATEST(TWR.RESULT_GROSS_WEIGHT_TIME, TWR.RESULT_TARE_WEIGHT_TIME)
|
|
|
</if>
|
|
|
<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') <= GREATEST(TWR.RESULT_GROSS_WEIGHT_TIME, TWR.RESULT_TARE_WEIGHT_TIME)
|
|
|
+ and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= GREATEST(TWR.RESULT_GROSS_WEIGHT_TIME, TWR.RESULT_TARE_WEIGHT_TIME)
|
|
|
</if>
|
|
|
UNION ALL SELECT
|
|
|
rc.capacity_number "capacityNumber",
|
|
@@ -1868,11 +1887,11 @@
|
|
|
AND AIR.INSERT_USERNAME LIKE #{userId}
|
|
|
</if>
|
|
|
<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') <= GREATEST(TWR.RESULT_GROSS_WEIGHT_TIME, TWR.RESULT_TARE_WEIGHT_TIME)
|
|
|
</if>
|
|
|
<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') <= GREATEST(TWR.RESULT_GROSS_WEIGHT_TIME, TWR.RESULT_TARE_WEIGHT_TIME)
|
|
|
+ and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= GREATEST(TWR.RESULT_GROSS_WEIGHT_TIME, TWR.RESULT_TARE_WEIGHT_TIME)
|
|
|
</if>
|
|
|
)
|
|
|
<where>
|
|
@@ -1928,6 +1947,12 @@
|
|
|
"materialName" in #{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
+ <if test="materialTypeName!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="materialTypeName" item="item" open="(" separator="," close=")">
|
|
|
+ "materialTypeName" in #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
</where>
|
|
|
<include refid="orderBy"></include>
|
|
|
</select>
|
|
@@ -1994,5 +2019,9 @@
|
|
|
order by oo.order_id desc
|
|
|
)
|
|
|
</select>
|
|
|
+ <select id="selectDetailsByOrder" resultType="java.lang.Integer" parameterType="decimal">
|
|
|
+ SELECT count(BDO.DETAILS_ID) FROM BMSTRUCK_DETAILS_ORDER BDO
|
|
|
+ WHERE BDO.ORDER_ID = #{orderId}
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|