9 changed files with 82 additions and 35 deletions
@ -0,0 +1,44 @@
|
||||
namespace AX.WebDrillServer.Services.FireDeductionHub |
||||
{ |
||||
public class Drill |
||||
{ |
||||
public string Id { get; set; } = null!; |
||||
public string RoomId { get; set; } = null!; |
||||
public DrillState DrillState { get; set; } |
||||
/// <summary> |
||||
/// 演练名称 |
||||
/// </summary> |
||||
public string? DrillName { get; set; } |
||||
public long StartTime { get; set; } |
||||
|
||||
public long EndTime { get; set; } = 0; |
||||
|
||||
public List<FireDeductionUser> Users { get; set; } = new List<FireDeductionUser>(); |
||||
|
||||
public List<RoomSendInfo> Infos = new List<RoomSendInfo>(); |
||||
|
||||
/// <summary> |
||||
/// 获取推演时间,如果传入时间表示获取传入时间到开始时间的时间 |
||||
/// </summary> |
||||
/// <param name="time">毫秒</param> |
||||
/// <returns></returns> |
||||
public long GetDrillLastTime(long time = -1) |
||||
{ |
||||
if (EndTime != 0)//已经结束 |
||||
{ |
||||
return (EndTime - StartTime) / 10000; |
||||
} |
||||
else |
||||
{ |
||||
if (time == -1) |
||||
{ |
||||
return (DateTime.Now.Ticks - StartTime) / 10000; |
||||
} |
||||
else |
||||
{ |
||||
return (time - StartTime) / 10000; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue