<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="">
	<query id="CraftOrdDesignStdDic.existDicLgColligate" desc="查询">
        <![CDATA[
SELECT COUNT(1)
  FROM CRAFT_ORD_DESIGN_STD_DIC T
 WHERE T.DESGIN_KEY = {0}
   AND T.MSC_PLINE = {1}
   AND T.PROCESS_CODE IN ('A', 'B', 'C')
        ]]>
    </query>
    
    <query id="CraftOrdDesignStdDic.getByOrdLnPkNoDic" desc="通过交货行PK查">
        <![CDATA[
SELECT A.*
  FROM CRAFT_ORD_DESIGN_STD_DIC A,
       CRAFT_ORD_DESIGN B
 WHERE A.DESGIN_KEY = B.DESGIN_KEY
   AND B.ORD_LN_PK = {0}
   AND B.CRAFT_SEQ = {1}
   AND A.MSC_PLINE = {2}
   AND A.PROCESS_CODE = {3}
        ]]>
    </query>
    
    <query id="CraftOrdDesignStdDic.getByOrdLnPkGroupByDicGroupSeq" desc="通过交货行PK查">
        <![CDATA[
SELECT A.DIC, A.GROUP_SEQ
  FROM CRAFT_ORD_DESIGN_STD_DIC A,
       CRAFT_ORD_DESIGN B
 WHERE A.DESGIN_KEY = B.DESGIN_KEY
   AND B.ORD_LN_PK = {0}
   AND B.CRAFT_SEQ = {1}
   AND A.MSC_PLINE = {2}
   AND A.PROCESS_CODE = {3}
 GROUP BY A.DIC, A.GROUP_SEQ
        ]]>
    </query>
    
    <query id="CraftOrdDesignStdDic.getByOrdLnPkDicGroupSeq" desc="通过交货行PK查">
        <![CDATA[
SELECT A.*
  FROM CRAFT_ORD_DESIGN_STD_DIC A,
       CRAFT_ORD_DESIGN B
 WHERE A.DESGIN_KEY = B.DESGIN_KEY
   AND B.ORD_LN_PK = {0}
   AND B.CRAFT_SEQ = {1}
   AND A.MSC_PLINE = {2}
   AND A.PROCESS_CODE = {3}
   AND A.DIC = {4}
   AND ({5} IS NULL AND A.GROUP_SEQ IS NULL OR A.GROUP_SEQ = {5})
        ]]>
    </query>
    
    <query id="CraftOrdDesignStdDic.getByOrdLnPkDic" desc="通过交货行PK查">
        <![CDATA[
SELECT A.*
  FROM CRAFT_ORD_DESIGN_STD_DIC A,
       CRAFT_ORD_DESIGN B
 WHERE A.DESGIN_KEY = B.DESGIN_KEY
   AND B.ORD_LN_PK = {0}
   AND B.CRAFT_SEQ = {1}
   AND A.MSC_PLINE = {2}
   AND A.PROCESS_CODE = {3}
   AND A.DIC = {4}
        ]]>
    </query>
    
    <query id="CraftOrdDesignStdDic.getByOrdLnPkJudge" desc="探伤标准">
        <![CDATA[
SELECT A.PHY_NAME,
       A.POSITION_DESC,
       NVL(A2.BASENAME,A.STD_DESC)     STD_DESC,
       A.LV_DESC,
       A.GROOVE_POS,
       A.GROOVE_DIR,
       A.DESC_RATE,
       A.DESC_VAL,
       A.MEMO,
       A.COVERAGE,
       A.GROUP_SEQ
  FROM CRAFT_ORD_DESIGN_STD_DIC A
  LEFT JOIN COM_BASE_INFO A2
    ON A2.BASECODE = A.STD_DESC, CRAFT_ORD_DESIGN B
 WHERE A.DESGIN_KEY = B.DESGIN_KEY
   AND B.ORD_LN_PK = {0}
   AND B.CRAFT_SEQ = {1}
   AND A.MSC_PLINE = {2}
   AND A.PROCESS_CODE = {3}
        ]]>
    </query>
</queryMap>