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.

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