Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd22e1fb

Browse files
committed
Updated documentation to match current state for 0.20 release. Added Id to map markers, updated unit app payload call to return call types, added notes api controller call for getting unexpires and started notes, added call and call priorities api call to get by department id. Added stub eventing hub to update when department info changes (not yet implemented)
1 parentca7ea05 commitd22e1fb

File tree

27 files changed

+520
-65
lines changed

27 files changed

+520
-65
lines changed

‎Core/Resgrid.Config/DataConfig.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
publicclassDataConfig
44
{
5-
publicstaticstringConnectionString="Data Source=(local);Initial Catalog=Resgrid;Integrated Security=True;MultipleActiveResultSets=True;";
5+
publicstaticstringConnectionString="Server=rgdevserver;Database=Resgrid;User Id=resgrid_app;Password=resgrid123;MultipleActiveResultSets=True;";
66

77
publicconststringUsersIdentityRoleId="38b461d7-e848-46ef-8c06-ece5b618d9d1";
88
publicconststringAdminsIdentityRoleId="1f6a03a8-62f4-4179-80fc-2eb96266cf04";

‎Core/Resgrid.Config/ResgridConfig.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"InfoConfig.ConfigVersion":"1",
33

4-
"DataConfig.ConnectionString":"Data Source=(local);Initial Catalog=Resgrid;Integrated Security=True;MultipleActiveResultSets=True;",
4+
"DataConfig.ConnectionString":"Server=rgdevserver;Database=Resgrid;User Id=resgrid_app;Password=resgrid123;MultipleActiveResultSets=True;",
55

66
"SystemBehaviorConfig.ResgridBaseUrl":"http://resgrid.local",
77
"SystemBehaviorConfig.ResgridApiBaseUrl":"http://resgridapi.local",
@@ -43,7 +43,7 @@
4343
"OutboundEmailServerConfig.PostmarkWelcomeTemplateId":"",
4444
"OutboundEmailServerConfig.PostmarkNewDepLinkTemplateId":"",
4545

46-
"WorkerConfig.WorkerDbConnectionString":"Data Source=(local);Initial Catalog=ResgridWorkers;Integrated Security=True;MultipleActiveResultSets=True;",
46+
"WorkerConfig.WorkerDbConnectionString":"Server=rgdevserver;Database=ResgridWorkers;User Id=resgrid_app;Password=resgrid123;MultipleActiveResultSets=True;",
4747
"WorkerConfig.PayloadKey":"XsBYpdbdHkhuGsU3tvTMawyV6d3M2F8EQ8wQ2jVLBREECQmwngACk2hm4Ykb7eW7Qsm6za8RdJBY5Z3xvN6erYry47nJ5XmL",
4848

4949
"ServiceBusConfig.RabbitHostname":"localhost",

‎Web/Resgrid.Services/Controllers/Version3/BigBoardController.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ public BigBoardMapModel GetMap()
385385
foreach(varstationinstations)
386386
{
387387
MapMakerInfoinfo=newMapMakerInfo();
388+
info.Id=$"s{station.DepartmentGroupId}";
388389
info.ImagePath="Station";
389390
info.Title=station.Name;
390391
info.InfoWindowContent=station.Name;
@@ -417,6 +418,7 @@ public BigBoardMapModel GetMap()
417418
{
418419
MapMakerInfoinfo=newMapMakerInfo();
419420
info.ImagePath="Call";
421+
info.Id=$"c{call.CallId}";
420422
info.Title=call.Name;
421423
info.InfoWindowContent=call.NatureOfCall;
422424

@@ -451,6 +453,7 @@ public BigBoardMapModel GetMap()
451453
{
452454
MapMakerInfoinfo=newMapMakerInfo();
453455
info.ImagePath="Engine_Responding";
456+
info.Id=$"u{unit.UnitId}";
454457
info.Title=unit.Unit.Name;
455458
info.InfoWindowContent="";
456459
info.Latitude=double.Parse(unit.Latitude.Value.ToString());
@@ -492,6 +495,7 @@ public BigBoardMapModel GetMap()
492495
info.ImagePath="Person_RespondingCall";
493496
}
494497

498+
//info.Id = $"p{person.}";
495499
info.Title=person.Name;
496500
info.InfoWindowContent="";
497501
info.Latitude=double.Parse(person.Latitude.Value.ToString());

‎Web/Resgrid.Services/Controllers/Version3/CallPrioritiesController.cs‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,39 @@ public List<CallPriorityResult> GetAllCallPriorites()
7474
returnresult;
7575
}
7676

77+
/// <summary>
78+
/// Returns all the call priorities (including deleted ones) for a selected department
79+
/// </summary>
80+
/// <returns>Array of CallPriorityResult objects for each call priority in the department</returns>
81+
[System.Web.Http.AcceptVerbs("GET")]
82+
publicList<CallPriorityResult>GetAllCallPrioritesForDepartment(intdepartmentId)
83+
{
84+
varresult=newList<CallPriorityResult>();
85+
86+
if(departmentId!=DepartmentId&&!IsSystem)
87+
Unauthorized();
88+
89+
varpriorities=_callsService.GetCallPrioritesForDepartment(departmentId);
90+
91+
foreach(varpinpriorities)
92+
{
93+
varpriority=newCallPriorityResult();
94+
95+
priority.Id=p.DepartmentCallPriorityId;
96+
priority.DepartmentId=p.DepartmentId;
97+
priority.Name=StringHelpers.SanitizeHtmlInString(p.Name);
98+
priority.Color=p.Color;
99+
priority.Sort=p.Sort;
100+
priority.IsDeleted=p.IsDeleted;
101+
priority.IsDefault=p.IsDefault;
102+
priority.Tone=p.Tone;
103+
104+
result.Add(priority);
105+
}
106+
107+
returnresult;
108+
}
109+
77110
/// <summary>
78111
/// Return the audio file for push notifications for a specific call priority
79112
/// </summary>

‎Web/Resgrid.Services/Controllers/Version3/CallsController.cs‎

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,157 @@ public List<CallResult> GetActiveCalls()
141141
returnresult;
142142
}
143143

144+
/// <summary>
145+
/// Returns all the active calls for the department (extended object result, more verbose then GetActiveCalls)
146+
/// </summary>
147+
/// <returns>Array of DepartmentCallResult objects for each active call in the department</returns>
148+
[System.Web.Http.AcceptVerbs("GET")]
149+
publicList<DepartmentCallResult>GetActiveCallsForDepartment(intdepartmentId)
150+
{
151+
varresult=newList<DepartmentCallResult>();
152+
153+
if(departmentId!=DepartmentId&&!IsSystem)
154+
Unauthorized();
155+
156+
varcalls=_callsService.GetActiveCallsByDepartment(departmentId).OrderByDescending(x=>x.LoggedOn);
157+
vardepartment=_departmentsService.GetDepartmentById(departmentId,false);
158+
159+
foreach(varcincalls)
160+
{
161+
varcall=newDepartmentCallResult();
162+
163+
call.Name=StringHelpers.SanitizeHtmlInString(c.Name);
164+
165+
if(!String.IsNullOrWhiteSpace(c.NatureOfCall))
166+
call.NatureOfCall=StringHelpers.SanitizeHtmlInString(c.NatureOfCall);
167+
168+
if(!String.IsNullOrWhiteSpace(c.Notes))
169+
call.Notes=StringHelpers.SanitizeHtmlInString(c.Notes);
170+
171+
//if (c.CallNotes != null)
172+
//call.Nts = c.CallNotes.Count();
173+
//else
174+
//call.Nts = 0;
175+
176+
//if (c.Attachments != null)
177+
//{
178+
//call.Aud = c.Attachments.Count(x => x.CallAttachmentType == (int)CallAttachmentTypes.DispatchAudio);
179+
//call.Img = c.Attachments.Count(x => x.CallAttachmentType == (int)CallAttachmentTypes.Image);
180+
//call.Fls = c.Attachments.Count(x => x.CallAttachmentType == (int)CallAttachmentTypes.File);
181+
//}
182+
//else
183+
//{
184+
//call.Aud = 0;
185+
//call.Img = 0;
186+
//call.Fls = 0;
187+
//}
188+
189+
//if (String.IsNullOrWhiteSpace(c.Address) && !String.IsNullOrWhiteSpace(c.GeoLocationData))
190+
//{
191+
//var geo = c.GeoLocationData.Split(char.Parse(","));
192+
193+
//if (geo.Length == 2)
194+
//call.Add = _geoLocationProvider.GetAddressFromLatLong(double.Parse(geo[0]), double.Parse(geo[1]));
195+
//}
196+
//else
197+
//call.Address = c.Address;
198+
199+
call.LoggedOn=c.LoggedOn.TimeConverter(department);
200+
call.LoggedOnUtc=c.LoggedOn;
201+
call.CallId=c.CallId;
202+
call.Number=c.Number;
203+
call.DepartmentId=c.DepartmentId;
204+
call.ReportingUserId=c.ReportingUserId;
205+
call.Priority=c.Priority;
206+
call.IsCritical=c.IsCritical;
207+
call.Type=c.Type;
208+
call.IncidentNumber=c.IncidentNumber;
209+
call.MapPage=c.MapPage;
210+
call.CompletedNotes=c.CompletedNotes;
211+
call.Address=c.Address;
212+
call.GeoLocationData=c.GeoLocationData;
213+
call.ClosedByUserId=c.ClosedByUserId;
214+
call.ClosedOn=c.ClosedOn;
215+
call.State=c.State;
216+
call.IsDeleted=c.IsDeleted;
217+
call.CallSource=c.CallSource;
218+
call.DispatchCount=c.DispatchCount;
219+
call.LastDispatchedOn=c.LastDispatchedOn;
220+
call.SourceIdentifier=c.SourceIdentifier;
221+
call.ContactName=c.ContactName;
222+
call.ContactNumber=c.ContactNumber;
223+
call.Public=c.Public;
224+
call.ExternalIdentifier=c.ExternalIdentifier;
225+
call.ReferenceNumber=c.ReferenceNumber;
226+
227+
if(c.Dispatches!=null)
228+
{
229+
foreach(vardispatchinc.Dispatches)
230+
{
231+
vardispatchResult=newDepartmentCallDispatchResult();
232+
dispatchResult.CallDispatchId=dispatch.CallDispatchId;
233+
dispatchResult.CallId=dispatch.CallId;
234+
dispatchResult.UserId=dispatch.UserId;
235+
dispatchResult.GroupId=dispatch.GroupId;
236+
dispatchResult.DispatchCount=dispatch.DispatchCount;
237+
dispatchResult.LastDispatchedOn=dispatch.LastDispatchedOn;
238+
dispatchResult.ActionLogId=dispatch.ActionLogId;
239+
240+
call.Dispatches.Add(dispatchResult);
241+
}
242+
}
243+
244+
if(c.GroupDispatches!=null)
245+
{
246+
foreach(vardispatchinc.GroupDispatches)
247+
{
248+
vardispatchResult=newDepartmentCallDispatchGroupResult();
249+
dispatchResult.CallDispatchGroupId=dispatch.CallDispatchGroupId;
250+
dispatchResult.CallId=dispatch.CallId;
251+
dispatchResult.DepartmentGroupId=dispatch.DepartmentGroupId;
252+
dispatchResult.DispatchCount=dispatch.DispatchCount;
253+
dispatchResult.LastDispatchedOn=dispatch.LastDispatchedOn;
254+
255+
call.GroupDispatches.Add(dispatchResult);
256+
}
257+
}
258+
259+
if(c.UnitDispatches!=null)
260+
{
261+
foreach(vardispatchinc.UnitDispatches)
262+
{
263+
vardispatchResult=newDepartmentCallDispatchUnitResult();
264+
dispatchResult.CallDispatchUnitId=dispatch.CallDispatchUnitId;
265+
dispatchResult.CallId=dispatch.CallId;
266+
dispatchResult.UnitId=dispatch.UnitId;
267+
dispatchResult.DispatchCount=dispatch.DispatchCount;
268+
dispatchResult.LastDispatchedOn=dispatch.LastDispatchedOn;
269+
270+
call.UnitDispatches.Add(dispatchResult);
271+
}
272+
}
273+
274+
if(c.RoleDispatches!=null)
275+
{
276+
foreach(vardispatchinc.RoleDispatches)
277+
{
278+
vardispatchResult=newDepartmentCallDispatchRoleResult();
279+
dispatchResult.CallDispatchRoleId=dispatch.CallDispatchRoleId;
280+
dispatchResult.CallId=dispatch.CallId;
281+
dispatchResult.RoleId=dispatch.RoleId;
282+
dispatchResult.DispatchCount=dispatch.DispatchCount;
283+
dispatchResult.LastDispatchedOn=dispatch.LastDispatchedOn;
284+
285+
call.RoleDispatches.Add(dispatchResult);
286+
}
287+
}
288+
289+
result.Add(call);
290+
}
291+
292+
returnresult;
293+
}
294+
144295
/// <summary>
145296
/// Returns a specific call from the Resgrid System
146297
/// </summary>

‎Web/Resgrid.Services/Controllers/Version3/Models/BigBoard/MapMakerInfo.cs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ namespace Resgrid.Web.Services.Controllers.Version3.Models.BigBoard
77
{
88
publicclassMapMakerInfo
99
{
10+
publicstringId{get;set;}
1011
publicdoubleLongitude{get;set;}
1112
publicdoubleLatitude{get;set;}
1213
publicstringTitle{get;set;}
@@ -15,4 +16,4 @@ public class MapMakerInfo
1516
publicstringInfoWindowContent{get;set;}
1617
publicstringColor{get;set;}
1718
}
18-
}
19+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
usingSystem;
2+
3+
namespaceResgrid.Web.Services.Controllers.Version3.Models.Calls
4+
{
5+
publicclassDepartmentCallDispatchGroupResult
6+
{
7+
publicintCallDispatchGroupId{get;set;}
8+
publicintCallId{get;set;}
9+
publicintDepartmentGroupId{get;set;}
10+
publicintDispatchCount{get;set;}
11+
publicDateTime?LastDispatchedOn{get;set;}
12+
}
13+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
usingSystem;
2+
3+
namespaceResgrid.Web.Services.Controllers.Version3.Models.Calls
4+
{
5+
publicclassDepartmentCallDispatchResult
6+
{
7+
publicintCallDispatchId{get;set;}
8+
publicintCallId{get;set;}
9+
publicstringUserId{get;set;}
10+
publicint?GroupId{get;set;}
11+
publicintDispatchCount{get;set;}
12+
publicDateTime?LastDispatchedOn{get;set;}
13+
publicint?ActionLogId{get;set;}
14+
}
15+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
usingSystem;
2+
3+
namespaceResgrid.Web.Services.Controllers.Version3.Models.Calls
4+
{
5+
publicclassDepartmentCallDispatchRoleResult
6+
{
7+
publicintCallDispatchRoleId{get;set;}
8+
publicintCallId{get;set;}
9+
publicintRoleId{get;set;}
10+
publicintDispatchCount{get;set;}
11+
publicDateTime?LastDispatchedOn{get;set;}
12+
}
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
usingSystem;
2+
3+
namespaceResgrid.Web.Services.Controllers.Version3.Models.Calls
4+
{
5+
publicclassDepartmentCallDispatchUnitResult
6+
{
7+
publicintCallDispatchUnitId{get;set;}
8+
publicintCallId{get;set;}
9+
publicintUnitId{get;set;}
10+
publicintDispatchCount{get;set;}
11+
publicDateTime?LastDispatchedOn{get;set;}
12+
}
13+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp