<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="工艺变更记录">
	<query id="CorePlnOrdCraftModifyLog.queryCraftLog" desc="查询变更记录">
		<![CDATA[
			SELECT CRF_EDIT_LOG_ID,
			       ORD_LN_DLY_PK,
			       PLN_DIVIDE_ID,
			       ORDER_SOURCE,
			       ORDER_NO,
			       ORDER_SEQ,
			       DELIVERY_NO,
			       R_NUM_ID,
			       CRAFT_FILE_NO_OLD,
			       CRAFT_SEQ_OLD,
			       CRAFT_NO_V_OLD,
			       CRAFT_FILE_NO_NEW,
			       CRAFT_SEQ_NEW,
			       CRAFT_NO_V_NEW,
			       CREATE_NAME,
			       TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME
			  FROM PLN_SALEORD_CRF_EDIT_LOG T
			 WHERE (T.ORDER_NO || '/' || T.ORDER_SEQ) LIKE '%' || NLS_UPPER(?) || '%'
			   AND NLS_UPPER(T.CRAFT_FILE_NO_NEW) LIKE '%' || NLS_UPPER(?) || '%'
			   AND 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')
		]]>
	</query>
	
	<query id="CorePlnOrdCraftModifyLog.deleteCraftLog" desc="删除变更记录">
		<![CDATA[
			DELETE FROM PLN_SALEORD_CRF_EDIT_LOG T WHERE T.CRF_EDIT_LOG_ID = ?
		]]>
	</query>
		
</queryMap>