<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="接箍系数">
	<query id="FcaHttCoupling.doQuery" desc="查询接箍系数">
	  <![CDATA[
	   SELECT
		   T.ID,
		   T.MACHINE,
		   T.SPECIFICATIONS,
		   T.STEEL,
		   T.MODEL_TYPE,
		   T.CAR_SILK_COEFFICIENT,
		   T.CUTTING_PIPE_COEFFICIENT,
		   T.PHOSPHATING_COEFFICIENT,
		   T.CAR_SILK_STEEL,
		   T.CUTTING_PIPE_STEEL,
		   T.PHOSPHATING_STEEL,
		   T.PLATING,
		   T.CREATE_NAME,
		   TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
		   T.UPDATE_NAME,
		   TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
		   T.DELETE_NAME,
		   TO_CHAR(T.DELETE_TIME, 'YYYY-MM-DD HH24:MI:SS') DELETE_TIME,
		   T.VALIDFLAG,
		   T.MEMO
	   FROM HTT_COUPLING T
	   WHERE
		   1 = 1
		  ]]>
	</query>

	<query id="FcaHttCoupling.doAdd" desc="添加接箍系数">
		<![CDATA[
		 INSERT INTO HTT_COUPLING(
				ID,
				MACHINE,
				SPECIFICATIONS,
				STEEL,
				MODEL_TYPE,
				CAR_SILK_COEFFICIENT,
				CUTTING_PIPE_COEFFICIENT,
				PHOSPHATING_COEFFICIENT,
				CAR_SILK_STEEL,
				CUTTING_PIPE_STEEL,
				PHOSPHATING_STEEL,
				PLATING,
				CREATE_NAME,
				CREATE_TIME,
				VALIDFLAG,
				MEMO)
		 VALUES(
				'#ID#',
				'#MACHINE#',
				'#SPECIFICATIONS#',
				'#STEEL#',
				'#MODEL_TYPE#',
				'#CAR_SILK_COEFFICIENT#',
				'#CUTTING_PIPE_COEFFICIENT#',
				'#PHOSPHATING_COEFFICIENT#',
				'#CAR_SILK_STEEL#',
				'#CUTTING_PIPE_STEEL#',
				'#PHOSPHATING_STEEL#',
				'#PLATING#',
				'#CREATE_NAME#',
				SYSDATE,
				'#VALIDFLAG#',
				'#MEMO#')
		  ]]>
	</query>

	<query id="FcaHttCoupling.doUpdate" desc="修改接箍系数">
		<![CDATA[
			 UPDATE HTT_COUPLING T
			   SET
					T.ID = '#ID#',
					T.MACHINE = '#MACHINE#',
					T.SPECIFICATIONS = '#SPECIFICATIONS#',
					T.STEEL = '#STEEL#',
					T.MODEL_TYPE = '#MODEL_TYPE#',
					T.CAR_SILK_COEFFICIENT = '#CAR_SILK_COEFFICIENT#',
					T.CUTTING_PIPE_COEFFICIENT = '#CUTTING_PIPE_COEFFICIENT#',
					T.PHOSPHATING_COEFFICIENT = '#PHOSPHATING_COEFFICIENT#',
					T.CAR_SILK_STEEL = '#CAR_SILK_STEEL#',
					T.CUTTING_PIPE_STEEL = '#CUTTING_PIPE_STEEL#',
					T.PHOSPHATING_STEEL = '#PHOSPHATING_STEEL#',
					T.PLATING = '#PLATING#',
					T.UPDATE_NAME = '#UPDATE_NAME#',
					T.UPDATE_TIME = SYSDATE,
					T.VALIDFLAG = '#VALIDFLAG#',
					T.MEMO = '#MEMO#'
			 WHERE
					T.ID = '#ID#'
		  ]]>
	</query>

	<query id="FcaHttCoupling.doNullifyOrRecover" desc="作废/恢复接箍系数">
		<![CDATA[
			 UPDATE HTT_COUPLING T
			   SET
					T.DELETE_NAME = DECODE('#VALIDFLAG#','1',NULL,'0','#DELETE_NAME#'),
					T.DELETE_TIME = DECODE('#VALIDFLAG#','1',NULL,'0',SYSDATE),
					T.VALIDFLAG = '#VALIDFLAG#'
			 WHERE
					T.ID = '#ID#'
		  ]]>
	</query>

</queryMap>