|
@@ -1238,18 +1238,16 @@
|
|
|
select
|
|
|
*
|
|
|
from(
|
|
|
- select TER.RESULT_ID "resultId",
|
|
|
- APO.PURCHASE_ORDER_NO "purchaseOrderNo",
|
|
|
- RM.MATERIAL_NAME "materialName",
|
|
|
- DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
|
|
|
- OO.ORDER_NUMBER "orderNumber",
|
|
|
- RC.CAPACITY_NUMBER "capacityNumber",
|
|
|
- RG.GATEPOST_NAME "gatepostName",
|
|
|
- TER.RESULT_ENTRY_MODE "resultEntryMode",
|
|
|
- TER.RESULT_ENTRY_GATE_TIME "resultEntryGateTime",
|
|
|
- RS.SUPPLIER_NAME "supplierName",
|
|
|
- OOM.ORDER_MATERIAL_WEIGHT "orderMaterialWeight",
|
|
|
- TER.INSERT_TIME "insertTime",
|
|
|
+ select TER.RESULT_ID "resultId",
|
|
|
+ APO.PURCHASE_ORDER_NO "purchaseOrderNo",
|
|
|
+ RM.MATERIAL_NAME "materialName",
|
|
|
+ OO.ORDER_NUMBER "orderNumber",
|
|
|
+ RC.CAPACITY_NUMBER "capacityNumber",
|
|
|
+ RG.GATEPOST_NAME "gatepostName",
|
|
|
+ TER.RESULT_ENTRY_MODE "resultEntryMode",
|
|
|
+ to_char(TER.RESULT_ENTRY_GATE_TIME, 'yyyy-mm-dd hh:mm:ss') "resultEntryGateTime",
|
|
|
+ RS.SUPPLIER_NAME "supplierName",
|
|
|
+ TER.INSERT_TIME "insertTime",
|
|
|
RCON.CONSIGNEE_COMPANY_NAME "consigneeCompanyName"
|
|
|
from TMSTRUCK_ENFACTORY_RESULT TER
|
|
|
left join TMSTRUCK_TOTAL_RESULT TTR
|
|
@@ -1280,6 +1278,9 @@
|
|
|
on RG.GATEPOST_ID = TER.GATEPOST_ID
|
|
|
where TER.RESULT_ENTRY_GATE_TIME is not null
|
|
|
and OO.ORDER_TYPE = 10
|
|
|
+ <if test="userId">
|
|
|
+ and air.INSERT_USERNAME=#{userId}
|
|
|
+ </if>
|
|
|
)
|
|
|
<where>
|
|
|
<if test="purchaseOrderId != null">
|
|
@@ -1342,12 +1343,11 @@
|
|
|
select TLFR.RESULT_ID "resultId",
|
|
|
APO.PURCHASE_ORDER_NO "purchaseOrderNo",
|
|
|
RM.MATERIAL_NAME "materialName",
|
|
|
- DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
|
|
|
OO.ORDER_NUMBER "orderNumber",
|
|
|
RC.CAPACITY_NUMBER "capacityNumber",
|
|
|
RG.GATEPOST_NAME "gatepostName",
|
|
|
TLFR.RESULT_OUT_MODE "resultOutMode",
|
|
|
- TLFR.RESULT_OUT_GATE_TIME "resultOutGateTime",
|
|
|
+ to_char(TLFR.RESULT_OUT_GATE_TIME, 'yyyy-mm-dd hh:mm:ss') "resultOutGateTime",
|
|
|
TLFR.RESULT_TRUCK_SNAPSHOT_PICTURE "resultTruckSnapshotPicture"
|
|
|
from TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
|
|
|
left join TMSTRUCK_TOTAL_RESULT TTR
|
|
@@ -1374,6 +1374,27 @@
|
|
|
on RG.GATEPOST_ID = TLFR.GATEPOST_ID
|
|
|
where RESULT_OUT_GATE_TIME is not null
|
|
|
and OO.ORDER_TYPE = 10
|
|
|
+ <if test="userId !=null">
|
|
|
+ and AIR.INSERT_USERNAME = #{userId}
|
|
|
+ </if>
|
|
|
order by tlfr.result_out_gate_time
|
|
|
+ <where>
|
|
|
+ <if test="capacityNumber != null">
|
|
|
+ <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
|
|
|
+ "capacityNumber" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="materialName != null">
|
|
|
+ <foreach collection="materialName" item="item" open="(" separator="or" close=")">
|
|
|
+ "materialName" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="gatepostName != null">
|
|
|
+ <foreach collection="gatepostName" item="item" open="(" separator="or" close=")">
|
|
|
+ "gatepostName" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
</select>
|
|
|
+
|
|
|
</mapper>
|