<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="上料锯切实绩操作">
	<query id="ToolChange.AddPerResultNode" desc="添加穿孔工具更换实绩">
		
        <![CDATA[
     INSERT INTO MIL_PER_TOOL(
        GUIDE_CHANGE,
        GUIDE_CHANGE_TIME,
        RESULT_NO,
        PLUG_CHANGE,
        PLUG_CHANGE_TIME,
        BAR_CHANGE,
        BAR_CHANGE_TIME,
         TOOL_CHANGE,
        TOOL_CHANGE_TIME,
        COL_SHIFT,
        COL_GROUP,
        COL_USER,
        CREAT_TIME,
        PLINE_CODE)
 VALUES( 
        '#GUIDE_CHANGE#',
        '#GUIDE_CHANGE_TIME#',
        '#RESULT_NO#',
        '#PLUG_CHANGE#',
        '#PLUG_CHANGE_TIME#',
        '#BAR_CHANGE#',
        '#BAR_CHANGE_TIME#',
           '#TOOL_CHANGE#',
        '#TOOL_CHANGE_TIME#',
        '#COL_SHIFT#',
        '#COL_GROUP#',
        '#COL_USER#',
        sysdate,
        '#PLINE_CODE#')
        ]]>
	</query>
	
	
		<query id="ToolChange.AddRollingResultNode" desc="添加连轧工具更换实绩">
		
        <![CDATA[
  INSERT INTO MIL_ROLLING_TOOL(
        RESULT_NO,
        MANDREL_CHANGE,
        MANDREL_CHANGE_TIME,
        ROLL_CHANGE,
        ROLL_CHANGE_TIME,
        EXMIL_CHANGE,
        EXMIL_CHANGE_TIME,
        COL_SHIFT,
        COL_GROUP,
        COL_USER,
        CREAT_TIME,
        PLINE_CODE)
 VALUES( 
        '#RESULT_NO#',
        '#MANDREL_CHANGE#',
        '#MANDREL_CHANGE_TIME#',
        '#ROLL_CHANGE#',
        '#ROLL_CHANGE_TIME#',
        '#EXMIL_CHANGE#',
        '#EXMIL_CHANGE_TIME#',
        '#COL_SHIFT#',
        '#COL_GROUP#',
        '#COL_USER#',
        SYSDATE,
        '#PLINE_CODE#')
        ]]>
	</query>
	
			<query id="ToolChange.AddSizingResultNode" desc="添加定径工具更换实绩">
		
        <![CDATA[
  INSERT INTO MIL_SIZING_TOOL(
        COL_USER,
        CREAT_TIME,
        PLINE_CODE,
        RESULT_NO,
        TOOL_CHANGE,
        TOOL_CHANGE_TIME,
        COL_SHIFT,
        COL_GROUP)
 VALUES( 
        '#COL_USER#',
        SYSDATE,
        '#PLINE_CODE#',
        '#RESULT_NO#',
        '#TOOL_CHANGE#',
        '#TOOL_CHANGE_TIME#',
        '#COL_SHIFT#',
        '#COL_GROUP#')
        ]]>
	</query>
	
	<query id="ToolChange.UpdatePerResultNode" desc="修改穿孔更换实绩">
		
        <![CDATA[
   UPDATE MIL_PER_TOOL
   SET 
        GUIDE_CHANGE = '#GUIDE_CHANGE#',
        GUIDE_CHANGE_TIME = '#GUIDE_CHANGE_TIME#',
      
        PLUG_CHANGE = '#PLUG_CHANGE#',
        PLUG_CHANGE_TIME = '#PLUG_CHANGE_TIME#',
        BAR_CHANGE = '#BAR_CHANGE#',
        BAR_CHANGE_TIME = '#BAR_CHANGE_TIME#',
          TOOL_CHANGE = '#TOOL_CHANGE#',
        TOOL_CHANGE_TIME = '#TOOL_CHANGE_TIME#'

       
 WHERE
  PLINE_CODE = '#PLINE_CODE#'
  and   RESULT_NO = '#RESULT_NO#'
        ]]>
	</query>
	
	
	<query id="ToolChange.UpdateRollingResultNode" desc="修改连轧更换实绩">
		
        <![CDATA[
   UPDATE MIL_ROLLING_TOOL
   SET 
       
        MANDREL_CHANGE = '#MANDREL_CHANGE#',
        MANDREL_CHANGE_TIME = '#MANDREL_CHANGE_TIME#',
        ROLL_CHANGE = '#ROLL_CHANGE#',
        ROLL_CHANGE_TIME = '#ROLL_CHANGE_TIME#',
        EXMIL_CHANGE = '#EXMIL_CHANGE#',
        EXMIL_CHANGE_TIME = '#EXMIL_CHANGE_TIME#'
        
 WHERE
  RESULT_NO = '#RESULT_NO#'
  AND 
  PLINE_CODE = '#PLINE_CODE#'
        ]]>
	</query>
	
	<query id="ToolChange.UpdateSizingResultNode" desc="修改定径更换实绩">
		
        <![CDATA[
  UPDATE MIL_SIZING_TOOL
   SET       
        TOOL_CHANGE = '#TOOL_CHANGE#',
        TOOL_CHANGE_TIME = '#TOOL_CHANGE_TIME#'
 WHERE
  RESULT_NO = '#RESULT_NO#'
  AND 
  PLINE_CODE = '#PLINE_CODE#'
        ]]>
	</query>

<query id="ToolChange.DeletePerResultNode" desc="修改穿孔更换实绩">
		
        <![CDATA[
   DELETE MIL_PER_TOOL    
 WHERE
  PLINE_CODE = '#PLINE_CODE#'
  and   RESULT_NO = '#RESULT_NO#'
        ]]>
	</query>
	
	
	<query id="ToolChange.DeleteRollingResultNode" desc="修改连轧更换实绩">
		
        <![CDATA[
   DELETE MIL_ROLLING_TOOL
 WHERE
  RESULT_NO = '#RESULT_NO#'
  AND 
  PLINE_CODE = '#PLINE_CODE#'
        ]]>
	</query>
	
	<query id="ToolChange.DeleteSizingResultNode" desc="修改定径更换实绩">
		
        <![CDATA[
  DELETE MIL_SIZING_TOOL
 WHERE
  RESULT_NO = '#RESULT_NO#'
  AND 
  PLINE_CODE = '#PLINE_CODE#'
        ]]>
	</query>


</queryMap>