-- 修数演练执行日志信息
select to_char(t.exec_time, 'yyyy-mm-dd hh24:mi:ss') as etime, t.*
from t_datachange_execption_sql_log t
order by t.exec_time desc;
-- 查询包执行日志
select to_char(t.exec_date, 'yyyy-mm-dd hh24:mi:ss') as etime, t.*
from omp_debuginfo_t t
where upper(t.proc_name) like '%SYN_AUTOCLEAN_SP%'
order by t.exec_date desc;
-- 查询DB Job执行结果
select p.what, j.job_id, j.start_date, j.last_start_date, j.last_end_date, j.next_run_date, j.failure_msg
from pg_job j
left join pg_job_proc p on j.job_id = p.job_id
order by j.start_date desc;
-- 查询流程审批日志信息
select to_char(t.creation_date, 'yyyy-mm-dd hh24:mi:ss') as cdate,
(select lname from tpl_user_t u where u.user_id = t.created_by) as cby,
t.*
from omp_workflow_log_t t
where t.workflow_no in ('W20230504023N')
order by t.workflow_no, t.creation_date;
-- 查询立项操作日志
select to_char(creation_date) as cdate, t.*
from omp_project_operationrecirds_t t
where t.project_no = 'W20250415075N'
order by t.creation_date desc;
-- 查询分摊编码失效检测结果记录
select t.*,
to_char(t.last_update_date, 'yyyy-mm-dd hh24:mi:ss') as ldate
from omp_profit_share_invalid_t t
where t.invalid_code = '069900';
-- 查询应用号推送记录
select to_char(t.creation_date, 'yyyy-mm-dd hh24:mi:ss') as cdate, t.*
from omp_message_push_log_t t
where t.to_user_account = 's00123123' and t.creation_date > date'2025-06-11';
select to_char(t.creation_date, 'yyyy-mm-dd hh24:mi:ss') as cdate, t.*
from omp_message_push_log_t t
where t.creation_date > date'2025-07-11' and t.content like '%TRP202507110003%';
-- 查询系统日志(很卡,需要设置好条件)
-- M_REFUND
-- M_EXPENSE_PAY
-- M_EMP_ENTRY_PROJECT
-- M_FRAME_PO
-- M_TM_REWARD
-- M_REGIONAL
-- M_PCB
-- M_TRIP
-- M_EBUY
-- M_TM_REWARD_PAY
-- M_REVIEW
-- M_DISPATCH
-- M_TM_PAYMENT
-- M_USER_CONF
-- M_COOP
-- M_PROJECT
-- M_BUDGET
select to_char(t.creation_date, 'yyyy-mm-dd hh24:mi:ss') as cdate, t.*
from omp_log_events_t t
where t.creation_date > to_date('2030-04-29 16:40:41', 'yyyy-mm-dd hh24:mi:ss')
and t.creation_date < to_date('2024-04-29 16:57:41', 'yyyy-mm-dd hh24:mi:ss');
-- 查询指定人员的历史日志信息
select to_char(al.last_update_date, 'yyyy-mm-dd hh24:mi:ss') as 最后更新时间,
(select lname from tpl_user_t where user_id = al.last_updated_by) as 操作人,
to_char(al.dimission_date, 'yyyy-mm-dd hh24:mi:ss') as 离司时间,
to_char(al.min_entry_project_date, 'yyyy-mm-dd hh24:mi:ss') as 最小入项时间,
to_char(al.entry_project_date, 'yyyy-mm-dd hh24:mi:ss') as 入项时间,
al.emp_workid,
al.log_remark as 日志备注,
al.hw_position as 职级,
al.emp_state as 人员状态,
ecul.emp_name as 姓名,
ecul.emp_number as 外包服务编号,
c.abbr_name as 供应商,
ecul.vendor_code as 供应商编码,
p.project_no as 项目编号,
p.po_num as PO编号,
to_char(sd.service_duration_begin_date, 'yyyy-mm-dd hh24:mi:ss') as 服务时长开始时间,
to_char(sd.service_duration_end_date, 'yyyy-mm-dd hh24:mi:ss') as 服务时长结束时间,
sd.service_duration as 服务时长,
sd.execute_service_duration as 执行类服务时长,
ecul.emp_employee_id as 外包合作人员表主键,
al.activity_id as 人力大表主键,
al.activity_log_id as 人力大表日志表主键
from omp_emp_activity_log_t al
left join omp_emp_cooperate_user_log_t ecul on ecul.emp_employee_log_id = al.emp_employee_log_id
left join omp_coop_t c on c.status = 'ACTIVE' and c.code = ecul.vendor_code
left join omp_project_prpo_info_query_v p on p.entrust_order_id = al.entrust_order_id
left join omp_emp_service_duration_t sd on sd.emp_employee_id = ecul.emp_employee_id
where ecul.emp_number = 'WB123123' and al.emp_workid like '60032453%'
order by ecul.emp_number, al.last_update_date desc;
select to_char(t.operate_date, 'yyyy-mm-dd hh24:mi:ss') as odate,
(select lname from tpl_user_t u where u.user_id = t.operate_user_id) as operate_user_name,
t.*
from omp_emp_resource_log_t t
left join omp_emp_cooperate_user_t u on u.emp_employee_id = t.emp_employee_id
where u.emp_number = 'WB084603'
order by t.operate_date desc;
select emp_workid, emp_state, emp_name, emp_position, emp_university_name,
emp_speciality, emp_role, emp_sub_role, emp_skill, birthday, title
from omp_activity_query_t
where entrust_order_id = '9eeb3d8876d020800ed56f9c3b8fc630'
and emp_state = 3
order by birthday desc;
-- 查询人员日志
select to_char(t.operate_date, 'yyyy-mm-dd hh24:mi:ss') as odate, t.*
from omp_emp_hr_log_t t
left join omp_emp_cooperate_user_t u on u.emp_employee_id = t.emp_employee_id
where u.emp_number = 'WB178015'
order by t.operate_date desc;
select to_char(t.operate_date, 'yyyy-mm-dd hh24:mi:ss') as odate, t.*
from omp_emp_resource_log_t t
left join omp_emp_cooperate_user_t u on u.emp_employee_id = t.emp_employee_id
where u.emp_number = 'WB178015'
order by t.operate_date desc;
select * from omp_leave_query_t t where t.leave_project_employees like '%王文炳%';
select * from omp_entry_query_t t where t.entry_employees like '%王文炳%';
帮我整理下,上面脚本的排版,并适当的添加注释
最新发布