<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="">

	<query id="IDeliveryStdDao.getQuoteMsc" desc="查詢引用冶金规范码">
         <![CDATA[
      SELECT T.MSC_SEQ
        FROM COM_MSC T
       WHERE T.MSC = ?
         AND T.VALIDFLAG = 'C'
             ]]>
	</query>
	
	<query id="IDeliveryStdDao.getWaterRatioStd" desc="查询引用水压标准">
         <![CDATA[
     SELECT T.STD_CODE, T.STD_STYLE
       FROM COM_BASE_WATER_RATIO_STD T
      WHERE T.STD_CODE_C = ?
        AND T.STD_STYLE_C = ? 
        AND T.VALIDFLAG=1
             ]]>
	</query>
	
	<query id="IDeliveryStdDao.getWaterRatio" desc="查询水压系数">
         <![CDATA[
      SELECT A.RATIO_ID,
       STD_CODE,
       STD_NAME,
       SIZE_MIN_SIGN,
       SIZE_MIN,
       SIZE_MAX_SIGN,
       SIZE_MAX,
       RATIO_STD,
       RATIO_REPLACE,
       MAX_PRESS,
       NVL(STD_STYLE, '004') STD_STYLE,
       STD_STYLE_DESC,
       B.MODEL_CODE,
       B.MODEL_DESC,
       C.STEELCODE
  FROM COM_BASE_WATER_RATIO A
  JOIN COM_BASE_WATER_RATIO_MODEL B
    ON A.RATIO_ID = B.RATIO_ID
  JOIN COM_BASE_WATER_RATIO_STEEL C
    ON A.RATIO_ID = C.RATIO_ID
 WHERE (B.MODEL_CODE = 'C001' OR B.MODEL_CODE = ?)
   AND A.STD_CODE = ?
   AND C.STEELCODE = ?
   AND (A.STD_STYLE = '004' OR A.STD_STYLE = ?)
   AND A.VALIDFLAG = 1
   AND B.VALIDFLAG = 1
   AND C.VALIDFLAG = 1
             ]]>
	</query>
	
	<query id="IDeliveryStdDao.getChemIndex" desc="查询成分索引号">
         <![CDATA[
      SELECT P.CIC, P.MODEL_CODE
       FROM (SELECT T.CIC, NVL(T.MODEL_CODE, 'C001') MODEL_CODE
               FROM COM_MSC_STD_CIC T
              WHERE T.MSC = ?
                AND T.VALIDFLAG = 3) P
      WHERE INSTR(P.MODEL_CODE, ?) > 0
        OR (P.MODEL_CODE = 'C001' AND NOT EXISTS
           (SELECT 1
             FROM (SELECT T.CIC, NVL(T.MODEL_CODE, 'C001') MODEL_CODE
                     FROM COM_MSC_STD_CIC T
                    WHERE T.MSC = ?
                      AND T.VALIDFLAG = 3) A
                    WHERE INSTR(A.MODEL_CODE, ?) > 0))
   ORDER BY P.MODEL_CODE DESC
             ]]>
	</query>
	
	<query id="IDeliveryStdDao.getPhyIndex" desc="查询理化索引号">
         <![CDATA[
      SELECT P.PIC, P.MODEL_CODE
  FROM (SELECT T.PIC, NVL(T.MODEL_CODE, 'C001') MODEL_CODE
          FROM COM_MSC_STD_PIC T
         WHERE T.MSC = ?
           AND T.VALIDFLAG = 3) P
 WHERE INSTR(P.MODEL_CODE, ?) > 0
    OR (P.MODEL_CODE = 'C001' AND NOT EXISTS
        (SELECT 1
           FROM (SELECT T.PIC, NVL(T.MODEL_CODE, 'C001') MODEL_CODE
                   FROM COM_MSC_STD_PIC T
                  WHERE T.MSC = ?
                    AND T.VALIDFLAG = 3) A
          WHERE INSTR(A.MODEL_CODE, ?) > 0))
 ORDER BY P.MODEL_CODE DESC
             ]]>
	</query>
	
	<query id="IDeliveryStdDao.getSpecIndex" desc="查询公差索引号">
         <![CDATA[
    SELECT P.SIC
  FROM (SELECT T.SIC, NVL(T.MODEL_CODE, 'C001') MODEL_CODE
          FROM COM_MSC_STD_SPEC T
         WHERE T.MSC = ?
           AND T.VALIDFLAG = 3) P
 WHERE INSTR(P.MODEL_CODE, ?) > 0
    OR (P.MODEL_CODE = 'C001' AND NOT EXISTS
        (SELECT 1
           FROM (SELECT T.SIC, NVL(T.MODEL_CODE, 'C001') MODEL_CODE
                   FROM COM_MSC_STD_SPEC T
                  WHERE T.MSC = ?
                    AND T.VALIDFLAG = 1) Q
          WHERE INSTR(Q.MODEL_CODE, ?) > 0))
 ORDER BY P.MODEL_CODE DESC
             ]]>
	</query>
	
	<query id="IDeliveryStdDao.getDeteIndex" desc="查询探伤索引号">
         <![CDATA[
    SELECT P.DIC, P.MSC, P.MODEL_CODE
  FROM (SELECT T.DIC, NVL(T.MODEL_CODE, 'C001') MODEL_CODE, MSC
          FROM COM_MSC_STD_DETECTION T
         WHERE T.MSC = ?
           AND T.VALIDFLAG = 3) P
 WHERE INSTR(P.MODEL_CODE, ?) > 0
    OR (P.MODEL_CODE = 'C001' AND NOT EXISTS
        (SELECT 1
           FROM (SELECT T.DIC, NVL(T.MODEL_CODE, 'C001') MODEL_CODE, MSC
                   FROM COM_MSC_STD_DETECTION T
                  WHERE T.MSC = ?
                    AND T.VALIDFLAG = 3) Q
          WHERE INSTR(Q.MODEL_CODE, ?) > 0))
 ORDER BY P.MODEL_CODE DESC
             ]]>
	</query>
	
	<query id="IDeliveryStdDao.getWaterIndex" desc="查询水压索引号">
         <![CDATA[
   SELECT *
  FROM COM_MSC_STD_WATER W
 WHERE W.WIC IN
       (SELECT P.WIC
          FROM (SELECT WIC, NVL(T.MODEL_CODE, 'C001') MODEL_CODE
                  FROM COM_MSC_STD_WATER T
                 WHERE T.MSC = ?
                   AND T.VALIDFLAG = 3) P
         WHERE INSTR(P.MODEL_CODE, ?) > 0
            OR (P.MODEL_CODE = 'C001' AND NOT EXISTS
                (SELECT 1
                   FROM (SELECT WIC, NVL(T.MODEL_CODE, 'C001') MODEL_CODE
                           FROM COM_MSC_STD_WATER T
                          WHERE T.MSC = ?
                            AND T.VALIDFLAG = 3) Q
                  WHERE INSTR(Q.MODEL_CODE, ?) > 0)))
             ]]>
	</query>
	
	<query id="IDeliveryStdDao.getGicIndex" desc="查询加工索引号">
         <![CDATA[
   SELECT P.GIC, P.MODEL_CODE
  FROM (SELECT T.GIC, NVL(T.MODEL_CODE, 'C001') MODEL_CODE, MSC
          FROM COM_MSC_STD_PROCESS T
         WHERE T.MSC = ?
           AND T.VALIDFLAG = 1) P
 WHERE INSTR(P.MODEL_CODE, ?) > 0
    OR (P.MODEL_CODE = 'C001' AND NOT EXISTS
        (SELECT 1
           FROM (SELECT T.GIC, NVL(T.MODEL_CODE, 'C001') MODEL_CODE
                   FROM COM_MSC_STD_PROCESS T
                  WHERE T.MSC = ?
                    AND T.VALIDFLAG = 1) Q
          WHERE INSTR(Q.MODEL_CODE, ?) > 0))
 ORDER BY P.MODEL_CODE DESC
             ]]>
	</query>
	

    <query id="IDeliveryStdDao.getStandardByMsc" desc="查询索引号">
         <![CDATA[
    SELECT A.CIC, B.PIC, C.SIC, D.DIC, E.WIC,F.GIC
  FROM COM_MSC T
  LEFT JOIN COM_MSC_STD_CIC A
    ON T.MSC = A.MSC
   AND A.VALIDFLAG = 1
   AND DECODE(?, NULL, '1', A.MODEL_CODE) = DECODE(?, NULL, '1', ?)
  LEFT JOIN COM_MSC_STD_PIC B
    ON T.MSC = B.MSC
   AND B.VALIDFLAG = 1
   AND DECODE(?, NULL, '1', B.MODEL_CODE) = DECODE(?, NULL, '1', ?)
  LEFT JOIN COM_MSC_STD_SPEC C
    ON T.MSC = C.MSC
   AND C.VALIDFLAG = 1
   AND DECODE(?, NULL, '1', C.MODEL_CODE) = DECODE(?, NULL, '1', ?)
  LEFT JOIN COM_MSC_STD_DETECTION D
    ON T.MSC = D.MSC
   AND D.VALIDFLAG = 1
   AND DECODE(?, NULL, '1', D.MODEL_CODE) = DECODE(?, NULL, '1', ?)
  LEFT JOIN COM_MSC_STD_WATER E
    ON T.MSC = E.MSC
   AND E.VALIDFLAG = 1
   AND DECODE(?, NULL, '1', E.MODEL_CODE) = DECODE(?, NULL, '1', ?)
  LEFT JOIN COM_MSC_STD_PROCESS F
    ON T.MSC = F.MSC
   AND E.VALIDFLAG = 1
   AND DECODE(?, NULL, '1', F.MODEL_CODE) = DECODE(?, NULL, '1', ?)
 WHERE T.MSC = ?
             ]]>
	</query>
	
	 <query id="IDeliveryStdDao.addStand" desc="增加质量设计交付标准">
         <![CDATA[
       INSERT INTO SLM_ORD_DESIGN_STD(
        DESGIN_KEY,
        CIC,
        PIC,
        SIC,
        DIC,
        WIC,
        GIC)
 VALUES( 
        '#DESGIN_KEY#',
        '#CIC#',
        '#PIC#',
        '#SIC#',
        '#DIC#',
        '#WIC#',
        '#GIC#')
             ]]>
	</query>
	
	<query id="IDeliveryStdDao.getChem" desc="查询交付成分标准">
         <![CDATA[
      SELECT CIC,
       INDEX_SEQ,
       CHEM_CODE,
       CHEM_NAME,
       CHEM_TYPE,
       CHEM_FORMULA,
       ISCHECK,
       ISJUDGE,
       ISQUOTE,
       COMPLEX_TYPE,
       STDMIN_SIGN,
       STDMIN,
       STDMAX_SIGN,
       STDMAX,
       STDTARGET,
       MODEL_CODE,
       MODEL_DESC,
       STDMEMO,
       ELE_CODE,
       ELE_NAME,
       ELE_MIN_SIGN,
       ELE_MIN,
       ELE_MAX_SIGN,
       ELE_MAX,
       SIZE_CODE2,
       SIZE_NAME2,
       SIZE_MIN_SIGN2,
       SIZE_MIN2,
       SIZE_MAX_SIGN2,
       SIZE_MAX2,
       SIZE_CODE,
       SIZE_NAME,
       SIZE_MIN_SIGN,
       SIZE_MIN,
       SIZE_MAX_SIGN,
       SIZE_MAX,
       SPEC_JG,
       SPEC_JG_DESC,
       REP_CODE,
       REP_NAME,
       REP_MIN_SIGN,
       REP_MIN,
       REP_MAX_SIGN,
       REP_MAX,
       REP_VAL
  FROM COM_MSC_STD_CHEM T
 WHERE T.CIC = ?
   AND T.VALIDFLAG = 1
             ]]>
	</query>
	
	<query id="IDeliveryStdDao.saveChem" desc="保存质量设计成分标准">
         <![CDATA[
        INSERT INTO SLM_ORD_DESIGN_STD_CIC(
        DESGIN_KEY,
        CIC,
        USE_CODE,
        USE_DESC,
        SPECL_FL,
        INDEX_SEQ,
        CHEM_CODE,
        CHEM_NAME,
        CHEM_TYPE,
        CHEM_FORMULA,
        ISCHECK,
        ISJUDGE,
        ISQUOTE,
        COMPLEX_TYPE,
        STDMIN_SIGN,
        STDMIN,
        STDMAX_SIGN,
        STDMAX,
        STDTARGET,
        MODEL_CODE,
        MODEL_DESC,
        STDMEMO,
        ELE_CODE,
        ELE_NAME,
        ELE_MIN_SIGN,
        ELE_MIN,
        ELE_MAX_SIGN,
        ELE_MAX,
        SIZE_CODE2,
        SIZE_NAME2,
        SIZE_MIN_SIGN2,
        SIZE_MIN2,
        SIZE_MAX_SIGN2,
        SIZE_MAX2,
        SIZE_CODE,
        SIZE_NAME,
        SIZE_MIN_SIGN,
        SIZE_MIN,
        SIZE_MAX_SIGN,
        SIZE_MAX,
        SPEC_JG,
        SPEC_JG_DESC,
        VALIDFLAG,
        CREATE_NAME,
        CREATE_TIME,
        REP_CODE,
        REP_NAME,
        REP_MIN_SIGN,
        REP_MIN,
        REP_MAX_SIGN,
        REP_MAX,
        REP_VAL)
 VALUES( 
        '#DESGIN_KEY#',
        '#CIC#',
        '#USE_CODE#',
        '#USE_DESC#',
        '#SPECL_FL#',
        '#INDEX_SEQ#',
        '#CHEM_CODE#',
        '#CHEM_NAME#',
        '#CHEM_TYPE#',
        '#CHEM_FORMULA#',
        '#ISCHECK#',
        '#ISJUDGE#',
        '#ISQUOTE#',
        '#COMPLEX_TYPE#',
        '#STDMIN_SIGN#',
        '#STDMIN#',
        '#STDMAX_SIGN#',
        '#STDMAX#',
        '#STDTARGET#',
        '#MODEL_CODE#',
        '#MODEL_DESC#',
        '#STDMEMO#',
        '#ELE_CODE#',
        '#ELE_NAME#',
        '#ELE_MIN_SIGN#',
        '#ELE_MIN#',
        '#ELE_MAX_SIGN#',
        '#ELE_MAX#',
        '#SIZE_CODE2#',
        '#SIZE_NAME2#',
        '#SIZE_MIN_SIGN2#',
        '#SIZE_MIN2#',
        '#SIZE_MAX_SIGN2#',
        '#SIZE_MAX2#',
        '#SIZE_CODE#',
        '#SIZE_NAME#',
        '#SIZE_MIN_SIGN#',
        '#SIZE_MIN#',
        '#SIZE_MAX_SIGN#',
        '#SIZE_MAX#',
        '#SPEC_JG#',
        '#SPEC_JG_DESC#',
        '#VALIDFLAG#',
        '#CREATE_NAME#',
         SYSDATE,
        '#REP_CODE#',
        '#REP_NAME#',
        '#REP_MIN_SIGN#',
        '#REP_MIN#',
        '#REP_MAX_SIGN#',
        '#REP_MAX#',
        '#REP_VAL#')
             ]]>
	</query>
	
	<query id="IDeliveryStdDao.getPhy" desc="查询交付理化标准">
         <![CDATA[
       SELECT PIC,
       INDEX_SEQ,
       PHY_CODE_MAX,
       PHY_NAME_MAX,
       PHY_CODE_MIN,
       PHY_NAME_MIN,
       PHY_CODE,
       PHY_NAME,
       ITEM_CODE_F,
       ITEM_NAME_F,
       ITEM_CODE_W,
       ITEM_NAME_W,
       ITEM_CODE_S,
       ITEM_NAME_S,
       GROUP_SEQ,
       RESULT_COUNT,
       ISCHECK,
       ISJUDGE,
       ISQUOTE,
       PHY_TYPE,
       PHY_FORMULA,
       STDMIN_SIGN,
       STDMIN,
       STDMAX_SIGN,
       STDMAX,
       JUDGE_BASIS,
       DELIVERYSTATE,
       MODEL_CODE,
       MODEL_DESC,
       STDMEMO,
       SIZE_CODE2,
       SIZE_NAME2,
       SIZE_MIN_SIGN2,
       SIZE_MIN2,
       SIZE_MAX_SIGN2,
       SIZE_MAX2,
       SIZE_CODE,
       SIZE_NAME,
       SIZE_MIN_SIGN,
       SIZE_MIN,
       SIZE_MAX_SIGN,
       SIZE_MAX,
       SPEC_JG,
       SPEC_JG_DESC,
       ADDCONDITION,
       ADDSTDCON_CODE,
       ADDSTD_MIN_SIGN,
       ADDSTD_MIN,
       ADDSTD_MAX_SIGN,
       ADDSTD_MAX,
       ADDPERCENT,
       STDMIN_SIGN2,
       STDMIN2,
       STDMAX_SIGN2,
       STDMAX2,
       STD_CHOOSE
  FROM COM_MSC_STD_PHY T WHERE T.PIC=? AND T.VALIDFLAG=1

             ]]>
	</query>
	
	<query id="IDeliveryStdDao.savePhy" desc="保存质量设计理化标准">
         <![CDATA[
       INSERT INTO SLM_ORD_DESIGN_STD_PIC(
        DESGIN_KEY,
        PIC,
        USE_CODE,
        USE_DESC,
        SPECL_FL,
        INDEX_SEQ,
        PHY_CODE_MAX,
        PHY_NAME_MAX,
        PHY_CODE_MIN,
        PHY_NAME_MIN,
        PHY_CODE,
        PHY_NAME,
        ITEM_CODE_F,
        ITEM_NAME_F,
        ITEM_CODE_W,
        ITEM_NAME_W,
        ITEM_CODE_S,
        ITEM_NAME_S,
        GROUP_SEQ,
        ISCHECK,
        ISQUOTE,
        RESULT_COUNT,
        ISJUDGE,
        PHY_TYPE,
        PHY_FORMULA,
        STDMIN_SIGN,
        STDMIN,
        STDMAX_SIGN,
        STDMAX,
        JUDGE_BASIS,
        DELIVERYSTATE,
        MODEL_CODE,
        MODEL_DESC,
        STDMEMO,
        SIZE_CODE,
        SIZE_NAME,
        SIZE_MIN_SIGN,
        SIZE_MIN,
        SIZE_MAX_SIGN,
        SIZE_MAX,
        SIZE_CODE2,
        SIZE_NAME2,
        SIZE_MIN_SIGN2,
        SIZE_MIN2,
        SIZE_MAX_SIGN2,
        SIZE_MAX2,
        SPEC_JG,
        SPEC_JG_DESC,
        ADDCONDITION,
        ADDSTDCON_CODE,
        ADDSTD_MIN_SIGN,
        ADDSTD_MIN,
        ADDSTD_MAX_SIGN,
        ADDSTD_MAX,
        ADDPERCENT,
        STDMIN_SIGN2,
        STDMIN2,
        STDMAX_SIGN2,
        STDMAX2,
        STD_CHOOSE)
 VALUES( 
        '#DESGIN_KEY#',
        '#PIC#',
        '#USE_CODE#',
        '#USE_DESC#',
        '#SPECL_FL#',
        '#INDEX_SEQ#',
        '#PHY_CODE_MAX#',
        '#PHY_NAME_MAX#',
        '#PHY_CODE_MIN#',
        '#PHY_NAME_MIN#',
        '#PHY_CODE#',
        '#PHY_NAME#',
        '#ITEM_CODE_F#',
        '#ITEM_NAME_F#',
        '#ITEM_CODE_W#',
        '#ITEM_NAME_W#',
        '#ITEM_CODE_S#',
        '#ITEM_NAME_S#',
        '#GROUP_SEQ#',
        '#ISCHECK#',
        '#ISQUOTE#',
        '#RESULT_COUNT#',
        '#ISJUDGE#',
        '#PHY_TYPE#',
        '#PHY_FORMULA#',
        '#STDMIN_SIGN#',
        '#STDMIN#',
        '#STDMAX_SIGN#',
        '#STDMAX#',
        '#JUDGE_BASIS#',
        '#DELIVERYSTATE#',
        '#MODEL_CODE#',
        '#MODEL_DESC#',
        '#STDMEMO#',
        '#SIZE_CODE#',
        '#SIZE_NAME#',
        '#SIZE_MIN_SIGN#',
        '#SIZE_MIN#',
        '#SIZE_MAX_SIGN#',
        '#SIZE_MAX#',
        '#SIZE_CODE2#',
        '#SIZE_NAME2#',
        '#SIZE_MIN_SIGN2#',
        '#SIZE_MIN2#',
        '#SIZE_MAX_SIGN2#',
        '#SIZE_MAX2#',
        '#SPEC_JG#',
        '#SPEC_JG_DESC#',
        '#ADDCONDITION#',
        '#ADDSTDCON_CODE#',
        '#ADDSTD_MIN_SIGN#',
        '#ADDSTD_MIN#',
        '#ADDSTD_MAX_SIGN#',
        '#ADDSTD_MAX#',
        '#ADDPERCENT#',
        '#STDMIN_SIGN2#',
        '#STDMIN2#',
        '#STDMAX_SIGN2#',
        '#STDMAX2#',
        '#STD_CHOOSE#')
             ]]>
	</query>
	
	
	<query id="IDeliveryStdDao.getPicSample" desc="查询质量设计取样要求">
         <![CDATA[
         SELECT A.PIC,
       A.SIC,
       A.PHY_CODE_MIN,
       A.PHY_NAME_MIN,
       B.STD_CODE,
       B.STD_NAME,
       B.LENGTH,
       B.DESC_LENGTH,
       B.RATE,
       B.DESC_RATE,
       B.DESC_COUNT,
       B.POSITION,
       B.DESC_POSITION,
       B.MEMO
  FROM COM_MSC_PHY_SAMPLE A
  JOIN COM_BASE_SAMPLE B
    ON A.SIC = B.SIC
 WHERE A.PIC = ?
   AND A.PHY_CODE_MIN = ?
   AND A.VALIDFLAG = 1
   AND B.VALIDFLAG = 1
             ]]>
	</query>
	
	<query id="IDeliveryStdDao.savePicSample" desc="保存质量设计取样要求">
         <![CDATA[
      INSERT INTO SLM_ORD_DESIGN_STD_PIC_SMP(
        DESGIN_KEY,
        PIC,
        SIC,
        PHY_CODE_MIN,
        PHY_NAME_MIN,
        STD_CODE,
        STD_NAME,
        LENGTH,
        DESC_LENGTH,
        RATE,
        DESC_RATE,
        DESC_COUNT,
        POSITION,
        DESC_POSITION,
        SAMPLE_COUNT,
        MEMO)
 VALUES( 
        '#DESGIN_KEY#',
        '#PIC#',
        '#SIC#',
        '#PHY_CODE_MIN#',
        '#PHY_NAME_MIN#',
        '#STD_CODE#',
        '#STD_NAME#',
        '#LENGTH#',
        '#DESC_LENGTH#',
        '#RATE#',
        '#DESC_RATE#',
        '#DESC_COUNT#',
        '#POSITION#',
        '#DESC_POSITION#',
        '#SAMPLE_COUNT#',
        '#MEMO#')
             ]]>
	</query>
	
	
	<query id="IDeliveryStdDao.getSic" desc="查詢交付公差标准">
         <![CDATA[
      SELECT SIC,
       INDEX_SEQ,
       BIAS_CODE,
       BIAS_NAME,
       LV,
       BIAS_CODE_Z,
       BIAS_NAME_Z,
       ZMIN_SIGN,
       ZMIN,
       ZMAX_SIGN,
       ZMAX,
       BIAS_CODE_C,
       BIAS_NAME_C,
       CMIN_SIGN,
       CMIN,
       CMAX_SIGN,
       CMAX,
       BIAS_CODE_S,
       BIAS_NAME_S,
       SMIN_SIGN,
       SMIN,
       SMAX_SIGN,
       SMAX,
       ISCHECK,
       STD_MIN_VAL,
       STD_MAX_VAL,
       STD_MIN_IN,
       STD_MAX_IN,
       STD_MIN_PERCENT,
       STD_MAX_PERCENT,
       STD_MIN_FORMULA,
       STD_MAX_FORMULA,
       STD_MIN_FORMULA_V,
       STD_MAX_FORMULA_V,
       STDMEMO
  FROM COM_MSC_STD_SPEC_C T
 WHERE T.SIC = ?
   AND T.VALIDFLAG = 1
             ]]>
	</query>
	
	<query id="IDeliveryStdDao.saveSic" desc="保存质量设计公差标准">
         <![CDATA[
       INSERT INTO SLM_ORD_DESIGN_STD_SIC(
        BIAS_CODE_C,
        BIAS_NAME_C,
        CMIN_SIGN,
        CMIN,
        CMAX_SIGN,
        CMAX,
        BIAS_CODE_S,
        BIAS_NAME_S,
        SMIN_SIGN,
        SMIN,
        SMAX_SIGN,
        SMAX,
        ISCHECK,
        STD_MIN_VAL,
        STD_MAX_VAL,
        STD_MIN_IN,
        STD_MAX_IN,
        STD_MIN_PERCENT,
        STD_MAX_PERCENT,
        STD_MIN_FORMULA,
        STD_MAX_FORMULA,
        STD_MIN_FORMULA_V,
        STD_MAX_FORMULA_V,
        STDMEMO,
        DESGIN_KEY,
        SIC,
        USE_CODE,
        USE_DESC,
        SPECL_FL,
        INDEX_SEQ,
        BIAS_CODE,
        BIAS_NAME,
        LV,
        BIAS_CODE_Z,
        BIAS_NAME_Z,
        ZMIN_SIGN,
        ZMIN,
        ZMAX_SIGN,
        ZMAX)
 VALUES( 
        '#BIAS_CODE_C#',
        '#BIAS_NAME_C#',
        '#CMIN_SIGN#',
        '#CMIN#',
        '#CMAX_SIGN#',
        '#CMAX#',
        '#BIAS_CODE_S#',
        '#BIAS_NAME_S#',
        '#SMIN_SIGN#',
        '#SMIN#',
        '#SMAX_SIGN#',
        '#SMAX#',
        '#ISCHECK#',
        '#STD_MIN_VAL#',
        '#STD_MAX_VAL#',
        '#STD_MIN_IN#',
        '#STD_MAX_IN#',
        '#STD_MIN_PERCENT#',
        '#STD_MAX_PERCENT#',
        '#STD_MIN_FORMULA#',
        '#STD_MAX_FORMULA#',
        '#STD_MIN_FORMULA_V#',
        '#STD_MAX_FORMULA_V#',
        '#STDMEMO#',
        '#DESGIN_KEY#',
        '#SIC#',
        '#USE_CODE#',
        '#USE_DESC#',
        '#SPECL_FL#',
        '#INDEX_SEQ#',
        '#BIAS_CODE#',
        '#BIAS_NAME#',
        '#LV#',
        '#BIAS_CODE_Z#',
        '#BIAS_NAME_Z#',
        '#ZMIN_SIGN#',
        '#ZMIN#',
        '#ZMAX_SIGN#',
        '#ZMAX#')
             ]]>
	</query>
	
	<query id="IDeliveryStdDao.getDic" desc="查詢交付探伤标准">
         <![CDATA[
       SELECT DIC,
       XH,
       PHY_CODE,
       PHY_NAME,
       POSITION_CODE,
       POSITION_DESC,
       STD_DESC,
       LV_CODE,
       GROOVE_POS,
       GROOVE_DIR,
       LV_DESC,
       COVERAGE,
       MEMO,
       RATE,
       DESC_RATE,
       DESC_VAL,
       GROUP_SEQ
  FROM COM_MSC_STD_DETECTION_C T
 WHERE T.DIC = ?
   AND T.VALIDFLAG = 1
             ]]>
	</query>
	
	<query id="IDeliveryStdDao.saveDic" desc="保存质量设计探伤标准">
         <![CDATA[
        INSERT INTO SLM_ORD_DESIGN_STD_DIC(
        LV_CODE,
        LV_DESC,
        GROOVE_POS,
        GROOVE_DIR,
        COVERAGE,
        RATE,
        DESC_RATE,
        DESC_VAL,
        GROUP_SEQ,
        MEMO,
        DESGIN_KEY,
        DIC,
        USE_CODE,
        USE_DESC,
        SPECL_FL,
        XH,
        PHY_CODE,
        PHY_NAME,
        POSITION_CODE,
        POSITION_DESC,
        STD_DESC)
 VALUES( 
        '#LV_CODE#',
        '#LV_DESC#',
        '#GROOVE_POS#',
        '#GROOVE_DIR#',
        '#COVERAGE#',
        '#RATE#',
        '#DESC_RATE#',
        '#DESC_VAL#',
        '#GROUP_SEQ#',
        '#MEMO#',
        '#DESGIN_KEY#',
        '#DIC#',
        '#USE_CODE#',
        '#USE_DESC#',
        '#SPECL_FL#',
        '#XH#',
        '#PHY_CODE#',
        '#PHY_NAME#',
        '#POSITION_CODE#',
        '#POSITION_DESC#',
        '#STD_DESC#')

             ]]>
	</query>
	
	<query id="IDeliveryStdDao.getWic" desc="查詢交付水压标准">
         <![CDATA[
      SELECT WIC,
       XH,
       PRESSURE_Y,
       PRESSURE,
       FORMULA,
       SAVE_TIME,
       MEMO,
       GET_MAXVALUE,
       GET_MINVALUE
  FROM COM_MSC_STD_WATER_C T
 WHERE T.WIC = ?
   AND T.VALIDFLAG = 1
             ]]>
	</query>
	
	<query id="IDeliveryStdDao.saveWic" desc="保存质量设计水压标准">
         <![CDATA[
        INSERT INTO SLM_ORD_DESIGN_STD_WIC(
        DESGIN_KEY,
        WIC,
        USE_CODE,
        USE_DESC,
        SPECL_FL,
        INDEX_SEQ,
        PRESSURE_Y,
        PRESSURE,
        FORMULA,
        SAVE_TIME,
        GET_MAXVALUE,
        GET_MINVALUE,
        RATIO_STD,
        RATIO_REPLACE,
        MAX_PRESS)
 VALUES( 
        '#DESGIN_KEY#',
        '#WIC#',
        '#USE_CODE#',
        '#USE_DESC#',
        '#SPECL_FL#',
        '#INDEX_SEQ#',
        '#PRESSURE_Y#',
        '#PRESSURE#',
        '#FORMULA#',
        '#SAVE_TIME#',
        '#GET_MAXVALUE#',
        '#GET_MINVALUE#',
        '#RATIO_STD#',
        '#RATIO_REPLACE#',
        '#MAX_PRESS#')
             ]]>
	</query>
	
		<query id="IDeliveryStdDao.getGic" desc="查詢交付加工标准">
         <![CDATA[
       SELECT GIC,
       XH,
       STATION_CODE,
       STATION_DESC,
       PROCESS_CDOE,
       PROCESS_DESC,
       PROCESS_CDOE_C,
       PROCESS_DESC_C,
       VALUE_TEXT,
       VALUE_NUM,
       VALUE_MEMO,
       GROUP_SEQ,
       MEMO
  FROM COM_MSC_STD_PROCESS_C T
 WHERE T.GIC = ?
   AND T.VALIDFLAG = 1
             ]]>
	</query>
	
	<query id="IDeliveryStdDao.saveGic" desc="保存质量设计加工标准">
         <![CDATA[
        INSERT INTO SLM_ORD_DESIGN_STD_GIC(
        DESGIN_KEY,
        GIC,
        USE_CODE,
        USE_DESC,
        SPECL_FL,
        XH,
        PROCESS_CDOE,
        PROCESS_DESC,
        PROCESS_CDOE_C,
        PROCESS_DESC_C,
        STATION_CODE,
        STATION_DESC,
        VALUE_TEXT,
        VALUE_NUM,
        VALUE_MEMO,
        GROUP_SEQ,
        MEMO)
 VALUES( 
        '#DESGIN_KEY#',
        '#GIC#',
        '#USE_CODE#',
        '#USE_DESC#',
        '#SPECL_FL#',
        '#XH#',
        '#PROCESS_CDOE#',
        '#PROCESS_DESC#',
        '#PROCESS_CDOE_C#',
        '#PROCESS_DESC_C#',
        '#STATION_CODE#',
        '#STATION_DESC#',
        '#VALUE_TEXT#',
        '#VALUE_NUM#',
        '#VALUE_MEMO#',
        '#GROUP_SEQ#',
        '#MEMO#')
             ]]>
	</query>
</queryMap>