<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="销售合同回退日志">
	<query id="CoreOrdCancelLog.queryCancelLog" desc="查询回退合同日志">
		<![CDATA[
			SELECT T.BACKLOG_ID,
			       T.ORD_PK,
			       T.ORD_LN_PK,
			       T.ORD_LN_DLY_PK,
			       T.ORDER_NO,
			       T.ORDER_SEQ,
			       T.DELIVERY_NO,
			       T.PRODUCNAME,
			       T.SPEC_NAME,
			       T.ORDER_UNIT,
			       T.ORDER_QTY,
			       T.BUYER_NAME,
			       T.FINAL_USER_DESC,
			       TO_CHAR(T.DELVRY_EDATE, 'YYYY-MM-DD') DELVRY_EDATE,
			       T.ROLL_MONTH,
			       T.BACK_REASON,
			       T.CREATE_NAME,
			       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
			       (T.ORDER_NO || '/' || T.ORDER_SEQ) ORDER_SEQNO
			  FROM PLN_SALEORD_BACKLOG T
			 WHERE TO_DATE(TO_CHAR(T.CREATE_TIME, 'YYYY/MM/DD'), 'YYYY/MM/DD') BETWEEN
			       TO_DATE(?, 'YYYY/MM/DD') AND TO_DATE(?, 'YYYY/MM/DD')
			   AND (T.ORDER_NO || '/' || T.ORDER_SEQ) LIKE '%' || NLS_UPPER(?) || '%'
			   AND TO_DATE(TO_CHAR(T.DELVRY_EDATE, 'YYYY/MM/DD'), 'YYYY/MM/DD') BETWEEN
			       TO_DATE(?, 'YYYY/MM/DD') AND TO_DATE(?, 'YYYY/MM/DD')
		]]>
	</query>
	
	<query id="CoreOrdCancelLog.updateDeletelog" desc="删除回退合同日志">
		<![CDATA[
			DELETE FROM PLN_SALEORD_BACKLOG T WHERE T.BACKLOG_ID=?
		]]>
	</query>
	</queryMap>