ITPub博客

首页 > 数据库 > Oracle > 訂單尚未完全出貨,但order header的 workflow被puges後的恢复處理

訂單尚未完全出貨,但order header的 workflow被puges後的恢复處理

原创 Oracle 作者:longwansheng 时间:2006-11-29 17:24:09 0 删除 编辑
因為order header的 workflow被puges

在訂單單身中為picked 或 shipped
在shipping transaction為interfaced

[@more@]

/*
因為order header的 workflow被puges

在訂單單身中為picked 或 shipped
在shipping transaction為interfaced

補回來的SQL
以下587667字樣為訂單header_id
3140010656字樣為訂單號
在實際應用中要替換為真正的資料
TO_DATE('11/28/2006 14:17:08', 'MM/DD/YYYY HH24:MI:SS')為日期時間,依情況定
'ORG_ID', 3為公司id
*/

begin
Insert into WF_ITEMS
(item_type, item_key, root_activity, root_activity_version, owner_role, begin_date, user_key)
Values
('OEOH', '587667', 'R_STANDARD_HEADER', 32, 'KERLY.WANG', TO_DATE('11/28/2006 14:17:08', 'MM/DD/YYYY HH24:MI:SS'), 'Sales Order 3140010656');
COMMIT;
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, text_value, event_value)
Values
('OEOH', '587667', '#SCHEMA', 'APPS', null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, text_value, event_value)
Values
('OEOH', '587667', '.ADMIN_KEY', '85197700', null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, text_value, event_value)
Values
('OEOH', '587667', '.MONITOR_KEY', '3582172285', null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, number_value, event_value)
Values
('OEOH', '587667', 'APPLICATION_ID', 660, null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, event_value)
Values
('OEOH', '587667', 'GOBO_OM_EMAIL_BODY', null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, event_value)
Values
('OEOH', '587667', 'GOBO_OM_EMAIL_HEADER', null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, event_value)
Values
('OEOH', '587667', 'GOBO_OM_RECIPIENT', null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, text_value, event_value)
Values
('OEOH', '587667', 'HDR_SHORT_DESCRIPTOR', 'plsql:OE_ORDER_WF_UTIL.Set_Header_Descriptor/'||chr(38)||'#NID', null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, event_value)
Values
('OEOH', '587667', 'MESSAGE_TYPE', null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, event_value)
Values
('OEOH', '587667', 'NOTIFICATION_APPROVER', null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, text_value, event_value)
Values
('OEOH', '587667', 'NOTIFICATION_FROM_ROLE', 'KERLY.WANG', null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, text_value, event_value)
Values
('OEOH', '587667', 'ORDER_CATEGORY', 'MIXED', null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, text_value, event_value)
Values
('OEOH', '587667', 'ORDER_DETAILS_URL',

'http://p650.globeunion.com:8000/OA_HTML/OA.jsp?akRegionCode=ORDER_DETAILS_PAGE'||chr(38)||'akRegionApplicationId=660'||chr(38)||'HeaderId=587667', null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, number_value, event_value)
Values
('OEOH', '587667', 'ORDER_NUMBER', 3140010656, null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, number_value, event_value)
Values
('OEOH', '587667', 'ORG_ID', 2, null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, event_value)
Values
('OEOH', '587667', 'PURCHASE_ORDER', null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, number_value, event_value)
Values
('OEOH', '587667', 'RESPONSIBILITY_ID', 50158, null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, event_value)
Values
('OEOH', '587667', 'SITE_USE_CODE', null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, event_value)
Values
('OEOH', '587667', 'USAGE_CODE', null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, number_value, event_value)
Values
('OEOH', '587667', 'USER_ID', 7707, null);
Insert into WF_ITEM_ATTRIBUTE_VALUES
(item_type, item_key, name, text_value, event_value)
Values
('OEOH', '587667', 'WF_ADMINISTRATOR', 'SYSADMIN', null);
COMMIT;
Insert into WF_ITEM_ACTIVITY_STATUSES
(item_type, item_key, process_activity, activity_status, activity_result_code, begin_date, execution_time)
Values
('OEOH', '587667', 13825, 'ACTIVE', '#NULL', TO_DATE('11/28/2006 14:17:09', 'MM/DD/YYYY HH24:MI:SS'), 1);
Insert into WF_ITEM_ACTIVITY_STATUSES
(item_type, item_key, process_activity, activity_status, activity_result_code, begin_date, end_date, execution_time)
Values
('OEOH', '587667', 134506, 'COMPLETE', '#NULL', TO_DATE('11/28/2006 14:59:51', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('11/28/2006 14:59:53', 'MM/DD/YYYY HH24:MI:SS'),

16);
Insert into WF_ITEM_ACTIVITY_STATUSES
(item_type, item_key, process_activity, activity_status, begin_date, end_date, execution_time)
Values
('OEOH', '587667', 134508, 'COMPLETE', TO_DATE('11/28/2006 14:17:09', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('11/28/2006 14:59:50', 'MM/DD/YYYY HH24:MI:SS'), 7);
Insert into WF_ITEM_ACTIVITY_STATUSES
(item_type, item_key, process_activity, activity_status, activity_result_code, begin_date, end_date, execution_time)
Values
('OEOH', '587667', 134510, 'COMPLETE', 'COMPLETE', TO_DATE('11/28/2006 14:59:50', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('11/28/2006 14:59:51', 'MM/DD/YYYY

HH24:MI:SS'), 14);
Insert into WF_ITEM_ACTIVITY_STATUSES
(item_type, item_key, process_activity, activity_status, activity_result_code, begin_date, end_date, execution_time)
Values
('OEOH', '587667', 134512, 'COMPLETE', '#NULL', TO_DATE('11/28/2006 14:17:09', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('11/28/2006 14:17:09', 'MM/DD/YYYY HH24:MI:SS'),

5);
Insert into WF_ITEM_ACTIVITY_STATUSES
(item_type, item_key, process_activity, activity_status, activity_result_code, begin_date, execution_time, outbound_queue_id)
Values
('OEOH', '587667', 134540, 'DEFERRED', '#NULL', TO_DATE('11/30/2006 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 41, '2349130043C6814CE0430A0A02EF814C');
Insert into WF_ITEM_ACTIVITY_STATUSES
(item_type, item_key, process_activity, activity_status, activity_result_code, begin_date, end_date, execution_time)
Values
('OEOH', '587667', 134629, 'COMPLETE', 'COMPLETE', TO_DATE('11/28/2006 14:17:09', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('11/28/2006 14:59:53', 'MM/DD/YYYY

HH24:MI:SS'), 4);
Insert into WF_ITEM_ACTIVITY_STATUSES
(item_type, item_key, process_activity, activity_status, begin_date, execution_time)
Values
('OEOH', '587667', 134630, 'ACTIVE', TO_DATE('11/28/2006 14:59:53', 'MM/DD/YYYY HH24:MI:SS'), 40);
Insert into WF_ITEM_ACTIVITY_STATUSES
(item_type, item_key, process_activity, activity_status, activity_result_code, begin_date, end_date, execution_time)
Values
('OEOH', '587667', 134633, 'COMPLETE', '#NULL', TO_DATE('11/28/2006 14:17:09', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('11/28/2006 14:17:09', 'MM/DD/YYYY HH24:MI:SS'),

2);
COMMIT;
end;

/*
執行這段sql後,就去run: Interface Trip Stop - SRS
如選不到trip stop
則執行如下sql,其中trip_id為真實的id

UPDATE wsh_trip_stops
SET pending_interface_flag = 'Y'
--select pending_interface_flag from wsh_trip_stops
WHERE trip_id=583164
and exists (select 1 from wsh_new_deliveries wd, wsh_delivery_legs wdl
where wd.delivery_id = wdl.delivery_id
and wdl.PICK_UP_STOP_ID = stop_id)

*/

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/92289/viewspace-880613/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2007-12-12

  • 博文量
    162
  • 访问量
    740639