<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="检测项目配置">
	<query id="FrmMachineCut.getQueryGx" desc="查询工序点">
        <![CDATA[
   SELECT T.BASECODE, T.BASENAME
  FROM COM_BASE_INFO T
 WHERE T.SORTCODE = ?
 AND T.BASECODE IN ('700302','700305')
   AND T.VALIDFLAG = '1'
        ]]>
	</query>
	<query id="FrmMachineCut.getQuerySoue" desc="查询车丝编号">
        <![CDATA[
        (SELECT NULL BASECODE,NULL BASENAME FROM DUAL
UNION ALL
   SELECT T.BASECODE, T.BASENAME
  FROM COM_BASE_INFO T
 WHERE T.SORTCODE = ?
   AND T.VALIDFLAG = '1' ) order by basecode asc
        ]]>
	</query>
	<query id="FrmMachineCut.getQueryPline" desc="查询产线">
        <![CDATA[
SELECT T.PLINE_CODE,T.PLINE_NAME FROM COM_BASE_PLINE T WHERE T.PROCESS_CODE=? AND T.VALIDFLAG='1'
        ]]>
	</query>
	<query id="FrmMachineCut.getQueryPhosphateItem" desc="查询机床对应用户">
        <![CDATA[
SELECT MACHINE_NO, MACHINE_NAME,
       MACHINE_USER1,
         MACHINE_USER2,
       COL_USER,
       TO_CHAR(COL_TIME,'YYYY-MM-DD HH24:MI:SS') COL_TIME,
       UPDATE_USER,
       TO_CHAR(UPDATE_TIME,'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       PROCESS_NO,PLINE_CODE,PLINE_NAME
  FROM COUPLING_MACHINE_CUT_USER
 WHERE MACHINE_NAME || '&' LIKE '%' || ? || '%'
 ORDER BY MACHINE_NO asc
        ]]>
	</query>
	<query id="FrmMachineCut.queryMachine" desc="查询机床对应用户">
        <![CDATA[
SELECT MACHINE_NAME,
       MACHINE_NO,
       MACHINE_USER1,
       PROCESS_NO,
       PLINE_CODE,
       PLINE_NAME,
       MACHINE_USER2
  FROM COUPLING_MACHINE_CUT_USER
 WHERE MACHINE_NO = ?

      ]]>
	</query>
	<query id="FrmMachineCut.getAddPhosphateItem" desc="新增机床对应用户">
        <![CDATA[
INSERT INTO  COUPLING_MACHINE_CUT_USER
  (MACHINE_NO,MACHINE_NAME, COL_USER, COL_TIME,PROCESS_NO,PLINE_NAME,PLINE_CODE)
VALUES
  (?,?, ?, TO_DATE(?,'YYYY-MM-DD HH24:MI:SS'),?,?,?)
        ]]>
	</query>
	<query id="FrmMachineCut.getUpdatePhosphateItem" desc="修改机床对应用户">
        <![CDATA[
UPDATE COUPLING_MACHINE_CUT_USER
   SET 
       MACHINE_NO=?,
       MACHINE_NAME=?
       UPDATE_USER  = ?,
       UPDATE_TIME  = TO_DATE(?,'YYYY-MM-DD HH24:MI:SS'),
 		PLINE_CODE=?,
		PLINE_NAME=?
 WHERE MACHINE_NO=?
 AND PLINE_CODE=?
        ]]>
	</query>
	<query id="FrmMachineCut.getDeletePhosphateItem" desc="删除机床对应用户">
        <![CDATA[
DELETE COUPLING_MACHINE_CUT_USER WHERE MACHINE_NO=?
        ]]>
	</query>
</queryMap>