<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="基价管理">
	<query id="CorePriceAddPriceLine.insert" desc="查询数据 ">
	<![CDATA[
	  INSERT INTO SLM_PRICE_ADDPRICE_LINE(
        PRICEADD_ID,
        PRICEADD_LINE_ID,
        PRICEADD_CLASSIFY,
        PRICEADD_ITEM,
        PRICEADD_ITEMVALUE,
        PRICEADD_PRICE,
        PRICEADD_SUIT,
     PRICE_STEP,
        CREATE_NAME,
        CREATE_TIME)
 VALUES( 
        '#PRICEADD_ID#',
        (SELECT 'L' || LPAD(TO_NUMBER(NVL(SUBSTR(MAX(PRICEADD_LINE_ID), 2, 6), '0')) + 1, 6, '0') FROM SLM_PRICE_ADDPRICE_LINE A ),
        '#PRICEADD_CLASSIFY#',
        '#PRICEADD_ITEM#',
        '#PRICEADD_ITEMVALUE#',
        '#PRICEADD_PRICE#',
        '#PRICEADD_SUIT#',
     '#PRICE_STEP#',
        '#CREATE_NAME#',
        SYSDATE)


	
	
	]]>
	</query>
	
	<query id="CorePriceAddPriceLine.update" desc="更新基价维护 信息">
	<![CDATA[
  UPDATE SLM_PRICE_ADDPRICE_LINE T
   SET 
     
        T.PRICEADD_CLASSIFY = '#PRICEADD_CLASSIFY#',
        T.PRICEADD_ITEM = '#PRICEADD_ITEM#',
        T.PRICEADD_ITEMVALUE = '#PRICEADD_ITEMVALUE#',
        T.PRICEADD_PRICE = '#PRICEADD_PRICE#',
        T.PRICEADD_SUIT = '#PRICEADD_SUIT#',
         T.PRICE_STEP= '#PRICE_STEP#',
      
    
        T.UPDATE_NAME = '#UPDATE_NAME#',
        T.UPDATE_TIME = SYSDATE,
 WHERE
T.PRICEADD_ID = '#PRICEADD_ID#'
AND  T.PRICEADD_LINE_ID = '#PRICEADD_LINE_ID#'
   AND T.VALIDFLAG = '1'
	       
	]]>
	</query>
	
	<query id="CorePriceAddPriceLine.Delete" desc="删除价格因素范围">
	<![CDATA[
	
	   UPDATE   SLM_PRICE_ADDPRICE_LINE  T 
	   SET T.VALIDFLAG = '0',
	       T.UPDATE_NAME = '#UPDATE_NAME#',
	       T.UPDATE_TIME = SYSDATE
	   WHERE  T.PRICEADD_ID = '#PRICEADD_ID#'
AND  T.PRICEADD_LINE_ID = '#PRICEADD_LINE_ID#'
	      AND T.VALIDFLAG = '1'
	     
	]]>
	</query>

	<query id="CorePriceAddPriceLine.Resume" desc="恢复价格因素范围">
	<![CDATA[
	
	   UPDATE  SLM_PRICE_ADDPRICE_LINE  T 
	   SET T.VALIDFLAG = '1',
	       T.UPDATE_NAME =  '#UPDATE_NAME#',
	       T.UPDATE_TIME = SYSDATE
	   WHERE  T.PRICEADD_ID = '#PRICEADD_ID#'
AND  T.PRICEADD_LINE_ID = '#PRICEADD_LINE_ID#'
	      AND T.VALIDFLAG = '0'
	     
	]]>
	</query>
</queryMap>
