<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="热处理实绩，分高温炉和低温炉">
	
	<query id="HeatTreatmentService.GetHeatTreatmentResultByID" desc="热处理实绩查询">
        <![CDATA[
         SELECT T.HHEAT_ENTER_TIME,T.HHEAT_OUT_TIME,T.HHEAT_EXIT_TEMP,T.HHEAT_TAKT_TIME,
				T.HHEAT_AVG_TEMP1,T.HHEAT_AVG_TEMP2,T.HHEAT_AVG_TEMP3,T.HHEAT_AVG_TEMP4,
				T.HHEAT_AVG_TEMP5,T.HHEAT_AVG_TEMP6,T.HHEAT_QUENCH_MODE,T.HHEAT_QUENCH_FLOW,
				T.HHEAT_QUENCH_SECS,T.COL_SHIFT,T.COL_GROUP,T.COL_USER,T.COL_TIME,
				T.PRODUCER,T.PRODUCER_TIME,
				L.LHEAT_ENTER_TIME,L.LHEAT_OUT_TIME,L.LHEAT_EXIT_TEMP,L.LHEAT_TAKT_TIME,
				L.LHEAT_AVG_TEMP1,L.LHEAT_AVG_TEMP2,L.LHEAT_AVG_TEMP3,L.LHEAT_AVG_TEMP4,
				L.LHEAT_AVG_TEMP5,L.LHEAT_AVG_TEMP6,L.LHEAT_AVG_TEMP7,L.LHEAT_AVG_TEMP8,
				L.LHEAT_AVG_TEMP9
			FROM HTT_HHEAT_RESULT T,HTT_LHEAT_RESULT L
			WHERE T.PLAN_NO = L.PLAN_NO
			AND T.PLAN_NO =?
        ]]>
	</query>
	
	<query id="HeatTreatmentService.AddHHeatResult" desc="新增高温炉实绩">
        <![CDATA[
         INSERT INTO HTT_HHEAT_RESULT
                    (RESULT_NO,
                    PLINE_CODE,
                    COL_SHIFT,COL_GROUP,COL_USER,
                    PRODUCER,PRODUCER_TIME,
                    HHEAT_ENTER_TIME,HHEAT_OUT_TIME,HHEAT_EXIT_TEMP,HHEAT_TAKT_TIME,
					HHEAT_AVG_TEMP1,HHEAT_AVG_TEMP2,HHEAT_AVG_TEMP3,
					HHEAT_AVG_TEMP4,HHEAT_AVG_TEMP5,HHEAT_AVG_TEMP6,
					HHEAT_QUENCH_MODE,HHEAT_QUENCH_FLOW,HHEAT_QUENCH_SECS,
                    PLAN_NO)
            VALUES
                   (COUPLING_RESULT_SEQUENCE.Nextval,
                   	?,
                    ?,
                    ?,
                    ?,
                    ?,
                    TO_DATE(?,'yyyy-mm-dd hh24:mi:ss'),
                    TO_DATE(?,'yyyy-mm-dd hh24:mi:ss'),
                    TO_DATE(?,'yyyy-mm-dd hh24:mi:ss'),
                    ?,
                    ?,
                    ?,
                    ?,
                    ?,
                    ?,
                    ?,
                    ?,
                    ?,
                    ?,
                    ?,
                    ?)
        ]]>
	</query>
	
	<query id="HeatTreatmentService.UpdateHHeatResult" desc="修改高温炉实绩">
		<![CDATA[
			 UPDATE HTT_HHEAT_RESULT set
			 				PLINE_CODE=?,
			 				COL_SHIFT=?,
			 				COL_GROUP=?,
			 				COL_USER =?,
		                    PRODUCER=?,
		                    PRODUCER_TIME=TO_DATE(?,'yyyy-mm-dd hh24:mi:ss'),
		                    HHEAT_ENTER_TIME=TO_DATE(?,'yyyy-mm-dd hh24:mi:ss'),
		                    HHEAT_OUT_TIME=TO_DATE(?,'yyyy-mm-dd hh24:mi:ss'),
		                    HHEAT_EXIT_TEMP=?,
		                    HHEAT_TAKT_TIME=?,
							HHEAT_AVG_TEMP1=?,
							HHEAT_AVG_TEMP2=?,
							HHEAT_AVG_TEMP3=?,
							HHEAT_AVG_TEMP4=?,
							HHEAT_AVG_TEMP5=?,
							HHEAT_AVG_TEMP6=?,
							HHEAT_QUENCH_MODE=?,
							HHEAT_QUENCH_FLOW=?,
							HHEAT_QUENCH_SECS=?
						WHERE  PLAN_NO =?
		]]>
	</query>
	
	<query id="HeatTreatmentService.AddLHeatResult" desc="新增低温炉实绩">
        <![CDATA[
         INSERT INTO HTT_LHEAT_RESULT
                    (RESULT_NO,
                    PLINE_CODE,
                    COL_SHIFT,COL_GROUP,COL_USER,
                    PRODUCER,PRODUCER_TIME,
                    LHEAT_ENTER_TIME,
                    LHEAT_OUT_TIME,
                    LHEAT_EXIT_TEMP,
                    LHEAT_TAKT_TIME,
					LHEAT_AVG_TEMP1,
					LHEAT_AVG_TEMP2,
					LHEAT_AVG_TEMP3,
					LHEAT_AVG_TEMP4,
					LHEAT_AVG_TEMP5,
					LHEAT_AVG_TEMP6,
					LHEAT_AVG_TEMP7,
					LHEAT_AVG_TEMP8,
					LHEAT_AVG_TEMP9,
                    PLAN_NO)
            VALUES
                   (COUPLING_RESULT_SEQUENCE.Nextval,
                   	?,
                    ?,
                    ?,
                    ?,
                    ?,
                    TO_DATE(?,'yyyy-mm-dd hh24:mi:ss'),
                    TO_DATE(?,'yyyy-mm-dd hh24:mi:ss'),
                    TO_DATE(?,'yyyy-mm-dd hh24:mi:ss'),
                    ?,
                    ?,
                    ?,
                    ?,
                    ?,
                    ?,
                    ?,
                    ?,
                    ?,
                    ?,
                    ?,
                    ?)
        ]]>
	</query>
	
	<query id="HeatTreatmentService.UpdateLHeatResult" desc="修改低温炉实绩">
		<![CDATA[
			 UPDATE HTT_LHEAT_RESULT set
			 				PLINE_CODE=?,
			 				COL_SHIFT=?,
			 				COL_GROUP=?,
			 				COL_USER =?,
		                    PRODUCER=?,
		                    PRODUCER_TIME=TO_DATE(?,'yyyy-mm-dd hh24:mi:ss'),
		                    LHEAT_ENTER_TIME=TO_DATE(?,'yyyy-mm-dd hh24:mi:ss'),
		                    LHEAT_OUT_TIME=TO_DATE(?,'yyyy-mm-dd hh24:mi:ss'),
		                    LHEAT_EXIT_TEMP=?,
		                    LHEAT_TAKT_TIME=?,
							LHEAT_AVG_TEMP1=?,
							LHEAT_AVG_TEMP2=?,
							LHEAT_AVG_TEMP3=?,
							LHEAT_AVG_TEMP4=?,
							LHEAT_AVG_TEMP5=?,
							LHEAT_AVG_TEMP6=?,
							LHEAT_AVG_TEMP7=?,
							LHEAT_AVG_TEMP8=?,
							LHEAT_AVG_TEMP9=?
						WHERE  PLAN_NO =?
		]]>
	</query>

</queryMap>