<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="权限功能表查询">
<query id="CoreOrderLenPln.GetLenNo" desc="自动生成长度编码">
		<![CDATA[
	SELECT TO_NUMBER(NVL(MAX(SUBSTR(LEN_NO, 2, 7)), '0'))+1 FROM SLM_ORDER_LEN T
		]]>
</query>
<query id="CoreOrderLenPln.isRepeat" desc="查询是否存在长度">
		<![CDATA[
				SELECT LEN_NO FROM SLM_ORDER_LEN WHERE LEN_DESC = ? AND LEN_TYP ='轧管推荐'
		]]>
</query>
	<query id="CoreOrderLenPln.QUERY" desc="分三部分查询信息，字段太多，用*表示">
		<![CDATA[
      SELECT *
   FROM SLM_ORDER_LEN T
   WHERE  T.LEN_NO = ?
   ORDER BY LEN_NO
		]]>
	</query>
<query id="CoreOrderLenPln.QUERY1" desc="分三部分查询信息，字段太多，用*表示">
		<![CDATA[
      SELECT *
   FROM SLM_ORDER_LEN T
   WHERE  T.LEN_NO = ?
   ORDER BY LEN_NO
		]]>
	</query>
	<query id="CoreOrderLenPln.doUpdate" desc="修改">
		<![CDATA[
				 UPDATE SLM_ORDER_LEN SET 
				 		USE_TIME=USE_TIME+1,
				 		CREATE_TIME=SYSDATE 
				 		WHERE LEN_NO=?
		]]>
	</query>
	<query id="CoreOrderLenPln.doDelete" desc="删除">
		<![CDATA[
				DELETE SLM_ORDER_LEN WHERE LEN_NO=?
		]]>
	</query>
	
	<query id="CoreOrderLenPln.doAdd" desc="提交功能">
		<![CDATA[
				 INSERT INTO SLM_ORDER_LEN(
					            LEN_NO,
					            LEN_DESC,
					            LEN_TYP,
					            LEN_UNIT,
					            LEN_MIN,
					            LEN_MAX,
					            SHRT_LEN_RATO,
					            SHORTEST,
					            SHRT_STOVE, 
					            LONG_LEN_RATO,
					            LONGEST,
					            SIGL_LEN,
					            AVG_LEN_MIN,
					            ENDLEN_SPECSTD,
					            DIFRNC_LEN_MAX,
					            CREATE_NAME,
					            CREATE_TIME,
					            USE_TIME) 
					            VALUES
					            (?,?,?,?,
					            ?,?,?,?,
					            ?,?,?,?,
					            ?,?,?,?,SYSDATE,
					            ?)
		]]>
	</query>
	<query id="CoreOrderLenPln.updateLen" desc="更新修改">
		<![CDATA[
		UPDATE SLM_ORDER_LEN
   SET LEN_DESC       = ?,
       LEN_TYP        = ?,
       LEN_UNIT       = ?,
       LEN_MIN        = ?,
       LEN_MAX        = ?,
       SHRT_LEN_RATO  = ?,
       SHORTEST       = ?,
       LONG_LEN_RATO  = ?,
       LONGEST        = ?,
       SHRT_STOVE     = ?,
       AVG_LEN_MIN    = ?,
       DIFRNC_LEN_MAX = ?,
       SIGL_LEN       = ?,
       ENDLEN_SPECSTD = ?,
       UPDATE_NAME    = ?,
       UPDATE_TIME    = SYSDATE
 WHERE LEN_NO = ?
		
		]]>
	</query>
</queryMap>