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

	<query id="DifferenceValueDao.getChem" desc="查询交付标准差值-成分">
         <![CDATA[
         SELECT T.DESGIN_KEY,
       T.CIC,
       T.USE_CODE,
       T.USE_DESC,
       T.SPECL_FL,
       T.INDEX_SEQ,
       T.CHEM_CODE,
       T.CHEM_NAME,
       T.CHEM_TYPE,
       T.CHEM_FORMULA,
       T.ISCHECK,
       T.ISJUDGE,
       T.ISQUOTE,
       T.COMPLEX_TYPE,
       T.STDMIN_SIGN,
       T.STDMIN,
       T.STDMAX_SIGN,
       T.STDMAX,
       T.STDTARGET,
       T.MODEL_CODE,
       T.MODEL_DESC,
       T.STDMEMO,
       T.ELE_CODE,
       T.ELE_NAME,
       T.ELE_MIN_SIGN,
       T.ELE_MIN,
       T.ELE_MAX_SIGN,
       T.ELE_MAX,
       T.SIZE_CODE2,
       T.SIZE_NAME2,
       T.SIZE_MIN_SIGN2,
       T.SIZE_MIN2,
       T.SIZE_MAX_SIGN2,
       T.SIZE_MAX2,
       T.SIZE_CODE,
       T.SIZE_NAME,
       T.SIZE_MIN_SIGN,
       T.SIZE_MIN,
       T.SIZE_MAX_SIGN,
       T.SIZE_MAX,
       T.SPEC_JG,
       T.SPEC_JG_DESC,
       T.VALIDFLAG,
       T.CREATE_NAME,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       T.UPDATE_NAME,
       TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       T.DELETE_NAME,
       TO_CHAR(T.DELETE_TIME, 'YYYY-MM-DD HH24:MI:SS') DELETE_TIME,
       T.REP_CODE,
       T.REP_NAME,
       T.REP_MIN_SIGN,
       T.REP_MIN,
       T.REP_MAX_SIGN,
       T.REP_MAX,
       T.REP_VAL
  FROM SLM_ORD_DESIGN_STD_CIC T
 WHERE T.DESGIN_KEY = ?
   AND T.SPECL_FL = ?
         ]]>
	</query>

	<query id="DifferenceValueDao.addChem" desc="新增交付标准差值-成分">
         <![CDATA[
      INSERT INTO SLM_ORD_DESIGN_CIC_DIFF(
        DESIGN_KEY,
        ORD_PK,
        ORD_LN_PK,
        ITEM_NAME,
        STDMIN_SIGN,
        STDMIN,
        STDMAX_SIGN,
        STDMAX,
        STDMIN_SIGN1,
        ITEM_CODE,
        STDMIN1,
        STDMAX_SIGN1,
        STDMAX1,
        DIFFERENT_VALUE_MAX,
        CIC,
        CIC1,
        DIFFERENT_VALUE_MIN,
        DIFF_FLAG)
 VALUES( 
        '#DESIGN_KEY#',
        '#ORD_PK#',
        '#ORD_LN_PK#',
        '#ITEM_NAME#',
        '#STDMIN_SIGN#',
        '#STDMIN#',
        '#STDMAX_SIGN#',
        '#STDMAX#',
        '#STDMIN_SIGN1#',
        '#ITEM_CODE#',
        '#STDMIN1#',
        '#STDMAX_SIGN1#',
        '#STDMAX1#',
        '#DIFFERENT_VALUE_MAX#',
        '#CIC#',
        '#CIC1#',
        '#DIFFERENT_VALUE_MIN#',
        '#DIFF_FLAG#')
         ]]>
	</query>

	<query id="DifferenceValueDao.getPhy" desc="查询交付标准差值-理化">
         <![CDATA[
     SELECT T.DESGIN_KEY,
       T.PIC,
       T.USE_CODE,
       T.USE_DESC,
       T.SPECL_FL,
       T.INDEX_SEQ,
       T.PHY_CODE_MAX,
       T.PHY_NAME_MAX,
       T.PHY_CODE_MIN,
       T.PHY_NAME_MIN,
       T.PHY_CODE,
       T.PHY_NAME,
       T.ITEM_CODE_F,
       T.ITEM_NAME_F,
       T.ITEM_CODE_W,
       T.ITEM_NAME_W,
       T.ITEM_CODE_S,
       T.ITEM_NAME_S,
       T.GROUP_SEQ,
       T.ISCHECK,
       T.ISQUOTE,
       T.RESULT_COUNT,
       T.ISJUDGE,
       T.PHY_TYPE,
       T.PHY_FORMULA,
       T.STDMIN_SIGN,
       T.STDMIN,
       T.STDMAX_SIGN,
       T.STDMAX,
       T.JUDGE_BASIS,
       T.DELIVERYSTATE,
       T.MODEL_CODE,
       T.MODEL_DESC,
       T.STDMEMO,
       T.SIZE_CODE,
       T.SIZE_NAME,
       T.SIZE_MIN_SIGN,
       T.SIZE_MIN,
       T.SIZE_MAX_SIGN,
       T.SIZE_MAX,
       T.SIZE_CODE2,
       T.SIZE_NAME2,
       T.SIZE_MIN_SIGN2,
       T.SIZE_MIN2,
       T.SIZE_MAX_SIGN2,
       T.SIZE_MAX2,
       T.SPEC_JG,
       T.SPEC_JG_DESC,
       T.ADDCONDITION,
       T.ADDSTDCON_CODE,
       T.ADDSTD_MIN_SIGN,
       T.ADDSTD_MIN,
       T.ADDSTD_MAX_SIGN,
       T.ADDSTD_MAX,
       T.ADDPERCENT,
       T.STDMIN_SIGN2,
       T.STDMIN2,
       T.STDMAX_SIGN2,
       T.STDMAX2,
       T.STD_CHOOSE
  FROM SLM_ORD_DESIGN_STD_PIC T
 WHERE T.DESGIN_KEY = ?
   AND T.SPECL_FL = ?
         ]]>
	</query>

	<query id="DifferenceValueDao.addPhy" desc="新增交付标准差值-理化">
         <![CDATA[
          INSERT INTO SLM_ORD_DESIGN_PIC_DIFF(
        DESIGN_KEY,
        ORD_PK,
        ORD_LN_PK,
        ITEM_NAME,
        STDMIN_SIGN,
        STDMIN,
        STDMAX_SIGN,
        STDMAX,
        STDMIN_SIGN1,
        ITEM_CODE,
        STDMIN1,
        STDMAX_SIGN1,
        STDMAX1,
        DIFFERENT_VALUE_MAX,
        PIC,
        PIC1,
        DIFFERENT_VALUE_MIN,
        DIFF_FLAG)
 VALUES( 
        '#DESIGN_KEY#',
        '#ORD_PK#',
        '#ORD_LN_PK#',
        '#ITEM_NAME#',
        '#STDMIN_SIGN#',
        '#STDMIN#',
        '#STDMAX_SIGN#',
        '#STDMAX#',
        '#STDMIN_SIGN1#',
        '#ITEM_CODE#',
        '#STDMIN1#',
        '#STDMAX_SIGN1#',
        '#STDMAX1#',
        '#DIFFERENT_VALUE_MAX#',
        '#PIC#',
        '#PIC1#',
        '#DIFFERENT_VALUE_MIN#',
        '#DIFF_FLAG#')
         ]]>
	</query>

	<query id="DifferenceValueDao.getWater" desc="查询交付标准差值-水压">
         <![CDATA[
SELECT T.DESGIN_KEY,
       T.WIC,
       T.USE_CODE,
       T.USE_DESC,
       T.SPECL_FL,
       T.INDEX_SEQ,
       T.PRESSURE_Y,
       T.PRESSURE,
       (CASE WHEN INSTR(T.FORMULA,'4053')>0 THEN (SELECT BASENAME FROM COM_BASE_INFO WHERE BASECODE=T.FORMULA) ELSE T.FORMULA END) FORMULA,
       T.SAVE_TIME,
       T.GET_MAXVALUE,
       T.GET_MINVALUE,
       T.RATIO_STD,
       T.RATIO_REPLACE,
       T.MAX_PRESS
  FROM SLM_ORD_DESIGN_STD_WIC T
 WHERE T.DESGIN_KEY = ?
   AND T.SPECL_FL = ?
         ]]>
	</query>

	<query id="DifferenceValueDao.addWater" desc="保存交付标准差值-水压">
         <![CDATA[
 INSERT INTO SLM_ORD_DESIGN_WIC_DIFF(
        DESIGN_KEY,
        ORD_PK,
        ORD_LN_PK,
        WIC,
        WIC1,
        PRESSURE_Y,
        PRESSURE,
        FORMULA,
        SAVE_TIME,
        MAX_PRESS,
        PRESSURE_Y1,
        PRESSURE1,
        FORMULA1,
        SAVE_TIME1,
        MAX_PRESS1,
        DIFF_VALUE,
        DIFF_FLAG)
 VALUES( 
        '#DESIGN_KEY#',
        '#ORD_PK#',
        '#ORD_LN_PK#',
        '#WIC#',
        '#WIC1#',
        '#PRESSURE_Y#',
        '#PRESSURE#',
        '#FORMULA#',
        '#SAVE_TIME#',
        '#MAX_PRESS#',
        '#PRESSURE_Y1#',
        '#PRESSURE1#',
        '#FORMULA1#',
        '#SAVE_TIME1#',
        '#MAX_PRESS1#',
        '#DIFF_VALUE#',
        '#DIFF_FLAG#')
         ]]>
	</query>

	<query id="DifferenceValueDao.getGprocess" desc="查询交付标准差值-加工">
         <![CDATA[
         SELECT 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
  FROM SLM_ORD_DESIGN_STD_GIC T
 WHERE T.DESGIN_KEY = ?
   AND T.SPECL_FL = ?
         ]]>
	</query>

	<query id="DifferenceValueDao.getDete" desc="查询交付标准差值-探伤">
         <![CDATA[
         SELECT T.DESGIN_KEY,
       T.DIC,
       T.USE_CODE,
       T.USE_DESC,
       T.SPECL_FL,
       T.XH,
       T.PHY_CODE,
       T.PHY_NAME,
       T.POSITION_CODE,
       T.POSITION_DESC,
       T.STD_DESC,
       T.LV_CODE,
       T.LV_DESC,
       T.GROOVE_POS,
       T.GROOVE_DIR,
       T.COVERAGE,
       T.RATE,
       T.DESC_RATE,
       T.DESC_VAL,
       T.GROUP_SEQ,
       T.MEMO,
       T.MIN_D,
       T.MAX_D,
       T.MIN_H,
       T.MAX_H
  FROM SLM_ORD_DESIGN_STD_DIC T
 WHERE T.DESGIN_KEY = ?
   AND T.SPECL_FL = ?
         ]]>
	</query>

	<query id="DifferenceValueDao.addDete" desc="新增交付标准差值-探伤">
         <![CDATA[
   INSERT INTO SLM_ORD_DESIGN_DIC_DIFF(
        DESIGN_KEY,
        ORD_PK,
        ORD_LN_PK,
        DIC,
        DIC1,
        PHY_CODE,
        PHY_NAME,
        POSITION_CODE,
        POSITION_DESC,
        STD_DESC,
        LV_CODE,
        LV_DESC,
        GROOVE_POS,
        GROOVE_DIR,
        COVERAGE,
        RATE,
        DESC_RATE,
        DESC_VAL,
        POSITION_CODE1,
        POSITION_DESC1,
        STD_DESC1,
        LV_CODE1,
        LV_DESC1,
        GROOVE_POS1,
        GROOVE_DIR1,
        COVERAGE1,
        RATE1,
        DESC_RATE1,
        DESC_VAL1,
        DIFF_FLAG)
 VALUES( 
        '#DESIGN_KEY#',
        '#ORD_PK#',
        '#ORD_LN_PK#',
        '#DIC#',
        '#DIC1#',
        '#PHY_CODE#',
        '#PHY_NAME#',
        '#POSITION_CODE#',
        '#POSITION_DESC#',
        '#STD_DESC#',
        '#LV_CODE#',
        '#LV_DESC#',
        '#GROOVE_POS#',
        '#GROOVE_DIR#',
        '#COVERAGE#',
        '#RATE#',
        '#DESC_RATE#',
        '#DESC_VAL#',
        '#POSITION_CODE1#',
        '#POSITION_DESC1#',
        '#STD_DESC1#',
        '#LV_CODE1#',
        '#LV_DESC1#',
        '#GROOVE_POS1#',
        '#GROOVE_DIR1#',
        '#COVERAGE1#',
        '#RATE1#',
        '#DESC_RATE1#',
        '#DESC_VAL1#',
        '#DIFF_FLAG#')
         ]]>
	</query>

	<query id="DifferenceValueDao.addGprocess" desc="新增交付标准差值-加工">
         <![CDATA[
 INSERT INTO SLM_ORD_DESIGN_GIC_DIFF(
        DESIGN_KEY,
        ORD_PK,
        ORD_LN_PK,
        PROCESS_CODE,
        PROCESS_NAME,
        STATION_CODE,
        STATION_NAME,
        VALUE_TEXT,
        VALUE_NUM,
        VALUE_TEXT1,
        VALUE_NUM1,
        DIFF_FLAG)
 VALUES( 
        '#DESIGN_KEY#',
        '#ORD_PK#',
        '#ORD_LN_PK#',
        '#PROCESS_CODE#',
        '#PROCESS_NAME#',
        '#STATION_CODE#',
        '#STATION_NAME#',
        '#VALUE_TEXT#',
        '#VALUE_NUM#',
        '#VALUE_TEXT1#',
        '#VALUE_NUM1#',
        '#DIFF_FLAG#')
         ]]>
	</query>


	<query id="DifferenceValueDao.getSpec" desc="查询交付标准差值-公差">
         <![CDATA[
SELECT T.DESGIN_KEY,
       T.SIC,
       T.USE_CODE,
       T.USE_DESC,
       T.SPECL_FL,
       T.INDEX_SEQ,
       T.BIAS_CODE,
       T.BIAS_NAME,
       T.LV,
       T.BIAS_CODE_Z,
       T.BIAS_NAME_Z,
       T.ZMIN_SIGN,
       T.ZMIN,
       T.ZMAX_SIGN,
       T.ZMAX,
       T.BIAS_CODE_C,
       T.BIAS_NAME_C,
       T.CMIN_SIGN,
       T.CMIN,
       T.CMAX_SIGN,
       T.CMAX,
       T.BIAS_CODE_S,
       T.BIAS_NAME_S,
       T.SMIN_SIGN,
       T.SMIN,
       T.SMAX_SIGN,
       T.SMAX,
       T.ISCHECK,
       T.STD_MIN_VAL,
       T.STD_MAX_VAL,
       T.STD_MIN_IN,
       T.STD_MAX_IN,
       T.STD_MIN_PERCENT,
       T.STD_MAX_PERCENT,
       T.STD_MIN_FORMULA,
       T.STD_MAX_FORMULA,
       T.STD_MIN_FORMULA_V,
       T.STD_MAX_FORMULA_V,
       T.STDMEMO
  FROM SLM_ORD_DESIGN_STD_SIC T
 WHERE T.DESGIN_KEY = ?
   AND T.SPECL_FL = ?
         ]]>
	</query>

	<query id="DifferenceValueDao.addSpec" desc="新增交付标准差值-公差">
         <![CDATA[
 INSERT INTO SLM_ORD_DESIGN_SIC_DIFF(
        DESIGN_KEY,
        ORD_PK,
        ORD_LN_PK,
        SIC,
        SIC1,
        PHY_CODE,
        PHY_NAME,
        STD_MIN_VAL,
        STD_MAX_VAL,
        STD_MIN_PERCENT,
        STD_MAX_PERCENT,
        STD_MIN_FORMULA,
        STD_MAX_FORMULA,
        STD_MIN_VAL1,
        STD_MAX_VAL1,
        STD_MIN_PERCENT1,
        STD_MAX_PERCENT1,
        STD_MIN_FORMULA1,
        STD_MAX_FORMULA1,
        DIFF_VALUE_MIN,
        DIFF_VALUE_MAX,
        DIFF_FLAG)
 VALUES( 
        '#DESIGN_KEY#',
        '#ORD_PK#',
        '#ORD_LN_PK#',
        '#SIC#',
        '#SIC1#',
        '#PHY_CODE#',
        '#PHY_NAME#',
        '#STD_MIN_VAL#',
        '#STD_MAX_VAL#',
        '#STD_MIN_PERCENT#',
        '#STD_MAX_PERCENT#',
        '#STD_MIN_FORMULA#',
        '#STD_MAX_FORMULA#',
        '#STD_MIN_VAL1#',
        '#STD_MAX_VAL1#',
        '#STD_MIN_PERCENT1#',
        '#STD_MAX_PERCENT1#',
        '#STD_MIN_FORMULA1#',
        '#STD_MAX_FORMULA1#',
        '#DIFF_VALUE_MIN#',
        '#DIFF_VALUE_MAX#',
        '#DIFF_FLAG#')
         ]]>
	</query>

	<query id="DifferenceValueDao.getStdAddAsk" desc="查询标准附加要求">
         <![CDATA[
SELECT T.STD_CODE,
       T.STD_NAME,
       T.ASK_ITME,
       T.ASK_ITME_DESC,
       T.ASK_SUB_ITME,
       T.CREATE_NAME,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       T.UPDATE_NAME,
       TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       T.DELETE_NAME,
       TO_CHAR(T.DELETE_TIME, 'YYYY-MM-DD HH24:MI:SS') DELETE_TIME,
       T.VALIDFLAG,
       T.MEMO,
       T.ASK_SUB_ITME_DESC,
       T.ASK_SUB_ITME_VAL,
       T.ASK_SUB_ITME_VAL_DESC,
       T.PIC,
       T.STDFLAG
  FROM COM_BASE_ADDITIONAL T
 WHERE T.STD_CODE = ?
 AND T.VALIDFLAG='1'
         ]]>
	</query>

	<query id="DifferenceValueDao.getAlphaAddAsk" desc="查询客户附加要求">
         <![CDATA[
SELECT T.ADD_ASK_NO,
       T.ASK_ITME,
       T.ASK_ITME_DESC,
       T.ASK_SUB_ITME,
       T.ASK_SUB_ITME_DESC,
       T.ASK_SUB_ITME_VAL,
       T.ASK_SUB_ITME_VAL_DESC,
       T.PIC,
       T.CUSTOMER_NO,
       T.CUSTOMER_NM,
       T.PSC,
       T.PSC_DESC,
       T.ADD_ASK_STATUS,
       T.VALIDFLAG,
       T.CREATE_NAME,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       T.UPDATE_NAME,
       TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       T.DELETE_NAME,
       TO_CHAR(T.DELETE_TIME, 'YYYY-MM-DD HH24:MI:SS') DELETE_TIME,
       T.ADD_ASK_TYPE,
       T.REVIEW_F_RS
  FROM SLM_ORDER_ADD_ASK T
 WHERE T.ADD_ASK_NO = ?
         ]]>
	</query>

	<query id="DifferenceValueDao.addAddAsk" desc="新增附加要求差值">
         <![CDATA[
  INSERT INTO SLM_ORD_DESIGN_ADD_ASK_DIFF(
        DESIGN_KEY,
        ORD_PK,
        ORD_LN_PK,
        ADD_ASK_NO,
        ASK_ITME,
        ASK_ITME_DESC,
        ASK_SUB_ITME,
        ASK_SUB_ITME_DESC,
        ASK_SUB_ITME_VAL,
        ASK_SUB_ITME_VAL_DESC,
        DIFF_FLAG,
        STD_CODE,
        STD_NAME,
        ASK_SUB_ITME_VAL1,
        ASK_SUB_ITME_VAL_DESC1
        )
 VALUES( 
        '#DESIGN_KEY#',
        '#ORD_PK#',
        '#ORD_LN_PK#',
        '#ADD_ASK_NO#',
        '#ASK_ITME#',
        '#ASK_ITME_DESC#',
        '#ASK_SUB_ITME#',
        '#ASK_SUB_ITME_DESC#',
        '#ASK_SUB_ITME_VAL#',
        '#ASK_SUB_ITME_VAL_DESC#',
        '#DIFF_FLAG#',
        '#STD_CODE#',
        '#STD_NAME#',
        '#ASK_SUB_ITME_VAL1#',
        '#ASK_SUB_ITME_VAL_DESC1#'
        )
         ]]>
	</query>


</queryMap>