1085 14:29:15 SQL Execute: select to_char(sequence) sequence,to_char(line) line,to_char(position) position,text from user_errors where name=:object_name and type=:object_type 1086 14:29:15 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1087 14:29:15 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1088 14:29:15 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'N' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' and b.dropped='NO' 1089 14:29:15 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1090 14:29:15 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1091 14:29:15 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'Y' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_object_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1092 14:29:15 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1093 14:29:15 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1094 14:29:15 SQL Execute: select /*+ QCO9i QCOALL */ :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,'N' partitioned,'N' object_table,'Y' external_table,'N' nested,0 IOT_Type,'' IOT_Name,'N' temporary from sys.dba_objects a,sys.dba_external_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1095 14:29:15 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1096 14:29:15 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1097 14:29:15 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'N' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' and b.dropped='NO' 1098 14:29:15 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1099 14:29:15 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1100 14:29:15 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'Y' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_object_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1101 14:29:15 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1102 14:29:15 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1103 14:29:15 SQL Execute: select /*+ QCO9i QCOALL */ :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,'N' partitioned,'N' object_table,'Y' external_table,'N' nested,0 IOT_Type,'' IOT_Name,'N' temporary from sys.dba_objects a,sys.dba_external_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1104 14:29:15 SQL Execute: select object_id from public_dependency start with referenced_object_id=:obj_id connect by referenced_object_id=prior object_id 1105 14:29:15 SQL Execute: CREATE OR REPLACE TRIGGER TR_WZ_WZXX00_BFUPDDET BEFORE UPDATE OR DELETE ON WZ_WZXX00 REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW WHEN (OLD.SFYX00='Y' AND NEW.SFYX00='N') DECLARE V_KCS000 NUMBER(12,4); E_NoEdit EXCEPTION; BEGIN BEGIN SELECT SUM(NVL(KCZSL0,0)) INTO V_KCS000 FROM WZ_KC0000 WHERE WZID00=:NEW.WZID00; EXCEPTION WHEN OTHERS THEN V_KCS000:=0; END; IF V_KCS000>0 THEN RAISE E_NoEdit; END IF; EXCEPTION WHEN E_NoEdit THEN RAISE_APPLICATION_ERROR(-20006, '该仍有库存,不能作废!*'); WHEN OTHERS THEN RAISE_APPLICATION_ERROR(-20008, '修改记录时发生意外错误!*返回信息:'||SQLERRM); END; 1106 14:29:15 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1107 14:29:15 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1108 14:29:15 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(instr(b.trigger_type,'BEFORE'),0,decode(instr(b.trigger_type,'AFTER'),0,decode(b.trigger_type,'INSTEAD OF',2,3),1),0) ty1,decode(instr(b.trigger_type,'STATEMENT'),0,decode(instr(b.trigger_type,'EACH ROW'),0,decode(instr(b.trigger_type,'EVENT'),0,3,2),1),0) ty2,decode(instr(b.triggering_event,'INSERT'),0,'N','Y') ev_ins,decode(instr(b.triggering_event,'UPDATE'),0,'N','Y') ev_upd,decode(instr(b.triggering_event,'DELETE'),0,'N','Y') ev_del,decode(instr(b.triggering_event,'STARTUP'),0,'N','Y') ev_startup,decode(instr(b.triggering_event,'SHUTDOWN'),0,'N','Y') ev_shutdown,decode(instr(b.triggering_event,'ERROR'),0,'N','Y') ev_error,decode(instr(b.triggering_event,'LOGON'),0,'N','Y') ev_logon,decode(instr(b.triggering_event,'LOGOFF'),0,'N','Y') ev_logoff,decode(instr(b.triggering_event,'CREATE'),0,'N','Y') ev_create,decode(instr(b.triggering_event,'ALTER'),0,'N','Y') ev_alter,decode(instr(b.triggering_event,'DROP'),0,'N','Y') ev_drop,decode(instr(b.triggering_event,'ANALYZE'),0,'N','Y') ev_analyze,decode(instr(b.triggering_event,'COMMENT'),0,'N','Y') ev_comment,decode(instr(b.triggering_event,'GRANT'),0,'N','Y') ev_grant,decode(instr(b.triggering_event,'REVOKE'),0,'N','Y') ev_revoke,decode(instr(b.triggering_event,'TRUNCATE'),0,'N','Y') ev_truncate,decode(instr(b.triggering_event,'RENAME'),0,'N','Y') ev_rename,decode(instr(b.triggering_event,' ASSOCIATE'),0,decode(substr(b.triggering_event,1,9),'ASSOCIATE','Y','N'),'Y') ev_associate,decode(instr(b.triggering_event,' AUDIT'),0,decode(substr(b.triggering_event,1,5),'AUDIT','Y','N'),'Y') ev_audit,decode(instr(b.triggering_event,' DISASSOCIATE'),0,decode(substr(b.triggering_event,1,12),'DISASSOCIATE','Y','N'),'Y') ev_disassociate,decode(instr(b.triggering_event,' NOAUDIT'),0,decode(substr(b.triggering_event,1,7),'NOAUDIT','Y','N'),'Y') ev_noaudit,decode(instr(b.triggering_event,'DDL'),0,'N','Y') ev_ddl,decode(rtrim(b.base_object_type),'TABLE',0,'VIEW',1,'SCHEMA',2,'DATABASE',3,4) base_type,b.table_owner,b.table_name,decode(b.status,'ENABLED','Y','N') enabled from user_objects a,user_triggers b where b.trigger_name like :object_name and a.object_name=b.trigger_name and a.object_type='TRIGGER' and b.trigger_name not in (select object_name from user_recyclebin where object_name=b.trigger_name) 1109 14:29:15 SQL Execute: select to_char(sequence) sequence,to_char(line) line,to_char(position) position,text from user_errors where name=:object_name and type=:object_type 1110 14:29:16 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1111 14:29:16 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1112 14:29:16 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'N' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' and b.dropped='NO' 1113 14:29:16 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1114 14:29:16 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1115 14:29:16 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'Y' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_object_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1116 14:29:16 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1117 14:29:16 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1118 14:29:16 SQL Execute: select /*+ QCO9i QCOALL */ :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,'N' partitioned,'N' object_table,'Y' external_table,'N' nested,0 IOT_Type,'' IOT_Name,'N' temporary from sys.dba_objects a,sys.dba_external_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1119 14:29:16 SQL Execute: select object_id from public_dependency start with referenced_object_id=:obj_id connect by referenced_object_id=prior object_id 1120 14:29:16 SQL Execute: CREATE OR REPLACE TRIGGER TR_WZ_RCKMX0_BFINTUPDDET BEFORE INSERT OR UPDATE OR DELETE ON WZ_RCKMX0 FOR EACH ROW DECLARE V_ZTBZ00 WZ_RCK000.ZTBZ00%TYPE; E_NoEdit EXCEPTION; E_NoDelete EXCEPTION; -- MODIFICATION HISTORY -- Person Date Comments -- JETHUA 2003.03.03 在请领单明细修改时判断药库是否正在确认,避免同时进行所带来的错误 -- qks 2008.01.14 未接转的数据都可以修改! -- --------- ---------- ------------------------------------------- BEGIN IF INSERTING THEN SELECT ZTBZ00 INTO V_ZTBZ00 FROM WZ_RCK000 WHERE RCKID0=:NEW.RCKID0; --已经确认的数据被修改 IF (V_ZTBZ00='3' OR V_ZTBZ00='4' OR V_ZTBZ00='5') THEN RAISE E_NoEdit; END IF; ELSIF UPDATING THEN --IF :NEW.CRKSL0<>:OLD.CRKSL0 OR round(:NEW.ZJE000,2)<>round(:OLD.ZJE000,2) THEN IF :NEW.CRKSL0<>:OLD.CRKSL0 THEN SELECT ZTBZ00 INTO V_ZTBZ00 FROM WZ_RCK000 WHERE RCKID0=:NEW.RCKID0; --已经确认的数据被修改 --IF (V_ZTBZ00='3' OR V_ZTBZ00='4' OR V_ZTBZ00='5') THEN IF (V_ZTBZ00='4' OR V_ZTBZ00='5') THEN RAISE E_NoEdit; END IF; END IF; ELSIF DELETING THEN SELECT ZTBZ00 INTO V_ZTBZ00 FROM WZ_RCK000 WHERE RCKID0=:OLD.RCKID0; --已经确认的数据被删除 IF (V_ZTBZ00='3' OR V_ZTBZ00='4' OR V_ZTBZ00='5') THEN RAISE E_NoDelete; END IF; END IF; EXCEPTION WHEN E_NoEdit THEN RAISE_APPLICATION_ERROR(-20006, '该记录已经被审核,不能再修改!*'); WHEN E_NoDelete THEN RAISE_APPLICATION_ERROR(-20007, '该记录已经被确认,不能再删除!*'); WHEN OTHERS THEN RAISE_APPLICATION_ERROR(-20008, '修改记录时发生意外错误!*返回信息:'||SQLERRM); END; 1121 14:29:16 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1122 14:29:16 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1123 14:29:16 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(instr(b.trigger_type,'BEFORE'),0,decode(instr(b.trigger_type,'AFTER'),0,decode(b.trigger_type,'INSTEAD OF',2,3),1),0) ty1,decode(instr(b.trigger_type,'STATEMENT'),0,decode(instr(b.trigger_type,'EACH ROW'),0,decode(instr(b.trigger_type,'EVENT'),0,3,2),1),0) ty2,decode(instr(b.triggering_event,'INSERT'),0,'N','Y') ev_ins,decode(instr(b.triggering_event,'UPDATE'),0,'N','Y') ev_upd,decode(instr(b.triggering_event,'DELETE'),0,'N','Y') ev_del,decode(instr(b.triggering_event,'STARTUP'),0,'N','Y') ev_startup,decode(instr(b.triggering_event,'SHUTDOWN'),0,'N','Y') ev_shutdown,decode(instr(b.triggering_event,'ERROR'),0,'N','Y') ev_error,decode(instr(b.triggering_event,'LOGON'),0,'N','Y') ev_logon,decode(instr(b.triggering_event,'LOGOFF'),0,'N','Y') ev_logoff,decode(instr(b.triggering_event,'CREATE'),0,'N','Y') ev_create,decode(instr(b.triggering_event,'ALTER'),0,'N','Y') ev_alter,decode(instr(b.triggering_event,'DROP'),0,'N','Y') ev_drop,decode(instr(b.triggering_event,'ANALYZE'),0,'N','Y') ev_analyze,decode(instr(b.triggering_event,'COMMENT'),0,'N','Y') ev_comment,decode(instr(b.triggering_event,'GRANT'),0,'N','Y') ev_grant,decode(instr(b.triggering_event,'REVOKE'),0,'N','Y') ev_revoke,decode(instr(b.triggering_event,'TRUNCATE'),0,'N','Y') ev_truncate,decode(instr(b.triggering_event,'RENAME'),0,'N','Y') ev_rename,decode(instr(b.triggering_event,' ASSOCIATE'),0,decode(substr(b.triggering_event,1,9),'ASSOCIATE','Y','N'),'Y') ev_associate,decode(instr(b.triggering_event,' AUDIT'),0,decode(substr(b.triggering_event,1,5),'AUDIT','Y','N'),'Y') ev_audit,decode(instr(b.triggering_event,' DISASSOCIATE'),0,decode(substr(b.triggering_event,1,12),'DISASSOCIATE','Y','N'),'Y') ev_disassociate,decode(instr(b.triggering_event,' NOAUDIT'),0,decode(substr(b.triggering_event,1,7),'NOAUDIT','Y','N'),'Y') ev_noaudit,decode(instr(b.triggering_event,'DDL'),0,'N','Y') ev_ddl,decode(rtrim(b.base_object_type),'TABLE',0,'VIEW',1,'SCHEMA',2,'DATABASE',3,4) base_type,b.table_owner,b.table_name,decode(b.status,'ENABLED','Y','N') enabled from user_objects a,user_triggers b where b.trigger_name like :object_name and a.object_name=b.trigger_name and a.object_type='TRIGGER' and b.trigger_name not in (select object_name from user_recyclebin where object_name=b.trigger_name) 1124 14:29:16 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1125 14:29:16 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1126 14:29:16 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(instr(b.trigger_type,'BEFORE'),0,decode(instr(b.trigger_type,'AFTER'),0,decode(b.trigger_type,'INSTEAD OF',2,3),1),0) ty1,decode(instr(b.trigger_type,'STATEMENT'),0,decode(instr(b.trigger_type,'EACH ROW'),0,decode(instr(b.trigger_type,'EVENT'),0,3,2),1),0) ty2,decode(instr(b.triggering_event,'INSERT'),0,'N','Y') ev_ins,decode(instr(b.triggering_event,'UPDATE'),0,'N','Y') ev_upd,decode(instr(b.triggering_event,'DELETE'),0,'N','Y') ev_del,decode(instr(b.triggering_event,'STARTUP'),0,'N','Y') ev_startup,decode(instr(b.triggering_event,'SHUTDOWN'),0,'N','Y') ev_shutdown,decode(instr(b.triggering_event,'ERROR'),0,'N','Y') ev_error,decode(instr(b.triggering_event,'LOGON'),0,'N','Y') ev_logon,decode(instr(b.triggering_event,'LOGOFF'),0,'N','Y') ev_logoff,decode(instr(b.triggering_event,'CREATE'),0,'N','Y') ev_create,decode(instr(b.triggering_event,'ALTER'),0,'N','Y') ev_alter,decode(instr(b.triggering_event,'DROP'),0,'N','Y') ev_drop,decode(instr(b.triggering_event,'ANALYZE'),0,'N','Y') ev_analyze,decode(instr(b.triggering_event,'COMMENT'),0,'N','Y') ev_comment,decode(instr(b.triggering_event,'GRANT'),0,'N','Y') ev_grant,decode(instr(b.triggering_event,'REVOKE'),0,'N','Y') ev_revoke,decode(instr(b.triggering_event,'TRUNCATE'),0,'N','Y') ev_truncate,decode(instr(b.triggering_event,'RENAME'),0,'N','Y') ev_rename,decode(instr(b.triggering_event,' ASSOCIATE'),0,decode(substr(b.triggering_event,1,9),'ASSOCIATE','Y','N'),'Y') ev_associate,decode(instr(b.triggering_event,' AUDIT'),0,decode(substr(b.triggering_event,1,5),'AUDIT','Y','N'),'Y') ev_audit,decode(instr(b.triggering_event,' DISASSOCIATE'),0,decode(substr(b.triggering_event,1,12),'DISASSOCIATE','Y','N'),'Y') ev_disassociate,decode(instr(b.triggering_event,' NOAUDIT'),0,decode(substr(b.triggering_event,1,7),'NOAUDIT','Y','N'),'Y') ev_noaudit,decode(instr(b.triggering_event,'DDL'),0,'N','Y') ev_ddl,decode(rtrim(b.base_object_type),'TABLE',0,'VIEW',1,'SCHEMA',2,'DATABASE',3,4) base_type,b.table_owner,b.table_name,decode(b.status,'ENABLED','Y','N') enabled from user_objects a,user_triggers b where b.trigger_name like :object_name and a.object_name=b.trigger_name and a.object_type='TRIGGER' and b.trigger_name not in (select object_name from user_recyclebin where object_name=b.trigger_name) 1127 14:29:16 SQL Execute: select to_char(sequence) sequence,to_char(line) line,to_char(position) position,text from user_errors where name=:object_name and type=:object_type 1128 14:29:16 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1129 14:29:16 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1130 14:29:16 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'N' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' and b.dropped='NO' 1131 14:29:16 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1132 14:29:16 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1133 14:29:16 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'Y' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_object_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1134 14:29:16 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1135 14:29:16 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1136 14:29:16 SQL Execute: select /*+ QCO9i QCOALL */ :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,'N' partitioned,'N' object_table,'Y' external_table,'N' nested,0 IOT_Type,'' IOT_Name,'N' temporary from sys.dba_objects a,sys.dba_external_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1137 14:29:16 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1138 14:29:16 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1139 14:29:16 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'N' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' and b.dropped='NO' 1140 14:29:16 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1141 14:29:16 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1142 14:29:16 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'Y' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_object_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1143 14:29:16 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1144 14:29:16 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1145 14:29:16 SQL Execute: select /*+ QCO9i QCOALL */ :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,'N' partitioned,'N' object_table,'Y' external_table,'N' nested,0 IOT_Type,'' IOT_Name,'N' temporary from sys.dba_objects a,sys.dba_external_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1146 14:29:16 SQL Execute: select object_id from public_dependency start with referenced_object_id=:obj_id connect by referenced_object_id=prior object_id 1147 14:29:16 SQL Execute: CREATE OR REPLACE TRIGGER TR_WZ_WZXX00_INSUPD Before INSERT OR UPDATE ON WZ_WZXX00 FOR EACH ROW WHEN (NEW.SXDM00='2') DECLARE V_BH0000 BM_YYSFXM.BH0000%type;--类别编号 V_BH0001 BM_YYSFXM.BH0000%type;--明细编号 V_SFXMID BM_YYSFXM.SFXMID%type; V_XH0000 BM_YYSFXM.XH0000%type; V_YYID00 XT_YYXX00.YYID00%type; --2007-09-03 qks 增加条件rownum=1 --2009-10-20 chenyw 老年医院不用了,把条件设成别的 BEGIN select YYID00 into V_YYID00 from XT_YYXX00 where rownum=1; --IF V_YYID00='220035' then ----省老年医院专用 IF V_YYID00='99999999' then ---省老年医院要求停掉 IF INSERTING THEN BEGIN select d.bh0000 into V_BH0000 from BM_WZDM00 B,VW_WZ_YJEJID C,BM_YYSFXM D where TRIM(b.WZLBID)=C.YJEJID and TRIM(C.EJFLMC)=D.XMMC00 and d.bmgzid=1 and d.FLAG00='0' and length(rtrim(d.BH0000))=6 and b.wzdmid=:NEW.wzdmid; EXCEPTION WHEN OTHERS THEN V_BH0000:=''; END; IF V_BH0000 is NULL THEN select decode(max(bh0000),NULL,'601010000001',max(bh0000)+1) into V_BH0001 from bm_yysfxm where BMGZID=1 and length(rtrim(bh0000))=12 and bh0000 like '601%'; ELSE select decode(max(bh0000),NULL,V_BH0000||'000001',max(bh0000)+1) into V_BH0001 from bm_yysfxm where BMGZID=1 and length(rtrim(bh0000))=12 and bh0000 like V_BH0000||'%'; END IF; select sq_bm_yysfxm_sfxmid.NEXTVAL INTO V_SFXMID FROM DUAL; select max(xh0000)+1 into V_XH0000 from bm_yysfxm Where bmgzid=1 and xh0000<9000000000; INSERT INTO bm_YYSFXM(sfxmid,bmgzid,xh0000,bh0000,flag00,pysm00, wbsm00,xmmc00,gg0000,BZ0000,dw0000,sfje00,fdbl00,sfxx00,mzfpid, zyfpid,hsxmid,baxmid,gjbm00,jsxm00) select V_SFXMID,1,V_XH0000,V_BH0001,'1',pysm00, wbsm00,WZMC00,:new.WZGG00,:new.WZXH00,:new.JLDW00, decode(:new.CKDJ00,0,NULL,:new.CKDJ00),1,0,21, 21,21,13,decode(V_BH0000,'',V_BH0001,V_BH0000),'2' from BM_WZDM00 where wzdmid=:NEW.wzdmid; :NEW.SFXMID:=V_SFXMID; ELSIF UPDATING THEN IF (:OLD.SFXMID IS NOT NULL) and ((:NEW.WZGG00<>:OLD.WZGG00) or (:NEW.WZXH00<>:OLD.WZXH00) or (:NEW.JLDW00<>:OLD.JLDW00)) then update bm_yysfxm set gg0000=:NEW.WZGG00,BZ0000=:NEW.WZXH00,dw0000=:NEW.JLDW00 where sfxmid=:OLD.SFXMID; end if; end if; end if; EXCEPTION WHEN OTHERS THEN RAISE_APPLICATION_ERROR(-20008, '插入记录时发生意外错误!*返回信息:'||SQLERRM); END; 1148 14:29:16 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1149 14:29:16 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1150 14:29:16 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(instr(b.trigger_type,'BEFORE'),0,decode(instr(b.trigger_type,'AFTER'),0,decode(b.trigger_type,'INSTEAD OF',2,3),1),0) ty1,decode(instr(b.trigger_type,'STATEMENT'),0,decode(instr(b.trigger_type,'EACH ROW'),0,decode(instr(b.trigger_type,'EVENT'),0,3,2),1),0) ty2,decode(instr(b.triggering_event,'INSERT'),0,'N','Y') ev_ins,decode(instr(b.triggering_event,'UPDATE'),0,'N','Y') ev_upd,decode(instr(b.triggering_event,'DELETE'),0,'N','Y') ev_del,decode(instr(b.triggering_event,'STARTUP'),0,'N','Y') ev_startup,decode(instr(b.triggering_event,'SHUTDOWN'),0,'N','Y') ev_shutdown,decode(instr(b.triggering_event,'ERROR'),0,'N','Y') ev_error,decode(instr(b.triggering_event,'LOGON'),0,'N','Y') ev_logon,decode(instr(b.triggering_event,'LOGOFF'),0,'N','Y') ev_logoff,decode(instr(b.triggering_event,'CREATE'),0,'N','Y') ev_create,decode(instr(b.triggering_event,'ALTER'),0,'N','Y') ev_alter,decode(instr(b.triggering_event,'DROP'),0,'N','Y') ev_drop,decode(instr(b.triggering_event,'ANALYZE'),0,'N','Y') ev_analyze,decode(instr(b.triggering_event,'COMMENT'),0,'N','Y') ev_comment,decode(instr(b.triggering_event,'GRANT'),0,'N','Y') ev_grant,decode(instr(b.triggering_event,'REVOKE'),0,'N','Y') ev_revoke,decode(instr(b.triggering_event,'TRUNCATE'),0,'N','Y') ev_truncate,decode(instr(b.triggering_event,'RENAME'),0,'N','Y') ev_rename,decode(instr(b.triggering_event,' ASSOCIATE'),0,decode(substr(b.triggering_event,1,9),'ASSOCIATE','Y','N'),'Y') ev_associate,decode(instr(b.triggering_event,' AUDIT'),0,decode(substr(b.triggering_event,1,5),'AUDIT','Y','N'),'Y') ev_audit,decode(instr(b.triggering_event,' DISASSOCIATE'),0,decode(substr(b.triggering_event,1,12),'DISASSOCIATE','Y','N'),'Y') ev_disassociate,decode(instr(b.triggering_event,' NOAUDIT'),0,decode(substr(b.triggering_event,1,7),'NOAUDIT','Y','N'),'Y') ev_noaudit,decode(instr(b.triggering_event,'DDL'),0,'N','Y') ev_ddl,decode(rtrim(b.base_object_type),'TABLE',0,'VIEW',1,'SCHEMA',2,'DATABASE',3,4) base_type,b.table_owner,b.table_name,decode(b.status,'ENABLED','Y','N') enabled from user_objects a,user_triggers b where b.trigger_name like :object_name and a.object_name=b.trigger_name and a.object_type='TRIGGER' and b.trigger_name not in (select object_name from user_recyclebin where object_name=b.trigger_name) 1151 14:29:16 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1152 14:29:16 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1153 14:29:16 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(instr(b.trigger_type,'BEFORE'),0,decode(instr(b.trigger_type,'AFTER'),0,decode(b.trigger_type,'INSTEAD OF',2,3),1),0) ty1,decode(instr(b.trigger_type,'STATEMENT'),0,decode(instr(b.trigger_type,'EACH ROW'),0,decode(instr(b.trigger_type,'EVENT'),0,3,2),1),0) ty2,decode(instr(b.triggering_event,'INSERT'),0,'N','Y') ev_ins,decode(instr(b.triggering_event,'UPDATE'),0,'N','Y') ev_upd,decode(instr(b.triggering_event,'DELETE'),0,'N','Y') ev_del,decode(instr(b.triggering_event,'STARTUP'),0,'N','Y') ev_startup,decode(instr(b.triggering_event,'SHUTDOWN'),0,'N','Y') ev_shutdown,decode(instr(b.triggering_event,'ERROR'),0,'N','Y') ev_error,decode(instr(b.triggering_event,'LOGON'),0,'N','Y') ev_logon,decode(instr(b.triggering_event,'LOGOFF'),0,'N','Y') ev_logoff,decode(instr(b.triggering_event,'CREATE'),0,'N','Y') ev_create,decode(instr(b.triggering_event,'ALTER'),0,'N','Y') ev_alter,decode(instr(b.triggering_event,'DROP'),0,'N','Y') ev_drop,decode(instr(b.triggering_event,'ANALYZE'),0,'N','Y') ev_analyze,decode(instr(b.triggering_event,'COMMENT'),0,'N','Y') ev_comment,decode(instr(b.triggering_event,'GRANT'),0,'N','Y') ev_grant,decode(instr(b.triggering_event,'REVOKE'),0,'N','Y') ev_revoke,decode(instr(b.triggering_event,'TRUNCATE'),0,'N','Y') ev_truncate,decode(instr(b.triggering_event,'RENAME'),0,'N','Y') ev_rename,decode(instr(b.triggering_event,' ASSOCIATE'),0,decode(substr(b.triggering_event,1,9),'ASSOCIATE','Y','N'),'Y') ev_associate,decode(instr(b.triggering_event,' AUDIT'),0,decode(substr(b.triggering_event,1,5),'AUDIT','Y','N'),'Y') ev_audit,decode(instr(b.triggering_event,' DISASSOCIATE'),0,decode(substr(b.triggering_event,1,12),'DISASSOCIATE','Y','N'),'Y') ev_disassociate,decode(instr(b.triggering_event,' NOAUDIT'),0,decode(substr(b.triggering_event,1,7),'NOAUDIT','Y','N'),'Y') ev_noaudit,decode(instr(b.triggering_event,'DDL'),0,'N','Y') ev_ddl,decode(rtrim(b.base_object_type),'TABLE',0,'VIEW',1,'SCHEMA',2,'DATABASE',3,4) base_type,b.table_owner,b.table_name,decode(b.status,'ENABLED','Y','N') enabled from user_objects a,user_triggers b where b.trigger_name like :object_name and a.object_name=b.trigger_name and a.object_type='TRIGGER' and b.trigger_name not in (select object_name from user_recyclebin where object_name=b.trigger_name) 1154 14:29:16 SQL Execute: select to_char(sequence) sequence,to_char(line) line,to_char(position) position,text from user_errors where name=:object_name and type=:object_type 1155 14:29:16 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1156 14:29:16 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1157 14:29:16 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'N' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' and b.dropped='NO' 1158 14:29:16 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1159 14:29:16 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1160 14:29:16 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'Y' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_object_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1161 14:29:16 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1162 14:29:16 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1163 14:29:16 SQL Execute: select /*+ QCO9i QCOALL */ :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,'N' partitioned,'N' object_table,'Y' external_table,'N' nested,0 IOT_Type,'' IOT_Name,'N' temporary from sys.dba_objects a,sys.dba_external_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1164 14:29:16 SQL Execute: select object_id from public_dependency start with referenced_object_id=:obj_id connect by referenced_object_id=prior object_id 1165 14:29:17 SQL Execute: CREATE OR REPLACE TRIGGER TR_BM_WZDM00_UPDATE Before UPDATE ON BM_WZDM00 FOR EACH ROW WHEN (OLD.WZSX00='2' and OLD.WZMC00<>new.WZMC00) DECLARE V_SFXMID BM_YYSFXM.SFXMID%type; V_YYID00 XT_YYXX00.YYID00%type; --2007-09-03 qks 增加省老年医院专用 --2009-10-20 chenyw 老年医院不用了,把条件设成别的 BEGIN select YYID00 into V_YYID00 from XT_YYXX00 where rownum=1; --IF V_YYID00='220035' then ----省老年医院专用 IF V_YYID00='999999' then ----省老年医院要求停掉 BEGIN select SFXMID into V_SFXMID from WZ_WZXX00 WHERE WZDMID=:OLD.WZDMID; EXCEPTION WHEN OTHERS THEN V_SFXMID:=''; END; IF V_SFXMID is not null THEN update bm_yysfxm set xmmc00=:NEW.WZMC00 where sfxmid=V_SFXMID; END IF; END IF; EXCEPTION WHEN OTHERS THEN RAISE_APPLICATION_ERROR(-20008, '修改物资名称时发生意外错误!*返回信息:'||SQLERRM); END; 1166 14:29:17 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1167 14:29:17 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1168 14:29:17 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(instr(b.trigger_type,'BEFORE'),0,decode(instr(b.trigger_type,'AFTER'),0,decode(b.trigger_type,'INSTEAD OF',2,3),1),0) ty1,decode(instr(b.trigger_type,'STATEMENT'),0,decode(instr(b.trigger_type,'EACH ROW'),0,decode(instr(b.trigger_type,'EVENT'),0,3,2),1),0) ty2,decode(instr(b.triggering_event,'INSERT'),0,'N','Y') ev_ins,decode(instr(b.triggering_event,'UPDATE'),0,'N','Y') ev_upd,decode(instr(b.triggering_event,'DELETE'),0,'N','Y') ev_del,decode(instr(b.triggering_event,'STARTUP'),0,'N','Y') ev_startup,decode(instr(b.triggering_event,'SHUTDOWN'),0,'N','Y') ev_shutdown,decode(instr(b.triggering_event,'ERROR'),0,'N','Y') ev_error,decode(instr(b.triggering_event,'LOGON'),0,'N','Y') ev_logon,decode(instr(b.triggering_event,'LOGOFF'),0,'N','Y') ev_logoff,decode(instr(b.triggering_event,'CREATE'),0,'N','Y') ev_create,decode(instr(b.triggering_event,'ALTER'),0,'N','Y') ev_alter,decode(instr(b.triggering_event,'DROP'),0,'N','Y') ev_drop,decode(instr(b.triggering_event,'ANALYZE'),0,'N','Y') ev_analyze,decode(instr(b.triggering_event,'COMMENT'),0,'N','Y') ev_comment,decode(instr(b.triggering_event,'GRANT'),0,'N','Y') ev_grant,decode(instr(b.triggering_event,'REVOKE'),0,'N','Y') ev_revoke,decode(instr(b.triggering_event,'TRUNCATE'),0,'N','Y') ev_truncate,decode(instr(b.triggering_event,'RENAME'),0,'N','Y') ev_rename,decode(instr(b.triggering_event,' ASSOCIATE'),0,decode(substr(b.triggering_event,1,9),'ASSOCIATE','Y','N'),'Y') ev_associate,decode(instr(b.triggering_event,' AUDIT'),0,decode(substr(b.triggering_event,1,5),'AUDIT','Y','N'),'Y') ev_audit,decode(instr(b.triggering_event,' DISASSOCIATE'),0,decode(substr(b.triggering_event,1,12),'DISASSOCIATE','Y','N'),'Y') ev_disassociate,decode(instr(b.triggering_event,' NOAUDIT'),0,decode(substr(b.triggering_event,1,7),'NOAUDIT','Y','N'),'Y') ev_noaudit,decode(instr(b.triggering_event,'DDL'),0,'N','Y') ev_ddl,decode(rtrim(b.base_object_type),'TABLE',0,'VIEW',1,'SCHEMA',2,'DATABASE',3,4) base_type,b.table_owner,b.table_name,decode(b.status,'ENABLED','Y','N') enabled from user_objects a,user_triggers b where b.trigger_name like :object_name and a.object_name=b.trigger_name and a.object_type='TRIGGER' and b.trigger_name not in (select object_name from user_recyclebin where object_name=b.trigger_name) 1169 14:29:17 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1170 14:29:17 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1171 14:29:17 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(instr(b.trigger_type,'BEFORE'),0,decode(instr(b.trigger_type,'AFTER'),0,decode(b.trigger_type,'INSTEAD OF',2,3),1),0) ty1,decode(instr(b.trigger_type,'STATEMENT'),0,decode(instr(b.trigger_type,'EACH ROW'),0,decode(instr(b.trigger_type,'EVENT'),0,3,2),1),0) ty2,decode(instr(b.triggering_event,'INSERT'),0,'N','Y') ev_ins,decode(instr(b.triggering_event,'UPDATE'),0,'N','Y') ev_upd,decode(instr(b.triggering_event,'DELETE'),0,'N','Y') ev_del,decode(instr(b.triggering_event,'STARTUP'),0,'N','Y') ev_startup,decode(instr(b.triggering_event,'SHUTDOWN'),0,'N','Y') ev_shutdown,decode(instr(b.triggering_event,'ERROR'),0,'N','Y') ev_error,decode(instr(b.triggering_event,'LOGON'),0,'N','Y') ev_logon,decode(instr(b.triggering_event,'LOGOFF'),0,'N','Y') ev_logoff,decode(instr(b.triggering_event,'CREATE'),0,'N','Y') ev_create,decode(instr(b.triggering_event,'ALTER'),0,'N','Y') ev_alter,decode(instr(b.triggering_event,'DROP'),0,'N','Y') ev_drop,decode(instr(b.triggering_event,'ANALYZE'),0,'N','Y') ev_analyze,decode(instr(b.triggering_event,'COMMENT'),0,'N','Y') ev_comment,decode(instr(b.triggering_event,'GRANT'),0,'N','Y') ev_grant,decode(instr(b.triggering_event,'REVOKE'),0,'N','Y') ev_revoke,decode(instr(b.triggering_event,'TRUNCATE'),0,'N','Y') ev_truncate,decode(instr(b.triggering_event,'RENAME'),0,'N','Y') ev_rename,decode(instr(b.triggering_event,' ASSOCIATE'),0,decode(substr(b.triggering_event,1,9),'ASSOCIATE','Y','N'),'Y') ev_associate,decode(instr(b.triggering_event,' AUDIT'),0,decode(substr(b.triggering_event,1,5),'AUDIT','Y','N'),'Y') ev_audit,decode(instr(b.triggering_event,' DISASSOCIATE'),0,decode(substr(b.triggering_event,1,12),'DISASSOCIATE','Y','N'),'Y') ev_disassociate,decode(instr(b.triggering_event,' NOAUDIT'),0,decode(substr(b.triggering_event,1,7),'NOAUDIT','Y','N'),'Y') ev_noaudit,decode(instr(b.triggering_event,'DDL'),0,'N','Y') ev_ddl,decode(rtrim(b.base_object_type),'TABLE',0,'VIEW',1,'SCHEMA',2,'DATABASE',3,4) base_type,b.table_owner,b.table_name,decode(b.status,'ENABLED','Y','N') enabled from user_objects a,user_triggers b where b.trigger_name like :object_name and a.object_name=b.trigger_name and a.object_type='TRIGGER' and b.trigger_name not in (select object_name from user_recyclebin where object_name=b.trigger_name) 1172 14:29:17 SQL Execute: select to_char(sequence) sequence,to_char(line) line,to_char(position) position,text from user_errors where name=:object_name and type=:object_type 1173 14:29:17 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1174 14:29:17 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1175 14:29:17 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'N' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from user_objects a,user_tables b where b.table_name like :object_name and a.object_name=b.table_name and a.object_type='TABLE' and b.dropped='NO' 1176 14:29:17 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1177 14:29:17 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1178 14:29:17 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'Y' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from user_objects a,user_object_tables b where b.table_name like :object_name and a.object_name=b.table_name and a.object_type='TABLE' 1179 14:29:17 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1180 14:29:17 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1181 14:29:17 SQL Execute: select /*+ QCO9i QCOALL */ USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,'N' partitioned,'N' object_table,'Y' external_table,'N' nested,0 IOT_Type,'' IOT_Name,'N' temporary from user_objects a,user_external_tables b where b.table_name like :object_name and a.object_name=b.table_name and a.object_type='TABLE' 1182 14:29:17 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1183 14:29:17 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1184 14:29:17 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'N' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from user_objects a,user_tables b where b.table_name like :object_name and a.object_name=b.table_name and a.object_type='TABLE' and b.dropped='NO' 1185 14:29:17 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1186 14:29:17 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1187 14:29:17 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'Y' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from user_objects a,user_object_tables b where b.table_name like :object_name and a.object_name=b.table_name and a.object_type='TABLE' 1188 14:29:17 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1189 14:29:17 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1190 14:29:17 SQL Execute: select /*+ QCO9i QCOALL */ USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,'N' partitioned,'N' object_table,'Y' external_table,'N' nested,0 IOT_Type,'' IOT_Name,'N' temporary from user_objects a,user_external_tables b where b.table_name like :object_name and a.object_name=b.table_name and a.object_type='TABLE' 1191 14:29:17 SQL Execute: select object_id from public_dependency start with referenced_object_id=:obj_id connect by referenced_object_id=prior object_id 1192 14:29:17 SQL Execute: CREATE OR REPLACE TRIGGER tr_wz_ksrcmx_bint BEFORE INSERT ON wz_ksrcmx REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW declare ErrStr varchar2(200); ecustom exception; ECUSTOM_01 exception; ecustom_KSCCBZ exception; vKCIDQY WZ_QYKC00.KCID00%TYPE; --库存ID vKCID00 WZ_KSKC00.KCID00%TYPE; --科室库存ID vJCS000 WZ_KSKC00.KCZSL0%TYPE; --库存数 vYYJCS0 WZ_KSKC00.YYZSL0%TYPE; --已用库存数 vJCSZ00 WZ_QYKC00.KCZSL0%TYPE; --总表库存数 vYYJCSZ WZ_QYKC00.YYZSL0%TYPE; --总表已用库存数 vTJKYS0 WZ_QYKC00.YYZSL0%TYPE; --总表调价可用数 -- Person Date Comments -- qks 2008-01-11 Create -- qks 2008-06-19 新增字段WZ_QYKC00.TJZSL0: 调价总数量(要将价格低的物资已用总数量加到价格高的) -- qks 2008-09-27 条件中增加CKPFJ0判断 -- chenyw 2009-10-20 退库,冲销功能 -- qks 2009-10-20 :NEW.KCID00=-1,实际属于出库类型:库存不足或不存在情况,写入科室库存表时,数量和金额改用负数表示,全院库存暂时不用 --WZ_QYKC00表目前停用 -- qks 2009-11-04 当:NEW.KCID00=-1,库存不存在时,由原来写入WZ_KSKC00.KCZSL0改为WZ_KSKC00.YYZSL0 -- chenyw 2009-11-24 增加自由字段 XZZD01,XZZD02,XZZD03,XZZD04的限制 Begin vTJKYS0:=0; IF INSERTING THEN IF (:NEW.RCKLB0='2') and (:NEW.KCID00<>-1 or :NEW.KCID00 is null) THEN --出库 ERRSTR:='出库MZZYBZ='||:NEW.MZZYBZ||',KSBMBH='||to_char( :NEW.KSBMBH )||',WZID00='||to_char( :NEW.WZID00 )||',PH0000='||:NEW.PH0000; if (:new.rcklx0='3') or (:new.rcklx0='4') then select nvl(max(kcid00),0) into vKCID00 from WZ_KSKC00 where KSBMBH=:new.KSBMBH and wzid00=:new.wzid00 and trim(PH0000)||'PH'=trim(:NEW.PH0000)||'PH' and trim(XZZD01)||'XZ'=trim(:NEW.XZZD01)||'XZ' and trim(XZZD02)||'XZ'=trim(:NEW.XZZD02)||'XZ' and trim(XZZD03)||'XZ'=trim(:NEW.XZZD03)||'XZ' and trim(XZZD04)||'XZ'=trim(:NEW.XZZD04)||'XZ' and CKPFJ0=:new.CKPFJ0 and rownum=1; select KCZSL0,YYZSL0,KCID00 into vJCS000,vYYJCS0,vKCID00 from WZ_KSKC00 where KCID00=vKCID00; else select KCZSL0,YYZSL0,KCID00 into vJCS000,vYYJCS0,vKCID00 from WZ_KSKC00 where KCID00=:NEW.KCID00; end if; if :new.rcklx0='1' or :new.rcklx0='2' then update WZ_KSKC00 set YYZSL0=YYZSL0+:NEW.CRKSL0,KCZJE0=KCZJE0-round(:NEW.CRKSL0 * :NEW.CKPFJ0,2),KCLSJE=KCLSJE-round(:NEW.CRKSL0 * :NEW.CKLSJ0,2) where kcid00=:NEW.KCID00 ; --:NEW.KCIDQY :=vKCIDQY; :NEW.JCS000 :=vJCS000; :NEW.YYJCS0 :=vYYJCS0+:NEW.CRKSL0 ; --:NEW.JCSZ00 :=vJCSZ00; --:NEW.YYJCSZ :=vYYJCSZ+:NEW.CRKSL0 ; else if (vJCS000-vYYJCS0-:new.crksl0<0) and ((:new.rcklx0='3') or (:new.rcklx0='4')) then raise ecustom_KSCCBZ; end if; update WZ_KSKC00 set KCZSL0=KCZSL0-:NEW.CRKSL0,KCZJE0=KCZJE0-round(:NEW.CRKSL0 * :NEW.CKPFJ0,2),KCLSJE=KCLSJE-round(:NEW.CRKSL0 * :NEW.CKLSJ0,2) where kcid00=vKCID00; --:NEW.KCIDQY :=vKCIDQY; :NEW.JCS000 :=vJCS000-:NEW.CRKSL0; :NEW.YYJCS0 :=vYYJCS0 ; --:NEW.JCSZ00 :=vJCSZ00-:NEW.CRKSL0; --:NEW.YYJCSZ :=vYYJCSZ ; :NEW.KCID00 :=vKCID00; end if; ELSIF ((:NEW.RCKLB0='1') or (:NEW.KCID00=-1))then --入库 ERRSTR:='入库MZZYBZ='||:NEW.MZZYBZ||',KSBMBH='||to_char( :NEW.KSBMBH )||',WZID00='||to_char( :NEW.WZID00 )||',PH0000='||:NEW.PH0000; if :NEW.KCID00<>-1 or :NEW.KCID00 is null then :NEW.KCID00 := 1; end if; select nvl(min(kcid00),0) into vKCID00 from WZ_KSKC00 where KSBMBH=:new.KSBMBH and wzid00=:new.wzid00 and trim(PH0000)||'PH'=trim(:NEW.PH0000)||'PH' and trim(XZZD01)||'XZ'=trim(:NEW.XZZD01)||'XZ' and trim(XZZD02)||'XZ'=trim(:NEW.XZZD02)||'XZ' and trim(XZZD03)||'XZ'=trim(:NEW.XZZD03)||'XZ' and trim(XZZD04)||'XZ'=trim(:NEW.XZZD04)||'XZ' --and CKPFJ0=:new.CKPFJ0 and (CKPFJ0=:new.CKPFJ0 and :NEW.KCID00<>-1 or CKLSJ0=:new.CKLSJ0 and :NEW.KCID00=-1) and rownum=1; if vKCID00>0 then --科室库存存在情况下,全院库存也一定存在 select KCZSL0,YYZSL0 into vJCS000,vYYJCS0 from WZ_KSKC00 where KCID00=vKCID00; if (vJCS000-vYYJCS0+:new.crksl0<0) and ((:new.rcklx0='3') or (:new.rcklx0='4')) then raise ecustom_KSCCBZ; end if; if :NEW.KCID00=-1 then --属于出库,YYZSL0要减少,KCZSL0保存不变 update WZ_KSKC00 set YYZSL0=YYZSL0-sign(:NEW.KCID00)*:NEW.CRKSL0,KCZJE0=KCZJE0+round(sign(:NEW.KCID00)*:NEW.CRKSL0*:NEW.CKPFJ0,2), KCLSJE=KCLSJE+round(sign(:NEW.KCID00)*:NEW.CRKSL0*:NEW.CKLSJ0,2) where kcid00=vKCID00; :NEW.JCS000 :=vJCS000; :NEW.YYJCS0 :=vYYJCS0-sign(:NEW.KCID00)*:NEW.CRKSL0; else update WZ_KSKC00 set KCZSL0=KCZSL0+sign(:NEW.KCID00)*:NEW.CRKSL0,KCZJE0=KCZJE0+round(sign(:NEW.KCID00)*:NEW.CRKSL0*:NEW.CKPFJ0,2), KCLSJE=KCLSJE+round(sign(:NEW.KCID00)*:NEW.CRKSL0*:NEW.CKLSJ0,2) where kcid00=vKCID00; :NEW.JCS000 :=vJCS000+sign(:NEW.KCID00)*:NEW.CRKSL0; :NEW.YYJCS0 :=vYYJCS0 ; end if; :NEW.KCID00 :=vKCID00; --:NEW.KCIDQY :=vKCIDQY; --:NEW.JCSZ00 :=vJCSZ00+sign(:NEW.KCID00)*:NEW.CRKSL0; --:NEW.YYJCSZ :=vYYJCSZ ; else --科室库存不存在 if (:new.rcklx0='3') or (:new.rcklx0='4') then raise ecustom_KSCCBZ; end if; select SQ_WZ_KSKC00_KCID00.nextval into vKCID00 from dual; insert into WZ_KSKC00 ( KCID00 , --库存ID--> SQ_WZ_KSKC00_KCID00 KSBMBH , --科室部门编码 WZDMID , --消耗品内码 WZID00 , --基本信息ID WZMC00 , --规范名称 WZSXMC , --属性名称 CJID00 , --厂家流水号 GJMC00 , --国别 GG0000 , --规格 取自消耗品基本信息表中'消耗品规格'字段 --HGH000 , --货柜号,物品存放位置 PH0000 , --批号 YXQ000 , --有效期 SXRQ00 , --失效日期 SCJ000 , --市场价,即发票价格 CGJ000 , --采购价,即实际发生金额 CKPFJ0 , --出库批发加,即科室请领价 CKLSJ0 , --出库零售价,即病人使用价 KCZSL0 , --库存总数量 KCZJE0 , --库存总金额 KCLSJE , --库存零售总金额 XZZD01, --自由字段01 XZZD02, --自由字段02 XZZD03, --自由字段03 XZZD04, --自由字段04 YYZSL0 --已用总数量,即已分配批号 ) values ( vKCID00 , :NEW.KSBMBH , :NEW.WZDMID , :NEW.WZID00 , :NEW.WZMC00 , :NEW.WZSXMC , :NEW.CJID00 , :NEW.GJMC00 , :NEW.GG0000 , --:NEW.HGH000 , :NEW.PH0000 , :NEW.YXQ000 , :NEW.SXRQ00 , :NEW.SCJ000 , :NEW.CGJ000 , :NEW.CKPFJ0 , :NEW.CKLSJ0 , decode(sign(:NEW.KCID00),1,:NEW.CRKSL0,0),--sign(:NEW.KCID00)*:NEW.CRKSL0 , round(sign(:NEW.KCID00)*:NEW.CRKSL0 * :NEW.CKPFJ0,2) , round(sign(:NEW.KCID00)*:NEW.CRKSL0 * :NEW.CKLSJ0,2) , :NEW.XZZD01, :NEW.XZZD02, :NEW.XZZD03, :NEW.XZZD04, decode(sign(:NEW.KCID00),-1,:NEW.CRKSL0,0)--0 ); :NEW.KCID00 :=vKCID00; :NEW.JCS000 :=sign(:NEW.KCID00)*:NEW.CRKSL0; :NEW.YYJCS0 := 0 ; --:NEW.KCIDQY := vKCIDQY; --:NEW.JCSZ00 := vJCSZ00; --:NEW.YYJCSZ := vYYJCSZ; END IF; END IF; END IF; EXCEPTION when ECUSTOM_01 then RAISE_APPLICATION_ERROR(-20050,'vKCID00'||vKCID00); when ecustom_KSCCBZ then RAISE_APPLICATION_ERROR(-20050,'科室库存不足,'||'KSBMBH='||to_char( :NEW.KSBMBH )||',WZID00='||to_char( :NEW.WZID00 )||',PH0000='||:NEW.PH0000||'!.*'); WHEN ECUSTOM THEN RAISE_APPLICATION_ERROR(-20030,ERRSTR||'!*'); WHEN NO_DATA_FOUND THEN RAISE_APPLICATION_ERROR(-20010,'数据没有找到,'||ERRSTR||'!*'); -- WHEN OTHERS THEN -- RAISE_APPLICATION_ERROR(-20020, NVL(SQLERRM, '原因不明出错!'||ERRSTR)); End; 1193 14:29:17 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1194 14:29:17 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1195 14:29:17 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(instr(b.trigger_type,'BEFORE'),0,decode(instr(b.trigger_type,'AFTER'),0,decode(b.trigger_type,'INSTEAD OF',2,3),1),0) ty1,decode(instr(b.trigger_type,'STATEMENT'),0,decode(instr(b.trigger_type,'EACH ROW'),0,decode(instr(b.trigger_type,'EVENT'),0,3,2),1),0) ty2,decode(instr(b.triggering_event,'INSERT'),0,'N','Y') ev_ins,decode(instr(b.triggering_event,'UPDATE'),0,'N','Y') ev_upd,decode(instr(b.triggering_event,'DELETE'),0,'N','Y') ev_del,decode(instr(b.triggering_event,'STARTUP'),0,'N','Y') ev_startup,decode(instr(b.triggering_event,'SHUTDOWN'),0,'N','Y') ev_shutdown,decode(instr(b.triggering_event,'ERROR'),0,'N','Y') ev_error,decode(instr(b.triggering_event,'LOGON'),0,'N','Y') ev_logon,decode(instr(b.triggering_event,'LOGOFF'),0,'N','Y') ev_logoff,decode(instr(b.triggering_event,'CREATE'),0,'N','Y') ev_create,decode(instr(b.triggering_event,'ALTER'),0,'N','Y') ev_alter,decode(instr(b.triggering_event,'DROP'),0,'N','Y') ev_drop,decode(instr(b.triggering_event,'ANALYZE'),0,'N','Y') ev_analyze,decode(instr(b.triggering_event,'COMMENT'),0,'N','Y') ev_comment,decode(instr(b.triggering_event,'GRANT'),0,'N','Y') ev_grant,decode(instr(b.triggering_event,'REVOKE'),0,'N','Y') ev_revoke,decode(instr(b.triggering_event,'TRUNCATE'),0,'N','Y') ev_truncate,decode(instr(b.triggering_event,'RENAME'),0,'N','Y') ev_rename,decode(instr(b.triggering_event,' ASSOCIATE'),0,decode(substr(b.triggering_event,1,9),'ASSOCIATE','Y','N'),'Y') ev_associate,decode(instr(b.triggering_event,' AUDIT'),0,decode(substr(b.triggering_event,1,5),'AUDIT','Y','N'),'Y') ev_audit,decode(instr(b.triggering_event,' DISASSOCIATE'),0,decode(substr(b.triggering_event,1,12),'DISASSOCIATE','Y','N'),'Y') ev_disassociate,decode(instr(b.triggering_event,' NOAUDIT'),0,decode(substr(b.triggering_event,1,7),'NOAUDIT','Y','N'),'Y') ev_noaudit,decode(instr(b.triggering_event,'DDL'),0,'N','Y') ev_ddl,decode(rtrim(b.base_object_type),'TABLE',0,'VIEW',1,'SCHEMA',2,'DATABASE',3,4) base_type,b.table_owner,b.table_name,decode(b.status,'ENABLED','Y','N') enabled from user_objects a,user_triggers b where b.trigger_name like :object_name and a.object_name=b.trigger_name and a.object_type='TRIGGER' and b.trigger_name not in (select object_name from user_recyclebin where object_name=b.trigger_name) 1196 14:29:17 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1197 14:29:17 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1198 14:29:17 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(instr(b.trigger_type,'BEFORE'),0,decode(instr(b.trigger_type,'AFTER'),0,decode(b.trigger_type,'INSTEAD OF',2,3),1),0) ty1,decode(instr(b.trigger_type,'STATEMENT'),0,decode(instr(b.trigger_type,'EACH ROW'),0,decode(instr(b.trigger_type,'EVENT'),0,3,2),1),0) ty2,decode(instr(b.triggering_event,'INSERT'),0,'N','Y') ev_ins,decode(instr(b.triggering_event,'UPDATE'),0,'N','Y') ev_upd,decode(instr(b.triggering_event,'DELETE'),0,'N','Y') ev_del,decode(instr(b.triggering_event,'STARTUP'),0,'N','Y') ev_startup,decode(instr(b.triggering_event,'SHUTDOWN'),0,'N','Y') ev_shutdown,decode(instr(b.triggering_event,'ERROR'),0,'N','Y') ev_error,decode(instr(b.triggering_event,'LOGON'),0,'N','Y') ev_logon,decode(instr(b.triggering_event,'LOGOFF'),0,'N','Y') ev_logoff,decode(instr(b.triggering_event,'CREATE'),0,'N','Y') ev_create,decode(instr(b.triggering_event,'ALTER'),0,'N','Y') ev_alter,decode(instr(b.triggering_event,'DROP'),0,'N','Y') ev_drop,decode(instr(b.triggering_event,'ANALYZE'),0,'N','Y') ev_analyze,decode(instr(b.triggering_event,'COMMENT'),0,'N','Y') ev_comment,decode(instr(b.triggering_event,'GRANT'),0,'N','Y') ev_grant,decode(instr(b.triggering_event,'REVOKE'),0,'N','Y') ev_revoke,decode(instr(b.triggering_event,'TRUNCATE'),0,'N','Y') ev_truncate,decode(instr(b.triggering_event,'RENAME'),0,'N','Y') ev_rename,decode(instr(b.triggering_event,' ASSOCIATE'),0,decode(substr(b.triggering_event,1,9),'ASSOCIATE','Y','N'),'Y') ev_associate,decode(instr(b.triggering_event,' AUDIT'),0,decode(substr(b.triggering_event,1,5),'AUDIT','Y','N'),'Y') ev_audit,decode(instr(b.triggering_event,' DISASSOCIATE'),0,decode(substr(b.triggering_event,1,12),'DISASSOCIATE','Y','N'),'Y') ev_disassociate,decode(instr(b.triggering_event,' NOAUDIT'),0,decode(substr(b.triggering_event,1,7),'NOAUDIT','Y','N'),'Y') ev_noaudit,decode(instr(b.triggering_event,'DDL'),0,'N','Y') ev_ddl,decode(rtrim(b.base_object_type),'TABLE',0,'VIEW',1,'SCHEMA',2,'DATABASE',3,4) base_type,b.table_owner,b.table_name,decode(b.status,'ENABLED','Y','N') enabled from user_objects a,user_triggers b where b.trigger_name like :object_name and a.object_name=b.trigger_name and a.object_type='TRIGGER' and b.trigger_name not in (select object_name from user_recyclebin where object_name=b.trigger_name) 1199 14:29:17 SQL Execute: select to_char(sequence) sequence,to_char(line) line,to_char(position) position,text from user_errors where name=:object_name and type=:object_type 1200 14:29:18 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1201 14:29:18 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1202 14:29:18 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'N' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' and b.dropped='NO' 1203 14:29:18 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1204 14:29:18 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1205 14:29:18 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'Y' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_object_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1206 14:29:18 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1207 14:29:18 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1208 14:29:18 SQL Execute: select /*+ QCO9i QCOALL */ :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,'N' partitioned,'N' object_table,'Y' external_table,'N' nested,0 IOT_Type,'' IOT_Name,'N' temporary from sys.dba_objects a,sys.dba_external_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1209 14:29:18 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1210 14:29:18 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1211 14:29:18 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'N' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' and b.dropped='NO' 1212 14:29:18 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1213 14:29:18 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1214 14:29:18 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'Y' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_object_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1215 14:29:18 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1216 14:29:18 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1217 14:29:18 SQL Execute: select /*+ QCO9i QCOALL */ :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,'N' partitioned,'N' object_table,'Y' external_table,'N' nested,0 IOT_Type,'' IOT_Name,'N' temporary from sys.dba_objects a,sys.dba_external_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1218 14:29:18 SQL Execute: select object_id from public_dependency start with referenced_object_id=:obj_id connect by referenced_object_id=prior object_id 1219 14:29:18 SQL Execute: CREATE OR REPLACE TRIGGER TR_BM_WZDM00_WZMC00_UPDATE Before UPDATE ON BM_WZDM00 FOR EACH ROW WHEN (OLD.WZMC00<>new.WZMC00) DECLARE V_WZMCSFKYXG xt_xtcs00.value0%type; E_WZMCcustom exception ; --物资名称 ls_KCJLCOUNT number(5); ls_RCKCOUNT number(5); --2009-08-12 chenyw 对于已入库或已有库存的物资是否可以修改其物资物资名称 BEGIN begin select trim(value0) into V_WZMCSFKYXG from xt_xtcs00 where name00='WZ_WZMCRKZHSFKYG'; exception when others then V_WZMCSFKYXG :='N'; end; IF trim(V_WZMCSFKYXG)='Y' then begin select count(*) into ls_KCJLCOUNT from wz_kc0000 where wzdmid=:old.wzdmid; exception when others then ls_KCJLCOUNT:=0; end; begin select count(*) into ls_RCKCOUNT from wz_rckmx0 where wzdmid=:old.wzdmid; exception when others then ls_RCKCOUNT:=0; end; if (ls_KCJLCOUNT>0) or (ls_RCKCOUNT>0) then raise E_WZMCcustom; end if; end if; EXCEPTION when E_WZMCcustom then RAISE_APPLICATION_ERROR(-20007, '提示信息:'||'该物资名称已经有入库记录或有库存记录了,'''||:old.WZMC00||'''不能做修改;'); WHEN OTHERS THEN RAISE_APPLICATION_ERROR(-20008, '修改物资名称时发生意外错误!*返回信息:'||SQLERRM); END; 1220 14:29:18 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1221 14:29:18 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1222 14:29:18 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(instr(b.trigger_type,'BEFORE'),0,decode(instr(b.trigger_type,'AFTER'),0,decode(b.trigger_type,'INSTEAD OF',2,3),1),0) ty1,decode(instr(b.trigger_type,'STATEMENT'),0,decode(instr(b.trigger_type,'EACH ROW'),0,decode(instr(b.trigger_type,'EVENT'),0,3,2),1),0) ty2,decode(instr(b.triggering_event,'INSERT'),0,'N','Y') ev_ins,decode(instr(b.triggering_event,'UPDATE'),0,'N','Y') ev_upd,decode(instr(b.triggering_event,'DELETE'),0,'N','Y') ev_del,decode(instr(b.triggering_event,'STARTUP'),0,'N','Y') ev_startup,decode(instr(b.triggering_event,'SHUTDOWN'),0,'N','Y') ev_shutdown,decode(instr(b.triggering_event,'ERROR'),0,'N','Y') ev_error,decode(instr(b.triggering_event,'LOGON'),0,'N','Y') ev_logon,decode(instr(b.triggering_event,'LOGOFF'),0,'N','Y') ev_logoff,decode(instr(b.triggering_event,'CREATE'),0,'N','Y') ev_create,decode(instr(b.triggering_event,'ALTER'),0,'N','Y') ev_alter,decode(instr(b.triggering_event,'DROP'),0,'N','Y') ev_drop,decode(instr(b.triggering_event,'ANALYZE'),0,'N','Y') ev_analyze,decode(instr(b.triggering_event,'COMMENT'),0,'N','Y') ev_comment,decode(instr(b.triggering_event,'GRANT'),0,'N','Y') ev_grant,decode(instr(b.triggering_event,'REVOKE'),0,'N','Y') ev_revoke,decode(instr(b.triggering_event,'TRUNCATE'),0,'N','Y') ev_truncate,decode(instr(b.triggering_event,'RENAME'),0,'N','Y') ev_rename,decode(instr(b.triggering_event,' ASSOCIATE'),0,decode(substr(b.triggering_event,1,9),'ASSOCIATE','Y','N'),'Y') ev_associate,decode(instr(b.triggering_event,' AUDIT'),0,decode(substr(b.triggering_event,1,5),'AUDIT','Y','N'),'Y') ev_audit,decode(instr(b.triggering_event,' DISASSOCIATE'),0,decode(substr(b.triggering_event,1,12),'DISASSOCIATE','Y','N'),'Y') ev_disassociate,decode(instr(b.triggering_event,' NOAUDIT'),0,decode(substr(b.triggering_event,1,7),'NOAUDIT','Y','N'),'Y') ev_noaudit,decode(instr(b.triggering_event,'DDL'),0,'N','Y') ev_ddl,decode(rtrim(b.base_object_type),'TABLE',0,'VIEW',1,'SCHEMA',2,'DATABASE',3,4) base_type,b.table_owner,b.table_name,decode(b.status,'ENABLED','Y','N') enabled from user_objects a,user_triggers b where b.trigger_name like :object_name and a.object_name=b.trigger_name and a.object_type='TRIGGER' and b.trigger_name not in (select object_name from user_recyclebin where object_name=b.trigger_name) 1223 14:29:18 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1224 14:29:18 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1225 14:29:18 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(instr(b.trigger_type,'BEFORE'),0,decode(instr(b.trigger_type,'AFTER'),0,decode(b.trigger_type,'INSTEAD OF',2,3),1),0) ty1,decode(instr(b.trigger_type,'STATEMENT'),0,decode(instr(b.trigger_type,'EACH ROW'),0,decode(instr(b.trigger_type,'EVENT'),0,3,2),1),0) ty2,decode(instr(b.triggering_event,'INSERT'),0,'N','Y') ev_ins,decode(instr(b.triggering_event,'UPDATE'),0,'N','Y') ev_upd,decode(instr(b.triggering_event,'DELETE'),0,'N','Y') ev_del,decode(instr(b.triggering_event,'STARTUP'),0,'N','Y') ev_startup,decode(instr(b.triggering_event,'SHUTDOWN'),0,'N','Y') ev_shutdown,decode(instr(b.triggering_event,'ERROR'),0,'N','Y') ev_error,decode(instr(b.triggering_event,'LOGON'),0,'N','Y') ev_logon,decode(instr(b.triggering_event,'LOGOFF'),0,'N','Y') ev_logoff,decode(instr(b.triggering_event,'CREATE'),0,'N','Y') ev_create,decode(instr(b.triggering_event,'ALTER'),0,'N','Y') ev_alter,decode(instr(b.triggering_event,'DROP'),0,'N','Y') ev_drop,decode(instr(b.triggering_event,'ANALYZE'),0,'N','Y') ev_analyze,decode(instr(b.triggering_event,'COMMENT'),0,'N','Y') ev_comment,decode(instr(b.triggering_event,'GRANT'),0,'N','Y') ev_grant,decode(instr(b.triggering_event,'REVOKE'),0,'N','Y') ev_revoke,decode(instr(b.triggering_event,'TRUNCATE'),0,'N','Y') ev_truncate,decode(instr(b.triggering_event,'RENAME'),0,'N','Y') ev_rename,decode(instr(b.triggering_event,' ASSOCIATE'),0,decode(substr(b.triggering_event,1,9),'ASSOCIATE','Y','N'),'Y') ev_associate,decode(instr(b.triggering_event,' AUDIT'),0,decode(substr(b.triggering_event,1,5),'AUDIT','Y','N'),'Y') ev_audit,decode(instr(b.triggering_event,' DISASSOCIATE'),0,decode(substr(b.triggering_event,1,12),'DISASSOCIATE','Y','N'),'Y') ev_disassociate,decode(instr(b.triggering_event,' NOAUDIT'),0,decode(substr(b.triggering_event,1,7),'NOAUDIT','Y','N'),'Y') ev_noaudit,decode(instr(b.triggering_event,'DDL'),0,'N','Y') ev_ddl,decode(rtrim(b.base_object_type),'TABLE',0,'VIEW',1,'SCHEMA',2,'DATABASE',3,4) base_type,b.table_owner,b.table_name,decode(b.status,'ENABLED','Y','N') enabled from user_objects a,user_triggers b where b.trigger_name like :object_name and a.object_name=b.trigger_name and a.object_type='TRIGGER' and b.trigger_name not in (select object_name from user_recyclebin where object_name=b.trigger_name) 1226 14:29:18 SQL Execute: select to_char(sequence) sequence,to_char(line) line,to_char(position) position,text from user_errors where name=:object_name and type=:object_type 1227 14:29:18 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1228 14:29:18 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1229 14:29:18 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'N' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from user_objects a,user_tables b where b.table_name like :object_name and a.object_name=b.table_name and a.object_type='TABLE' and b.dropped='NO' 1230 14:29:18 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1231 14:29:18 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1232 14:29:18 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'Y' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from user_objects a,user_object_tables b where b.table_name like :object_name and a.object_name=b.table_name and a.object_type='TABLE' 1233 14:29:18 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1234 14:29:18 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1235 14:29:18 SQL Execute: select /*+ QCO9i QCOALL */ USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,'N' partitioned,'N' object_table,'Y' external_table,'N' nested,0 IOT_Type,'' IOT_Name,'N' temporary from user_objects a,user_external_tables b where b.table_name like :object_name and a.object_name=b.table_name and a.object_type='TABLE' 1236 14:29:18 SQL Execute: select object_id from public_dependency start with referenced_object_id=:obj_id connect by referenced_object_id=prior object_id 1237 14:29:18 SQL Execute: CREATE OR REPLACE TRIGGER TR_WZ_CGJHMX_BFININSERT after INSERT ON wz_cgjhMX FOR EACH ROW DECLARE V_CGJHDH WZ_CGJHMX.CGJHDH%type; E_NoEdit EXCEPTION; -- date persons comments --2009.09.11 chenyw created 防止主表没有记录的时候,细表以0的记录插入进去; BEGIN IF INSERTING THEN begin select CGJHDH into V_CGJHDH from wz_CGJH00 where CGJHDH=:NEW.CGJHDH; Exception WHEN OTHERS THEN V_CGJHDH:=0; END; IF (V_CGJHDH=0) THEN RAISE E_NoEdit; END IF; end if; EXCEPTION WHEN E_NoEdit THEN RAISE_APPLICATION_ERROR(-20004, '插入WZ_CGJHMX发生意外错误!插入WZ_CGJHMX的CGJHDH:'||:NEW.CGJHDH||'在wz_CGJH00(主表不存在) *'); END; 1238 14:29:18 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1239 14:29:18 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1240 14:29:18 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(instr(b.trigger_type,'BEFORE'),0,decode(instr(b.trigger_type,'AFTER'),0,decode(b.trigger_type,'INSTEAD OF',2,3),1),0) ty1,decode(instr(b.trigger_type,'STATEMENT'),0,decode(instr(b.trigger_type,'EACH ROW'),0,decode(instr(b.trigger_type,'EVENT'),0,3,2),1),0) ty2,decode(instr(b.triggering_event,'INSERT'),0,'N','Y') ev_ins,decode(instr(b.triggering_event,'UPDATE'),0,'N','Y') ev_upd,decode(instr(b.triggering_event,'DELETE'),0,'N','Y') ev_del,decode(instr(b.triggering_event,'STARTUP'),0,'N','Y') ev_startup,decode(instr(b.triggering_event,'SHUTDOWN'),0,'N','Y') ev_shutdown,decode(instr(b.triggering_event,'ERROR'),0,'N','Y') ev_error,decode(instr(b.triggering_event,'LOGON'),0,'N','Y') ev_logon,decode(instr(b.triggering_event,'LOGOFF'),0,'N','Y') ev_logoff,decode(instr(b.triggering_event,'CREATE'),0,'N','Y') ev_create,decode(instr(b.triggering_event,'ALTER'),0,'N','Y') ev_alter,decode(instr(b.triggering_event,'DROP'),0,'N','Y') ev_drop,decode(instr(b.triggering_event,'ANALYZE'),0,'N','Y') ev_analyze,decode(instr(b.triggering_event,'COMMENT'),0,'N','Y') ev_comment,decode(instr(b.triggering_event,'GRANT'),0,'N','Y') ev_grant,decode(instr(b.triggering_event,'REVOKE'),0,'N','Y') ev_revoke,decode(instr(b.triggering_event,'TRUNCATE'),0,'N','Y') ev_truncate,decode(instr(b.triggering_event,'RENAME'),0,'N','Y') ev_rename,decode(instr(b.triggering_event,' ASSOCIATE'),0,decode(substr(b.triggering_event,1,9),'ASSOCIATE','Y','N'),'Y') ev_associate,decode(instr(b.triggering_event,' AUDIT'),0,decode(substr(b.triggering_event,1,5),'AUDIT','Y','N'),'Y') ev_audit,decode(instr(b.triggering_event,' DISASSOCIATE'),0,decode(substr(b.triggering_event,1,12),'DISASSOCIATE','Y','N'),'Y') ev_disassociate,decode(instr(b.triggering_event,' NOAUDIT'),0,decode(substr(b.triggering_event,1,7),'NOAUDIT','Y','N'),'Y') ev_noaudit,decode(instr(b.triggering_event,'DDL'),0,'N','Y') ev_ddl,decode(rtrim(b.base_object_type),'TABLE',0,'VIEW',1,'SCHEMA',2,'DATABASE',3,4) base_type,b.table_owner,b.table_name,decode(b.status,'ENABLED','Y','N') enabled from user_objects a,user_triggers b where b.trigger_name like :object_name and a.object_name=b.trigger_name and a.object_type='TRIGGER' and b.trigger_name not in (select object_name from user_recyclebin where object_name=b.trigger_name) 1241 14:29:18 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1242 14:29:18 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1243 14:29:18 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(instr(b.trigger_type,'BEFORE'),0,decode(instr(b.trigger_type,'AFTER'),0,decode(b.trigger_type,'INSTEAD OF',2,3),1),0) ty1,decode(instr(b.trigger_type,'STATEMENT'),0,decode(instr(b.trigger_type,'EACH ROW'),0,decode(instr(b.trigger_type,'EVENT'),0,3,2),1),0) ty2,decode(instr(b.triggering_event,'INSERT'),0,'N','Y') ev_ins,decode(instr(b.triggering_event,'UPDATE'),0,'N','Y') ev_upd,decode(instr(b.triggering_event,'DELETE'),0,'N','Y') ev_del,decode(instr(b.triggering_event,'STARTUP'),0,'N','Y') ev_startup,decode(instr(b.triggering_event,'SHUTDOWN'),0,'N','Y') ev_shutdown,decode(instr(b.triggering_event,'ERROR'),0,'N','Y') ev_error,decode(instr(b.triggering_event,'LOGON'),0,'N','Y') ev_logon,decode(instr(b.triggering_event,'LOGOFF'),0,'N','Y') ev_logoff,decode(instr(b.triggering_event,'CREATE'),0,'N','Y') ev_create,decode(instr(b.triggering_event,'ALTER'),0,'N','Y') ev_alter,decode(instr(b.triggering_event,'DROP'),0,'N','Y') ev_drop,decode(instr(b.triggering_event,'ANALYZE'),0,'N','Y') ev_analyze,decode(instr(b.triggering_event,'COMMENT'),0,'N','Y') ev_comment,decode(instr(b.triggering_event,'GRANT'),0,'N','Y') ev_grant,decode(instr(b.triggering_event,'REVOKE'),0,'N','Y') ev_revoke,decode(instr(b.triggering_event,'TRUNCATE'),0,'N','Y') ev_truncate,decode(instr(b.triggering_event,'RENAME'),0,'N','Y') ev_rename,decode(instr(b.triggering_event,' ASSOCIATE'),0,decode(substr(b.triggering_event,1,9),'ASSOCIATE','Y','N'),'Y') ev_associate,decode(instr(b.triggering_event,' AUDIT'),0,decode(substr(b.triggering_event,1,5),'AUDIT','Y','N'),'Y') ev_audit,decode(instr(b.triggering_event,' DISASSOCIATE'),0,decode(substr(b.triggering_event,1,12),'DISASSOCIATE','Y','N'),'Y') ev_disassociate,decode(instr(b.triggering_event,' NOAUDIT'),0,decode(substr(b.triggering_event,1,7),'NOAUDIT','Y','N'),'Y') ev_noaudit,decode(instr(b.triggering_event,'DDL'),0,'N','Y') ev_ddl,decode(rtrim(b.base_object_type),'TABLE',0,'VIEW',1,'SCHEMA',2,'DATABASE',3,4) base_type,b.table_owner,b.table_name,decode(b.status,'ENABLED','Y','N') enabled from user_objects a,user_triggers b where b.trigger_name like :object_name and a.object_name=b.trigger_name and a.object_type='TRIGGER' and b.trigger_name not in (select object_name from user_recyclebin where object_name=b.trigger_name) 1244 14:29:18 SQL Execute: select to_char(sequence) sequence,to_char(line) line,to_char(position) position,text from user_errors where name=:object_name and type=:object_type 1245 14:29:18 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1246 14:29:18 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1247 14:29:18 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'N' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' and b.dropped='NO' 1248 14:29:18 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1249 14:29:18 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1250 14:29:18 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'Y' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_object_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1251 14:29:18 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1252 14:29:18 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1253 14:29:18 SQL Execute: select /*+ QCO9i QCOALL */ :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,'N' partitioned,'N' object_table,'Y' external_table,'N' nested,0 IOT_Type,'' IOT_Name,'N' temporary from sys.dba_objects a,sys.dba_external_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1254 14:29:18 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1255 14:29:18 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1256 14:29:18 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'N' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' and b.dropped='NO' 1257 14:29:18 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1258 14:29:18 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1259 14:29:18 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'Y' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_object_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1260 14:29:18 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1261 14:29:18 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1262 14:29:18 SQL Execute: select /*+ QCO9i QCOALL */ :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,'N' partitioned,'N' object_table,'Y' external_table,'N' nested,0 IOT_Type,'' IOT_Name,'N' temporary from sys.dba_objects a,sys.dba_external_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1263 14:29:18 SQL Execute: select object_id from public_dependency start with referenced_object_id=:obj_id connect by referenced_object_id=prior object_id 1264 14:29:18 SQL Execute: create or replace trigger TR_WZ_ZY_FYMX00_INS Before insert on ZY_FYMX00 FOR EACH ROW declare Vcounter number(10); ls_jls number(10); ls_BQBH00 ZY_FYMX00.KDBQ00%type; ls_WZID NUMBER(10); ls_SYZSL NUMBER(12,2); --剩余总数量 ls_CKLSJ NUMBER(14,4); --最高零售价 ls_CKPFJ NUMBER(14,4); --出库批发价,退费用 ls_PCSYZSL NUMBER(12,2); --批次剩余总数量 ls_KSKCID NUMBER(10) ; --科室库存ID ls_PH varchar2(20); --批号 ls_DQSYZSL NUMBER(12,2); --当前批次写完后,还需要的数量 ls_XMDJ NUMBER(12,4); --项目单价 ls_XMSL NUMBER(12,4); --项目数量 ls_MINSL NUMBER(12,4); --LEAST(ls_SYZSL,ls_XMSL) ls_yjdjh YJ_YW0000.YJDJH0%TYPE; begin select count(1) into Vcounter from xt_xtcs00 where name00='WZ_SFQYEJKF' and value0='Y'; if Vcounter=0 then return; end if; SELECT nvl(max(WZID00),0) into ls_WZID FROM WZ_WZXX00 WHERE sfyx00 = 'Y' and sxdm00<>'9' and gzhc00 <>'Y' and sfxmid=:new.xmbh00; if ls_WZID=0 or :new.xmsl00=0 or :new.ZXKS00=0 then return; end if; begin select BQH000 into ls_BQBH00 from bm_BQKS00 where KSH000=:new.ZXKS00; exception when others then ls_BQBH00:=:new.ZXKS00; end; ls_SYZSL:=0; ls_DQSYZSL:=0; ls_XMDJ:=:new.xmdj00; ls_XMSL:=:new.xmsl00; if :new.xmsl00<0 then --退费 select nvl(max(ckpfj0),ls_XMDJ),nvl(min(PH0000),'') into ls_CKPFJ,ls_PH from WZ_KSKC00 where ksbmbh=ls_BQBH00 and wzid00=ls_WZID and cklsj0=ls_XMDJ; :new.PH0000 := ls_PH; --批号回写费用明细表 insert into WZ_KSRCMX ( RCKMXH , --入出库明细ID--> SQ_WZ_KSRCMX_RCKMXH KCID00 , --库存ID-->WZ_KSRC00.RCKID0 KSBMBH , --科室部门编码 WZDMID , --消耗品内码 WZMC00 , --消耗品名称 WZSXMC , --属性名称 WZID00 , --消耗品基本信息号 CJID00 , --厂家流水号 GJMC00 , --国别 GG0000 , --规格 取自消耗品基本信息表中'消耗品规格'字段 PH0000 , --批号 CRKSL0 , --数量 WZDW00 , --消耗品单位,计量单位 SCJ000 , --市场价,即发票价格 CGJ000 , --采购价,即实际发生金额 CKPFJ0 , --出库批发加,即科室请领价 CKLSJ0 , --出库零售价,即病人使用价 ZJE000 , --总金额,实际采购价格乘入库数量 JCS000 , --库存数 -->WZ_KSKC00.KCZSL0 YYJCS0 , --已用库存数 -->WZ_KSKC00.YYZSL0 --JCSZ00 , --总表库存数 -->WZ_QYKC00.KCZSL0 --YYJCSZ , --总表已用库存数-->WZ_QYKC00.YYZSL0 RCKLB0 , --入出库类别 取值:1-2(入库;出库) KFBMBH , --库房部门编码 RCKLX0 , --入出库类型 取值:入库1-2(领回入库、盘盈入库) 出库1-2(写批号出库、盘亏出库) FHBMBH , --发货方编码 取自厂家表或部门编码表的编码 QRRQ00 , --确认日期 QRSJ00 , --确认时间,格式00:00:00 QRJSR0 , --确认经手人 MZZYBZ , --门诊住院标志 '0'门诊'1'住院 FYMXID ) select SQ_WZ_KSRCMX_RCKMXH.nextval , --入出库明细ID--> SQ_WZ_KSRCMX_RCKMXH -1 , --库存ID-->WZ_KSRC00.RCKID0 专用,允许库存负数 ls_BQBH00 , --科室部门编码 a.WZDMID , --消耗品内码 b.WZMC00 , --消耗品名称 c.WZSXMC , --属性名称 WZID00 , --消耗品基本信息号 CJID00 , --厂家流水号 GJMC00 , --国别 WZGG00 , --规格 取自消耗品基本信息表中'消耗品规格'字段 ls_PH , --批号 ls_XMSL, --数量 a.JLDW00,--WZDW00 , --消耗品单位,计量单位 ls_CKPFJ,--SCJ000 , --市场价,即发票价格 ls_CKPFJ,--CGJ000 , --采购价,即实际发生金额 ls_CKPFJ,--CKPFJ0 , --出库批发加,即科室请领价 ls_XMDJ, --CKLSJ0 , --出库零售价,即病人使用价 round(ls_XMSL*ls_XMDJ,4), --总金额,实际零售价乘入库数量 --CKLSJ0 NULL , --结存数,物品出入库后的库存数 -->WZ_KSKC00.KCZSL0 NULL , --结存金额,物品出入库后的库存数 -->WZ_KSKC00.KCZJE0 --NULL , --总表结存数,物品出入库后的库存数 -->WZ_QYKC00.KCZSL0 --NULL , --总表结存金额,物品出入库后的库存数-->WZ_QYKC00.KCZJE0 '2' , --入出库类别 取值:1-2(入库;出库) ls_BQBH00 ,--库房部门编码 '1' , --入出库类型 取值:入库1-2(领回入库、盘盈入库) 出库1-2(写批号出库、盘亏出库) ls_BQBH00 , --发货方编码 取自厂家表或部门编码表的编码 TO_CHAR(SYSDATE,'YYYYMMDD'), --确认日期 TO_CHAR(SYSDATE,'HH24:MI:SS'), --确认时间,格式00:00:00 0, --确认人 '1', --门诊住院标志 '0'门诊'1'住院 :new.mxid00 --费用明细ID from WZ_WZXX00 a,BM_WZDM00 b,BM_WZSX00 c where a.WZID00=ls_WZID and a.WZDMID=b.WZDMID(+) and a.SXDM00=c.WZSXBH; else --收费 select nvl(sum(KCZSL0-YYZSL0),0),nvl(max(CKLSJ0),0),min(trim(PH0000)),count(1) into ls_SYZSL,ls_CKLSJ,ls_PH,ls_jls from WZ_KSKC00 where KSBMBH = ls_BQBH00 and WZID00 = ls_WZID and KCZSL0 > YYZSL0; ls_MINSL:= LEAST(ls_SYZSL,ls_XMSL); if ls_SYZSL>0 then --WZ_KSKC00 部分字段值修改放在触发器中控制 while ls_DQSYZSL0 then --第2次开始重新取最高零售价 --高价先出 (先进先出未做) select max(CKLSJ0),min(trim(PH0000)),count(1) into ls_CKLSJ,ls_PH,ls_jls from WZ_KSKC00 where KSBMBH = ls_BQBH00 and WZID00 = ls_WZID and KCZSL0 <> YYZSL0; end if; --多批时,取最小批号 if ls_jls>1 then select min(trim(PH0000)) into ls_PH from WZ_KSKC00 where KSBMBH = ls_BQBH00 and WZID00 = ls_WZID and KCZSL0 <> YYZSL0 and CKLSJ0 = ls_CKLSJ; end if; select KCZSL0-YYZSL0,KCID00 into ls_PCSYZSL,ls_KSKCID from WZ_KSKC00 where KSBMBH = ls_BQBH00 and WZID00 = ls_WZID and KCZSL0 <> YYZSL0 and CKLSJ0 = ls_CKLSJ and trim(PH0000)||'PH'=ls_PH||'PH' and rownum=1; --写入科室入出明细表 1、 insert into WZ_KSRCMX ( RCKMXH ,KCID00 ,KSBMBH ,WZDMID ,WZMC00 ,WZSXMC ,WZID00 ,CJID00 ,GJMC00 ,GG0000 , PH0000 ,YXQ000 ,SXRQ00 ,CRKSL0 ,WZDW00 ,SCJ000 ,CGJ000 ,CKPFJ0 ,CKLSJ0 ,ZJE000 , JCS000 ,YYJCS0 ,RCKLB0 ,KFBMBH ,RCKLX0 ,FHBMBH ,QRRQ00 ,QRSJ00 ,QRJSR0 ,MZZYBZ ,FYMXID ) select SQ_WZ_KSRCMX_RCKMXH.nextval ,KCID00 ,KSBMBH ,WZDMID ,WZMC00 ,WZSXMC ,WZID00 ,CJID00 ,GJMC00 ,GG0000 , PH0000 ,YXQ000 ,SXRQ00 , decode(sign(ls_MINSL-ls_DQSYZSL-ls_PCSYZSL+0.0001),1,ls_PCSYZSL,ls_MINSL-ls_DQSYZSL), --数量 WZDW00 ,SCJ000 ,CGJ000 ,CKPFJ0 ,CKLSJ0 , round(decode(sign(ls_MINSL-ls_DQSYZSL-ls_PCSYZSL+0.0001),1,ls_PCSYZSL,ls_MINSL-ls_DQSYZSL)*CKLSJ0,4), --总金额,实际零售价乘入库数量 NULL ,NULL ,'2' ,KSBMBH ,'1' ,KSBMBH ,TO_CHAR(SYSDATE,'YYYYMMDD'),TO_CHAR(SYSDATE,'HH24:MI:SS'), 0,'1',:new.mxid00 from WZ_KSKC00 where KCID00=ls_KSKCID; --首批物资对应批号、价格回写 if ls_DQSYZSL=0 then :new.PH0000:=ls_PH; --批号回写费用明细表 if ls_CKLSJ<>ls_XMDJ then --减免金额字段是否需要改动?目前没改动 :NEW.XMDJ00:=ls_CKLSJ; :NEW.HJJE00:=ROUND(ls_CKLSJ*:NEW.XMSL00,2); :NEW.GFJE00:=ROUND(ls_CKLSJ/ls_XMDJ*:NEW.GFJE00,2); :NEW.JZJE00:=ROUND(ls_CKLSJ/ls_XMDJ*:NEW.JZJE00,2); :NEW.ZFJE00:=ROUND(ls_CKLSJ*:NEW.XMSL00-:NEW.GFJE00-:NEW.JZJE00,2); --业务计价表单价金额也要改变 if :new.flag00='1' or :new.flag00='4' then select yjdjh0 into ls_yjdjh from YJ_YWJJ00 where ID0000=:new.DJID00; update yj_yw0000 set sfdjh0=0 where yjdjh0=ls_yjdjh and sfdjh0+0 = :new.djh000; --update YJ_YWJJ00 set JJJE00=ls_CKLSJ where ID0000=:new.YJDJH0 and sfxmid=:new.xmbh00 and JJJE00=ls_XMDJ and sfcs00=:new.xmsl00; update YJ_YWJJ00 set JJJE00=ls_CKLSJ where ID0000=:new.DJID00; update yj_yw0000 set sfdjh0=:new.djh000 where yjdjh0=ls_yjdjh and sfdjh0+0 = 0; end if; end if; end if; ls_DQSYZSL:=ls_DQSYZSL+ls_PCSYZSL; end loop; --所有批次都不够用情况,科室库存表数量允许负数 if ls_DQSYZSL1 then select max(trim(PH0000)) into ls_PH from WZ_KSKC00 where KSBMBH = ls_BQBH00 and WZID00 = ls_WZID and KCZSL0 < YYZSL0 and CKLSJ0 = ls_CKLSJ; select KCID00 into ls_KSKCID from WZ_KSKC00 where KSBMBH = ls_BQBH00 and WZID00 = ls_WZID and KCZSL0 < YYZSL0 and CKLSJ0 = ls_CKLSJ and trim(PH0000)||'PH'=ls_PH||'PH' and rownum=1; end if; :new.PH0000 := ls_PH; --批号回写费用明细表 insert into WZ_KSRCMX ( RCKMXH ,KCID00 ,KSBMBH ,WZDMID ,WZMC00 ,WZSXMC ,WZID00 ,CJID00 ,GJMC00 ,GG0000 , PH0000 ,YXQ000 ,SXRQ00 ,CRKSL0 ,WZDW00 ,SCJ000 ,CGJ000 ,CKPFJ0 ,CKLSJ0 ,ZJE000 , JCS000 ,YYJCS0 ,RCKLB0 ,KFBMBH ,RCKLX0 ,FHBMBH ,QRRQ00 ,QRSJ00 ,QRJSR0 ,MZZYBZ ,FYMXID ) select SQ_WZ_KSRCMX_RCKMXH.nextval ,-1 ,KSBMBH ,WZDMID ,WZMC00 ,WZSXMC ,WZID00 ,CJID00 ,GJMC00 ,GG0000 , PH0000 ,YXQ000 ,SXRQ00 ,ls_XMSL,WZDW00 ,SCJ000 ,CGJ000 ,CKPFJ0 ,CKLSJ0 ,round(ls_XMSL*CKLSJ0,4), NULL ,NULL ,'2' ,KSBMBH ,'1' ,KSBMBH ,TO_CHAR(SYSDATE,'YYYYMMDD'),TO_CHAR(SYSDATE,'HH24:MI:SS'),0,'1',:new.mxid00 from WZ_KSKC00 where KCID00=ls_KSKCID; else --负库存不存在 写入科室入出明细表 3、 insert into WZ_KSRCMX ( RCKMXH ,KCID00 ,KSBMBH ,WZDMID ,WZMC00 ,WZSXMC ,WZID00 ,CJID00 ,GJMC00 ,GG0000 , CRKSL0 ,WZDW00 ,SCJ000 ,CGJ000 ,CKPFJ0 ,CKLSJ0 ,ZJE000 ,JCS000 ,YYJCS0 ,RCKLB0 , KFBMBH ,RCKLX0 ,FHBMBH ,QRRQ00 ,QRSJ00 ,QRJSR0 ,MZZYBZ ,FYMXID ) select SQ_WZ_KSRCMX_RCKMXH.nextval ,-1 ,ls_BQBH00 ,a.WZDMID ,b.WZMC00 ,c.WZSXMC ,WZID00 ,CJID00 ,GJMC00 ,WZGG00 , ls_XMSL,a.JLDW00,ls_XMDJ,ls_XMDJ,ls_XMDJ,ls_XMDJ,round(ls_XMSL*ls_XMDJ,4),NULL ,NULL ,'2' , ls_BQBH00 ,'1' ,ls_BQBH00 ,TO_CHAR(SYSDATE,'YYYYMMDD'),TO_CHAR(SYSDATE,'HH24:MI:SS'),0,'1',:new.mxid00 from WZ_WZXX00 a,BM_WZDM00 b,BM_WZSX00 c where a.WZID00=ls_WZID and a.WZDMID=b.WZDMID(+) and a.SXDM00=c.WZSXBH; end if; end if; end if; end; 1265 14:29:19 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1266 14:29:19 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1267 14:29:19 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(instr(b.trigger_type,'BEFORE'),0,decode(instr(b.trigger_type,'AFTER'),0,decode(b.trigger_type,'INSTEAD OF',2,3),1),0) ty1,decode(instr(b.trigger_type,'STATEMENT'),0,decode(instr(b.trigger_type,'EACH ROW'),0,decode(instr(b.trigger_type,'EVENT'),0,3,2),1),0) ty2,decode(instr(b.triggering_event,'INSERT'),0,'N','Y') ev_ins,decode(instr(b.triggering_event,'UPDATE'),0,'N','Y') ev_upd,decode(instr(b.triggering_event,'DELETE'),0,'N','Y') ev_del,decode(instr(b.triggering_event,'STARTUP'),0,'N','Y') ev_startup,decode(instr(b.triggering_event,'SHUTDOWN'),0,'N','Y') ev_shutdown,decode(instr(b.triggering_event,'ERROR'),0,'N','Y') ev_error,decode(instr(b.triggering_event,'LOGON'),0,'N','Y') ev_logon,decode(instr(b.triggering_event,'LOGOFF'),0,'N','Y') ev_logoff,decode(instr(b.triggering_event,'CREATE'),0,'N','Y') ev_create,decode(instr(b.triggering_event,'ALTER'),0,'N','Y') ev_alter,decode(instr(b.triggering_event,'DROP'),0,'N','Y') ev_drop,decode(instr(b.triggering_event,'ANALYZE'),0,'N','Y') ev_analyze,decode(instr(b.triggering_event,'COMMENT'),0,'N','Y') ev_comment,decode(instr(b.triggering_event,'GRANT'),0,'N','Y') ev_grant,decode(instr(b.triggering_event,'REVOKE'),0,'N','Y') ev_revoke,decode(instr(b.triggering_event,'TRUNCATE'),0,'N','Y') ev_truncate,decode(instr(b.triggering_event,'RENAME'),0,'N','Y') ev_rename,decode(instr(b.triggering_event,' ASSOCIATE'),0,decode(substr(b.triggering_event,1,9),'ASSOCIATE','Y','N'),'Y') ev_associate,decode(instr(b.triggering_event,' AUDIT'),0,decode(substr(b.triggering_event,1,5),'AUDIT','Y','N'),'Y') ev_audit,decode(instr(b.triggering_event,' DISASSOCIATE'),0,decode(substr(b.triggering_event,1,12),'DISASSOCIATE','Y','N'),'Y') ev_disassociate,decode(instr(b.triggering_event,' NOAUDIT'),0,decode(substr(b.triggering_event,1,7),'NOAUDIT','Y','N'),'Y') ev_noaudit,decode(instr(b.triggering_event,'DDL'),0,'N','Y') ev_ddl,decode(rtrim(b.base_object_type),'TABLE',0,'VIEW',1,'SCHEMA',2,'DATABASE',3,4) base_type,b.table_owner,b.table_name,decode(b.status,'ENABLED','Y','N') enabled from user_objects a,user_triggers b where b.trigger_name like :object_name and a.object_name=b.trigger_name and a.object_type='TRIGGER' and b.trigger_name not in (select object_name from user_recyclebin where object_name=b.trigger_name) 1268 14:29:19 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1269 14:29:19 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1270 14:29:19 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(instr(b.trigger_type,'BEFORE'),0,decode(instr(b.trigger_type,'AFTER'),0,decode(b.trigger_type,'INSTEAD OF',2,3),1),0) ty1,decode(instr(b.trigger_type,'STATEMENT'),0,decode(instr(b.trigger_type,'EACH ROW'),0,decode(instr(b.trigger_type,'EVENT'),0,3,2),1),0) ty2,decode(instr(b.triggering_event,'INSERT'),0,'N','Y') ev_ins,decode(instr(b.triggering_event,'UPDATE'),0,'N','Y') ev_upd,decode(instr(b.triggering_event,'DELETE'),0,'N','Y') ev_del,decode(instr(b.triggering_event,'STARTUP'),0,'N','Y') ev_startup,decode(instr(b.triggering_event,'SHUTDOWN'),0,'N','Y') ev_shutdown,decode(instr(b.triggering_event,'ERROR'),0,'N','Y') ev_error,decode(instr(b.triggering_event,'LOGON'),0,'N','Y') ev_logon,decode(instr(b.triggering_event,'LOGOFF'),0,'N','Y') ev_logoff,decode(instr(b.triggering_event,'CREATE'),0,'N','Y') ev_create,decode(instr(b.triggering_event,'ALTER'),0,'N','Y') ev_alter,decode(instr(b.triggering_event,'DROP'),0,'N','Y') ev_drop,decode(instr(b.triggering_event,'ANALYZE'),0,'N','Y') ev_analyze,decode(instr(b.triggering_event,'COMMENT'),0,'N','Y') ev_comment,decode(instr(b.triggering_event,'GRANT'),0,'N','Y') ev_grant,decode(instr(b.triggering_event,'REVOKE'),0,'N','Y') ev_revoke,decode(instr(b.triggering_event,'TRUNCATE'),0,'N','Y') ev_truncate,decode(instr(b.triggering_event,'RENAME'),0,'N','Y') ev_rename,decode(instr(b.triggering_event,' ASSOCIATE'),0,decode(substr(b.triggering_event,1,9),'ASSOCIATE','Y','N'),'Y') ev_associate,decode(instr(b.triggering_event,' AUDIT'),0,decode(substr(b.triggering_event,1,5),'AUDIT','Y','N'),'Y') ev_audit,decode(instr(b.triggering_event,' DISASSOCIATE'),0,decode(substr(b.triggering_event,1,12),'DISASSOCIATE','Y','N'),'Y') ev_disassociate,decode(instr(b.triggering_event,' NOAUDIT'),0,decode(substr(b.triggering_event,1,7),'NOAUDIT','Y','N'),'Y') ev_noaudit,decode(instr(b.triggering_event,'DDL'),0,'N','Y') ev_ddl,decode(rtrim(b.base_object_type),'TABLE',0,'VIEW',1,'SCHEMA',2,'DATABASE',3,4) base_type,b.table_owner,b.table_name,decode(b.status,'ENABLED','Y','N') enabled from user_objects a,user_triggers b where b.trigger_name like :object_name and a.object_name=b.trigger_name and a.object_type='TRIGGER' and b.trigger_name not in (select object_name from user_recyclebin where object_name=b.trigger_name) 1271 14:29:19 SQL Execute: select to_char(sequence) sequence,to_char(line) line,to_char(position) position,text from user_errors where name=:object_name and type=:object_type 1272 14:29:19 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1273 14:29:19 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1274 14:29:19 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'N' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' and b.dropped='NO' 1275 14:29:19 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1276 14:29:19 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1277 14:29:19 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'Y' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_object_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1278 14:29:19 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1279 14:29:19 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1280 14:29:19 SQL Execute: select /*+ QCO9i QCOALL */ :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,'N' partitioned,'N' object_table,'Y' external_table,'N' nested,0 IOT_Type,'' IOT_Name,'N' temporary from sys.dba_objects a,sys.dba_external_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1281 14:29:19 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1282 14:29:19 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1283 14:29:19 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'N' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' and b.dropped='NO' 1284 14:29:19 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1285 14:29:19 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1286 14:29:19 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'Y' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_object_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1287 14:29:19 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1288 14:29:19 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1289 14:29:19 SQL Execute: select /*+ QCO9i QCOALL */ :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,'N' partitioned,'N' object_table,'Y' external_table,'N' nested,0 IOT_Type,'' IOT_Name,'N' temporary from sys.dba_objects a,sys.dba_external_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1290 14:29:19 SQL Execute: select object_id from public_dependency start with referenced_object_id=:obj_id connect by referenced_object_id=prior object_id 1291 14:29:19 SQL Execute: drop trigger TR_YJ_SF_FYMX00_INS 1292 14:29:19 SQL Execute: create or replace trigger TR_WZ_SF_FYMX00_INS Before insert on SF_FYMX00 FOR EACH ROW declare Vcounter number(10); ls_jls number(10); ls_WZID NUMBER(10); ls_SYZSL NUMBER(12,2); --剩余总数量 ls_CKLSJ NUMBER(14,4); --最高零售价 ls_CKPFJ NUMBER(14,4); --出库批发价,退费用 ls_PCSYZSL NUMBER(12,2); --批次剩余总数量 ls_KSKCID NUMBER(10) ; --科室库存ID ls_PH varchar2(20); --批号 ls_DQSYZSL NUMBER(12,2); --当前批次写完后,还需要的数量 ls_XMDJ NUMBER(12,4); --项目单价 ls_XMSL NUMBER(12,4); --项目数量 ls_MINSL NUMBER(12,4); --LEAST(ls_SYZSL,ls_XMSL) ls_yjdjh YJ_YW0000.YJDJH0%TYPE; begin select count(1) into Vcounter from xt_xtcs00 where name00='WZ_SFQYEJKF' and value0='Y'; if Vcounter=0 then return; end if; SELECT nvl(max(WZID00),0) into ls_WZID FROM WZ_WZXX00 WHERE sfyx00 = 'Y' and sxdm00<>'9' and gzhc00 <>'Y' and sfxmid=:new.xmbh00; if ls_WZID=0 or :new.xmsl00=0 or :new.ZXKS00=0 then return; end if; ls_SYZSL:=0; ls_DQSYZSL:=0; ls_XMDJ:=:new.xmdj00; ls_XMSL:=:new.xmsl00; if :new.xmsl00<0 then --退费 select nvl(max(ckpfj0),ls_XMDJ),nvl(min(PH0000),'') into ls_CKPFJ,ls_PH from WZ_KSKC00 where ksbmbh=:new.ZXKS00 and wzid00=ls_WZID and cklsj0=ls_XMDJ; :new.PH0000 := ls_PH; --批号回写费用明细表 insert into WZ_KSRCMX ( RCKMXH , --入出库明细ID--> SQ_WZ_KSRCMX_RCKMXH KCID00 , --库存ID-->WZ_KSRC00.RCKID0 KSBMBH , --科室部门编码 WZDMID , --消耗品内码 WZMC00 , --消耗品名称 WZSXMC , --属性名称 WZID00 , --消耗品基本信息号 CJID00 , --厂家流水号 GJMC00 , --国别 GG0000 , --规格 取自消耗品基本信息表中'消耗品规格'字段 PH0000 , --批号 CRKSL0 , --数量 WZDW00 , --消耗品单位,计量单位 SCJ000 , --市场价,即发票价格 CGJ000 , --采购价,即实际发生金额 CKPFJ0 , --出库批发加,即科室请领价 CKLSJ0 , --出库零售价,即病人使用价 ZJE000 , --总金额,实际采购价格乘入库数量 JCS000 , --库存数 -->WZ_KSKC00.KCZSL0 YYJCS0 , --已用库存数 -->WZ_KSKC00.YYZSL0 --JCSZ00 , --总表库存数 -->WZ_QYKC00.KCZSL0 --YYJCSZ , --总表已用库存数-->WZ_QYKC00.YYZSL0 RCKLB0 , --入出库类别 取值:1-2(入库;出库) KFBMBH , --库房部门编码 RCKLX0 , --入出库类型 取值:入库1-2(领回入库、盘盈入库) 出库1-2(写批号出库、盘亏出库) FHBMBH , --发货方编码 取自厂家表或部门编码表的编码 QRRQ00 , --确认日期 QRSJ00 , --确认时间,格式00:00:00 QRJSR0 , --确认经手人 MZZYBZ , --门诊住院标志 '0'门诊'1'住院 FYMXID ) select SQ_WZ_KSRCMX_RCKMXH.nextval , --入出库明细ID--> SQ_WZ_KSRCMX_RCKMXH -1 , --库存ID-->WZ_KSRC00.RCKID0 专用,允许库存负数 :new.ZXKS00 , --科室部门编码 a.WZDMID , --消耗品内码 b.WZMC00 , --消耗品名称 c.WZSXMC , --属性名称 WZID00 , --消耗品基本信息号 CJID00 , --厂家流水号 GJMC00 , --国别 WZGG00 , --规格 取自消耗品基本信息表中'消耗品规格'字段 ls_PH , --批号 ls_XMSL, --数量 a.JLDW00,--WZDW00 , --消耗品单位,计量单位 ls_CKPFJ,--SCJ000 , --市场价,即发票价格 ls_CKPFJ,--CGJ000 , --采购价,即实际发生金额 ls_CKPFJ,--CKPFJ0 , --出库批发加,即科室请领价 ls_XMDJ, --CKLSJ0 , --出库零售价,即病人使用价 round(ls_XMSL*ls_XMDJ,4), --总金额,实际零售价乘入库数量 --CKLSJ0 NULL , --结存数,物品出入库后的库存数 -->WZ_KSKC00.KCZSL0 NULL , --结存金额,物品出入库后的库存数 -->WZ_KSKC00.KCZJE0 --NULL , --总表结存数,物品出入库后的库存数 -->WZ_QYKC00.KCZSL0 --NULL , --总表结存金额,物品出入库后的库存数-->WZ_QYKC00.KCZJE0 '2' , --入出库类别 取值:1-2(入库;出库) :new.ZXKS00 ,--库房部门编码 '1' , --入出库类型 取值:入库1-2(领回入库、盘盈入库) 出库1-2(写批号出库、盘亏出库) :new.ZXKS00 , --发货方编码 取自厂家表或部门编码表的编码 TO_CHAR(SYSDATE,'YYYYMMDD'), --确认日期 TO_CHAR(SYSDATE,'HH24:MI:SS'), --确认时间,格式00:00:00 0, --确认人 '1', --门诊住院标志 '0'门诊'1'住院 :new.mxid00 --费用明细ID from WZ_WZXX00 a,BM_WZDM00 b,BM_WZSX00 c where a.WZID00=ls_WZID and a.WZDMID=b.WZDMID(+) and a.SXDM00=c.WZSXBH; else --收费 --先按单价判断 住院没有这一步 select nvl(sum(KCZSL0-YYZSL0),0),nvl(max(CKLSJ0),0),min(trim(PH0000)),count(1) into ls_SYZSL,ls_CKLSJ,ls_PH,ls_jls from WZ_KSKC00 where KSBMBH = :new.ZXKS00 and WZID00 = ls_WZID and CKLSJ0 = :new.XMDJ00 and KCZSL0 > YYZSL0; if ls_SYZSL<=0 then select nvl(sum(KCZSL0-YYZSL0),0),nvl(max(CKLSJ0),0),min(trim(PH0000)),count(1) into ls_SYZSL,ls_CKLSJ,ls_PH,ls_jls from WZ_KSKC00 where KSBMBH = :new.ZXKS00 and WZID00 = ls_WZID and KCZSL0 > YYZSL0; end if; ls_MINSL:= LEAST(ls_SYZSL,ls_XMSL); if ls_SYZSL>0 then --WZ_KSKC00 部分字段值修改放在触发器中控制 while ls_DQSYZSL0 then --第2次开始重新取最高零售价 --高价先出 (先进先出未做) select max(CKLSJ0),min(trim(PH0000)),count(1) into ls_CKLSJ,ls_PH,ls_jls from WZ_KSKC00 where KSBMBH = :new.ZXKS00 and WZID00 = ls_WZID and KCZSL0 <> YYZSL0; end if; --多批时,取最小批号 if ls_jls>1 then select min(trim(PH0000)) into ls_PH from WZ_KSKC00 where KSBMBH = :new.ZXKS00 and WZID00 = ls_WZID and KCZSL0 <> YYZSL0 and CKLSJ0 = ls_CKLSJ; end if; select KCZSL0-YYZSL0,KCID00 into ls_PCSYZSL,ls_KSKCID from WZ_KSKC00 where KSBMBH = :new.ZXKS00 and WZID00 = ls_WZID and KCZSL0 <> YYZSL0 and CKLSJ0 = ls_CKLSJ and trim(PH0000)||'PH'=ls_PH||'PH' and rownum=1; --写入科室入出明细表 1、 insert into WZ_KSRCMX ( RCKMXH ,KCID00 ,KSBMBH ,WZDMID ,WZMC00 ,WZSXMC ,WZID00 ,CJID00 ,GJMC00 ,GG0000 , PH0000 ,YXQ000 ,SXRQ00 ,CRKSL0 ,WZDW00 ,SCJ000 ,CGJ000 ,CKPFJ0 ,CKLSJ0 ,ZJE000 , JCS000 ,YYJCS0 ,RCKLB0 ,KFBMBH ,RCKLX0 ,FHBMBH ,QRRQ00 ,QRSJ00 ,QRJSR0 ,MZZYBZ ,FYMXID ) select SQ_WZ_KSRCMX_RCKMXH.nextval ,KCID00 ,KSBMBH ,WZDMID ,WZMC00 ,WZSXMC ,WZID00 ,CJID00 ,GJMC00 ,GG0000 , PH0000 ,YXQ000 ,SXRQ00 , decode(sign(ls_MINSL-ls_DQSYZSL-ls_PCSYZSL+0.0001),1,ls_PCSYZSL,ls_MINSL-ls_DQSYZSL), --数量 WZDW00 ,SCJ000 ,CGJ000 ,CKPFJ0 ,CKLSJ0 , round(decode(sign(ls_MINSL-ls_DQSYZSL-ls_PCSYZSL+0.0001),1,ls_PCSYZSL,ls_MINSL-ls_DQSYZSL)*CKLSJ0,4), --总金额,实际零售价乘入库数量 NULL ,NULL ,'2' ,KSBMBH ,'1' ,KSBMBH ,TO_CHAR(SYSDATE,'YYYYMMDD'),TO_CHAR(SYSDATE,'HH24:MI:SS'), 0,'1',:new.mxid00 from WZ_KSKC00 where KCID00=ls_KSKCID; --首批物资对应批号、价格回写 if ls_DQSYZSL=0 then :new.PH0000:=ls_PH; --批号回写费用明细表 /*if ls_CKLSJ<>ls_XMDJ then --减免金额字段是否需要改动?目前没改动 :NEW.XMDJ00:=ls_CKLSJ; :NEW.HJJE00:=ROUND(ls_CKLSJ*:NEW.XMSL00,2); :NEW.GFJE00:=ROUND(ls_CKLSJ/ls_XMDJ*:NEW.GFJE00,2); :NEW.JZJE00:=ROUND(ls_CKLSJ/ls_XMDJ*:NEW.JZJE00,2); :NEW.ZFJE00:=ROUND(ls_CKLSJ*:NEW.XMSL00-:NEW.GFJE00-:NEW.JZJE00,2); --业务计价表单价金额也要改变 if :new.flag00='1' or :new.flag00='4' then select yjdjh0 into ls_yjdjh from YJ_YWJJ00 where ID0000=:new.DJID00; update yj_yw0000 set sfdjh0=0 where yjdjh0=ls_yjdjh and sfdjh0+0 = :new.djh000; --update YJ_YWJJ00 set JJJE00=ls_CKLSJ where ID0000=:new.YJDJH0 and sfxmid=:new.xmbh00 and JJJE00=ls_XMDJ and sfcs00=:new.xmsl00; update YJ_YWJJ00 set JJJE00=ls_CKLSJ where ID0000=:new.DJID00; update yj_yw0000 set sfdjh0=:new.djh000 where yjdjh0=ls_yjdjh and sfdjh0+0 = 0; end if; end if; */ end if; ls_DQSYZSL:=ls_DQSYZSL+ls_PCSYZSL; end loop; --所有批次都不够用情况,科室库存表数量允许负数 if ls_DQSYZSL1 then select max(trim(PH0000)) into ls_PH from WZ_KSKC00 where KSBMBH = :new.ZXKS00 and WZID00 = ls_WZID and KCZSL0 < YYZSL0 and CKLSJ0 = ls_CKLSJ; select KCID00 into ls_KSKCID from WZ_KSKC00 where KSBMBH = :new.ZXKS00 and WZID00 = ls_WZID and KCZSL0 < YYZSL0 and CKLSJ0 = ls_CKLSJ and trim(PH0000)||'PH'=ls_PH||'PH' and rownum=1; end if; :new.PH0000 := ls_PH; --批号回写费用明细表 insert into WZ_KSRCMX ( RCKMXH ,KCID00 ,KSBMBH ,WZDMID ,WZMC00 ,WZSXMC ,WZID00 ,CJID00 ,GJMC00 ,GG0000 , PH0000 ,YXQ000 ,SXRQ00 ,CRKSL0 ,WZDW00 ,SCJ000 ,CGJ000 ,CKPFJ0 ,CKLSJ0 ,ZJE000 , JCS000 ,YYJCS0 ,RCKLB0 ,KFBMBH ,RCKLX0 ,FHBMBH ,QRRQ00 ,QRSJ00 ,QRJSR0 ,MZZYBZ ,FYMXID ) select SQ_WZ_KSRCMX_RCKMXH.nextval ,-1 ,KSBMBH ,WZDMID ,WZMC00 ,WZSXMC ,WZID00 ,CJID00 ,GJMC00 ,GG0000 , PH0000 ,YXQ000 ,SXRQ00 ,ls_XMSL,WZDW00 ,SCJ000 ,CGJ000 ,CKPFJ0 ,CKLSJ0 ,round(ls_XMSL*CKLSJ0,4), NULL ,NULL ,'2' ,KSBMBH ,'1' ,KSBMBH ,TO_CHAR(SYSDATE,'YYYYMMDD'),TO_CHAR(SYSDATE,'HH24:MI:SS'),0,'1',:new.mxid00 from WZ_KSKC00 where KCID00=ls_KSKCID; else --负库存不存在 写入科室入出明细表 3、 insert into WZ_KSRCMX ( RCKMXH ,KCID00 ,KSBMBH ,WZDMID ,WZMC00 ,WZSXMC ,WZID00 ,CJID00 ,GJMC00 ,GG0000 , CRKSL0 ,WZDW00 ,SCJ000 ,CGJ000 ,CKPFJ0 ,CKLSJ0 ,ZJE000 ,JCS000 ,YYJCS0 ,RCKLB0 , KFBMBH ,RCKLX0 ,FHBMBH ,QRRQ00 ,QRSJ00 ,QRJSR0 ,MZZYBZ ,FYMXID ) select SQ_WZ_KSRCMX_RCKMXH.nextval ,-1 ,:new.ZXKS00 ,a.WZDMID ,b.WZMC00 ,c.WZSXMC ,WZID00 ,CJID00 ,GJMC00 ,WZGG00 , ls_XMSL,a.JLDW00,ls_XMDJ,ls_XMDJ,ls_XMDJ,ls_XMDJ,round(ls_XMSL*ls_XMDJ,4),NULL ,NULL ,'2' , :new.ZXKS00 ,'1' ,:new.ZXKS00 ,TO_CHAR(SYSDATE,'YYYYMMDD'),TO_CHAR(SYSDATE,'HH24:MI:SS'),0,'1',:new.mxid00 from WZ_WZXX00 a,BM_WZDM00 b,BM_WZSX00 c where a.WZID00=ls_WZID and a.WZDMID=b.WZDMID(+) and a.SXDM00=c.WZSXBH; end if; end if; end if; end; 1293 14:29:20 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1294 14:29:20 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1295 14:29:20 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(instr(b.trigger_type,'BEFORE'),0,decode(instr(b.trigger_type,'AFTER'),0,decode(b.trigger_type,'INSTEAD OF',2,3),1),0) ty1,decode(instr(b.trigger_type,'STATEMENT'),0,decode(instr(b.trigger_type,'EACH ROW'),0,decode(instr(b.trigger_type,'EVENT'),0,3,2),1),0) ty2,decode(instr(b.triggering_event,'INSERT'),0,'N','Y') ev_ins,decode(instr(b.triggering_event,'UPDATE'),0,'N','Y') ev_upd,decode(instr(b.triggering_event,'DELETE'),0,'N','Y') ev_del,decode(instr(b.triggering_event,'STARTUP'),0,'N','Y') ev_startup,decode(instr(b.triggering_event,'SHUTDOWN'),0,'N','Y') ev_shutdown,decode(instr(b.triggering_event,'ERROR'),0,'N','Y') ev_error,decode(instr(b.triggering_event,'LOGON'),0,'N','Y') ev_logon,decode(instr(b.triggering_event,'LOGOFF'),0,'N','Y') ev_logoff,decode(instr(b.triggering_event,'CREATE'),0,'N','Y') ev_create,decode(instr(b.triggering_event,'ALTER'),0,'N','Y') ev_alter,decode(instr(b.triggering_event,'DROP'),0,'N','Y') ev_drop,decode(instr(b.triggering_event,'ANALYZE'),0,'N','Y') ev_analyze,decode(instr(b.triggering_event,'COMMENT'),0,'N','Y') ev_comment,decode(instr(b.triggering_event,'GRANT'),0,'N','Y') ev_grant,decode(instr(b.triggering_event,'REVOKE'),0,'N','Y') ev_revoke,decode(instr(b.triggering_event,'TRUNCATE'),0,'N','Y') ev_truncate,decode(instr(b.triggering_event,'RENAME'),0,'N','Y') ev_rename,decode(instr(b.triggering_event,' ASSOCIATE'),0,decode(substr(b.triggering_event,1,9),'ASSOCIATE','Y','N'),'Y') ev_associate,decode(instr(b.triggering_event,' AUDIT'),0,decode(substr(b.triggering_event,1,5),'AUDIT','Y','N'),'Y') ev_audit,decode(instr(b.triggering_event,' DISASSOCIATE'),0,decode(substr(b.triggering_event,1,12),'DISASSOCIATE','Y','N'),'Y') ev_disassociate,decode(instr(b.triggering_event,' NOAUDIT'),0,decode(substr(b.triggering_event,1,7),'NOAUDIT','Y','N'),'Y') ev_noaudit,decode(instr(b.triggering_event,'DDL'),0,'N','Y') ev_ddl,decode(rtrim(b.base_object_type),'TABLE',0,'VIEW',1,'SCHEMA',2,'DATABASE',3,4) base_type,b.table_owner,b.table_name,decode(b.status,'ENABLED','Y','N') enabled from user_objects a,user_triggers b where b.trigger_name like :object_name and a.object_name=b.trigger_name and a.object_type='TRIGGER' and b.trigger_name not in (select object_name from user_recyclebin where object_name=b.trigger_name) 1296 14:29:20 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1297 14:29:20 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1298 14:29:20 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(instr(b.trigger_type,'BEFORE'),0,decode(instr(b.trigger_type,'AFTER'),0,decode(b.trigger_type,'INSTEAD OF',2,3),1),0) ty1,decode(instr(b.trigger_type,'STATEMENT'),0,decode(instr(b.trigger_type,'EACH ROW'),0,decode(instr(b.trigger_type,'EVENT'),0,3,2),1),0) ty2,decode(instr(b.triggering_event,'INSERT'),0,'N','Y') ev_ins,decode(instr(b.triggering_event,'UPDATE'),0,'N','Y') ev_upd,decode(instr(b.triggering_event,'DELETE'),0,'N','Y') ev_del,decode(instr(b.triggering_event,'STARTUP'),0,'N','Y') ev_startup,decode(instr(b.triggering_event,'SHUTDOWN'),0,'N','Y') ev_shutdown,decode(instr(b.triggering_event,'ERROR'),0,'N','Y') ev_error,decode(instr(b.triggering_event,'LOGON'),0,'N','Y') ev_logon,decode(instr(b.triggering_event,'LOGOFF'),0,'N','Y') ev_logoff,decode(instr(b.triggering_event,'CREATE'),0,'N','Y') ev_create,decode(instr(b.triggering_event,'ALTER'),0,'N','Y') ev_alter,decode(instr(b.triggering_event,'DROP'),0,'N','Y') ev_drop,decode(instr(b.triggering_event,'ANALYZE'),0,'N','Y') ev_analyze,decode(instr(b.triggering_event,'COMMENT'),0,'N','Y') ev_comment,decode(instr(b.triggering_event,'GRANT'),0,'N','Y') ev_grant,decode(instr(b.triggering_event,'REVOKE'),0,'N','Y') ev_revoke,decode(instr(b.triggering_event,'TRUNCATE'),0,'N','Y') ev_truncate,decode(instr(b.triggering_event,'RENAME'),0,'N','Y') ev_rename,decode(instr(b.triggering_event,' ASSOCIATE'),0,decode(substr(b.triggering_event,1,9),'ASSOCIATE','Y','N'),'Y') ev_associate,decode(instr(b.triggering_event,' AUDIT'),0,decode(substr(b.triggering_event,1,5),'AUDIT','Y','N'),'Y') ev_audit,decode(instr(b.triggering_event,' DISASSOCIATE'),0,decode(substr(b.triggering_event,1,12),'DISASSOCIATE','Y','N'),'Y') ev_disassociate,decode(instr(b.triggering_event,' NOAUDIT'),0,decode(substr(b.triggering_event,1,7),'NOAUDIT','Y','N'),'Y') ev_noaudit,decode(instr(b.triggering_event,'DDL'),0,'N','Y') ev_ddl,decode(rtrim(b.base_object_type),'TABLE',0,'VIEW',1,'SCHEMA',2,'DATABASE',3,4) base_type,b.table_owner,b.table_name,decode(b.status,'ENABLED','Y','N') enabled from user_objects a,user_triggers b where b.trigger_name like :object_name and a.object_name=b.trigger_name and a.object_type='TRIGGER' and b.trigger_name not in (select object_name from user_recyclebin where object_name=b.trigger_name) 1299 14:29:20 SQL Execute: select to_char(sequence) sequence,to_char(line) line,to_char(position) position,text from user_errors where name=:object_name and type=:object_type 1300 14:29:20 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1301 14:29:20 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1302 14:29:20 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'N' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' and b.dropped='NO' 1303 14:29:20 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1304 14:29:20 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1305 14:29:20 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'Y' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_object_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1306 14:29:20 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1307 14:29:20 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1308 14:29:20 SQL Execute: select /*+ QCO9i QCOALL */ :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,'N' partitioned,'N' object_table,'Y' external_table,'N' nested,0 IOT_Type,'' IOT_Name,'N' temporary from sys.dba_objects a,sys.dba_external_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1309 14:29:20 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1310 14:29:20 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1311 14:29:20 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'N' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' and b.dropped='NO' 1312 14:29:20 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1313 14:29:20 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1314 14:29:20 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'Y' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_object_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1315 14:29:20 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1316 14:29:20 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1317 14:29:20 SQL Execute: select /*+ QCO9i QCOALL */ :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,'N' partitioned,'N' object_table,'Y' external_table,'N' nested,0 IOT_Type,'' IOT_Name,'N' temporary from sys.dba_objects a,sys.dba_external_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1318 14:29:20 SQL Execute: select object_id from public_dependency start with referenced_object_id=:obj_id connect by referenced_object_id=prior object_id 1319 14:29:20 SQL Execute: CREATE OR REPLACE TRIGGER TR_WZ_RCK000_WPSH00 AFTER UPDATE OF ZTBZ00 ON WZ_RCK000 REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW WHEN (NEW.ZTBZ00='3' AND OLD.ZTBZ00='2' AND OLD.RCKLB0='1') DECLARE v_RKDYXSH XT_XTCS00.value0%type; v_COUNT0 NUMBER(5); E_FPH_IS_NULL EXCEPTION; -- MODIFICATION HISTORY -- Person Date Comments -- YANGH 2009.12.16 CREATE:入库单审核,发票号为空不允许审核 -- --------- ------ ------------------------------------------- BEGIN begin select trim(value0) into v_RKDYXSH from xt_xtcs00 where name00='WZ_RKDFPWKSFYXSH'; exception when others then v_RKDYXSH:='Y'; end; IF v_RKDYXSH = 'N' THEN SELECT COUNT(1) INTO v_COUNT0 FROM WZ_RCKMX0 WHERE RCKID0=:NEW.RCKID0 AND FPH000 IS NULL; IF v_COUNT0 > 0 THEN RAISE E_FPH_IS_NULL; END IF; END IF; EXCEPTION WHEN E_FPH_IS_NULL THEN RAISE_APPLICATION_ERROR(-20007, '入库单审核时,物品发票号为空,无法审核!*'); WHEN OTHERS THEN RAISE_APPLICATION_ERROR(-20003, '出入库单确认修改库存发生意外错误!*返回信息:'||SQLCODE||SQLERRM); END; 1320 14:29:20 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1321 14:29:20 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1322 14:29:20 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(instr(b.trigger_type,'BEFORE'),0,decode(instr(b.trigger_type,'AFTER'),0,decode(b.trigger_type,'INSTEAD OF',2,3),1),0) ty1,decode(instr(b.trigger_type,'STATEMENT'),0,decode(instr(b.trigger_type,'EACH ROW'),0,decode(instr(b.trigger_type,'EVENT'),0,3,2),1),0) ty2,decode(instr(b.triggering_event,'INSERT'),0,'N','Y') ev_ins,decode(instr(b.triggering_event,'UPDATE'),0,'N','Y') ev_upd,decode(instr(b.triggering_event,'DELETE'),0,'N','Y') ev_del,decode(instr(b.triggering_event,'STARTUP'),0,'N','Y') ev_startup,decode(instr(b.triggering_event,'SHUTDOWN'),0,'N','Y') ev_shutdown,decode(instr(b.triggering_event,'ERROR'),0,'N','Y') ev_error,decode(instr(b.triggering_event,'LOGON'),0,'N','Y') ev_logon,decode(instr(b.triggering_event,'LOGOFF'),0,'N','Y') ev_logoff,decode(instr(b.triggering_event,'CREATE'),0,'N','Y') ev_create,decode(instr(b.triggering_event,'ALTER'),0,'N','Y') ev_alter,decode(instr(b.triggering_event,'DROP'),0,'N','Y') ev_drop,decode(instr(b.triggering_event,'ANALYZE'),0,'N','Y') ev_analyze,decode(instr(b.triggering_event,'COMMENT'),0,'N','Y') ev_comment,decode(instr(b.triggering_event,'GRANT'),0,'N','Y') ev_grant,decode(instr(b.triggering_event,'REVOKE'),0,'N','Y') ev_revoke,decode(instr(b.triggering_event,'TRUNCATE'),0,'N','Y') ev_truncate,decode(instr(b.triggering_event,'RENAME'),0,'N','Y') ev_rename,decode(instr(b.triggering_event,' ASSOCIATE'),0,decode(substr(b.triggering_event,1,9),'ASSOCIATE','Y','N'),'Y') ev_associate,decode(instr(b.triggering_event,' AUDIT'),0,decode(substr(b.triggering_event,1,5),'AUDIT','Y','N'),'Y') ev_audit,decode(instr(b.triggering_event,' DISASSOCIATE'),0,decode(substr(b.triggering_event,1,12),'DISASSOCIATE','Y','N'),'Y') ev_disassociate,decode(instr(b.triggering_event,' NOAUDIT'),0,decode(substr(b.triggering_event,1,7),'NOAUDIT','Y','N'),'Y') ev_noaudit,decode(instr(b.triggering_event,'DDL'),0,'N','Y') ev_ddl,decode(rtrim(b.base_object_type),'TABLE',0,'VIEW',1,'SCHEMA',2,'DATABASE',3,4) base_type,b.table_owner,b.table_name,decode(b.status,'ENABLED','Y','N') enabled from user_objects a,user_triggers b where b.trigger_name like :object_name and a.object_name=b.trigger_name and a.object_type='TRIGGER' and b.trigger_name not in (select object_name from user_recyclebin where object_name=b.trigger_name) 1323 14:29:20 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1324 14:29:20 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1325 14:29:20 SQL Execute: select USER owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(instr(b.trigger_type,'BEFORE'),0,decode(instr(b.trigger_type,'AFTER'),0,decode(b.trigger_type,'INSTEAD OF',2,3),1),0) ty1,decode(instr(b.trigger_type,'STATEMENT'),0,decode(instr(b.trigger_type,'EACH ROW'),0,decode(instr(b.trigger_type,'EVENT'),0,3,2),1),0) ty2,decode(instr(b.triggering_event,'INSERT'),0,'N','Y') ev_ins,decode(instr(b.triggering_event,'UPDATE'),0,'N','Y') ev_upd,decode(instr(b.triggering_event,'DELETE'),0,'N','Y') ev_del,decode(instr(b.triggering_event,'STARTUP'),0,'N','Y') ev_startup,decode(instr(b.triggering_event,'SHUTDOWN'),0,'N','Y') ev_shutdown,decode(instr(b.triggering_event,'ERROR'),0,'N','Y') ev_error,decode(instr(b.triggering_event,'LOGON'),0,'N','Y') ev_logon,decode(instr(b.triggering_event,'LOGOFF'),0,'N','Y') ev_logoff,decode(instr(b.triggering_event,'CREATE'),0,'N','Y') ev_create,decode(instr(b.triggering_event,'ALTER'),0,'N','Y') ev_alter,decode(instr(b.triggering_event,'DROP'),0,'N','Y') ev_drop,decode(instr(b.triggering_event,'ANALYZE'),0,'N','Y') ev_analyze,decode(instr(b.triggering_event,'COMMENT'),0,'N','Y') ev_comment,decode(instr(b.triggering_event,'GRANT'),0,'N','Y') ev_grant,decode(instr(b.triggering_event,'REVOKE'),0,'N','Y') ev_revoke,decode(instr(b.triggering_event,'TRUNCATE'),0,'N','Y') ev_truncate,decode(instr(b.triggering_event,'RENAME'),0,'N','Y') ev_rename,decode(instr(b.triggering_event,' ASSOCIATE'),0,decode(substr(b.triggering_event,1,9),'ASSOCIATE','Y','N'),'Y') ev_associate,decode(instr(b.triggering_event,' AUDIT'),0,decode(substr(b.triggering_event,1,5),'AUDIT','Y','N'),'Y') ev_audit,decode(instr(b.triggering_event,' DISASSOCIATE'),0,decode(substr(b.triggering_event,1,12),'DISASSOCIATE','Y','N'),'Y') ev_disassociate,decode(instr(b.triggering_event,' NOAUDIT'),0,decode(substr(b.triggering_event,1,7),'NOAUDIT','Y','N'),'Y') ev_noaudit,decode(instr(b.triggering_event,'DDL'),0,'N','Y') ev_ddl,decode(rtrim(b.base_object_type),'TABLE',0,'VIEW',1,'SCHEMA',2,'DATABASE',3,4) base_type,b.table_owner,b.table_name,decode(b.status,'ENABLED','Y','N') enabled from user_objects a,user_triggers b where b.trigger_name like :object_name and a.object_name=b.trigger_name and a.object_type='TRIGGER' and b.trigger_name not in (select object_name from user_recyclebin where object_name=b.trigger_name) 1326 14:29:20 SQL Execute: select to_char(sequence) sequence,to_char(line) line,to_char(position) position,text from user_errors where name=:object_name and type=:object_type 1327 14:29:20 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1328 14:29:20 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1329 14:29:20 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'N' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' and b.dropped='NO' 1330 14:29:20 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1331 14:29:20 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1332 14:29:20 SQL Execute: select :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,decode(b.partitioned,'YES','Y','NO','N') partitioned,'Y' object_table,'N' external_table,decode(b.nested,'YES','Y','N') nested,decode(b.IOT_Type,'IOT',1,'IOT_OVERFLOW',2,0) IOT_Type,b.IOT_Name,b.temporary from sys.dba_objects a,sys.dba_object_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1333 14:29:20 SQL Execute: DECLARE intval BINARY_INTEGER; strval VARCHAR2(256); partyp BINARY_INTEGER; BEGIN partyp := dbms_utility.get_parameter_value('O7_DICTIONARY_ACCESSIBILITY', intval, strval); :DICT_ACCESS := partyp; END; 1334 14:29:20 SQL Execute: select 'x' from session_privs where privilege='SELECT ANY DICTIONARY' 1335 14:29:20 SQL Execute: select /*+ QCO9i QCOALL */ :schema owner,a.object_name,a.object_id,a.created,a.last_ddl_time,decode(a.status,'VALID',0,'INVALID',1,2) status,'N' partitioned,'N' object_table,'Y' external_table,'N' nested,0 IOT_Type,'' IOT_Name,'N' temporary from sys.dba_objects a,sys.dba_external_tables b where b.owner=:schema and b.table_name like :object_name and a.owner=:schema and a.object_name=b.table_name and a.object_type='TABLE' 1336 14:29:20 SQL Execute: select object_id from public_dependency start with referenced_object_id=:obj_id connect by referenced_object_id=prior object_id 1337 14:48:25 Log started for: 库存物资管理子系统 1338 14:48:25 SQL Prepare: ORACLE - Insert into sd_Hospital.XT_XTLJ00(IP0000,XTDM00,PROGRAM,SID000,serial,LJRQ00,LJSJ00,BZ0000) Select '192.168.13.206','K',trim(PROGRAM)||'+'||'库存物资管理子系统',SID,serial# ,'20100129','14:48:21','scott@9998:593A26A69DD9EF0DCCFF382663D064F0' from v$session where AUDSID=(Select userenv('SESSIONID') from dual where rownum=1) 1339 14:48:25 SQL Execute: ORACLE - Insert into sd_Hospital.XT_XTLJ00(IP0000,XTDM00,PROGRAM,SID000,serial,LJRQ00,LJSJ00,BZ0000) Select '192.168.13.206','K',trim(PROGRAM)||'+'||'库存物资管理子系统',SID,serial# ,'20100129','14:48:21','scott@9998:593A26A69DD9EF0DCCFF382663D064F0' from v$session where AUDSID=(Select userenv('SESSIONID') from dual where rownum=1) 1340 14:48:25 SQL Data In: ORACLE - Rows affected = 1 1341 14:48:25 SQL Prepare: ORACLE - Commit 1342 14:48:25 SQL Execute: ORACLE - Commit 1343 14:48:25 SQL Data In: ORACLE - Rows affected = 0 1344 14:48:25 SQL Prepare: ORACLE - Select SJKMM0,SJKKL0 from XT_DBMS00 where SYZT00='1' and Upper(SJKYH0)='SD_HOSPITAL' 1345 14:48:25 SQL Execute: ORACLE - Select SJKMM0,SJKKL0 from XT_DBMS00 where SYZT00='1' and Upper(SJKYH0)='SD_HOSPITAL' 1346 14:48:25 SQL Prepare: ORACLE - select YYID00 from XT_YYXX00 where YYID00='222137' 1347 14:48:25 SQL Execute: ORACLE - select YYID00 from XT_YYXX00 where YYID00='222137' 1348 14:48:25 SQL Prepare: ORACLE - select YGBH00 from BM_YGBM00 where UPPER(XKH000)='9998' and CZBZ00 in ('1') 1349 14:48:25 SQL Execute: ORACLE - select YGBH00 from BM_YGBM00 where UPPER(XKH000)='9998' and CZBZ00 in ('1') 1350 14:48:26 SQL Prepare: ORACLE - Insert into XT_XTLJ00(IP0000,XTDM00,PROGRAM,SID000,serial,LJRQ00,LJSJ00,BZ0000) Select '192.168.13.206','K',trim(PROGRAM)||'+'||'库存物资管理子系统',SID,serial# ,'20100129','14:48:21','sd_Hospital@9998:1E8C9DF382D550C78EA821B3F1AE0DFA' from v$session where AUDSID=(Select userenv('SESSIONID') from dual where rownum=1) 1351 14:48:26 SQL Execute: ORACLE - Insert into XT_XTLJ00(IP0000,XTDM00,PROGRAM,SID000,serial,LJRQ00,LJSJ00,BZ0000) Select '192.168.13.206','K',trim(PROGRAM)||'+'||'库存物资管理子系统',SID,serial# ,'20100129','14:48:21','sd_Hospital@9998:1E8C9DF382D550C78EA821B3F1AE0DFA' from v$session where AUDSID=(Select userenv('SESSIONID') from dual where rownum=1) 1352 14:48:26 SQL Data In: ORACLE - Rows affected = 1 1353 14:48:26 SQL Prepare: ORACLE - Commit 1354 14:48:26 SQL Execute: ORACLE - Commit 1355 14:48:26 SQL Data In: ORACLE - Rows affected = 0 1356 14:48:26 SQL Prepare: ORACLE - select DLFS00,MMXSF0 from XT_YYXT00 where XTDM00='K' 1357 14:48:26 SQL Execute: ORACLE - select DLFS00,MMXSF0 from XT_YYXT00 where XTDM00='K' 1358 14:48:26 SQL Prepare: ORACLE - select YGBH00,YHKL00,DLMM00 from BM_YGBM00 where UPPER(XKH000)='9998' and CZBZ00 in ('1') 1359 14:48:26 SQL Execute: ORACLE - select YGBH00,YHKL00,DLMM00 from BM_YGBM00 where UPPER(XKH000)='9998' and CZBZ00 in ('1') 1360 14:48:26 SQL Prepare: ORACLE - Select SYSDATE from Dual 1361 14:48:26 SQL Execute: ORACLE - Select SYSDATE from Dual 1362 14:48:26 SQL Prepare: ORACLE - Select INSTANCE_NAME,HOST_NAME from V$INSTANCE 1363 14:48:26 SQL Execute: ORACLE - Select INSTANCE_NAME,HOST_NAME from V$INSTANCE 1364 14:48:26 SQL Prepare: ORACLE - Select XTBB00,BBXH00,BMXZ00 from XT_YYXT00 where XTDM00='K' 1365 14:48:26 SQL Execute: ORACLE - Select XTBB00,BBXH00,BMXZ00 from XT_YYXT00 where XTDM00='K' 1366 14:48:26 SQL Prepare: ORACLE - Select * from XT_YYXX00 where flag00 in ('0','1') order by flag00 desc 1367 14:48:26 SQL Execute: ORACLE - Select * from XT_YYXX00 where flag00 in ('0','1') order by flag00 desc 1368 14:48:26 SQL Prepare: ORACLE - Select KLDH00,KLLB00,KHQZBH From IC_KLDM00 where SYBZ00 <> '0' and KLDH00 not in ('ALL','YY-ALL','YB-ALL','CK','JMCK') Order by SYBZ00 1369 14:48:26 SQL Execute: ORACLE - Select KLDH00,KLLB00,KHQZBH From IC_KLDM00 where SYBZ00 <> '0' and KLDH00 not in ('ALL','YY-ALL','YB-ALL','CK','JMCK') Order by SYBZ00 1370 14:48:26 SQL Prepare: ORACLE - Select KLDH00,KLLB00,KHQZBH from IC_KLDM00 where SYBZ00 <> '0' and KLDH00 not in ('ALL','YY-ALL','YB-ALL','CK','JMCK') and KLDH00 = '' 1371 14:48:26 SQL Execute: ORACLE - Select KLDH00,KLLB00,KHQZBH from IC_KLDM00 where SYBZ00 <> '0' and KLDH00 not in ('ALL','YY-ALL','YB-ALL','CK','JMCK') and KLDH00 = '' 1372 14:48:26 SQL Prepare: ORACLE - Select BMMC00,BMBH00 from BM_BMBM00 where FLAG00='1' and BMXZ00 in ('c','9','1','5','2','a','8','4','6','3') and BMBH00 in (Select BMBH00 from VW_XT_YHBMQX where XTDM00='K' and YGBH00=(select YGBH00 from BM_YGBM00 where CZBZ00='1' and Upper(XKH000)='9998')) order by BH0000 1373 14:48:26 SQL Execute: ORACLE - Select BMMC00,BMBH00 from BM_BMBM00 where FLAG00='1' and BMXZ00 in ('c','9','1','5','2','a','8','4','6','3') and BMBH00 in (Select BMBH00 from VW_XT_YHBMQX where XTDM00='K' and YGBH00=(select YGBH00 from BM_YGBM00 where CZBZ00='1' and Upper(XKH000)='9998')) order by BH0000 1374 14:48:29 SQL Prepare: ORACLE - Select '0' as XTDM00 from dual where '9998'='super' union Select XTDM00 from XT_ZBQX00 where XTDM00= 'K' and ZBDM00 in ( Select ZBDM00 from VW_XT_YHZB00 where YGBH00=(select YGBH00 from BM_YGBM00 where CZBZ00='1' and Upper(XKH000)='9998')) 1375 14:48:29 SQL Execute: ORACLE - Select '0' as XTDM00 from dual where '9998'='super' union Select XTDM00 from XT_ZBQX00 where XTDM00= 'K' and ZBDM00 in ( Select ZBDM00 from VW_XT_YHZB00 where YGBH00=(select YGBH00 from BM_YGBM00 where CZBZ00='1' and Upper(XKH000)='9998')) 1376 14:48:29 SQL Prepare: ORACLE - select ZWXM00,XKH000 from BM_YGBM00 where YGBH00=476 1377 14:48:29 SQL Execute: ORACLE - select ZWXM00,XKH000 from BM_YGBM00 where YGBH00=476 1378 14:48:29 SQL Prepare: ORACLE - Select * From XT_YYXX00 where flag00 in ('0','1') order by flag00 desc 1379 14:48:29 SQL Execute: ORACLE - Select * From XT_YYXX00 where flag00 in ('0','1') order by flag00 desc 1380 14:48:29 SQL Prepare: ORACLE - Select distinct ZBJB00 from XT_XTZB00 where ZBDM00 ='00' 1381 14:48:29 SQL Execute: ORACLE - Select distinct ZBJB00 from XT_XTZB00 where ZBDM00 ='00' 1382 14:48:29 SQL Prepare: ORACLE - Select userenv('SESSIONID') PROCESS from dual where rownum=1 1383 14:48:29 SQL Execute: ORACLE - Select userenv('SESSIONID') PROCESS from dual where rownum=1 1384 14:48:29 SQL Prepare: ORACLE - Select SQ_XT_XTRZ00_LSH000.NextVal SID from Dual 1385 14:48:29 SQL Execute: ORACLE - Select SQ_XT_XTRZ00_LSH000.NextVal SID from Dual 1386 14:48:29 SQL Prepare: ORACLE - select trim(IP0000)||'#'||trim(to_char(SID000))||':'||trim(to_char(SERIAL))||'@'||trim(PROGRAM) BZ0000 from XT_XTLJ00 where (SID000,SERIAL) in (select SID,SERIAL# from V$session where AUDSID= userenv('SESSIONID')) 1387 14:48:29 SQL Execute: ORACLE - select trim(IP0000)||'#'||trim(to_char(SID000))||':'||trim(to_char(SERIAL))||'@'||trim(PROGRAM) BZ0000 from XT_XTLJ00 where (SID000,SERIAL) in (select SID,SERIAL# from V$session where AUDSID= userenv('SESSIONID')) 1388 14:48:29 SQL Prepare: ORACLE - Insert into XT_XTRZ00(LSH000,YGBH00,DLJSJ0,XTDM00,JCID00,BZ0000,DLKS00) Values(1892227,476,'wlzx-2','K',nvl('88458',' '),'192.168.13.206#134:13406@prjSB_KCWZ.exe+库存物资管理子系统',208) 1389 14:48:29 SQL Execute: ORACLE - Insert into XT_XTRZ00(LSH000,YGBH00,DLJSJ0,XTDM00,JCID00,BZ0000,DLKS00) Values(1892227,476,'wlzx-2','K',nvl('88458',' '),'192.168.13.206#134:13406@prjSB_KCWZ.exe+库存物资管理子系统',208) 1390 14:48:29 SQL Data In: ORACLE - Rows affected = 1 1391 14:48:29 SQL Prepare: ORACLE - Commit 1392 14:48:29 SQL Execute: ORACLE - Commit 1393 14:48:29 SQL Data In: ORACLE - Rows affected = 0 1394 14:48:29 SQL Prepare: ORACLE - select YYID00 from BM_BMBM00 where BMBH00= 208 1395 14:48:29 SQL Execute: ORACLE - select YYID00 from BM_BMBM00 where BMBH00= 208 1396 14:48:29 SQL Prepare: ORACLE - select YYBZ10,YYBZ20,YYQC00,YYJC00 from XT_YYXX00 where YYID00= '222137' 1397 14:48:29 SQL Execute: ORACLE - select YYBZ10,YYBZ20,YYQC00,YYJC00 from XT_YYXX00 where YYID00= '222137' 1398 14:48:29 SQL Prepare: ORACLE - Select JQBH00 from XT_SQIPDZ where IP0000='192.168.13.206' 1399 14:48:29 SQL Execute: ORACLE - Select JQBH00 from XT_SQIPDZ where IP0000='192.168.13.206' 1400 14:48:29 SQL Prepare: ORACLE - select NAME00,VALUE0 from XT_XTCS00 where NAME00 in ('XT_SQIPDZ','YF_CKJRZTXG') 1401 14:48:29 SQL Execute: ORACLE - select NAME00,VALUE0 from XT_XTCS00 where NAME00 in ('XT_SQIPDZ','YF_CKJRZTXG') 1402 14:48:29 SQL Prepare: ORACLE - select CKBH00,CKMC00,ZT0000 from BM_CKBM00 where BMBH00= 208 and FLAG00 like '%' order by decode(CKBH00,0,0,1),decode(JQBH00,0,0,1),ZT0000 desc,CKBH00 1403 14:48:29 SQL Execute: ORACLE - select CKBH00,CKMC00,ZT0000 from BM_CKBM00 where BMBH00= 208 and FLAG00 like '%' order by decode(CKBH00,0,0,1),decode(JQBH00,0,0,1),ZT0000 desc,CKBH00 1404 14:48:29 SQL Prepare: ORACLE - select value0 from xt_yhcs00 where ygbh00='476' and name00='SYSTEMSKIN' 1405 14:48:29 SQL Execute: ORACLE - select value0 from xt_yhcs00 where ygbh00='476' and name00='SYSTEMSKIN' 1406 14:48:29 SQL Prepare: ORACLE - select count(*) from vw_ht_xttsxx where (XTDM00='-1' or XTDM00='K') and YXQ000>='20100129' 1407 14:48:29 SQL Execute: ORACLE - select count(*) from vw_ht_xttsxx where (XTDM00='-1' or XTDM00='K') and YXQ000>='20100129' 1408 14:48:29 SQL Prepare: ORACLE - SELECT * FROM XT_XTCS00 WHERE NAME00 IN('HT_SFQYXTXXTSGN') 1409 14:48:29 SQL Execute: ORACLE - SELECT * FROM XT_XTCS00 WHERE NAME00 IN('HT_SFQYXTXXTSGN') 1410 14:48:29 SQL Prepare: ORACLE - SELECT * FROM XT_XTCS00 WHERE NAME00 IN('HT_XTXXTSSJJG') 1411 14:48:29 SQL Execute: ORACLE - SELECT * FROM XT_XTCS00 WHERE NAME00 IN('HT_XTXXTSSJJG') 1412 14:48:29 SQL Prepare: ORACLE - SELECT BMXZ00 FROM BM_BMBM00 WHERE BMBH00=208 1413 14:48:29 SQL Execute: ORACLE - SELECT BMXZ00 FROM BM_BMBM00 WHERE BMBH00=208 1414 14:48:29 SQL Prepare: ORACLE - SELECT 1 EXIST FROM XT_YYXT00 WHERE XTDM00='K' AND BMXZ00 LIKE '%c%' 1415 14:48:29 SQL Execute: ORACLE - SELECT 1 EXIST FROM XT_YYXT00 WHERE XTDM00='K' AND BMXZ00 LIKE '%c%' 1416 14:48:29 SQL Prepare: ORACLE - select OBJECT_NAME from user_objects where object_type='TRIGGER' AND OBJECT_NAME LIKE 'TR_WZ_%' AND STATUS<>'VALID' 1417 14:48:29 SQL Execute: ORACLE - select OBJECT_NAME from user_objects where object_type='TRIGGER' AND OBJECT_NAME LIKE 'TR_WZ_%' AND STATUS<>'VALID' 1418 14:48:29 SQL Prepare: ORACLE - delete SD_SB.WZ_TEMP00 1419 14:48:29 SQL Execute: ORACLE - delete SD_SB.WZ_TEMP00 1420 14:48:29 SQL Data In: ORACLE - Rows affected = 3087 1421 14:48:29 SQL Prepare: ORACLE - Commit 1422 14:48:29 SQL Execute: ORACLE - Commit 1423 14:48:29 SQL Data In: ORACLE - Rows affected = 0 1424 14:48:29 SQL Prepare: ORACLE - select * from XT_XTCS00 where name00 like 'WZ_%' 1425 14:48:29 SQL Execute: ORACLE - select * from XT_XTCS00 where name00 like 'WZ_%' 1426 14:48:29 SQL Prepare: ORACLE - select * from XT_YHCS00 where YGBH00=476 1427 14:48:29 SQL Execute: ORACLE - select * from XT_YHCS00 where YGBH00=476 1428 14:48:29 SQL Prepare: ORACLE - select MKDM00,MKNBMC,MKWBMC from XT_XTMK00 where XTDM00='K' and (( 476= 0) or (BZ0000<>'0' and MKDM00 in (select MKDM00 from XT_ZBQX00 where XTDM00='K' and ZBDM00 in ( select ZBDM00 from VW_XT_YHZB00 where YGBH00=476)))) 1429 14:48:29 SQL Execute: ORACLE - select MKDM00,MKNBMC,MKWBMC from XT_XTMK00 where XTDM00='K' and (( 476= 0) or (BZ0000<>'0' and MKDM00 in (select MKDM00 from XT_ZBQX00 where XTDM00='K' and ZBDM00 in ( select ZBDM00 from VW_XT_YHZB00 where YGBH00=476)))) 1430 14:48:29 SQL Prepare: ORACLE - select MKDM00,MKWBMC,C.F_TYPENAME from XT_XTMK00 A,T_CTLTEMP B,T_TEMPTYPE C where A.MKDM00 like 'K$%' and A.XTDM00='K' and trim(A.MKDM00)='K$'||trim(B.F_TEMPID) AND TRIM(A.XTDM00)=TRIM(B.F_SYSID) AND B.F_TEMPTYPE=C.F_TYPEID AND B.F_SYSID=C.F_SYSID AND BZ0000<>'0'ORDER BY B.F_TEMPTYPE,A.MKDM00 1431 14:48:29 SQL Execute: ORACLE - select MKDM00,MKWBMC,C.F_TYPENAME from XT_XTMK00 A,T_CTLTEMP B,T_TEMPTYPE C where A.MKDM00 like 'K$%' and A.XTDM00='K' and trim(A.MKDM00)='K$'||trim(B.F_TEMPID) AND TRIM(A.XTDM00)=TRIM(B.F_SYSID) AND B.F_TEMPTYPE=C.F_TYPEID AND B.F_SYSID=C.F_SYSID AND BZ0000<>'0'ORDER BY B.F_TEMPTYPE,A.MKDM00 1432 14:48:29 SQL Prepare: ORACLE - select count(*) from XT_XTMK00 A,BB_FR3BB0 B,BB_MBLX00 C where A.XTDM00='0' and trim(A.MKDM00)='0@'||trim(B.BBID00) AND B.ZT0000='0' AND B.MBLX00=C.MBLX00 AND ((476= 0) or (BZ0000<>'0' and MKDM00 in (select MKDM00 from XT_ZBQX00 where XTDM00='0' and ZBDM00 in ( select ZBDM00 from VW_XT_YHZB00 where YGBH00=476)))) 1433 14:48:29 SQL Execute: ORACLE - select count(*) from XT_XTMK00 A,BB_FR3BB0 B,BB_MBLX00 C where A.XTDM00='0' and trim(A.MKDM00)='0@'||trim(B.BBID00) AND B.ZT0000='0' AND B.MBLX00=C.MBLX00 AND ((476= 0) or (BZ0000<>'0' and MKDM00 in (select MKDM00 from XT_ZBQX00 where XTDM00='0' and ZBDM00 in ( select ZBDM00 from VW_XT_YHZB00 where YGBH00=476)))) 1434 14:48:29 SQL Prepare: ORACLE - select MKDM00,MKNBMC,MKWBMC from XT_XTMK00 where XTDM00='+' 1435 14:48:29 SQL Execute: ORACLE - select MKDM00,MKNBMC,MKWBMC from XT_XTMK00 where XTDM00='+' 1436 14:48:29 SQL Prepare: ORACLE - select MKDM00,MKNBMC,MKWBMC from XT_XTMK00 where XTDM00='+' and (( 476= 0) or (BZ0000<>'0' and MKDM00 in (select MKDM00 from XT_ZBQX00 where XTDM00='+' and ZBDM00 in ( select ZBDM00 from VW_XT_YHZB00 where YGBH00=476)))) 1437 14:48:29 SQL Execute: ORACLE - select MKDM00,MKNBMC,MKWBMC from XT_XTMK00 where XTDM00='+' and (( 476= 0) or (BZ0000<>'0' and MKDM00 in (select MKDM00 from XT_ZBQX00 where XTDM00='+' and ZBDM00 in ( select ZBDM00 from VW_XT_YHZB00 where YGBH00=476)))) 1438 14:48:31 SQL Prepare: ORACLE - SELECT YGBH00,ZWXM00 FROM BM_YGBM00 WHERE YGXZ00 like'%6%' 1439 14:48:31 SQL Execute: ORACLE - SELECT YGBH00,ZWXM00 FROM BM_YGBM00 WHERE YGXZ00 like'%6%' 1440 14:48:31 SQL Prepare: ORACLE - SELECT RCKBBH,RCKBMC FROM BM_RCKLB0 WHERE RCKBZ0 = '1' AND SFYX00 = 'Y' order by RCKBBH 1441 14:48:31 SQL Execute: ORACLE - SELECT RCKBBH,RCKBMC FROM BM_RCKLB0 WHERE RCKBZ0 = '1' AND SFYX00 = 'Y' order by RCKBBH 1442 14:48:31 SQL Prepare: ORACLE - select * from WZ_RCK000 where RCKLB0='1' and KFBMBH=208 and ZTBZ00='1' order by RCKID0 1443 14:48:31 SQL Execute: ORACLE - select * from WZ_RCK000 where RCKLB0='1' and KFBMBH=208 and ZTBZ00='1' order by RCKID0 1444 14:48:31 SQL Prepare: ORACLE - SELECT * FROM VW_WZ_RCKMX0 WHERE RCKID0=0 1445 14:48:31 SQL Execute: ORACLE - SELECT * FROM VW_WZ_RCKMX0 WHERE RCKID0=0 1446 14:48:31 SQL Prepare: ORACLE - select distinct DBGRIN from XT_ZDYLXS where YGBH00=476 and BMBH00=208 and DLXTMC='库存物资管理子系统' and CTMC00='frmWZ_WZRK' 1447 14:48:31 SQL Execute: ORACLE - select distinct DBGRIN from XT_ZDYLXS where YGBH00=476 and BMBH00=208 and DLXTMC='库存物资管理子系统' and CTMC00='frmWZ_WZRK' 1448 14:48:32 SQL Prepare: ORACLE - select LS0000,SFXS00,FLDNME,CPTNNE,WIDTH00 from XT_ZDYLXS where YGBH00=476 and BMBH00=208 and DLXTMC='库存物资管理子系统' and CTMC00='frmWZ_WZRK' and DBGRIN='DBGridEh1' order by LS0000 1449 14:48:32 SQL Execute: ORACLE - select LS0000,SFXS00,FLDNME,CPTNNE,WIDTH00 from XT_ZDYLXS where YGBH00=476 and BMBH00=208 and DLXTMC='库存物资管理子系统' and CTMC00='frmWZ_WZRK' and DBGRIN='DBGridEh1' order by LS0000 1450 14:48:32 SQL Error: ORACLE - ORA-00904: "WIDTH00": 标识符无效 1451 14:48:32 SQL Data In: ORACLE - Rows affected = 0 1452 14:48:42 SQL Prepare: ORACLE - SELECT To_Char(SYSDATE, 'YYYY.MM.DD') OraSysDate FROM DUAL 1453 14:48:42 SQL Execute: ORACLE - SELECT To_Char(SYSDATE, 'YYYY.MM.DD') OraSysDate FROM DUAL 1454 14:48:42 SQL Prepare: ORACLE - SELECT a.*,(select CKPFJ0 from wz_kc0000 where wzid00=a.wzid00 and trim(gg0000)||'GG'=trim(a.wzgg00)||'GG' and rownum=1) CKPFJ0 FROM vw_WZ_QLDMX0 a WHERE 1=2 1455 14:48:42 SQL Execute: ORACLE - SELECT a.*,(select CKPFJ0 from wz_kc0000 where wzid00=a.wzid00 and trim(gg0000)||'GG'=trim(a.wzgg00)||'GG' and rownum=1) CKPFJ0 FROM vw_WZ_QLDMX0 a WHERE 1=2 1456 14:48:45 SQL Prepare: ORACLE - select substrb(value0,1,1) from xt_xtcs00 where name00='XT_SRFSLXSCT' 1457 14:48:45 SQL Execute: ORACLE - select substrb(value0,1,1) from xt_xtcs00 where name00='XT_SRFSLXSCT' 1458 14:48:45 SQL Prepare: ORACLE - Select * from (select BMMC00,BH0000,PYSM00,WBSM00,BMBH00 from VW_WZ_KCKS00 where (PYSM00 Like :1 or BH0000 Like :2) Order By BH0000,PYSM00) where Rownum<=40 1459 14:48:45 SQL Data In: ORACLE - Param = 1, Name = , Type = fldZSTRING, Precision = 1, Scale = 0, Data = % 1460 14:48:45 SQL Data In: ORACLE - Param = 2, Name = , Type = fldZSTRING, Precision = 1, Scale = 0, Data = % 1461 14:48:45 SQL Execute: ORACLE - Select * from (select BMMC00,BH0000,PYSM00,WBSM00,BMBH00 from VW_WZ_KCKS00 where (PYSM00 Like ? or BH0000 Like ?) Order By BH0000,PYSM00) where Rownum<=40 1462 14:48:47 SQL Prepare: ORACLE - Select * from (select BMMC00,BH0000,PYSM00,WBSM00,BMBH00 from VW_WZ_KCKS00 where (PYSM00 Like :1) Order By PYSM00) where Rownum<=40 1463 14:48:47 SQL Data In: ORACLE - Param = 1, Name = , Type = fldZSTRING, Precision = 9, Scale = 0, Data = 设备仓库% 1464 14:48:47 SQL Execute: ORACLE - Select * from (select BMMC00,BH0000,PYSM00,WBSM00,BMBH00 from VW_WZ_KCKS00 where (PYSM00 Like ?) Order By PYSM00) where Rownum<=40 1465 14:48:55 SQL Prepare: ORACLE - select to_char(sysdate,'YYYYMMDD') RQ,to_char(sysdate,'HH24:MI:SS') SJ,SID,serial# from v$session where AUDSID=(select userenv('SESSIONID') from dual where rownum=1) 1466 14:48:55 SQL Execute: ORACLE - select to_char(sysdate,'YYYYMMDD') RQ,to_char(sysdate,'HH24:MI:SS') SJ,SID,serial# from v$session where AUDSID=(select userenv('SESSIONID') from dual where rownum=1) 1467 14:48:55 SQL Prepare: ORACLE - Insert into sd_Hospital.XT_XTLJ00(IP0000,XTDM00,PROGRAM,SID000,serial,LJRQ00,LJSJ00,BZ0000) Select '192.168.13.206','K',trim(PROGRAM)||'+'||'库存物资管理子系统',SID,serial# ,'20100129','14:48:51','scott@9998:593A26A69DD9EF0DCCFF382663D064F0' from v$session where AUDSID=(Select userenv('SESSIONID') from dual where rownum=1) 1468 14:48:55 SQL Execute: ORACLE - Insert into sd_Hospital.XT_XTLJ00(IP0000,XTDM00,PROGRAM,SID000,serial,LJRQ00,LJSJ00,BZ0000) Select '192.168.13.206','K',trim(PROGRAM)||'+'||'库存物资管理子系统',SID,serial# ,'20100129','14:48:51','scott@9998:593A26A69DD9EF0DCCFF382663D064F0' from v$session where AUDSID=(Select userenv('SESSIONID') from dual where rownum=1) 1469 14:48:55 SQL Data In: ORACLE - Rows affected = 1 1470 14:48:55 SQL Prepare: ORACLE - Commit 1471 14:48:55 SQL Execute: ORACLE - Commit 1472 14:48:55 SQL Data In: ORACLE - Rows affected = 0 1473 14:48:55 SQL Prepare: ORACLE - Select SJKMM0,SJKKL0 from XT_DBMS00 where SYZT00='1' and Upper(SJKYH0)='SD_HOSPITAL' 1474 14:48:55 SQL Execute: ORACLE - Select SJKMM0,SJKKL0 from XT_DBMS00 where SYZT00='1' and Upper(SJKYH0)='SD_HOSPITAL' 1475 14:48:55 SQL Prepare: ORACLE - select YYID00 from XT_YYXX00 where YYID00='222137' 1476 14:48:55 SQL Execute: ORACLE - select YYID00 from XT_YYXX00 where YYID00='222137' 1477 14:48:55 SQL Prepare: ORACLE - select YGBH00 from BM_YGBM00 where UPPER(XKH000)='9998' and CZBZ00 in ('1') 1478 14:48:55 SQL Execute: ORACLE - select YGBH00 from BM_YGBM00 where UPPER(XKH000)='9998' and CZBZ00 in ('1') 1479 14:48:55 SQL Prepare: ORACLE - Insert into XT_XTLJ00(IP0000,XTDM00,PROGRAM,SID000,serial,LJRQ00,LJSJ00,BZ0000) Select '192.168.13.206','K',trim(PROGRAM)||'+'||'库存物资管理子系统',SID,serial# ,'20100129','14:48:51','sd_Hospital@9998:1E8C9DF382D550C78EA821B3F1AE0DFA' from v$session where AUDSID=(Select userenv('SESSIONID') from dual where rownum=1) 1480 14:48:55 SQL Execute: ORACLE - Insert into XT_XTLJ00(IP0000,XTDM00,PROGRAM,SID000,serial,LJRQ00,LJSJ00,BZ0000) Select '192.168.13.206','K',trim(PROGRAM)||'+'||'库存物资管理子系统',SID,serial# ,'20100129','14:48:51','sd_Hospital@9998:1E8C9DF382D550C78EA821B3F1AE0DFA' from v$session where AUDSID=(Select userenv('SESSIONID') from dual where rownum=1) 1481 14:48:55 SQL Data In: ORACLE - Rows affected = 1 1482 14:48:55 SQL Prepare: ORACLE - Commit 1483 14:48:55 SQL Execute: ORACLE - Commit 1484 14:48:55 SQL Data In: ORACLE - Rows affected = 0 1485 14:48:55 SQL Prepare: ORACLE - select DLFS00,MMXSF0 from XT_YYXT00 where XTDM00='K' 1486 14:48:55 SQL Execute: ORACLE - select DLFS00,MMXSF0 from XT_YYXT00 where XTDM00='K' 1487 14:48:55 SQL Prepare: ORACLE - select YGBH00,YHKL00,DLMM00 from BM_YGBM00 where UPPER(XKH000)='9998' and CZBZ00 in ('1') 1488 14:48:55 SQL Execute: ORACLE - select YGBH00,YHKL00,DLMM00 from BM_YGBM00 where UPPER(XKH000)='9998' and CZBZ00 in ('1') 1489 14:48:55 SQL Prepare: ORACLE - Select BBXH00,BMXZ00 from XT_YYXT00 where XTDM00='K' 1490 14:48:55 SQL Execute: ORACLE - Select BBXH00,BMXZ00 from XT_YYXT00 where XTDM00='K' 1491 14:48:55 SQL Prepare: ORACLE - Select BMMC00,BMBH00 from BM_BMBM00 where FLAG00='1' and BMXZ00 in ('c','9','1','5','2','a','8','4','6','3') and BMBH00 in (Select BMBH00 from VW_XT_YHBMQX where XTDM00='K' and YGBH00=(select YGBH00 from BM_YGBM00 where CZBZ00='1' and Upper(XKH000)='9998')) order by BH0000 1492 14:48:55 SQL Execute: ORACLE - Select BMMC00,BMBH00 from BM_BMBM00 where FLAG00='1' and BMXZ00 in ('c','9','1','5','2','a','8','4','6','3') and BMBH00 in (Select BMBH00 from VW_XT_YHBMQX where XTDM00='K' and YGBH00=(select YGBH00 from BM_YGBM00 where CZBZ00='1' and Upper(XKH000)='9998')) order by BH0000 1493 14:48:56 SQL Prepare: ORACLE - Select '00' as XTDM00 from dual where '9998'='super' union Select XTDM00 from XT_ZBQX00 where XTDM00= 'K' and ZBDM00 in ( Select ZBDM00 from VW_XT_YHZB00 where YGBH00=(select YGBH00 from BM_YGBM00 where CZBZ00='1' and Upper(XKH000)='9998')) 1494 14:48:56 SQL Execute: ORACLE - Select '00' as XTDM00 from dual where '9998'='super' union Select XTDM00 from XT_ZBQX00 where XTDM00= 'K' and ZBDM00 in ( Select ZBDM00 from VW_XT_YHZB00 where YGBH00=(select YGBH00 from BM_YGBM00 where CZBZ00='1' and Upper(XKH000)='9998')) 1495 14:48:56 SQL Prepare: ORACLE - select ZWXM00,XKH000 from BM_YGBM00 where YGBH00=476 1496 14:48:56 SQL Execute: ORACLE - select ZWXM00,XKH000 from BM_YGBM00 where YGBH00=476 1497 14:48:56 SQL Prepare: ORACLE - Select distinct ZBJB00 from XT_XTZB00 where ZBDM00 ='00' 1498 14:48:56 SQL Execute: ORACLE - Select distinct ZBJB00 from XT_XTZB00 where ZBDM00 ='00' 1499 14:48:56 SQL Prepare: ORACLE - Select JQBH00 from XT_SQIPDZ where IP0000='192.168.13.206' 1500 14:48:56 SQL Execute: ORACLE - Select JQBH00 from XT_SQIPDZ where IP0000='192.168.13.206' 1501 14:48:56 SQL Prepare: ORACLE - select NAME00,VALUE0 from XT_XTCS00 where NAME00 in ('XT_SQIPDZ','YF_CKJRZTXG') 1502 14:48:56 SQL Execute: ORACLE - select NAME00,VALUE0 from XT_XTCS00 where NAME00 in ('XT_SQIPDZ','YF_CKJRZTXG') 1503 14:48:56 SQL Prepare: ORACLE - select CKBH00,CKMC00,ZT0000 from BM_CKBM00 where BMBH00= 15 and FLAG00 like '%' order by decode(CKBH00,0,0,1),decode(JQBH00,0,0,1),ZT0000 desc,CKBH00 1504 14:48:56 SQL Execute: ORACLE - select CKBH00,CKMC00,ZT0000 from BM_CKBM00 where BMBH00= 15 and FLAG00 like '%' order by decode(CKBH00,0,0,1),decode(JQBH00,0,0,1),ZT0000 desc,CKBH00 1505 14:48:56 SQL Prepare: ORACLE - select count(*) from vw_ht_xttsxx where (XTDM00='-1' or XTDM00='K') and YXQ000>='20100129' 1506 14:48:56 SQL Execute: ORACLE - select count(*) from vw_ht_xttsxx where (XTDM00='-1' or XTDM00='K') and YXQ000>='20100129' 1507 14:48:56 SQL Prepare: ORACLE - SELECT * FROM XT_XTCS00 WHERE NAME00 IN('HT_SFQYXTXXTSGN') 1508 14:48:56 SQL Execute: ORACLE - SELECT * FROM XT_XTCS00 WHERE NAME00 IN('HT_SFQYXTXXTSGN') 1509 14:48:56 SQL Prepare: ORACLE - SELECT * FROM XT_XTCS00 WHERE NAME00 IN('HT_XTXXTSSJJG') 1510 14:48:56 SQL Execute: ORACLE - SELECT * FROM XT_XTCS00 WHERE NAME00 IN('HT_XTXXTSSJJG') 1511 14:48:56 SQL Prepare: ORACLE - Update XT_XTRZ00 Set TCRQ00=TO_CHAR(SYSDATE,'YYYYMMDD'),TCSJ00=TO_CHAR(SYSDATE,'HH24:MI:SS') where LSH000=1892227 1512 14:48:56 SQL Execute: ORACLE - Update XT_XTRZ00 Set TCRQ00=TO_CHAR(SYSDATE,'YYYYMMDD'),TCSJ00=TO_CHAR(SYSDATE,'HH24:MI:SS') where LSH000=1892227 1513 14:48:56 SQL Data In: ORACLE - Rows affected = 1 1514 14:48:56 SQL Prepare: ORACLE - Commit 1515 14:48:56 SQL Execute: ORACLE - Commit 1516 14:48:56 SQL Data In: ORACLE - Rows affected = 0 1517 14:48:56 SQL Prepare: ORACLE - update XT_SQIPDZ set ZT0000='0' where JQBH00=0 1518 14:48:56 SQL Execute: ORACLE - update XT_SQIPDZ set ZT0000='0' where JQBH00=0 1519 14:48:56 SQL Data In: ORACLE - Rows affected = 0 1520 14:48:56 SQL Prepare: ORACLE - Commit 1521 14:48:56 SQL Execute: ORACLE - Commit 1522 14:48:56 SQL Data In: ORACLE - Rows affected = 0 1523 14:48:56 SQL Prepare: ORACLE - Select userenv('SESSIONID') PROCESS from dual where rownum=1 1524 14:48:56 SQL Execute: ORACLE - Select userenv('SESSIONID') PROCESS from dual where rownum=1 1525 14:48:56 SQL Prepare: ORACLE - Select SQ_XT_XTRZ00_LSH000.NextVal SID from Dual 1526 14:48:56 SQL Execute: ORACLE - Select SQ_XT_XTRZ00_LSH000.NextVal SID from Dual 1527 14:48:56 SQL Prepare: ORACLE - select trim(IP0000)||'#'||trim(to_char(SID000))||':'||trim(to_char(SERIAL))||'@'||trim(PROGRAM) BZ0000 from XT_XTLJ00 where (SID000,SERIAL) in (select SID,SERIAL# from V$session where AUDSID= userenv('SESSIONID')) 1528 14:48:56 SQL Execute: ORACLE - select trim(IP0000)||'#'||trim(to_char(SID000))||':'||trim(to_char(SERIAL))||'@'||trim(PROGRAM) BZ0000 from XT_XTLJ00 where (SID000,SERIAL) in (select SID,SERIAL# from V$session where AUDSID= userenv('SESSIONID')) 1529 14:48:56 SQL Prepare: ORACLE - Insert into XT_XTRZ00(LSH000,YGBH00,DLJSJ0,XTDM00,JCID00,BZ0000,DLKS00) Values(1892228,476,'wlzx-2','K',nvl('88460',' '),'192.168.13.206#159:44797@prjSB_KCWZ.exe+库存物资管理子系统',15) 1530 14:48:56 SQL Execute: ORACLE - Insert into XT_XTRZ00(LSH000,YGBH00,DLJSJ0,XTDM00,JCID00,BZ0000,DLKS00) Values(1892228,476,'wlzx-2','K',nvl('88460',' '),'192.168.13.206#159:44797@prjSB_KCWZ.exe+库存物资管理子系统',15) 1531 14:48:56 SQL Data In: ORACLE - Rows affected = 1 1532 14:48:56 SQL Prepare: ORACLE - Commit 1533 14:48:56 SQL Execute: ORACLE - Commit 1534 14:48:56 SQL Data In: ORACLE - Rows affected = 0 1535 14:48:56 SQL Prepare: ORACLE - select YYID00 from BM_BMBM00 where BMBH00= 15 1536 14:48:56 SQL Execute: ORACLE - select YYID00 from BM_BMBM00 where BMBH00= 15 1537 14:48:56 SQL Prepare: ORACLE - select YYBZ10,YYBZ20,YYQC00,YYJC00 from XT_YYXX00 where YYID00= '222137' 1538 14:48:56 SQL Execute: ORACLE - select YYBZ10,YYBZ20,YYQC00,YYJC00 from XT_YYXX00 where YYID00= '222137' 1539 14:48:56 SQL Prepare: ORACLE - SELECT BMXZ00 FROM BM_BMBM00 WHERE BMBH00=15 1540 14:48:56 SQL Execute: ORACLE - SELECT BMXZ00 FROM BM_BMBM00 WHERE BMBH00=15 1541 14:48:56 SQL Prepare: ORACLE - SELECT 1 EXIST FROM XT_YYXT00 WHERE XTDM00='K' AND BMXZ00 LIKE '%8%' 1542 14:48:56 SQL Execute: ORACLE - SELECT 1 EXIST FROM XT_YYXT00 WHERE XTDM00='K' AND BMXZ00 LIKE '%8%' 1543 14:48:56 SQL Prepare: ORACLE - select OBJECT_NAME from user_objects where object_type='TRIGGER' AND OBJECT_NAME LIKE 'TR_WZ_%' AND STATUS<>'VALID' 1544 14:48:56 SQL Execute: ORACLE - select OBJECT_NAME from user_objects where object_type='TRIGGER' AND OBJECT_NAME LIKE 'TR_WZ_%' AND STATUS<>'VALID' 1545 14:48:56 SQL Prepare: ORACLE - delete SD_SB.WZ_TEMP00 1546 14:48:56 SQL Execute: ORACLE - delete SD_SB.WZ_TEMP00 1547 14:48:56 SQL Data In: ORACLE - Rows affected = 0 1548 14:48:56 SQL Prepare: ORACLE - Commit 1549 14:48:56 SQL Execute: ORACLE - Commit 1550 14:48:56 SQL Data In: ORACLE - Rows affected = 0 1551 14:48:56 SQL Prepare: ORACLE - select * from XT_XTCS00 where name00 like 'WZ_%' 1552 14:48:56 SQL Execute: ORACLE - select * from XT_XTCS00 where name00 like 'WZ_%' 1553 14:48:56 SQL Prepare: ORACLE - select * from XT_YHCS00 where YGBH00=476 1554 14:48:56 SQL Execute: ORACLE - select * from XT_YHCS00 where YGBH00=476 1555 14:48:56 SQL Prepare: ORACLE - select MKDM00,MKNBMC,MKWBMC from XT_XTMK00 where XTDM00='K' and (( 476= 0) or (BZ0000<>'0' and MKDM00 in (select MKDM00 from XT_ZBQX00 where XTDM00='K' and ZBDM00 in ( select ZBDM00 from VW_XT_YHZB00 where YGBH00=476)))) 1556 14:48:56 SQL Execute: ORACLE - select MKDM00,MKNBMC,MKWBMC from XT_XTMK00 where XTDM00='K' and (( 476= 0) or (BZ0000<>'0' and MKDM00 in (select MKDM00 from XT_ZBQX00 where XTDM00='K' and ZBDM00 in ( select ZBDM00 from VW_XT_YHZB00 where YGBH00=476)))) 1557 14:48:56 SQL Prepare: ORACLE - select MKDM00,MKWBMC,C.F_TYPENAME from XT_XTMK00 A,T_CTLTEMP B,T_TEMPTYPE C where A.MKDM00 like 'K$%' and A.XTDM00='K' and trim(A.MKDM00)='K$'||trim(B.F_TEMPID) AND TRIM(A.XTDM00)=TRIM(B.F_SYSID) AND B.F_TEMPTYPE=C.F_TYPEID AND B.F_SYSID=C.F_SYSID AND BZ0000<>'0'ORDER BY B.F_TEMPTYPE,A.MKDM00 1558 14:48:56 SQL Execute: ORACLE - select MKDM00,MKWBMC,C.F_TYPENAME from XT_XTMK00 A,T_CTLTEMP B,T_TEMPTYPE C where A.MKDM00 like 'K$%' and A.XTDM00='K' and trim(A.MKDM00)='K$'||trim(B.F_TEMPID) AND TRIM(A.XTDM00)=TRIM(B.F_SYSID) AND B.F_TEMPTYPE=C.F_TYPEID AND B.F_SYSID=C.F_SYSID AND BZ0000<>'0'ORDER BY B.F_TEMPTYPE,A.MKDM00 1559 14:48:56 SQL Prepare: ORACLE - select count(*) from XT_XTMK00 A,BB_FR3BB0 B,BB_MBLX00 C where A.XTDM00='0' and trim(A.MKDM00)='0@'||trim(B.BBID00) AND B.ZT0000='0' AND B.MBLX00=C.MBLX00 AND ((476= 0) or (BZ0000<>'0' and MKDM00 in (select MKDM00 from XT_ZBQX00 where XTDM00='0' and ZBDM00 in ( select ZBDM00 from VW_XT_YHZB00 where YGBH00=476)))) 1560 14:48:56 SQL Execute: ORACLE - select count(*) from XT_XTMK00 A,BB_FR3BB0 B,BB_MBLX00 C where A.XTDM00='0' and trim(A.MKDM00)='0@'||trim(B.BBID00) AND B.ZT0000='0' AND B.MBLX00=C.MBLX00 AND ((476= 0) or (BZ0000<>'0' and MKDM00 in (select MKDM00 from XT_ZBQX00 where XTDM00='0' and ZBDM00 in ( select ZBDM00 from VW_XT_YHZB00 where YGBH00=476)))) 1561 14:48:56 SQL Prepare: ORACLE - select MKDM00,MKNBMC,MKWBMC from XT_XTMK00 where XTDM00='+' 1562 14:48:56 SQL Execute: ORACLE - select MKDM00,MKNBMC,MKWBMC from XT_XTMK00 where XTDM00='+' 1563 14:48:56 SQL Prepare: ORACLE - select MKDM00,MKNBMC,MKWBMC from XT_XTMK00 where XTDM00='+' and (( 476= 0) or (BZ0000<>'0' and MKDM00 in (select MKDM00 from XT_ZBQX00 where XTDM00='+' and ZBDM00 in ( select ZBDM00 from VW_XT_YHZB00 where YGBH00=476)))) 1564 14:48:56 SQL Execute: ORACLE - select MKDM00,MKNBMC,MKWBMC from XT_XTMK00 where XTDM00='+' and (( 476= 0) or (BZ0000<>'0' and MKDM00 in (select MKDM00 from XT_ZBQX00 where XTDM00='+' and ZBDM00 in ( select ZBDM00 from VW_XT_YHZB00 where YGBH00=476)))) 1565 14:48:58 SQL Prepare: ORACLE - SELECT To_Char(SYSDATE, 'YYYY.MM.DD') OraSysDate FROM DUAL 1566 14:48:58 SQL Execute: ORACLE - SELECT To_Char(SYSDATE, 'YYYY.MM.DD') OraSysDate FROM DUAL 1567 14:48:58 SQL Prepare: ORACLE - SELECT a.*,(select CKPFJ0 from wz_kc0000 where wzid00=a.wzid00 and trim(gg0000)||'GG'=trim(a.wzgg00)||'GG' and rownum=1) CKPFJ0 FROM vw_WZ_QLDMX0 a WHERE 1=2 1568 14:48:58 SQL Execute: ORACLE - SELECT a.*,(select CKPFJ0 from wz_kc0000 where wzid00=a.wzid00 and trim(gg0000)||'GG'=trim(a.wzgg00)||'GG' and rownum=1) CKPFJ0 FROM vw_WZ_QLDMX0 a WHERE 1=2 1569 14:49:00 SQL Prepare: ORACLE - Select * from (select BMMC00,BH0000,PYSM00,WBSM00,BMBH00 from VW_WZ_KCKS00 where (PYSM00 Like :1 or BH0000 Like :2) Order By BH0000,PYSM00) where Rownum<=40 1570 14:49:00 SQL Data In: ORACLE - Param = 1, Name = , Type = fldZSTRING, Precision = 1, Scale = 0, Data = % 1571 14:49:00 SQL Data In: ORACLE - Param = 2, Name = , Type = fldZSTRING, Precision = 1, Scale = 0, Data = % 1572 14:49:00 SQL Execute: ORACLE - Select * from (select BMMC00,BH0000,PYSM00,WBSM00,BMBH00 from VW_WZ_KCKS00 where (PYSM00 Like ? or BH0000 Like ?) Order By BH0000,PYSM00) where Rownum<=40 1573 14:49:01 SQL Prepare: ORACLE - Select * from (select WZMC00,GG0000,WZSXMC,XH0000,CKPFJ0,KCZSL0,JLDW00,PYSM00,WBSM00,WZID00,KCBMBH,GGXH00,PH0000,XZZD01,XZZD02,XZZD03,XZZD04 from VW_WZ_KCZS00 where (PYSM00 Like :1 or WZID00 Like :2) and( KCBMBH=208 ) Order By WZID00,PYSM00) where Rownum<=40 1574 14:49:01 SQL Data In: ORACLE - Param = 1, Name = , Type = fldZSTRING, Precision = 1, Scale = 0, Data = % 1575 14:49:01 SQL Data In: ORACLE - Param = 2, Name = , Type = fldZSTRING, Precision = 1, Scale = 0, Data = % 1576 14:49:01 SQL Execute: ORACLE - Select * from (select WZMC00,GG0000,WZSXMC,XH0000,CKPFJ0,KCZSL0,JLDW00,PYSM00,WBSM00,WZID00,KCBMBH,GGXH00,PH0000,XZZD01,XZZD02,XZZD03,XZZD04 from VW_WZ_KCZS00 where (PYSM00 Like ? or WZID00 Like ?) and( KCBMBH=208 ) Order By WZID00,PYSM00) where Rownum<=40 1577 14:49:07 SQL Prepare: ORACLE - SELECT PZDE00 FROM WZ_PZDE00 WHERE WZID00 =999999999 AND KSDM00 =15 1578 14:49:07 SQL Execute: ORACLE - SELECT PZDE00 FROM WZ_PZDE00 WHERE WZID00 =999999999 AND KSDM00 =15 1579 14:49:08 SQL Prepare: ORACLE - SELECT PZDE00 FROM WZ_PZDE00 WHERE WZID00 =6104 AND KSDM00 =15 1580 14:49:08 SQL Execute: ORACLE - SELECT PZDE00 FROM WZ_PZDE00 WHERE WZID00 =6104 AND KSDM00 =15 1581 14:49:08 SQL Prepare: ORACLE - SELECT NVL(SUM(KCZSL0),0) JCS000 FROM WZ_KC0000 a,WZ_WZXX00 b WHERE a.wzid00=b.wzid00 and a.WZID00 =6104 and trim(a.gg0000)||'GG'='500ml'||'GG' and trim(b.wzxh00)||'XH'='35/箱'||'XH' AND a.ckpfj0=5 AND trim(a.PH0000)||'PH'='20090526'||'PH' AND KCBMBH =208 1582 14:49:08 SQL Execute: ORACLE - SELECT NVL(SUM(KCZSL0),0) JCS000 FROM WZ_KC0000 a,WZ_WZXX00 b WHERE a.wzid00=b.wzid00 and a.WZID00 =6104 and trim(a.gg0000)||'GG'='500ml'||'GG' and trim(b.wzxh00)||'XH'='35/箱'||'XH' AND a.ckpfj0=5 AND trim(a.PH0000)||'PH'='20090526'||'PH' AND KCBMBH =208 1583 14:49:08 SQL Prepare: ORACLE - select SQ_WZ_QLD000_KSQLDH.NEXTVAL KSQLDH from dual 1584 14:49:08 SQL Execute: ORACLE - select SQ_WZ_QLD000_KSQLDH.NEXTVAL KSQLDH from dual 1585 14:49:08 SQL Prepare: ORACLE - INSERT INTO WZ_QLD000 (KSQLDH,KSQLBZ,CKBMBH ,QLBMBH,QLRQ00,QLSJ00,QLRBH0) VALUES(:1,:2,:3 ,:4,TO_CHAR(SYSDATE,'YYYYMMDD') ,TO_CHAR(SYSDATE,'HH24:MI:SS'),:5) 1586 14:49:08 SQL Data In: ORACLE - Param = 1, Name = , Type = fldFLOAT, Precision = 0, Scale = 0, Data = 65301.000000 1587 14:49:08 SQL Data In: ORACLE - Param = 2, Name = , Type = fldZSTRING, Precision = 1, Scale = 0, Data = 1 1588 14:49:08 SQL Data In: ORACLE - Param = 3, Name = , Type = fldFLOAT, Precision = 0, Scale = 0, Data = 208.000000 1589 14:49:08 SQL Data In: ORACLE - Param = 4, Name = , Type = fldFLOAT, Precision = 0, Scale = 0, Data = 15.000000 1590 14:49:08 SQL Data In: ORACLE - Param = 5, Name = , Type = fldFLOAT, Precision = 0, Scale = 0, Data = 476.000000 1591 14:49:08 SQL Execute: ORACLE - INSERT INTO WZ_QLD000 (KSQLDH,KSQLBZ,CKBMBH ,QLBMBH,QLRQ00,QLSJ00,QLRBH0) VALUES(?,?,? ,?,TO_CHAR(SYSDATE,'YYYYMMDD') ,TO_CHAR(SYSDATE,'HH24:MI:SS'),?) 1592 14:49:08 SQL Data In: ORACLE - Rows affected = 1 1593 14:49:08 SQL Prepare: ORACLE - INSERT INTO WZ_QLDMX0 (QLMXID,KSQLDH ,WZID00,WZMC00,WZSXMC,WZGG00,WZXH00 ,WZDW00,WZDJ00,WZSL00,PH0000,XZZD01,XZZD02,XZZD03,XZZD04) VALUES(SQ_WZ_QLDMX0_QLMXID.NEXTVAL,:1 ,:2,:3,:4,:5,:6 ,:7,:8,:9,:10,:11,:12,:13,:14) 1594 14:49:08 SQL Data In: ORACLE - Param = 1, Name = , Type = fldFLOAT, Precision = 0, Scale = 0, Data = 65301.000000 1595 14:49:08 SQL Data In: ORACLE - Param = 2, Name = , Type = fldFLOAT, Precision = 0, Scale = 0, Data = 6104.000000 1596 14:49:08 SQL Data In: ORACLE - Param = 3, Name = , Type = fldZSTRING, Precision = 30, Scale = 0, Data = 金星消毒液 1597 14:49:08 SQL Data In: ORACLE - Param = 4, Name = , Type = fldZSTRING, Precision = 8, Scale = 0, Data = 卫生材料 1598 14:49:08 SQL Data In: ORACLE - Param = 5, Name = , Type = fldZSTRING, Precision = 5, Scale = 0, Data = 500ml 1599 14:49:08 SQL Data In: ORACLE - Param = 6, Name = , Type = fldZSTRING, Precision = 5, Scale = 0, Data = 35/箱 1600 14:49:08 SQL Data In: ORACLE - Param = 7, Name = , Type = fldZSTRING, Precision = 2, Scale = 0, Data = 瓶 1601 14:49:08 SQL Data In: ORACLE - Param = 8, Name = , Type = fldFLOAT, Precision = 0, Scale = 0, Data = 5.000000 1602 14:49:08 SQL Data In: ORACLE - Param = 9, Name = , Type = fldFLOAT, Precision = 0, Scale = 0, Data = 2.000000 1603 14:49:08 SQL Data In: ORACLE - Param = 10, Name = , Type = fldZSTRING, Precision = 8, Scale = 0, Data = 20090526 1604 14:49:08 SQL Data In: ORACLE - Param = 11, Name = , Type = fldZSTRING, Precision = 0, Scale = 0, Data = 1605 14:49:08 SQL Data In: ORACLE - Param = 12, Name = , Type = fldZSTRING, Precision = 0, Scale = 0, Data = 1606 14:49:08 SQL Data In: ORACLE - Param = 13, Name = , Type = fldZSTRING, Precision = 0, Scale = 0, Data = 1607 14:49:08 SQL Data In: ORACLE - Param = 14, Name = , Type = fldZSTRING, Precision = 0, Scale = 0, Data = 1608 14:49:08 SQL Execute: ORACLE - INSERT INTO WZ_QLDMX0 (QLMXID,KSQLDH ,WZID00,WZMC00,WZSXMC,WZGG00,WZXH00 ,WZDW00,WZDJ00,WZSL00,PH0000,XZZD01,XZZD02,XZZD03,XZZD04) VALUES(SQ_WZ_QLDMX0_QLMXID.NEXTVAL,? ,?,?,?,?,? ,?,?,?,?,?,?,?,?) 1609 14:49:08 SQL Data In: ORACLE - Rows affected = 1 1610 14:49:08 SQL Prepare: ORACLE - Commit 1611 14:49:08 SQL Execute: ORACLE - Commit 1612 14:49:08 SQL Data In: ORACLE - Rows affected = 0 1613 14:49:08 SQL Prepare: ORACLE - COMMIT WORK 1614 14:49:08 SQL Execute: ORACLE - COMMIT WORK 1615 14:49:09 SQL Prepare: ORACLE - SELECT a.*,(select CKPFJ0 from wz_kc0000 where wzid00=a.wzid00 and trim(gg0000)||'GG'=trim(a.wzgg00)||'GG' and rownum=1) CKPFJ0 FROM vw_WZ_QLDMX0 a WHERE 1=2 1616 14:49:09 SQL Execute: ORACLE - SELECT a.*,(select CKPFJ0 from wz_kc0000 where wzid00=a.wzid00 and trim(gg0000)||'GG'=trim(a.wzgg00)||'GG' and rownum=1) CKPFJ0 FROM vw_WZ_QLDMX0 a WHERE 1=2 1617 14:49:11 SQL Prepare: ORACLE - SELECT * FROM VW_WZ_QLD000 WHERE QLBMBH=:1 AND QLZT00='0' 1618 14:49:11 SQL Data In: ORACLE - Param = 1, Name = , Type = fldFLOAT, Precision = 0, Scale = 0, Data = 15.000000 1619 14:49:11 SQL Execute: ORACLE - SELECT * FROM VW_WZ_QLD000 WHERE QLBMBH=? AND QLZT00='0' 1620 14:49:11 SQL Prepare: ORACLE - select * from vw_WZ_QLDMX0 where KSQLDH = :1 1621 14:49:11 SQL Data In: ORACLE - Param = 1, Name = , Type = fldFLOAT, Precision = 0, Scale = 0, Data = 65301.000000 1622 14:49:11 SQL Execute: ORACLE - select * from vw_WZ_QLDMX0 where KSQLDH = ? 1623 14:49:13 SQL Prepare: ORACLE - UPDATE WZ_QLD000 SET QLZT00='1' ,QRRQ00=TO_CHAR(SYSDATE,'YYYYMMDD') ,QRSJ00=TO_CHAR(SYSDATE,'HH24:MI:SS') ,QRRBH0=476 WHERE KSQLDH in 65301 1624 14:49:13 SQL Execute: ORACLE - UPDATE WZ_QLD000 SET QLZT00='1' ,QRRQ00=TO_CHAR(SYSDATE,'YYYYMMDD') ,QRSJ00=TO_CHAR(SYSDATE,'HH24:MI:SS') ,QRRBH0=476 WHERE KSQLDH in 65301 1625 14:49:13 SQL Data In: ORACLE - Rows affected = 1 1626 14:49:13 SQL Prepare: ORACLE - Commit 1627 14:49:13 SQL Execute: ORACLE - Commit 1628 14:49:13 SQL Data In: ORACLE - Rows affected = 0 1629 14:49:13 SQL Prepare: ORACLE - COMMIT WORK 1630 14:49:13 SQL Execute: ORACLE - COMMIT WORK 1631 14:49:13 SQL Prepare: ORACLE - select * from vw_WZ_QLDMX0 where KSQLDH = :1 1632 14:49:13 SQL Data In: ORACLE - Param = 1, Name = , Type = fldFLOAT, Precision = 0, Scale = 0, Data = 0.000000 1633 14:49:13 SQL Execute: ORACLE - select * from vw_WZ_QLDMX0 where KSQLDH = ? 1634 14:49:13 SQL Prepare: ORACLE - SELECT * FROM VW_WZ_QLD000 WHERE QLBMBH=:1 AND QLZT00='0' 1635 14:49:13 SQL Data In: ORACLE - Param = 1, Name = , Type = fldFLOAT, Precision = 0, Scale = 0, Data = 15.000000 1636 14:49:13 SQL Execute: ORACLE - SELECT * FROM VW_WZ_QLD000 WHERE QLBMBH=? AND QLZT00='0' 1637 14:49:18 SQL Prepare: ORACLE - select to_char(sysdate,'YYYYMMDD') RQ,to_char(sysdate,'HH24:MI:SS') SJ,SID,serial# from v$session where AUDSID=(select userenv('SESSIONID') from dual where rownum=1) 1638 14:49:18 SQL Execute: ORACLE - select to_char(sysdate,'YYYYMMDD') RQ,to_char(sysdate,'HH24:MI:SS') SJ,SID,serial# from v$session where AUDSID=(select userenv('SESSIONID') from dual where rownum=1) 1639 14:49:18 SQL Prepare: ORACLE - Insert into sd_Hospital.XT_XTLJ00(IP0000,XTDM00,PROGRAM,SID000,serial,LJRQ00,LJSJ00,BZ0000) Select '192.168.13.206','K',trim(PROGRAM)||'+'||'库存物资管理子系统',SID,serial# ,'20100129','14:49:14','scott@9998:593A26A69DD9EF0DCCFF382663D064F0' from v$session where AUDSID=(Select userenv('SESSIONID') from dual where rownum=1) 1640 14:49:18 SQL Execute: ORACLE - Insert into sd_Hospital.XT_XTLJ00(IP0000,XTDM00,PROGRAM,SID000,serial,LJRQ00,LJSJ00,BZ0000) Select '192.168.13.206','K',trim(PROGRAM)||'+'||'库存物资管理子系统',SID,serial# ,'20100129','14:49:14','scott@9998:593A26A69DD9EF0DCCFF382663D064F0' from v$session where AUDSID=(Select userenv('SESSIONID') from dual where rownum=1) 1641 14:49:18 SQL Data In: ORACLE - Rows affected = 1 1642 14:49:18 SQL Prepare: ORACLE - Commit 1643 14:49:18 SQL Execute: ORACLE - Commit 1644 14:49:18 SQL Data In: ORACLE - Rows affected = 0 1645 14:49:18 SQL Prepare: ORACLE - Select SJKMM0,SJKKL0 from XT_DBMS00 where SYZT00='1' and Upper(SJKYH0)='SD_HOSPITAL' 1646 14:49:18 SQL Execute: ORACLE - Select SJKMM0,SJKKL0 from XT_DBMS00 where SYZT00='1' and Upper(SJKYH0)='SD_HOSPITAL' 1647 14:49:18 SQL Prepare: ORACLE - select YYID00 from XT_YYXX00 where YYID00='222137' 1648 14:49:18 SQL Execute: ORACLE - select YYID00 from XT_YYXX00 where YYID00='222137' 1649 14:49:18 SQL Prepare: ORACLE - select YGBH00 from BM_YGBM00 where UPPER(XKH000)='9998' and CZBZ00 in ('1') 1650 14:49:18 SQL Execute: ORACLE - select YGBH00 from BM_YGBM00 where UPPER(XKH000)='9998' and CZBZ00 in ('1') 1651 14:49:18 SQL Prepare: ORACLE - Insert into XT_XTLJ00(IP0000,XTDM00,PROGRAM,SID000,serial,LJRQ00,LJSJ00,BZ0000) Select '192.168.13.206','K',trim(PROGRAM)||'+'||'库存物资管理子系统',SID,serial# ,'20100129','14:49:14','sd_Hospital@9998:1E8C9DF382D550C78EA821B3F1AE0DFA' from v$session where AUDSID=(Select userenv('SESSIONID') from dual where rownum=1) 1652 14:49:18 SQL Execute: ORACLE - Insert into XT_XTLJ00(IP0000,XTDM00,PROGRAM,SID000,serial,LJRQ00,LJSJ00,BZ0000) Select '192.168.13.206','K',trim(PROGRAM)||'+'||'库存物资管理子系统',SID,serial# ,'20100129','14:49:14','sd_Hospital@9998:1E8C9DF382D550C78EA821B3F1AE0DFA' from v$session where AUDSID=(Select userenv('SESSIONID') from dual where rownum=1) 1653 14:49:18 SQL Data In: ORACLE - Rows affected = 1 1654 14:49:18 SQL Prepare: ORACLE - Commit 1655 14:49:18 SQL Execute: ORACLE - Commit 1656 14:49:18 SQL Data In: ORACLE - Rows affected = 0 1657 14:49:18 SQL Prepare: ORACLE - select DLFS00,MMXSF0 from XT_YYXT00 where XTDM00='K' 1658 14:49:18 SQL Execute: ORACLE - select DLFS00,MMXSF0 from XT_YYXT00 where XTDM00='K' 1659 14:49:18 SQL Prepare: ORACLE - select YGBH00,YHKL00,DLMM00 from BM_YGBM00 where UPPER(XKH000)='9998' and CZBZ00 in ('1') 1660 14:49:18 SQL Execute: ORACLE - select YGBH00,YHKL00,DLMM00 from BM_YGBM00 where UPPER(XKH000)='9998' and CZBZ00 in ('1') 1661 14:49:18 SQL Prepare: ORACLE - Select BBXH00,BMXZ00 from XT_YYXT00 where XTDM00='K' 1662 14:49:18 SQL Execute: ORACLE - Select BBXH00,BMXZ00 from XT_YYXT00 where XTDM00='K' 1663 14:49:18 SQL Prepare: ORACLE - Select BMMC00,BMBH00 from BM_BMBM00 where FLAG00='1' and BMXZ00 in ('c','9','1','5','2','a','8','4','6','3') and BMBH00 in (Select BMBH00 from VW_XT_YHBMQX where XTDM00='K' and YGBH00=(select YGBH00 from BM_YGBM00 where CZBZ00='1' and Upper(XKH000)='9998')) order by BH0000 1664 14:49:18 SQL Execute: ORACLE - Select BMMC00,BMBH00 from BM_BMBM00 where FLAG00='1' and BMXZ00 in ('c','9','1','5','2','a','8','4','6','3') and BMBH00 in (Select BMBH00 from VW_XT_YHBMQX where XTDM00='K' and YGBH00=(select YGBH00 from BM_YGBM00 where CZBZ00='1' and Upper(XKH000)='9998')) order by BH0000 1665 14:49:20 SQL Prepare: ORACLE - Select '00' as XTDM00 from dual where '9998'='super' union Select XTDM00 from XT_ZBQX00 where XTDM00= 'K' and ZBDM00 in ( Select ZBDM00 from VW_XT_YHZB00 where YGBH00=(select YGBH00 from BM_YGBM00 where CZBZ00='1' and Upper(XKH000)='9998')) 1666 14:49:20 SQL Execute: ORACLE - Select '00' as XTDM00 from dual where '9998'='super' union Select XTDM00 from XT_ZBQX00 where XTDM00= 'K' and ZBDM00 in ( Select ZBDM00 from VW_XT_YHZB00 where YGBH00=(select YGBH00 from BM_YGBM00 where CZBZ00='1' and Upper(XKH000)='9998')) 1667 14:49:20 SQL Prepare: ORACLE - select ZWXM00,XKH000 from BM_YGBM00 where YGBH00=476 1668 14:49:20 SQL Execute: ORACLE - select ZWXM00,XKH000 from BM_YGBM00 where YGBH00=476 1669 14:49:20 SQL Prepare: ORACLE - Select distinct ZBJB00 from XT_XTZB00 where ZBDM00 ='00' 1670 14:49:20 SQL Execute: ORACLE - Select distinct ZBJB00 from XT_XTZB00 where ZBDM00 ='00' 1671 14:49:20 SQL Prepare: ORACLE - Select JQBH00 from XT_SQIPDZ where IP0000='192.168.13.206' 1672 14:49:20 SQL Execute: ORACLE - Select JQBH00 from XT_SQIPDZ where IP0000='192.168.13.206' 1673 14:49:20 SQL Prepare: ORACLE - select NAME00,VALUE0 from XT_XTCS00 where NAME00 in ('XT_SQIPDZ','YF_CKJRZTXG') 1674 14:49:20 SQL Execute: ORACLE - select NAME00,VALUE0 from XT_XTCS00 where NAME00 in ('XT_SQIPDZ','YF_CKJRZTXG') 1675 14:49:20 SQL Prepare: ORACLE - select CKBH00,CKMC00,ZT0000 from BM_CKBM00 where BMBH00= 208 and FLAG00 like '%' order by decode(CKBH00,0,0,1),decode(JQBH00,0,0,1),ZT0000 desc,CKBH00 1676 14:49:20 SQL Execute: ORACLE - select CKBH00,CKMC00,ZT0000 from BM_CKBM00 where BMBH00= 208 and FLAG00 like '%' order by decode(CKBH00,0,0,1),decode(JQBH00,0,0,1),ZT0000 desc,CKBH00 1677 14:49:20 SQL Prepare: ORACLE - select count(*) from vw_ht_xttsxx where (XTDM00='-1' or XTDM00='K') and YXQ000>='20100129' 1678 14:49:20 SQL Execute: ORACLE - select count(*) from vw_ht_xttsxx where (XTDM00='-1' or XTDM00='K') and YXQ000>='20100129' 1679 14:49:20 SQL Prepare: ORACLE - SELECT * FROM XT_XTCS00 WHERE NAME00 IN('HT_SFQYXTXXTSGN') 1680 14:49:20 SQL Execute: ORACLE - SELECT * FROM XT_XTCS00 WHERE NAME00 IN('HT_SFQYXTXXTSGN') 1681 14:49:20 SQL Prepare: ORACLE - SELECT * FROM XT_XTCS00 WHERE NAME00 IN('HT_XTXXTSSJJG') 1682 14:49:20 SQL Execute: ORACLE - SELECT * FROM XT_XTCS00 WHERE NAME00 IN('HT_XTXXTSSJJG') 1683 14:49:20 SQL Prepare: ORACLE - Update XT_XTRZ00 Set TCRQ00=TO_CHAR(SYSDATE,'YYYYMMDD'),TCSJ00=TO_CHAR(SYSDATE,'HH24:MI:SS') where LSH000=1892228 1684 14:49:20 SQL Execute: ORACLE - Update XT_XTRZ00 Set TCRQ00=TO_CHAR(SYSDATE,'YYYYMMDD'),TCSJ00=TO_CHAR(SYSDATE,'HH24:MI:SS') where LSH000=1892228 1685 14:49:20 SQL Data In: ORACLE - Rows affected = 1 1686 14:49:20 SQL Prepare: ORACLE - Commit 1687 14:49:20 SQL Execute: ORACLE - Commit 1688 14:49:20 SQL Data In: ORACLE - Rows affected = 0 1689 14:49:20 SQL Prepare: ORACLE - update XT_SQIPDZ set ZT0000='0' where JQBH00=0 1690 14:49:20 SQL Execute: ORACLE - update XT_SQIPDZ set ZT0000='0' where JQBH00=0 1691 14:49:20 SQL Data In: ORACLE - Rows affected = 0 1692 14:49:20 SQL Prepare: ORACLE - Commit 1693 14:49:20 SQL Execute: ORACLE - Commit 1694 14:49:20 SQL Data In: ORACLE - Rows affected = 0 1695 14:49:20 SQL Prepare: ORACLE - Select userenv('SESSIONID') PROCESS from dual where rownum=1 1696 14:49:20 SQL Execute: ORACLE - Select userenv('SESSIONID') PROCESS from dual where rownum=1 1697 14:49:20 SQL Prepare: ORACLE - Select SQ_XT_XTRZ00_LSH000.NextVal SID from Dual 1698 14:49:20 SQL Execute: ORACLE - Select SQ_XT_XTRZ00_LSH000.NextVal SID from Dual 1699 14:49:20 SQL Prepare: ORACLE - select trim(IP0000)||'#'||trim(to_char(SID000))||':'||trim(to_char(SERIAL))||'@'||trim(PROGRAM) BZ0000 from XT_XTLJ00 where (SID000,SERIAL) in (select SID,SERIAL# from V$session where AUDSID= userenv('SESSIONID')) 1700 14:49:20 SQL Execute: ORACLE - select trim(IP0000)||'#'||trim(to_char(SID000))||':'||trim(to_char(SERIAL))||'@'||trim(PROGRAM) BZ0000 from XT_XTLJ00 where (SID000,SERIAL) in (select SID,SERIAL# from V$session where AUDSID= userenv('SESSIONID')) 1701 14:49:20 SQL Prepare: ORACLE - Insert into XT_XTRZ00(LSH000,YGBH00,DLJSJ0,XTDM00,JCID00,BZ0000,DLKS00) Values(1892229,476,'wlzx-2','K',nvl('88462',' '),'192.168.13.206#134:13478@prjSB_KCWZ.exe+库存物资管理子系统',208) 1702 14:49:20 SQL Execute: ORACLE - Insert into XT_XTRZ00(LSH000,YGBH00,DLJSJ0,XTDM00,JCID00,BZ0000,DLKS00) Values(1892229,476,'wlzx-2','K',nvl('88462',' '),'192.168.13.206#134:13478@prjSB_KCWZ.exe+库存物资管理子系统',208) 1703 14:49:20 SQL Data In: ORACLE - Rows affected = 1 1704 14:49:20 SQL Prepare: ORACLE - Commit 1705 14:49:20 SQL Execute: ORACLE - Commit 1706 14:49:20 SQL Data In: ORACLE - Rows affected = 0 1707 14:49:20 SQL Prepare: ORACLE - select YYID00 from BM_BMBM00 where BMBH00= 208 1708 14:49:20 SQL Execute: ORACLE - select YYID00 from BM_BMBM00 where BMBH00= 208 1709 14:49:20 SQL Prepare: ORACLE - select YYBZ10,YYBZ20,YYQC00,YYJC00 from XT_YYXX00 where YYID00= '222137' 1710 14:49:20 SQL Execute: ORACLE - select YYBZ10,YYBZ20,YYQC00,YYJC00 from XT_YYXX00 where YYID00= '222137' 1711 14:49:20 SQL Prepare: ORACLE - SELECT BMXZ00 FROM BM_BMBM00 WHERE BMBH00=208 1712 14:49:20 SQL Execute: ORACLE - SELECT BMXZ00 FROM BM_BMBM00 WHERE BMBH00=208 1713 14:49:20 SQL Prepare: ORACLE - SELECT 1 EXIST FROM XT_YYXT00 WHERE XTDM00='K' AND BMXZ00 LIKE '%c%' 1714 14:49:20 SQL Execute: ORACLE - SELECT 1 EXIST FROM XT_YYXT00 WHERE XTDM00='K' AND BMXZ00 LIKE '%c%' 1715 14:49:20 SQL Prepare: ORACLE - select OBJECT_NAME from user_objects where object_type='TRIGGER' AND OBJECT_NAME LIKE 'TR_WZ_%' AND STATUS<>'VALID' 1716 14:49:20 SQL Execute: ORACLE - select OBJECT_NAME from user_objects where object_type='TRIGGER' AND OBJECT_NAME LIKE 'TR_WZ_%' AND STATUS<>'VALID' 1717 14:49:20 SQL Prepare: ORACLE - delete SD_SB.WZ_TEMP00 1718 14:49:20 SQL Execute: ORACLE - delete SD_SB.WZ_TEMP00 1719 14:49:20 SQL Data In: ORACLE - Rows affected = 0 1720 14:49:20 SQL Prepare: ORACLE - Commit 1721 14:49:20 SQL Execute: ORACLE - Commit 1722 14:49:20 SQL Data In: ORACLE - Rows affected = 0 1723 14:49:20 SQL Prepare: ORACLE - select * from XT_XTCS00 where name00 like 'WZ_%' 1724 14:49:20 SQL Execute: ORACLE - select * from XT_XTCS00 where name00 like 'WZ_%' 1725 14:49:21 SQL Prepare: ORACLE - select * from XT_YHCS00 where YGBH00=476 1726 14:49:21 SQL Execute: ORACLE - select * from XT_YHCS00 where YGBH00=476 1727 14:49:21 SQL Prepare: ORACLE - select MKDM00,MKNBMC,MKWBMC from XT_XTMK00 where XTDM00='K' and (( 476= 0) or (BZ0000<>'0' and MKDM00 in (select MKDM00 from XT_ZBQX00 where XTDM00='K' and ZBDM00 in ( select ZBDM00 from VW_XT_YHZB00 where YGBH00=476)))) 1728 14:49:21 SQL Execute: ORACLE - select MKDM00,MKNBMC,MKWBMC from XT_XTMK00 where XTDM00='K' and (( 476= 0) or (BZ0000<>'0' and MKDM00 in (select MKDM00 from XT_ZBQX00 where XTDM00='K' and ZBDM00 in ( select ZBDM00 from VW_XT_YHZB00 where YGBH00=476)))) 1729 14:49:21 SQL Prepare: ORACLE - select MKDM00,MKWBMC,C.F_TYPENAME from XT_XTMK00 A,T_CTLTEMP B,T_TEMPTYPE C where A.MKDM00 like 'K$%' and A.XTDM00='K' and trim(A.MKDM00)='K$'||trim(B.F_TEMPID) AND TRIM(A.XTDM00)=TRIM(B.F_SYSID) AND B.F_TEMPTYPE=C.F_TYPEID AND B.F_SYSID=C.F_SYSID AND BZ0000<>'0'ORDER BY B.F_TEMPTYPE,A.MKDM00 1730 14:49:21 SQL Execute: ORACLE - select MKDM00,MKWBMC,C.F_TYPENAME from XT_XTMK00 A,T_CTLTEMP B,T_TEMPTYPE C where A.MKDM00 like 'K$%' and A.XTDM00='K' and trim(A.MKDM00)='K$'||trim(B.F_TEMPID) AND TRIM(A.XTDM00)=TRIM(B.F_SYSID) AND B.F_TEMPTYPE=C.F_TYPEID AND B.F_SYSID=C.F_SYSID AND BZ0000<>'0'ORDER BY B.F_TEMPTYPE,A.MKDM00 1731 14:49:21 SQL Prepare: ORACLE - select count(*) from XT_XTMK00 A,BB_FR3BB0 B,BB_MBLX00 C where A.XTDM00='0' and trim(A.MKDM00)='0@'||trim(B.BBID00) AND B.ZT0000='0' AND B.MBLX00=C.MBLX00 AND ((476= 0) or (BZ0000<>'0' and MKDM00 in (select MKDM00 from XT_ZBQX00 where XTDM00='0' and ZBDM00 in ( select ZBDM00 from VW_XT_YHZB00 where YGBH00=476)))) 1732 14:49:21 SQL Execute: ORACLE - select count(*) from XT_XTMK00 A,BB_FR3BB0 B,BB_MBLX00 C where A.XTDM00='0' and trim(A.MKDM00)='0@'||trim(B.BBID00) AND B.ZT0000='0' AND B.MBLX00=C.MBLX00 AND ((476= 0) or (BZ0000<>'0' and MKDM00 in (select MKDM00 from XT_ZBQX00 where XTDM00='0' and ZBDM00 in ( select ZBDM00 from VW_XT_YHZB00 where YGBH00=476)))) 1733 14:49:21 SQL Prepare: ORACLE - select MKDM00,MKNBMC,MKWBMC from XT_XTMK00 where XTDM00='+' 1734 14:49:21 SQL Execute: ORACLE - select MKDM00,MKNBMC,MKWBMC from XT_XTMK00 where XTDM00='+' 1735 14:49:21 SQL Prepare: ORACLE - select MKDM00,MKNBMC,MKWBMC from XT_XTMK00 where XTDM00='+' and (( 476= 0) or (BZ0000<>'0' and MKDM00 in (select MKDM00 from XT_ZBQX00 where XTDM00='+' and ZBDM00 in ( select ZBDM00 from VW_XT_YHZB00 where YGBH00=476)))) 1736 14:49:21 SQL Execute: ORACLE - select MKDM00,MKNBMC,MKWBMC from XT_XTMK00 where XTDM00='+' and (( 476= 0) or (BZ0000<>'0' and MKDM00 in (select MKDM00 from XT_ZBQX00 where XTDM00='+' and ZBDM00 in ( select ZBDM00 from VW_XT_YHZB00 where YGBH00=476))))