<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="V_JHY_PUGUANYINGDU （生成工具：代码生成工具1.0.0.0   访问地址：http://172.16.2.128/tool/）">
    <query id="VJhyPuguanyingduDAL.Query" desc="查询">
        <![CDATA[
 SELECT 
       TO_CHAR(T.CHECK_TIME, 'YYYY-MM-DD HH24:MI:SS') CHECK_TIME,
       T.CHECK_NO,
       T.BATCH_NO,
       T.SAMPLE_NO,
       T.HEAT_NO,
       T.STEEL_GRADE,
       T.STEEL_NO,
       T.DIMATER,
       T.HEIGHT,
       T.CIC,
       T.DEVICE_NAME,
       T.CHECK_CLASS,
       T.ITEM_NAME_W,
       T.CHECK_STD,
       T.YDLX,
       T.YDLX1,
       T.STDMAX,
       T.VALUE1,
       T.VALUE5,
       T.VALUE6,
       T.T1VALUE1,
       T.AVERAGE_VALUE,
       T.CHECK_NAME,
       T.REMARK
 FROM V_JHY_PUGUANYINGDU 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 nvl(T.DIMATER,0) >= #DIMATER1#
         and nvl(T.DIMATER,0) <= #DIMATER2#
         and nvl(T.HEIGHT,0) >= #HEIGHT1#
         and nvl(T.HEIGHT,0) <= #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="JhyPuguanyingduDAL.Query" desc="查询">
        <![CDATA[
 SELECT 
       TO_CHAR(T.CHECK_TIME, 'YYYY-MM-DD HH24:MI:SS') CHECK_TIME,
       T.CHECK_NO,
       T.BATCH_NO,
       T.SAMPLE_NO,
       T.HEAT_NO,
       T.STEEL_GRADE,
       T.STEEL_NO,
       T.DIMATER,
       T.HEIGHT,
       T.CIC,
       T.CRAFT_SOURCE,
       T.DEVICE_NAME,
       T.CHECK_CLASS,
       T.ITEM_NAME_W,
       T.CHECK_STD,
       T.YDLX,
       T.YDLX1,
       T.STDMAX,
       T.VALUE1,
       T.VALUE5,
       T.VALUE6,
       T.T1VALUE1,
       T.AVERAGE_VALUE,
       T.CHECK_NAME,
       T.REMARK,
       t.consign_dept
 FROM V_JHY_PUGUANYINGDU 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 nvl(T.DIMATER,0) >= #DIMATER1#
         and nvl(T.DIMATER,0) <= #DIMATER2#
         and nvl(T.HEIGHT,0) >= #HEIGHT1#
         and nvl(T.HEIGHT,0) <= #HEIGHT2#
        and UPPER(T.CIC) LIKE '%'|| UPPER('#CIC#') || '%'
        -- and T.HEAT_NO LIKE '%'|| '#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="VJhyPuguanyingduDAL.QueryByPk" desc="通过主键查询">
        <![CDATA[
 SELECT 
       TO_CHAR(T.CHECK_TIME, 'YYYY-MM-DD HH24:MI:SS') CHECK_TIME,
       T.CHECK_NO,
       T.BATCH_NO,
       T.SAMPLE_NO,
       T.HEAT_NO,
       T.STEEL_GRADE,
       T.STEEL_NO,
       T.DIMATER,
       T.HEIGHT,
       T.CIC,
       T.DEVICE_NAME,
       T.CHECK_CLASS,
       T.ITEM_NAME_W,
       T.CHECK_STD,
       T.YDLX,
       T.YDLX1,
       T.STDMAX,
       T.VALUE1,
       T.VALUE5,
       T.VALUE6,
       T.T1VALUE1,
       T.AVERAGE_VALUE,
       T.CHECK_NAME,
       T.REMARK
 FROM V_JHY_PUGUANYINGDU T
 WHERE
      1<>1
        ]]>
    </query>
    <query id="VJhyPuguanyingduDAL.Insert" desc="新增">
        <![CDATA[
 INSERT INTO V_JHY_PUGUANYINGDU(
        CHECK_TIME,
        CHECK_NO,
        BATCH_NO,
        SAMPLE_NO,
        HEAT_NO,
        STEEL_GRADE,
        STEEL_NO,
        DIMATER,
        HEIGHT,
        CIC,
        DEVICE_NAME,
        CHECK_CLASS,
        ITEM_NAME_W,
        CHECK_STD,
        YDLX,
        YDLX1,
        STDMAX,
        VALUE1,
        VALUE5,
        VALUE6,
        T1VALUE1,
        AVERAGE_VALUE,
        CHECK_NAME,
        REMARK)
 VALUES( 
        SYSDATE,
        '#CHECK_NO#',
        '#BATCH_NO#',
        '#SAMPLE_NO#',
        '#HEAT_NO#',
        '#STEEL_GRADE#',
        '#STEEL_NO#',
        '#DIMATER#',
        '#HEIGHT#',
        '#CIC#',
        '#DEVICE_NAME#',
        '#CHECK_CLASS#',
        '#ITEM_NAME_W#',
        '#CHECK_STD#',
        '#YDLX#',
        '#YDLX1#',
        '#STDMAX#',
        '#VALUE1#',
        '#VALUE5#',
        '#VALUE6#',
        '#T1VALUE1#',
        '#AVERAGE_VALUE#',
        '#CHECK_NAME#',
        '#REMARK#')
        ]]>
    </query>
    <query id="VJhyPuguanyingduDAL.Update" desc="修改">
        <![CDATA[
 UPDATE V_JHY_PUGUANYINGDU T
   SET 
        T.CHECK_TIME = SYSDATE,
        T.CHECK_NO = '#CHECK_NO#',
        T.BATCH_NO = '#BATCH_NO#',
        T.SAMPLE_NO = '#SAMPLE_NO#',
        T.HEAT_NO = '#HEAT_NO#',
        T.STEEL_GRADE = '#STEEL_GRADE#',
        T.STEEL_NO = '#STEEL_NO#',
        T.DIMATER = '#DIMATER#',
        T.HEIGHT = '#HEIGHT#',
        T.CIC = '#CIC#',
        T.DEVICE_NAME = '#DEVICE_NAME#',
        T.CHECK_CLASS = '#CHECK_CLASS#',
        T.ITEM_NAME_W = '#ITEM_NAME_W#',
        T.CHECK_STD = '#CHECK_STD#',
        T.YDLX = '#YDLX#',
        T.YDLX1 = '#YDLX1#',
        T.STDMAX = '#STDMAX#',
        T.VALUE1 = '#VALUE1#',
        T.VALUE5 = '#VALUE5#',
        T.VALUE6 = '#VALUE6#',
        T.T1VALUE1 = '#T1VALUE1#',
        T.AVERAGE_VALUE = '#AVERAGE_VALUE#',
        T.CHECK_NAME = '#CHECK_NAME#',
        T.REMARK = '#REMARK#'
 WHERE
      1<>1
        ]]>
    </query>
    <query id="VJhyPuguanyingduDAL.GetMaxPk" desc="获取最大主键">
        <![CDATA[
SELECT NVL(MAX(?), 0) + 1 MAX_VALUE FROM V_JHY_PUGUANYINGDU T
        ]]>
    </query>
    <query id="VJhyPuguanyingduDAL.Delete" desc="作废">
        <![CDATA[
UPDATE V_JHY_PUGUANYINGDU T
   SET
       T.VALIDFLAG = '0',
       T.DELETE_NAME = '#DELETE_NAME#',
       T.DELETE_TIME = SYSDATE
WHERE
      1<>1
        ]]>
    </query>
    <query id="VJhyPuguanyingduDAL.Resume" desc="恢复">
        <![CDATA[
UPDATE V_JHY_PUGUANYINGDU 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>
