<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="获取质量设计交付标准">
	<query id="CoreOrderStdSic.getStdTolerance" desc="获取质量设计交付标准">
		<![CDATA[
			SELECT T.SIC,
			       T.BIAS_CODE,
			       T.BIAS_NAME,
			       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
			  FROM CRAFT_ORD_DESIGN_STD_SIC T
			 WHERE T.BIAS_CODE='404019'
			   AND (T.SPECL_FL = '0' OR T.SPECL_FL = '1')
			   AND T.DESGIN_KEY = ?
			   ORDER BY T.SPECL_FL DESC
		]]>
	</query>
	
	<query id="CoreOrderStdSic.getStdOutDiameter" desc="获取交付标准外径公差">
		<![CDATA[
			SELECT T.SIC,
			       T.BIAS_CODE,
			       T.BIAS_NAME,
			       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
			  FROM CRAFT_ORD_DESIGN_STD_SIC T
			 WHERE T.BIAS_CODE='404012'
			   AND (T.SPECL_FL = '0' OR T.SPECL_FL = '1')
			   AND T.DESGIN_KEY = ?
			   ORDER BY T.SPECL_FL DESC
		]]>
	</query>
	<query id="CoreOrderStdSic.getSpecBySic" desc="获取内控标准壁厚公差(轧管)">
		<![CDATA[
			SELECT T.SIC,
			       T.BIAS_CODE,
			       T.BIAS_NAME,
			       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
			  FROM CRAFT_ORD_DESIGN_STD_SIC T
			 WHERE T.SPECL_FL = '2'
			   AND T.PROCESS_CODE = 'D'
			   AND T.SIC = (SELECT DECODE(SIC,'','',SUBSTR(SIC,0,40)) SIC
                  FROM CRAFT_ORD_DESIGN_MSC_PL_PRC T
                 WHERE T.DESGIN_KEY = ?
                   AND T.MSC_PLINE = ?
                   AND T.PROCESS_CODE = 'D')
			   AND T.DESGIN_KEY = ?
               AND T.MSC_PLINE = ?
		]]>
	</query>
	<query id="CoreOrderStdSic.getSpecBySicsDbk" desc="获取内控标准壁厚公差（墩拔扩）">
		<![CDATA[
SELECT T.SIC,
       T.BIAS_CODE,
       T.BIAS_NAME,
       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,
       MSC_PLINE,
       PROCESS_CODE
  FROM CRAFT_ORD_DESIGN_STD_SIC T
 WHERE T.SPECL_FL = '2'
   AND T.PROCESS_CODE = 'E'
   AND T.SIC = (SELECT DECODE(SIC,'','',SUBSTR(SIC,0,40)) SIC
                  FROM CRAFT_ORD_DESIGN_MSC_PL_PRC T
                 WHERE T.DESGIN_KEY = ?
                   AND T.MSC_PLINE = ?
                   AND T.PROCESS_CODE = 'E')
   AND T.DESGIN_KEY = ?
   AND T.MSC_PLINE = ?
		]]>
	</query>
</queryMap>