Commit 8af01bd9 8af01bd997bc2f3e384078e05e5abc8c90ead05d by Марк Денисенко

Импорт пакета разработки [Rx]

1 parent 4abdcd6f
Showing 1000 changed files with 3729 additions and 477 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

using System;
using System.Collections.Generic;
using System.Linq;
using Sungero.Commons.ClassifierTrainingSession;
using Sungero.Core;
using Sungero.CoreEntities;
namespace Sungero.Commons.Client
{
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using Sungero.Commons.ClassifierTrainingSession;
using Sungero.Core;
using Sungero.CoreEntities;
namespace Sungero.Commons.Client
{
partial class ClassifierTrainingSessionFunctions
{
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using Sungero.Commons.ClassifierTrainingSession;
using Sungero.Core;
using Sungero.CoreEntities;
namespace Sungero.Commons
{
partial class ClassifierTrainingSessionClientHandlers
{
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
<ViewName>Default</ViewName>
</settings>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
<ViewName>Default</ViewName>
<Collection FormGuid="cddd4c25-da1e-45d4-ab4b-0250a22ce940">
<XtraSerializer version="1.0" application="GridControl">
<property name="#LayoutVersion" isnull="true" />
<property name="$GridControl" iskey="true" value="GridControl">
<property name="View" isnull="true" iskey="true">
<property name="LinesPerRowMode">OneLineMode</property>
<property name="ColumnChooserState" isnull="true" iskey="true">
<property name="Location">619,-194</property>
<property name="Size">220,250</property>
</property>
<property name="AllowSorting">true</property>
<property name="IsRowCellMenuEnabled">false</property>
<property name="AutoWidth">true</property>
<property name="AllowGrouping">true</property>
</property>
<property name="TotalSummary" iskey="true" value="0" />
<property name="SortInfo" iskey="true" value="1">
<property name="Item1" isnull="true" iskey="true">
<property name="FieldName">Id</property>
<property name="SortOrder">Descending</property>
</property>
</property>
<property name="GroupSummary" iskey="true" value="0" />
<property name="GroupCount">0</property>
<property name="Columns" iskey="true" value="9">
<property name="Item1" isnull="true" iskey="true">
<property name="MinWidth">32</property>
<property name="FixedWidth">true</property>
<property name="Visible">true</property>
<property name="FieldName">T</property>
<property name="VisibleIndex">0</property>
<property name="Width">32</property>
<property name="ActualWidth">4*</property>
</property>
<property name="Item2" isnull="true" iskey="true">
<property name="ExtendedVisibleIndex">4</property>
<property name="Visible">true</property>
<property name="Name">ClassifierTrainingSession_Id</property>
<property name="FieldName">Id</property>
<property name="VisibleIndex">1</property>
<property name="ActualWidth">8*</property>
</property>
<property name="Item3" isnull="true" iskey="true">
<property name="ExtendedVisibleIndex">5</property>
<property name="Visible">true</property>
<property name="Name">ClassifierTrainingSession_Name</property>
<property name="FieldName">Name</property>
<property name="VisibleIndex">2</property>
<property name="ActualWidth">59*</property>
</property>
<property name="Item4" isnull="true" iskey="true">
<property name="ExtendedVisibleIndex">7</property>
<property name="Visible">true</property>
<property name="Name">ClassifierTrainingSession_ClassifierId</property>
<property name="FieldName">ClassifierId</property>
<property name="VisibleIndex">4</property>
<property name="ActualWidth">7*</property>
</property>
<property name="Item5" isnull="true" iskey="true">
<property name="ExtendedVisibleIndex">8</property>
<property name="Visible">true</property>
<property name="Name">ClassifierTrainingSession_ModelId</property>
<property name="FieldName">ModelId</property>
<property name="VisibleIndex">5</property>
<property name="ActualWidth">7*</property>
</property>
<property name="Item6" isnull="true" iskey="true">
<property name="ExtendedVisibleIndex">0</property>
<property name="Visible">false</property>
<property name="Name">ClassifierTrainingSession_FMeasureBeforeTraining</property>
<property name="FieldName">FMeasureBeforeTraining</property>
<property name="ActualWidth">NaN</property>
</property>
<property name="Item7" isnull="true" iskey="true">
<property name="ExtendedVisibleIndex">1</property>
<property name="Visible">false</property>
<property name="Name">ClassifierTrainingSession_FMeasureAfterTraining</property>
<property name="FieldName">FMeasureAfterTraining</property>
<property name="ActualWidth">NaN</property>
</property>
<property name="Item8" isnull="true" iskey="true">
<property name="ExtendedVisibleIndex">2</property>
<property name="Visible">false</property>
<property name="Name">ClassifierTrainingSession_ArioTaskId</property>
<property name="FieldName">ArioTaskId</property>
<property name="ActualWidth">NaN</property>
</property>
<property name="Item9" isnull="true" iskey="true">
<property name="ExtendedVisibleIndex">6</property>
<property name="Visible">true</property>
<property name="Name">ClassifierTrainingSession_TrainingStatus</property>
<property name="FieldName">TrainingStatus</property>
<property name="VisibleIndex">3</property>
<property name="ActualWidth">11*</property>
</property>
</property>
<property name="GroupSummarySortInfo" iskey="true" value="0" />
</property>
</XtraSerializer>
</Collection>
</settings>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
<ViewName>Default</ViewName>
<Folder FormGuid="8dbb6507-6d7b-4ef2-9247-a64a15eb5dbb">
<XtraSerializer version="1.0" application="GridControl">
<property name="#LayoutVersion" isnull="true" />
<property name="$GridControl" iskey="true" value="GridControl">
<property name="Columns" iskey="true" value="3">
<property name="Item1" isnull="true" iskey="true">
<property name="FieldName">T</property>
<property name="Visible">true</property>
<property name="VisibleIndex">0</property>
</property>
<property name="Item2" isnull="true" iskey="true">
<property name="FieldName">Id</property>
<property name="Visible">true</property>
<property name="Name">ClassifierTrainingSession_Id</property>
<property name="VisibleIndex">1</property>
</property>
<property name="Item3" isnull="true" iskey="true">
<property name="FieldName">Name</property>
<property name="Visible">true</property>
<property name="Name">ClassifierTrainingSession_Name</property>
<property name="VisibleIndex">2</property>
</property>
</property>
</property>
</XtraSerializer>
</Folder>
</settings>
\ No newline at end of file
......@@ -9,6 +9,20 @@ namespace Sungero.Commons.Client
{
partial class EntityRecognitionInfoActions
{
public virtual void ShowDocument(Sungero.Domain.Client.ExecuteActionArgs e)
{
var document = Functions.EntityRecognitionInfo.Remote.GetDocument(_obj);
if (document != null)
document.ShowModal();
else
Dialogs.NotifyMessage(EntityRecognitionInfos.Resources.NoRightsToDocument);
}
public virtual bool CanShowDocument(Sungero.Domain.Client.CanExecuteActionArgs e)
{
return _obj.EntityId.HasValue;
}
public override void DeleteEntity(Sungero.Domain.Client.ExecuteActionArgs e)
{
base.DeleteEntity(e);
......
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using Sungero.Commons.EntityRecognitionInfo;
......@@ -10,5 +10,27 @@ namespace Sungero.Commons
partial class EntityRecognitionInfoClientHandlers
{
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e)
{
var entityParams = ((Domain.Shared.IExtendedEntity)_obj).Params;
if (!entityParams.ContainsKey(PublicConstants.EntityRecognitionInfo.CanChangeTrainingStatusParamName))
{
var isUserAdministrator = Users.Current.IncludedIn(Roles.Administrators);
if (isUserAdministrator)
_obj.State.Properties.ClassifierTrainingStatus.IsEnabled = true;
entityParams[PublicConstants.EntityRecognitionInfo.CanChangeTrainingStatusParamName] = isUserAdministrator;
}
else
{
object canChangeTrainingStatus = null;
if (entityParams.TryGetValue(PublicConstants.EntityRecognitionInfo.CanChangeTrainingStatusParamName, out canChangeTrainingStatus))
{
if ((bool)canChangeTrainingStatus)
_obj.State.Properties.ClassifierTrainingStatus.IsEnabled = true;
}
}
}
}
}
\ No newline at end of file
......
......@@ -5,25 +5,117 @@
<XtraSerializer version="1.0" application="GridControl">
<property name="#LayoutVersion" isnull="true" />
<property name="$GridControl" iskey="true" value="GridControl">
<property name="Columns" iskey="true" value="3">
<property name="View" isnull="true" iskey="true">
<property name="LinesPerRowMode">OneLineMode</property>
<property name="ColumnChooserState" isnull="true" iskey="true">
<property name="Location">836,-194</property>
<property name="Size">220,250</property>
</property>
<property name="AllowSorting">true</property>
<property name="IsRowCellMenuEnabled">false</property>
<property name="AutoWidth">false</property>
<property name="AllowGrouping">true</property>
</property>
<property name="TotalSummary" iskey="true" value="0" />
<property name="SortInfo" iskey="true" value="1">
<property name="Item1" isnull="true" iskey="true">
<property name="FieldName">T</property>
<property name="FieldName">Created</property>
<property name="SortOrder">Descending</property>
</property>
</property>
<property name="GroupSummary" iskey="true" value="0" />
<property name="GroupCount">0</property>
<property name="Columns" iskey="true" value="11">
<property name="Item1" isnull="true" iskey="true">
<property name="ExtendedVisibleIndex">0</property>
<property name="MinWidth">32</property>
<property name="FixedWidth">true</property>
<property name="Visible">true</property>
<property name="FieldName">T</property>
<property name="VisibleIndex">0</property>
<property name="Width">32</property>
<property name="ActualWidth">3*</property>
</property>
<property name="Item2" isnull="true" iskey="true">
<property name="FieldName">Id</property>
<property name="Visible">true</property>
<property name="ExtendedVisibleIndex">7</property>
<property name="Visible">false</property>
<property name="Name">EntityRecognitionInfo_Id</property>
<property name="FieldName">Id</property>
<property name="VisibleIndex">1</property>
<property name="ActualWidth">NaN</property>
</property>
<property name="Item3" isnull="true" iskey="true">
<property name="ExtendedVisibleIndex">8</property>
<property name="Visible">false</property>
<property name="Name">EntityRecognitionInfo_Name</property>
<property name="FieldName">Name</property>
<property name="VisibleIndex">2</property>
<property name="ActualWidth">NaN</property>
</property>
<property name="Item4" isnull="true" iskey="true">
<property name="ExtendedVisibleIndex">3</property>
<property name="Visible">true</property>
<property name="Name">EntityRecognitionInfo_Name</property>
<property name="Name">EntityRecognitionInfo_RecognizedClass</property>
<property name="FieldName">RecognizedClass</property>
<property name="VisibleIndex">3</property>
<property name="ActualWidth">17*</property>
</property>
<property name="Item5" isnull="true" iskey="true">
<property name="ExtendedVisibleIndex">9</property>
<property name="Visible">true</property>
<property name="Name">EntityRecognitionInfo_ClassProbability</property>
<property name="FieldName">ClassProbability</property>
<property name="VisibleIndex">5</property>
<property name="ActualWidth">5*</property>
</property>
<property name="Item6" isnull="true" iskey="true">
<property name="ExtendedVisibleIndex">1</property>
<property name="Visible">true</property>
<property name="Name">EntityRecognitionInfo_EntityId</property>
<property name="FieldName">EntityId</property>
<property name="VisibleIndex">1</property>
<property name="ActualWidth">5,5*</property>
</property>
<property name="Item7" isnull="true" iskey="true">
<property name="ExtendedVisibleIndex">5</property>
<property name="Visible">false</property>
<property name="Name">EntityRecognitionInfo_EntityType</property>
<property name="FieldName">EntityType</property>
<property name="ActualWidth">NaN</property>
</property>
<property name="Item8" isnull="true" iskey="true">
<property name="ExtendedVisibleIndex">10</property>
<property name="Visible">true</property>
<property name="Name">EntityRecognitionInfo_ClassifierTrainingStatus</property>
<property name="FieldName">ClassifierTrainingStatus</property>
<property name="VisibleIndex">6</property>
<property name="ActualWidth">12*</property>
</property>
<property name="Item9" isnull="true" iskey="true">
<property name="ExtendedVisibleIndex">6</property>
<property name="Visible">false</property>
<property name="Name">EntityRecognitionInfo_ClassifierTrainingSession</property>
<property name="FieldName">ClassifierTrainingSession.DisplayValue</property>
<property name="ActualWidth">NaN</property>
</property>
<property name="Item10" isnull="true" iskey="true">
<property name="ExtendedVisibleIndex">4</property>
<property name="Visible">true</property>
<property name="Name">EntityRecognitionInfo_VerifiedClass</property>
<property name="FieldName">VerifiedClass</property>
<property name="VisibleIndex">4</property>
<property name="ActualWidth">17*</property>
</property>
<property name="Item11" isnull="true" iskey="true">
<property name="ExtendedVisibleIndex">2</property>
<property name="Visible">true</property>
<property name="Name">EntityRecognitionInfo_Created</property>
<property name="FieldName">Created</property>
<property name="VisibleIndex">2</property>
<property name="ActualWidth">7*</property>
</property>
</property>
<property name="GroupSummarySortInfo" iskey="true" value="0" />
</property>
</XtraSerializer>
</Collection>
......
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><title>OpenRecord_32</title><rect x="2" y="5" width="28" height="21" fill="#fff"/><path d="M30,5V26H2V5H30m1-2H1A1,1,0,0,0,0,4V27a1,1,0,0,0,1,1H31a1,1,0,0,0,1-1V4a1,1,0,0,0-1-1h0Z" fill="#9da2a5"/><rect x="4" y="8" width="24" height="4" fill="#7da7b5"/><rect x="4" y="14" width="7" height="2" fill="#667f94"/><rect x="12" y="14" width="16" height="2" fill="#667f94"/><rect x="4" y="17" width="7" height="2" fill="#667f94"/><rect x="12" y="17" width="16" height="2" fill="#667f94"/></svg>
\ No newline at end of file
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><title>OpenRecord_16</title><rect x="1" y="2" width="14" height="11" fill="#fff"/><rect x="2" y="4" width="12" height="2" fill="#7da7b5"/><rect x="6" y="7" width="8" height="1" fill="#667f94"/><path d="M15,2V13H1V2H15m0-1H1A1,1,0,0,0,0,2V13a1,1,0,0,0,1,1H15a1,1,0,0,0,1-1V2a1,1,0,0,0-1-1h0Z" fill="#798288"/><rect x="2" y="7" width="3" height="1" fill="#667f94"/></svg>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using Sungero.Commons.ClassifierTrainingSession;
using Sungero.Core;
using Sungero.CoreEntities;
namespace Sungero.Commons
{
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using Sungero.Commons.ClassifierTrainingSession;
using Sungero.Core;
using Sungero.CoreEntities;
namespace Sungero.Commons.Server
{
partial class ClassifierTrainingSessionFunctions
{
}
}
\ No newline at end of file
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using Sungero.Commons.EntityRecognitionInfo;
......@@ -7,4 +7,13 @@ using Sungero.CoreEntities;
namespace Sungero.Commons
{
partial class EntityRecognitionInfoServerHandlers
{
public override void Created(Sungero.Domain.CreatedEventArgs e)
{
_obj.Created = Calendar.Now;
}
}
}
\ No newline at end of file
......
......@@ -19,11 +19,13 @@ namespace Sungero.Commons.Server
[Public, Remote(IsPure = true)]
public static IEntityRecognitionInfo GetEntityRecognitionInfo(Sungero.Domain.Shared.IEntity entity)
{
var typeGuid = entity.GetEntityMetadata()
.GetOriginal()
.NameGuid.ToString();
return EntityRecognitionInfos.GetAll(x => x.EntityId == entity.Id && x.EntityType == typeGuid)
.OrderByDescending(x => x.Id).FirstOrDefault();
var typeGuid = entity.GetEntityMetadata().GetOriginal().NameGuid.ToString();
return EntityRecognitionInfos
.GetAll(x => x.EntityId == entity.Id &&
string.Equals(x.EntityType, typeGuid, StringComparison.InvariantCultureIgnoreCase))
.OrderByDescending(x => x.Id)
.FirstOrDefault();
}
/// <summary>
......@@ -176,5 +178,86 @@ namespace Sungero.Commons.Server
}
}
/// <summary>
/// Получить документ, связанный с результатом распознавания.
/// </summary>
/// <returns>Документ.</returns>
/// <remarks>Вернуть как сущность, чтобы не добавлять зависимость от модуля, где определен официальный документ.</remarks>
[Public, Remote(IsPure = true)]
public virtual IEntity GetDocument()
{
if (_obj.EntityId.HasValue)
{
var document = Sungero.Docflow.PublicFunctions.Module.GetElectronicDocumentAsEntity(_obj.EntityId.Value);
if (document != null && string.Equals(document.GetEntityMetadata().GetOriginal().NameGuid.ToString(),
_obj.EntityType,
StringComparison.InvariantCultureIgnoreCase))
return document;
}
return null;
}
/// <summary>
/// Обновить положение фактов для нового порядка страниц в документе.
/// </summary>
/// <param name="newPagesOrder">Новый порядок страниц в документе. Ключ - текущий номер страницы, Значение - новый номер.</param>
/// <returns>Список Ид фактов, страницы которых не указаны в новом порядке.</returns>
[Public]
public virtual List<int> UpdatePagesInPositions(System.Collections.Generic.IDictionary<string, string> newPagesOrder)
{
var elementDelimiter = Docflow.PublicConstants.Module.PositionElementDelimiter;
var positionsDelimiter = Docflow.PublicConstants.Module.PositionsDelimiter;
var loggerTemplateForChange = "Commons. UpdatePagesInPositions. Position for field {0} in recognition info (ID = {1}) was changed from {2} to {3}.";
var factsFromDeletedPages = new List<int>();
var factFieldsWithPositions = _obj.Facts.Where(x => !string.IsNullOrWhiteSpace(x.PropertyName) && !string.IsNullOrWhiteSpace(x.Position) && x.FactId.HasValue);
foreach (var factField in factFieldsWithPositions)
{
var positions = factField.Position.Split(positionsDelimiter).Select(x => x.Split(elementDelimiter)).ToList();
var newPositions = new List<string>();
foreach (var positionElements in positions)
{
if (newPagesOrder.ContainsKey(positionElements[0]))
{
positionElements[0] = newPagesOrder[positionElements[0]];
newPositions.Add(string.Join(elementDelimiter.ToString(), positionElements));
}
}
var newFactPosition = string.Join(positionsDelimiter.ToString(), newPositions);
if (factField.Position != newFactPosition)
{
if (string.IsNullOrEmpty(newFactPosition))
factsFromDeletedPages.Add(factField.FactId.Value);
else
{
Logger.DebugFormat(loggerTemplateForChange, factField.FieldId, _obj.Id, factField.Position, newFactPosition);
factField.Position = newFactPosition;
}
}
}
return factsFromDeletedPages.Distinct().ToList();
}
/// <summary>
/// Очистить привязку к свойству у всех полей фактов.
/// </summary>
/// <param name="factsIds">Список с Ид фактов.</param>
[Public]
public virtual void ClearFactAndPropertyLink(List<int> factsIds)
{
var loggerTemplateForDelete = "Commons. ClearFactAndPropertyLink. Position and property link for field {0} in recognition info (ID = {1}) was deleted.";
var deletedFactsFields = _obj.Facts.Where(x => x.FactId.HasValue && factsIds.Contains(x.FactId.Value));
foreach (var factField in deletedFactsFields)
{
factField.PropertyName = string.Empty;
factField.PropertyValue = string.Empty;
factField.FactLabel = string.Empty;
factField.Position = string.Empty;
factField.CollectionRecordId = null;
factField.Probability = null;
Logger.DebugFormat(loggerTemplateForDelete, factField.FieldId, _obj.Id);
}
}
}
}
\ No newline at end of file
......
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using Sungero.Core;
......@@ -8,6 +8,117 @@ namespace Sungero.Commons.Server
{
public class ModuleAsyncHandlers
{
/// <summary>
/// Удалить сущность из индекса.
/// </summary>
/// <param name="args">Параметры вызова асинхронного обработчика.</param>
public virtual void RemoveEntityFromIndex(Sungero.Commons.Server.AsyncHandlerInvokeArgs.RemoveEntityFromIndexInvokeArgs args)
{
// Отмена АО, в случае передачи неверных параметров.
var invalidArgumentsPassed = false;
if (string.IsNullOrWhiteSpace(args.IndexName))
{
Logger.Debug("Commons. RemoveEntityFromIndex. Invalid arguments passed: \"IndexName\" must be not empty. Operation will be cancel.");
invalidArgumentsPassed = true;
}
if (args.EntityId <= 0)
{
Logger.Debug("Commons. RemoveEntityFromIndex. Invalid arguments passed: \"EntityId\" must be greater than 0. Operation will be cancel.");
invalidArgumentsPassed = true;
}
if (invalidArgumentsPassed)
return;
Logger.DebugFormat("Commons. RemoveEntityFromIndex. Start remove entity with id {0} from index {1}. Retry iteration: {2}.",
args.EntityId, args.IndexName, args.RetryIteration);
var result = false;
var errorText = string.Empty;
try
{
PublicFunctions.Module.ElasticsearchRemoveEntity(args.IndexName, args.EntityId);
result = true;
}
catch (Exception ex)
{
Logger.ErrorFormat("Commons. RemoveEntityFromIndex. Error while remove entity with id {0} from index {1}: {2}",
args.EntityId, args.IndexName, ex.Message);
}
if (!result)
{
if (args.RetryIteration < Constants.Module.IndexingAsyncsRetryCount)
{
args.Retry = true;
Logger.DebugFormat("Commons. RemoveEntityFromIndex. Entity with id {0} not removed from index {1}, retry iteration {2}.",
args.EntityId, args.IndexName, args.RetryIteration);
}
else
Logger.ErrorFormat("Commons. RemoveEntityFromIndex. Cant remove entity with id {0} from index {1}. Retry attempts are over, retry iteration: {2}.",
args.EntityId, args.IndexName, args.RetryIteration);
}
else
Logger.DebugFormat("Commons. RemoveEntityFromIndex. Success remove entity with id {0} from index {1}.", args.EntityId, args.IndexName);
}
/// <summary>
/// Индексировать сущность.
/// </summary>
/// <param name="args">Параметры вызова асинхронного обработчика.</param>
public virtual void IndexEntity(Sungero.Commons.Server.AsyncHandlerInvokeArgs.IndexEntityInvokeArgs args)
{
// Отмена АО, в случае передачи неверных параметров.
var invalidArgumentsPassed = false;
if (string.IsNullOrWhiteSpace(args.IndexName))
{
Logger.Debug("Commons. IndexEntity. Invalid arguments passed: \"IndexName\" must be not empty. Operation will be cancel.");
invalidArgumentsPassed = true;
}
if (string.IsNullOrWhiteSpace(args.Json))
{
Logger.Debug("Commons. IndexEntity. Invalid arguments passed: \"Json\" must be not empty. Operation will be cancel.");
invalidArgumentsPassed = true;
}
if (args.EntityId <= 0)
{
Logger.Debug("Commons. IndexEntity. Invalid arguments passed: \"EntityId\" must be greater than 0. Operation will be cancel.");
invalidArgumentsPassed = true;
}
if (invalidArgumentsPassed)
return;
Logger.DebugFormat("Commons. IndexEntity. Start indexing entity with id {0} to index {1}. Retry iteration: {2}.",
args.EntityId, args.IndexName, args.RetryIteration);
var result = false;
var errorText = string.Empty;
try
{
PublicFunctions.Module.ElasticsearchIndexEntity(args.IndexName, args.Json, args.EntityId, args.AsyncCreated, args.AllowCreateRecord);
result = true;
}
catch (Exception ex)
{
Logger.ErrorFormat("Commons. IndexEntity. Error while indexing entity with id {0} to index {1}: {2}",
args.EntityId, args.IndexName, ex.Message);
}
if (!result)
{
if (args.RetryIteration < Constants.Module.IndexingAsyncsRetryCount)
{
args.Retry = true;
Logger.DebugFormat("Commons. IndexEntity. Entity with id {0} not indexed to index {1}, retry iteration {2}.",
args.EntityId, args.IndexName, args.RetryIteration);
}
else
Logger.ErrorFormat("Commons. IndexEntity. Cant index entity with id {0} to index {1}. Retry attempts are over, retry iteration: {2}.",
args.EntityId, args.IndexName, args.RetryIteration);
}
else
Logger.DebugFormat("Commons. IndexEntity. Success index entity with id {0} to index {1}.", args.EntityId, args.IndexName);
}
}
}
\ No newline at end of file
......
......@@ -18,8 +18,8 @@ namespace Sungero.Commons.Server
public static IRegion GetRegionFromAddress(string address)
{
if (string.IsNullOrWhiteSpace(address))
return null;
return null;
var pattern = string.Format(@"(?i:(?<pref>{0}\s)?(?<region>[а-я-]+)(?<suf>\s{0})?)", Constants.Region.AddressTypesMask);
var match = System.Text.RegularExpressions.Regex.Match(address, pattern);
......@@ -28,7 +28,7 @@ namespace Sungero.Commons.Server
// Нашли республику/округ/край/область.
if (match.Groups["pref"].Success || match.Groups["suf"].Success)
return Regions.GetAll().FirstOrDefault(r => r.Name.Contains(match.Groups["region"].Value));
match = match.NextMatch();
}
......
{
"NameGuid": "459fa497-ee5b-49a4-9980-de00cada9b7a"
}
\ No newline at end of file
{
"$type": "Sungero.Metadata.EntityMetadata, Sungero.Metadata",
"NameGuid": "d79390ea-86ea-4e79-ba28-a4ce5e5550c1",
"Name": "ClassifierTrainingSession",
"BaseGuid": "04581d26-0780-4cfd-b3cd-c2cafc5798b0",
"CanBeNavigationPropertyType": true,
"CanBeSearch": true,
"CanBeUsedInIntegration": true,
"Code": "TrainSession",
"CreationAreaMetadata": {
"NameGuid": "f7766750-eee2-4fcd-8003-5c06a90d1f44",
"Name": "CreationArea",
"Buttons": [],
"IsAncestorMetadata": true
},
"ExtraSearchProperties": [],
"FilterPanel": {
"NameGuid": "b0125fbd-3b91-4dbb-914a-689276216404",
"Name": "FilterPanel",
"Controls": [],
"IsAncestorMetadata": true
},
"Forms": [
{
"$type": "Sungero.Metadata.StandaloneFormMetadata, Sungero.Metadata",
"NameGuid": "c982896f-837f-4ab3-bf66-40286f9c67ac",
"Name": "Card",
"Controls": [
{
"$type": "Sungero.Metadata.ControlGroupMetadata, Sungero.Metadata",
"NameGuid": "84669ebf-dcfd-4638-8794-c15f139f4132",
"Name": "ControlGroup"
},
{
"$type": "Sungero.Metadata.ControlGroupMetadata, Sungero.Metadata",
"NameGuid": "9f6c5a2f-a35f-49ce-ba0d-3114026946d3",
"Name": "ControlGroup",
"ColumnDefinitions": [
{
"Percentage": 50.0
},
{
"Percentage": 50.0
}
],
"ColumnNumber": 0,
"ColumnSpan": 1,
"ParentGuid": "84669ebf-dcfd-4638-8794-c15f139f4132",
"RowNumber": 0,
"RowSpan": 1
},
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "b5ea468b-008e-4c62-83ea-988c6bf446dd",
"Name": "ClassifierID",
"ColumnNumber": 0,
"ColumnSpan": 1,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.NumericEditorToIntAndDoubleBinder",
"ParentGuid": "9f6c5a2f-a35f-49ce-ba0d-3114026946d3",
"PropertyGuid": "fda7f4df-f824-4d8d-b89a-8bf0aa2be5a5",
"RowNumber": 0,
"RowSpan": 1,
"Settings": []
},
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "0472410a-0e61-4e6c-8826-d28b5f934d19",
"Name": "ClassifierVersionID",
"ColumnNumber": 1,
"ColumnSpan": 1,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.NumericEditorToIntAndDoubleBinder",
"ParentGuid": "9f6c5a2f-a35f-49ce-ba0d-3114026946d3",
"PropertyGuid": "bd5739b2-51db-4185-a38b-30daf40e7a2b",
"RowNumber": 0,
"RowSpan": 1,
"Settings": []
},
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "1bc8abf0-14f3-4a31-987e-8f2f2b9f6d11",
"Name": "Status",
"ColumnNumber": 0,
"ColumnSpan": 1,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.DropDownEditorToEnumerationBinder",
"ParentGuid": "9f6c5a2f-a35f-49ce-ba0d-3114026946d3",
"PropertyGuid": "1571fcd5-237d-443c-b951-049d22928ccd",
"RowNumber": 2,
"RowSpan": 1,
"Settings": []
},
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "d637e847-3763-4b53-a69b-103a6006918d",
"Name": "ArioTaskId",
"ColumnNumber": 0,
"ColumnSpan": 1,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.NumericEditorToIntAndDoubleBinder",
"ParentGuid": "9f6c5a2f-a35f-49ce-ba0d-3114026946d3",
"PropertyGuid": "0b96cf1c-bf13-460b-8099-4449cd889e24",
"RowNumber": 1,
"RowSpan": 1,
"Settings": []
},
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "d8332e78-ebfe-4072-802f-e8f6bc206012",
"Name": "FMeasure",
"ColumnNumber": 0,
"ColumnSpan": 1,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.StringEditorToStringBinder",
"ParentGuid": "9f6c5a2f-a35f-49ce-ba0d-3114026946d3",
"PropertyGuid": "e9efaedc-f070-40e1-8bcd-2bb74fae6697",
"RowNumber": 3,
"RowSpan": 1,
"Settings": []
},
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "82623d7c-8b6f-4173-a608-8f2913e2bc77",
"Name": "NewModelId",
"ColumnNumber": 1,
"ColumnSpan": 1,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.NumericEditorToIntAndDoubleBinder",
"ParentGuid": "9f6c5a2f-a35f-49ce-ba0d-3114026946d3",
"PropertyGuid": "6f4742b7-69ed-43a5-b48f-a971d20b0c01",
"RowNumber": 1,
"RowSpan": 1,
"Settings": []
}
]
}
],
"HideFromCreationArea": true,
"HideFromNavigationEditorCreationArea": true,
"IconResourcesKeys": [],
"IntegrationServiceName": "CommonsClassifierTrainingSession",
"IsAutoCreated": true,
"IsVisible": false,
"OperationsClass": "",
"Overridden": [
"CanBeSearch",
"IsVisible",
"HideFromCreationArea",
"HideFromNavigationEditorCreationArea",
"IsAutoCreated",
"NeedWriteHistory",
"CanBeUsedInIntegration"
],
"Properties": [
{
"$type": "Sungero.Metadata.StringPropertyMetadata, Sungero.Metadata",
"NameGuid": "d2a994e9-5d4b-40bd-85b9-a8be4fa5ca4a",
"Name": "Name",
"Code": "Name",
"IsDisplayValue": true,
"IsQuickSearchAllowed": true,
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.StringEditorToStringBinder",
"PreviousPropertyGuid": "1dcedc29-5140-4770-ac92-eabc212326a1"
},
{
"$type": "Sungero.Metadata.IntegerPropertyMetadata, Sungero.Metadata",
"NameGuid": "fda7f4df-f824-4d8d-b89a-8bf0aa2be5a5",
"Name": "ClassifierId",
"Code": "ClassifierId",
"IsEnabled": false,
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.NumericEditorToIntAndDoubleBinder",
"PreviousPropertyGuid": "d2a994e9-5d4b-40bd-85b9-a8be4fa5ca4a"
},
{
"$type": "Sungero.Metadata.IntegerPropertyMetadata, Sungero.Metadata",
"NameGuid": "bd5739b2-51db-4185-a38b-30daf40e7a2b",
"Name": "OldModelId",
"Code": "OldModelId",
"IsEnabled": false,
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.NumericEditorToIntAndDoubleBinder",
"PreviousPropertyGuid": "fda7f4df-f824-4d8d-b89a-8bf0aa2be5a5"
},
{
"$type": "Sungero.Metadata.StringPropertyMetadata, Sungero.Metadata",
"NameGuid": "e9efaedc-f070-40e1-8bcd-2bb74fae6697",
"Name": "FMeasure",
"Code": "FMeasure",
"IsEnabled": false,
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.StringEditorToStringBinder",
"PreviousPropertyGuid": "bd5739b2-51db-4185-a38b-30daf40e7a2b"
},
{
"$type": "Sungero.Metadata.IntegerPropertyMetadata, Sungero.Metadata",
"NameGuid": "0b96cf1c-bf13-460b-8099-4449cd889e24",
"Name": "ArioTaskId",
"Code": "ArioTaskId",
"IsEnabled": false,
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.NumericEditorToIntAndDoubleBinder",
"PreviousPropertyGuid": "e9efaedc-f070-40e1-8bcd-2bb74fae6697"
},
{
"$type": "Sungero.Metadata.EnumPropertyMetadata, Sungero.Metadata",
"NameGuid": "1571fcd5-237d-443c-b951-049d22928ccd",
"Name": "TrainingStatus",
"Code": "TrainingStatus",
"DirectValues": [
{
"NameGuid": "661442a4-9baf-4a0b-b064-b030eae59f7c",
"Name": "Preparation",
"Code": "Preparation"
},
{
"NameGuid": "7a17892d-3ae8-495e-984f-70ab5d6b14f6",
"Name": "InProcess",
"Code": "InProcess"
},
{
"NameGuid": "1934d335-acac-46fa-9c96-02aa3ff6b058",
"Name": "Completed",
"Code": "Completed"
},
{
"NameGuid": "5c486a38-f204-4d7e-bb99-b6a1ef7fca4a",
"Name": "Error",
"Code": "Error"
},
{
"NameGuid": "ac07455e-2fcd-4b55-957a-38cc0f27ab4d",
"Name": "Rollback",
"Code": "Downgrade"
}
],
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.DropDownEditorToEnumerationBinder",
"PreviousPropertyGuid": "0b96cf1c-bf13-460b-8099-4449cd889e24"
},
{
"$type": "Sungero.Metadata.IntegerPropertyMetadata, Sungero.Metadata",
"NameGuid": "6f4742b7-69ed-43a5-b48f-a971d20b0c01",
"Name": "NewModelId",
"Code": "NewModelId",
"IsEnabled": false,
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.NumericEditorToIntAndDoubleBinder",
"PreviousPropertyGuid": "1571fcd5-237d-443c-b951-049d22928ccd"
}
],
"PublicStructures": [],
"ResourcesKeys": [],
"RibbonCardMetadata": {
"NameGuid": "9d00c67e-1906-45c4-96dd-14c735009ce0",
"Name": "RibbonCard",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"RibbonKind": "Card"
},
"RibbonCollectionMetadata": {
"NameGuid": "e4bd1a7b-715f-4cfa-a632-608558f867fa",
"Name": "RibbonCollection",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": []
},
"Versions": [
{
"Type": "EntityMetadata",
"Number": 11
}
]
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
using System;
using Sungero.Core;
namespace Sungero.Commons.Constants
{
public static class ClassifierTrainingSession
{
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using Sungero.Commons.ClassifierTrainingSession;
using Sungero.Core;
using Sungero.CoreEntities;
namespace Sungero.Commons
{
partial class ClassifierTrainingSessionSharedHandlers
{
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using Sungero.Commons.ClassifierTrainingSession;
using Sungero.Core;
using Sungero.CoreEntities;
namespace Sungero.Commons.Shared
{
partial class ClassifierTrainingSessionFunctions
{
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using Sungero.Core;
using Sungero.CoreEntities;
namespace Sungero.Commons.Structures.ClassifierTrainingSession
{
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Property_Name" xml:space="preserve">
<value>Name</value>
</data>
<data name="DisplayName" xml:space="preserve">
<value>Classifier Additional Training Session</value>
</data>
<data name="CollectionDisplayName" xml:space="preserve">
<value>Classifier Additional Training Sessions</value>
</data>
<data name="AccusativeDisplayName" xml:space="preserve">
<value>Classifier Additional Training Session</value>
</data>
<data name="Property_ClassifierId" xml:space="preserve">
<value>Classifier ID</value>
</data>
<data name="Property_OldModelId" xml:space="preserve">
<value>Model ID before training</value>
</data>
<data name="Property_FMeasure" xml:space="preserve">
<value>F1-score</value>
</data>
<data name="Property_ArioTaskId" xml:space="preserve">
<value>Ario task ID</value>
</data>
<data name="Property_TrainingStatus" xml:space="preserve">
<value>State</value>
</data>
<data name="Enum_TrainingStatus_Preparation" xml:space="preserve">
<value>Preparing data</value>
</data>
<data name="Enum_TrainingStatus_InProcess" xml:space="preserve">
<value>Training in process</value>
</data>
<data name="Enum_TrainingStatus_Completed" xml:space="preserve">
<value>Training completed</value>
</data>
<data name="ControlGroup_9f6c5a2fa35f49ceba0d3114026946d3" xml:space="preserve">
<value />
</data>
<data name="Enum_TrainingStatus_Error" xml:space="preserve">
<value>An error occurred</value>
</data>
<data name="ControlGroup_709800d353b04ebc8088951c85d696f2" xml:space="preserve">
<value>TODO</value>
</data>
<data name="Enum_TrainingStatus_Rollback" xml:space="preserve">
<value>Training cancelled</value>
</data>
<data name="Property_NewModelId" xml:space="preserve">
<value>Model ID after training</value>
</data>
</root>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Property_Name" xml:space="preserve">
<value>Имя</value>
</data>
<data name="DisplayName" xml:space="preserve">
<value>Сессия дообучения классификатора</value>
</data>
<data name="CollectionDisplayName" xml:space="preserve">
<value>Сессии дообучения классификатора</value>
</data>
<data name="AccusativeDisplayName" xml:space="preserve">
<value>Сессия дообучения классификатора</value>
</data>
<data name="Property_ClassifierId" xml:space="preserve">
<value>ИД классификатора</value>
</data>
<data name="Property_OldModelId" xml:space="preserve">
<value>ИД модели до обучения</value>
</data>
<data name="Property_FMeasure" xml:space="preserve">
<value>F1-мера</value>
</data>
<data name="Property_ArioTaskId" xml:space="preserve">
<value>ИД задачи Ario</value>
</data>
<data name="Property_TrainingStatus" xml:space="preserve">
<value>Статус</value>
</data>
<data name="Enum_TrainingStatus_Preparation" xml:space="preserve">
<value>Подготовка данных</value>
</data>
<data name="Enum_TrainingStatus_InProcess" xml:space="preserve">
<value>Обучение в процессе</value>
</data>
<data name="Enum_TrainingStatus_Completed" xml:space="preserve">
<value>Обучение завершено</value>
</data>
<data name="Enum_TrainingStatus_Error" xml:space="preserve">
<value>Возникла ошибка</value>
</data>
<data name="ControlGroup_709800d353b04ebc8088951c85d696f2" xml:space="preserve">
<value>CSV-файл для обучения</value>
</data>
<data name="Enum_TrainingStatus_Rollback" xml:space="preserve">
<value>Отмена обучения</value>
</data>
<data name="Property_NewModelId" xml:space="preserve">
<value>ИД модели после обучения</value>
</data>
</root>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
......@@ -117,4 +58,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="NoRightsToDocument" xml:space="preserve">
<value>There is no document, or you do not have sufficient access rights to it. Contact your system administrator.</value>
</data>
</root>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
......@@ -117,4 +58,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="NoRightsToDocument" xml:space="preserve">
<value>Отсутствует документ или права доступа на него. Обратитесь к администратору системы.</value>
</data>
</root>
\ No newline at end of file
......
using System;
using System;
using Sungero.Core;
namespace Sungero.Commons.Constants
{
public static class EntityRecognitionInfo
{
// Параметр "Возможность изменять статус обучения".
[Sungero.Core.Public]
public const string CanChangeTrainingStatusParamName = "CanChangeTrainingStatus";
}
}
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
......@@ -130,7 +71,7 @@
<value>Entity Recognition Infos</value>
</data>
<data name="Property_RecognizedClass" xml:space="preserve">
<value>Class</value>
<value>Recognized class</value>
</data>
<data name="Property_ClassProbability" xml:space="preserve">
<value>Probability</value>
......@@ -156,4 +97,64 @@
<data name="ControlGroup_d465f2a33d7d4121968a9028dc84788e" xml:space="preserve">
<value />
</data>
<data name="Property_ClassifierTrainingSession" xml:space="preserve">
<value>Training session</value>
</data>
<data name="Enum_ClassifierTrainingSession_Awaiting" xml:space="preserve">
<value>Awaiting</value>
</data>
<data name="Enum_ClassifierTrainingSession_Started" xml:space="preserve">
<value>Training started</value>
</data>
<data name="Enum_ClassifierTrainingSession_Completed" xml:space="preserve">
<value>Training completed</value>
</data>
<data name="Enum_ClassifierTrainingSession_Error" xml:space="preserve">
<value>An error occurred</value>
</data>
<data name="Property_VerifiedClass" xml:space="preserve">
<value>Verified class</value>
</data>
<data name="Property_ClassifierTrainingStatus" xml:space="preserve">
<value>Training state</value>
</data>
<data name="ControlGroup_55f47cfddd4b4653b5f83ec5e4073f64" xml:space="preserve">
<value>Classifier training</value>
</data>
<data name="ControlGroup_dc3a9d386bf840949feee5d954c35700" xml:space="preserve">
<value>Additional classifiers</value>
</data>
<data name="Enum_ClassifierTrainingStatus_Awaiting" xml:space="preserve">
<value>Awaiting</value>
</data>
<data name="Enum_ClassifierTrainingStatus_InProcess" xml:space="preserve">
<value>Training in process</value>
</data>
<data name="Enum_ClassifierTrainingStatus_Completed" xml:space="preserve">
<value>Training completed</value>
</data>
<data name="Enum_ClassifierTrainingStatus_Error" xml:space="preserve">
<value>An error occurred</value>
</data>
<data name="Property_Created" xml:space="preserve">
<value>Created at</value>
</data>
<data name="Action_ShowDocument" xml:space="preserve">
<value>Document Card</value>
</data>
<data name="Action_ShowDocumentDescription" xml:space="preserve">
<value>Open card of the document processed by Ario</value>
</data>
<data name="Action_ShowDocumentHint" xml:space="preserve">
<value>Open document card</value>
</data>
<data name="Action_ShowDocumentConfirmationMessage" xml:space="preserve">
<value />
</data>
<data name="Action_ShowDocumentConfirmationDescription" xml:space="preserve">
<value />
</data>
<data name="Ribbon_ShowCommands_02ac50d508c145538b2198e9d3c2c262" xml:space="preserve">
<value>Show</value>
</data>
</root>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
......@@ -130,7 +71,7 @@
<value>Результат распознавания сущности</value>
</data>
<data name="Property_RecognizedClass" xml:space="preserve">
<value>Класс</value>
<value>Распознанный класс</value>
</data>
<data name="Property_ClassProbability" xml:space="preserve">
<value>Вероятность</value>
......@@ -153,4 +94,61 @@
<data name="Form_4656b0982f584029b9f29c65b534ae67" xml:space="preserve">
<value>Дополнительно</value>
</data>
<data name="Property_ClassifierTrainingSession" xml:space="preserve">
<value>Сессия обучения</value>
</data>
<data name="Enum_ClassifierTrainingSession_Awaiting" xml:space="preserve">
<value>В ожидании</value>
</data>
<data name="Enum_ClassifierTrainingSession_Started" xml:space="preserve">
<value>Обучение начато</value>
</data>
<data name="Enum_ClassifierTrainingSession_Completed" xml:space="preserve">
<value>Обучение завершено</value>
</data>
<data name="Enum_ClassifierTrainingSession_Error" xml:space="preserve">
<value>Возникла ошибка</value>
</data>
<data name="Property_VerifiedClass" xml:space="preserve">
<value>Подтвержденный класс</value>
</data>
<data name="Property_ClassifierTrainingStatus" xml:space="preserve">
<value>Статус обучения</value>
</data>
<data name="ControlGroup_55f47cfddd4b4653b5f83ec5e4073f64" xml:space="preserve">
<value>Обучение классификатора</value>
</data>
<data name="ControlGroup_d465f2a33d7d4121968a9028dc84788e" xml:space="preserve">
<value>Дополнительные классификаторы</value>
</data>
<data name="ControlGroup_dc3a9d386bf840949feee5d954c35700" xml:space="preserve">
<value>Дополнительные классификаторы</value>
</data>
<data name="Enum_ClassifierTrainingStatus_Error" xml:space="preserve">
<value>Возникла ошибка</value>
</data>
<data name="Enum_ClassifierTrainingStatus_Completed" xml:space="preserve">
<value>Обучение завершено</value>
</data>
<data name="Enum_ClassifierTrainingStatus_InProcess" xml:space="preserve">
<value>Обучение в процессе</value>
</data>
<data name="Enum_ClassifierTrainingStatus_Awaiting" xml:space="preserve">
<value>Ожидание обучения</value>
</data>
<data name="Property_Created" xml:space="preserve">
<value>Создан</value>
</data>
<data name="Action_ShowDocument" xml:space="preserve">
<value>Карточка документа</value>
</data>
<data name="Action_ShowDocumentHint" xml:space="preserve">
<value>Открыть карточку документа</value>
</data>
<data name="Action_ShowDocumentDescription" xml:space="preserve">
<value>Открытие карточки обработанного в Ario документа</value>
</data>
<data name="Ribbon_ShowCommands_02ac50d508c145538b2198e9d3c2c262" xml:space="preserve">
<value>Показать</value>
</data>
</root>
\ No newline at end of file
......
......@@ -46,5 +46,6 @@ namespace Sungero.Commons.Shared
return ((Domain.Shared.IExtendedEntity)entity).Params.ContainsKey(paramName);
}
}
}
\ No newline at end of file
......
......@@ -74,6 +74,90 @@ namespace Sungero.Commons.Structures.Module
// Угол поворота.
public double Angle { get; set; }
}
/// <summary>
/// Поиск по значению поля в индексе Elasticsearch.
/// </summary>
[Public]
partial class ArioFieldElasticsearchData
{
// Поле Ario.
public Sungero.Commons.Structures.Module.IArioFactField ArioField { get; set; }
// Имя искомой сущности.
public string EntityName { get; set; }
// Имя поля в индексе.
public string ElasticFieldName { get; set; }
// Тип поиска.
public string SearchType { get; set; }
// Искомое значение. Если не указано, используется значение из поля Ario.
public string SearchValue { get; set; }
// Признак необходимости поиска закрытых записей.
public bool IsClosedEntitySearch { get; set; }
// Признак, что поиск по полю производится только для уточнения результатов ранее найденных сущностей.
public bool IsRefineSearchOnly { get; set; }
// Условие для выборки ранее найденных сущностей (json-строка API Elasticsearch).
public string RefineSearchFilter { get; set; }
// Значение оценки для ограничения результатов поиска (возвращаются записи с оценкой не ниже лимита).
public double ScoreMinLimit { get; set; }
// Процент для расчета лимита от максимально возможной оценки.
public double ScoreLimitPercent { get; set; }
// Максимальное число достоверных записей для возврата.
public int ScoredResultsLimit { get; set; }
// Список ИД найденных сущностей.
public List<int> EntityIds { get; set; }
// ИД найденной сущности. Заполняется, если найдена единственная запись.
// С версии 4.6 вместо этого свойства используется EntityIds.
public int EntityId { get; set; }
// Общее число найденных записей по условию.
public int EntityCount { get; set; }
}
/// <summary>
/// Поиск по указанным полям факта в индексе Elasticsearch.
/// </summary>
[Public]
partial class ArioFactElasticsearchData
{
// Факт Ario.
public Sungero.Commons.Structures.Module.IArioFact Fact { get; set; }
// Имя искомой сущности.
public string EntityName { get; set; }
// Описания поиска для каждого поля.
public List<Sungero.Commons.Structures.Module.IArioFieldElasticsearchData> Queries { get; set; }
// Максимальное число достоверных записей для возврата.
public int ScoredResultsLimit { get; set; }
// Список ИД найденных сущностей.
public List<int> EntityIds { get; set; }
// ИД найденной сущности. Заполняется, если найдена единственная запись.
// С версии 4.6 вместо этого свойства используется EntityIds.
public int EntityId { get; set; }
// Cредневзвешенная вероятность по найденным полям.
public double AggregateFieldsProbability { get; set; }
// Список полей Ario, по которым найдена/уточнена сущность.
// С версии 4.6 не используется.
public List<Sungero.Commons.Structures.Module.IArioFactField> FoundedFields { get; set; }
}
#endregion
}
\ No newline at end of file
......
......@@ -76,9 +76,6 @@
<data name="CoverAction_ShowVATRates" xml:space="preserve">
<value>VAT Rates</value>
</data>
<data name="CoverAction_Action1" xml:space="preserve">
<value>Action1</value>
</data>
<data name="CoverAction_Action2" xml:space="preserve">
<value>Action2</value>
</data>
......@@ -178,4 +175,10 @@
<data name="CoverTab_Tab" xml:space="preserve">
<value>Tab</value>
</data>
<data name="AsyncHandler_Description_1e83eeb6e56d478698e6dd3b7290f3d5" xml:space="preserve">
<value>Add databook records to the Elasticsearch index</value>
</data>
<data name="AsyncHandler_Description_cb668a390ffc4e039217d07d59997c66" xml:space="preserve">
<value>Delete databook records from the Elasticsearch index</value>
</data>
</root>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
......@@ -129,6 +70,9 @@
<data name="CoverGroup_Info" xml:space="preserve">
<value>Дополнительная информация</value>
</data>
<data name="CoverAction_ShowVATRates" xml:space="preserve">
<value>Ставки НДС</value>
</data>
<data name="CoverAction_AddLocation" xml:space="preserve">
<value>Добавить населенный пункт</value>
</data>
......@@ -210,7 +154,10 @@
<data name="CoverDescription_ShowVATRates" xml:space="preserve">
<value>Ставки налога на добавленную стоимость.</value>
</data>
<data name="CoverAction_ShowVATRates" xml:space="preserve">
<value>Ставки НДС</value>
<data name="AsyncHandler_Description_1e83eeb6e56d478698e6dd3b7290f3d5" xml:space="preserve">
<value>Индексирование сущности в поисковой системе</value>
</data>
<data name="AsyncHandler_Description_cb668a390ffc4e039217d07d59997c66" xml:space="preserve">
<value>Удаление сущности из индекса поисковой системы</value>
</data>
</root>
\ No newline at end of file
......
......@@ -18,6 +18,7 @@ namespace Sungero.Company
public override void Refresh(Sungero.Presentation.FormRefreshEventArgs e)
{
_obj.State.Properties.IsAssistant.IsEnabled = _obj.PreparesResolution != true;
_obj.State.Properties.SendActionItems.IsEnabled = _obj.IsAssistant != true;
}
}
......
......@@ -47,6 +47,19 @@ namespace Sungero.Company
partial class BusinessUnitServerHandlers
{
public override void AfterSave(Sungero.Domain.AfterSaveEventArgs e)
{
// Запуск индексации, если Elasticsearch сконфигурирован и изменились индексируемые поля.
if (Commons.PublicFunctions.Module.IsElasticsearchConfigured() &&
e.Params.Contains(Sungero.Commons.PublicConstants.Module.IsIndexedEntityInsertedParamKey))
{
var allowCreateRecord = false;
e.Params.TryGetValue(Sungero.Commons.PublicConstants.Module.IsIndexedEntityInsertedParamKey, out allowCreateRecord);
e.Params.Remove(Sungero.Commons.PublicConstants.Module.IsIndexedEntityInsertedParamKey);
Sungero.Commons.PublicFunctions.Module.CreateIndexEntityAsyncHandler(BusinessUnits.Info.Name, _obj.Id, Functions.BusinessUnit.GetIndexingJson(_obj), allowCreateRecord);
}
}
public override void Created(Sungero.Domain.CreatedEventArgs e)
{
_obj.Nonresident = false;
......@@ -150,6 +163,10 @@ namespace Sungero.Company
_obj.Company.IsCardReadOnly = false;
Parties.CompanyBases.Delete(_obj.Company);
}
// Удаление из индекса Elasticsearch, если он сконфигурирован.
if (Commons.PublicFunctions.Module.IsElasticsearchConfigured())
Commons.PublicFunctions.Module.CreateRemoveEntityFromIndexAsyncHandler(BusinessUnits.Info.Name, _obj.Id);
}
public override void BeforeSave(Sungero.Domain.BeforeSaveEventArgs e)
......@@ -227,6 +244,11 @@ namespace Sungero.Company
}
#endregion
// Выставить параметр необходимости индексации сущности, при изменении индексируемых полей.
var props = _obj.State.Properties;
if (props.Name.IsChanged || props.LegalName.IsChanged || props.TIN.IsChanged || props.TRRC.IsChanged || props.PSRN.IsChanged || props.Status.IsChanged)
e.Params.AddOrUpdate(Sungero.Commons.PublicConstants.Module.IsIndexedEntityInsertedParamKey, _obj.State.IsInserted);
}
}
}
\ No newline at end of file
......
......@@ -93,6 +93,25 @@ namespace Sungero.Company
partial class EmployeeServerHandlers
{
public override void AfterDelete(Sungero.Domain.AfterDeleteEventArgs e)
{
// Удаление из индекса Elasticsearch, если он сконфигурирован.
if (Commons.PublicFunctions.Module.IsElasticsearchConfigured())
Commons.PublicFunctions.Module.CreateRemoveEntityFromIndexAsyncHandler(Employees.Info.Name, _obj.Id);
}
public override void AfterSave(Sungero.Domain.AfterSaveEventArgs e)
{
// Запуск индексации, если Elasticsearch сконфигурирован и изменились индексируемые поля .
if (Commons.PublicFunctions.Module.IsElasticsearchConfigured() && e.Params.Contains(Sungero.Commons.PublicConstants.Module.IsIndexedEntityInsertedParamKey))
{
var allowCreateRecord = false;
e.Params.TryGetValue(Sungero.Commons.PublicConstants.Module.IsIndexedEntityInsertedParamKey, out allowCreateRecord);
e.Params.Remove(Sungero.Commons.PublicConstants.Module.IsIndexedEntityInsertedParamKey);
Sungero.Commons.PublicFunctions.Module.CreateIndexEntityAsyncHandler(Employees.Info.Name, _obj.Id, Functions.Employee.GetIndexingJson(_obj), allowCreateRecord);
}
}
public override IDigestModel GetDigest(Sungero.Domain.GetDigestEventArgs e)
{
return Sungero.Company.Functions.Module.GetEmployeePopup(_obj);
......@@ -122,9 +141,10 @@ namespace Sungero.Company
public override void Created(Sungero.Domain.CreatedEventArgs e)
{
_obj.NeedNotifyNewAssignments = true;
_obj.NeedNotifyExpiredAssignments = true;
_obj.NeedNotifyAssignmentsSummary = true;
var disableMailNotificationParam = Functions.Employee.GetDisableMailNotificationParam(_obj);
_obj.NeedNotifyNewAssignments = !disableMailNotificationParam;
_obj.NeedNotifyExpiredAssignments = !disableMailNotificationParam;
_obj.NeedNotifyAssignmentsSummary = !disableMailNotificationParam;
}
public override void BeforeDelete(Sungero.Domain.BeforeDeleteEventArgs e)
......@@ -163,6 +183,11 @@ namespace Sungero.Company
e.AddError(Employees.Resources.DeparmentLockedByUserFormat(oldDepartment.Name, oldDepartmentLockInfo.OwnerName));
}
}
// Выставить параметр необходимости индексации сущности, при изменении индексируемых полей.
var props = _obj.State.Properties;
if (props.Name.IsChanged || props.Person.IsChanged || props.Department.IsChanged || props.Status.IsChanged)
e.Params.AddOrUpdate(Sungero.Commons.PublicConstants.Module.IsIndexedEntityInsertedParamKey, _obj.State.IsInserted);
}
}
}
\ No newline at end of file
......
......@@ -6,6 +6,7 @@ using Sungero.Company.Employee;
using Sungero.Core;
using Sungero.CoreEntities;
using Sungero.Domain.Shared;
using ElasticsearchTypes = Sungero.Commons.PublicConstants.Module.ElasticsearchType;
namespace Sungero.Company.Server
{
......@@ -360,5 +361,121 @@ namespace Sungero.Company.Server
{
return Employees.GetAll();
}
/// <summary>
/// Получить признак настройки рассылки по умолчанию.
/// </summary>
/// <returns>True - если рассылка выключена, иначе рассылка включена.</returns>
public virtual bool GetDisableMailNotificationParam()
{
var key = Docflow.PublicConstants.Module.DisableMailNotification;
var command = string.Format(Queries.Module.SelectDisableMailNotificationParam, key);
var commandResult = Docflow.PublicFunctions.Module.ExecuteScalarSQLCommand(command);
var disableMailNotificationValue = string.Empty;
if (!(commandResult is DBNull) && commandResult != null)
disableMailNotificationValue = commandResult.ToString();
bool result = false;
bool.TryParse(disableMailNotificationValue, out result);
return result;
}
/// <summary>
/// Получить сотрудников по имени с использованием нечеткого поиска.
/// </summary>
/// <param name="name">Имя.</param>
/// <param name="businesUnitId">ИД НОР.</param>
/// <returns>Список сотрудников.</returns>
[Public]
public static List<Company.IEmployee> GetEmployeesByNameFuzzy(string name, int businesUnitId)
{
var businesUnitIds = new List<int>();
if (businesUnitId > 0)
businesUnitIds.Add(businesUnitId);
return GetEmployeesByNameFuzzy(name, businesUnitIds);
}
/// <summary>
/// Получить сотрудников по имени по списку наших организаций с использованием нечеткого поиска.
/// </summary>
/// <param name="name">Имя.</param>
/// <param name="businesUnitIds">Список ИД.</param>
/// <returns>Список сотрудников.</returns>
[Public]
public static List<Company.IEmployee> GetEmployeesByNameFuzzy(string name, List<int> businesUnitIds)
{
var employees = new List<IEmployee>();
name = Sungero.Commons.PublicFunctions.Module.TrimSpecialSymbols(name);
if (string.IsNullOrWhiteSpace(name))
return employees;
// Искать только активные записи сотрудников внутри указанной НОР.
var filter = Commons.PublicFunctions.Module.GetTermQuery("Status", CoreEntities.DatabookEntry.Status.Active.Value);
if (businesUnitIds.Count == 1)
filter = string.Format("{0},{1}", filter, Commons.PublicFunctions.Module.GetTermQuery("BusinessUnitId", businesUnitIds.Single().ToString()));
if (businesUnitIds.Count > 1)
filter = string.Format("{0},{1}", filter,
Commons.PublicFunctions.Module.GetTermsQuery("BusinessUnitId", businesUnitIds.Select(x => x.ToString()).ToList()));
var employeesIds = new List<int>();
var matchInitials = Regex.Match(name, Sungero.Parties.PublicConstants.Module.InitialsRegex, RegexOptions.IgnoreCase);
if (!matchInitials.Success)
{
// Если инициалы не найдены, искать по полному ФИО.
var splittedName = name.Split(' ');
if (splittedName.Length > 1)
{
// Поиск ФИО по вхождению строк.
var must = Commons.PublicFunctions.Module.GetMatchQuery("FullName", name, true);
var query = Commons.PublicFunctions.Module.GetBoolQuery(must, string.Empty, filter);
employeesIds = Commons.PublicFunctions.Module.ExecuteElasticsearchQuery(Employees.Info.Name, query);
// Нечеткий поиск по ФИО.
if (employeesIds.Count == 0)
{
must = Commons.PublicFunctions.Module.GetMatchFuzzyQuery("FullName", name, true);
query = Commons.PublicFunctions.Module.GetBoolQuery(must, string.Empty, filter);
employeesIds = Commons.PublicFunctions.Module.ExecuteElasticsearchQuery(Employees.Info.Name, query, Constants.Employee.ElasticsearchMinScore);
}
}
}
else
{
// Вырезать инициалы из исходной строки (оставить только фамилию).
var lastName = Regex.Replace(name, Sungero.Parties.PublicConstants.Module.InitialsRegex, string.Empty);
if (string.IsNullOrWhiteSpace(lastName))
return employees;
// Сформировать обязательную часть запроса по совпадению инициалов.
var initialFirstName = matchInitials.Groups[1].Value;
var initialPatronymic = matchInitials.Groups[2].Value;
var initialsMust = Commons.PublicFunctions.Module.GetTermQuery("InitialFirstName", initialFirstName);
if (!string.IsNullOrWhiteSpace(initialPatronymic))
initialsMust = string.Format("{0},{1}", initialsMust,
Commons.PublicFunctions.Module.GetTermQuery("InitialPatronymic", initialPatronymic));
// Добавить к запросу условие по поиску фамилии.
var must = string.Format("{0},{1}", initialsMust, Commons.PublicFunctions.Module.GetMatchQuery("LastName", lastName, true));
var query = Commons.PublicFunctions.Module.GetBoolQuery(must, string.Empty, filter);
employeesIds = Commons.PublicFunctions.Module.ExecuteElasticsearchQuery(Employees.Info.Name, query);
if (employeesIds.Count == 0)
{
must = string.Format("{0},{1}", initialsMust, Commons.PublicFunctions.Module.GetMatchFuzzyQuery("LastName", lastName, true));
query = Commons.PublicFunctions.Module.GetBoolQuery(must, string.Empty, filter);
employeesIds = Commons.PublicFunctions.Module.ExecuteElasticsearchQuery(Employees.Info.Name, query, Constants.Employee.ElasticsearchMinScore);
}
}
if (employeesIds.Any())
employees = Employees.GetAll(l => employeesIds.Contains(l.Id)).ToList();
return employees;
}
}
}
\ No newline at end of file
......
......@@ -22,6 +22,7 @@ namespace Sungero.Company
_obj.PreparesResolution = false;
_obj.PreparesAssignmentCompletion = false;
_obj.IsAssistant = true;
_obj.SendActionItems = true;
}
}
......
......@@ -29,7 +29,7 @@ namespace Sungero.Company.Server
if (Functions.ManagersAssistant.HasDuplicatesAssistants(_obj))
e.AddError(ManagersAssistants.Resources.ExecutiveSecretaryIsAppointed);
if (_obj.IsAssistant != true && _obj.PreparesResolution != true && _obj.PreparesAssignmentCompletion != true)
if (_obj.IsAssistant != true && _obj.PreparesResolution != true && _obj.PreparesAssignmentCompletion != true && _obj.SendActionItems != true)
e.AddError(ManagersAssistants.Resources.NoAuthoritiesError);
}
......
......@@ -87,7 +87,6 @@ namespace Sungero.Company.Server
indexName = "idx_Recipient_Discriminator_HeadOffice_Id";
indexQuery = string.Format(Queries.Module.CreateIndexDiscriminatorHeadOfficeId, tableName, indexName);
Sungero.Docflow.PublicFunctions.Module.CreateIndexOnTable(tableName, indexName, indexQuery);
}
}
}
......
......@@ -814,4 +814,8 @@ INCLUDE (Id)]]></mssql>
Id
)]]></postgres>
</query>
<query key="SelectDisableMailNotificationParam">
<mssql><![CDATA[SELECT Value FROM Sungero_Docflow_Params WHERE ([Key] = '{0}')]]></mssql>
<postgres><![CDATA[SELECT Value FROM Sungero_Docflow_Params WHERE (Key = '{0}')]]></postgres>
</query>
</queries>
\ No newline at end of file
......
......@@ -87,6 +87,8 @@ namespace Sungero.Company.Server
return new List<IUser>();
return Substitutions.GetAll()
.Where(x => Equals(x.Substitute, substitute))
.Where(x => !x.StartDate.HasValue || x.StartDate <= Calendar.Today)
.Where(x => !x.EndDate.HasValue || x.EndDate >= Calendar.Today)
.Select(x => x.User)
.ToList();
}
......@@ -256,7 +258,7 @@ namespace Sungero.Company.Server
[Public, Remote(IsPure = true)]
public static List<IEmployee> GetEmployeesFromRecipientsRemote(List<IRecipient> recipients)
{
return GetEmployeesFromRecipients(recipients);
return GetEmployeesFromRecipients(recipients).Distinct().ToList();
}
/// <summary>
......@@ -546,6 +548,9 @@ namespace Sungero.Company.Server
if (managersAssistant.PreparesResolution == true)
responsibilities.Add(ManagersAssistants.Info.Properties.PreparesResolution.LocalizedName);
if (managersAssistant.SendActionItems == true)
responsibilities.Add(ManagersAssistants.Info.Properties.SendActionItems.LocalizedName);
if (managersAssistant.PreparesAssignmentCompletion == true)
responsibilities.Add(ManagersAssistants.Info.Properties.PreparesAssignmentCompletion.LocalizedName);
......@@ -824,5 +829,120 @@ namespace Sungero.Company.Server
return string.Join("|", passwordHashString, saltString);
}
#region Работа с ElasticSearch
/// <summary>
/// Переиндексация сущностей модуля.
/// </summary>
[Public(WebApiRequestType = RequestType.Post)]
public virtual void Reindex()
{
var elasticUrl = Commons.PublicFunctions.Module.GetElasticsearchUrl();
if (Commons.PublicFunctions.Module.IsElasticsearchEnabled())
{
this.ReindexBusinessUnits();
this.ReindexEmployees();
}
}
/// <summary>
/// Переиндексация НОР.
/// </summary>
public virtual void ReindexBusinessUnits()
{
Logger.Debug("Company. ReindexBusinessUnits. Start.");
Logger.Debug("Company. ReindexBusinessUnits. Recreate index...");
var indexName = Commons.PublicFunctions.Module.GetIndexName(BusinessUnits.Info.Name);
var synonyms = Commons.PublicFunctions.Module.GetLegalFormSynonyms();
Commons.PublicFunctions.Module.ElasticsearchCreateIndex(indexName, string.Format(Constants.BusinessUnit.ElasticsearchIndexConfig, synonyms));
var lastId = 0;
while (true)
{
var businessUnits = BusinessUnits.GetAll(l => l.Id > lastId)
.OrderBy(l => l.Id)
.Take(Commons.PublicConstants.Module.MaxQueryIds)
.ToList();
if (!businessUnits.Any())
break;
lastId = businessUnits.Last().Id;
Logger.DebugFormat("Company. ReindexBusinessUnits. Indexing businessunits. Entity id from {0} to {1}...", businessUnits.First().Id, lastId);
var jsonStrings = businessUnits
.Select(x => string.Format("{0}{1}{2}", Commons.PublicConstants.Module.BulkOperationIndexToTarget,
Environment.NewLine,
Company.Functions.BusinessUnit.GetIndexingJson(x)));
var bulkJson = string.Format("{0}{1}", string.Join(Environment.NewLine, jsonStrings), Environment.NewLine);
Commons.PublicFunctions.Module.ElasticsearchBulk(indexName, bulkJson);
}
Logger.Debug("Company. ReindexBusinessUnits. Finish.");
}
/// <summary>
/// Переиндексация сотрудников.
/// </summary>
public virtual void ReindexEmployees()
{
Logger.Debug("Company. ReindexEmployees. Start.");
Logger.Debug("Company. ReindexEmployees. Recreate index...");
var indexName = Commons.PublicFunctions.Module.GetIndexName(Employees.Info.Name);
Commons.PublicFunctions.Module.ElasticsearchCreateIndex(indexName, Constants.Employee.ElasticsearchIndexConfig);
var lastId = 0;
while (true)
{
var employees = Employees.GetAll(l => l.Id > lastId)
.OrderBy(l => l.Id)
.Take(Commons.PublicConstants.Module.MaxQueryIds)
.ToList();
if (!employees.Any())
break;
lastId = employees.Last().Id;
Logger.DebugFormat("Company. ReindexEmployees. Indexing employees. Entity id from {0} to {1}...", employees.First().Id, lastId);
var jsonStrings = employees
.Select(x => string.Format("{0}{1}{2}", Commons.PublicConstants.Module.BulkOperationIndexToTarget,
Environment.NewLine,
Company.Functions.Employee.GetIndexingJson(x)));
var bulkJson = string.Format("{0}{1}", string.Join(Environment.NewLine, jsonStrings), Environment.NewLine);
Commons.PublicFunctions.Module.ElasticsearchBulk(indexName, bulkJson);
}
Logger.Debug("Company. ReindexEmployees. Finish.");
}
/// <summary>
/// Обновить синонимы в индексе НОР.
/// </summary>
/// <param name="synonyms">Список синонимов.</param>
[Public(WebApiRequestType = RequestType.Post)]
public virtual void UpdateBusinessUnitsIndexSynonyms(string synonyms)
{
if (Commons.PublicFunctions.Module.IsElasticsearchEnabled())
{
Logger.Debug("Company. UpdateBusinessUnitsIndexSynonyms start.");
var businessUnitIndexName = Commons.PublicFunctions.Module.GetIndexName(BusinessUnits.Info.Name);
synonyms = Commons.PublicFunctions.Module.SynonymsParse(synonyms);
var businessUnitIndexConfig = string.Format(Constants.BusinessUnit.ElasticsearchIndexConfig, synonyms);
Commons.PublicFunctions.Module.ElasticsearchCloseIndex(businessUnitIndexName);
Commons.PublicFunctions.Module.ElasticsearchUpdateIndexSettings(businessUnitIndexName, businessUnitIndexConfig);
Commons.PublicFunctions.Module.ElasticsearchOpenIndex(businessUnitIndexName);
Logger.Debug("Company. UpdateBusinessUnitsIndexSynonyms finish.");
}
}
#endregion
}
}
\ No newline at end of file
......
{
"NameGuid": "d534e107-a54d-48ec-85ff-bc44d731a82f"
}
\ No newline at end of file
......@@ -462,7 +462,8 @@
"SavingServer",
"ShowingClient",
"UiFilteringServer",
"CreatedServer"
"CreatedServer",
"AfterSaveServer"
],
"HideFromNavigationEditorCreationArea": true,
"IconName": "BusinessUnit.ico",
......@@ -789,6 +790,16 @@
"Versions": []
}
],
"PublicConstants": [
{
"Name": "ElasticsearchMinScore",
"ParentClasses": [
"BusinessUnit"
],
"TypeName": "System.Double",
"Value": "5"
}
],
"PublicFunctions": [
{
"Name": "GetAllDepartmentIds",
......
namespace Sungero.Company.Constants
namespace Sungero.Company.Constants
{
public static class BusinessUnit
{
/// <summary>
/// Настройки полей индекса с данными о НОР.
/// </summary>
public const string ElasticsearchIndexConfig = @"{{
""settings"":{{
""index"":{{
""similarity"":{{
""default"":{{
""type"":""BM25"",
""b"":0,
""k1"":0
}}
}},
""analysis"":{{
""filter"": {{
""my_synonyms"": {{
""type"": ""synonym_graph"",
""synonyms"": [{0}],
""expand"": true,
""updateable"": true
}}
}},
""char_filter"":{{
""e_char_filter"":{{
""type"":""mapping"",
""mappings"":[
""Ё => Е"",
""ё => е""
]
}}
}},
""analyzer"":{{
""text_index_analyzer"":{{
""tokenizer"":""standard"",
""filter"":[
""lowercase""
],
""char_filter"":[
""e_char_filter""
]
}},
""text_query_analyzer"":{{
""tokenizer"":""standard"",
""filter"":[
""lowercase"",
""my_synonyms""
],
""char_filter"":[
""e_char_filter""
]
}}
}}
}}
}}
}},
""mappings"":{{
""properties"":{{
""Id"":{{
""type"":""keyword""
}},
""Name"":{{
""type"":""text"",
""analyzer"":""text_index_analyzer"",
""search_analyzer"":""text_query_analyzer""
}},
""ShortName"":{{
""type"":""text"",
""analyzer"":""text_index_analyzer"",
""search_analyzer"":""text_query_analyzer""
}},
""TIN"":{{
""type"":""keyword""
}},
""TRRC"":{{
""type"":""keyword""
}},
""PSRN"":{{
""type"":""keyword""
}},
""Updated"":{{
""type"":""date"",
""format"":""dd.MM.yyyy HH:mm:ss""
}},
""Status"":{{
""type"":""keyword""
}}
}}
}}
}}";
/// <summary>
/// Шаблон для создания индекса с данными о НОР.
/// </summary>
public const string ElasticsearchIndexTemplate = "{{ \"Id\": \"{0}\", \"Name\": \"{1}\", \"ShortName\": \"{2}\", \"TIN\": \"{3}\", " +
"\"TRRC\": \"{4}\", \"PSRN\": \"{5}\", \"Updated\": \"{6}\", \"Status\": \"{7}\" }}";
/// <summary>
/// Минимальная оценка при нечетком поиске НОР.
/// </summary>
[Sungero.Core.Public]
public const double ElasticsearchMinScore = 5;
}
}
\ No newline at end of file
......
......@@ -107,5 +107,22 @@ namespace Sungero.Company.Shared
var coefficient12 = new int[] { 3, 7, 2, 4, 10, 3, 5, 9, 4, 6, 8 };
return tin.Length == 10 ? CheckTinSum(tin, coefficient10) : (CheckTinSum(tin, coefficient11) && CheckTinSum(tin, coefficient12));
}
/// <summary>
/// Получить JSON-строку для индексирования в поисковой системе.
/// </summary>
/// <returns>JSON-строка.</returns>
public virtual string GetIndexingJson()
{
return string.Format(Constants.BusinessUnit.ElasticsearchIndexTemplate,
_obj.Id,
Sungero.Commons.PublicFunctions.Module.TrimSpecialSymbols(_obj.LegalName),
Sungero.Commons.PublicFunctions.Module.TrimSpecialSymbols(_obj.Name),
_obj.TIN,
_obj.TRRC,
_obj.PSRN,
Sungero.Core.Calendar.Now.ToString("dd.MM.yyyy HH:mm:ss"),
_obj.Status.Value.Value);
}
}
}
\ No newline at end of file
......
......@@ -491,7 +491,9 @@
"SavedServer",
"FilteringServer",
"UiFilteringServer",
"GetDigestServer"
"GetDigestServer",
"AfterSaveServer",
"AfterDeleteServer"
],
"HideFromNavigationEditorCreationArea": true,
"IconName": "Employee.ico",
......@@ -784,6 +786,40 @@
"ReturnTypeFullName": "System.Collections.Generic.List"
},
{
"Name": "GetEmployeesByNameFuzzy",
"Parameters": [
{
"Name": "name",
"ParameterType": "global::System.String",
"ParameterTypeFullName": "System.String"
},
{
"Name": "businesUnitId",
"ParameterType": "global::System.Int32",
"ParameterTypeFullName": "System.Int32"
}
],
"ReturnType": "global::System.Collections.Generic.List<global::Sungero.Company.IEmployee>",
"ReturnTypeFullName": "System.Collections.Generic.List"
},
{
"Name": "GetEmployeesByNameFuzzy",
"Parameters": [
{
"Name": "name",
"ParameterType": "global::System.String",
"ParameterTypeFullName": "System.String"
},
{
"Name": "businesUnitIds",
"ParameterType": "global::System.Collections.Generic.List<global::System.Int32>",
"ParameterTypeFullName": "System.Collections.Generic.List"
}
],
"ReturnType": "global::System.Collections.Generic.List<global::Sungero.Company.IEmployee>",
"ReturnTypeFullName": "System.Collections.Generic.List"
},
{
"Name": "GetEmployeesByTIN",
"IsRemote": true,
"Parameters": [
......@@ -963,6 +999,19 @@
"ReturnTypeFullName": "System.String"
},
{
"Name": "IsManager",
"Parameters": [
{
"Name": "employee",
"ParameterType": "global::Sungero.Company.IEmployee",
"ParameterTypeFullName": "Sungero.Company.IEmployee, Sungero.Domain.Interfaces"
}
],
"Placement": "Shared",
"ReturnType": "global::System.Boolean",
"ReturnTypeFullName": "System.Boolean"
},
{
"Name": "SetRequiredProperties",
"Parameters": [
{
......
namespace Sungero.Company.Constants
namespace Sungero.Company.Constants
{
public static class Employee
{
/// <summary>
/// Настройки полей индекса с данными о сотрудниках.
/// </summary>
public const string ElasticsearchIndexConfig = @"{
""settings"": {
""index"": {
""analysis"": {
""char_filter"": {
""e_char_filter"": {
""type"": ""mapping"",
""mappings"": [ ""Ё => Е"", ""ё => е"" ]
}
},
""analyzer"": {
""name_analyzer"": {
""type"": ""custom"",
""tokenizer"": ""standard"",
""filter"": [
""lowercase"",
""russian_morphology""
],
""char_filter"": [""e_char_filter""]
}
}
}
}
},
""mappings"": {
""properties"": {
""Id"": {""type"": ""keyword""},
""FullName"": {""type"": ""text"", ""analyzer"": ""name_analyzer""},
""FirstName"": {""type"": ""text"", ""analyzer"": ""name_analyzer""},
""LastName"": {""type"": ""text"", ""analyzer"": ""name_analyzer""},
""Patronymic"": {""type"": ""text"", ""analyzer"": ""name_analyzer""},
""InitialFirstName"": {""type"": ""keyword""},
""InitialPatronymic"": {""type"": ""keyword""},
""BusinessUnitId"": {""type"": ""keyword""},
""Updated"": {""type"": ""date"", ""format"": ""dd.MM.yyyy HH:mm:ss""},
""Status"": {""type"": ""keyword""}
}
}
}";
/// <summary>
/// Шаблон для создания индекса с данными о сотрудниках.
/// </summary>
public const string ElasticsearchIndexTemplate = "{{ \"Id\": \"{0}\", \"FullName\": \"{1}\", \"LastName\": \"{2}\", " +
"\"FirstName\": \"{3}\", \"Patronymic\": \"{4}\", \"InitialFirstName\": \"{5}\", \"InitialPatronymic\": \"{6}\", " +
"\"BusinessUnitId\": \"{7}\", \"Updated\": \"{8}\", \"Status\": \"{9}\" }}";
/// <summary>
/// Минимальная оценка при нечетком поиске сотрудников.
/// </summary>
public const double ElasticsearchMinScore = 2;
}
}
\ No newline at end of file
......
......@@ -211,5 +211,38 @@ namespace Sungero.Company.Shared
.Where(m => Equals(_obj, m.Assistant))
.ToList();
}
/// <summary>
/// Проверить, что сотрудник является руководителем.
/// </summary>
/// <returns>True - сотрудник является руководителем, иначе - False.</returns>
[Public]
public virtual bool IsManager()
{
return Company.BusinessUnits.GetAll(x => Equals(x.CEO, _obj)).Any() ||
Company.Departments.GetAll(x => Equals(x.Manager, _obj)).Any();
}
/// <summary>
/// Получить JSON-строку для индексирования в поисковой системе.
/// </summary>
/// <returns>JSON-строка.</returns>
public virtual string GetIndexingJson()
{
var lastName = Sungero.Commons.PublicFunctions.Module.TrimSpecialSymbols(_obj.Person.LastName);
var firstName = Sungero.Commons.PublicFunctions.Module.TrimSpecialSymbols(_obj.Person.FirstName);
var middleName = Sungero.Commons.PublicFunctions.Module.TrimSpecialSymbols(_obj.Person.MiddleName);
return string.Format(Constants.Employee.ElasticsearchIndexTemplate,
_obj.Id,
Sungero.Commons.PublicFunctions.Module.TrimSpecialSymbols(_obj.Name),
lastName,
firstName,
middleName,
string.IsNullOrEmpty(firstName) ? string.Empty : firstName.Substring(0, 1),
string.IsNullOrEmpty(middleName) ? string.Empty : middleName.Substring(0, 1),
_obj.Department != null && _obj.Department.BusinessUnit != null ? _obj.Department.BusinessUnit.Id : 0,
Sungero.Core.Calendar.Now.ToString("dd.MM.yyyy HH:mm:ss"),
_obj.Status.Value.Value);
}
}
}
\ No newline at end of file
......
......@@ -118,6 +118,19 @@
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.BooleanEditorToBooleanBinder",
"ParentGuid": "6fbb1d3b-c217-46f7-a83b-0caaece0f798",
"PropertyGuid": "08aadd3d-6ae7-48da-879c-e9f1dd12fc19",
"RowNumber": 5,
"RowSpan": 1,
"Settings": []
},
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "ea626dec-a66a-442e-acb8-a40867fee02c",
"Name": "SendActionItemsFromManager",
"ColumnNumber": 0,
"ColumnSpan": 1,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.BooleanEditorToBooleanBinder",
"ParentGuid": "6fbb1d3b-c217-46f7-a83b-0caaece0f798",
"PropertyGuid": "724e87e8-9a62-4350-bac0-bf9d89efd42b",
"RowNumber": 4,
"RowSpan": 1,
"Settings": []
......@@ -215,6 +228,9 @@
"NameGuid": "05501fb4-d4a0-4416-918f-b807ab14d781",
"Name": "IsAssistant",
"Code": "IsAssistant",
"HandledEvents": [
"ChangedShared"
],
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.BooleanEditorToBooleanBinder",
"PreviousPropertyGuid": "41f6ca45-c728-4283-9bb4-bf9a06b24b51"
},
......@@ -225,6 +241,14 @@
"Code": "PreparesAsgCmp",
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.BooleanEditorToBooleanBinder",
"PreviousPropertyGuid": "05501fb4-d4a0-4416-918f-b807ab14d781"
},
{
"$type": "Sungero.Metadata.BooleanPropertyMetadata, Sungero.Metadata",
"NameGuid": "724e87e8-9a62-4350-bac0-bf9d89efd42b",
"Name": "SendActionItems",
"Code": "SendActionItem",
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.BooleanEditorToBooleanBinder",
"PreviousPropertyGuid": "08aadd3d-6ae7-48da-879c-e9f1dd12fc19"
}
],
"PublicStructures": [],
......
......@@ -10,6 +10,12 @@ namespace Sungero.Company
partial class ManagersAssistantSharedHandlers
{
public virtual void IsAssistantChanged(Sungero.Domain.Shared.BooleanPropertyChangedEventArgs e)
{
if (e.NewValue == true && _obj.SendActionItems != true)
_obj.SendActionItems = true;
}
public virtual void PreparesResolutionChanged(Sungero.Domain.Shared.BooleanPropertyChangedEventArgs e)
{
if (e.NewValue == true)
......
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
......@@ -144,4 +85,7 @@
<data name="Property_PreparesAssignmentCompletion" xml:space="preserve">
<value>Supervises assignment completion</value>
</data>
<data name="Property_SendActionItems" xml:space="preserve">
<value>Sends action items on behalf of the manager</value>
</data>
</root>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
......@@ -141,4 +82,7 @@
<data name="Property_PreparesAssignmentCompletion" xml:space="preserve">
<value>Анализирует исполнительскую дисциплину</value>
</data>
<data name="Property_SendActionItems" xml:space="preserve">
<value>Отправляет поручения от имени руководителя</value>
</data>
</root>
\ No newline at end of file
......
......@@ -776,6 +776,12 @@
"ReturnTypeFullName": "System.Boolean"
},
{
"Name": "Reindex",
"ReturnType": "void",
"ReturnTypeFullName": "System.Void",
"WebApiRequestType": "Post"
},
{
"Name": "SetLoginPassword",
"Parameters": [
{
......@@ -792,6 +798,19 @@
"ReturnType": "void",
"ReturnTypeFullName": "System.Void",
"WebApiRequestType": "Post"
},
{
"Name": "UpdateBusinessUnitsIndexSynonyms",
"Parameters": [
{
"Name": "synonyms",
"ParameterType": "global::System.String",
"ParameterTypeFullName": "System.String"
}
],
"ReturnType": "void",
"ReturnTypeFullName": "System.Void",
"WebApiRequestType": "Post"
}
],
"PublicStructures": [],
......@@ -822,7 +841,7 @@
"SharedAssemblyName": "Sungero.Company.Shared",
"SharedNamespace": "Sungero.Company.Shared",
"SpecialFolders": [],
"Version": "4.4.57.0",
"Version": "4.6.38.0",
"Widgets": [],
"Versions": [
{
......
{
"$type": "Sungero.Metadata.EntityMetadata, Sungero.Metadata",
"NameGuid": "2e3f162d-ef11-4ebc-84ef-c39069e5e94e",
"Name": "BusinessUnitRecipientLinks",
"AccessRightsMode": "NoRight",
"BaseGuid": "20784da1-10a0-4ce1-97de-8a075142c47a",
"CanBeAncestor": true,
"CreationAreaMetadata": {
"NameGuid": "17ad7a7f-8762-49b8-9885-42d0c6d64b71",
"Name": "CreationArea",
"Buttons": [],
"IsAncestorMetadata": true,
"Versions": []
},
"ExtraSearchProperties": [],
"IsAutoGenerated": true,
"IsChildEntity": true,
"Overridden": [
"IsVisible",
"IsAutoGenerated"
],
"Properties": [
{
"$type": "Sungero.Metadata.NavigationPropertyMetadata, Sungero.Metadata",
"NameGuid": "75c0daf6-68bf-4140-b41d-ca537c0ed1c5",
"Name": "Group",
"EntityGuid": "eff95720-181f-4f7d-892d-dec034c7b2ab",
"IsAncestorMetadata": true,
"IsReferenceToRootEntity": true,
"Overridden": [
"EntityGuid"
],
"Versions": []
}
],
"PublicStructures": [],
"ResourcesKeys": [],
"RibbonCardMetadata": {
"NameGuid": "7d070170-3c08-412c-9b07-75f08a777f9c",
"Name": "RibbonCard",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"RibbonKind": "Card",
"Versions": []
},
"RibbonCollectionMetadata": {
"NameGuid": "09f2fca3-dae8-4659-915d-00dd04465686",
"Name": "RibbonCollection",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"Versions": []
},
"Versions": [
{
"Type": "EntityMetadata",
"Number": 11
},
{
"Type": "DomainApi",
"Number": 2
}
]
}
\ No newline at end of file
{
"$type": "Sungero.Metadata.EntityMetadata, Sungero.Metadata",
"NameGuid": "a9e935d5-3b72-4e3a-9e43-711d8f32b84e",
"Name": "DepartmentRecipientLinks",
"AccessRightsMode": "NoRight",
"BaseGuid": "20784da1-10a0-4ce1-97de-8a075142c47a",
"CanBeAncestor": true,
"CreationAreaMetadata": {
"NameGuid": "7bc470db-69c6-4277-9bca-b3e611961859",
"Name": "CreationArea",
"Buttons": [],
"IsAncestorMetadata": true,
"Versions": []
},
"ExtraSearchProperties": [],
"IsChildEntity": true,
"Overridden": [
"IsVisible"
],
"Properties": [
{
"$type": "Sungero.Metadata.NavigationPropertyMetadata, Sungero.Metadata",
"NameGuid": "1dab57e3-a543-4ac4-bf85-947c588119b7",
"Name": "Member",
"EntityGuid": "b7905516-2be5-4931-961c-cb38d5677565",
"IsAncestorMetadata": true,
"Overridden": [
"EntityGuid",
"NeedPassEntityToLookupEvent",
"HandledEvents"
],
"Versions": []
},
{
"$type": "Sungero.Metadata.StringPropertyMetadata, Sungero.Metadata",
"NameGuid": "e8985065-ff60-4d4b-9309-724366552ffd",
"Name": "Sid",
"IsAncestorMetadata": true,
"IsShowedInList": false,
"IsVisibility": false,
"Overridden": [
"IsVisibility",
"IsShowedInList"
],
"Versions": []
},
{
"$type": "Sungero.Metadata.NavigationPropertyMetadata, Sungero.Metadata",
"NameGuid": "75c0daf6-68bf-4140-b41d-ca537c0ed1c5",
"Name": "Group",
"EntityGuid": "61b1c19f-26e2-49a5-b3d3-0d3618151e12",
"IsAncestorMetadata": true,
"IsReferenceToRootEntity": true,
"Overridden": [
"EntityGuid"
],
"Versions": []
}
],
"PublicStructures": [],
"ResourcesKeys": [],
"RibbonCardMetadata": {
"NameGuid": "2f705bde-305a-4ca9-9adf-fc58c4fd798b",
"Name": "RibbonCard",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"RibbonKind": "Card",
"Versions": []
},
"RibbonCollectionMetadata": {
"NameGuid": "6aa11a8e-971b-4bdd-8f42-5d2c1a55ff5f",
"Name": "RibbonCollection",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"Versions": []
},
"Versions": [
{
"Type": "EntityMetadata",
"Number": 11
},
{
"Type": "DomainApi",
"Number": 2
}
]
}
\ No newline at end of file
{
"$type": "Sungero.Metadata.EntityMetadata, Sungero.Metadata",
"NameGuid": "4a37aec4-764c-4c14-8887-e1ecafa5b4c5",
"Name": "JobTitle",
"Actions": [
{
"NameGuid": "8cc0dcda-e2c3-4dfc-8fa7-da998b0c59ea",
"Name": "ShowDuplicates",
"ActionArea": "Card",
"GenerateHandler": true,
"LargeIconName": null,
"SmallIconName": null
},
{
"NameGuid": "f3900f7f-d711-4661-90c2-6780ad9b0b41",
"Name": "ShowEmployeesWithSameJobTitle",
"ActionArea": "Card",
"GenerateHandler": true,
"LargeIconName": null,
"SmallIconName": null
}
],
"BaseGuid": "04581d26-0780-4cfd-b3cd-c2cafc5798b0",
"CanBeNavigationPropertyType": true,
"CanBeUsedInIntegration": true,
"Code": "JobTitle",
"CreationAreaMetadata": {
"NameGuid": "9cf3997f-7bf4-43d1-b432-9fbd324f5541",
"Name": "CreationArea",
"Buttons": [],
"IsAncestorMetadata": true,
"Versions": []
},
"ExtraSearchProperties": [],
"FilterPanel": {
"NameGuid": "b0125fbd-3b91-4dbb-914a-689276216404",
"Name": "FilterPanel",
"Controls": [
{
"$type": "Sungero.Metadata.FilterGroupMetadata, Sungero.Metadata",
"NameGuid": "77af37f5-79e4-4a75-9110-ec61887c28a1",
"Name": "State",
"Versions": []
},
{
"$type": "Sungero.Metadata.FilterGroupMetadata, Sungero.Metadata",
"NameGuid": "f31c8309-4cf3-43ee-ac4f-9a05e1b4ee98",
"Name": "BusinessUnit",
"PreviousGuid": "77af37f5-79e4-4a75-9110-ec61887c28a1",
"Versions": []
},
{
"$type": "Sungero.Metadata.FilterListMetadata, Sungero.Metadata",
"NameGuid": "0967acda-d695-4137-8850-8ccabd90b139",
"Name": "StateFlagsList",
"IsMultiSelect": true,
"ParentGuid": "77af37f5-79e4-4a75-9110-ec61887c28a1",
"Versions": []
},
{
"$type": "Sungero.Metadata.FilterListItemMetadata, Sungero.Metadata",
"NameGuid": "eacbd745-7336-4377-9254-9714a8b83e05",
"Name": "Active",
"IsSelected": true,
"ParentGuid": "0967acda-d695-4137-8850-8ccabd90b139",
"Versions": []
},
{
"$type": "Sungero.Metadata.FilterListItemMetadata, Sungero.Metadata",
"NameGuid": "42eed447-0942-414e-98ff-a5e00e65a25d",
"Name": "Closed",
"ParentGuid": "0967acda-d695-4137-8850-8ccabd90b139",
"PreviousGuid": "eacbd745-7336-4377-9254-9714a8b83e05",
"Versions": []
},
{
"$type": "Sungero.Metadata.FilterNavigationMetadata, Sungero.Metadata",
"NameGuid": "27ee82bb-e334-4763-8085-569917c0d920",
"Name": "BusinessUnit",
"EntityGuid": "eff95720-181f-4f7d-892d-dec034c7b2ab",
"ParentGuid": "f31c8309-4cf3-43ee-ac4f-9a05e1b4ee98",
"Versions": []
},
{
"$type": "Sungero.Metadata.FilterGroupMetadata, Sungero.Metadata",
"NameGuid": "d5600fe7-fd35-4193-81fd-f9402907d884",
"Name": "Department",
"PreviousGuid": "f31c8309-4cf3-43ee-ac4f-9a05e1b4ee98",
"Versions": []
},
{
"$type": "Sungero.Metadata.FilterNavigationMetadata, Sungero.Metadata",
"NameGuid": "152770f5-3073-495b-b371-d49148e346d9",
"Name": "Department",
"EntityGuid": "61b1c19f-26e2-49a5-b3d3-0d3618151e12",
"ParentGuid": "d5600fe7-fd35-4193-81fd-f9402907d884",
"Versions": []
},
{
"$type": "Sungero.Metadata.FilterListMetadata, Sungero.Metadata",
"NameGuid": "34cf064b-7cf5-48c8-adb8-e7e4afd6c858",
"Name": "DepartmentFlagsList",
"IsMultiSelect": true,
"ParentGuid": "d5600fe7-fd35-4193-81fd-f9402907d884",
"PreviousGuid": "152770f5-3073-495b-b371-d49148e346d9"
},
{
"$type": "Sungero.Metadata.FilterListItemMetadata, Sungero.Metadata",
"NameGuid": "1d64d946-d475-453f-8131-f357b31dd4dd",
"Name": "IncludeSubdepartments",
"ParentGuid": "34cf064b-7cf5-48c8-adb8-e7e4afd6c858"
}
],
"IsAncestorMetadata": true,
"Overridden": [
"Controls"
],
"Versions": []
},
"Forms": [
{
"$type": "Sungero.Metadata.StandaloneFormMetadata, Sungero.Metadata",
"NameGuid": "347d1373-8c56-42b8-aaeb-a0347cfd8405",
"Name": "Card",
"Controls": [
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "6f091085-3550-41db-99e0-84bb20cc0530",
"Name": "Name",
"ColumnNumber": 0,
"ColumnSpan": 2,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.StringEditorToStringBinder",
"ParentGuid": "e7f90b5f-5376-4c82-b706-ddfc629cda5d",
"PropertyGuid": "2b739a0e-54e1-4773-8459-9fdf76e12486",
"RowNumber": 0,
"RowSpan": 1,
"Settings": [],
"Versions": []
},
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "b38e1840-3878-4593-8abe-e592a0d44696",
"Name": "Status",
"ColumnNumber": 0,
"ColumnSpan": 1,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.DropDownEditorToEnumerationBinder",
"ParentGuid": "e7f90b5f-5376-4c82-b706-ddfc629cda5d",
"PropertyGuid": "1dcedc29-5140-4770-ac92-eabc212326a1",
"RowNumber": 2,
"RowSpan": 1,
"Settings": [],
"Versions": []
},
{
"$type": "Sungero.Metadata.ControlGroupMetadata, Sungero.Metadata",
"NameGuid": "e7f90b5f-5376-4c82-b706-ddfc629cda5d",
"Name": "ControlGroup",
"ColumnDefinitions": [
{
"Percentage": 55.0
},
{
"Percentage": 45.0
}
],
"Versions": []
},
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "6ef89b8d-e5ee-4495-a827-9aac518b4294",
"Name": "Department",
"ColumnNumber": 0,
"ColumnSpan": 2,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.DropDownEditorToNavigationBinder",
"ParentGuid": "e7f90b5f-5376-4c82-b706-ddfc629cda5d",
"PropertyGuid": "eb9e1c0d-5925-4e40-8c21-f2095307ad68",
"RowNumber": 1,
"RowSpan": 1,
"Settings": []
}
],
"Overridden": [
"Controls"
],
"Versions": []
}
],
"HandledEvents": [
"BeforeSaveServer",
"FilteringServer"
],
"IconName": "JobTitle.ico",
"IconResourcesKeys": [],
"IsStatusEnabled": true,
"LookupMode": "Standalone",
"OperationsClass": "",
"Overridden": [
"IconName",
"LookupMode",
"IsCacheable",
"IsStatusEnabled",
"IsVisible",
"CanBeUsedInIntegration"
],
"Properties": [
{
"$type": "Sungero.Metadata.IntegerPropertyMetadata, Sungero.Metadata",
"NameGuid": "d7319199-3333-49cc-a7b9-8467617ccf20",
"Name": "Id",
"IsAncestorMetadata": true,
"IsIdentifier": true,
"IsUnique": true,
"Overridden": [
"IsVisibleInCollectionByDefault"
],
"Versions": []
},
{
"$type": "Sungero.Metadata.EnumPropertyMetadata, Sungero.Metadata",
"NameGuid": "1dcedc29-5140-4770-ac92-eabc212326a1",
"Name": "Status",
"IsAncestorMetadata": true,
"Overridden": [
"IsShowedInList",
"IsVisibility",
"CanBeSearch"
],
"Versions": []
},
{
"$type": "Sungero.Metadata.StringPropertyMetadata, Sungero.Metadata",
"NameGuid": "2b739a0e-54e1-4773-8459-9fdf76e12486",
"Name": "Name",
"Code": "Name",
"IsDisplayValue": true,
"IsQuickSearchAllowed": true,
"IsRequired": true,
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.StringEditorToStringBinder",
"PreviousPropertyGuid": "d7319199-3333-49cc-a7b9-8467617ccf20",
"Versions": []
},
{
"$type": "Sungero.Metadata.NavigationPropertyMetadata, Sungero.Metadata",
"NameGuid": "eb9e1c0d-5925-4e40-8c21-f2095307ad68",
"Name": "Department",
"Code": "Department",
"EntityGuid": "61b1c19f-26e2-49a5-b3d3-0d3618151e12",
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.DropDownEditorToNavigationBinder",
"PreviousPropertyGuid": "1dcedc29-5140-4770-ac92-eabc212326a1",
"Versions": []
}
],
"PublicStructures": [],
"ResourcesKeys": [
"JobTitleNameAlreadyExists",
"JobTitleAlreadyAssignedToEmployees"
],
"RibbonCardMetadata": {
"NameGuid": "41bb90e5-cf51-44d9-813a-6dc67eb68af1",
"Name": "RibbonCard",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"RibbonKind": "Card",
"Versions": []
},
"RibbonCollectionMetadata": {
"NameGuid": "ba57138c-8c9a-47bd-8a16-5d5cea2459c5",
"Name": "RibbonCollection",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"Versions": []
},
"Versions": [
{
"Type": "EntityMetadata",
"Number": 11
},
{
"Type": "DomainApi",
"Number": 2
}
]
}
\ No newline at end of file
{
"$type": "Sungero.Metadata.EntityMetadata, Sungero.Metadata",
"NameGuid": "c2200a86-5d5d-47d6-930d-c3ce8b11f04b",
"Name": "ManagersAssistant",
"BaseGuid": "04581d26-0780-4cfd-b3cd-c2cafc5798b0",
"CanBeNavigationPropertyType": true,
"CanBeUsedInIntegration": true,
"Code": "Assistant",
"CreationAreaMetadata": {
"NameGuid": "70fef3e7-13ef-447a-80cc-bee93b7b828f",
"Name": "CreationArea",
"Buttons": [],
"IsAncestorMetadata": true,
"Versions": []
},
"ExtraSearchProperties": [],
"FilterPanel": {
"NameGuid": "b0125fbd-3b91-4dbb-914a-689276216404",
"Name": "FilterPanel",
"Controls": [],
"IsAncestorMetadata": true,
"Versions": []
},
"Forms": [
{
"$type": "Sungero.Metadata.StandaloneFormMetadata, Sungero.Metadata",
"NameGuid": "ac70b9fe-d1ca-43f9-be10-430ba6c8d9d9",
"Name": "Card",
"Controls": [
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "f759370f-13ce-4ffc-96aa-21d175d806a4",
"Name": "Manager",
"ColumnNumber": 0,
"ColumnSpan": 2,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.DropDownEditorToNavigationBinder",
"ParentGuid": "6fbb1d3b-c217-46f7-a83b-0caaece0f798",
"PropertyGuid": "a5eb60eb-40a6-4b27-8b10-91b4bb91473b",
"RowNumber": 0,
"RowSpan": 1,
"Settings": [],
"Versions": []
},
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "ea241828-2d45-4985-9a7f-62b2c9226b07",
"Name": "Secretary",
"ColumnNumber": 0,
"ColumnSpan": 1,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.DropDownEditorToNavigationBinder",
"ParentGuid": "6fbb1d3b-c217-46f7-a83b-0caaece0f798",
"PropertyGuid": "6f98c890-c53f-48ef-a78b-ecd83c4c827d",
"RowNumber": 1,
"RowSpan": 1,
"Settings": [],
"Versions": []
},
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "a7dd5a3e-17fb-4645-ac01-616090359831",
"Name": "Status",
"ColumnNumber": 1,
"ColumnSpan": 1,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.DropDownEditorToEnumerationBinder",
"ParentGuid": "6fbb1d3b-c217-46f7-a83b-0caaece0f798",
"PropertyGuid": "1dcedc29-5140-4770-ac92-eabc212326a1",
"RowNumber": 1,
"RowSpan": 1,
"Settings": [],
"Versions": []
},
{
"$type": "Sungero.Metadata.ControlGroupMetadata, Sungero.Metadata",
"NameGuid": "6fbb1d3b-c217-46f7-a83b-0caaece0f798",
"Name": "ControlGroup",
"ColumnDefinitions": [
{
"Percentage": 50.0
},
{
"Percentage": 50.0
}
],
"Versions": []
},
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "6902370e-cc1d-46e8-b85e-d6ecfea8d4ce",
"Name": "PreparesResolution",
"ColumnNumber": 0,
"ColumnSpan": 1,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.BooleanEditorToBooleanBinder",
"ParentGuid": "6fbb1d3b-c217-46f7-a83b-0caaece0f798",
"PropertyGuid": "41f6ca45-c728-4283-9bb4-bf9a06b24b51",
"RowNumber": 3,
"RowSpan": 1,
"Settings": []
},
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "489e5c2d-2de7-467f-a30d-15b252b0a6b4",
"Name": "IsManagerAssistant",
"ColumnNumber": 0,
"ColumnSpan": 1,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.BooleanEditorToBooleanBinder",
"ParentGuid": "6fbb1d3b-c217-46f7-a83b-0caaece0f798",
"PropertyGuid": "05501fb4-d4a0-4416-918f-b807ab14d781",
"RowNumber": 2,
"RowSpan": 1,
"Settings": []
},
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "41a6bcb0-826f-4caf-b060-3819db0ea67f",
"Name": "PreparesAssignmentCompletion",
"ColumnNumber": 0,
"ColumnSpan": 1,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.BooleanEditorToBooleanBinder",
"ParentGuid": "6fbb1d3b-c217-46f7-a83b-0caaece0f798",
"PropertyGuid": "08aadd3d-6ae7-48da-879c-e9f1dd12fc19",
"RowNumber": 5,
"RowSpan": 1,
"Settings": []
},
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "ea626dec-a66a-442e-acb8-a40867fee02c",
"Name": "SendActionItemsFromManager",
"ColumnNumber": 0,
"ColumnSpan": 1,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.BooleanEditorToBooleanBinder",
"ParentGuid": "6fbb1d3b-c217-46f7-a83b-0caaece0f798",
"PropertyGuid": "724e87e8-9a62-4350-bac0-bf9d89efd42b",
"RowNumber": 4,
"RowSpan": 1,
"Settings": []
}
],
"Overridden": [
"Controls"
],
"Versions": []
}
],
"HandledEvents": [
"BeforeSaveServer",
"CreatedServer",
"RefreshClient",
"BeforeDeleteServer"
],
"IconResourcesKeys": [],
"IsStatusEnabled": true,
"IsVisible": false,
"LookupMode": "Standalone",
"OperationsClass": "",
"Overridden": [
"IsCacheable",
"LookupMode",
"IsStatusEnabled",
"IsVisible",
"CanBeUsedInIntegration"
],
"Properties": [
{
"$type": "Sungero.Metadata.IntegerPropertyMetadata, Sungero.Metadata",
"NameGuid": "d7319199-3333-49cc-a7b9-8467617ccf20",
"Name": "Id",
"IsAncestorMetadata": true,
"IsIdentifier": true,
"IsUnique": true,
"Overridden": [
"IsVisibleInCollectionByDefault",
"IsVisibleInFolderByDefault"
],
"Versions": []
},
{
"$type": "Sungero.Metadata.EnumPropertyMetadata, Sungero.Metadata",
"NameGuid": "1dcedc29-5140-4770-ac92-eabc212326a1",
"Name": "Status",
"IsAncestorMetadata": true,
"Overridden": [
"IsShowedInList",
"IsVisibility",
"CanBeSearch"
],
"Versions": []
},
{
"$type": "Sungero.Metadata.NavigationPropertyMetadata, Sungero.Metadata",
"NameGuid": "a5eb60eb-40a6-4b27-8b10-91b4bb91473b",
"Name": "Manager",
"Code": "Manager",
"EntityGuid": "b7905516-2be5-4931-961c-cb38d5677565",
"IsDisplayValue": true,
"IsQuickSearchAllowed": true,
"IsRequired": true,
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.DropDownEditorToNavigationBinder",
"PreviousPropertyGuid": "d7319199-3333-49cc-a7b9-8467617ccf20",
"Versions": []
},
{
"$type": "Sungero.Metadata.NavigationPropertyMetadata, Sungero.Metadata",
"NameGuid": "6f98c890-c53f-48ef-a78b-ecd83c4c827d",
"Name": "Assistant",
"Code": "Assistant",
"EntityGuid": "b7905516-2be5-4931-961c-cb38d5677565",
"IsRequired": true,
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.DropDownEditorToNavigationBinder",
"PreviousPropertyGuid": "a5eb60eb-40a6-4b27-8b10-91b4bb91473b",
"Versions": []
},
{
"$type": "Sungero.Metadata.BooleanPropertyMetadata, Sungero.Metadata",
"NameGuid": "41f6ca45-c728-4283-9bb4-bf9a06b24b51",
"Name": "PreparesResolution",
"Code": "PrepResolution",
"HandledEvents": [
"ValueInputClient",
"ChangedShared"
],
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.BooleanEditorToBooleanBinder",
"PreviousPropertyGuid": "1dcedc29-5140-4770-ac92-eabc212326a1",
"Versions": []
},
{
"$type": "Sungero.Metadata.BooleanPropertyMetadata, Sungero.Metadata",
"NameGuid": "05501fb4-d4a0-4416-918f-b807ab14d781",
"Name": "IsAssistant",
"Code": "IsAssistant",
"HandledEvents": [
"ChangedShared"
],
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.BooleanEditorToBooleanBinder",
"PreviousPropertyGuid": "41f6ca45-c728-4283-9bb4-bf9a06b24b51"
},
{
"$type": "Sungero.Metadata.BooleanPropertyMetadata, Sungero.Metadata",
"NameGuid": "08aadd3d-6ae7-48da-879c-e9f1dd12fc19",
"Name": "PreparesAssignmentCompletion",
"Code": "PreparesAsgCmp",
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.BooleanEditorToBooleanBinder",
"PreviousPropertyGuid": "05501fb4-d4a0-4416-918f-b807ab14d781"
},
{
"$type": "Sungero.Metadata.BooleanPropertyMetadata, Sungero.Metadata",
"NameGuid": "724e87e8-9a62-4350-bac0-bf9d89efd42b",
"Name": "SendActionItems",
"Code": "SendActionItem",
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.BooleanEditorToBooleanBinder",
"PreviousPropertyGuid": "08aadd3d-6ae7-48da-879c-e9f1dd12fc19"
}
],
"PublicStructures": [],
"ResourcesKeys": [
"ExecutiveSecretaryIsAppointed",
"ManagerCanNotBeAssistantForHimself",
"NoAuthoritiesError",
"SelectedAssistantIsAlreadyAppointed"
],
"RibbonCardMetadata": {
"NameGuid": "5ea31a93-1628-4d56-a7ed-e30ba1b41fec",
"Name": "RibbonCard",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"RibbonKind": "Card",
"Versions": []
},
"RibbonCollectionMetadata": {
"NameGuid": "dd1a3132-593b-4bff-bcbe-e58ca66d4b8b",
"Name": "RibbonCollection",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"Versions": []
},
"Versions": [
{
"Type": "EntityMetadata",
"Number": 11
},
{
"Type": "DomainApi",
"Number": 2
}
]
}
\ No newline at end of file
{
"$type": "Sungero.Metadata.ReportMetadata, Sungero.Reporting.Shared",
"NameGuid": "b8aa8f84-7488-43c7-9e0d-7050eb5ea6af",
"Name": "ResponsibilitiesReport",
"AssociatedGuid": "b7905516-2be5-4931-961c-cb38d5677565",
"BaseGuid": "cef9a810-3f30-4eca-9fe3-30992af0b818",
"DataSources": [],
"DefaultExportFormat": "Pdf",
"ExportFormats": [
"Pdf",
"Word"
],
"HandledEvents": [
"BeforeExecuteServer",
"AfterExecuteServer"
],
"IconResourcesKeys": [],
"Overridden": [
"PublicConstants",
"PublicStructures",
"Parameters",
"HandledEvents",
"ExportFormats",
"DefaultExportFormat",
"DisplayName",
"Description"
],
"Parameters": [
{
"NameGuid": "4654e36b-1c27-4aae-8ccb-433fd374e9cb",
"Name": "Employee",
"EntityType": "b7905516-2be5-4931-961c-cb38d5677565",
"InternalDataTypeName": "Sungero.Company.IEmployee, Sungero.Domain.Interfaces",
"Versions": []
},
{
"NameGuid": "7e5bbe89-6073-42a9-964b-2dbe29c94258",
"Name": "ReportSessionId",
"InternalDataTypeName": "System.String",
"Versions": []
},
{
"NameGuid": "d916c502-ea51-4d58-a4b3-52f85f491f2f",
"Name": "CurrentDate",
"InternalDataTypeName": "System.DateTime",
"IsSimpleDataType": true,
"Versions": []
}
],
"PublicConstants": [
{
"Name": "CompanyPriority",
"ParentClasses": [
"ResponsibilitiesReport"
],
"TypeName": "System.Int32",
"Value": "1000"
},
{
"Name": "CounterpartyPriority",
"ParentClasses": [
"ResponsibilitiesReport"
],
"TypeName": "System.Int32",
"Value": "4000"
},
{
"Name": "DocflowPriority",
"ParentClasses": [
"ResponsibilitiesReport"
],
"TypeName": "System.Int32",
"Value": "2000"
},
{
"Name": "ExchangePriority",
"ParentClasses": [
"ResponsibilitiesReport"
],
"TypeName": "System.Int32",
"Value": "1500"
},
{
"Name": "MeetingsPriority",
"ParentClasses": [
"ResponsibilitiesReport"
],
"TypeName": "System.Int32",
"Value": "3000"
},
{
"Name": "ProjectsPriority",
"ParentClasses": [
"ResponsibilitiesReport"
],
"TypeName": "System.Int32",
"Value": "2500"
}
],
"PublicStructures": [
{
"Name": "ResponsibilitiesReportTableLine",
"IsPublic": true,
"Properties": [
{
"Name": "ModuleName",
"IsNullable": true,
"TypeFullName": "global::System.String"
},
{
"Name": "Responsibility",
"IsNullable": true,
"TypeFullName": "global::System.String"
},
{
"Name": "Record",
"IsNullable": true,
"TypeFullName": "global::System.String"
},
{
"Name": "RecordId",
"IsNullable": true,
"TypeFullName": "global::System.Nullable<global::System.Int32>"
},
{
"Name": "RecordHyperlink",
"IsNullable": true,
"TypeFullName": "global::System.String"
},
{
"Name": "Priority",
"TypeFullName": "global::System.Int32"
},
{
"Name": "ReportSessionId",
"IsNullable": true,
"TypeFullName": "global::System.String"
}
],
"StructureNamespace": "Sungero.Company.Structures.ResponsibilitiesReport"
}
],
"ResourcesKeys": [
"ReportName",
"Responsibility",
"Record",
"RecordId",
"CertificateResponsibility",
"BoxResponsibility"
],
"Versions": []
}
\ No newline at end of file
{
"$type": "Sungero.Metadata.EntityMetadata, Sungero.Metadata",
"NameGuid": "b7dd2935-25a9-4dd2-802b-711cf4549df2",
"Name": "VisibilityRuleExcludedMembers",
"AccessRightsMode": "NoRight",
"BaseGuid": "a3d38bf5-0414-41f6-bb33-a4621d2e5a60",
"CanBeNavigationPropertyType": true,
"Code": "RuleExcldMembs",
"ExtraSearchProperties": [],
"IsChildEntity": true,
"Properties": [
{
"$type": "Sungero.Metadata.NavigationPropertyMetadata, Sungero.Metadata",
"NameGuid": "d75da501-4a56-4364-b722-b45bbf1a25ed",
"Name": "VisibilityRule",
"CanBeSearch": false,
"Code": "VisibRule",
"EntityGuid": "023eab79-c456-46bb-97b5-fbc764be9308",
"IsReferenceToRootEntity": true,
"IsShowedInList": false,
"Versions": []
},
{
"$type": "Sungero.Metadata.NavigationPropertyMetadata, Sungero.Metadata",
"NameGuid": "6d21953f-1c11-4ce2-9b63-f59286effae0",
"Name": "Recipient",
"CanBeSearch": false,
"Code": "Recipient",
"EntityGuid": "c612fc41-44a3-428b-a97c-433c333d78e9",
"HandledEvents": [
"LookupServer"
],
"IsRequired": true,
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.DropDownEditorToNavigationBinder",
"PreviousPropertyGuid": "d75da501-4a56-4364-b722-b45bbf1a25ed",
"Versions": []
}
],
"PublicStructures": [],
"RibbonCardMetadata": {
"NameGuid": "d783ebc2-c071-4bf8-9b6a-98ecfdbefe99",
"Name": "RibbonCard",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"RibbonKind": "Card",
"Versions": []
},
"RibbonCollectionMetadata": {
"NameGuid": "37f3df24-83dd-4282-bff8-ee4c44beb992",
"Name": "RibbonCollection",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"Versions": []
},
"Versions": [
{
"Type": "EntityMetadata",
"Number": 11
}
]
}
\ No newline at end of file
{
"$type": "Sungero.Metadata.EntityMetadata, Sungero.Metadata",
"NameGuid": "356ea70e-0e49-40e9-8eb2-4ea73e030539",
"Name": "VisibilityRuleRecipients",
"AccessRightsMode": "NoRight",
"BaseGuid": "a3d38bf5-0414-41f6-bb33-a4621d2e5a60",
"CanBeNavigationPropertyType": true,
"Code": "RuleRecipients",
"ExtraSearchProperties": [],
"IsChildEntity": true,
"Properties": [
{
"$type": "Sungero.Metadata.NavigationPropertyMetadata, Sungero.Metadata",
"NameGuid": "761964d3-068e-4ba7-a2a8-088481b8f6ab",
"Name": "VisibilityRule",
"CanBeSearch": false,
"Code": "VisibRule",
"EntityGuid": "023eab79-c456-46bb-97b5-fbc764be9308",
"IsReferenceToRootEntity": true,
"IsShowedInList": false,
"Versions": []
},
{
"$type": "Sungero.Metadata.NavigationPropertyMetadata, Sungero.Metadata",
"NameGuid": "54c5efff-45c1-4a8d-b920-d1bc6ba08acc",
"Name": "Recipient",
"CanBeSearch": false,
"Code": "Recipient",
"EntityGuid": "c612fc41-44a3-428b-a97c-433c333d78e9",
"HandledEvents": [
"LookupServer"
],
"IsRequired": true,
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.DropDownEditorToNavigationBinder",
"PreviousPropertyGuid": "761964d3-068e-4ba7-a2a8-088481b8f6ab",
"Versions": []
}
],
"PublicStructures": [],
"RibbonCardMetadata": {
"NameGuid": "13344e2c-1a79-457c-abad-639bcb28eda5",
"Name": "RibbonCard",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"RibbonKind": "Card",
"Versions": []
},
"RibbonCollectionMetadata": {
"NameGuid": "a994fc24-02ad-466d-932e-49b14c4932f8",
"Name": "RibbonCollection",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"Versions": []
},
"Versions": [
{
"Type": "EntityMetadata",
"Number": 11
}
]
}
\ No newline at end of file
{
"$type": "Sungero.Metadata.EntityMetadata, Sungero.Metadata",
"NameGuid": "71565a4d-9d61-4783-9c7f-b001b7bc417c",
"Name": "VisibilityRuleVisibleMembers",
"AccessRightsMode": "NoRight",
"BaseGuid": "a3d38bf5-0414-41f6-bb33-a4621d2e5a60",
"CanBeNavigationPropertyType": true,
"Code": "RuleVisblMembs",
"ExtraSearchProperties": [],
"IsChildEntity": true,
"Properties": [
{
"$type": "Sungero.Metadata.NavigationPropertyMetadata, Sungero.Metadata",
"NameGuid": "9d07d980-a198-49ad-99ed-2b5ccb2ada33",
"Name": "VisibilityRule",
"CanBeSearch": false,
"Code": "VisibRule",
"EntityGuid": "023eab79-c456-46bb-97b5-fbc764be9308",
"IsReferenceToRootEntity": true,
"IsShowedInList": false,
"Versions": []
},
{
"$type": "Sungero.Metadata.NavigationPropertyMetadata, Sungero.Metadata",
"NameGuid": "a945684f-6784-415c-94cb-a1d25e1a2aaa",
"Name": "Recipient",
"CanBeSearch": false,
"Code": "Recipient",
"EntityGuid": "c612fc41-44a3-428b-a97c-433c333d78e9",
"HandledEvents": [
"LookupServer"
],
"IsRequired": true,
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.DropDownEditorToNavigationBinder",
"PreviousPropertyGuid": "9d07d980-a198-49ad-99ed-2b5ccb2ada33",
"Versions": []
}
],
"PublicStructures": [],
"RibbonCardMetadata": {
"NameGuid": "80737bcb-827c-4a48-ae62-12749bbf1d6e",
"Name": "RibbonCard",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"RibbonKind": "Card",
"Versions": []
},
"RibbonCollectionMetadata": {
"NameGuid": "74b0226c-8b5e-4501-a5e7-6f068be14ac2",
"Name": "RibbonCollection",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"Versions": []
},
"Versions": [
{
"Type": "EntityMetadata",
"Number": 11
}
]
}
\ No newline at end of file
{
"$type": "Sungero.Metadata.EntityMetadata, Sungero.Metadata",
"NameGuid": "435ba4a4-ee0a-4c43-b334-c243257f400f",
"Name": "VisibilitySetting",
"BaseGuid": "04581d26-0780-4cfd-b3cd-c2cafc5798b0",
"CanBeNavigationPropertyType": true,
"CanBeUsedInIntegration": true,
"Code": "VisibSetting",
"CreationAreaMetadata": {
"NameGuid": "f7766750-eee2-4fcd-8003-5c06a90d1f44",
"Name": "CreationArea",
"Buttons": [],
"IsAncestorMetadata": true,
"Versions": []
},
"ExtraSearchProperties": [],
"FilterPanel": {
"NameGuid": "b0125fbd-3b91-4dbb-914a-689276216404",
"Name": "FilterPanel",
"Controls": [],
"IsAncestorMetadata": true,
"Versions": []
},
"Forms": [
{
"$type": "Sungero.Metadata.StandaloneFormMetadata, Sungero.Metadata",
"NameGuid": "3510c582-b3cb-4edf-b130-a3dc824e813a",
"Name": "Card",
"Controls": [
{
"$type": "Sungero.Metadata.ControlGroupMetadata, Sungero.Metadata",
"NameGuid": "f3309fb7-1f1a-4df1-8cb7-36a9bcfd6b26",
"Name": "Common",
"Versions": []
},
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "1aa63aaf-0f82-430f-8d31-39c480a4514d",
"Name": "NeedRestrictVisibility",
"ColumnNumber": 0,
"ColumnSpan": 1,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.BooleanEditorToBooleanBinder",
"ParentGuid": "f3309fb7-1f1a-4df1-8cb7-36a9bcfd6b26",
"PropertyGuid": "9b39835e-3f66-4bac-8531-f663db931d1a",
"RowNumber": 0,
"RowSpan": 1,
"Settings": [],
"Versions": []
},
{
"$type": "Sungero.Metadata.ControlGroupMetadata, Sungero.Metadata",
"NameGuid": "1eaf4780-6208-4d73-a7d2-1a3f05d3dcd1",
"Name": "UnrestrictedRecipients",
"GroupType": "WithTitleNoBorder",
"Versions": []
},
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "5cd7468f-f371-4de2-b01a-0b3bc092c7a7",
"Name": "UnrestrictedRecipients",
"ColumnNumber": 0,
"ColumnSpan": 1,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.GridControlToChildCollectionBinder",
"HeaderLocation": "None",
"ParentGuid": "1eaf4780-6208-4d73-a7d2-1a3f05d3dcd1",
"PropertyGuid": "16a12b53-382b-4dc9-9200-5e726d2c06c5",
"RowNumber": 0,
"RowSpan": 1,
"Settings": [
{
"Name": "NeedExpand",
"Value": true
},
{
"Name": "Height",
"Value": 150
}
],
"Versions": []
},
{
"$type": "Sungero.Metadata.LabelControlMetadata, Sungero.Metadata",
"NameGuid": "ba82f999-fa02-48dd-aafb-2f87637371c3",
"Name": "Property",
"ColumnNumber": 0,
"ColumnSpan": 1,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.LabelToTextSourceBinder",
"HeaderLocation": "None",
"ParentGuid": "f3309fb7-1f1a-4df1-8cb7-36a9bcfd6b26",
"PropertyGuid": "c2c62721-cfd8-4287-97d2-8babc38e5998",
"RowNumber": 1,
"RowSpan": 1,
"Settings": [
{
"Name": "Height",
"Value": 150
}
],
"Versions": []
},
{
"$type": "Sungero.Metadata.ControlGroupMetadata, Sungero.Metadata",
"NameGuid": "ebd477eb-a91c-4017-80bc-96a48f2f095b",
"Name": "HiddenRecipients",
"GroupType": "WithTitleNoBorder",
"Versions": []
},
{
"$type": "Sungero.Metadata.ControlMetadata, Sungero.Metadata",
"NameGuid": "566a8689-6d3c-4300-a180-88b1e510059c",
"Name": "HiddenRecipients",
"ColumnNumber": 0,
"ColumnSpan": 1,
"DataBinderTypeName": "Sungero.Presentation.CommonDataBinders.MultiLikeEditorToCollectionBinder",
"HeaderLocation": "None",
"ParentGuid": "ebd477eb-a91c-4017-80bc-96a48f2f095b",
"PropertyGuid": "01212dea-05a4-4faf-be1d-450623867886",
"RowNumber": 0,
"RowSpan": 1,
"Settings": [
{
"Name": "NavigationPropertyGuid",
"Value": "f68f91c5-8ffa-463a-b919-2496eb70531e"
},
{
"Name": "IsDuplicatesAllowed",
"Value": false
}
],
"Versions": []
}
],
"Versions": []
}
],
"HandledEvents": [
"CreatedServer",
"RefreshClient",
"BeforeDeleteServer"
],
"IconResourcesKeys": [],
"IsAutoCreated": true,
"IsVisible": false,
"OperationsClass": "",
"Overridden": [
"IsAutoCreated",
"IsVisible",
"IsCacheable",
"CanBeUsedInIntegration"
],
"Properties": [
{
"$type": "Sungero.Metadata.StringPropertyMetadata, Sungero.Metadata",
"NameGuid": "57cae29b-7b1c-4b00-8531-9fb3347c698d",
"Name": "Name",
"Code": "Name",
"IsDisplayValue": true,
"IsQuickSearchAllowed": true,
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.StringEditorToStringBinder",
"PreviousPropertyGuid": "1dcedc29-5140-4770-ac92-eabc212326a1",
"Versions": []
},
{
"$type": "Sungero.Metadata.BooleanPropertyMetadata, Sungero.Metadata",
"NameGuid": "9b39835e-3f66-4bac-8531-f663db931d1a",
"Name": "NeedRestrictVisibility",
"Code": "RestrictVisib",
"HandledEvents": [
"ChangedShared",
"ValueInputClient"
],
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.BooleanEditorToBooleanBinder",
"PreviousPropertyGuid": "57cae29b-7b1c-4b00-8531-9fb3347c698d",
"Versions": []
},
{
"$type": "Sungero.Metadata.CollectionPropertyMetadata, Sungero.Metadata",
"NameGuid": "16a12b53-382b-4dc9-9200-5e726d2c06c5",
"Name": "UnrestrictedRecipients",
"Code": "VSUnrestricted",
"EntityGuid": "1bb06c07-eafe-4248-ac43-a0daaa30dd8c",
"IsShowedInList": false,
"PreviousPropertyGuid": "9b39835e-3f66-4bac-8531-f663db931d1a",
"Versions": []
},
{
"$type": "Sungero.Metadata.TextPropertyMetadata, Sungero.Metadata",
"NameGuid": "c2c62721-cfd8-4287-97d2-8babc38e5998",
"Name": "NeedRestrictVisibilityDescription",
"CanBeSearch": false,
"Code": "RestrictDesc",
"IsEnabled": false,
"IsShowedInList": false,
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.StringEditorToTextBinder",
"PreviousPropertyGuid": "16a12b53-382b-4dc9-9200-5e726d2c06c5",
"Versions": []
},
{
"$type": "Sungero.Metadata.CollectionPropertyMetadata, Sungero.Metadata",
"NameGuid": "01212dea-05a4-4faf-be1d-450623867886",
"Name": "HiddenRecipients",
"Code": "VSHidden",
"EntityGuid": "e3186c22-e557-43ae-aa99-87dd89dcc1b0",
"IsShowedInList": false,
"PreviousPropertyGuid": "c2c62721-cfd8-4287-97d2-8babc38e5998",
"Versions": []
}
],
"PublicStructures": [],
"ResourcesKeys": [
"NeedRestrictVisibilityDescription",
"OnlyWebWarning"
],
"RibbonCardMetadata": {
"NameGuid": "9dba14b1-1ac2-401d-9a80-df5d49de1c75",
"Name": "RibbonCard",
"Categories": [],
"Elements": [
{
"$type": "Sungero.Metadata.RibbonActionButtonMetadata, Sungero.Metadata",
"NameGuid": "211a539e-80f7-4ff8-a13e-855957ff6e68",
"Name": "DeleteEntity",
"ActionGuid": "18cdb157-e89a-488b-8cea-bce6a63d0a13",
"Index": 40,
"IsAncestorMetadata": true,
"IsVisible": false,
"Overridden": [
"IsVisible"
],
"ParentGuid": "f3b0ddcd-9d1e-4ca3-8780-695ae25a9e8b",
"Versions": []
}
],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"RibbonKind": "Card",
"Versions": []
},
"RibbonCollectionMetadata": {
"NameGuid": "e398d5d4-7864-4c93-8731-a86090c3634f",
"Name": "RibbonCollection",
"Categories": [],
"Elements": [
{
"$type": "Sungero.Metadata.RibbonActionButtonMetadata, Sungero.Metadata",
"NameGuid": "36d11e82-ebe8-488c-8e3c-f81ee5469773",
"Name": "DeleteEntity",
"ActionGuid": "18cdb157-e89a-488b-8cea-bce6a63d0a13",
"Index": 40,
"IsAncestorMetadata": true,
"IsVisible": false,
"Overridden": [
"IsVisible"
],
"ParentGuid": "b88b0a3a-c1ca-4f7f-80a0-336cd61c9c94",
"Versions": []
}
],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"Versions": []
},
"Versions": [
{
"Type": "EntityMetadata",
"Number": 11
}
]
}
\ No newline at end of file
{
"$type": "Sungero.Metadata.EntityMetadata, Sungero.Metadata",
"NameGuid": "e3186c22-e557-43ae-aa99-87dd89dcc1b0",
"Name": "VisibilitySettingHiddenRecipients",
"AccessRightsMode": "NoRight",
"BaseGuid": "a3d38bf5-0414-41f6-bb33-a4621d2e5a60",
"CanBeNavigationPropertyType": true,
"Code": "VSHidden",
"ExtraSearchProperties": [],
"IsChildEntity": true,
"Properties": [
{
"$type": "Sungero.Metadata.NavigationPropertyMetadata, Sungero.Metadata",
"NameGuid": "11504fe0-0972-47d6-8fd6-842a74e73e98",
"Name": "VisibilitySetting",
"CanBeSearch": false,
"Code": "VisibSetting",
"EntityGuid": "435ba4a4-ee0a-4c43-b334-c243257f400f",
"IsReferenceToRootEntity": true,
"IsShowedInList": false,
"Versions": []
},
{
"$type": "Sungero.Metadata.NavigationPropertyMetadata, Sungero.Metadata",
"NameGuid": "f68f91c5-8ffa-463a-b919-2496eb70531e",
"Name": "Recipient",
"CanBeSearch": false,
"Code": "Recipient",
"EntityGuid": "b7905516-2be5-4931-961c-cb38d5677565",
"HandledEvents": [
"LookupServer"
],
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.DropDownEditorToNavigationBinder",
"PreviousPropertyGuid": "11504fe0-0972-47d6-8fd6-842a74e73e98",
"Versions": []
}
],
"PublicStructures": [],
"RibbonCardMetadata": {
"NameGuid": "d327510d-2003-42e6-a676-20f09f0471bd",
"Name": "RibbonCard",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"RibbonKind": "Card",
"Versions": []
},
"RibbonCollectionMetadata": {
"NameGuid": "e40164fc-fad1-4723-a9cc-be8f9e6e712d",
"Name": "RibbonCollection",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"Versions": []
},
"Versions": [
{
"Type": "EntityMetadata",
"Number": 11
}
]
}
\ No newline at end of file
{
"$type": "Sungero.Metadata.EntityMetadata, Sungero.Metadata",
"NameGuid": "1bb06c07-eafe-4248-ac43-a0daaa30dd8c",
"Name": "VisibilitySettingUnrestrictedRecipients",
"AccessRightsMode": "NoRight",
"BaseGuid": "a3d38bf5-0414-41f6-bb33-a4621d2e5a60",
"CanBeNavigationPropertyType": true,
"Code": "VSUnrestricted",
"ExtraSearchProperties": [],
"IsChildEntity": true,
"Properties": [
{
"$type": "Sungero.Metadata.NavigationPropertyMetadata, Sungero.Metadata",
"NameGuid": "342ccb51-a463-48b4-98fd-fafc9049943c",
"Name": "VisibilitySetting",
"CanBeSearch": false,
"Code": "VisibSetting",
"EntityGuid": "435ba4a4-ee0a-4c43-b334-c243257f400f",
"IsReferenceToRootEntity": true,
"IsShowedInList": false,
"Versions": []
},
{
"$type": "Sungero.Metadata.NavigationPropertyMetadata, Sungero.Metadata",
"NameGuid": "c43143d3-79d4-4a11-bce1-096e3b21399e",
"Name": "Recipient",
"CanBeSearch": false,
"Code": "Recipient",
"EntityGuid": "c612fc41-44a3-428b-a97c-433c333d78e9",
"HandledEvents": [
"LookupServer"
],
"IsRequired": true,
"ListDataBinderTypeName": "Sungero.Presentation.CommonDataBinders.DropDownEditorToNavigationBinder",
"PreviousPropertyGuid": "342ccb51-a463-48b4-98fd-fafc9049943c",
"Versions": []
}
],
"PublicStructures": [],
"RibbonCardMetadata": {
"NameGuid": "b57009b4-d618-4186-a1d9-1a2951b5dca9",
"Name": "RibbonCard",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"RibbonKind": "Card",
"Versions": []
},
"RibbonCollectionMetadata": {
"NameGuid": "845979d3-a97a-4c9e-b4a1-0c3cfa48b0f9",
"Name": "RibbonCollection",
"Categories": [],
"Elements": [],
"Groups": [],
"IsAncestorMetadata": true,
"Pages": [],
"Versions": []
},
"Versions": [
{
"Type": "EntityMetadata",
"Number": 11
}
]
}
\ No newline at end of file
--Справочник Ассистенты руководителей. Заполнение свойства "Отправляет поручения от имени руководителя" значением по умолчанию.
update sungero_company_assistant
set sendactionitem = isassistant
where sendactionitem is null;
\ No newline at end of file
......@@ -19,43 +19,79 @@ namespace Sungero.Contracts.Server
Logger.DebugFormat("ApprovalIncInvoicePaidStage. Start change incoming invoice state stage, approval task (ID={0}) (StartId={1}) (Iteration={2}) (StageNumber={3}).",
approvalTask.Id, approvalTask.StartId, approvalTask.Iteration, approvalTask.StageNumber);
var document = approvalTask.DocumentGroup.OfficialDocuments.SingleOrDefault();
if (document == null)
var mainDocument = approvalTask.DocumentGroup.OfficialDocuments.SingleOrDefault();
if (mainDocument == null)
{
Logger.ErrorFormat("ApprovalIncInvoicePaidStage. Primary document not found. Approval task (ID={0}) (StartId={1}) (Iteration={2}) (StageNumber={3}).",
approvalTask.Id, approvalTask.StartId, approvalTask.Iteration, approvalTask.StageNumber);
return this.GetErrorResult(Docflow.Resources.PrimaryDocumentNotFoundError);
}
if (Locks.GetLockInfo(document).IsLockedByOther)
var invoices = this.GetIncomingInvoicesToSetPaid(approvalTask);
if (!invoices.Any())
{
Logger.DebugFormat("ApprovalIncInvoicePaidStage. Document locked. Approval task (ID={0}), Document (ID={1}), Locked By ({2}).",
approvalTask.Id, document.Id, Locks.GetLockInfo(document).OwnerName);
return this.GetRetryResult(string.Empty);
Logger.DebugFormat("ApprovalIncInvoicePaidStage. Incoming invoices not found, no need to change state. Approval task (ID={0}).", approvalTask.Id);
return this.GetSuccessResult();
}
try
var needRetry = false;
foreach (var invoice in invoices)
{
if (!Sungero.Contracts.IncomingInvoices.Is(document))
var lockInfo = Locks.GetLockInfo(invoice);
if (!lockInfo.IsLockedByOther)
{
try
{
Sungero.Contracts.Functions.IncomingInvoice.SetLifeCycleStateToPaid(invoice);
invoice.Save();
Logger.DebugFormat("ApprovalIncInvoicePaidStage. Set incoming invoice state to Paid. Approval task (ID={0}), Document (ID={1}), State = Paid.",
approvalTask.Id, invoice.Id);
}
catch (Exception ex)
{
needRetry = true;
Logger.ErrorFormat("ApprovalIncInvoicePaidStage. Set incoming invoice state error. Approval task (ID={0}) (Iteration={1}) (StageNumber={2}) for document (ID={3})",
ex, approvalTask.StartId, approvalTask.Iteration, approvalTask.StageNumber, invoice.Id);
}
}
else
{
Logger.DebugFormat("ApprovalIncInvoicePaidStage. Document is not incoming invoice, no need to change state. Approval task (ID={0}), Document (ID={1}).",
approvalTask.Id, document.Id);
return this.GetSuccessResult();
needRetry = true;
Logger.DebugFormat("ApprovalIncInvoicePaidStage. Document locked. Approval task (ID={0}), Document (ID={1}), Locked By (LoginId={2}).",
approvalTask.Id, invoice.Id, lockInfo.LoginId);
}
Logger.DebugFormat("ApprovalIncInvoicePaidStage. Set incoming invoice state to Paid. Approval task (ID={0}), Document (ID={1}), State = Paid.", approvalTask.Id, document.Id);
var invoice = Sungero.Contracts.IncomingInvoices.As(document);
Sungero.Contracts.Functions.IncomingInvoice.SetLifeCycleStateToPaid(invoice);
invoice.Save();
}
catch (Exception ex)
{
Logger.ErrorFormat("ApprovalIncInvoicePaidStage. Set incoming invoice state error. Approval task (ID={0}) (Iteration={1}) (StageNumber={2}) for document (ID={3})",
ex, approvalTask.StartId, approvalTask.Iteration, approvalTask.StageNumber, document.Id);
if (needRetry)
return this.GetRetryResult(string.Empty);
}
return this.GetSuccessResult();
}
/// <summary>
/// Получить входящие счета для установки статуса "Оплачено".
/// </summary>
/// <param name="approvalTask">Задача на согласование по регламенту.</param>
/// <returns>Список входящих счетов.</returns>
/// <remarks>Получает основной документ задачи на согласование, если это входящий счет.
/// Получает все входящие счета из группы "Приложения", но только со статусом "Принят к оплате".
/// Счета из группы "Дополнительно" игнорируются.</remarks>
[Public]
public virtual List<IIncomingInvoice> GetIncomingInvoicesToSetPaid(Sungero.Docflow.IApprovalTask approvalTask)
{
var result = new List<IIncomingInvoice>();
var mainDocument = approvalTask.DocumentGroup.OfficialDocuments.SingleOrDefault();
if (mainDocument != null && IncomingInvoices.Is(mainDocument))
result.Add(IncomingInvoices.As(mainDocument));
var addendaInvoices = approvalTask.AddendaGroup.OfficialDocuments
.Where(x => IncomingInvoices.Is(x) && x.LifeCycleState == Sungero.Contracts.IncomingInvoice.LifeCycleState.Active)
.Select(x => IncomingInvoices.As(x));
result.AddRange(addendaInvoices);
return result;
}
}
}
\ No newline at end of file
......
......@@ -116,10 +116,15 @@ namespace Sungero.Contracts.Server
documentBlock.AddLineBreak();
// Сумма договора.
var amount = this.GetTotalAmountDocumentSummary(_obj.TotalAmount, _obj.Currency);
var amount = this.GetTotalAmountDocumentSummary(_obj.TotalAmount);
var amountText = string.Format("{0}: {1}", _obj.Info.Properties.TotalAmount.LocalizedName, amount);
documentBlock.AddLabel(amountText);
documentBlock.AddLineBreak();
// Валюта.
var currencyText = string.Format("{0}: {1}", _obj.Info.Properties.Currency.LocalizedName, _obj.Currency);
documentBlock.AddLabel(currencyText);
documentBlock.AddLineBreak();
// Срок действия договора.
var validity = "-";
......
......@@ -59,7 +59,10 @@ namespace Sungero.Contracts
// Выдать ответственному права на изменение документа.
var responsible = _obj.ResponsibleEmployee;
if (responsible != null && !Equals(_obj.State.Properties.ResponsibleEmployee.OriginalValue, responsible) &&
!Equals(responsible, Sungero.Company.Employees.Current))
!Equals(responsible, Sungero.Company.Employees.Current) &&
!_obj.AccessRights.IsGrantedDirectly(DefaultAccessRightsTypes.Change, responsible) &&
!_obj.AccessRights.IsGrantedDirectly(DefaultAccessRightsTypes.FullAccess, responsible) &&
_obj.AccessRights.StrictMode != AccessRightsStrictMode.Enhanced)
_obj.AccessRights.Grant(responsible, DefaultAccessRightsTypes.Change);
}
}
......
......@@ -12,7 +12,7 @@ namespace Sungero.Contracts
public override void ConvertingFrom(Sungero.Domain.ConvertingFromEventArgs e)
{
base.ConvertingFrom(e);
base.ConvertingFrom(e);
if (Sungero.Docflow.AccountingDocumentBases.Is(_source))
{
......@@ -34,6 +34,16 @@ namespace Sungero.Contracts
// Исключаем проброс LeadingDocument, так как в счете должно заполняться поле Contract.
e.Without(Sungero.Docflow.OfficialDocuments.Info.Properties.LeadingDocument);
// При смене типа с вх. документа эл. обмена, а также с финансовых и договорных документов
// дополнить примечание информацией об основании подписания со стороны контрагента.
var sourceOfficialDocument = Sungero.Docflow.OfficialDocuments.As(_source);
if (sourceOfficialDocument != null)
{
var note = Sungero.Docflow.PublicFunctions.OfficialDocument.GetNoteWithCounterpartySigningReason(sourceOfficialDocument);
e.Map(_info.Properties.Note, note);
}
}
}
......@@ -73,6 +83,9 @@ namespace Sungero.Contracts
e.Write(operation, operationDetailed, comment);
}
var documentParams = ((Domain.Shared.IExtendedEntity)_obj).Params;
if (isCreateAction && documentParams.ContainsKey(Docflow.PublicConstants.OfficialDocument.AddHistoryCommentRepackingAddNewDocument))
e.Comment = Sungero.Docflow.OfficialDocuments.Resources.DocumentCreateFromRepacking;
}
}
......
......@@ -91,10 +91,15 @@ namespace Sungero.Contracts.Server
block.AddLineBreak();
// Сумма.
var amount = this.GetTotalAmountDocumentSummary(_obj.TotalAmount, _obj.Currency);
var amount = this.GetTotalAmountDocumentSummary(_obj.TotalAmount);
var amountText = string.Format("{0}: {1}", _obj.Info.Properties.TotalAmount.LocalizedName, amount);
block.AddLabel(amountText);
block.AddLineBreak();
// Валюта.
var currencyText = string.Format("{0}: {1}", _obj.Info.Properties.Currency.LocalizedName, _obj.Currency);
block.AddLabel(currencyText);
block.AddLineBreak();
// Оплатить до.
var paymentDeadline = _obj.PaymentDueDate.HasValue ? _obj.PaymentDueDate.Value.ToString("d") : "-";
......@@ -133,5 +138,10 @@ namespace Sungero.Contracts.Server
Logger.DebugFormat("Update LifeCycleState for document {0}. Current state: {1}, new state: Paid.", _obj.Id, _obj.LifeCycleState);
_obj.LifeCycleState = Sungero.Contracts.IncomingInvoice.LifeCycleState.Paid;
}
public override string GetNoteWithCounterpartySigningReason()
{
return _obj.Note;
}
}
}
\ No newline at end of file
......
......@@ -80,6 +80,31 @@ namespace Sungero.Contracts.Server
}
/// <summary>
/// Получить правила согласования по умолчанию для доп. соглашения.
/// </summary>
/// <returns>Правила согласования по умолчанию.</returns>
/// <remarks>Если подходящих правил нет или их несколько, то вернется null.</remarks>
[Remote, Public]
public override IApprovalRuleBase GetDefaultApprovalRule()
{
var availableApprovalRules = this.GetApprovalRules();
if (availableApprovalRules.Count() == 1)
return availableApprovalRules.First();
if (availableApprovalRules.Any())
{
var supAgreementKinds = Docflow.PublicFunctions.DocumentKind.GetAvailableDocumentKinds(typeof(ISupAgreement)).ToList();
var supAgreementRules = availableApprovalRules.Where(r => r.DocumentKinds.Any(k => supAgreementKinds.Contains(k.DocumentKind)));
var approvalRules = supAgreementRules.Any() ? supAgreementRules : availableApprovalRules;
var maxPriopity = approvalRules.Select(a => a.Priority).OrderByDescending(a => a).FirstOrDefault();
var defaultApprovalRule = approvalRules.Where(a => Equals(a.Priority, maxPriopity));
if (defaultApprovalRule.Count() == 1)
return defaultApprovalRule.First();
}
return null;
}
/// <summary>
/// Сводка по документу.
/// </summary>
/// <returns>Сводка.</returns>
......@@ -132,12 +157,17 @@ namespace Sungero.Contracts.Server
var subject = !string.IsNullOrEmpty(_obj.Subject) ? _obj.Subject : "-";
block.AddLabel(string.Format("{0}: {1}", _obj.Info.Properties.Subject.LocalizedName, subject));
block.AddLineBreak();
// Сумма.
var amount = this.GetTotalAmountDocumentSummary(_obj.TotalAmount, _obj.Currency);
var amount = this.GetTotalAmountDocumentSummary(_obj.TotalAmount);
var amountText = string.Format("{0}: {1}", _obj.Info.Properties.TotalAmount.LocalizedName, amount);
block.AddLabel(amountText);
block.AddLineBreak();
// Валюта.
var currencyText = string.Format("{0}: {1}", _obj.Info.Properties.Currency.LocalizedName, _obj.Currency);
block.AddLabel(currencyText);
block.AddLineBreak();
// Срок действия.
var validity = "-";
......
{
"NameGuid": "f9d15b1c-2784-4c84-8348-1e162d70b988"
}
\ No newline at end of file
......@@ -19,6 +19,25 @@
},
"IconResourcesKeys": [],
"OperationsClass": "",
"PublicFunctions": [
{
"Name": "GetIncomingInvoicesToSetPaid",
"Parameters": [
{
"Name": "approvalIncInvoicePaidStage",
"ParameterType": "global::Sungero.Contracts.IApprovalIncInvoicePaidStage",
"ParameterTypeFullName": "Sungero.Contracts.IApprovalIncInvoicePaidStage, Sungero.Domain.Interfaces"
},
{
"Name": "approvalTask",
"ParameterType": "global::Sungero.Docflow.IApprovalTask",
"ParameterTypeFullName": "Sungero.Docflow.IApprovalTask, Sungero.Domain.Interfaces"
}
],
"ReturnType": "global::System.Collections.Generic.List<global::Sungero.Contracts.IIncomingInvoice>",
"ReturnTypeFullName": "System.Collections.Generic.List"
}
],
"PublicStructures": [],
"ResourcesKeys": [
"SetPaidStateStageDefaultName"
......
......@@ -185,6 +185,14 @@
"Value": "\"FinancialDocuments\""
},
{
"Name": "ContractGuid",
"ParentClasses": [
"Module"
],
"TypeName": "System.String",
"Value": "\"f37c7e63-b134-4446-9b5b-f8811f6c9666\""
},
{
"Name": "ContractKind",
"ParentClasses": [
"Module",
......@@ -229,6 +237,14 @@
"Value": "new System.Guid(\"C89D7196-FCBB-4D11-BEC8-5696C824DC5A\")"
},
{
"Name": "SupAgreementGuid",
"ParentClasses": [
"Module"
],
"TypeName": "System.String",
"Value": "\"265f2c57-6a8a-4a15-833b-ca00e8047fa5\""
},
{
"Name": "SupAgreementKind",
"ParentClasses": [
"Module",
......@@ -400,7 +416,7 @@
"SharedAssemblyName": "Sungero.Contracts.Shared",
"SharedNamespace": "Sungero.Contracts.Shared",
"SpecialFolders": [],
"Version": "4.4.57.0",
"Version": "4.6.38.0",
"Widgets": [],
"Versions": [
{
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.