<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="V_JHY_HUAXUEFENXI （生成工具：代码生成工具1.0.0.0   访问地址：http://172.16.2.128/tool/）">
    <query id="VJhyHuaxuefenxiDAL.Query" desc="查询">
        <![CDATA[
 SELECT 
  TO_CHAR(T.CHECK_TIME, 'YYYY-MM-DD HH24:MI:SS') CHECK_TIME,
       T.CHECK_NO,
       T.SAMPLE_NO,
       T.STOVE_NO,
       T.HEAT_NO,
       T.STEEL_NO,
       T.STEEL_GRADE,
       T.DIMATER,
       T.HEIGHT,
       T.CIC,
       T.C,
       T.SI,
       T.MN,
       T.P,
       T.S,
       T.NI,
       T.CR,
       T.MO,
       T.CU,
       T.AL,
       T.V,
       T.NB,
       T.TI,
       T.B,
       T.PB,
       T.SN,
       T.AS1,
       T.SB,
       T.BI,
       T.O,
       T.N,
       T.H,
       T.CA,
       T.W,
       T.ZR,
       T.ZN,
       T.ALT
 FROM V_JHY_HUAXUEFENXI T
 where  UPPER(T.CHECK_NO) LIKE '%'|| UPPER('#CHECK_NO#') || '%'
       and UPPER(T.STEEL_NO) LIKE '%'|| UPPER('#STEEL_NO#') || '%'
       and UPPER(T.STEEL_GRADE) LIKE '%'|| UPPER('#STEEL_GRADE#') || '%'
       and T.DIMATER >= '#DIMATER1#'
         and T.DIMATER <= '#DIMATER2#'
         and T.HEIGHT >= '#HEIGHT1#'
         and T.HEIGHT <= '#HEIGHT2#'
        and UPPER(T.CIC) LIKE '%'|| UPPER('#CIC#') || '%'
         and T.HEAT_NO >= '#LUHAO1#'
         and T.HEAT_NO <= '#LUHAO2#'
         and   T.CHECK_TIME BETWEEN TO_DATE('#DATE_BEGIN#','YYYY-MM-DD HH24:MI:SS') AND TO_DATE('#DATE_END#','YYYY-MM-DD HH24:MI:SS') 
          
      
      
        ]]>
    </query>
    
     <query id="JhyHuaxuefenxiDAL.Query" desc="查询">
        <![CDATA[
 SELECT TO_CHAR(T.CHECK_TIME, 'YYYY-MM-DD HH24:MI:SS') CHECK_TIME,
       T.CHECK_NO,
       T.SAMPLE_NO,
       T.STOVE_NO,
       T.HEAT_NO,
       T.STEEL_NO,
       T.STEEL_GRADE,
       T.DIMATER,
       T.HEIGHT,
       T.CIC,
       T.CRAFT_SOURCE,
       T.CONSIGN_DEPT,
       T.C,
       T.SI,
       T.MN,
       T.P,
       T.S,
       T.NI,
       T.CR,
       T.MO,
       T.CU,
       T.AL,
       T.V,
       T.NB,
       T.TI,
       T.B,
       T.PB,
       T.SN,
       T.AS1,
       T.SB,
       T.BI,
       T.O,
       T.N,
       T.H,
       T.CA,
       T.W,
       T.ZR,
       T.ZN,
       T.ALT,
       round(abs(t.c) + abs(t.mn / 6) +
             (abs(t.cr) + abs(t.mo) + abs(t.v)) / 5 +
             (abs(t.cu) + abs(t.ni)) / 15,
             2) CEⅡw,
       round(abs(t.c) + abs(t.si / 30) + abs(t.mn / 20) + abs(t.cu / 20) +
             abs(t.ni / 60) + abs(t.cr / 20) + abs(t.mo / 15) +
             abs(t.v / 10) + abs(CASE
                                   WHEN t.b < 0 THEN
                                    '0'
                                   ELSE
                                    t.b
                                 END * 5),
             2) CEpcm
  FROM V_JHY_HUAXUEFENXI T
 where UPPER(T.CHECK_NO) LIKE '%' || UPPER('#CHECK_NO#') || '%'
   and UPPER(T.STEEL_NO) LIKE '%' || UPPER('#STEEL_NO#') || '%'
   and UPPER(T.STEEL_GRADE) LIKE '%' || UPPER('#STEEL_GRADE#') || '%'
   and T.DIMATER >= '#DIMATER1#'
   and T.DIMATER <= '#DIMATER2#'
   and T.HEIGHT >= '#HEIGHT1#'
   and T.HEIGHT <= '#HEIGHT2#'
   and UPPER(T.CIC) LIKE '%' || UPPER('#CIC#') || '%'
      --and T.HEAT_NO LIKE '%'|| '#LUHAO1#' || '%'
   and T.CHECK_TIME BETWEEN
       TO_DATE('#DATE_BEGIN#', 'YYYY-MM-DD HH24:MI:SS') AND
       TO_DATE('#DATE_END#', 'YYYY-MM-DD HH24:MI:SS')
        ]]>
    </query>
    <query id="VJhyHuaxuefenxiDAL.QueryByPk" desc="通过主键查询">
        <![CDATA[
 SELECT 
       T.CHECK_NO,
       T.SAMPLE_NO,
       T.STOVE_NO,
       T.HEAT_NO,
       T.STEEL_NO,
       T.STEEL_GRADE,
       T.DIMATER,
       T.HEIGHT,
       T.CIC,
       T.C,
       T.SI,
       T.MN,
       T.P,
       T.S,
       T.NI,
       T.CR,
       T.MO,
       T.CU,
       T.AL,
       T.V,
       T.NB,
       T.TI,
       T.B,
       T.PB,
       T.SN,
       T.AS1,
       T.SB,
       T.BI,
       T.O,
       T.N,
       T.H,
       T.CA,
       T.W,
       T.ZR,
       T.ZN,
       T.ALT
 FROM V_JHY_HUAXUEFENXI T
 WHERE
      1<>1
        ]]>
    </query>
    <query id="VJhyHuaxuefenxiDAL.Insert" desc="新增">
        <![CDATA[
 INSERT INTO V_JHY_HUAXUEFENXI(
        CHECK_NO,
        SAMPLE_NO,
        STOVE_NO,
        HEAT_NO,
        STEEL_NO,
        STEEL_GRADE,
        DIMATER,
        HEIGHT,
        CIC,
        C,
        SI,
        MN,
        P,
        S,
        NI,
        CR,
        MO,
        CU,
        AL,
        V,
        NB,
        TI,
        B,
        PB,
        SN,
        AS1,
        SB,
        BI,
        O,
        N,
        H,
        CA,
        W,
        ZR,
        ZN,
        ALT)
 VALUES( 
        '#CHECK_NO#',
        '#SAMPLE_NO#',
        '#STOVE_NO#',
        '#HEAT_NO#',
        '#STEEL_NO#',
        '#STEEL_GRADE#',
        '#DIMATER#',
        '#HEIGHT#',
        '#CIC#',
        '#C#',
        '#SI#',
        '#MN#',
        '#P#',
        '#S#',
        '#NI#',
        '#CR#',
        '#MO#',
        '#CU#',
        '#AL#',
        '#V#',
        '#NB#',
        '#TI#',
        '#B#',
        '#PB#',
        '#SN#',
        '#AS1#',
        '#SB#',
        '#BI#',
        '#O#',
        '#N#',
        '#H#',
        '#CA#',
        '#W#',
        '#ZR#',
        '#ZN#',
        '#ALT#')
        ]]>
    </query>
    <query id="VJhyHuaxuefenxiDAL.Update" desc="修改">
        <![CDATA[
 UPDATE V_JHY_HUAXUEFENXI T
   SET 
        T.CHECK_NO = '#CHECK_NO#',
        T.SAMPLE_NO = '#SAMPLE_NO#',
        T.STOVE_NO = '#STOVE_NO#',
        T.HEAT_NO = '#HEAT_NO#',
        T.STEEL_NO = '#STEEL_NO#',
        T.STEEL_GRADE = '#STEEL_GRADE#',
        T.DIMATER = '#DIMATER#',
        T.HEIGHT = '#HEIGHT#',
        T.CIC = '#CIC#',
        T.C = '#C#',
        T.SI = '#SI#',
        T.MN = '#MN#',
        T.P = '#P#',
        T.S = '#S#',
        T.NI = '#NI#',
        T.CR = '#CR#',
        T.MO = '#MO#',
        T.CU = '#CU#',
        T.AL = '#AL#',
        T.V = '#V#',
        T.NB = '#NB#',
        T.TI = '#TI#',
        T.B = '#B#',
        T.PB = '#PB#',
        T.SN = '#SN#',
        T.AS1 = '#AS1#',
        T.SB = '#SB#',
        T.BI = '#BI#',
        T.O = '#O#',
        T.N = '#N#',
        T.H = '#H#',
        T.CA = '#CA#',
        T.W = '#W#',
        T.ZR = '#ZR#',
        T.ZN = '#ZN#',
        T.ALT = '#ALT#'
 WHERE
      1<>1
        ]]>
    </query>
    <query id="VJhyHuaxuefenxiDAL.GetMaxPk" desc="获取最大主键">
        <![CDATA[
SELECT NVL(MAX(?), 0) + 1 MAX_VALUE FROM V_JHY_HUAXUEFENXI T
        ]]>
    </query>
    <query id="VJhyHuaxuefenxiDAL.Delete" desc="作废">
        <![CDATA[
UPDATE V_JHY_HUAXUEFENXI T
   SET
       T.VALIDFLAG = '0',
       T.DELETE_NAME = '#DELETE_NAME#',
       T.DELETE_TIME = SYSDATE
WHERE
      1<>1
        ]]>
    </query>
    <query id="VJhyHuaxuefenxiDAL.Resume" desc="恢复">
        <![CDATA[
UPDATE V_JHY_HUAXUEFENXI T
   SET
       T.VALIDFLAG = '1',
       T.DELETE_NAME = NULL,
       T.DELETE_TIME = NULL,
       T.UPDATE_NAME = '#UPDATE_NAME#',
       T.UPDATE_TIME = SYSDATE
WHERE
      1<>1
        ]]>
    </query>
</queryMap>