|
@@ -504,104 +504,7 @@
|
|
|
</if>
|
|
|
</sql>
|
|
|
|
|
|
- <!-- 查询所有签收实绩 -->
|
|
|
- <select id="getCGReceiptResult" parameterType="java.util.Map" resultType="java.util.Map">
|
|
|
- select
|
|
|
- *
|
|
|
- from (
|
|
|
- select
|
|
|
- OO.ORDER_ID "orderId",
|
|
|
- TRR.RESULT_ID "resultId",
|
|
|
- APO.PURCHASE_ORDER_NO "purchaseOrderNo",
|
|
|
- RM.MATERIAL_NAME "materialName",
|
|
|
- OO.ORDER_NUMBER "orderNumber",
|
|
|
- RC.CAPACITY_NUMBER "capacityNumber",
|
|
|
- DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
|
|
|
- TUR.UNLOAD_STATUS "unloadStatus",
|
|
|
- TWR.RESULT_NET_WEIGHT "resultNetWeight",
|
|
|
- RW.WAREHOUSE_NAME "warehouseName",
|
|
|
- TRR.INSERT_USERNAME "insertUsername",
|
|
|
- TRR.INSERT_TIME "insertTime"
|
|
|
- from TMSTRUCK_RECEIPT_RESULT TRR
|
|
|
- left join TMSTRUCK_TOTAL_RESULT TTR
|
|
|
- on TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
|
|
|
- left join OMSTRUCK_ORDER OO
|
|
|
- on OO.ORDER_ID = TTR.ORDER_ID
|
|
|
- left join AMS_PURCHASE_ORDER APO
|
|
|
- on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
|
|
|
- left join DIL_BATCH DB
|
|
|
- on DB.BATCH_ID = APO.BATCH_ID
|
|
|
- left join RMS_CAPACITY RC
|
|
|
- on RC.CAPACITY_ID = OO.CAPACITY_ID
|
|
|
- left join TMSTRUCK_WEIGHT_RESULT TWR
|
|
|
- on TWR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
|
|
|
- left join TMSTRUCK_UNLOAD_RESULT TUR
|
|
|
- on TUR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
|
|
|
- left join OMSTRUCK_ORDER_MATERIAL OOM
|
|
|
- on OOM.ORDER_ID = OO.ORDER_ID
|
|
|
- left join RMS_MATERIAL RM
|
|
|
- on OOM.MATERIAL_ID = RM.MATERIAL_ID
|
|
|
- left join RMS_WAREHOUSE RW
|
|
|
- on RW.WAREHOUSE_ID = TUR.RESULT_UNLOAD_PLACE_ID
|
|
|
- where TRR.STATUS = 1 and OO.ORDER_TYPE = #{orderTypee}
|
|
|
- )
|
|
|
- <where>
|
|
|
- <if test="purchaseOrderNo != null">
|
|
|
- <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
|
|
|
- "purchaseOrderNo" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="materialName != null">
|
|
|
- and
|
|
|
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
|
|
|
- "materialName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="orderNumber != null">
|
|
|
- and
|
|
|
- <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
|
|
|
- "orderNumber" 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="resultForeignShipName != null">
|
|
|
- and
|
|
|
- <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
|
|
|
- "resultForeignShipName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="unloadStatus != null">
|
|
|
- and
|
|
|
- <foreach collection="unloadStatus" item="item" open="(" separator="or" close=")">
|
|
|
- "unloadStatus" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultNetWeight != null">
|
|
|
- and
|
|
|
- <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
|
|
|
- "resultNetWeight" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="warehouseName != null">
|
|
|
- and
|
|
|
- <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
|
|
|
- "warehouseName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="insertUsername != null">
|
|
|
- and
|
|
|
- <foreach collection="insertUsername" item="item" open="(" separator="or" close=")">
|
|
|
- "insertUsername" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- <include refid="orderBy"></include>
|
|
|
- </select>
|
|
|
+
|
|
|
|
|
|
|
|
|
<!-- 查询内转钢材到异地库收货实绩-->
|