очистка инструкций

This commit is contained in:
2023-06-01 16:42:11 +05:00
parent 36c0897c92
commit b738481a1f
1732 changed files with 1010 additions and 7240 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -0,0 +1,221 @@
# Настройка правил поиска для ЖСД
В данной форме настраиваются правила поиска документа для [журнала состояния документов](https://ecm-user-manuals.readthedocs.io/ru/latest/User%20manuals/%D0%9A%D0%AD%D0%94%D0%9E/%D0%90%D0%BD%D0%B0%D0%BB%D0%B8%D0%B7%20%D0%B8%20%D0%BE%D1%82%D1%87%D0%B5%D1%82%D0%BD%D0%BE%D1%81%D1%82%D1%8C/%D0%90%D0%BD%D0%B0%D0%BB%D0%B8%D0%B7%20%D0%B8%20%D0%BE%D1%82%D1%87%D0%B5%D1%82%D0%BD%D0%BE%D1%81%D1%82%D1%8C/#%D0%B6%D1%83%D1%80%D0%BD%D0%B0%D0%BB_%D1%81%D0%BE%D1%81%D1%82%D0%BE%D1%8F%D0%BD%D0%B8%D1%8F_%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%BE%D0%B2).
Чтобы открыть данную форму необходимо перейти в Меню - Администрирование - Документооборот - СЭД - Настройка правил поиска для ЖСД.
Для создания нового правила в панели инструментов необходимо нажать "Создать".
Откроется новая форма.
![Форма](media/form.png)
## Вкладка "Настройки"
На данной вкладке задаются основные настройки поиска документов.
* **Не используется** - при включенной функции данная настройка не будет отображаться в журнале состояния документов.
![Не используется](media/neIspol.png)
![Фильтр](media/filtr.png)
* **№ / Пользовательское наименование** - указывается порядковый номер и наименование настройки для отображения в журнале состояния документов.
![Наименование](media/polNam.png)
![Наименование](media/polNam2.png)
* **Служебное наименование** - указывается служебное наименование по которому фильтруется реестр документов. Служебное наименование должно быть **уникальным** в системе.
![Служ.наименование](media/sluzhNaim.png)
* **Показывать в форме** - указывается служебное наименование формы, в которой необходимо отображать данную настройку, например, в личном кабинете HR. Если поле незаполнено то данная настройка отображается во всех формах.
![Показывать](media/show.png)
![Форма](media/profile.png)
* **Скрыть кол. Подразделение инициатора** - скрывает колонку "Подразделение инициатора";
* **Скрыть кол. Плановая дата обработки** - скрывает колонку "Плановая дата обработки";
* **Скрыть кол. Просрочено** - скрывает колонку "Просрочено";
* **Скрыть кол. Задача** - скрывает колонку "Задача";
* **Скрыть кол. Факт дата обработки** - скрывает колонку "Фактическая дата обработки";
* **Скрыть кол. Инициатор** - скрывает колонку "Инициатор";
* **Скрыть кол. Дата поступления** - скрывает колонку "Дата поступления";
* **Скрыть кол. Решение** - скрывает колонку "Решение";
* **Скрыть кол. Участник** - скрывает колонку "Участник";
* **Добавить группирировку по Родит.подразд.** - добавляет группировку в журнале по родительскому подразделению;
* **Добавить группировку по подразд.** - добавляет группировку в журнале по подразделению;
* **Добавить группировку по типу документа** - добавляет групп по типу документа;
* **Скрыть кол. Комментарии** - скрывает колонку "Комментарии";
## Дополнительные колонки
В данном блоке можно добавить дополнительные колонки для отображения в журнале. Наименование колонок может быть произвольным. Информация в дополнительных колонках отображается в зависимости от указанных в [запросе](#вкладкаапрос) условий.
![Дополнительная колонка](media/dopColonka.png)
## Вкладка "Запрос"
В данном блоке указывается часть с динамическим запросом, содержащим непосредственно запроса для отображения документов.
Примеры запросов:
**Просроченные документы** - в реестре отображаются документы, по которым были нарушены сроки обработки:
```
insert into "tmp_finresult"( "DocCode" , "DocType" , "DocForm" , "DocTypeName" , "SettingsId"
, "orgId" , "DocumentDate" , "DocumentNumber" , "VirtualCUser" , "DateOfExecution"
, "DateControl" , "RouteVCode" , "RouteStatusId" , "RouteStatusName" , "DocName"
, "DocSubject" , "expired" , "StageNumber" , "BeginDate" , "ActionDate"
, "DocumentAction" , "DocumentStatus" , "FromMessage" , "eDate", "Department"
, "StageUser" , "StageItemStatus" , "StageStatus" , "StageItemAction" , "DocumentSubtype" , "AnyColumnA" , "AnyColumnB" , "AnyColumnC" , "AnyColumnD" , "AnyColumnE")
select dd."DocCode" , dd."DocType" , dd."DocForm" , dd."DocTypeName" , dd."SettingsId"
, dd."orgId" , dd."DocumentDate" , dd."DocumentNumber" , dd."VirtualCUser" , dd."DateOfExecution"
, dd."DateControl" , dd."RouteVCode" , dd."RouteStatusId" , dd."RouteStatusName" , dd."DocName"
, dd."DocSubject" , dd."expired",
dd."StageNumber" , dd."BeginDate" , dd."ActionDate"
, dd."DocumentAction" , dd."DocumentStatus" , dd."FromMessage" , dd."eDate", dd."Department"
, dd."StageUser" , dd."StageItemStatus" , dd."StageStatus" , dd."StageItemAction", dd."DocumentSubtype", dd."AnyColumnA" , dd."AnyColumnB" , dd."AnyColumnC" , dd."AnyColumnD" , dd."AnyColumnE"
from (
select t."DocCode" , t."DocType" , t."DocForm" , t."DocTypeName" , t."SettingsId"
, t."orgId" , t."DocumentDate" , t."DocumentNumber" , t."VirtualCUser" , t."DateOfExecution"
, t."DateControl" , t."RouteVCode" , t."RouteStatusId" , t."RouteStatusName" , t."DocName"
, t."DocSubject" ,
comdoc."dfwcGetDuration"(t."eDate", COALESCE(t."ActionDate", _now), false, t."orgId", null, _dayoff1, _dayoff2, null) as "expired",
t."StageNumber" , t."BeginDate" , t."ActionDate"
, t."DocumentAction" , t."DocumentStatus" , t."FromMessage" , t."eDate", t."Department"
, t."StageUser" , t."StageItemStatus" , t."StageStatus" , t."StageItemAction", t."DocumentSubtype", t."AnyColumnA" , t."AnyColumnB" , t."AnyColumnC" , t."AnyColumnD" , t."AnyColumnE"
from "tmp_preresult" t
where coalesce(t."RouteStatusId",0) = 2 and t."IsMarked" is not true
and t."StageItemStatus"= 2
AND (
t."DocumentDate" IS NULL OR t."DocumentDate" BETWEEN _bdate AND _edate
) ) dd
where
coalesce(dd."expired", 0) <> 0 ;
```
**Зависшие документы у инициатора** - в реестре отображаются документы, которые были инициированы сотрудником, но не запущены далее по маршруту согласования.
```
insert into "tmp_finresult"( "DocCode" , "DocType" , "DocForm" , "DocTypeName" , "SettingsId"
, "orgId" , "DocumentDate" , "DocumentNumber" , "VirtualCUser" , "DateOfExecution"
, "DateControl" , "RouteVCode" , "RouteStatusId" , "RouteStatusName" , "DocName"
, "DocSubject" , "expired" , "StageNumber" , "BeginDate" , "ActionDate"
, "DocumentAction" , "DocumentStatus" , "FromMessage" , "eDate", "Department"
, "StageUser" , "StageItemStatus" , "StageStatus" , "StageItemAction" , "DocumentSubtype", "AnyColumnA" , "AnyColumnB" , "AnyColumnC" , "AnyColumnD" , "AnyColumnE")
select t."DocCode" , t."DocType" , t."DocForm" , t."DocTypeName" , t."SettingsId"
, t."orgId" , t."DocumentDate" , t."DocumentNumber" , t."VirtualCUser" , t."DateOfExecution"
, t."DateControl" , t."RouteVCode" , t."RouteStatusId" , t."RouteStatusName" , t."DocName"
, t."DocSubject" ,
comdoc."dfwcGetDuration"(t."eDate", COALESCE(t."ActionDate", _now), false, t."orgId", 1, _dayoff1, _dayoff2, null) ,
t."StageNumber" , t."BeginDate" , t."ActionDate"
, t."DocumentAction" , t."DocumentStatus" , t."FromMessage" , t."eDate", t."Department"
, t."StageUser" , t."StageItemStatus" , t."StageStatus" , t."StageItemAction", t."DocumentSubtype" , t."AnyColumnA" , t."AnyColumnB" , t."AnyColumnC" , t."AnyColumnD" , t."AnyColumnE"
from "tmp_preresult" t
where coalesce(t."RouteStatusId",0) in ( 2 ) and t."StageItemStatus"= 2 and t."IsMarked" is not true
and t."StageNumber" = 1 AND (
t."DocumentDate" IS NULL OR t."DocumentDate" BETWEEN _bdate AND _edate
) ;
```
**Поступят к hr в ближайшее время** - в реестре отображаются документы, которые в данный момент находятся на стадии согласования у руководителя сотрудника, и после этого поступят в HR службу.
```
insert into "tmp_finresult"( "DocCode" , "DocType" , "DocForm" , "DocTypeName" , "SettingsId"
, "orgId" , "DocumentDate" , "DocumentNumber" , "VirtualCUser" , "DateOfExecution"
, "DateControl" , "RouteVCode" , "RouteStatusId" , "RouteStatusName" , "DocName"
, "DocSubject" , "expired" , "StageNumber" , "BeginDate" , "ActionDate"
, "DocumentAction" , "DocumentStatus" , "FromMessage" , "eDate", "Department"
, "StageUser" , "StageItemStatus" , "StageStatus" , "StageItemAction" , "DocumentSubtype" , "AnyColumnA" , "AnyColumnB" , "AnyColumnC" , "AnyColumnD" , "AnyColumnE")
select t."DocCode" , t."DocType" , t."DocForm" , t."DocTypeName" , t."SettingsId"
, t."orgId" , t."DocumentDate" , t."DocumentNumber" , t."VirtualCUser" , t."DateOfExecution"
, t."DateControl" , t."RouteVCode" , t."RouteStatusId" , t."RouteStatusName" , t."DocName"
, t."DocSubject" ,
comdoc."dfwcGetDuration"(t."eDate", COALESCE(t."ActionDate", _now), false, t."orgId", 1, _dayoff1, _dayoff2, null) ,
t."StageNumber" , t."BeginDate" , t."ActionDate"
, t."DocumentAction" , t."DocumentStatus" , t."FromMessage" , t."eDate", t."Department"
, t."StageUser" , t."StageItemStatus" , t."StageStatus" , t."StageItemAction", t."DocumentSubtype", t."AnyColumnA" , t."AnyColumnB" , t."AnyColumnC" , t."AnyColumnD" , t."AnyColumnE"
from "tmp_preresult" t
where coalesce(t."RouteStatusId",0) = 2 and t."IsMarked" is not true
and t."StageItemStatus"= 2
and exists (select 1 from "tmp_userRole" where "Role" not in ( 'hr_docflow_hr', 'hr_director_hr')
and coalesce(t."StageUser",'') = coalesce("DocflowUser",'') )
and exists (select 1 from comdoc."RouteStage" rs
join comdoc."StageItem" si on rs."VCode" = si."PCode"
where rs."PCode" = t."RouteVCode"
and si."StageItemStatus" = 1
and rs."IsMarked" is not true
and si."StageUser" in (select "DocflowUser" from "tmp_userRole" where "Role" = 'hr_docflow_hr' ))
AND (
t."DocumentDate" IS NULL OR t."DocumentDate" BETWEEN _bdate AND _edate
) ;
```
**Сейчас в работе у hr** - в реестре отображаются документы, которые в данный момент находятся в HR службе в работе
```
insert into "tmp_finresult"( "DocCode" , "DocType" , "DocForm" , "DocTypeName" , "SettingsId"
, "orgId" , "DocumentDate" , "DocumentNumber" , "VirtualCUser" , "DateOfExecution"
, "DateControl" , "RouteVCode" , "RouteStatusId" , "RouteStatusName" , "DocName"
, "DocSubject" , "expired" , "StageNumber" , "BeginDate" , "ActionDate"
, "DocumentAction" , "DocumentStatus" , "FromMessage" , "eDate", "Department"
, "StageUser" , "StageItemStatus" , "StageStatus" , "StageItemAction" , "IsMarked", "DocumentSubtype" , "AnyColumnA" , "AnyColumnB" , "AnyColumnC" , "AnyColumnD" , "AnyColumnE")
select t."DocCode" , t."DocType" , t."DocForm" , t."DocTypeName" , t."SettingsId"
, t."orgId" , t."DocumentDate" , t."DocumentNumber" , t."VirtualCUser" , t."DateOfExecution"
, t."DateControl" , t."RouteVCode" , t."RouteStatusId" , t."RouteStatusName" , t."DocName"
, t."DocSubject" , comdoc."dfwcGetDuration"(
t."eDate", COALESCE(t."ActionDate", _now), false, t."orgId", 1, _dayoff1, _dayoff2, null
)
, t."StageNumber" , t."BeginDate" , t."ActionDate"
, t."DocumentAction" , t."DocumentStatus" , t."FromMessage" , t."eDate", t."Department"
, t."StageUser" , t."StageItemStatus" , t."StageStatus" , t."StageItemAction", t."IsMarked", t."DocumentSubtype" , t."AnyColumnA" , t."AnyColumnB" , t."AnyColumnC" , t."AnyColumnD" , t."AnyColumnE"
from "tmp_preresult" t
where coalesce(t."RouteStatusId",0) = 2 and t."StageItemStatus"= 2
and coalesce(t."StageUser",'') in (select coalesce("DocflowUser",'') from "tmp_userRole" where "Role" = 'hr_docflow_hr')
AND (
t."DocumentDate" IS NULL OR t."DocumentDate" BETWEEN _bdate AND _edate
) ;
```
**Обработано службой HR сегодня** - в реестре отображаются документы, которые были обработаны сегодня службой HR сегодня.
```
insert into "tmp_finresult"( "DocCode" , "DocType" , "DocForm" , "DocTypeName" , "SettingsId"
, "orgId" , "DocumentDate" , "DocumentNumber" , "VirtualCUser" , "DateOfExecution"
, "DateControl" , "RouteVCode" , "RouteStatusId" , "RouteStatusName" , "DocName"
, "DocSubject" , "expired" , "StageNumber" , "BeginDate" , "ActionDate"
, "DocumentAction" , "DocumentStatus" , "FromMessage" , "eDate", "Department"
, "StageUser" , "StageItemStatus" , "StageStatus" , "StageItemAction", "DocumentSubtype" , "AnyColumnA" , "AnyColumnB" , "AnyColumnC" , "AnyColumnD" , "AnyColumnE" )
select t."DocCode" , t."DocType" , t."DocForm" , t."DocTypeName" , t."SettingsId"
, t."orgId" , t."DocumentDate" , t."DocumentNumber" , t."VirtualCUser" , t."DateOfExecution"
, t."DateControl" , t."RouteVCode" , t."RouteStatusId" , t."RouteStatusName" , t."DocName"
, t."DocSubject" ,
comdoc."dfwcGetDuration"(t."eDate", COALESCE(t."ActionDate", _now), false, t."orgId", 1, _dayoff1, _dayoff2, null) ,
t."StageNumber" , t."BeginDate" , t."ActionDate"
, t."DocumentAction" , t."DocumentStatus" , t."FromMessage" , t."eDate", t."Department"
, t."StageUser" , t."StageItemStatus" , t."StageStatus" , t."StageItemAction", t."DocumentSubtype", t."AnyColumnA" , t."AnyColumnB" , t."AnyColumnC" , t."AnyColumnD" , t."AnyColumnE"
from "tmp_preresult" t
where coalesce(t."RouteStatusId",0) in ( 2,3 ) and t."StageItemStatus"= 3 and t."IsMarked" is not true
and t."DocumentStatus" not in (19,22,23,32,33,51,99)
and t."ActionDate"::date = now()::date
and exists (select 1 from "tmp_userRole" where "Role" = 'hr_docflow_hr' and coalesce(t."StageUser",'') = coalesce("DocflowUser",'') )
AND (
t."DocumentDate" IS NULL OR t."DocumentDate" BETWEEN _bdate AND _edate
) ;
```