<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="">    
    <query id="JdgPlnZyRclM.queryByJudgeStoveNo" desc="查询轧管炉计划">
        <![CDATA[
SELECT T.*
  FROM PLN_ZY_RCL_M T
 WHERE T.JUDGE_STOVE_NO = {0}
   AND ROWNUM <= 1
        ]]>
    </query>
    <query id="JdgPlnZyRclM.queryByPk" desc="查询轧管炉计划">
        <![CDATA[
SELECT T.*
  FROM PLN_ZY_RCL_M T
 WHERE T.HEAT_PLAN_NO = {0}
        ]]>
    </query>
     <query id="JdgPlnZyRclM.queryLotNoGroupInfo" desc="查询热处理炉计划">
        <![CDATA[
SELECT T.ZY_BATCH_ID LOT_NO, T.JUDGE_STOVE_NO, T.LOT_NO_GROUP, A.CRAFT_SOURCE, B.PHY_NAME_MAX
  FROM PLN_ZY_RCL_M T, QCM_ZC_CHECKCONSIGN A, QCM_ZC_CHECKCONSIGN_DETAIL B
 WHERE T.ZY_BATCH_ID = {0}
   AND A.JUDGE_STOVE_NO = T.JUDGE_STOVE_NO
   AND A.ORD_LN_DLY_PK = T.ORD_LN_DLY_PK
   AND A.IS_FLAG = '0'
   AND B.CHECK_NO = A.CHECK_NO
   AND B.BATCH_NO = A.BATCH_NO
   AND B.RATE = '408601'
 GROUP BY T.ZY_BATCH_ID, T.JUDGE_STOVE_NO, T.LOT_NO_GROUP, A.CRAFT_SOURCE, B.PHY_NAME_MAX
 ORDER BY T.LOT_NO_GROUP, T.JUDGE_STOVE_NO, A.CRAFT_SOURCE, B.PHY_NAME_MAX
        ]]>
    </query>

    <query id="JdgPlnZyRclM.queryUpperByPk" desc="查询炉计划">
        <![CDATA[
SELECT T.UPPER_HEATPLAN_ID, T.UPPER_PROCESS_CODE FROM PLN_ZY_RCL_M T WHERE T.HEAT_PLAN_NO = {0}
        ]]>
    </query>
</queryMap>