|
@@ -400,6 +400,8 @@
|
|
rm.MATERIAL_NAME as "materialName",
|
|
rm.MATERIAL_NAME as "materialName",
|
|
db.RESULT_FOREIGN_SHIP_NAME as "resultForeignShipName",
|
|
db.RESULT_FOREIGN_SHIP_NAME as "resultForeignShipName",
|
|
wgm.BATCH_ID as "batchId",
|
|
wgm.BATCH_ID as "batchId",
|
|
|
|
+ wgm.GM_ID "gmId",
|
|
|
|
+ wgm.PORT_ID "portId",
|
|
wgm.GM_TONNAGE as "afterTonnage",--点后实时批次库存
|
|
wgm.GM_TONNAGE as "afterTonnage",--点后实时批次库存
|
|
case when AfterIn."sumIn" is not null and AfterOut."sumOut" is not null
|
|
case when AfterIn."sumIn" is not null and AfterOut."sumOut" is not null
|
|
then wgm.GM_TONNAGE-AfterIn."sumIn"+AfterOut."sumOut"
|
|
then wgm.GM_TONNAGE-AfterIn."sumIn"+AfterOut."sumOut"
|
|
@@ -521,13 +523,13 @@
|
|
GROUP BY WOR.BATCH_ID) AfterOut ON AfterOut."batchId"=WGM.BATCH_ID
|
|
GROUP BY WOR.BATCH_ID) AfterOut ON AfterOut."batchId"=WGM.BATCH_ID
|
|
WHERE wgm.DELETED = 0
|
|
WHERE wgm.DELETED = 0
|
|
and RP.PORT_NAME = '万州港'
|
|
and RP.PORT_NAME = '万州港'
|
|
- and wgm.GM_TONNAGE > 0
|
|
|
|
- <if test="con!=null">
|
|
|
|
|
|
+ <if test="con!=null and con!=''.toString()">
|
|
and rm.MATERIAL_NAME || rp.PORT_NAME || db.RESULT_FOREIGN_SHIP_NAME like CONCAT(CONCAT('%',#{con}),'%')
|
|
and rm.MATERIAL_NAME || rp.PORT_NAME || db.RESULT_FOREIGN_SHIP_NAME like CONCAT(CONCAT('%',#{con}),'%')
|
|
</if>
|
|
</if>
|
|
ORDER BY rm.MATERIAL_NAME
|
|
ORDER BY rm.MATERIAL_NAME
|
|
)
|
|
)
|
|
<where>
|
|
<where>
|
|
|
|
+ "gmTonnage" > 0 or "afterTonnage" > 0
|
|
<if test="portName != null">
|
|
<if test="portName != null">
|
|
and
|
|
and
|
|
<foreach collection="portName" item="item" open="(" separator="," close=")">
|
|
<foreach collection="portName" item="item" open="(" separator="," close=")">
|