diff --git a/docs/Admin manuals/Настройка внутрисистемных уведомлений/media/certs.png b/docs/Admin manuals/Настройка внутрисистемных уведомлений/media/certs.png new file mode 100644 index 0000000..4fd5c40 Binary files /dev/null and b/docs/Admin manuals/Настройка внутрисистемных уведомлений/media/certs.png differ diff --git a/docs/Admin manuals/Настройка внутрисистемных уведомлений/Настройка внутрисистемных уведомлений.md b/docs/Admin manuals/Настройка внутрисистемных уведомлений/Настройка внутрисистемных уведомлений.md index 37b8652..f2175b1 100644 --- a/docs/Admin manuals/Настройка внутрисистемных уведомлений/Настройка внутрисистемных уведомлений.md +++ b/docs/Admin manuals/Настройка внутрисистемных уведомлений/Настройка внутрисистемных уведомлений.md @@ -751,4 +751,35 @@ group by rlU."DocflowUser" ```sql call dfd."CreateCheckContractor"() -``` --> \ No newline at end of file +``` --> + +### Уведомление о перевыпуске сертификата в связи с изменением ФИО + +```sql +with list_persons as + ( select distinct case when coalesce(sert."LastName",'') <> coalesce(pers."Family",'') then 'фамилия, ' else '' end || + case when coalesce(sert."FirstName",'') <> coalesce(pers."Name",'') then 'имя, ' else '' end || + case when coalesce(sert."MiddleName",'') <> coalesce(pers."Father",'') then 'отчество' else '' end as "Changed", + sert."FullName", + coalesce(pers."Family",'') || ' ' || coalesce(pers."Name",'')|| ' ' ||coalesce(pers."Father",'') as "PersonFIO" + +from comdoc."ECPCertificateApplication" sert + join rp."RP_PersonContact" pc on sert."DocflowUser" = pc."Code" and pc."IdTypeContact" = 6 + join rp."RP_Person" pers on pc."Pcode" = pers."VCode" +where now()::date between sert."BeginDate" and sert."EndDate" and + (coalesce(sert."LastName",'') <> coalesce(pers."Family",'') or + coalesce(sert."FirstName",'') <> coalesce(pers."Name",'') or + coalesce(sert."MiddleName",'') <> coalesce(pers."Father",''))) + +insert into "#forInsNotification" ( "txt", "txtSMS", "txtTelegram") +select null as "txt", null as "txtSMS", null as "txtTelegram" +from (select ('
Изменение | ФИО в сертификате | ФИО в Физ.лице |
---|---|---|
' || coalesce(l."Changed",'') || ' | ' || coalesce(l."FullName",'') || ' | ' || + '' || coalesce(l."PersonFIO", '') || ' | ' + ||'