<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="连铸规格切头尾参数">

	<query id="FrmBaseLzSpecCut.InitSpec" desc="初始化规格">
             <![CDATA[
SELECT T.SPEC_CODE, ceil(to_number(T.SPEC_NAME)) SPEC_NAME
  FROM COM_BASE_SPEC T
 WHERE T.MSC_STYLE = ?
   AND T.VALIDFLAG = '1'
   order by  to_number(t.spec_name)
                 ]]>
	</query>

	<query id="FrmBaseLzSpecCut.checkSpec" desc="验证规格">
             <![CDATA[
     SELECT COUNT(1) COUNT FROM PLN_BASE_LZ_SPEC_CUT T WHERE T.DIAMETER_LZ=TO_NUMBER(?)
                 ]]>
	</query>

	<query id="FrmBaseLzSpecCut.Query" desc="查询">
             <![CDATA[
           SELECT 
       T.CUT_PARA_ID,
       T.DIAMETER_LZ,
       T.CUT_LEN_BEGIN,
       T.CUT_LEN_END_UNCH,
       T.CUT_LEN_END_CH,
       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
 FROM PLN_BASE_LZ_SPEC_CUT T
 ORDER BY T.DIAMETER_LZ
                 ]]>
	</query>

	<query id="FrmBaseLzSpecCut.add" desc="新增">
             <![CDATA[
            INSERT INTO PLN_BASE_LZ_SPEC_CUT(
        CUT_PARA_ID,
        DIAMETER_LZ,
        CUT_LEN_BEGIN,
        CUT_LEN_END_UNCH,
        CUT_LEN_END_CH,
        CREATE_NAME,
        CREATE_TIME,
        UPDATE_NAME,
        UPDATE_TIME)
 VALUES( 
       ?,
       ?,
       ?,
       ?,
       ?,
       ?,
        SYSDATE,
        NULL,
        NULL)
                 ]]>
	</query>

	<query id="FrmBaseLzSpecCut.update" desc="修改">
             <![CDATA[
       UPDATE PLN_BASE_LZ_SPEC_CUT T
   SET T.CUT_LEN_BEGIN = ?,
       T.CUT_LEN_END_UNCH = ?,
       T.CUT_LEN_END_CH   = ?,
       T.UPDATE_NAME      = ?,
       T.UPDATE_TIME      = SYSDATE
 WHERE T.CUT_PARA_ID = ?
                 ]]>
	</query>

	<query id="FrmBaseLzSpecCut.delete" desc="删除">
             <![CDATA[
           delete from PLN_BASE_LZ_SPEC_CUT t where t.diameter_lz=to_number(?)
                 ]]>
	</query>


</queryMap>