<?xml version="1.0" encoding="UTF-8"?>
<querymap desc="返线操作方法 类">
<query id="BackLine.GetOfflineResult0" desc="获取下线实绩实体类">
SELECT OFFLINE_NUM1,
       OFFLINE_NUM2,
       OFFLINE_NUM3,
       BACKLINE_NUM1,
       BACKLINE_NUM2,
       BACKLINE_NUM3,
       LOT_NO,
       STOVE_NO,
       JUDGE_STOVE_NO,
       DIAMETER,
       THICKNESS,
       LENGTH,
       PLINE_CODE,
       SEQ,
       CASE OFFLINE_PRO
       WHEN 'JZ' THEN '矫直'
       WHEN 'TS' THEN '探伤'
       WHEN 'ZJ' THEN '人工质检'
       END AS OFFLINE_PRO ,
       CASE REAL_TIME_STATUS
       WHEN '0' THEN '未开始返线'
       WHEN '1' THEN '矫直完成'
       WHEN '2' THEN '探伤完成'
       WHEN '3' THEN '质检完成'
       END AS REAL_TIME_STATUS ,
       OFFLINE_NUM,
       BACKLINE_NUM,
       GROUP_NUM,
       FINAL_NUM,
       MAT_LOCATION,
       HANDLE_METHOD,
       CASE ZP_FLAG
       WHEN '0' THEN '未组批'
       WHEN '1' THEN '组批'
       END AS ZP_FLAG ,
       CASE OFF_LEVEL
       WHEN '0' THEN '不常用'
       WHEN '1' THEN '常用'
       END AS OFF_LEVEL ,
       CASE STATUS
       WHEN '0' THEN '下线'
       WHEN '1' THEN '处理完成'
       END AS STATUS ,
       CASE TYPE_FLAG
       WHEN '0' THEN '批量下线'
       WHEN '1' THEN '整炉下线'
       END AS TYPE_FLAG ,
       TO_CHAR(OFFLINE_TIME, 'YYYY-MM-DD HH24:MI:SS') OFFLINE_TIME,
       REMARK,
       COL_USER,
       case COL_GROUP 
       WHEN '1' THEN '甲'
       WHEN '2' THEN '乙'
       WHEN '3' THEN '丙'
       WHEN '4' THEN '丁' end as COL_GROUP,
       case COL_SHIFT
       WHEN '0' THEN '常白班'
       WHEN '1' THEN '早班'
       WHEN '2' THEN '中班'
       WHEN '3' THEN '晚班'
      end as COL_SHIFT
 FROM MIL_OFFLINE_RESLUT
 WHERE
 1=1
 AND OFFLINE_PRO = 'JZ'
 
</query>

<query id="BackLine.GetOfflineResult1" desc="获取下线实绩实体类">
SELECT OFFLINE_NUM1,
       OFFLINE_NUM2,
       OFFLINE_NUM3,
       BACKLINE_NUM1,
       BACKLINE_NUM2,
       BACKLINE_NUM3,
       LOT_NO,
       STOVE_NO,
       JUDGE_STOVE_NO,
       DIAMETER,
       THICKNESS,
       LENGTH,
       PLINE_CODE,
       SEQ,
       CASE OFFLINE_PRO
       WHEN 'JZ' THEN '矫直'
       WHEN 'TS' THEN '探伤'
       WHEN 'ZJ' THEN '人工质检'
       END AS OFFLINE_PRO ,
       CASE REAL_TIME_STATUS
       WHEN '0' THEN '未开始返线'
       WHEN '1' THEN '矫直完成'
       WHEN '2' THEN '探伤完成'
       WHEN '3' THEN '质检完成'
       END AS REAL_TIME_STATUS ,
       OFFLINE_NUM,
       BACKLINE_NUM,
       GROUP_NUM,
       FINAL_NUM,
       MAT_LOCATION,
       HANDLE_METHOD,
       CASE ZP_FLAG
       WHEN '0' THEN '未组批'
       WHEN '1' THEN '组批'
       END AS ZP_FLAG ,
       CASE OFF_LEVEL
       WHEN '0' THEN '不常用'
       WHEN '1' THEN '常用'
       END AS OFF_LEVEL ,
       CASE STATUS
       WHEN '0' THEN '下线'
       WHEN '1' THEN '处理完成'
       END AS STATUS ,
       CASE TYPE_FLAG
       WHEN '0' THEN '批量下线'
       WHEN '1' THEN '整炉下线'
       END AS TYPE_FLAG ,
       TO_CHAR(OFFLINE_TIME, 'YYYY-MM-DD HH24:MI:SS') OFFLINE_TIME,
       REMARK,
       COL_USER,
       case COL_GROUP 
       WHEN '1' THEN '甲'
       WHEN '2' THEN '乙'
       WHEN '3' THEN '丙'
       WHEN '4' THEN '丁' end as COL_GROUP,
       case COL_SHIFT
       WHEN '0' THEN '常白班'
       WHEN '1' THEN '早班'
       WHEN '2' THEN '中班'
       WHEN '3' THEN '晚班'
      end as COL_SHIFT
 FROM MIL_OFFLINE_RESLUT
 WHERE
 1=1
 AND OFFLINE_PRO = 'TS'

</query>

<query id="BackLine.UpdateOfflineResult01" desc="更新矫直下线实绩">
UPDATE MIL_OFFLINE_RESLUT t  SET
　t.BACKLINE_NUM=t.BACKLINE_NUM1+t.BACKLINE_NUM2+t.BACKLINE_NUM3+? ,
  t.BACKLINE_NUM1=t.BACKLINE_NUM1+?,
  t.STATUS=?
WHERE t.judge_stove_no=?
AND t.offline_pro='JZ'
</query>
<query id="BackLine.UpdateOfflineResult02" desc="更新矫直下线实绩">
UPDATE MIL_OFFLINE_RESLUT t  SET
　t.BACKLINE_NUM=t.BACKLINE_NUM1+t.BACKLINE_NUM2+t.BACKLINE_NUM3+? ,
  t.BACKLINE_NUM2=t.BACKLINE_NUM2+?,
  t.STATUS=?
WHERE t.judge_stove_no=?
AND t.offline_pro='JZ'
</query>
<query id="BackLine.UpdateOfflineResult03" desc="更新矫直下线实绩">
UPDATE MIL_OFFLINE_RESLUT t  SET
　t.BACKLINE_NUM=t.BACKLINE_NUM1+t.BACKLINE_NUM2+t.BACKLINE_NUM3+? ,
  t.BACKLINE_NUM3=t.BACKLINE_NUM3+?,
  t.STATUS=?
WHERE t.judge_stove_no=?
AND t.offline_pro='JZ'
</query>
<query id="BackLine.UpdateResult01" desc="更新矫直实绩表返线数据">
UPDATE
		MIL_STRAIGHTENING_RESULT a
		SET  a.NODE_FUR_FLAG='0',
		a.BACKLINE_NUM1= a.BACKLINE_NUM1+?,
		a.BACKLINE_NUM_TOTAL=?+a.BACKLINE_NUM1
		+a.BACKLINE_NUM2+a.BACKLINE_NUM3
		WHERE a.JUDGE_STOVE_NO=?
</query>
<query id="BackLine.UpdateResult02" desc="更新矫直实绩表返线数据">
UPDATE
		MIL_STRAIGHTENING_RESULT a
		SET a.NODE_FUR_FLAG='0',
		a.BACKLINE_NUM2= a.BACKLINE_NUM2+?,
		a.BACKLINE_NUM_TOTAL=?+a.BACKLINE_NUM1
		+a.BACKLINE_NUM2+a.BACKLINE_NUM3
		WHERE a.JUDGE_STOVE_NO=?
</query>
<query id="BackLine.UpdateResult03" desc="更新矫直实绩表返线数据">
		UPDATE MIL_STRAIGHTENING_RESULT a
		SET a.NODE_FUR_FLAG='0',
		a.BACKLINE_NUM3=a.BACKLINE_NUM3+?,
		a.BACKLINE_NUM_TOTAL=?+a.BACKLINE_NUM1
		+a.BACKLINE_NUM2+a.BACKLINE_NUM3
		WHERE a.JUDGE_STOVE_NO=?
</query>

<query id="BackLine.UpdateOfflineResult11" desc="更新探伤下线实绩">
UPDATE MIL_OFFLINE_RESLUT t  SET　
　         t.BACKLINE_NUM=t.BACKLINE_NUM1+t.BACKLINE_NUM2+t.BACKLINE_NUM3+? ,
     t.BACKLINE_NUM1=t.BACKLINE_NUM1+?,
     t.STATUS=?
WHERE t.judge_stove_no=?
AND t.offline_pro='TS'
</query>
<query id="BackLine.UpdateOfflineResult12" desc="更新探伤下线实绩">
UPDATE MIL_OFFLINE_RESLUT t  SET　
　         t.BACKLINE_NUM=t.BACKLINE_NUM1+t.BACKLINE_NUM2+t.BACKLINE_NUM3+? ,
     t.BACKLINE_NUM2=t.BACKLINE_NUM2+?,
     t.STATUS=?
WHERE t.judge_stove_no=?
AND t.offline_pro='TS'
</query>
<query id="BackLine.UpdateOfflineResult13" desc="更新探伤下线实绩">
UPDATE MIL_OFFLINE_RESLUT t  SET　
　         t.BACKLINE_NUM=t.BACKLINE_NUM1+t.BACKLINE_NUM2+t.BACKLINE_NUM3+? ,
     t.BACKLINE_NUM3=t.BACKLINE_NUM3+?,
     t.STATUS=?
WHERE t.judge_stove_no=?
AND t.offline_pro='TS'
</query>

<query id="BackLine.UpdateResult111" desc="更新探伤实绩表返线数据">
UPDATE MIL_ET_RESULT t  SET
    t.NODE_FUR_FLAG='0',
    t.NODE_FUR_FLAG1='0',
    t.BACKLINE_NUM=t.BACKLINE_NUM1+t.BACKLINE_NUM2+t.BACKLINE_NUM3+? ,
    t.BACKLINE_NUM1=t.BACKLINE_NUM1+?
    WHERE
	t.Judge_Stove_No=?
</query>
<query id="BackLine.UpdateResult112" desc="更新探伤实绩表返线数据">
UPDATE MIL_ET_RESULT t  SET
    t.NODE_FUR_FLAG='0',
    t.NODE_FUR_FLAG2='0',
    t.BACKLINE_NUM=t.BACKLINE_NUM1+t.BACKLINE_NUM2+t.BACKLINE_NUM3+? ,
    t.BACKLINE_NUM2=t.BACKLINE_NUM2+?
    WHERE
	t.Judge_Stove_No=?
</query>
<query id="BackLine.UpdateResult113" desc="更新探伤实绩表返线数据">
UPDATE MIL_ET_RESULT t  SET
    t.NODE_FUR_FLAG='0',
    t.NODE_FUR_FLAG3='0',
    t.BACKLINE_NUM=t.BACKLINE_NUM1+t.BACKLINE_NUM2+t.BACKLINE_NUM3+? ,
    t.BACKLINE_NUM3=t.BACKLINE_NUM3+?
    WHERE
	t.Judge_Stove_No=?
</query>
<query id="BackLine.UpdateResult121" desc="更新探伤实绩表返线数据">
	UPDATE MIL_MT_RESULT t SET 
	t.NODE_FUR_FLAG='0',
    t.NODE_FUR_FLAG1='0',
	t.BACKLINE_NUM=t.BACKLINE_NUM1+t.BACKLINE_NUM2+?,
	t.BACKLINE_NUM1=t.BACKLINE_NUM1+?
    WHERE
	t.Judge_Stove_No=?
</query>
<query id="BackLine.UpdateResult122" desc="更新探伤实绩表返线数据">
	UPDATE MIL_MT_RESULT t SET 
	t.NODE_FUR_FLAG='0',
    t.NODE_FUR_FLAG2='0',
	t.BACKLINE_NUM=t.BACKLINE_NUM1+t.BACKLINE_NUM2+?,
	t.BACKLINE_NUM2=t.BACKLINE_NUM2+?
    WHERE
	t.Judge_Stove_No=?
</query>
<query id="BackLine.UpdateResult131" desc="更新探伤实绩表返线数据">
	UPDATE MIL_UL_RESUL t SET 
	t.NODE_FUR_FLAG='0',
    t.NODE_FUR_FLAG1='0',
	t.BACKLINE_NUM=t.BACKLINE_NUM1+t.BACKLINE_NUM2+?,
	t.BACKLINE_NUM1=t.BACKLINE_NUM1+?
    WHERE
	t.Judge_Stove_No=?
</query>
<query id="BackLine.UpdateResult132" desc="更新探伤实绩表返线数据">
	UPDATE MIL_UL_RESUL t SET 
	t.NODE_FUR_FLAG='0',
    t.NODE_FUR_FLAG2='0',
	t.BACKLINE_NUM=t.BACKLINE_NUM1+t.BACKLINE_NUM2+?,
	t.BACKLINE_NUM2=t.BACKLINE_NUM2+?
    WHERE
	t.Judge_Stove_No=?
</query>
<query id= "BackLine.UpdateMILPLAN" desc="更新主表下线状态">
UPDATE MIL_PLAN t SET
    t.node_status=? ,
    t.OFFLINE_FLAG='2'
    WHERE
    t.JUDGE_STOVE_NO=?
</query>
<query id="BackLine.UpdateRack0" desc="更新跟踪记录表">
 update MIL_STRAIGH_RACK t
    set t.offline_flag = 2
  where
  t.seq in (select SEQ
              from (select a.SEQ AS SEQ
                      from MIL_STRAIGH_RACK a
                     WHERE a.STATUS = 0
                       AND a.offline_flag = 1
                       AND a.judge_stove_no = ?
                       AND a.col_no=?
                     order by a.seq desc)
                     WHERE rownum between 1 and ?)

</query>
<query id="BackLine.UpdateRack1" desc="更新跟踪记录表">
 update MIL_TESTING_RACK t
    set t.offline_flag = 2
  where
  t.seq in (select SEQ
              from (select a.SEQ AS SEQ
                      from MIL_TESTING_RACK a
                     WHERE a.STATUS = 0
                       AND a.offline_flag = 1
                       AND a.judge_stove_no = ?
                       AND a.col_no=?
                     order by a.seq desc)
                     WHERE rownum between 1 and ?)
   
</query>
<query id="BackLine.UpdateQARack" desc="更新人工质检表">
 update MIL_QA_RACK t
    set t.offline_flag = 2
  where 
  t.seq in (select SEQ
              from (select a.SEQ AS SEQ
                      from MIL_QA_RACK a
                     WHERE a.STATUS = 0
                       AND a.offline_flag = 1
                       AND a.judge_stove_no = ?
                     order by a.seq desc)
                     WHERE rownum between 1 and ?)
</query>

<!-- 以下 是新增的返线方法-->
<query id="BackLine.AddMILPLAN" desc="添加新的主计划">
INSERT INTO MIL_PLAN(
 ID,
SEQ,
JUDGE_STOVE_NO,
LOT_NO,
CONTRACT_NO,
IMP_PROCESS,
PLINE_CODE,
PROCESS_STATUS,
DB_LENGTH,
DB_HEIGHT,
ROLL_LENGTH,
SAW_NUM,
TARGET_LENGTH,
FINISH_USER,
TARGET_LIABRARY,
VARIETIES,
PIPE_SIZE,
BUCKLE_TYPE,
LENGTH_RANGE,
ROLL_STANDRAD,
PIPE_SECTION,
STEELNAME,
GRADENAME,
STEEL_STANDRAD,
TARGET,
BRANCH,
TON,
CUT_TARGET,
CUT_LENGTH,
CUT_WEIGHT,
DB_NUM,
START_TIME,
STATUS,
NODE_STATUS,
CUT_HEAD_LENGTHP,
CUT_TRAIL_LENGTHP,
PRODUCE_STANDRAD,
BACK_PLAN_FLAG,
FEED_TIME)
 VALUES( 
 '#ID#',
'#SEQ#',
'#JUDGE_STOVE_NO#',
'#LOT_NO#',
'#CONTRACT_NO#',
'#IMP_PROCESS#',
'#PLINE_CODE#',
'#PROCESS_STATUS#',
'#DB_LENGTH#',
'#DB_HEIGHT#',
'#ROLL_LENGTH#',
'#SAW_NUM#',
'#TARGET_LENGTH#',
'#FINISH_USER#',
'#TARGET_LIABRARY#',
'#VARIETIES#',
'#PIPE_SIZE#',
'#BUCKLE_TYPE#',
'#LENGTH_RANGE#',
'#ROLL_STANDRAD#',
'#PIPE_SECTION#',
'#STEELNAME#',
'#GRADENAME#',
'#STEEL_STANDRAD#',
'#TARGET#',
'#BRANCH#',
'#TON#',
'#CUT_TARGET#',
'#CUT_LENGTH#',
'#CUT_WEIGHT#',
'#DB_NUM#',
TO_Date('#START_TIME#', 'YYYY-MM-DD HH24:MI:SS'),
'#STATUS#',
'#NODE_STATUS#',
'#CUT_HEAD_LENGTHP#',
'#CUT_TRAIL_LENGTHP#',
'#PRODUCE_STANDRAD#',
'#BACK_PLAN_FLAG#',
TO_Date('#FEED_TIME#', 'YYYY-MM-DD HH24:MI:SS'))
</query>

<query id="BackLine.AddStraightResult" desc="添加矫直实绩">
INSERT INTO MIL_STRAIGHTENING_RESULT(
        RESULT_NO,
        LOT_NO,
        STOVE_NO,
        JUDGE_STOVE_NO,
        PLINE_CODE,
        QUALIFIED_NUM1,
        ROLLER_UP_ANGLE11,
        ROLLER_UP_ANGLE12,
        ROLLER_UP_ANGLE13,
        ROLLER_UP_ANGLE14,
        ROLLER_UP_ANGLE15,
        ROLLER_DOWN_ANGLE11,
        ROLLER_DOWN_ANGLE12,
        ROLLER_DOWN_ANGLE13,
        ROLLER_DOWN_ANGLE14,
        ROLLER_DOWN_ANGLE15,
        ROLLER_SPACE11,
        ROLLER_SPACE12,
        ROLLER_SPACE13,
        ROLLER_SPACE14,
        ROLLER_SPACE15,
        QUALIFIED_NUM2,
        ROLLER_UP_ANGLE21,
        ROLLER_UP_ANGLE22,
        ROLLER_UP_ANGLE23,
        ROLLER_UP_ANGLE24,
        ROLLER_UP_ANGLE25,
        ROLLER_DOWN_ANGLE21,
        ROLLER_DOWN_ANGLE22,
        ROLLER_DOWN_ANGLE23,
        ROLLER_DOWN_ANGLE24,
        ROLLER_DOWN_ANGLE25,
        ROLLER_SPACE21,
        ROLLER_SPACE22,
        ROLLER_SPACE23,
        ROLLER_SPACE24,
        ROLLER_SPACE25,
        QUALIFIED_NUM3,
        ROLLER_UP_ANGLE31,
        ROLLER_UP_ANGLE32,
        ROLLER_UP_ANGLE33,
        ROLLER_UP_ANGLE34,
        ROLLER_UP_ANGLE35,
        ROLLER_DOWN_ANGLE31,
        ROLLER_DOWN_ANGLE32,
        ROLLER_DOWN_ANGLE33,
        ROLLER_DOWN_ANGLE34,
        ROLLER_DOWN_ANGLE35,
        ROLLER_SPACE31,
        ROLLER_SPACE32,
        ROLLER_SPACE33,
        ROLLER_SPACE34,
        ROLLER_SPACE35,
        ROLLER_ENTER_UP_ANGLE1,
        ROLLER_ENTER_UP_ANGLE2,
        ROLLER_ENTER_DOWN_ANGLE1,
        ROLLER_ENTER_DOWN_ANGLE2,
        ROLLER_MIDDLE_UP_ANGLE1,
        ROLLER_MIDDLE_UP_ANGLE2,
        ROLLER_MIDDLE_DOWN_ANGLE1,
        ROLLER_MIDDLE_DOWN_ANGLE2,
        ROLLER_EXIT_UP_ANGLE1,
        ROLLER_EXIT_UP_ANGLE2,
        ROLLER_EXIT_DOWN_ANGLE1,
        ROLLER_EXIT_DOWN_ANGLE2,
        ROLLER_ENTER_SPACE1,
        ROLLER_ENTER_SPACE2,
        ROLLER_MIDDLE_SPACE1,
        ROLLER_MIDDLE_SPACE2,
        ROLLER_EXIT_SPACE1,
        ROLLER_EXIT_SPACE2,
        MIDDLE_ROLLER_SPACE,
        MAIN_MOTOR_SPEED,
        ROLLING_SPEED,
        IN_MAT_NUM,
        QUALIFIED_NUM,
        DEFLECTION,
        ENTRANCE_SPEED,
        EXIT_SPEED,
        START_TIME,
        END_TIME,
        NODE_FUR_FLAG,
        REMARK,
        COL_MODE,
        COL_TIME,
        COL_USER,
        COL_SHIFT,
        COL_GROUP,
        ROLLER_UP_ANGLE26,
        ROLLER_DOWN_ANGLE26,
        ROLLER_UP_ANGLE16,
        ROLLER_DOWN_ANGLE16,
        KG_FLAG)
 VALUES( 
        '#RESULT_NO#',
        '#LOT_NO#',
        '#STOVE_NO#',
        '#JUDGE_STOVE_NO#',
        '#PLINE_CODE#',
        '#QUALIFIED_NUM1#',
        '#ROLLER_UP_ANGLE11#',
        '#ROLLER_UP_ANGLE12#',
        '#ROLLER_UP_ANGLE13#',
        '#ROLLER_UP_ANGLE14#',
        '#ROLLER_UP_ANGLE15#',
        '#ROLLER_DOWN_ANGLE11#',
        '#ROLLER_DOWN_ANGLE12#',
        '#ROLLER_DOWN_ANGLE13#',
        '#ROLLER_DOWN_ANGLE14#',
        '#ROLLER_DOWN_ANGLE15#',
        '#ROLLER_SPACE11#',
        '#ROLLER_SPACE12#',
        '#ROLLER_SPACE13#',
        '#ROLLER_SPACE14#',
        '#ROLLER_SPACE15#',
        '#QUALIFIED_NUM2#',
        '#ROLLER_UP_ANGLE21#',
        '#ROLLER_UP_ANGLE22#',
        '#ROLLER_UP_ANGLE23#',
        '#ROLLER_UP_ANGLE24#',
        '#ROLLER_UP_ANGLE25#',
        '#ROLLER_DOWN_ANGLE21#',
        '#ROLLER_DOWN_ANGLE22#',
        '#ROLLER_DOWN_ANGLE23#',
        '#ROLLER_DOWN_ANGLE24#',
        '#ROLLER_DOWN_ANGLE25#',
        '#ROLLER_SPACE21#',
        '#ROLLER_SPACE22#',
        '#ROLLER_SPACE23#',
        '#ROLLER_SPACE24#',
        '#ROLLER_SPACE25#',
        '#QUALIFIED_NUM3#',
        '#ROLLER_UP_ANGLE31#',
        '#ROLLER_UP_ANGLE32#',
        '#ROLLER_UP_ANGLE33#',
        '#ROLLER_UP_ANGLE34#',
        '#ROLLER_UP_ANGLE35#',
        '#ROLLER_DOWN_ANGLE31#',
        '#ROLLER_DOWN_ANGLE32#',
        '#ROLLER_DOWN_ANGLE33#',
        '#ROLLER_DOWN_ANGLE34#',
        '#ROLLER_DOWN_ANGLE35#',
        '#ROLLER_SPACE31#',
        '#ROLLER_SPACE32#',
        '#ROLLER_SPACE33#',
        '#ROLLER_SPACE34#',
        '#ROLLER_SPACE35#',
        '#ROLLER_ENTER_UP_ANGLE1#',
        '#ROLLER_ENTER_UP_ANGLE2#',
        '#ROLLER_ENTER_DOWN_ANGLE1#',
        '#ROLLER_ENTER_DOWN_ANGLE2#',
        '#ROLLER_MIDDLE_UP_ANGLE1#',
        '#ROLLER_MIDDLE_UP_ANGLE2#',
        '#ROLLER_MIDDLE_DOWN_ANGLE1#',
        '#ROLLER_MIDDLE_DOWN_ANGLE2#',
        '#ROLLER_EXIT_UP_ANGLE1#',
        '#ROLLER_EXIT_UP_ANGLE2#',
        '#ROLLER_EXIT_DOWN_ANGLE1#',
        '#ROLLER_EXIT_DOWN_ANGLE2#',
        '#ROLLER_ENTER_SPACE1#',
        '#ROLLER_ENTER_SPACE2#',
        '#ROLLER_MIDDLE_SPACE1#',
        '#ROLLER_MIDDLE_SPACE2#',
        '#ROLLER_EXIT_SPACE1#',
        '#ROLLER_EXIT_SPACE2#',
        '#MIDDLE_ROLLER_SPACE#',
        '#MAIN_MOTOR_SPEED#',
        '#ROLLING_SPEED#',
        '#IN_MAT_NUM#',
        '#QUALIFIED_NUM#',
        '#DEFLECTION#',
        '#ENTRANCE_SPEED#',
        '#EXIT_SPEED#',
        SYSDATE,
        TO_Date('#END_TIME#', 'YYYY-MM-DD HH24:MI:SS'),
        '#NODE_FUR_FLAG#',
        '#REMARK#',
        '#COL_MODE#',
        SYSDATE,
        '#COL_USER#',
        '#COL_SHIFT#',
        '#COL_GROUP#',
        '#ROLLER_UP_ANGLE26#',
        '#ROLLER_DOWN_ANGLE26#',
        '#ROLLER_UP_ANGLE16#',
        '#ROLLER_DOWN_ANGLE16#',
        '#KG_FLAG#')

</query>


<query id="BackLine.AddETResult" desc="添加ET探伤实绩">
 INSERT INTO MIL_ET_RESULT(
        RESULT_NO,
        LOT_NO,
        STOVE_NO,
        JUDGE_STOVE_NO,
        PLINE_CODE,
        PRODUCT_STANDARDS,
        INSPECTION_STANDARD,
        TESTING_METHOD,
        CALIBRATION_METHOD,
        ARTIFICIAL_DEFECT_SHAPE,
        EXCITATION_FREQUENCY1,
        EXCITATION_FREQUENCY2,
        EXCITATION_FREQUENCY3,
        TESTING_SPEED1,
        TESTING_SPEED2,
        TESTING_SPEED3,
        START_TIME,
        EXECUTIVE_PRODUCER,
        PRODUCER_TIME,
        PRODUCER_TEL,
        REMARK,
        USERID,
        SIGNID,
        TESTING_TIME,
        REMARK2,
        COL_MODE,
        COL_TIME,
        COL_USER,
        COL_SHIFT,
        COL_GROUP)
 VALUES( 
        '#RESULT_NO#',
        '#LOT_NO#',
        '#STOVE_NO#',
        '#JUDGE_STOVE_NO#',
        '#PLINE_CODE#',
        '#PRODUCT_STANDARDS#',
        '#INSPECTION_STANDARD#',
        '#TESTING_METHOD#',
        '#CALIBRATION_METHOD#',
        '#ARTIFICIAL_DEFECT_SHAPE#',
        '#EXCITATION_FREQUENCY1#',
        '#EXCITATION_FREQUENCY2#',
        '#EXCITATION_FREQUENCY3#',
        '#TESTING_SPEED1#',
        '#TESTING_SPEED2#',
        '#TESTING_SPEED3#',
        SYSDATE,
        '#EXECUTIVE_PRODUCER#',
        SYSDATE,
        '#PRODUCER_TEL#',
        '#REMARK#',
        '#USERID#',
        '#SIGNID#',
        SYSDATE,
        '#REMARK2#',
        '#COL_MODE#',
        SYSDATE,
        '#COL_USER#',
        '#COL_SHIFT#',
        '#COL_GROUP#')
</query>

<query id="BackLine.AddMTResult" desc="添加MT探伤实绩">
 INSERT INTO MIL_MT_RESULT(
        RESULT_NO,
        LOT_NO,
        STOVE_NO,
        JUDGE_STOVE_NO,
        PLINE_CODE,
        PRODUCT_STANDARDS,
        LO_SURFACE,
        LI_SURFACE,
        TO_SURFACE,
        TI_SURFACE,
        GROOVE_SHAPE,
        INSPECTION_STANDARD,
        LONGITUDINAL_CURRENT1,
        TRANSVERSE_CURRENT1,
        LONGITUDINAL_CURRENT2,
        TRANSVERSE_CURRENT2,
        SPEED1,
        SPEED2,
        DETECTION_SPEED1,
        DETECTION_SPEED2,
        USERID,
        SIGNID,
        START_TIME,
        EXECUTIVE_PRODUCER,
        PRODUCER_TIME,
        PRODUCER_TEL,
        REMARK,
        COL_MODE,
        COL_TIME,
        COL_USER,
        COL_SHIFT,
        COL_GROUP)
 VALUES( 
        '#RESULT_NO#',
        '#LOT_NO#',
        '#STOVE_NO#',
        '#JUDGE_STOVE_NO#',
        '#PLINE_CODE#',
        '#PRODUCT_STANDARDS#',
        '#LO_SURFACE#',
        '#LI_SURFACE#',
        '#TO_SURFACE#',
        '#TI_SURFACE#',
        '#GROOVE_SHAPE#',
        '#INSPECTION_STANDARD#',
        '#LONGITUDINAL_CURRENT1#',
        '#TRANSVERSE_CURRENT1#',
        '#LONGITUDINAL_CURRENT2#',
        '#TRANSVERSE_CURRENT2#',
        '#SPEED1#',
        '#SPEED2#',
        '#DETECTION_SPEED1#',
        '#DETECTION_SPEED2#',
        '#USERID#',
        '#SIGNID#',
        SYSDATE,
        '#EXECUTIVE_PRODUCER#',
        SYSDATE,
        '#PRODUCER_TEL#',
        '#REMARK#',
        '#COL_MODE#',
        SYSDATE,
        '#COL_USER#',
        '#COL_SHIFT#',
        '#COL_GROUP#')
</query>

<query id="BackLine.AddUTResult" desc="添加UT探伤实绩">
 INSERT INTO MIL_UL_RESUL(
        RESULT_NO,
        LOT_NO,
        STOVE_NO,
        JUDGE_STOVE_NO,
        PLINE_CODE,
        PRODUCT_STANDARDS,
        INSTRUMENT_TYPE,
        PROBE_TYPE,
        SENSTIVITY,
        INHIBITION,
        COUPLING_AGENT,
        SURFACE_APPEARANCE,
        LO_SURFACE,
        LI_SURFACE,
        TO_SURFACE,
        TI_SURFACE,
        USERID,
        SIGNID,
        START_TIME,
        EXECUTIVE_PRODUCER,
        PRODUCER_TIME,
        PRODUCER_TEL,
        NODE_FUR_FLAG,
        REMARK,
        COL_MODE,
        COL_TIME,
        COL_USER,
        COL_SHIFT,
        COL_GROUP)
 VALUES( 
        '#RESULT_NO#',
        '#LOT_NO#',
        '#STOVE_NO#',
        '#JUDGE_STOVE_NO#',
        '#PLINE_CODE#',
        '#PRODUCT_STANDARDS#',
        '#INSTRUMENT_TYPE#',
        '#PROBE_TYPE#',
        '#SENSTIVITY#',
        '#INHIBITION#',
        '#COUPLING_AGENT#',
        '#SURFACE_APPEARANCE#',
        '#LO_SURFACE#',
        '#LI_SURFACE#',
        '#TO_SURFACE#',
        '#TI_SURFACE#',
        '#USERID#',
        '#SIGNID#',
        SYSDATE,
        '#EXECUTIVE_PRODUCER#',
        SYSDATE,
        '#PRODUCER_TEL#',
        '#NODE_FUR_FLAG#',
        '#REMARK#',
        '#COL_MODE#',
        SYSDATE,
        '#COL_USER#',
        '#COL_SHIFT#',
        '#COL_GROUP#')
</query>

<query id="BackLine.AddStraightRack" desc="添加矫直管号队列">
INSERT INTO MIL_STRAIGH_RACK(
        MAT_NO,
        LOT_NO,
        STOVE_NO,
        JUDGE_STOVE_NO,
        STEELCODE,
        STEELNAME,
        GRADECODE,
        GRADENAME,
        PLINE_CODE,
        FTUBE_DIAMETER,
        FTUBE_WALL_THICKNESS,
        FTUBE_LENGTH,
        START_STRAIGHTENING_TIME,
        END_STRAIGHTENING_TIME,
        COL_MODE,
        COL_TIME,
        SEQ,
        COL_NO,
        COL_SHIFT,
        COL_GROUP,
        RESULT_NO,
        PIPE_LENGTH)
 VALUES( 
        '#MAT_NO#',
        '#LOT_NO#',
        '#STOVE_NO#',
        '#JUDGE_STOVE_NO#',
        '#STEELCODE#',
        '#STEELNAME#',
        '#GRADECODE#',
        '#GRADENAME#',
        '#PLINE_CODE#',
        '#FTUBE_DIAMETER#',
        '#FTUBE_WALL_THICKNESS#',
        '#FTUBE_LENGTH#',
        SYSDATE,
        TO_Date('#END_STRAIGHTENING_TIME#', 'YYYY-MM-DD HH24:MI:SS'),
        '0',
        SYSDATE,
        '#SEQ#',
        '#COL_NO#',
        '#COL_SHIFT#',
        '#COL_GROUP#',
        '#RESULT_NO#',
        '#PIPE_LENGTH#')
</query>

<query id="BackLine.AddTestRack" desc="添加探伤管号队列">
INSERT INTO MIL_TESTING_RACK(
        MAT_NO,
        LOT_NO,
        STOVE_NO,
        JUDGE_STOVE_NO,
        STEELCODE,
        STEELNAME,
        GRADECODE,
        GRADENAME,
        PLINE_CODE,
        START_INSPECTION_TIME,
        REMARK,
        COL_MODE,
        SEQ,
        COL_NO,
        RESULT_NO,
        FTUBE_DIAMETER,
        FTUBE_WALL_THICKNESS,
        FTUBE_LENGTH,
        PIPE_LENGTH
        )
 VALUES( 
        '#MAT_NO#',
        '#LOT_NO#',
        '#STOVE_NO#',
        '#JUDGE_STOVE_NO#',
        '#STEELCODE#',
        '#STEELNAME#',
        '#GRADECODE#',
        '#GRADENAME#',
        '#PLINE_CODE#',
        SYSDATE,
        '#REMARK#',
        '0',
        '#SEQ#',
        '#COL_NO#',
        '#RESULT_NO#',
        '#FTUBE_DIAMETER#',
        '#FTUBE_WALL_THICKNESS#',
        '#FTUBE_LENGTH#',
        '#PIPE_LENGTH#')
</query>

<query id="BackLine.AddQaRack" desc="添加人工质检管号队列">
  INSERT INTO MIL_QA_RACK(
        LOT_NO,
        STOVE_NO,
        JUDGE_STOVE_NO,
        PLINE_CODE,
        COL_MODE,
        SEQ,
        RESULT_NO)
 VALUES( 
        '#LOT_NO#',
        '#STOVE_NO#',
        '#JUDGE_STOVE_NO#',
        '#PLINE_CODE#',
        '0',
        '#SEQ#',
        '#RESULT_NO#')
</query>
<query id = "FrmBackLine.doQueryStartTime" desc = "查询当前开始探伤炉计划时间">
<![CDATA[
SELECT TO_CHAR(T.START_TIME, 'YYYY-MM-DD HH24:MI:SS')START_TIME,
TO_CHAR(T.FEED_TIME, 'YYYY-MM-DD HH24:MI:SS')FEED_TIME
  FROM MIL_PLAN T
 WHERE T.STATUS = '85'
 AND T.NODE_STATUS <>'90'
   AND T.PLINE_CODE = ?
   ]]>
</query>
</querymap>
