|
@@ -6,6 +6,7 @@ using Hotline.Identity.Roles;
|
|
using Hotline.Orders;
|
|
using Hotline.Orders;
|
|
using Hotline.Realtimes;
|
|
using Hotline.Realtimes;
|
|
using Hotline.Repository.SqlSugar;
|
|
using Hotline.Repository.SqlSugar;
|
|
|
|
+using Hotline.Settings.TimeLimits;
|
|
using Hotline.Share.Dtos.Realtime;
|
|
using Hotline.Share.Dtos.Realtime;
|
|
using Hotline.Share.Dtos.Settings;
|
|
using Hotline.Share.Dtos.Settings;
|
|
using Hotline.Share.Enums.Settings;
|
|
using Hotline.Share.Enums.Settings;
|
|
@@ -57,6 +58,8 @@ public class TestController : BaseController
|
|
private readonly IOrderUrgeRepository _orderUrgeRepository;
|
|
private readonly IOrderUrgeRepository _orderUrgeRepository;
|
|
private readonly IGroupManager _goupManager;
|
|
private readonly IGroupManager _goupManager;
|
|
|
|
|
|
|
|
+ private readonly ITimeLimitDomainService _timeLimitDomainService;
|
|
|
|
+
|
|
//private readonly ITypedCache<List<User>> _cache;
|
|
//private readonly ITypedCache<List<User>> _cache;
|
|
//private readonly ICacheManager<User> _cache;
|
|
//private readonly ICacheManager<User> _cache;
|
|
|
|
|
|
@@ -81,7 +84,8 @@ public class TestController : BaseController
|
|
IDistributedLock distributedLock,
|
|
IDistributedLock distributedLock,
|
|
IWexClient wexClient,
|
|
IWexClient wexClient,
|
|
ISugarUnitOfWork<WexDbContext> uowWex,
|
|
ISugarUnitOfWork<WexDbContext> uowWex,
|
|
- IOrderUrgeRepository orderUrgeRepository
|
|
|
|
|
|
+ IOrderUrgeRepository orderUrgeRepository,
|
|
|
|
+ ITimeLimitDomainService timeLimitDomainService
|
|
)
|
|
)
|
|
{
|
|
{
|
|
_logger = logger;
|
|
_logger = logger;
|
|
@@ -101,6 +105,7 @@ public class TestController : BaseController
|
|
_wexClient = wexClient;
|
|
_wexClient = wexClient;
|
|
_uowWex = uowWex;
|
|
_uowWex = uowWex;
|
|
_orderUrgeRepository = orderUrgeRepository;
|
|
_orderUrgeRepository = orderUrgeRepository;
|
|
|
|
+ _timeLimitDomainService = timeLimitDomainService;
|
|
}
|
|
}
|
|
|
|
|
|
[HttpGet("time")]
|
|
[HttpGet("time")]
|
|
@@ -125,6 +130,9 @@ public class TestController : BaseController
|
|
//var a = _uowWex.Db.Ado.ExecuteCommand("update telinfo set IsSynch=1 where GUID=@CallId", new { CallId = "b1f97f3c-88b6-4f42-b8de-83ed448854b0" });
|
|
//var a = _uowWex.Db.Ado.ExecuteCommand("update telinfo set IsSynch=1 where GUID=@CallId", new { CallId = "b1f97f3c-88b6-4f42-b8de-83ed448854b0" });
|
|
//var rsp = await _wexClient.QueryTelsAsync(new QueryTelRequest { }, HttpContext.RequestAborted);
|
|
//var rsp = await _wexClient.QueryTelsAsync(new QueryTelRequest { }, HttpContext.RequestAborted);
|
|
|
|
|
|
|
|
+ int a = _timeLimitDomainService.CalcWorkTime(DateTime.Now, DateTime.Parse("2023-09-11 16:21:00"));
|
|
|
|
+
|
|
|
|
+
|
|
return OpenResponse.Ok(DateTime.Now.ToString("F"));
|
|
return OpenResponse.Ok(DateTime.Now.ToString("F"));
|
|
|
|
|
|
//var rsp = await _daprClient.InvokeMethodAsync<ApiResponse<string>>(HttpMethod.Get, "identity", "api/v1/Test/time", HttpContext.RequestAborted);
|
|
//var rsp = await _daprClient.InvokeMethodAsync<ApiResponse<string>>(HttpMethod.Get, "identity", "api/v1/Test/time", HttpContext.RequestAborted);
|
|
@@ -171,20 +179,7 @@ public class TestController : BaseController
|
|
return a;
|
|
return a;
|
|
}
|
|
}
|
|
|
|
|
|
- [AllowAnonymous]
|
|
|
|
- [HttpGet("testtime")]
|
|
|
|
- public async Task<TimeResult> TestTime(DateTime beginTime, ETimeType timeType, int timeValue)
|
|
|
|
- {
|
|
|
|
- return _timeLimitApplication.CalcEndTime(beginTime, timeType, timeValue);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- [AllowAnonymous]
|
|
|
|
- [HttpGet("timeend")]
|
|
|
|
- public async Task<DateTime> GetWorkDayEnd(DateTime date, int days)
|
|
|
|
- {
|
|
|
|
- return _timeLimitApplication.GetEndDateWork(date, days);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
//[AllowAnonymous]
|
|
//[AllowAnonymous]
|
|
[HttpGet("hash")]
|
|
[HttpGet("hash")]
|