<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="首日检SQL">
	<query id="CraftOrdFdDao.getFdPicAddAskCount" desc="查询理化附加要求数">  
       <![CDATA[ 
SELECT COUNT(1) FD_PIC_COUNT
  FROM SLM_ORDER_LINE A, SLM_ORDER_ADD_ASK B
 WHERE A.ORD_LN_PK = {0}
   AND A.ADD_ASK_NO = B.ADD_ASK_NO
   AND B.ASK_SUB_ITME = '12101701'
   AND B.VALIDFLAG = '1'
       ]]>
	</query>
	
	<query id="CraftOrdFdDao.getFdWicAddAskCount" desc="查询水压附加要求数">  
       <![CDATA[
SELECT COUNT(1) FD_WIC_COUNT
  FROM SLM_ORDER_LINE A, SLM_ORDER_ADD_ASK B
 WHERE A.ORD_LN_PK = {0}
   AND A.ADD_ASK_NO = B.ADD_ASK_NO
   AND B.ASK_SUB_ITME = '12101702'
   AND B.VALIDFLAG = '1'
       ]]>
	</query>
	
	<query id="CraftOrdFdDao.getFdCicAddAskCount" desc="查询成分附加要求数">  
       <![CDATA[
SELECT COUNT(1) FD_CIC_COUNT
  FROM SLM_ORDER_LINE A, SLM_ORDER_ADD_ASK B
 WHERE A.ORD_LN_PK = {0}
   AND A.ADD_ASK_NO = B.ADD_ASK_NO
   AND B.ASK_SUB_ITME = '12101705'
   AND B.VALIDFLAG = '1'
       ]]>
	</query>
	
	<query id="CraftOrdFdDao.getCraftOrdFdPics" desc="查询首日检理化数据">  
       <![CDATA[ 
SELECT * FROM CRAFT_ORD_FD_PIC T WHERE T.ORD_LN_PK = {0}
       ]]>
	</query>
	
	<query id="CraftOrdFdDao.getCraftOrdFdPicSmps" desc="查询首日检理化取样数据">  
       <![CDATA[ 
SELECT * FROM CRAFT_ORD_FD_PIC_SMP T WHERE T.ORD_LN_PK = {0}
       ]]>
	</query>
	
	<query id="CraftOrdFdDao.getCraftOrdFdWics" desc="查询首日检水压数据">  
       <![CDATA[ 
SELECT * FROM CRAFT_ORD_FD_WIC T WHERE T.ORD_LN_PK = {0}
       ]]>
	</query>
	
	<query id="CraftOrdFdDao.getCraftOrdFdCics" desc="查询首日检成分数据">  
       <![CDATA[ 
SELECT T.*, A.COMMON
  FROM CRAFT_ORD_FD_CIC T
  LEFT JOIN CRAFT_ORD_FD_CIC_COUNT A
    ON A.ORD_LN_PK = T.ORD_LN_PK
 WHERE T.ORD_LN_PK = {0}
       ]]>
	</query>
	
	 <query id="CraftOrdFdDao.insertCraftOrdStdPic" desc="新增理化标准">
        <![CDATA[
 INSERT INTO CRAFT_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,
        ISCHECK,
        ISQUOTE,
        RESULT_COUNT,
        ISJUDGE,
        PHY_TYPE,
        PHY_FORMULA,
        STDMIN_SIGN,
        STDMIN,
        STDMAX_SIGN,
        STDMAX,
        JUDGE_BASIS,
        STDMEMO,
        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,
        MSC_PLINE,
        PROCESS_CODE,
        BILLET_SAMPLE,
        CREATE_NAME,
        CREATE_TIME,
        UPDATE_NAME,
        UPDATE_TIME,
        CRAFT_SOURCE,
        PIC_MEMO,
        FORMULA,
        MIN_F,
        MIN_F_SIGN,
        MAX_F,
        MAX_F_SIGN,
        SIZE_CODE,
        MODEL_CODE,
        MODEL_DESC,
        DELIVERYSTATE,
        GROUP_SEQ)
 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#',
        '#ISCHECK#',
        '#ISQUOTE#',
        '#RESULT_COUNT#',
        '#ISJUDGE#',
        '#PHY_TYPE#',
        '#PHY_FORMULA#',
        '#STDMIN_SIGN#',
        '#STDMIN#',
        '#STDMAX_SIGN#',
        '#STDMAX#',
        '#JUDGE_BASIS#',
        '#STDMEMO#',
        '#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#',
        '#MSC_PLINE#',
        '#PROCESS_CODE#',
        '#BILLET_SAMPLE#',
        '#CREATE_NAME#',
        SYSDATE,
        '#UPDATE_NAME#',
        SYSDATE,
        '#CRAFT_SOURCE#',
        '#PIC_MEMO#',
        '#FORMULA#',
        '#MIN_F#',
        '#MIN_F_SIGN#',
        '#MAX_F#',
        '#MAX_F_SIGN#',
        '#SIZE_CODE#',
        '#MODEL_CODE#',
        '#MODEL_DESC#',
        '#DELIVERYSTATE#',
        '#GROUP_SEQ#')
        ]]>
    </query>
    
    <query id="CraftOrdFdDao.insertCraftOrdStdPicSmp" desc="新增理化标准取样信息">
        <![CDATA[
 INSERT INTO CRAFT_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,
        SAMPLE_STYLE,
        BATCH_CNT,
        WIDTH,
        BATCH_UNIT,
        EIC,
        PHY_DIR,
        SIZE_DESC,
        ITEM_CODE_F,
        ITEM_CODE_C,
        ITEM_CODE_W,
        SAMPLE_KEY,
        SAMPLE_KEY_DESC,
        STD_CODE_TEST,
        STD_NAME_TEST,
        SPLINE_ITEM_CODE_S,
        SPLINE_ITEM_NAME_S,
        SPLINE_ITEM_CODE_F,
        SPLINE_ITEM_NAME_F,
        PROCESS_CODE,
        PROCESS_DESC,
        MSC_PLINE,
        ATTACH_PERCENT,
        ATTACH_COUNT,
        TOP_STOVE,
        LOOP_VALUE,
        SSC_CONDITION,
        EXCLUDE_PHY_MIN,
        CRAFT_SOURCE,
        COMMON)
 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#',
        '#SAMPLE_STYLE#',
        '#BATCH_CNT#',
        '#WIDTH#',
        '#BATCH_UNIT#',
        '#EIC#',
        '#PHY_DIR#',
        '#SIZE_DESC#',
        '#ITEM_CODE_F#',
        '#ITEM_CODE_C#',
        '#ITEM_CODE_W#',
        '#SAMPLE_KEY#',
        '#SAMPLE_KEY_DESC#',
        '#STD_CODE_TEST#',
        '#STD_NAME_TEST#',
        '#SPLINE_ITEM_CODE_S#',
        '#SPLINE_ITEM_NAME_S#',
        '#SPLINE_ITEM_CODE_F#',
        '#SPLINE_ITEM_NAME_F#',
        '#PROCESS_CODE#',
        '#PROCESS_DESC#',
        '#MSC_PLINE#',
        '#ATTACH_PERCENT#',
        '#ATTACH_COUNT#',
        '#TOP_STOVE#',
        '#LOOP_VALUE#',
        '#SSC_CONDITION#',
        '#EXCLUDE_PHY_MIN#',
        '#CRAFT_SOURCE#',
        '#COMMON#')
        ]]>
    </query>
	
	<query id="CraftOrdFdDao.insertCraftOrdStdWic" desc="新增首日检水压">
        <![CDATA[
 INSERT INTO CRAFT_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,
        MSC_PLINE,
        PROCESS_CODE,
        CREATE_NAME,
        CREATE_TIME,
        UPDATE_NAME,
        UPDATE_TIME,
        CRAFT_SOURCE,
        WIC_MEMO,
        ROUND_RULE,
        MEMO,
        OUTPUT_STYLE)
 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#',
        '#MSC_PLINE#',
        '#PROCESS_CODE#',
        '#CREATE_NAME#',
        SYSDATE,
        '#UPDATE_NAME#',
        SYSDATE,
        '#CRAFT_SOURCE#',
        '#WIC_MEMO#',
        '#ROUND_RULE#',
        '#MEMO#',
        '#OUTPUT_STYLE#')
        ]]>
    </query>
    
    <query id="CraftOrdFdDao.insertCraftOrdStdCic" desc="新增首日检水压">
        <![CDATA[
 INSERT INTO CRAFT_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,
        UPDATE_NAME,
        UPDATE_TIME,
        DELETE_NAME,
        DELETE_TIME,
        REP_CODE,
        REP_NAME,
        REP_MIN_SIGN,
        REP_MIN,
        REP_MAX_SIGN,
        REP_MAX,
        REP_VAL,
        MSC_PLINE,
        PROCESS_CODE,
        CRAFT_SOURCE,
        CIC_MEMO,
        GROUP_SEQ,
        COMMON)
 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,
        '#UPDATE_NAME#',
        SYSDATE,
        '#DELETE_NAME#',
        SYSDATE,
        '#REP_CODE#',
        '#REP_NAME#',
        '#REP_MIN_SIGN#',
        '#REP_MIN#',
        '#REP_MAX_SIGN#',
        '#REP_MAX#',
        '#REP_VAL#',
        '#MSC_PLINE#',
        '#PROCESS_CODE#',
        '#CRAFT_SOURCE#',
        '#CIC_MEMO#',
        '#GROUP_SEQ#',
        '#COMMON#')
        ]]>
    </query>
	
	<query id="CraftOrdFdDao.getWicFdCheck" desc="查询是否做水压首日检">  
       <![CDATA[ 
SELECT T.WIC_FD_CHECK FROM CRAFT_ORD_DESIGN T WHERE T.DESGIN_KEY = {0}
       ]]>
	</query>
	
	<query id="CraftOrdFdDao.getPicFdCheck" desc="查询是否做理化首日检">  
       <![CDATA[ 
SELECT T.PIC_FD_CHECK FROM CRAFT_ORD_DESIGN T WHERE T.DESGIN_KEY = {0}
       ]]>
	</query>
	
	<query id="CraftOrdFdDao.getCicFdCheck" desc="查询是否做水压首日检">  
       <![CDATA[ 
SELECT T.CIC_FD_CHECK FROM CRAFT_ORD_DESIGN T WHERE T.DESGIN_KEY = {0}
       ]]>
	</query>
</queryMap>