<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="合同信息维护界面">

	<query id="CoreOrderStatusCommFun.InsertOrderReview" desc="合同评审主记录">
		<![CDATA[
	   INSERT INTO SLM_ORDER_REVIEW
  (REVIEW_NO,
   REVIEW_SRC,
   ORD_PK,
   REVIEW_STATUS,
   REVEIW_ASKER,
   REVEIW_ASK_TIME,
   CREATE_NAME,
   CREATE_TIME)
   VALUES
  (?,
   ?,
   ?,
   ?,
   ?,
   SYSDATE,
   ?,
   SYSDATE
   )
	   
				
		]]>
	</query>

	<query id="CoreOrderStatusCommFun.CreateReviewNo" desc="根据ORDPK生成ReviewNo">
		<![CDATA[
    SELECT ? || ? || LPAD(?, 2, '0') || LPAD(?, 2, '0') ||
          LPAD(TO_NUMBER(NVL(MAX(SUBSTR(REVIEW_NO, 10, 6)), '0')) + 1,
               6,
               '0')
    FROM SLM_ORDER_REVIEW
    WHERE SUBSTR(REVIEW_NO,1,9)= ? || ? || LPAD(?, 2, '0') || LPAD(?, 2, '0')

		]]>
	</query>

	<query id="CoreOrderStatusCommFun.InsertOrdereViewItem" desc="新增合同评审项目记录">
		<![CDATA[
	   INSERT INTO SLM_ORDER_REVIEW_ITEM
  (REVIEW_NO,
   REVIEW_ITM,
   REVIEW_ITEM_DESC,
   REVIEW_STATUS,
   CREATE_NAME,
   CREATE_TIME)
   VALUES
  (?, ?, ?, ?, ?, SYSDATE)
	   
	  	
		]]>
	</query>

	<query id="CoreOrderStatusCommFun.GetOrdLnPkValue" desc="获取ORDPK下的所有ORDLNPK值">
		<![CDATA[
	   SELECT T.ORD_LN_PK FROM SLM_ORDER_LINE T
	   WHERE T.ORD_PK = ? AND T.VALIDFLAG = '1'
	  	
		]]>
	</query>

	<query id="CoreOrderStatusCommFun.UpdateReviewInfo" desc="更新评审明细表的信息">
         <![CDATA[
       		 UPDATE SLM_ORDER_REVIEW_ITEM_LIST
        SET REVIEW_STATUS = ?,
       REVIEW_MAN    = ?,
       REVIEW_DEPT   = ?,
       REVIEW_BDATE  = SYSDATE

     WHERE REVIEW_NO = ?
      AND REVIEW_ITM = ?
      AND LIST_TYP = ?
  
     AND IS_CURT_REVIEW = '1'
       		  
       		   
        ]]>
	</query>

	<query id="CoreOrderStatusCommFun.UpdateOrderReviewItem" desc="更新合同评审项目+时间">
		<![CDATA[
    UPDATE SLM_ORDER_REVIEW_ITEM
       SET REVIEW_STATUS = ?,
       REVEIW_BDATE = SYSDATE
    WHERE REVIEW_NO = ?
    AND REVIEW_ITM = ?
   
    AND VALIDFLAG ='1'
		]]>
	</query>

	<query id="CoreOrderStatusCommFun.UpdateOrderReviewItemNoDate"
		desc="更新合同评审项目+时间">
		<![CDATA[
    UPDATE SLM_ORDER_REVIEW_ITEM
       SET REVIEW_STATUS = ?
       
    WHERE REVIEW_NO = ?
    AND REVIEW_ITM = ?
   
    AND VALIDFLAG ='1'
		]]>
	</query>

	<query id="CoreOrderStatusCommFun.UpdateOrderReviewItemClearEDate"
		desc="更新合同评审项目+时间">
		<![CDATA[
    UPDATE SLM_ORDER_REVIEW_ITEM
       SET REVIEW_STATUS = ?,
       REVEIW_EDATE = null
       
    WHERE REVIEW_NO = ?
    AND REVIEW_ITM = ?
   
    AND VALIDFLAG ='1'
		]]>
	</query>

	<query id="CoreOrderStatusCommFun.UpdateOrderReviewItemEDate"
		desc="更新合同评审项目+时间">
		<![CDATA[
    UPDATE SLM_ORDER_REVIEW_ITEM
       SET REVIEW_STATUS = ?,
       REVEIW_EDATE = SYSDATE
    WHERE REVIEW_NO = ?
    AND REVIEW_ITM = ?
   
    AND VALIDFLAG ='1'
		]]>
	</query>


	<query id="CoreOrderStatusCommFun.UpdateOrderReviewItemList"
		desc="更新合同评审明细">
		<![CDATA[
     UPDATE SLM_ORDER_REVIEW_ITEM_LIST
     SET IS_CURT_REVIEW = ?,
         REVIEW_STATUS  = ?,
         REVIEW_MAN    =  ?,
         REVIEW_F_RS   = ?,
         REVIEW_DEPT   = ?,
         RT_REVIEW_ITM  = ?
         
     WHERE REVIEW_NO = ?
     AND REVIEW_ITM = ?
     AND LIST_TYP = ?
     AND LIST_PK_VAL = ?
     AND IS_CURT_REVIEW = ?
		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.UpdateOrderReviewItemListEDate"
		desc="更新合同评审明细">
		<![CDATA[
     UPDATE SLM_ORDER_REVIEW_ITEM_LIST
     SET IS_CURT_REVIEW = ?,
         REVIEW_STATUS  = ?,
         REVIEW_MAN    =  ?,
         REVIEW_F_RS   = ?,
         REVIEW_DEPT   = ?,
         REVIEW_EDATE = SYSDATE
     WHERE REVIEW_NO = ?
     AND REVIEW_ITM = ?
     AND LIST_TYP = ?
     AND LIST_PK_VAL = ?
     AND IS_CURT_REVIEW = ?
		]]>
	</query>

	<query id="CoreOrderStatusCommFun.UpdateOrderReviewItemListStatus"
		desc="一条合同行状态修改">
		<![CDATA[
	     UPDATE SLM_ORDER_REVIEW_ITEM_LIST
     SET  
         REVIEW_STATUS  = ?,
        REVIEW_MAN   =  ?,
        REVIEW_DEPT  =  ?,
        REVIEW_F_RS   = ?,
        RT_REVIEW_ITM = ?,
        REVIEW_EDATE = SYSDATE
     WHERE REVIEW_NO = ?
     AND REVIEW_ITM = ?
     AND LIST_TYP = ?
     AND LIST_PK_VAL = ?
     AND IS_CURT_REVIEW = ?
	  	
		]]>
	</query>

	<query id="CoreOrderStatusCommFun.UpdateOrderHeadStatus" desc="合同头状态修改">
		<![CDATA[
	   UPDATE SLM_ORDER_HEAD
       SET ORDER_STS = ?, 
       ORDER_STS_DESC  = ?,
       BE_ORDER_STS = ?,
       APPROVAL_MAN  =  ?,
       APPROVAL_TIME = TO_DATE(?,'YYYY-MM-DD HH24:MI:SS')
       WHERE ORD_PK = ?
       AND VALIDFLAG = '1'
	  	
		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.UpdateOrderHeadStatusConfirm" desc="合同头状态修改">
		<![CDATA[
	   UPDATE SLM_ORDER_HEAD
       SET ORDER_STS = ?, 
       ORDER_STS_DESC  = ?,
       APPROVAL_MAN  =  ?,
       APPROVAL_TIME = TO_DATE(?,'YYYY-MM-DD HH24:MI:SS')
       WHERE ORD_PK = ?
       AND VALIDFLAG = '1'
	  	
		]]>
	</query>

	<query id="CoreOrderStatusCommFun.UpdateOrderHeadStatusEffect"
		desc="合同生效">
		<![CDATA[
	   UPDATE SLM_ORDER_HEAD
       SET ORDER_STS = ?, 
       ORDER_STS_DESC  = ?,
       BE_ORDER_STS = ?,
       EFFECT_MAN  =  ?,
       EFFECT_TIME = SYSDATE,
       CUSTM_ORDER_NO = ?
       WHERE ORD_PK = ?
       AND VALIDFLAG = '1'
	  	
		]]>
	</query>

	<query id="CoreOrderStatusCommFun.UpdateOrderHeadStatusNoEffect"
		desc="合同撤销生效">
		<![CDATA[
	   UPDATE SLM_ORDER_HEAD
       SET ORDER_STS = ?, 
       ORDER_STS_DESC  = ?,
       BE_ORDER_STS = ?,
       EFFECT_MAN  =  '',
       EFFECT_TIME = ''
       WHERE ORD_PK = ?
       AND VALIDFLAG = '1'
	  	
		]]>
	</query>

	<query id="CoreOrderStatusCommFun.UpdateDeliveryLineStatus" desc="一条交货行行状态修改">
		<![CDATA[
	   UPDATE SLM_ORDER_LINE_DELIVERY 
	   SET BE_DELIVERY_STATUS = DELIVERY_STATUS,
	       DELIVERY_STATUS = ?
	       WHERE ORD_LN_DLY_PK = ?
	       AND VALIDFLAG = '1'
		]]>
	</query>


	<query id="CoreOrderStatusCommFun.UpdateOrderLineStatus" desc="合同行状态修改">
		<![CDATA[
	   	UPDATE SLM_ORDER_LINE
	   	SET BE_ORDER_LN_STATUS = ORDER_LN_STATUS,
	   	   ORDER_LN_STATUS = ?
	   	WHERE  ORD_LN_PK = ?
	   	AND  VALIDFLAG = '1'
	   	 
		]]>
	</query>

	<query id="CoreOrderStatusCommFun.UpdateOrderHeadStatusRep" desc="交货行状态批量修改">
		<![CDATA[
	 	UPDATE SLM_ORDER_HEAD 
	 	SET BE_ORDER_STS = ORDER_STS,
	 	    ORDER_STS    = ?,
	 	    ORDER_STS_DESC = ?
	 	 WHERE ORD_PK = ?
	 	 AND VALIDFLAG = '1'
	 	   
		]]>
	</query>

	<query id="CoreOrderStatusCommFun.UpdateDeliveryLineOneStatus"
		desc="交货行状态批量修改">
		<![CDATA[
	 UPDATE SLM_ORDER_LINE_DELIVERY
     SET DELIVERY_STATUS = BE_DELIVERY_STATUS,
         BE_DELIVERY_STATUS = ?
     WHERE ORD_LN_DLY_PK = ?
     AND VALIDFLAG = '1'
	 		
		]]>
	</query>


	<query id="CoreOrderStatusCommFun.UpdateLineStatusWithOrdLnDlyPk"
		desc="交货行状态批量修改">
		<![CDATA[
	 UPDATE SLM_ORDER_LINE
     SET ORDER_LN_STATUS =  ?
     
     WHERE ORD_LN_PK = ?
     AND VALIDFLAG = '1'
	 		
		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.UpdateHeadStatusWithOrdLnDlyPk"
		desc="交货行状态批量修改">
		<![CDATA[
	 UPDATE SLM_ORDER_HEAD
     SET ORDER_STS = ?,
       ORDER_STS_DESC = 
       (SELECT BASENAME FROM COM_BASE_INFO 
       WHERE BASECODE=? AND VALIDFLAG='1')
     WHERE ORD_PK = ?
     AND VALIDFLAG = '1'
	 		
		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.GetDeliveryBeStatusWithOrdLnDlyPk"
		desc="交货行状态批量修改">
		<![CDATA[
	 SELECT  BE_DELIVERY_STATUS FROM SLM_ORDER_LINE_DELIVERY
	 WHERE ORD_LN_DLY_PK = ? AND VALIDFLAG = '1'
	 		
		]]>
	</query>


	<query id="CoreOrderStatusCommFun.UpdateOrderReviewItemListSetValid" desc="更新合同评审明细">
		<![CDATA[
     UPDATE SLM_ORDER_REVIEW_ITEM_LIST
     SET IS_CURT_REVIEW = '0',
         REVIEW_MAN   =  ?,
         REVIEW_DEPT  =  ?,
         RT_REVIEW_ITM = ?
     WHERE REVIEW_NO = ?
     AND REVIEW_ITM = ?
     AND LIST_TYP = ?
     AND LIST_PK_VAL = ?
     AND IS_CURT_REVIEW = ?
    
		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.UpdateOrderReviewItemListSetValidNoDesc" desc="更新合同评审明细">
		<![CDATA[
     UPDATE SLM_ORDER_REVIEW_ITEM_LIST
     SET IS_CURT_REVIEW = '0',
         REVIEW_MAN   =  ?,
         REVIEW_DEPT  =  ?
     WHERE REVIEW_NO = ?
     AND REVIEW_ITM = ?
     AND LIST_TYP = ?
     AND LIST_PK_VAL = ?
     AND IS_CURT_REVIEW = ?
    
		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.InsertOrderReviewItemList" desc="新增合同评审明细">
		<![CDATA[
     INSERT INTO SLM_ORDER_REVIEW_ITEM_LIST
  (REVIEW_NO,
   REVIEW_ITM,
   LIST_TYP,
   LIST_PK_VAL,
   REVIEW_TIMES,
   IS_CURT_REVIEW,
   REVIEW_STATUS,
   CREATE_NAME,
   CREATE_TIME,
   REVIEW_DEPT,
   RT_REVIEW_ITM)
 VALUES
  (?,
   ?,
   ?,
   ?,
   (SELECT LPAD(TO_NUMBER(NVL(MAX(TO_NUMBER(REVIEW_TIMES)),'0')) + 1, 4, '0')
      FROM SLM_ORDER_REVIEW_ITEM_LIST
     WHERE REVIEW_NO = ?
       AND REVIEW_ITM = ?
       AND LIST_TYP = ?
       AND LIST_PK_VAL = ?),
    '1',
    ?,?,SYSDATE,?,?)
     
		]]>
	</query>
	
		<query id="CoreOrderStatusCommFun.InsertOrderReviewItemListMemo" desc="新增合同评审明细">
		<![CDATA[
     INSERT INTO SLM_ORDER_REVIEW_ITEM_LIST
  (REVIEW_NO,
   REVIEW_ITM,
   LIST_TYP,
   LIST_PK_VAL,
   REVIEW_TIMES,
   IS_CURT_REVIEW,
   REVIEW_STATUS,
   CREATE_NAME,
   CREATE_TIME,
   REVIEW_DEPT,
   RT_REVIEW_ITM,
   REVIEW_F_RS)
 VALUES
  (?,
   ?,
   ?,
   ?,
   (SELECT LPAD(TO_NUMBER(NVL(MAX(TO_NUMBER(REVIEW_TIMES)),'0')) + 1, 4, '0')
      FROM SLM_ORDER_REVIEW_ITEM_LIST
     WHERE REVIEW_NO = ?
       AND REVIEW_ITM = ?
       AND LIST_TYP = ?
       AND LIST_PK_VAL = ?),
    '1',
    ?,?,SYSDATE,?,?,?)
     
		]]>
	</query>
	
	
	
	<query id="CoreOrderStatusCommFun.UpdateOrderReviewItemListSet0" desc="更新合同评审明细">
		<![CDATA[
     UPDATE SLM_ORDER_REVIEW_ITEM_LIST
     SET IS_CURT_REVIEW = '0',
       RT_REVIEW_ITM = ?,
       REVIEW_EDATE = SYSDATE
     WHERE REVIEW_NO = ?
     AND REVIEW_ITM = ?
     AND LIST_TYP = ?
     AND LIST_PK_VAL = ?
    
		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.UpdateOrderReviewAllItemList"
		desc="更新合同评审明细">
		<![CDATA[
     UPDATE SLM_ORDER_REVIEW_ITEM_LIST
     SET IS_CURT_REVIEW = '0',
         REVIEW_MAN   =  ?,
         REVIEW_DEPT  =  ?,
         RT_REVIEW_ITM = ?,
         REVIEW_EDATE = SYSDATE
     
     WHERE REVIEW_NO = ?
     AND LIST_TYP = ?
     AND LIST_PK_VAL = ?
    
		]]>
	</query>
	
	
	<query id="CoreOrderStatusCommFun.AddOrderReviewItemlistBackUp"
		desc="评审通过时新增一条备份评审明细记录">
		<![CDATA[
    	
    		INSERT INTO SLM_ORDER_REVIEW_ITEM_LIST
    (LIST_TYP,
   LIST_PK_VAL,
   REVIEW_TIMES,
   IS_CURT_REVIEW,
   REVIEW_STATUS,
   REVIEW_F_RS,
   RT_REVIEW_ITM,
   REVIEW_MAN,
   REVIEW_DEPT,
   REVIEW_BDATE,
   REVIEW_EDATE,
   CREATE_NAME,
   CREATE_TIME,
   REVIEW_NO,
   REVIEW_ITM)
   VALUES
  ('#LIST_TYP#',
   '#LIST_PK_VAL#',
   (SELECT LPAD(TO_NUMBER(NVL(MAX(TO_NUMBER(REVIEW_TIMES)),'0')) + 1, 4, '0')
      FROM SLM_ORDER_REVIEW_ITEM_LIST
     WHERE REVIEW_NO = '#REVIEW_NO#'
       AND REVIEW_ITM = '#REVIEW_ITM#'
       AND LIST_TYP = '#LIST_TYP#'
       AND LIST_PK_VAL = '#LIST_PK_VAL#'),
   '#IS_CURT_REVIEW#',
   '#REVIEW_STATUS#',
   '#REVIEW_F_RS#',
   '#RT_REVIEW_ITM#',
   '#REVIEW_MAN#',
   '#REVIEW_DEPT#',
   SYSDATE,
   SYSDATE,
   '#CREATE_NAME#',
   SYSDATE,
   '#REVIEW_NO#',
   '#REVIEW_ITM#')
    		
		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.SetOrderItemListValue0"
		desc="将一条状态为1的置为0，不改变其他信息。">
		<![CDATA[
    	UPDATE SLM_ORDER_REVIEW_ITEM_LIST 
    	SET IS_CURT_REVIEW = '0'
    	WHERE REVIEW_NO = ?
    	AND REVIEW_ITM = ?
    	AND LIST_TYP = ?
    	AND LIST_PK_VAL = ?
    	AND IS_CURT_REVIEW = '1'
    
		]]>
	</query>
	
	
	<query id="CoreOrderStatusCommFun.SELECTOrderItemListWithStatus1"
		desc="取出项目明细表某一项目状态为1的数据">
		<![CDATA[
    	 SELECT 
       LIST_TYP,
       LIST_PK_VAL,
       REVIEW_TIMES,
       IS_CURT_REVIEW,
       REVIEW_STATUS,
       REVIEW_F_RS,
       RT_REVIEW_ITM,
       REVIEW_MAN,
       REVIEW_DEPT,
       TO_CHAR(REVIEW_BDATE, 'YYYY-MM-DD HH24:MI:SS') REVIEW_BDATE,
       TO_CHAR(REVIEW_EDATE, 'YYYY-MM-DD HH24:MI:SS') REVIEW_EDATE,
       CREATE_NAME,
       TO_CHAR(CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       UPDATE_NAME,
       TO_CHAR(UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       DELETE_NAME,
       TO_CHAR(DELETE_TIME, 'YYYY-MM-DD HH24:MI:SS') DELETE_TIME,
       REVIEW_NO,
       REVIEW_ITM
       FROM SLM_ORDER_REVIEW_ITEM_LIST
       WHERE REVIEW_NO = ?
       AND REVIEW_ITM = ?
       AND LIST_TYP = ?
       AND LIST_PK_VAL = ?
       AND IS_CURT_REVIEW = '1'
 
    	
		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.GetOrderType"
		desc="获取合同类型">
		<![CDATA[
     SELECT ORDER_TYP  FROM SLM_ORDER_HEAD T
     WHERE T.ORD_PK = ? AND T.VALIDFLAG = '1'
    
		]]>
	</query>
	
	
	
	<query id="CoreOrderStatusCommFun.UpdateOrderItemListOrdLnPk"
		desc="更新单独一行的记录">
	  <![CDATA[
	     UPDATE SLM_ORDER_REVIEW_ITEM_LIST
    SET 
       
       REVIEW_STATUS  = ?

   WHERE REVIEW_NO = ?
   AND REVIEW_ITM = ?
   AND LIST_TYP = ?
   AND LIST_PK_VAL = ?
   AND IS_CURT_REVIEW = '1'
	     
    
		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.GetOrderItemListOrdLnPk"
		desc="更新单独一行的记录">
	  <![CDATA[
   SELECT REVIEW_STATUS
   FROM SLM_ORDER_REVIEW_ITEM_LIST T
   WHERE T.REVIEW_NO = ?
   AND T.REVIEW_ITM = ?
   AND T.LIST_TYP = ?
   AND T.LIST_PK_VAL = ?
   AND IS_CURT_REVIEW = '1'

    
		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.ClearOrderLinePrdcrNo"
		desc="更新单独一行的记录">
	  <![CDATA[
   
		UPDATE SLM_ORDER_LINE T
		SET T.PRDCR_NO = ''
		WHERE T.VALIDFLAG = '1'
		AND T.ORD_LN_PK = ?
    
		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.SelectOrderLinePrdcrNo"  desc="更新单独一行的记录">
	  <![CDATA[
   
		SELECT PRDCR_NO FROM SLM_ORDER_LINE T
		WHERE T.VALIDFLAG = '1'
		AND T.ORD_LN_PK = ?
    
		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.DeleteOrderLinePrdcrNo"  desc="更新单独一行的记录">
	  <![CDATA[
   
		 DELETE FROM SLM_ORDER_LINE_PRDCR T 
		 WHERE T.PRDCR_NO = ?
    
		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.DeleteOrderLinePrdcrNoList"  desc="更新单独一行的记录">
	  <![CDATA[
   
		DELETE FROM SLM_ORDER_LINE_PRDCR_LST T
		WHERE  T.PRDCR_NO = ?
    
		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.getOrderReviewListStatus"  desc="更新单独一行的记录">
	  <![CDATA[
     SELECT REVIEW_STATUS
     FROM SLM_ORDER_REVIEW_ITEM_LIST T, SLM_ORDER_LINE T1
     WHERE T1.ORD_PK = ?
     AND T.LIST_PK_VAL = T1.ORD_LN_PK
     AND T.LIST_TYP = 'L'
     AND T.IS_CURT_REVIEW = '1'
     AND T1.VALIDFLAG = '1'

		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.updateOrderPriceStatus"  desc="更新单独一行的记录">
	  <![CDATA[
         UPDATE  SLM_ORDER_PRICE T
         SET T.PRICE_STATUS = 'W'
         WHERE T.PRICE_NO = (SELECT PRICE_NO FROM 
         SLM_ORDER_HEAD A WHERE A.ORD_PK = ? AND A.VALIDFLAG = '1')

		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.clearOrderPriceList"  desc="更新单独一行的记录">
	  <![CDATA[
         DELETE FROM  SLM_ORDER_PRICE_LIST T
         WHERE T.PRICE_NO = (SELECT PRICE_NO FROM 
         SLM_ORDER_HEAD A WHERE A.ORD_PK = ? AND A.VALIDFLAG = '1')

		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.clearOrderPrice"  desc="更新单独一行的记录">
	  <![CDATA[
         DELETE FROM   SLM_ORDER_PRICE T
         WHERE T.PRICE_NO = (SELECT PRICE_NO FROM 
         SLM_ORDER_HEAD A WHERE A.ORD_PK = ? AND A.VALIDFLAG = '1')

		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.clearOrderPriceNo"  desc="更新单独一行的记录">
	  <![CDATA[
         UPDATE SLM_ORDER_HEAD T
         SET T.PRICE_NO  = ''
         WHERE T.ORD_PK = ? 
         AND T.VALIDFLAG = '1'

		]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.insertProcessOrder" desc="生效插入进程表">
	   <![CDATA[
		 INSERT INTO PROCESS_ORDER_M
   (ORD_PK, ORD_LN_PK, ORD_LN_DLY_PK, DELVRY_QTY, ORDER_UNIT, ENSU_TOTL_LEN)
   SELECT ORD_PK,
         ORD_LN_PK,
         ORD_LN_DLY_PK,
         DELVRY_QTY,
         ORDER_UNIT,
         ENSU_TOTL_LEN
    FROM SLM_ORDER_LINE_DELIVERY T
    WHERE T.ORD_PK = ?
     AND T.VALIDFLAG = '1'
		 		
	   ]]>
	</query>
	
	<query id="CoreOrderStatusCommFun.clearProcessOrder" desc="生效插入进程表">
	   <![CDATA[
		 DELETE FROM PROCESS_ORDER_M T WHERE T.ORD_PK = ?
      		
	   ]]>
	</query>
	
</queryMap>


