日志分表 任务日志 操作日志 接口日志

添加对应的日志文件
修改主子表的表结构信息
删除无关字段信息
测试添加数据到历史表中
This commit is contained in:
zhougf committed 2024-03-15 18:45:10 +08:00
1 parent ebdd40c518
commit 4f2ba2a3ee
101 files changed
+1004 -418

No files matched your search

@@ -1,47 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using HHWMS.Web.Models;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
using Quartz;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Support.Quartz;
namespace HHWMS.Web
{
//[QuartzRepeat(10,10, true, 30)]
[PersistJobDataAfterExecution]
[DisallowConcurrentExecution]
public class SendWcsJob : WtmJob
{
public override Task Execute(IJobExecutionContext context)
{
try
{
var _unitwork = new UnitWork(Wtm);
#region 更新时间
var job = _unitwork.FindSingle<SysJob>(x => x.JobName == context.JobDetail.Key.Name);
if (job != null)
{
job.LastFireTime = TimeZoneInfo.ConvertTimeFromUtc(context.FireTimeUtc.DateTime, TimeZoneInfo.Local);
// 只执行一次 没有下次执行时间
if (context.NextFireTimeUtc != null)
{
job.NextFireTime = TimeZoneInfo.ConvertTimeFromUtc(context.NextFireTimeUtc.Value.DateTime, TimeZoneInfo.Local);
}
_unitwork.Update<SysJob>(job);
}
Wtm.DoLog("任务下发", ActionLogTypesEnum.Job, "SendWcsJob");
#endregion 更新时间
}
catch { }
return Task.CompletedTask;
}
}
}
@@ -1,43 +0,0 @@
using System;
using System.Threading.Tasks;
using HHWMS.Web.Models;
using Quartz;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Support.Quartz;
namespace HHWMS.Web
{
//[QuartzRepeat(10,10, true, 30)]
//出库单据分解,为每个出库物料创建出库明细,状态为新建,通过唯一码绑定任务与库存
[PersistJobDataAfterExecution]
[DisallowConcurrentExecution]
public class SendWmsJob : WtmJob
{
public override Task Execute(IJobExecutionContext context)
{
try
{
var _unitwork = new UnitWork(Wtm);
#region 更新时间
var job = _unitwork.FindSingle<SysJob>(x => x.JobName == context.JobDetail.Key.Name);
if (job != null)
{
job.LastFireTime = TimeZoneInfo.ConvertTimeFromUtc(context.FireTimeUtc.DateTime, TimeZoneInfo.Local);
// 只执行一次 没有下次执行时间
if (context.NextFireTimeUtc != null)
{
job.NextFireTime = TimeZoneInfo.ConvertTimeFromUtc(context.NextFireTimeUtc.Value.DateTime, TimeZoneInfo.Local);
}
_unitwork.Update<SysJob>(job);
}
Wtm.DoLog("出库分解", ActionLogTypesEnum.Job, "SendWmsJob");
#endregion 更新时间
}
catch { }
return Task.CompletedTask;
}
}
}
@@ -42,7 +42,9 @@ namespace HHWMS.Web
}
#endregion
}
catch { }
catch(Exception ex) {
Wtm.DoLog("测试", ActionLogTypesEnum.Job, "TestJob", request:"error", result:ex.Message);
}
return Task.CompletedTask;
}
}