<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="质量设计工序">
    
	<query id="CraftOrdDesignMscPlPrcDAL.query" desc="查询质量设计工序">
		<![CDATA[
 SELECT 
       T.DESGIN_KEY,
       T.MSC_PLINE,
       T.WHOLE_BACKLOG,
       T.WHOLE_BACKLOG_DESC,
       T.BACKLOG_SEQ,
       T.PROCESS_CODE,
       T.PROCESS_DESC,
       T.PROCESS_SEQ,
       T.PROCESS_CODE_C,
       T.PROCESS_DESC_C,
       T.MINUTE_PRODUCT,
       T.MINUTE_PRODUCT_OUT,
       T.MINUTE_WAITE,
       T.MINUTE_WAITE_OUT,
       T.BATCH_WAITE,
       T.BATCH_WAITE_OUT,
       T.CIC,
       T.PIC,
       T.SIC,
       T.DIC,
       T.WIC,
       T.GIC
 FROM Craft_ORD_DESIGN_MSC_PL_PRC T
 WHERE
T.DESGIN_KEY = '#DESGIN_KEY#'
AND DECODE('#MSC_PLINE#', NULL, '1', T.MSC_PLINE) = DECODE('#MSC_PLINE#', NULL, '1', '#MSC_PLINE#')
AND DECODE('#PROCESS_CODE#', NULL, '1', T.PROCESS_CODE) = DECODE('#PROCESS_CODE#', NULL, '1', '#PROCESS_CODE#')
		]]>
	</query>
	
	<query id="CraftOrdDesignMscPlPrcDAL.queryProcessByDesignKey" desc="查询质量设计工序">
		<![CDATA[
 SELECT 
       T.DESGIN_KEY,
       T.PROCESS_DESC,
       T.PROCESS_CODE,
       T.CIC,
       T.PIC,
       T.DIC,
       T.SIC,
       T.WIC,
       T.GIC
 FROM Craft_ORD_DESIGN_MSC_PL_PRC T
 WHERE
T.DESGIN_KEY = '#DESGIN_KEY#'
AND T.MSC_PLINE = '#MSC_PLINE#'
		]]>
	</query>
	
	<query id="CraftOrdDesignMscPlPrcDAL.queryProcess" desc="查询工序">
		<![CDATA[
 SELECT T.PROCESS_CODE, T.PROCESS_DESC, T.PROCESS_CODE_C, T.PROCESS_DESC_C
   FROM CRAFT_ORD_DESIGN_MSC_PL_PRC T
  WHERE T.DESGIN_KEY = {0}
    AND T.MSC_PLINE = {1}
		]]>
	</query>
	
	<query id="CraftOrdDesignMscPlPrcDAL.queryProcessNkIndex" desc="查询工序选择的内控标准">
		<![CDATA[
SELECT T.CIC, T.PIC, T.SIC, T.DIC, T.WIC, T.GIC
      FROM CRAFT_ORD_DESIGN_MSC_PL_PRC T
     WHERE T.DESGIN_KEY = {0}
       AND T.MSC_PLINE = {1}
       AND T.PROCESS_CODE = {2}
		]]>
	</query>
</queryMap>