<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="V_JHY_LASHEN （生成工具：代码生成工具1.0.0.0   访问地址：http://172.16.2.128/tool/）">
    <query id="VJhyLashenDAL.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.TEST_TIME,
       T.STEEL_GRADE,
       T.STEEL_NO,
       T.DIMATER,
       T.HEIGHT,
       T.CIC,
       T.T1VALUE1,
       T.T2VALUE1,
       T.T3VALUE1,
       T.T4VALUE1,
       T.T5VALUE1,
       T.T6VALUE1,
       T.SIZE_DESC,
       T.PHY_DIR,
       T.T7VALUE1,
       T.T8VALUE1,
       T.T9VALUE1,
       T.T10VALUE1,
       T.REMARK,
       T.PRODUCT_STD,
       T.ITEM_NAME_W,
       T.CHECK_STD,
       T.DEVICE_NAME,
       T.CHECK_CLASS,
       T.CHECK_NAME,
       T.SAMPLE_LEN,
       T.WIDTH,
       T.T11VALUE1
 FROM V_JHY_LASHEN 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="JhyLashenDAL.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.TEST_TIME,
       T.STEEL_GRADE,
       T.STEEL_NO,
       T.DIMATER,
       T.HEIGHT,
       T.CIC,
       T.CRAFT_SOURCE,
       T.T1VALUE1,
       T.T2VALUE1,
       T.T3VALUE1,
       T.T4VALUE1,
       T.T5VALUE1,
       T.T6VALUE1,
       T.SIZE_DESC,
       T.PHY_DIR,
       T.T7VALUE1,
       T.T8VALUE1,
       T.T9VALUE1,
       T.T10VALUE1,
       T.REMARK,
       T.PRODUCT_STD,
       T.ITEM_NAME_W,
       T.CHECK_STD,
       T.DEVICE_NAME,
       T.CHECK_CLASS,
       T.CHECK_NAME,
       T.SAMPLE_LEN,
       T.WIDTH,
       T.T11VALUE1,
       CASE T.T8VALUE1
        WHEN '0' THEN
        0 ELSE round( T.T6VALUE1 / T.T8VALUE1, 2 )
END T12VALUE1
 FROM V_JHY_LASHEN 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.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="VJhyLashenDAL.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.TEST_TIME,
       T.STEEL_GRADE,
       T.STEEL_NO,
       T.DIMATER,
       T.HEIGHT,
       T.CIC,
       T.T1VALUE1,
       T.T2VALUE1,
       T.T3VALUE1,
       T.T4VALUE1,
       T.T5VALUE1,
       T.T6VALUE1,
       T.SIZE_DESC,
       T.PHY_DIR,
       T.T7VALUE1,
       T.T8VALUE1,
       T.T9VALUE1,
       T.T10VALUE1,
       T.REMARK,
       T.PRODUCT_STD,
       T.ITEM_NAME_W,
       T.CHECK_STD,
       T.DEVICE_NAME,
       T.CHECK_CLASS,
       T.CHECK_NAME,
       T.SAMPLE_LEN,
       T.WIDTH,
       T.T11VALUE1
 FROM V_JHY_LASHEN T
 WHERE
      1<>1
        ]]>
    </query>
    <query id="VJhyLashenDAL.Insert" desc="新增">
        <![CDATA[
 INSERT INTO V_JHY_LASHEN(
        CHECK_TIME,
        CHECK_NO,
        BATCH_NO,
        SAMPLE_NO,
        HEAT_NO,
        TEST_TIME,
        STEEL_GRADE,
        STEEL_NO,
        DIMATER,
        HEIGHT,
        CIC,
        T1VALUE1,
        T2VALUE1,
        T3VALUE1,
        T4VALUE1,
        T5VALUE1,
        T6VALUE1,
        SIZE_DESC,
        PHY_DIR,
        T7VALUE1,
        T8VALUE1,
        T9VALUE1,
        T10VALUE1,
        REMARK,
        PRODUCT_STD,
        ITEM_NAME_W,
        CHECK_STD,
        DEVICE_NAME,
        CHECK_CLASS,
        CHECK_NAME,
        SAMPLE_LEN,
        WIDTH,
        T11VALUE1)
 VALUES( 
        SYSDATE,
        '#CHECK_NO#',
        '#BATCH_NO#',
        '#SAMPLE_NO#',
        '#HEAT_NO#',
        '#TEST_TIME#',
        '#STEEL_GRADE#',
        '#STEEL_NO#',
        '#DIMATER#',
        '#HEIGHT#',
        '#CIC#',
        '#T1VALUE1#',
        '#T2VALUE1#',
        '#T3VALUE1#',
        '#T4VALUE1#',
        '#T5VALUE1#',
        '#T6VALUE1#',
        '#SIZE_DESC#',
        '#PHY_DIR#',
        '#T7VALUE1#',
        '#T8VALUE1#',
        '#T9VALUE1#',
        '#T10VALUE1#',
        '#REMARK#',
        '#PRODUCT_STD#',
        '#ITEM_NAME_W#',
        '#CHECK_STD#',
        '#DEVICE_NAME#',
        '#CHECK_CLASS#',
        '#CHECK_NAME#',
        '#SAMPLE_LEN#',
        '#WIDTH#',
        '#T11VALUE1#')
        ]]>
    </query>
    <query id="VJhyLashenDAL.Update" desc="修改">
        <![CDATA[
 UPDATE V_JHY_LASHEN 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.TEST_TIME = '#TEST_TIME#',
        T.STEEL_GRADE = '#STEEL_GRADE#',
        T.STEEL_NO = '#STEEL_NO#',
        T.DIMATER = '#DIMATER#',
        T.HEIGHT = '#HEIGHT#',
        T.CIC = '#CIC#',
        T.T1VALUE1 = '#T1VALUE1#',
        T.T2VALUE1 = '#T2VALUE1#',
        T.T3VALUE1 = '#T3VALUE1#',
        T.T4VALUE1 = '#T4VALUE1#',
        T.T5VALUE1 = '#T5VALUE1#',
        T.T6VALUE1 = '#T6VALUE1#',
        T.SIZE_DESC = '#SIZE_DESC#',
        T.PHY_DIR = '#PHY_DIR#',
        T.T7VALUE1 = '#T7VALUE1#',
        T.T8VALUE1 = '#T8VALUE1#',
        T.T9VALUE1 = '#T9VALUE1#',
        T.T10VALUE1 = '#T10VALUE1#',
        T.REMARK = '#REMARK#',
        T.PRODUCT_STD = '#PRODUCT_STD#',
        T.ITEM_NAME_W = '#ITEM_NAME_W#',
        T.CHECK_STD = '#CHECK_STD#',
        T.DEVICE_NAME = '#DEVICE_NAME#',
        T.CHECK_CLASS = '#CHECK_CLASS#',
        T.CHECK_NAME = '#CHECK_NAME#',
        T.SAMPLE_LEN = '#SAMPLE_LEN#',
        T.WIDTH = '#WIDTH#',
        T.T11VALUE1 = '#T11VALUE1#'
 WHERE
      1<>1
        ]]>
    </query>
    <query id="VJhyLashenDAL.GetMaxPk" desc="获取最大主键">
        <![CDATA[
SELECT NVL(MAX(?), 0) + 1 MAX_VALUE FROM V_JHY_LASHEN T
        ]]>
    </query>
    <query id="VJhyLashenDAL.Delete" desc="作废">
        <![CDATA[
UPDATE V_JHY_LASHEN T
   SET
       T.VALIDFLAG = '0',
       T.DELETE_NAME = '#DELETE_NAME#',
       T.DELETE_TIME = SYSDATE
WHERE
      1<>1
        ]]>
    </query>
    <query id="VJhyLashenDAL.Resume" desc="恢复">
        <![CDATA[
UPDATE V_JHY_LASHEN 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>