|
@@ -1098,4 +1098,59 @@
|
|
and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
|
|
and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+ <select id="getLoading" parameterType="map" resultType="java.util.Map">
|
|
|
|
+ SELECT * FROM(
|
|
|
|
+ SELECT MATERIAL_NAME "materialName",
|
|
|
|
+ COUNT(RC.CAPACITY_NUMBER) "capacityNumber",
|
|
|
|
+ WAREHOUSE_NAME "warehouseName"
|
|
|
|
+ FROM TMSTRUCK_LOAD_RESULT TLR
|
|
|
|
+ LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
|
|
|
|
+ ON TTR.RESULT_TOTAL_ID = TLR.RESULT_TOTAL_ID
|
|
|
|
+ LEFT JOIN OMSTRUCK_ORDER OO
|
|
|
|
+ ON OO.ORDER_ID = TTR.ORDER_ID
|
|
|
|
+ LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM
|
|
|
|
+ ON OOM.ORDER_ID = OO.ORDER_ID
|
|
|
|
+ LEFT JOIN RMS_MATERIAL RM
|
|
|
|
+ ON RM.MATERIAL_ID = OOM.MATERIAL_ID
|
|
|
|
+ LEFT JOIN RMS_CAPACITY RC
|
|
|
|
+ ON RC.CAPACITY_ID = OO.CAPACITY_ID
|
|
|
|
+ LEFT JOIN RMS_WAREHOUSE RW
|
|
|
|
+ ON RW.WAREHOUSE_ID = TLR.LOADING_ID
|
|
|
|
+ WHERE OO.ORDER_TYPE = 11
|
|
|
|
+ AND TLR.RESULT_LOAD_START_TIME IS NOT NULL
|
|
|
|
+ <if test="oneDate != null and (con ==null || con == '') ">
|
|
|
|
+ and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') < = TLR.INSERT_TIME
|
|
|
|
+ </if>
|
|
|
|
+ <if test="startDate != null">
|
|
|
|
+ and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= TLR.INSERT_TIME
|
|
|
|
+ and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TLR.INSERT_TIME
|
|
|
|
+ </if>
|
|
|
|
+ GROUP BY MATERIAL_NAME, WAREHOUSE_NAME
|
|
|
|
+ )
|
|
|
|
+ <where>
|
|
|
|
+ <if test="materialName != null">
|
|
|
|
+ and
|
|
|
|
+ <foreach collection="materialName" item="item" open="(" separator="or" close=")">
|
|
|
|
+ "materialName" like '%${item}%'
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="capacityNumber != null">
|
|
|
|
+ and
|
|
|
|
+ <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
|
|
|
|
+ "capacityNumber" like '%${item}%'
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="warehouseName != null">
|
|
|
|
+ and
|
|
|
|
+ <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
|
|
|
|
+ "warehouseName" like '%${item}%'
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="getUnLoading" parameterType="map" resultType="java.util.Map">
|
|
|
|
+
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|