<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="COM_BASE_SPLINE_LENGTH （生成工具：代码生成工具4.0   访问地址：http://172.16.2.128/tool/）">
    <query id="ComBaseSplineLengthDAL.Query" desc="查询">
        <![CDATA[
SELECT T.ID,
       T.ID OLD_ID,
       T.ITEM_CODE_F,
       T.ITEM_CODE_C,
       T.SPLINE_SHAPE,
       T.LENGTH,
       T.CREATE_NAME,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       T.UPDATE_NAME,
       TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       T.DELETE_NAME,
       TO_CHAR(T.DELETE_TIME, 'YYYY-MM-DD HH24:MI:SS') DELETE_TIME,
       DECODE(T.VALIDFLAG, '1', '有效', '0', '无效') VALIDFLAG,
       T.MEMO
  FROM COM_BASE_SPLINE_LENGTH T
 WHERE DECODE({0}, NULL, '1', T.ITEM_CODE_C) = NVL({0}, '1')
   AND T.VALIDFLAG IN ('1', {1})
   ORDER BY TO_NUMBER(T.ID)
        ]]>
    </query>
    <query id="ComBaseSplineLengthDAL.QueryByPk" desc="通过主键查询">
        <![CDATA[
 SELECT 
       T.ID,
       T.ITEM_CODE_F,
       T.ITEM_CODE_C,
       T.SPLINE_SHAPE,
       T.LENGTH,
       T.CREATE_NAME,
       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
       T.UPDATE_NAME,
       TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
       T.DELETE_NAME,
       TO_CHAR(T.DELETE_TIME, 'YYYY-MM-DD HH24:MI:SS') DELETE_TIME,
       T.VALIDFLAG,
       T.MEMO
 FROM COM_BASE_SPLINE_LENGTH T
 WHERE
       T.ID = '#ID#'
        ]]>
    </query>
    <query id="ComBaseSplineLengthDAL.Insert" desc="新增">
        <![CDATA[
 INSERT INTO COM_BASE_SPLINE_LENGTH(
        ID,
        ITEM_CODE_F,
        ITEM_CODE_C,
        SPLINE_SHAPE,
        LENGTH,
        CREATE_NAME,
        CREATE_TIME,
        MEMO)
 VALUES( 
        '#ID#',
        '#ITEM_CODE_F#',
        '#ITEM_CODE_C#',
        '#SPLINE_SHAPE#',
        '#LENGTH#',
        '#CREATE_NAME#',
        SYSDATE,
        '#MEMO#')
        ]]>
    </query>
    <query id="ComBaseSplineLengthDAL.Update" desc="修改">
        <![CDATA[
 UPDATE COM_BASE_SPLINE_LENGTH T
   SET 
        T.ID = '#ID#',
        T.ITEM_CODE_F = '#ITEM_CODE_F#',
        T.ITEM_CODE_C = '#ITEM_CODE_C#',
        T.SPLINE_SHAPE = '#SPLINE_SHAPE#',
        T.LENGTH = '#LENGTH#',
        T.UPDATE_NAME = '#UPDATE_NAME#',
        T.UPDATE_TIME = SYSDATE,
        T.MEMO = '#MEMO#'
 WHERE
       T.ID = '#OLD_ID#'
        ]]>
    </query>
    <query id="ComBaseSplineLengthDAL.GetMaxPk" desc="获取最大主键">
        <![CDATA[
SELECT NVL(MAX(ID), 0) + 1 MAX_VALUE FROM COM_BASE_SPLINE_LENGTH T
        ]]>
    </query>
    <query id="ComBaseSplineLengthDAL.Delete" desc="作废">
        <![CDATA[
UPDATE COM_BASE_SPLINE_LENGTH T
   SET
       T.VALIDFLAG = '0',
       T.DELETE_NAME = '#DELETE_NAME#',
       T.DELETE_TIME = SYSDATE
WHERE
       T.ID = '#ID#'
        ]]>
    </query>
    <query id="ComBaseSplineLengthDAL.Resume" desc="恢复">
        <![CDATA[
UPDATE COM_BASE_SPLINE_LENGTH T
   SET
       T.VALIDFLAG = '1',
       T.DELETE_NAME = NULL,
       T.DELETE_TIME = NULL,
       T.UPDATE_NAME = '#UPDATE_NAME#',
       T.UPDATE_TIME = SYSDATE
WHERE
       T.ID = '#ID#'
        ]]>
    </query>
</queryMap>