<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="本地计量">








    <query  id="MatOutServer.doQueryWasteInfo" desc="查询废品出库信息">
        <![CDATA[
       SELECT *
    FROM (SELECT *
    FROM (SELECT T.OUTSTOCK_DOC,
    MAX(Y1.STORAGE_NAME) STORAGE_NAME_FROM,
    MAX(Y2.STORAGE_NAME) STORAGE_NAME_TO,
    T.VEHICLE_NO,
    SUM(T.ACT_COUNT) ACT_COUNT,
    SUM(T.ACT_WEIGHT) ACT_WEIGHT,
    MAX(T.OUTSTOCK_TIME) OUTSTOCK_TIME
    FROM YDM_BC_OUTLIST T
    LEFT JOIN YDM_BS_STORAGE Y1
    ON T.STORAGE_NO = Y1.STORAGE_NO
    LEFT JOIN YDM_BS_STORAGE Y2
    ON T.TAR_STORAGE_NO = Y2.STORAGE_NO
    WHERE T.TAR_STORAGE_NO = 'LFG2'
    AND OUTSTOCK_TYPE_CODE = '800803'
    AND TAR_REC_FLAG = '0'
    AND T.VEHICLE_NO = ?
    AND T.VALIDFLAG ='1'
        AND T.PONDER_NO  IS NULL
    AND T.PONDER_GROSS_WT IS NULL
    GROUP BY T.OUTSTOCK_DOC, T.VEHICLE_NO)
    ORDER BY OUTSTOCK_TIME DESC) T
    WHERE ROWNUM = 1

           ]]>
    </query>


    <query  id="MatOutServer.doQueryOutList" desc="查询出库单信息">
        <![CDATA[
       SELECT * FROM YDM_BC_OUTLIST T WHERE T.OUTSTOCK_DOC  =?  AND T.VALIDFLAG ='1'
           ]]>
    </query>



    <query  id="MatOutServer.doUpdateOutList" desc="查询出库单信息">
        <![CDATA[

    UPDATE YDM_BC_OUTLIST T
    SET T.PONDER_NO = ?, T.PONDER_GROSS_WT = ?
    WHERE T.OUTSTOCK_SQE = ?

           ]]>
    </query>




</queryMap>