<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="热处理/加工线班次上下班时间">
	<query id="HttControlShift.doQuery" desc="查询">
	 <![CDATA[ 
SELECT T.PLINE_CODE,
       T.PLINE_NAME,
       T.PRO_BC,
       T.LAST_BC,
       --DECODE(T.PRO_BC, '1', '早', '2', '中', '3', '晚') PRO_BC,
       --DECODE(T.LAST_BC, '1', '早', '2', '中', '3', '晚') LAST_BC,
       T.SHIFT_BEG,
       T.SHIFT_END,
       T.SHIFT_TIME
  FROM HTT_CONTROL_SHIFT T
 WHERE 1 = 1
	  ]]>
	</query>
	
	<query id="HttControlShift.add" desc="新增">
	 <![CDATA[ 
INSERT INTO HTT_CONTROL_SHIFT
  (PLINE_CODE,
   PLINE_NAME,
   PRO_BC,
   LAST_BC,
   SHIFT_BEG,
   SHIFT_END,
   SHIFT_TIME)
VALUES
  ('#PLINE_CODE#',
   '#PLINE_NAME#',
   '#PRO_BC#',
   '#LAST_BC#',
   '#SHIFT_BEG#',
   '#SHIFT_END#',
   '#SHIFT_TIME#')
	  ]]>
	</query>
	
	<query id="HttControlShift.update" desc="修改">
	 <![CDATA[ 
	UPDATE HTT_CONTROL_SHIFT T
   SET T.LAST_BC = '#LAST_BC#',
       T.SHIFT_BEG  = '#SHIFT_BEG#',
       T.SHIFT_END  = '#SHIFT_END#',
       T.SHIFT_TIME = '#SHIFT_TIME#'
 WHERE T.PLINE_CODE = '#PLINE_CODE#'
   AND T.PRO_BC = '#PRO_BC#'
	  ]]>
	</query>
	
	<query id="HttControlShift.delete" desc="删除">
	 <![CDATA[ 
	DELETE HTT_CONTROL_SHIFT T
 WHERE T.PLINE_CODE = '#PLINE_CODE#'
   AND T.PRO_BC = '#PRO_BC#'
	  ]]>
	</query>
</queryMap>
