/// <summary> /// Получить информацию об ответственном лице по имени /// </summary> private IResultAppValue <ISignatureLibraryApp> GetSignatureInformation(string personName, string personId, PersonDepartmentType personDepartmentType, string actionType) => new ResultAppValue <ISignatureLibraryApp>(SignaturesSearching.FindById(personId), new ErrorApplication(ErrorApplicationType.SignatureNotFound, $"Подпись {personName} не найдена")). ResultValueOk(signature => signature.PersonInformation.DepartmentType). ResultValueOk(departmentType => SignaturesSearching.CheckDepartmentAccordingToType(departmentType, personDepartmentType)). ResultValueOkBind(departmentChecked => SignaturesSearching.FindByFullNameOrRandom(personName, departmentChecked)). ResultValueOk(personAttributeId => SignaturesActionType.GetPersonIdByActionType(personAttributeId.PersonId, UseDefaultSignature, PersonId, actionType)). ResultValueOk(personCheckedId => SignaturesSearching.FindById(personCheckedId));
/// <summary> /// Получить класс с ответственным лицом и подписью по строке Word для строк согласования тех требований с директорами /// </summary> private IResultAppValue <IStampApprovalChief> GetStampApprovalChiefFromRow(IRowElementWord approvalChiefRow) => ConverterDepartmentTypeApp.DepartmentParsing(approvalChiefRow.CellsElement[ApprovalChiefRowIndexes.DEPARTMENT].Text). Map(departmentType => SignaturesSearching.FindByFullNameOrRandom(approvalChiefRow.CellsElement[ApprovalChiefRowIndexes.RESPONSIBLE_PERSON].MaxLengthWord, departmentType)). ResultValueOk(signature => GetStampApprovalChiefFromFields(approvalChiefRow, signature, _stampIdentifier));