<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc = "调整位置">
<query id = "FrmPipupdateStoreButress.selectMatStu" desc = "查询材料状态">
SELECT COUNT(1)ACOUNT
  FROM MAT_ZC_M T,YDM_ZC_BUTTRESS S
 WHERE T.MAT_NO = S.MAT_NO
   AND T.JUDGE_STOVE_NO = ?
   AND T.BATCH_NO = ?
   AND T.BATCH_GROUD_NO = ?
   AND T.PRODUCT_FLAG = ?
   AND NVL(T.ORDER_NO,'/') = NVL(?,'/')
   AND NVL(T.ORDER_SEQ,'/') = NVL(?,'/')
   AND NVL(T.ORDER_SEQ_NO,'/') = NVL(?,'/')
   AND NVL(T.FINISHPRO_MOLD,'/') = NVL(?,'/')
   AND T.MAT_STATUS = ?
   AND T.MAT_STATUS NOT IN('80150301', '80150202', '80150204', '80150205')
</query>
<query id = "FrmPipupdateStoreButress.selectMatNo" desc = "查询出材料号">
<![CDATA[
SELECT G.MAT_NO FROM (SELECT T.MAT_NO
  FROM MAT_ZC_M T, YDM_ZC_BUTTRESS S
 WHERE T.MAT_NO = S.MAT_NO
   AND T.JUDGE_STOVE_NO = ?
   AND T.BATCH_NO = ?
   AND T.BATCH_GROUD_NO = ?
   AND T.PRODUCT_FLAG = ?
   AND S.STORAGE_NO = ?
   AND NVL(T.FINISHPRO_MOLD,'/') = NVL(?,'/')
   AND NVL(T.IN_MOLD,'/') = NVL(?,'/') 
   ORDER BY T.MAT_NO DESC) G
   WHERE ROWNUM<?
   ]]>
</query>
<query id = "FrmPipupdateStoreButress.updateButress" desc = "修改位置表">
UPDATE YDM_ZC_BUTTRESS T SET T.STORAGE_NO = ?,T.LOCATION_NO = ? WHERE T.MAT_NO = ?
</query>
<query id = "FrmPipupdateStoreButress.updateInList" desc = "修改入库表位置">
UPDATE YDM_ZC_INLIST T SET T.STORAGE_NO = ?,T.LOCATION_NO = ? WHERE T.MAT_NO = ?
</query>
<query id = "FrmPipupdateStoreButress.selectWgt" desc = "查询重量">

</query>
</queryMap>