/*select audit_id, audit_date, audit_week, user_name, application_name, oper, tablename, id, data_old->>'evnpldisp_isinreg', data_old->>'evnpldisp_ispaid'
from audit.auditall
where tablename='dbo.evnpldispdop13'
	and id @> '{"evn_id": "110101361858585"}'
order by audit_date*/

/*select * from Evnvizit where Evn_id=110101277198323*/

/*select * from v_EvnPL where EvnPL_id = 110101277198318*/

/*select * from v_EvnVizitPL where EvnVizitPL_pid = 110101361858585*/

/*select * from v_EvnPL where EvnPL_id = 110101361858585*/

/*1 случай от 31.01.23*/
/*select * from v_EvnPL where EvnPL_NumCard = '10017689'*/

/*select evnclass_name, evnvizitpl_id, evnvizitpl_setdate, evnvizitpl_ispaid, evnvizitpl_isinreg, registry_sid from v_EvnVizitPL
where EvnVizitPL_pid = 110101277198318*/



/**/
select audit_id, audit_date, audit_week, user_name, application_name, oper, tablename, id
from audit.auditall
where id @> '{"evn_id": "110101277198318"}' or
audit_week = 5
order by audit_date



