<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="V_JHY_SSCA （生成工具：代码生成工具1.0.0.0   访问地址：http://172.16.2.128/tool/）">
    <query id="VJhySscaDAL.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.YSMIN1,
       T.YSMIN2,
       T.YSMIN3,
       T.YSMIN_NAME,
       T.ACTUAL_S_YSMIN1,
       T.ACTUAL_S_YSMIN2,
       T.ACTUAL_S_YSMIN3,
       T.SAMPLE_NO1,
       T.SAMPLE_NO2,
       T.SAMPLE_NO3,
       T.SAMPLE_COUNT,
       T.TEST_TIME,
       T.NACE_PH_NAME,
       T.NACE_PH_S1,
       T.NACE_PH_F1,
       T.VALUE1,
       T.VALUE2,
       T.VALUE3,
       T.ITEM_NAME_W,
       T.SURFACE_AREA1,
       T.SURFACE_AREA2,
       T.SURFACE_AREA3,
       T.REPORTED_NAME,
       TO_CHAR(T.TEST_DATE, 'YYYY-MM-DD HH24:MI:SS') TEST_DATE,
       TO_CHAR(T.REPORTED_DATE, 'YYYY-MM-DD HH24:MI:SS') REPORTED_DATE,
       T.APPROVED_NAME,
       T.CHECK_STD,
       T.CHECK_NAME,t.consign_dept
 FROM V_JHY_SSCA 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="VJhySscaDAL.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.YSMIN1,
       T.YSMIN2,
       T.YSMIN3,
       T.YSMIN_NAME,
       T.ACTUAL_S_YSMIN1,
       T.ACTUAL_S_YSMIN2,
       T.ACTUAL_S_YSMIN3,
       T.SAMPLE_NO1,
       T.SAMPLE_NO2,
       T.SAMPLE_NO3,
       T.SAMPLE_COUNT,
       T.TEST_TIME,
       T.NACE_PH_NAME,
       T.NACE_PH_S1,
       T.NACE_PH_F1,
       T.VALUE1,
       T.VALUE2,
       T.VALUE3,
       T.ITEM_NAME_W,
       T.SURFACE_AREA1,
       T.SURFACE_AREA2,
       T.SURFACE_AREA3,
       T.REPORTED_NAME,
       TO_CHAR(T.TEST_DATE, 'YYYY-MM-DD HH24:MI:SS') TEST_DATE,
       TO_CHAR(T.REPORTED_DATE, 'YYYY-MM-DD HH24:MI:SS') REPORTED_DATE,
       T.APPROVED_NAME,
       T.CHECK_STD,
       T.CHECK_NAME
 FROM V_JHY_SSCA T
 WHERE
      1<>1
        ]]>
    </query>
    <query id="VJhySscaDAL.Insert" desc="新增">
        <![CDATA[
 INSERT INTO V_JHY_SSCA(
        CHECK_TIME,
        CHECK_NO,
        BATCH_NO,
        SAMPLE_NO,
        HEAT_NO,
        STEEL_GRADE,
        STEEL_NO,
        DIMATER,
        HEIGHT,
        CIC,
        YSMIN1,
        YSMIN2,
        YSMIN3,
        YSMIN_NAME,
        ACTUAL_S_YSMIN1,
        ACTUAL_S_YSMIN2,
        ACTUAL_S_YSMIN3,
        SAMPLE_NO1,
        SAMPLE_NO2,
        SAMPLE_NO3,
        SAMPLE_COUNT,
        TEST_TIME,
        NACE_PH_NAME,
        NACE_PH_S1,
        NACE_PH_F1,
        VALUE1,
        VALUE2,
        VALUE3,
        ITEM_NAME_W,
        SURFACE_AREA1,
        SURFACE_AREA2,
        SURFACE_AREA3,
        REPORTED_NAME,
        TEST_DATE,
        REPORTED_DATE,
        APPROVED_NAME,
        CHECK_STD,
        CHECK_NAME)
 VALUES( 
        SYSDATE,
        '#CHECK_NO#',
        '#BATCH_NO#',
        '#SAMPLE_NO#',
        '#HEAT_NO#',
        '#STEEL_GRADE#',
        '#STEEL_NO#',
        '#DIMATER#',
        '#HEIGHT#',
        '#CIC#',
        '#YSMIN1#',
        '#YSMIN2#',
        '#YSMIN3#',
        '#YSMIN_NAME#',
        '#ACTUAL_S_YSMIN1#',
        '#ACTUAL_S_YSMIN2#',
        '#ACTUAL_S_YSMIN3#',
        '#SAMPLE_NO1#',
        '#SAMPLE_NO2#',
        '#SAMPLE_NO3#',
        '#SAMPLE_COUNT#',
        '#TEST_TIME#',
        '#NACE_PH_NAME#',
        '#NACE_PH_S1#',
        '#NACE_PH_F1#',
        '#VALUE1#',
        '#VALUE2#',
        '#VALUE3#',
        '#ITEM_NAME_W#',
        '#SURFACE_AREA1#',
        '#SURFACE_AREA2#',
        '#SURFACE_AREA3#',
        '#REPORTED_NAME#',
        SYSDATE,
        SYSDATE,
        '#APPROVED_NAME#',
        '#CHECK_STD#',
        '#CHECK_NAME#')
        ]]>
    </query>
    <query id="VJhySscaDAL.Update" desc="修改">
        <![CDATA[
 UPDATE V_JHY_SSCA 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.YSMIN1 = '#YSMIN1#',
        T.YSMIN2 = '#YSMIN2#',
        T.YSMIN3 = '#YSMIN3#',
        T.YSMIN_NAME = '#YSMIN_NAME#',
        T.ACTUAL_S_YSMIN1 = '#ACTUAL_S_YSMIN1#',
        T.ACTUAL_S_YSMIN2 = '#ACTUAL_S_YSMIN2#',
        T.ACTUAL_S_YSMIN3 = '#ACTUAL_S_YSMIN3#',
        T.SAMPLE_NO1 = '#SAMPLE_NO1#',
        T.SAMPLE_NO2 = '#SAMPLE_NO2#',
        T.SAMPLE_NO3 = '#SAMPLE_NO3#',
        T.SAMPLE_COUNT = '#SAMPLE_COUNT#',
        T.TEST_TIME = '#TEST_TIME#',
        T.NACE_PH_NAME = '#NACE_PH_NAME#',
        T.NACE_PH_S1 = '#NACE_PH_S1#',
        T.NACE_PH_F1 = '#NACE_PH_F1#',
        T.VALUE1 = '#VALUE1#',
        T.VALUE2 = '#VALUE2#',
        T.VALUE3 = '#VALUE3#',
        T.ITEM_NAME_W = '#ITEM_NAME_W#',
        T.SURFACE_AREA1 = '#SURFACE_AREA1#',
        T.SURFACE_AREA2 = '#SURFACE_AREA2#',
        T.SURFACE_AREA3 = '#SURFACE_AREA3#',
        T.REPORTED_NAME = '#REPORTED_NAME#',
        T.TEST_DATE = SYSDATE,
        T.REPORTED_DATE = SYSDATE,
        T.APPROVED_NAME = '#APPROVED_NAME#',
        T.CHECK_STD = '#CHECK_STD#',
        T.CHECK_NAME = '#CHECK_NAME#'
 WHERE
      1<>1
        ]]>
    </query>
    <query id="VJhySscaDAL.GetMaxPk" desc="获取最大主键">
        <![CDATA[
SELECT NVL(MAX(?), 0) + 1 MAX_VALUE FROM V_JHY_SSCA T
        ]]>
    </query>
    <query id="VJhySscaDAL.Delete" desc="作废">
        <![CDATA[
UPDATE V_JHY_SSCA T
   SET
       T.VALIDFLAG = '0',
       T.DELETE_NAME = '#DELETE_NAME#',
       T.DELETE_TIME = SYSDATE
WHERE
      1<>1
        ]]>
    </query>
    <query id="VJhySscaDAL.Resume" desc="恢复">
        <![CDATA[
UPDATE V_JHY_SSCA 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>