<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="检测项目配置">

    <query id="HttCrackSampleType.query" desc="查询">
        <![CDATA[
    SELECT
       T.TYPE_NO,
       T.SPEC_NAME,
       T.TESTING_TYPE,
       T.TESTING_LEVEL,
       T.NOTCH_LENGTH,
       T.NOTCH_WIDTH,
       T.NOTCH_DEPTH,
       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 HTT_CRACK_SAMPLE_TYPE T
 WHERE
 T.VALIDFLAG ='1'
        ]]>
    </query>

    <query id="HttCrackSampleType.update" desc="修改">
        <![CDATA[
 UPDATE HTT_CRACK_SAMPLE_TYPE T
   SET
        T.SPEC_NAME = '#SPEC_NAME#',
        T.TESTING_TYPE = '#TESTING_TYPE#',
        T.TESTING_LEVEL = '#TESTING_LEVEL#',
        T.NOTCH_LENGTH = '#NOTCH_LENGTH#',
        T.NOTCH_WIDTH = '#NOTCH_WIDTH#',
        T.NOTCH_DEPTH = '#NOTCH_DEPTH#',
        T.UPDATE_NAME = '#UPDATE_NAME#',
        T.UPDATE_TIME = SYSDATE,
        T.MEMO = '#MEMO#'
 WHERE
T.TYPE_NO = '#TYPE_NO#'
        ]]>
    </query>

    <query id="HttCrackSampleType.delete" desc="修改">
        <![CDATA[
 UPDATE HTT_CRACK_SAMPLE_TYPE T
   SET
        T.VALIDFLAG ='#VALIDFLAG#',
        T.DELETE_NAME = '#DELETE_NAME#',
        T.DELETE_TIME = SYSDATE
 WHERE
T.TYPE_NO = '#TYPE_NO#'
        ]]>
    </query>

    <query id="HttCrackSampleType.insert" desc="新增">
        <![CDATA[
     INSERT INTO HTT_CRACK_SAMPLE_TYPE(
        TYPE_NO,
        SPEC_NAME,
        TESTING_TYPE,
        TESTING_LEVEL,
        NOTCH_LENGTH,
        NOTCH_WIDTH,
        NOTCH_DEPTH,
        CREATE_NAME,
        CREATE_TIME,
        VALIDFLAG,
        MEMO)
 VALUES(
        '#TYPE_NO#',
        '#SPEC_NAME#',
        '#TESTING_TYPE#',
        '#TESTING_LEVEL#',
        '#NOTCH_LENGTH#',
        '#NOTCH_WIDTH#',
        '#NOTCH_DEPTH#',
        '#CREATE_NAME#',
        SYSDATE,
        '#VALIDFLAG#',
        '#MEMO#')
        ]]>
    </query>

    <query id="HttCrackSampleType.queryCount" desc="获取数据">
        SELECT
        COUNT(*)
        FROM HTT_CRACK_SAMPLE_TYPE T
        WHERE 1=1 AND TO_CHAR(T.CREATE_TIME, 'yyyyMMdd') = TO_CHAR(SYSDATE, 'yyyyMMdd')
    </query>

</queryMap>