diff --git a/Infrastructure/Helper/FileUtil.cs b/Infrastructure/Helper/FileUtil.cs index d9bbb0a..de8c701 100644 --- a/Infrastructure/Helper/FileUtil.cs +++ b/Infrastructure/Helper/FileUtil.cs @@ -16,16 +16,11 @@ namespace Infrastructure public static string GetdirPath(string path = "") { DateTime date = DateTime.Now; - int year = date.Year; - int month = date.Month; - int day = date.Day; - int hour = date.Hour; - - string timeDir = $"{year}{month}{day}/";// date.ToString("yyyyMM/dd/HH/"); + string timeDir = Path.Combine(date.ToString("yyyyMMdd"));// date.ToString("yyyyMM/dd/HH/"); if (!string.IsNullOrEmpty(path)) { - timeDir = $"{path}/{timeDir}/"; + timeDir = Path.Combine(path, timeDir); } return timeDir; } @@ -41,7 +36,7 @@ namespace Infrastructure { str = Guid.NewGuid().ToString(); } - MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider(); + MD5CryptoServiceProvider md5 = new(); return BitConverter.ToString(md5.ComputeHash(Encoding.Default.GetBytes(str)), 4, 8).Replace("-", ""); } } diff --git a/ZR.Admin.WebApi/Controllers/CommonController.cs b/ZR.Admin.WebApi/Controllers/CommonController.cs index e4120fd..ce579ef 100644 --- a/ZR.Admin.WebApi/Controllers/CommonController.cs +++ b/ZR.Admin.WebApi/Controllers/CommonController.cs @@ -9,6 +9,7 @@ using Microsoft.Extensions.Options; using Newtonsoft.Json; using Snowflake.Core; using System; +using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; diff --git a/ZR.Model/JsonDateConverter.cs b/ZR.Model/JsonDateConverter.cs deleted file mode 100644 index 70ca6c8..0000000 --- a/ZR.Model/JsonDateConverter.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Newtonsoft.Json.Converters; -using System; -using System.Collections.Generic; -using System.Text; - -namespace ZR.Model -{ - public class JsonDateConverter: IsoDateTimeConverter - { - public JsonDateConverter() - { - DateTimeFormat = "yyyy-MM-dd HH:mm:ss"; - } - } -} diff --git a/ZR.Tasks/TaskSchedulerServer.cs b/ZR.Tasks/TaskSchedulerServer.cs index 8570680..681c405 100644 --- a/ZR.Tasks/TaskSchedulerServer.cs +++ b/ZR.Tasks/TaskSchedulerServer.cs @@ -262,7 +262,7 @@ namespace ZR.Tasks List jobKeys = _scheduler.Result.GetJobKeys(GroupMatcher.GroupEquals(tasksQz.JobGroup)).Result.ToList(); if (jobKeys == null || jobKeys.Count == 0) { - return new ApiResult(110, $"未找到分组[{ tasksQz.JobGroup }]"); + await AddTaskScheduleAsync(tasksQz); } var triggers = await _scheduler.Result.GetTriggersOfJob(jobKey); diff --git a/ZR.Vue/src/components/FileUpload/index.vue b/ZR.Vue/src/components/FileUpload/index.vue index 6523b74..14d85de 100644 --- a/ZR.Vue/src/components/FileUpload/index.vue +++ b/ZR.Vue/src/components/FileUpload/index.vue @@ -1,11 +1,12 @@