<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="TQNQC01 （生成工具：代码生成工具1.0.0.0   访问地址：http://172.16.2.128/tool/）">
    <query id="Tqnqc01DAL.Query" desc="查询">
        <![CDATA[
 SELECT 
       T.REC_CREATOR,
       T.REC_CREATE_TIME,
       T.REC_REVISOR,
       T.REC_REVISE_TIME,
       T.ARCHIVE_FLAG,
       T.DU_FLAG,
       T.DU_MAKER,
       T.DU_TIME,
       T.VERSION,
       T.MATERIAL_NAME,
       T.ELEMNT_C,
       T.ELEMNT_MN,
       T.ELEMNT_SI,
       T.ELEMNT_P,
       T.ELEMNT_S,
       T.ELEMNT_CR,
       T.ELEMNT_NI,
       T.ELEMNT_MO,
       T.ELEMNT_V,
       T.ELEMNT_NB,
       T.ELEMNT_A1,
       T.ELEMNT_TI,
       T.ELEMNT_B,
       T.ELEMNT_N,
       T.ELEMNT_CA,
       T.ELEMNT_CU,
       T.ELEMNT_W,
       T.ELEMNT_CO,
       T.ELEMNT_ALS,
       T.ELEMNT_AS,
       T.ELEMNT_PB,
       T.ELEMNT_SB,
       T.ELEMNT_SN,
       T.ELEMNT_BI,
       T.ELEMNT_MG,
       T.ELEMNT_ZR,
       T.ELEMNT_LA,
       T.ELEMNT_CE,
       T.ELEMNT_SE,
       T.ELEMNT_CD,
       T.ELEMNT_BS,
       T.ELEMNT_ALN,
       T.ELEMNT_BN,
       T.ELEMNT_FE,
       T.ELEMNT_BAK1,
       T.ELEMNT_BAK2,
       T.ELEMNT_BAK3,
       T.ELEMNT_BAK4,
       T.ELEMNT_BAK5,
       T.ELEMNT_BAK6,
       T.ELEMNT_BAK7,
       T.ELEMNT_BAK8,
       T.ELEMNT_BAK9,
       T.ELEMNT_BAK10,
       T.MATERIAL_CODE
 FROM TQNQC01 T
 WHERE
       T.MATERIAL_NAME = '#MATERIAL_NAME#'
       AND T.MATERIAL_CODE = '#MATERIAL_CODE#'
        ]]>
    </query>
    <query id="Tqnqc01DAL.QueryByPk" desc="通过主键查询">
        <![CDATA[
 SELECT 
       T.REC_CREATOR,
       T.REC_CREATE_TIME,
       T.REC_REVISOR,
       T.REC_REVISE_TIME,
       T.ARCHIVE_FLAG,
       T.DU_FLAG,
       T.DU_MAKER,
       T.DU_TIME,
       T.VERSION,
       T.MATERIAL_NAME,
       T.ELEMNT_C,
       T.ELEMNT_MN,
       T.ELEMNT_SI,
       T.ELEMNT_P,
       T.ELEMNT_S,
       T.ELEMNT_CR,
       T.ELEMNT_NI,
       T.ELEMNT_MO,
       T.ELEMNT_V,
       T.ELEMNT_NB,
       T.ELEMNT_A1,
       T.ELEMNT_TI,
       T.ELEMNT_B,
       T.ELEMNT_N,
       T.ELEMNT_CA,
       T.ELEMNT_CU,
       T.ELEMNT_W,
       T.ELEMNT_CO,
       T.ELEMNT_ALS,
       T.ELEMNT_AS,
       T.ELEMNT_PB,
       T.ELEMNT_SB,
       T.ELEMNT_SN,
       T.ELEMNT_BI,
       T.ELEMNT_MG,
       T.ELEMNT_ZR,
       T.ELEMNT_LA,
       T.ELEMNT_CE,
       T.ELEMNT_SE,
       T.ELEMNT_CD,
       T.ELEMNT_BS,
       T.ELEMNT_ALN,
       T.ELEMNT_BN,
       T.ELEMNT_FE,
       T.ELEMNT_BAK1,
       T.ELEMNT_BAK2,
       T.ELEMNT_BAK3,
       T.ELEMNT_BAK4,
       T.ELEMNT_BAK5,
       T.ELEMNT_BAK6,
       T.ELEMNT_BAK7,
       T.ELEMNT_BAK8,
       T.ELEMNT_BAK9,
       T.ELEMNT_BAK10,
       T.MATERIAL_CODE
 FROM TQNQC01 T
 WHERE
       T.MATERIAL_NAME = '#MATERIAL_NAME#'
       AND T.MATERIAL_CODE = '#MATERIAL_CODE#'
        ]]>
    </query>
    <query id="Tqnqc01DAL.Insert" desc="新增">
        <![CDATA[
 INSERT INTO TQNQC01(
        REC_CREATOR,
        REC_CREATE_TIME,
        REC_REVISOR,
        REC_REVISE_TIME,
        ARCHIVE_FLAG,
        DU_FLAG,
        DU_MAKER,
        DU_TIME,
        VERSION,
        MATERIAL_NAME,
        ELEMNT_C,
        ELEMNT_MN,
        ELEMNT_SI,
        ELEMNT_P,
        ELEMNT_S,
        ELEMNT_CR,
        ELEMNT_NI,
        ELEMNT_MO,
        ELEMNT_V,
        ELEMNT_NB,
        ELEMNT_A1,
        ELEMNT_TI,
        ELEMNT_B,
        ELEMNT_N,
        ELEMNT_CA,
        ELEMNT_CU,
        ELEMNT_W,
        ELEMNT_CO,
        ELEMNT_ALS,
        ELEMNT_AS,
        ELEMNT_PB,
        ELEMNT_SB,
        ELEMNT_SN,
        ELEMNT_BI,
        ELEMNT_MG,
        ELEMNT_ZR,
        ELEMNT_LA,
        ELEMNT_CE,
        ELEMNT_SE,
        ELEMNT_CD,
        ELEMNT_BS,
        ELEMNT_ALN,
        ELEMNT_BN,
        ELEMNT_FE,
        ELEMNT_BAK1,
        ELEMNT_BAK2,
        ELEMNT_BAK3,
        ELEMNT_BAK4,
        ELEMNT_BAK5,
        ELEMNT_BAK6,
        ELEMNT_BAK7,
        ELEMNT_BAK8,
        ELEMNT_BAK9,
        ELEMNT_BAK10,
        MATERIAL_CODE)
 VALUES( 
        '#REC_CREATOR#',
        '#REC_CREATE_TIME#',
        '#REC_REVISOR#',
        '#REC_REVISE_TIME#',
        '#ARCHIVE_FLAG#',
        '#DU_FLAG#',
        '#DU_MAKER#',
        '#DU_TIME#',
        '#VERSION#',
        '#MATERIAL_NAME#',
        '#ELEMNT_C#',
        '#ELEMNT_MN#',
        '#ELEMNT_SI#',
        '#ELEMNT_P#',
        '#ELEMNT_S#',
        '#ELEMNT_CR#',
        '#ELEMNT_NI#',
        '#ELEMNT_MO#',
        '#ELEMNT_V#',
        '#ELEMNT_NB#',
        '#ELEMNT_A1#',
        '#ELEMNT_TI#',
        '#ELEMNT_B#',
        '#ELEMNT_N#',
        '#ELEMNT_CA#',
        '#ELEMNT_CU#',
        '#ELEMNT_W#',
        '#ELEMNT_CO#',
        '#ELEMNT_ALS#',
        '#ELEMNT_AS#',
        '#ELEMNT_PB#',
        '#ELEMNT_SB#',
        '#ELEMNT_SN#',
        '#ELEMNT_BI#',
        '#ELEMNT_MG#',
        '#ELEMNT_ZR#',
        '#ELEMNT_LA#',
        '#ELEMNT_CE#',
        '#ELEMNT_SE#',
        '#ELEMNT_CD#',
        '#ELEMNT_BS#',
        '#ELEMNT_ALN#',
        '#ELEMNT_BN#',
        '#ELEMNT_FE#',
        '#ELEMNT_BAK1#',
        '#ELEMNT_BAK2#',
        '#ELEMNT_BAK3#',
        '#ELEMNT_BAK4#',
        '#ELEMNT_BAK5#',
        '#ELEMNT_BAK6#',
        '#ELEMNT_BAK7#',
        '#ELEMNT_BAK8#',
        '#ELEMNT_BAK9#',
        '#ELEMNT_BAK10#',
        '#MATERIAL_CODE#')
        ]]>
    </query>
    <query id="Tqnqc01DAL.Update" desc="修改">
        <![CDATA[
 UPDATE TQNQC01 T
   SET 
        T.REC_CREATOR = '#REC_CREATOR#',
        T.REC_CREATE_TIME = '#REC_CREATE_TIME#',
        T.REC_REVISOR = '#REC_REVISOR#',
        T.REC_REVISE_TIME = '#REC_REVISE_TIME#',
        T.ARCHIVE_FLAG = '#ARCHIVE_FLAG#',
        T.DU_FLAG = '#DU_FLAG#',
        T.DU_MAKER = '#DU_MAKER#',
        T.DU_TIME = '#DU_TIME#',
        T.VERSION = '#VERSION#',
        T.MATERIAL_NAME = '#MATERIAL_NAME#',
        T.ELEMNT_C = '#ELEMNT_C#',
        T.ELEMNT_MN = '#ELEMNT_MN#',
        T.ELEMNT_SI = '#ELEMNT_SI#',
        T.ELEMNT_P = '#ELEMNT_P#',
        T.ELEMNT_S = '#ELEMNT_S#',
        T.ELEMNT_CR = '#ELEMNT_CR#',
        T.ELEMNT_NI = '#ELEMNT_NI#',
        T.ELEMNT_MO = '#ELEMNT_MO#',
        T.ELEMNT_V = '#ELEMNT_V#',
        T.ELEMNT_NB = '#ELEMNT_NB#',
        T.ELEMNT_A1 = '#ELEMNT_A1#',
        T.ELEMNT_TI = '#ELEMNT_TI#',
        T.ELEMNT_B = '#ELEMNT_B#',
        T.ELEMNT_N = '#ELEMNT_N#',
        T.ELEMNT_CA = '#ELEMNT_CA#',
        T.ELEMNT_CU = '#ELEMNT_CU#',
        T.ELEMNT_W = '#ELEMNT_W#',
        T.ELEMNT_CO = '#ELEMNT_CO#',
        T.ELEMNT_ALS = '#ELEMNT_ALS#',
        T.ELEMNT_AS = '#ELEMNT_AS#',
        T.ELEMNT_PB = '#ELEMNT_PB#',
        T.ELEMNT_SB = '#ELEMNT_SB#',
        T.ELEMNT_SN = '#ELEMNT_SN#',
        T.ELEMNT_BI = '#ELEMNT_BI#',
        T.ELEMNT_MG = '#ELEMNT_MG#',
        T.ELEMNT_ZR = '#ELEMNT_ZR#',
        T.ELEMNT_LA = '#ELEMNT_LA#',
        T.ELEMNT_CE = '#ELEMNT_CE#',
        T.ELEMNT_SE = '#ELEMNT_SE#',
        T.ELEMNT_CD = '#ELEMNT_CD#',
        T.ELEMNT_BS = '#ELEMNT_BS#',
        T.ELEMNT_ALN = '#ELEMNT_ALN#',
        T.ELEMNT_BN = '#ELEMNT_BN#',
        T.ELEMNT_FE = '#ELEMNT_FE#',
        T.ELEMNT_BAK1 = '#ELEMNT_BAK1#',
        T.ELEMNT_BAK2 = '#ELEMNT_BAK2#',
        T.ELEMNT_BAK3 = '#ELEMNT_BAK3#',
        T.ELEMNT_BAK4 = '#ELEMNT_BAK4#',
        T.ELEMNT_BAK5 = '#ELEMNT_BAK5#',
        T.ELEMNT_BAK6 = '#ELEMNT_BAK6#',
        T.ELEMNT_BAK7 = '#ELEMNT_BAK7#',
        T.ELEMNT_BAK8 = '#ELEMNT_BAK8#',
        T.ELEMNT_BAK9 = '#ELEMNT_BAK9#',
        T.ELEMNT_BAK10 = '#ELEMNT_BAK10#',
        T.MATERIAL_CODE = '#MATERIAL_CODE#'
 WHERE
       T.MATERIAL_NAME = '#MATERIAL_NAME#'
       AND T.MATERIAL_CODE = '#MATERIAL_CODE#'
        ]]>
    </query>
    <query id="Tqnqc01DAL.GetMaxPk" desc="获取最大主键">
        <![CDATA[
SELECT NVL(MAX(MATERIAL_NAME), 0) + 1 MAX_VALUE FROM TQNQC01 T
        ]]>
    </query>
    <query id="Tqnqc01DAL.Delete" desc="作废">
        <![CDATA[
UPDATE TQNQC01 T
   SET
       T.VALIDFLAG = '0',
       T.DELETE_NAME = '#DELETE_NAME#',
       T.DELETE_TIME = SYSDATE
WHERE
       T.MATERIAL_NAME = '#MATERIAL_NAME#'
       AND T.MATERIAL_CODE = '#MATERIAL_CODE#'
        ]]>
    </query>
    <query id="Tqnqc01DAL.Resume" desc="恢复">
        <![CDATA[
UPDATE TQNQC01 T
   SET
       T.VALIDFLAG = '1',
       T.DELETE_NAME = NULL,
       T.DELETE_TIME = NULL,
       T.UPDATE_NAME = '#UPDATE_NAME#',
       T.UPDATE_TIME = SYSDATE
WHERE
       T.MATERIAL_NAME = '#MATERIAL_NAME#'
       AND T.MATERIAL_CODE = '#MATERIAL_CODE#'
        ]]>
    </query>
</queryMap>