<?xml version="1.0" encoding="UTF-8"?>
<queryMap
	desc="COM_BASE_PURCHASE_STD_IDX （生成工具：代码生成工具4.0   访问地址：http://172.16.2.128/tool/）">
	<query id="ComBasePurchaseStdIdxDAL.Query" desc="查询">
        <![CDATA[
SELECT T.AGREEMENT_CODE,
       T.STD_IDX_TYPE,
       T.STD_IDX,
       T.CREATE_NAME,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME
  FROM COM_BASE_PURCHASE_STD_IDX T
 WHERE T.AGREEMENT_CODE = '#AGREEMENT_CODE#'
   AND T.STD_IDX_TYPE = '#STD_IDX_TYPE#'
        ]]>
	</query>
	<query id="ComBasePurchaseStdIdxDAL.QueryByPk" desc="通过主键查询">
        <![CDATA[
 SELECT 
       T.AGREEMENT_CODE,
       T.STD_IDX_TYPE,
       T.STD_IDX,
       T.CREATE_NAME,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME
 FROM COM_BASE_PURCHASE_STD_IDX T
 WHERE
       T.AGREEMENT_CODE = '#AGREEMENT_CODE#'
       AND T.STD_IDX_TYPE = '#STD_IDX_TYPE#'
       AND T.STD_IDX = '#STD_IDX#'
        ]]>
	</query>
	<query id="ComBasePurchaseStdIdxDAL.Insert" desc="新增">
        <![CDATA[
 INSERT INTO COM_BASE_PURCHASE_STD_IDX(
        AGREEMENT_CODE,
        STD_IDX_TYPE,
        STD_IDX,
        CREATE_NAME,
        CREATE_TIME)
 VALUES( 
        '#AGREEMENT_CODE#',
        '#STD_IDX_TYPE#',
        '#STD_IDX#',
        '#CREATE_NAME#',
        SYSDATE)
        ]]>
	</query>
	<query id="ComBasePurchaseStdIdxDAL.Update" desc="修改">
        <![CDATA[
 UPDATE COM_BASE_PURCHASE_STD_IDX T
   SET 
        T.AGREEMENT_CODE = '#AGREEMENT_CODE#',
        T.STD_IDX_TYPE = '#STD_IDX_TYPE#',
        T.STD_IDX = '#STD_IDX#',
        T.CREATE_NAME = '#CREATE_NAME#',
        T.CREATE_TIME = SYSDATE
 WHERE
       T.AGREEMENT_CODE = '#AGREEMENT_CODE#'
       AND T.STD_IDX_TYPE = '#STD_IDX_TYPE#'
       AND T.STD_IDX = '#STD_IDX#'
        ]]>
	</query>
	<query id="ComBasePurchaseStdIdxDAL.GetMaxPk" desc="获取最大主键">
        <![CDATA[
SELECT NVL(MAX(AGREEMENT_CODE), 0) + 1 MAX_VALUE FROM COM_BASE_PURCHASE_STD_IDX T
        ]]>
	</query>
	<query id="ComBasePurchaseStdIdxDAL.Delete2" desc="作废">
        <![CDATA[
DELETE FROM COM_BASE_PURCHASE_STD_IDX T WHERE T.AGREEMENT_CODE = '#AGREEMENT_CODE#'
	AND T.STD_IDX_TYPE = '#STD_IDX_TYPE#'
        ]]>
	</query>
	<query id="ComBasePurchaseStdIdxDAL.Delete" desc="作废">
        <![CDATA[
UPDATE COM_BASE_PURCHASE_STD_IDX T
   SET
       T.VALIDFLAG = '0',
       T.DELETE_NAME = '#DELETE_NAME#',
       T.DELETE_TIME = SYSDATE
WHERE
       T.AGREEMENT_CODE = '#AGREEMENT_CODE#'
       AND T.STD_IDX_TYPE = '#STD_IDX_TYPE#'
       AND T.STD_IDX = '#STD_IDX#'
        ]]>
	</query>
	<query id="ComBasePurchaseStdIdxDAL.Resume" desc="恢复">
        <![CDATA[
UPDATE COM_BASE_PURCHASE_STD_IDX T
   SET
       T.VALIDFLAG = '1',
       T.DELETE_NAME = NULL,
       T.DELETE_TIME = NULL,
       T.UPDATE_NAME = '#UPDATE_NAME#',
       T.UPDATE_TIME = SYSDATE
WHERE
       T.AGREEMENT_CODE = '#AGREEMENT_CODE#'
       AND T.STD_IDX_TYPE = '#STD_IDX_TYPE#'
       AND T.STD_IDX = '#STD_IDX#'
        ]]>
	</query>
	
	<query id="ComBasePurchaseStdIdxDAL.DeleteByAgreementCode" desc="删除">
        <![CDATA[
DELETE FROM COM_BASE_PURCHASE_STD_IDX A WHERE A.AGREEMENT_CODE = '#AGREEMENT_CODE#'
        ]]>
	</query>
</queryMap>