уточнение про EmailRecipient в ЖСД
This commit is contained in:
		| @ -135,6 +135,22 @@ | ||||
| 	left join "tmp_workers_for_documentStatusJournalProc" w2 on w2."VCode" =  t."IdWorker" _topcount; | ||||
| 	``` | ||||
|  | ||||
| Для отправки сообщений необходимо заполнить столбец "EmailRecipient" кодом сотрудника в **tmp_finresult** | ||||
|  | ||||
| !!! example "Пример:" | ||||
| 	```sql | ||||
| 	insert into "tmp_finresult"(..., "EmailRecipient") | ||||
| 	..., | ||||
| 	( SELECT w."VCode" | ||||
|          FROM comdoc."RouteStage" as rs | ||||
|            join  comdoc."StageItem" AS i on i."PCode" = rs."VCode" | ||||
|            join rp."RP_PersonContact" pc on  i."StageUser" = pc."Code" and pc."IdTypeContact" = 6 | ||||
|            join rp."RP_Worker" w on pc."Pcode" = w."IdPerson" and w."COrg" = t."orgId"  | ||||
|          WHERE rs."PCode" = t."RouteVCode" | ||||
|            AND i."StageItemStatus" = 2 order by i."VCode", w."DateBeg" desc | ||||
| 	limit 1 | ||||
|      ) | ||||
| 	``` | ||||
| <!-- ### Примеры запросов | ||||
|  | ||||
| #### Просроченные документы | ||||
|  | ||||
		Reference in New Issue
	
	Block a user