<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="计划轧管表">
	<query id="PlnOrderZg.query" desc="查询计划轧管表">
		<![CDATA[
SELECT T.PRO_ORDER_NO,
       T.PLAN_GROUP_ID,
       T.ORDER_SOURCE,
       T.ORD_LN_DLY_PK,
       T.PLN_DIVIDE_ID,
       T.ORDER_NO,
       T.ORDER_SEQ,
       T.DELIVERY_NO,
       T.REQ_BL_ID,
       T.INDEX_SEQ,
       T.BOM,
       T.BACKLOG_SEQ,
       T.STEELCODE,
       T.STEELNAME,
       T.OUTDIAMETER,
       T.WALLTHICK,
       T.AIMWALLTHICK,
       T.LENGTHMAX,
       T.LENGTHMIN,
       T.AIMLENGTH,
       T.OUTWL_ID,
       T.ROLL_LENGTH,
       T.OUT_LENGTH,
       T.OUTNUM_SINGLE,
       T.DIAMETER_GP,
       T.LENGTH_GP,
       T.INWL_GP,
       T.WEIGHT_GP_ONE,
       T.GETRATE,
       T.PLINE_CODE_MAY,
       T.PLINE_NAME_MAY,
       T.PLINE_CODE,
       T.PLINE_NAME,
       T.ORDERWEIGHT,
       T.ORDERNUM,
       T.MATCH_WT,
       T.MATCH_NUM,
       T.IFBUYPLAN,
       T.BUYPLANID,
       T.BUYPLAN_WT,
       T.REQ_PROD_WT,
       T.REQ_PROD_NUM,
       TO_CHAR(T.PROD_END_DATE, 'YYYY-MM-DD HH24:MI:SS') PROD_END_DATE,
       T.ORDERSTATUS,
       T.IS_PLANED,
       T.PRO_PLAN_ID,
       T.FINISHWEIGHT,
       T.ISENDGX,
       T.NEXT_GX,
       T.IS_EXTRA_ORD,
       T.IF_MONITOR_ZG,
       T.PRDCR_NO,
       T.CRAFT_FILE_NO,
       T.CRAFT_FILE_MAN,
       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.CRAFT_SEQ,
       T.PASS_CODE,
       T.PASS_NAME,
       T.GO_TYPE,
       T.PROCESS_CODE_C,
       T.PROCESS_DESC_C,
       T.STATION_ROAD,
       T.CRAFT_NO_V,
       T.BUYER_NAME,
       T.FINAL_USER_DESC,
       T.ORDER_ADD_DESC
  FROM PLN_ORDER_ZG T
 WHERE NVL2('#TIME_BEGIN#', T.CREATE_TIME, SYSDATE) >=
       NVL2('#TIME_BEGIN#',
            TO_DATE('#TIME_BEGIN#', 'YYYY-MM-DD HH24:MI:SS'),
            SYSDATE)
   AND NVL2('#TIME_END#', T.CREATE_TIME, SYSDATE) <=
       NVL2('#TIME_END#',
            TO_DATE('#TIME_END#', 'YYYY-MM-DD HH24:MI:SS'),
            SYSDATE)
		]]>
	</query>
</queryMap>