<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="检测项目配置">
	<query id="FrmConfiguration.getQueryPline" desc="查询产线">
        <![CDATA[
SELECT T.PLINE_CODE, T.PLINE_NAME
  FROM COM_BASE_PLINE T
 WHERE T.VALIDFLAG = '1'
 ORDER BY T.PLINE_NAME    
        ]]>
	</query>
<query id="FrmConfiguration.getQueryPhosphateItem" desc="查询检测项目配置">
        <![CDATA[
SELECT ITEM_NO,
       PLINE_CODE,
       PROCEDUR_NO,
       TEST_ITEMS,
       SPAN,
       SETTING_TEMPERATURE
  FROM COUPLING_PHOSPHATE_ITEM
 WHERE TEST_ITEMS || '&' LIKE '%' || ? || '%' 
    AND PLINE_CODE || '&' LIKE '%' || ? || '%'
        ]]>
	</query>
	<query id="FrmConfiguration.getAddPhosphateItem" desc="新增检测项目配置">
        <![CDATA[
INSERT INTO COUPLING_PHOSPHATE_ITEM
  (ITEM_NO, PLINE_CODE, PROCEDUR_NO, TEST_ITEMS, SPAN, SETTING_TEMPERATURE)
VALUES
  ((SELECT 'J' || LPAD(SUBSTR(NVL(MAX(T.ITEM_NO), '0000'), -4, 4) + 1, 4, '0') AS ITEM_NO
   FROM COUPLING_PHOSPHATE_ITEM T), ?, ?, ?, ?, ?)
        ]]>
	</query>
	<query id="FrmConfiguration.getUpdatePhosphateItem" desc="修改检测项目配置">
        <![CDATA[
UPDATE COUPLING_PHOSPHATE_ITEM
   SET PLINE_CODE          = ?,
       PROCEDUR_NO         = ?,
       TEST_ITEMS          = ?,
       SPAN                = ?,
       SETTING_TEMPERATURE = ?
 WHERE ITEM_NO = ?
        ]]>
	</query>
	<query id="FrmConfiguration.getDeletePhosphateItem" desc="删除检测项目配置">
        <![CDATA[
DELETE COUPLING_PHOSPHATE_ITEM WHERE ITEM_NO = ?
        ]]>
	</query>
</queryMap>