tq 5 months ago
parent a1cee04561
commit 53e8aef593

@ -31,7 +31,7 @@ namespace Entity.Ammeter
/// <summary> /// <summary>
/// 时间 /// 时间
/// </summary> /// </summary>
[SugarColumn(ColumnName = "st")] [SugarColumn(ColumnName = "time")]
public string Time { get; set; } public string Time { get; set; }
/// <summary> /// <summary>
@ -44,5 +44,9 @@ namespace Entity.Ammeter
/// </summary> /// </summary>
[SugarColumn(ColumnName = "type")] [SugarColumn(ColumnName = "type")]
public int Type { get; set; } public int Type { get; set; }
[SugarColumn(ColumnName = "upload_flag")]
public int UploadFlag { get; set; }
} }
} }

@ -21,7 +21,7 @@ public class EmeterEnergy
/// 电表当前读数 /// 电表当前读数
/// </summary> /// </summary>
[SugarColumn(ColumnName = "value")] [SugarColumn(ColumnName = "value")]
public virtual string Value { get; set; } public virtual float Value { get; set; }
/// <summary> /// <summary>
/// 充电机上报时间 /// 充电机上报时间

@ -31,8 +31,8 @@ namespace Entity.Ammeter
/// <summary> /// <summary>
/// 时间 /// 时间
/// </summary> /// </summary>
[SugarColumn(ColumnName = "st")] [SugarColumn(ColumnName = "time")]
public float Time { get; set; } public string Time { get; set; }
/// <summary> /// <summary>
/// 实时值(取末端) /// 实时值(取末端)
@ -44,5 +44,8 @@ namespace Entity.Ammeter
/// </summary> /// </summary>
[SugarColumn(ColumnName = "type")] [SugarColumn(ColumnName = "type")]
public int Type { get; set; } public int Type { get; set; }
[SugarColumn(ColumnName = "upload_flag")]
public int UploadFlag { get; set; }
} }
} }

@ -45,6 +45,9 @@ namespace Entity.Ammeter
/// </summary> /// </summary>
[SugarColumn(ColumnName = "type")] [SugarColumn(ColumnName = "type")]
public int Type { get; set; } public int Type { get; set; }
[SugarColumn(ColumnName = "upload_flag")]
public int UploadFlag { get; set; }
} }

@ -0,0 +1,38 @@
using Entity.DbModel.Station;
using HybirdFrameworkCore.Entity;
namespace Entity.Dto.Req;
public class MoveBinRecordReq: BaseIdReq
{
}
public class PageMoveBinRecordReq : QueryPageModel
{
/// <summary>
/// in_bin_no
/// </summary>
public string? UpBinNo { get; set; }
/// <summary>
/// in_battery_no
/// </summary>
public string? UpBatteryNo { get; set; }
/// <summary>
/// in_battery_soc
/// </summary>
public string? UpBatterySoc { get; set; }
}
public class AddMoveBinRecordReq : MoveBinRecord
{
}
public class UpdateMoveBinRecordReq : AddMoveBinRecordReq
{
}
public class DeleteMoveBinRecordReq : BaseIdReq
{
}

@ -0,0 +1,103 @@
using Autofac;
using Entity.DbModel.Station;
using HybirdFrameworkCore.Autofac;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Job;
using log4net;
using Service.Init;
using Service.Station;
namespace Service.Job;
[Scope]
public class CountDayOrderJob : AbstractCronJob
{
private static readonly ILog Log = LogManager.GetLogger(typeof(CountDayOrderJob));
public readonly ChargeOrderService _ChargeOrderService=AppInfo.Container.Resolve<ChargeOrderService>();
public readonly SwapOrderService _SwapOrderService=AppInfo.Container.Resolve<SwapOrderService>();
public readonly ExStationDayRunResultService _ExStationDayRunResultService=AppInfo.Container.Resolve<ExStationDayRunResultService>();
protected override Task Handle()
{
// 获取 ChargeOrder 和 SwapOrder 列表
List<ChargeOrder> orders = _ChargeOrderService.DayChargeOrder();
List<SwapOrder> daySwapOrder = _SwapOrderService.DaySwapOrder();
// 创建 ExchangeStationDayRunResult 实例
ExchangeStationDayRunResult dayCount = new ExchangeStationDayRunResult();
// 计算平均充电时间(分钟)
double avgMinutes = orders
.Where(order => order.StartTime.HasValue && order.EndTime.HasValue)
.Select(order => (order.EndTime.Value - order.StartTime.Value).TotalMinutes)
.DefaultIfEmpty(0.0)
.Average();
// 计算平均换电时间(分钟)
double avgRepTime = daySwapOrder
.Where(order => order.SwapBeginTime.HasValue && order.SwapEndTime.HasValue)
.Select(order => (order.SwapEndTime.Value - order.SwapBeginTime.Value).TotalMinutes)
.DefaultIfEmpty(0.0)
.Average();
// 找到最早的换电时间
SwapOrder firstSwapOrder = daySwapOrder
.Where(order => order.SwapBeginTime.HasValue)
.OrderBy(order => order.SwapBeginTime)
.FirstOrDefault();
// 找到最晚的换电时间
SwapOrder lastSwapOrder = daySwapOrder
.Where(order => order.SwapEndTime.HasValue)
.OrderByDescending(order => order.SwapEndTime)
.FirstOrDefault();
// 统计充电次数
int chgCount = orders
.Where(order => !string.IsNullOrEmpty(order.Sn))
.Select(order => order.Sn)
.Distinct()
.Count();
// 统计换电次数
int totalSwapCount = daySwapOrder
.Where(order => !string.IsNullOrEmpty(order.Sn))
.Select(order => order.Sn)
.Distinct()
.Count();
// 计算总共换电多少分钟
double totalMinutes = daySwapOrder
.Where(order => order.SwapBeginTime.HasValue && order.SwapEndTime.HasValue)
.Sum(order => (order.SwapEndTime.Value - order.SwapBeginTime.Value).TotalMinutes);
// 赋值
dayCount.AvgChgTime = avgMinutes.ToString("F2");
dayCount.AvgRepTime = avgRepTime.ToString("F2");
dayCount.SwapDate = DateTime.Now.AddDays(-1).ToString();
dayCount.FristSwapTime = firstSwapOrder?.SwapBeginTime?.ToString() ?? null;
dayCount.StopTime = lastSwapOrder?.SwapEndTime?.ToString() ?? null;
dayCount.ChgCount = chgCount;
dayCount.ToltalSwapCount = totalSwapCount;
dayCount.ToltalSwapAllTime = Math.Round(totalMinutes, 2);
dayCount.State = StaticStationInfo.StationStatus;
_ExStationDayRunResultService.Insert(dayCount);
return Task.CompletedTask;
}
protected override string Key()
{
return "CountDayOrderJob";
}
protected override string Cron()
{
return "0 0 1 * * ?";
}
}

@ -0,0 +1,113 @@
using Autofac;
using Entity.Ammeter;
using HybirdFrameworkCore.Autofac;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Job;
using log4net;
using Repository.Ammeter;
namespace Service.Job;
[Scope]
public class EmeterDayJob: AbstractCronJob
{
private static readonly ILog Log = LogManager.GetLogger(typeof(EmeterDayJob));
public readonly EmeterEnergyRepository _EmeterEnergyRepository=AppInfo.Container.Resolve<EmeterEnergyRepository>();
public readonly EmeterEnergyChangeRepository _EmeterEnergyChangeRepository=AppInfo.Container.Resolve<EmeterEnergyChangeRepository>();
public readonly EmeterDayEnergyRepository _EmeterDayEnergyRepository=AppInfo.Container.Resolve<EmeterDayEnergyRepository>();
protected override Task Handle()
{
var now = DateTime.Now;
Log.Info($"EmeterMinuteJob execute time={now}");
//查询1天前的数据
string dateTime = now.AddDays(-1).ToString("yyyy-MM-dd");
List<EmeterEnergy> emeterEnergies = _EmeterEnergyRepository.QueryListByClause(i =>
dateTime.Equals(i.UploadTime.ToString("yyyy-MM-dd")), "upload_time desc");
List<EmeterEnergyChange> emeterEnergiesChange = _EmeterEnergyChangeRepository.QueryListByClause(i =>
dateTime.Equals(i.UploadTime.ToString("yyyy-MM-dd")), "upload_time desc");
if (emeterEnergies.Count > 0)
{
Dictionary<string, List<EmeterEnergy>> dictionary =
emeterEnergies.GroupBy(i => i.Code).ToDictionary(i => i.Key, i => i.ToList());
List<EmeterDayEnergy> list = new List<EmeterDayEnergy>();
foreach (var keyValuePair in dictionary)
{
EmeterDayEnergy emitterDayEnergy = new EmeterDayEnergy();
emitterDayEnergy.Code = keyValuePair.Key;
emitterDayEnergy.Time = dateTime;
emitterDayEnergy.Type = 1;
EmeterEnergy? maxValue = keyValuePair.Value.MaxBy(x => x.Value);
EmeterEnergy? minValue = keyValuePair.Value.MinBy(x => x.Value);
if (maxValue != null)
{
emitterDayEnergy.RealTimeValue = maxValue.Value;
}
if (maxValue != null && minValue != null)
{
emitterDayEnergy.Value = maxValue.Value - minValue.Value;
}
list.Add(emitterDayEnergy);
}
_EmeterDayEnergyRepository.Insert(list);
}
if (emeterEnergiesChange.Count > 0)
{
Dictionary<string, List<EmeterEnergyChange>> dictionaryChange =
emeterEnergiesChange.GroupBy(i => i.Code).ToDictionary(i => i.Key, i => i.ToList());
List<EmeterDayEnergy> list = new List<EmeterDayEnergy>();
foreach (var keyValuePair in dictionaryChange)
{
EmeterDayEnergy emitterDayEnergy = new EmeterDayEnergy();
emitterDayEnergy.Code = keyValuePair.Key;
emitterDayEnergy.Time = dateTime;
emitterDayEnergy.Type = 2;
EmeterEnergyChange? maxValue = keyValuePair.Value.MaxBy(x => x.Value);
EmeterEnergyChange? minValue = keyValuePair.Value.MinBy(x => x.Value);
if (maxValue != null)
{
emitterDayEnergy.RealTimeValue = maxValue.Value;
}
if (maxValue != null && minValue != null)
{
emitterDayEnergy.Value = maxValue.Value - minValue.Value;
}
list.Add(emitterDayEnergy);
}
_EmeterDayEnergyRepository.Insert(list);
}
return Task.CompletedTask;
}
protected override string Key()
{
return "EmeterDayJob";
}
// 每天凌晨1点执行
protected override string Cron()
{
return "0 0 1 * * ?";
}
}

@ -0,0 +1,96 @@
using Autofac;
using Entity.Ammeter;
using HybirdFrameworkCore.Autofac;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Job;
using log4net;
using Repository.Ammeter;
using SqlSugar;
namespace Service.Job;
[Scope]
public class EmeterHourJob : AbstractCronJob
{
private static readonly ILog Log = LogManager.GetLogger(typeof(EmeterHourJob));
public readonly EmeterEnergyRepository _EmeterEnergyRepository=AppInfo.Container.Resolve<EmeterEnergyRepository>();
public readonly EmeterEnergyChangeRepository _EmeterEnergyChangeRepository=AppInfo.Container.Resolve<EmeterEnergyChangeRepository>();
public readonly EmeterHourEnergyRepository _EmeterHourEnergy=AppInfo.Container.Resolve<EmeterHourEnergyRepository>();
protected override Task Handle()
{
var now = DateTime.Now;
Log.Info($"EmeterMinuteJob execute time={now}");
//查询上一小时的数据
string dateTime = now.AddHours(-1).ToString("yyyy-MM-dd HH");
List<EmeterEnergy> emeterEnergies = _EmeterEnergyRepository.QueryListByClause(i =>
dateTime.Equals(i.UploadTime.ToString("yyyy-MM-dd HH")), "upload_time desc");
List<EmeterEnergyChange> emeterEnergiesChange = _EmeterEnergyChangeRepository.QueryListByClause(i =>
dateTime.Equals(i.UploadTime.ToString("yyyy-MM-dd HH")), "upload_time desc");
List<EmeterHourEnergy> db = new List<EmeterHourEnergy>();
if (emeterEnergies.Count > 0)
{
Dictionary<string, List<EmeterEnergy>> dictionary =
emeterEnergies.GroupBy(i => i.Code).ToDictionary(i => i.Key, i => i.ToList());
foreach (var keyValuePair in dictionary)
{
EmeterHourEnergy emeterMinutesEnergy = new EmeterHourEnergy();
emeterMinutesEnergy.Code = keyValuePair.Key;
emeterMinutesEnergy.Time = dateTime;
emeterMinutesEnergy.Type = 1;
var value = keyValuePair.Value;
var orderByDescending = value.OrderByDescending(i => i.UploadTime).ToList();
emeterMinutesEnergy.RealTimeValue = orderByDescending[0].Value;
emeterMinutesEnergy.Value = orderByDescending[0].Value -
orderByDescending[^1].Value;
db.Add(emeterMinutesEnergy);
}
}
if (emeterEnergiesChange.Count > 0)
{
Dictionary<string, List<EmeterEnergyChange>> dictionaryChange =
emeterEnergiesChange.GroupBy(i => i.Code).ToDictionary(i => i.Key, i => i.ToList());
foreach (var keyValuePair in dictionaryChange)
{
EmeterHourEnergy emeterMinutesEnergy = new EmeterHourEnergy();
emeterMinutesEnergy.Code = keyValuePair.Key;
emeterMinutesEnergy.Time = dateTime;
emeterMinutesEnergy.Type = 1;
var value = keyValuePair.Value;
var orderByDescending = value.OrderByDescending(i => i.UploadTime).ToList();
emeterMinutesEnergy.RealTimeValue = orderByDescending[0].Value;
emeterMinutesEnergy.Value = orderByDescending[0].Value -
orderByDescending[^1].Value;
db.Add(emeterMinutesEnergy);
}
}
if (db.Count > 0)
{
_EmeterHourEnergy.Insert(db);
}
return Task.CompletedTask;
}
protected override string Key()
{
return "EmeterHourJob";
}
protected override string Cron()
{
return "0 30 * * * ?";
}
}

@ -54,9 +54,9 @@ public class EmeterMinuteJob : AbstractCronJob
emeterMinutesEnergy.Type = 1; emeterMinutesEnergy.Type = 1;
var value = keyValuePair.Value; var value = keyValuePair.Value;
var orderByDescending = value.OrderByDescending(i => i.UploadTime).ToList(); var orderByDescending = value.OrderByDescending(i => i.UploadTime).ToList();
emeterMinutesEnergy.RealTimeValue = float.Parse(orderByDescending[0].Value); emeterMinutesEnergy.RealTimeValue = orderByDescending[0].Value;
emeterMinutesEnergy.Value = float.Parse(orderByDescending[0].Value) - emeterMinutesEnergy.Value = orderByDescending[0].Value -
float.Parse(orderByDescending[^1].Value); orderByDescending[^1].Value;
db.Add(emeterMinutesEnergy); db.Add(emeterMinutesEnergy);
} }
} }
@ -98,7 +98,6 @@ public class EmeterMinuteJob : AbstractCronJob
protected override string Cron() protected override string Cron()
{ {
//return "0 0/1 * * * ?";
return "0 * * * * ? *"; return "0 * * * * ? *";
} }
} }

@ -1,163 +0,0 @@
using Entity.Constant;
using Entity.DbModel.Station;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.AutoTask;
using log4net;
using Service.Init;
using Service.Station;
namespace Service.MyTask;
/// <summary>
/// 统计每日运行
/// </summary>
[Scope]
public class CountDayOrderTask : ITask
{
private static readonly ILog Log = LogManager.GetLogger(typeof(CountDayOrderTask));
private volatile bool _stop;
private Timer _timer;
public ChargeOrderService _ChargeOrderService { get; set; }
public SwapOrderService _SwapOrderService { get; set; }
public ExStationDayRunResultService _ExStationDayRunResultService { get; set; }
public string Name()
{
return "CountDayOrderTask";
}
public int Interval()
{
return 1000 * 10;
}
public void Handle()
{
// 统计每日运行
return;
// CountOrder();
}
public bool Stoped()
{
return _stop;
}
public void Stop()
{
_stop = true;
_timer?.Change(Timeout.Infinite, Timeout.Infinite);
}
public void ResetStop()
{
_stop = false;
ScheduleNextRun();
}
public CountDayOrderTask()
{
ScheduleNextRun();
}
private void ScheduleNextRun()
{
if (_stop)
{
return;
}
DateTime now = DateTime.Now;
DateTime nextRun = new DateTime(now.Year, now.Month, now.Day, 19, 21, 0);
if (now > nextRun)
{
nextRun = nextRun.AddDays(1);
}
TimeSpan timeToGo = nextRun - now;
_timer = new Timer(x =>
{
if (!_stop)
{
CountOrder();
ScheduleNextRun();
}
}, null, timeToGo, Timeout.InfiniteTimeSpan);
}
public void CountOrder()
{
// 获取 ChargeOrder 和 SwapOrder 列表
List<ChargeOrder> orders = _ChargeOrderService.DayChargeOrder();
List<SwapOrder> daySwapOrder = _SwapOrderService.DaySwapOrder();
// 创建 ExchangeStationDayRunResult 实例
ExchangeStationDayRunResult dayCount = new ExchangeStationDayRunResult();
// 计算平均充电时间(分钟)
double avgMinutes = orders
.Where(order => order.StartTime.HasValue && order.EndTime.HasValue)
.Select(order => (order.EndTime.Value - order.StartTime.Value).TotalMinutes)
.DefaultIfEmpty(0.0)
.Average();
// 计算平均换电时间(分钟)
double avgRepTime = daySwapOrder
.Where(order => order.SwapBeginTime.HasValue && order.SwapEndTime.HasValue)
.Select(order => (order.SwapEndTime.Value - order.SwapBeginTime.Value).TotalMinutes)
.DefaultIfEmpty(0.0)
.Average();
// 找到最早的换电时间
SwapOrder firstSwapOrder = daySwapOrder
.Where(order => order.SwapBeginTime.HasValue)
.OrderBy(order => order.SwapBeginTime)
.FirstOrDefault();
// 找到最晚的换电时间
SwapOrder lastSwapOrder = daySwapOrder
.Where(order => order.SwapEndTime.HasValue)
.OrderByDescending(order => order.SwapEndTime)
.FirstOrDefault();
// 统计充电次数
int chgCount = orders
.Where(order => !string.IsNullOrEmpty(order.Sn))
.Select(order => order.Sn)
.Distinct()
.Count();
// 统计换电次数
int totalSwapCount = daySwapOrder
.Where(order => !string.IsNullOrEmpty(order.Sn))
.Select(order => order.Sn)
.Distinct()
.Count();
// 计算总共换电多少分钟
double totalMinutes = daySwapOrder
.Where(order => order.SwapBeginTime.HasValue && order.SwapEndTime.HasValue)
.Sum(order => (order.SwapEndTime.Value - order.SwapBeginTime.Value).TotalMinutes);
// 赋值
dayCount.AvgChgTime = avgMinutes.ToString("F2");
dayCount.AvgRepTime = avgRepTime.ToString("F2");
dayCount.SwapDate = DateTime.Now.AddDays(-1).ToString();
dayCount.FristSwapTime = firstSwapOrder?.SwapBeginTime?.ToString() ?? null;
dayCount.StopTime = lastSwapOrder?.SwapEndTime?.ToString() ?? null;
dayCount.ChgCount = chgCount;
dayCount.ToltalSwapCount = totalSwapCount;
dayCount.ToltalSwapAllTime = Math.Round(totalMinutes, 2);
dayCount.State = StaticStationInfo.StationStatus;
_ExStationDayRunResultService.Insert(dayCount);
}
}

@ -1,8 +1,10 @@
using System.ComponentModel;
using AutoMapper; using AutoMapper;
using Common.Util; using Common.Util;
using Entity.Api.Resp; using Entity.Api.Resp;
using Entity.Constant; using Entity.Constant;
using Entity.DbModel.Station; using Entity.DbModel.Station;
using Entity.Dto.Req;
using HybirdFrameworkCore.Autofac.Attribute; using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkCore.Entity; using HybirdFrameworkCore.Entity;
using log4net; using log4net;
@ -16,6 +18,7 @@ using Service.Execute.Model;
using Service.Init; using Service.Init;
using Service.Mgr; using Service.Mgr;
using Service.Plc.Client; using Service.Plc.Client;
using SqlSugar;
namespace Service.Station; namespace Service.Station;
@ -30,6 +33,48 @@ public class MonitorService
public MoveBinRecordRepository MoveBinRecordRepository { get; set; } public MoveBinRecordRepository MoveBinRecordRepository { get; set; }
[DisplayName("获取移仓分页")]
public async Task<PageResult<MoveBinRecord>> Page(PageMoveBinRecordReq input)
{
RefAsync<int> total = 0;
var items = await MoveBinRecordRepository.QueryPageAsync(
entity => true,
!string.IsNullOrWhiteSpace(input.UpBatterySoc), u => u.UpBatterySoc.Equals(input.UpBatterySoc.Trim()),
!string.IsNullOrWhiteSpace(input.UpBinNo), u => u.UpBinNo.Equals(input.UpBinNo.Trim()),
!string.IsNullOrWhiteSpace(input.UpBatteryNo), u => u.UpBatteryNo.Equals(input.UpBatteryNo.Trim()),
u => u.CreatedTime, input.PageNum, input.PageSize, total);
return new PageResult<MoveBinRecord>()
{
PageNum = input.PageNum,
PageSize = input.PageSize,
ToTal = total,
Rows = items,
};
}
public async Task<string> Add(AddMoveBinRecordReq input)
{
string result = "";
MoveBinRecord moveBinRecord = await MoveBinRecordRepository.InsertAsync(input);
return "新增id" + moveBinRecord.Id;
}
public virtual async Task<bool> Update(UpdateMoveBinRecordReq Req)
{
return await MoveBinRecordRepository.UpdateAsync(Req);
}
public virtual async Task<bool> Delete(DeleteMoveBinRecordReq input)
{
var user = await MoveBinRecordRepository.QueryByClauseAsync(u => u.Id == input.Id);
if (user == null)
throw new ArgumentException($"不存在");
return await MoveBinRecordRepository.DeleteAsync(user);
}
public Result<SwapMonitorScreenResp> GetSwapMonitorData() public Result<SwapMonitorScreenResp> GetSwapMonitorData()
{ {
var configBinInfo = var configBinInfo =

@ -0,0 +1,62 @@
using System.ComponentModel.DataAnnotations;
using Entity.DbModel.Station;
using Entity.Dto.Req;
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc;
using Service.Station;
namespace WebStarter.Controllers;
/// <summary>
/// 电池移仓
/// </summary>
[ApiController]
[Route("api/[controller]")]
public class MoveBinRecordController
{
private readonly MonitorService _monitorService;
public MoveBinRecordController(MonitorService monitorService)
{
_monitorService = monitorService;
}
[HttpPost]
[Route("page")]
public async Task<Result<PageResult<MoveBinRecord>>> page([FromBody] PageMoveBinRecordReq input)
{
return Result<PageResult<MoveBinRecord>>.Success(await _monitorService.Page(input));
}
[HttpPost]
[Route("add")]
public async Task<Result<string>> Add([FromBody] AddMoveBinRecordReq input)
{
var data = await _monitorService.Add(input);
return Result<string>.Success(data);
}
[HttpPost]
[Route("update")]
public async Task<Result<bool>> Update([FromBody] UpdateMoveBinRecordReq req)
{
var data = await _monitorService.Update(req);
if (data)
return Result<bool>.Success(data);
else
return Result<bool>.Fail(data);
}
[HttpPost]
[Route("delete")]
public async Task<Result<bool>> Delete([FromBody] [Required] DeleteMoveBinRecordReq input)
{
var data = await _monitorService.Delete(input);
if (data)
return Result<bool>.Success(data);
else
return Result<bool>.Fail(data);
}
}

@ -6,6 +6,7 @@ using HybirdFrameworkCore.Autofac;
using HybirdFrameworkCore.AutoTask; using HybirdFrameworkCore.AutoTask;
using HybirdFrameworkCore.Configuration; using HybirdFrameworkCore.Configuration;
using HybirdFrameworkCore.Entity; using HybirdFrameworkCore.Entity;
using HybirdFrameworkCore.Job;
using HybirdFrameworkCore.Redis; using HybirdFrameworkCore.Redis;
using log4net; using log4net;
using Mapster; using Mapster;
@ -166,5 +167,7 @@ if (AppSettingsHelper.GetBool("swap", "enable"))
TaskInit.Init(); TaskInit.Init();
QuartzSchedulerFactory.Init();
app.Lifetime.ApplicationStopping.Register(QuartzSchedulerFactory.Shutdown);
app.Run(); app.Run();

@ -92,5 +92,8 @@
"Src": "D:\\RiderProjects\\hn_back_charger\\WebStarter\\bin\\Debug\\net6.0\\logs", "Src": "D:\\RiderProjects\\hn_back_charger\\WebStarter\\bin\\Debug\\net6.0\\logs",
"Dest": "D:\\zip", "Dest": "D:\\zip",
"Days": 7 "Days": 7
},
"Job": {
"Enabled": true
} }
} }

@ -126,5 +126,8 @@
"Src": "D:\\RiderProjects\\hn_back_charger\\WebStarter\\bin\\Debug\\net6.0\\logs", "Src": "D:\\RiderProjects\\hn_back_charger\\WebStarter\\bin\\Debug\\net6.0\\logs",
"Dest": "D:\\zip", "Dest": "D:\\zip",
"Days": 7 "Days": 7
},
"Job": {
"Enabled": true
} }
} }

Loading…
Cancel
Save