<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="V_JHY_YKBP （生成工具：代码生成工具1.0.0.0   访问地址：http://172.16.2.128/tool/）">
    <query id="VJhyYkbpDAL.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.WEIGHT,
       T.CONNECTION,
       T.ITEM_NAME_W,
       T.PRESSURE_MEDIUM,
       T.T1VALUE1,
       T.T2VALUE1,
       T.T3VALUE1,
       T.T1VALUE4,
       T.REMARK,
       T.REPORTED_NAME,
       T.APPROVED_NAME,
       T.CHECK_STD,
       T.PHY_NAME_MAX,
       T.TEST_RESULT,t.consign_dept
 FROM V_JHY_YKBP 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 >= NVL('#LUHAO1#','0')
         -- and T.HEAT_NO <= NVL('#LUHAO2#','9999999')
         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="VJhyYkbpDAL.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.WEIGHT,
       T.CONNECTION,
       T.ITEM_NAME_W,
       T.PRESSURE_MEDIUM,
       T.T1VALUE1,
       T.T2VALUE1,
       T.T3VALUE1,
       T.T1VALUE4,
       T.REMARK,
       T.REPORTED_NAME,
       T.APPROVED_NAME,
       T.CHECK_STD,
       T.PHY_NAME_MAX,
       T.TEST_RESULT
 FROM V_JHY_YKBP T
 WHERE
      1<>1
        ]]>
    </query>
    <query id="VJhyYkbpDAL.Insert" desc="新增">
        <![CDATA[
 INSERT INTO V_JHY_YKBP(
        CHECK_TIME,
        CHECK_NO,
        BATCH_NO,
        SAMPLE_NO,
        HEAT_NO,
        STEEL_GRADE,
        STEEL_NO,
        DIMATER,
        HEIGHT,
        CIC,
        WEIGHT,
        CONNECTION,
        ITEM_NAME_W,
        PRESSURE_MEDIUM,
        T1VALUE1,
        T2VALUE1,
        T3VALUE1,
        T1VALUE4,
        REMARK,
        REPORTED_NAME,
        APPROVED_NAME,
        CHECK_STD,
        PHY_NAME_MAX,
        TEST_RESULT)
 VALUES( 
        SYSDATE,
        '#CHECK_NO#',
        '#BATCH_NO#',
        '#SAMPLE_NO#',
        '#HEAT_NO#',
        '#STEEL_GRADE#',
        '#STEEL_NO#',
        '#DIMATER#',
        '#HEIGHT#',
        '#CIC#',
        '#WEIGHT#',
        '#CONNECTION#',
        '#ITEM_NAME_W#',
        '#PRESSURE_MEDIUM#',
        '#T1VALUE1#',
        '#T2VALUE1#',
        '#T3VALUE1#',
        '#T1VALUE4#',
        '#REMARK#',
        '#REPORTED_NAME#',
        '#APPROVED_NAME#',
        '#CHECK_STD#',
        '#PHY_NAME_MAX#',
        '#TEST_RESULT#')
        ]]>
    </query>
    <query id="VJhyYkbpDAL.Update" desc="修改">
        <![CDATA[
 UPDATE V_JHY_YKBP 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.WEIGHT = '#WEIGHT#',
        T.CONNECTION = '#CONNECTION#',
        T.ITEM_NAME_W = '#ITEM_NAME_W#',
        T.PRESSURE_MEDIUM = '#PRESSURE_MEDIUM#',
        T.T1VALUE1 = '#T1VALUE1#',
        T.T2VALUE1 = '#T2VALUE1#',
        T.T3VALUE1 = '#T3VALUE1#',
        T.T1VALUE4 = '#T1VALUE4#',
        T.REMARK = '#REMARK#',
        T.REPORTED_NAME = '#REPORTED_NAME#',
        T.APPROVED_NAME = '#APPROVED_NAME#',
        T.CHECK_STD = '#CHECK_STD#',
        T.PHY_NAME_MAX = '#PHY_NAME_MAX#',
        T.TEST_RESULT = '#TEST_RESULT#'
 WHERE
      1<>1
        ]]>
    </query>
    <query id="VJhyYkbpDAL.GetMaxPk" desc="获取最大主键">
        <![CDATA[
SELECT NVL(MAX(?), 0) + 1 MAX_VALUE FROM V_JHY_YKBP T
        ]]>
    </query>
    <query id="VJhyYkbpDAL.Delete" desc="作废">
        <![CDATA[
UPDATE V_JHY_YKBP T
   SET
       T.VALIDFLAG = '0',
       T.DELETE_NAME = '#DELETE_NAME#',
       T.DELETE_TIME = SYSDATE
WHERE
      1<>1
        ]]>
    </query>
    <query id="VJhyYkbpDAL.Resume" desc="恢复">
        <![CDATA[
UPDATE V_JHY_YKBP 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>