<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="权限功能表查询">

 <query id="CoreOrderLen.GetLenNoByLenTyp" desc="权限功能">
		<![CDATA[
				SELECT LEN_NO FROM 
				(SELECT LEN_NO FROM SLM_ORDER_LEN ORDER BY CREATE_TIME DESC) 
				WHERE ROWNUM<4
		]]>
</query>
 
<query id="CoreOrderLen.GetLenNo" desc="权限功能">
		<![CDATA[
	SELECT TO_NUMBER(NVL(MAX(SUBSTR(LEN_NO, 2, 7)), '0'))+1 FROM SLM_ORDER_LEN T
		]]>
</query>


<query id="CoreOrderLen.isRepeat" desc="权限功能">
		<![CDATA[
				SELECT LEN_NO FROM SLM_ORDER_LEN WHERE LEN_DESC=?	
		]]>
</query>

<query id="CoreOrderLen.QUERYQQ" desc="权限功能">
		<![CDATA[
				SELECT LEN_NO,
					   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,
       				   USE_TIME,
       				   ENDLEN_SPECSTD,
       				   CREATE_NAME,
       				   CREATE_TIME,
       				   UPDATE_NAME,
       				   UPDATE_TIME,
       				   DELETE_NAME,
       				   DELETE_TIME 
       			FROM SLM_ORDER_LEN ORDER BY LEN_NO  
		]]>
	</query>
	
	<query id="CoreOrderLen.QUERY" desc="分三部分查询信息，字段太多，用*表示">
		<![CDATA[
      SELECT *
   FROM SLM_ORDER_LEN T
   WHERE  T.LEN_NO = ? OR T.LEN_TYP = '固定'  
   ORDER BY LEN_NO
		]]>
	</query>
	
	<query id="CoreOrderLen.QUERY1" desc="分三部分查询信息，字段太多，用*表示">
		<![CDATA[
			SELECT *
          FROM SLM_ORDER_LEN T
          WHERE T.LEN_NO = ?
 
		]]>
	</query>
	
	
	
	
	<query id="CoreOrderLen.doUpdate" desc="确认功能">
		<![CDATA[
				 UPDATE SLM_ORDER_LEN SET 
				 		USE_TIME=USE_TIME+1,
				 		CREATE_TIME=SYSDATE 
				 		WHERE LEN_NO=?
		]]>
	</query>
	
	<query id="CoreOrderLen.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,
					            AVG_LEN_MAX,
					            ENDLEN_SPECSTD,
					            DIFRNC_LEN_MAX,
					            CREATE_NAME,
					            CREATE_TIME,
					            USE_TIME) 
					            VALUES
					            (?,?,?,?,
					            ?,?,?,?,
					            ?,?,?,?,
					            ?,?,?,?,?,SYSDATE,
					            ?)
		]]>
	</query>
	
	<query id="CoreOrderLen.doDelete" desc="删除功能">
		<![CDATA[
				 DELETE SLM_ORDER_LEN WHERE LEN_NO=?
		]]>
	</query>
	
	<!--  <query id="CoreOrderLen.doDelete" desc="删除功能">
		<![CDATA[
	       SELECT T1.MSC
           FROM COM_PSC_R_MSC T, COM_MSC T1
           WHERE PSC = ?
           AND T.MSC = T1.MSC
           AND TRIM(MSC_SEQ) IS NULL
                           	]]>
	</query>-->
	
	
	
	
</queryMap>