diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index a8d1adb..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.idea/
-**/bin/
-**/obj/
-/bin/
-/obj/
-global.json
-
diff --git a/.idea/.idea.MasstransferExporter/.idea/.gitignore b/.idea/.idea.MasstransferExporter/.idea/.gitignore
deleted file mode 100644
index 19da258..0000000
--- a/.idea/.idea.MasstransferExporter/.idea/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Rider ignored files
-/contentModel.xml
-/.idea.MasstransferExporter.iml
-/modules.xml
-/projectSettingsUpdater.xml
diff --git a/.idea/.idea.MasstransferExporter/.idea/encodings.xml b/.idea/.idea.MasstransferExporter/.idea/encodings.xml
deleted file mode 100644
index df87cf9..0000000
--- a/.idea/.idea.MasstransferExporter/.idea/encodings.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/.idea/.idea.MasstransferExporter/.idea/indexLayout.xml b/.idea/.idea.MasstransferExporter/.idea/indexLayout.xml
deleted file mode 100644
index 7b08163..0000000
--- a/.idea/.idea.MasstransferExporter/.idea/indexLayout.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/.idea.MasstransferExporter/.idea/vcs.xml b/.idea/.idea.MasstransferExporter/.idea/vcs.xml
deleted file mode 100644
index 94a25f7..0000000
--- a/.idea/.idea.MasstransferExporter/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/MasstransferCommon.Tests/MasstransferCommon.Tests.csproj b/MasstransferCommon.Tests/MasstransferCommon.Tests.csproj
deleted file mode 100644
index 4925776..0000000
--- a/MasstransferCommon.Tests/MasstransferCommon.Tests.csproj
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- net7.0
-
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/MasstransferCommon.Tests/Utils/JsonUtilTest.cs b/MasstransferCommon.Tests/Utils/JsonUtilTest.cs
deleted file mode 100644
index 871ba5e..0000000
--- a/MasstransferCommon.Tests/Utils/JsonUtilTest.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.IO;
-using JetBrains.Annotations;
-using MasstransferCommon.Utils;
-using MasstransferExporter.DataExporter.Model;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
-namespace MasstransferCommon.Tests.Utils;
-
-[TestClass]
-[TestSubject(typeof(JsonUtil))]
-public class JsonUtilTest
-{
- [TestMethod]
- public void Test()
- {
- var json = File.ReadAllText("C:\\Users\\huangxianguo\\Desktop\\formula.json");
-
- var dto = JsonUtil.FromJson(json);
- Assert.IsNotNull(dto);
- }
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Annotation/ScheduledJobAttribute.cs b/MasstransferCommon/Annotation/ScheduledJobAttribute.cs
deleted file mode 100644
index 620f654..0000000
--- a/MasstransferCommon/Annotation/ScheduledJobAttribute.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace MasstransferCommon.Annotation;
-
-///
-/// 通过添加特性注解实现开启定时任务
-///
-///
-[AttributeUsage(AttributeTargets.Class, Inherited = false)]
-public class ScheduledJobAttribute(string cron) : Attribute
-{
- public string Cron { get; } = cron;
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Config/LogConfiguration.cs b/MasstransferCommon/Config/LogConfiguration.cs
deleted file mode 100644
index 7d4fe71..0000000
--- a/MasstransferCommon/Config/LogConfiguration.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-using Serilog;
-using Serilog.Core;
-using Serilog.Events;
-
-namespace MasstransferCommon.Config;
-
-///
-/// 日志配置类
-///
-public class LogConfiguration
-{
- ///
- /// 获取日志配置对象
- ///
- ///
- public static Logger GetLogger()
- {
- // 日志输出目录
- var basePath = AppDomain.CurrentDomain.BaseDirectory;
-
- return new LoggerConfiguration()
- .MinimumLevel.Debug()
- .Enrich.FromLogContext()
- .WriteTo.Logger(
- l =>
- l.Filter.ByIncludingOnly(e => e.Level == LogEventLevel.Debug)
- .WriteTo.File(
- Path.Combine(basePath, "logs", "debug", "debug-.log"),
- rollingInterval: RollingInterval.Hour,
- retainedFileCountLimit: 24
- )
- )
- .WriteTo.Logger(
- l => l.Filter.ByIncludingOnly(e => e.Level == LogEventLevel.Information)
- .WriteTo.File(
- Path.Combine(basePath, "logs", "info", "info-.log"),
- rollingInterval: RollingInterval.Hour,
- retainedFileCountLimit: 72
- )
- )
- .WriteTo.Logger(
- l => l.Filter.ByIncludingOnly(e => e.Level == LogEventLevel.Warning)
- .WriteTo.File(
- Path.Combine(basePath, "logs", "warning", "warning-.log"),
- rollingInterval: RollingInterval.Day,
- retainedFileCountLimit: 30
- )
- )
- .WriteTo.Logger(
- l => l.Filter.ByIncludingOnly(e => e.Level == LogEventLevel.Error)
- .WriteTo.File(
- Path.Combine(basePath, "logs", "error", "error-.log"),
- rollingInterval: RollingInterval.Day,
- retainedFileCountLimit: 90
- )
- )
- .WriteTo.Console()
- .CreateLogger();
- }
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Convert/DatetimeConverter.cs b/MasstransferCommon/Convert/DatetimeConverter.cs
deleted file mode 100644
index 3e1bd82..0000000
--- a/MasstransferCommon/Convert/DatetimeConverter.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using Newtonsoft.Json;
-using JsonSerializer = Newtonsoft.Json.JsonSerializer;
-
-namespace MasstransferCommon.Convert;
-
-public class DatetimeConverter : JsonConverter
-{
- private static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
-
- public override void WriteJson(JsonWriter writer, DateTime value, JsonSerializer serializer)
- {
- long timestamp = (long)(value.ToUniversalTime() - UnixEpoch).TotalMilliseconds;
- writer.WriteValue(timestamp < 0 ? 0 : timestamp);
- }
-
- public override DateTime ReadJson(JsonReader reader, Type objectType, DateTime existingValue, bool hasExistingValue,
- JsonSerializer serializer)
- {
- var value = reader.Value;
-
- return long.TryParse(value + "", out var timestamp)
- ? UnixEpoch.AddMilliseconds(timestamp)
- : UnixEpoch.AddMilliseconds((long)value);
- }
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Events/EventAction.cs b/MasstransferCommon/Events/EventAction.cs
deleted file mode 100644
index 380f8f1..0000000
--- a/MasstransferCommon/Events/EventAction.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace MasstransferCommon.Events;
-
-///
-/// 用于声明当前方法为事件处理器
-///
-[AttributeUsage(AttributeTargets.Method)]
-public class EventAction(params EventType[] types) : Attribute
-{
- public EventType[] Types => types;
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Events/EventBus.cs b/MasstransferCommon/Events/EventBus.cs
deleted file mode 100644
index e158594..0000000
--- a/MasstransferCommon/Events/EventBus.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-using Serilog;
-
-namespace MasstransferCommon.Events;
-
-///
-/// 事件总线
-///
-///
-public abstract class EventBus
-{
- private static readonly Dictionary> Subscribers = new();
-
- ///
- /// 添加订阅
- ///
- ///
- ///
- public static void AddEventHandler(EventType type, Delegate action)
- {
- if (Subscribers.TryGetValue(type, out var subscribers))
- {
- var any = subscribers.Any(item => item.Equals(action));
- if (!any) subscribers.Add(action);
- }
- else
- {
- Subscribers.Add(type, [action]);
- }
- }
-
- ///
- /// 移除订阅逻辑
- ///
- /// 事件类型
- /// 回调方法
- public static void RemoveEventHandler(EventType type, Delegate action)
- {
- if (!Subscribers.TryGetValue(type, out var handlers)) return;
-
- handlers.Remove(action);
- }
-
- ///
- /// 发布事件
- ///
- ///
- ///
- public static void Publish(EventType type, T data)
- {
- if (!Subscribers.TryGetValue(type, out var subscribers)) return;
-
- // 创建一个副本,避免在回调中修改订阅列表导致迭代异常
- var actions = subscribers.ToList();
-
- foreach (var action in actions)
- try
- {
- action.DynamicInvoke(type, data);
- }
- catch (Exception e)
- {
- Log.Error(e, e.Message);
- }
- }
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Events/EventListener.cs b/MasstransferCommon/Events/EventListener.cs
deleted file mode 100644
index dc0c28b..0000000
--- a/MasstransferCommon/Events/EventListener.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace MasstransferCommon.Events;
-
-///
-/// 用于声明当前类为事件监听
-///
-[AttributeUsage(AttributeTargets.Class)]
-public class EventListener(string name = "") : Attribute
-{
- private string Name => name;
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Events/EventType.cs b/MasstransferCommon/Events/EventType.cs
deleted file mode 100644
index e1df75b..0000000
--- a/MasstransferCommon/Events/EventType.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.ComponentModel;
-
-namespace MasstransferCommon.Events;
-
-///
-/// 通过事件发布订阅模式实现系统各组件的解耦
-/// 这里定义的是事件的驱动类型
-///
-public enum EventType
-{
- // 系统初始化事件
- [Description("系统初始化事件")] SetupNotify,
-
- [Description("系统已经启动事件")] StartUp,
-}
\ No newline at end of file
diff --git a/MasstransferCommon/MasstransferCommon.csproj b/MasstransferCommon/MasstransferCommon.csproj
deleted file mode 100644
index db835be..0000000
--- a/MasstransferCommon/MasstransferCommon.csproj
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
- net7.0
- enable
- enable
- preview
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MasstransferCommon/Model/Atrributes/Hide.cs b/MasstransferCommon/Model/Atrributes/Hide.cs
deleted file mode 100644
index bb67547..0000000
--- a/MasstransferCommon/Model/Atrributes/Hide.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace MasstransferCommon.Model.Atrributes;
-
-[AttributeUsage(AttributeTargets.Property)]
-public class Hide : Attribute
-{
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Atrributes/Property.cs b/MasstransferCommon/Model/Atrributes/Property.cs
deleted file mode 100644
index 9d21fa4..0000000
--- a/MasstransferCommon/Model/Atrributes/Property.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-namespace MasstransferCommon.Model.Atrributes;
-
-[AttributeUsage(AttributeTargets.Property)]
-public class Property : Attribute
-{
- public bool IsReadOnly { get; set; } = false;
-
- // 字符串格式
- public string? Format { get; set; }
-
- // 显示控件的宽
- public double Width { get; set; }
-
- // 显示控件的高
- public double Height { get; set; }
-
- public double Max { get; set; }
-
- public double Min { get; set; }
-
- public string Group { get; set; }
-
- public bool IsPassword { get; set; }
-
- public string Variable { get; set; }
-
- public int Axis { get; set; } = -1;
-
- public int Index { get; set; } = -1;
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Constant/ProcessTopics.cs b/MasstransferCommon/Model/Constant/ProcessTopics.cs
deleted file mode 100644
index 4532cf7..0000000
--- a/MasstransferCommon/Model/Constant/ProcessTopics.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-namespace MasstransferCommon.Model.Constant;
-
-public class ProcessTopics
-{
- ///
- /// 测试topic
- ///
- public const string TestEvent = "TestEvent";
-
- ///
- /// 证书更新事件
- ///
- public const string LicenseUpdateEvent = "LicenseUpdateEvent";
-
- ///
- /// 证书更新事件反馈
- ///
- public const string LicenseUpdateEventFeedback = "LicenseUpdateEventFeedback";
-
- ///
- /// OTA请求事件
- ///
- public const string OTAQueryEvent = "OTAQueryEvent";
-
- ///
- /// OTA请求反馈事件
- ///
- public const string OTAQueryEventFeedback = "OTAQueryEventFeedback";
-
- ///
- /// OTA更新事件
- ///
- public const string OTAUpdateEvent = "OTAUpdateEvent";
-
- ///
- /// 下载更新包事件
- ///
- public const string DownloadUpdatePackageEvent = "DownloadUpdatePackageEvent";
-
- ///
- /// 下载更新包事件反馈
- ///
- public const string DownloadUpdatePackageEventFeedback = "DownloadUpdatePackageEventFeedback";
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Constant/Topics.cs b/MasstransferCommon/Model/Constant/Topics.cs
deleted file mode 100644
index df8a162..0000000
--- a/MasstransferCommon/Model/Constant/Topics.cs
+++ /dev/null
@@ -1,128 +0,0 @@
-using MasstransferSecurity.Utils;
-
-namespace MasstransferCommon.Model.Constant;
-
-///
-/// 这里保存所有的 Mqtt Topic
-/// topic 的基本结构构成
-/// up/{DeviceInfoUtil.GetDeviceSN()}/{cmd}/{version}
-///
-///
-public static class Topics
-{
- // ReSharper disable once InconsistentNaming
- private static string Version = "1.0.0";
-
-
- ///
- /// 上报生产数据
- ///
- public static string ReportProductRecord = $"up/{DeviceInfoUtil.GetDeviceSN()}/100/{Version}";
-
- ///
- /// 图片上传
- ///
- public static string ImageUpload = $"up/{DeviceInfoUtil.GetDeviceSN()}/102/{Version}";
-
- ///
- /// 查询图片
- ///
- public static string QueryImage = $"down/{DeviceInfoUtil.GetDeviceSN()}/103/{Version}";
-
- ///
- /// 坐标文件上传
- ///
- public static string CoordinateUpload = $"up/{DeviceInfoUtil.GetDeviceSN()}/104/{Version}";
-
- ///
- /// 查询坐标文件
- ///
- public static string QueryCoordinate = $"down/{DeviceInfoUtil.GetDeviceSN()}/105/{Version}";
-
- ///
- /// 上报用户操作数据
- ///
- public static string ReportOperationLog = $"up/{DeviceInfoUtil.GetDeviceSN()}/200/{Version}";
-
- ///
- /// 上传系统日志文件
- ///
- public static string UploadLogFile = $"up/{DeviceInfoUtil.GetDeviceSN()}/201/{Version}";
-
- ///
- /// 查询系统日志文件
- ///
- public static string QueryLogFile = $"down/{DeviceInfoUtil.GetDeviceSN()}/202/{Version}";
-
- ///
- /// 上报故障信息
- ///
- public static string ReportFaultRecord = $"up/{DeviceInfoUtil.GetDeviceSN()}/203/{Version}";
-
-
- ///
- /// 上报配置数据
- ///
- public static string ReportConfigData = $"up/{DeviceInfoUtil.GetDeviceSN()}/400/{Version}";
-
- ///
- /// 下发配置数据
- ///
- public static string DownloadConfigData = $"down/{DeviceInfoUtil.GetDeviceSN()}/401/{Version}";
-
- ///
- /// 下发远程控制指令
- ///
- public static string RemoteControl = $"down/{DeviceInfoUtil.GetDeviceSN()}/402/{Version}";
-
- ///
- /// 上报配置字典数据
- ///
- public static string ReportConfigDictionary = $"up/{DeviceInfoUtil.GetDeviceSN()}/403/{Version}";
-
- ///
- /// 下发OTA包
- ///
- // ReSharper disable once InconsistentNaming
- public static string IssuedOTAPackage = $"down/{DeviceInfoUtil.GetDeviceSN()}/500/{Version}";
-
-
- ///
- /// 查询OTA信息
- ///
- // ReSharper disable once InconsistentNaming
- public static string QueryOTA = $"up/{DeviceInfoUtil.GetDeviceSN()}/501/{Version}";
-
-
- ///
- /// OTA 更新反馈
- ///
- // ReSharper disable once InconsistentNaming
- public static string OTAUpgradeFeedback = $"up/{DeviceInfoUtil.GetDeviceSN()}/502/{Version}";
-
-
- ///
- /// 更新证书事件
- ///
- public static string UpdateLicenseEvent = $"up/{DeviceInfoUtil.GetDeviceSN()}/503/{Version}";
-
- ///
- /// 更新证书事件反馈
- ///
- public static string UpdateLicenseEventFeedback = $"up/{DeviceInfoUtil.GetDeviceSN()}/505/{Version}";
-
- ///
- /// 上行心跳信息
- ///
- public static string HeartBeat = $"up/{DeviceInfoUtil.GetDeviceSN()}/600/{Version}";
-
- ///
- /// 上行系统状态信息
- ///
- public static string ReportSystemStat = $"up/{DeviceInfoUtil.GetDeviceSN()}/601/{Version}";
-
- ///
- /// 上行系统版本信息
- ///
- public static string ReportSystemVersion = $"up/{DeviceInfoUtil.GetDeviceSN()}/602/{Version}";
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Entity/ChipColorEnum.cs b/MasstransferCommon/Model/Entity/ChipColorEnum.cs
deleted file mode 100644
index 20706bc..0000000
--- a/MasstransferCommon/Model/Entity/ChipColorEnum.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace MasstransferCommon.Model.Entity;
-
-public enum ChipColorEnum
-{
- R = 1,
- G = 2,
- B = 3
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Entity/Entity.cs b/MasstransferCommon/Model/Entity/Entity.cs
deleted file mode 100644
index 52ed938..0000000
--- a/MasstransferCommon/Model/Entity/Entity.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using Newtonsoft.Json;
-using SQLite;
-
-namespace MasstransferCommon.Model.Entity;
-
-///
-/// 数据库实体的父类
-///
-public class Entity
-{
- [PrimaryKey] public string? Id { get; set; }
-
- [Column("create_time"), JsonIgnore] public DateTime CreateTime { get; set; } = DateTime.Now;
-
- [Column("update_time"), JsonIgnore] public DateTime UpdateTime { get; set; } = DateTime.Now;
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Entity/LogParams.cs b/MasstransferCommon/Model/Entity/LogParams.cs
deleted file mode 100644
index e5b8333..0000000
--- a/MasstransferCommon/Model/Entity/LogParams.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.ComponentModel;
-using SQLite;
-
-namespace MasstransferCommon.Model.Entity;
-
-///
-/// 日志参数
-///
-[Table("log_params")]
-[Description("日志参数")]
-public class LogParams : Entity
-{
- [Column("level"), Description("日志级别")] public string? Level { get; set; }
-
- [Column("path"), Description("日志存放路径")]
- public string? Path { get; set; }
-
- [Column("upload_corn"), Description("日志上传时间")]
- public string? UploadCorn { get; set; }
-
- [Column("upload_levels"), Description("日志上传级别")]
- public string? UploadLevels { get; set; }
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Entity/MessageFailureRecord.cs b/MasstransferCommon/Model/Entity/MessageFailureRecord.cs
deleted file mode 100644
index 7814860..0000000
--- a/MasstransferCommon/Model/Entity/MessageFailureRecord.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System.ComponentModel;
-using SQLite;
-
-namespace MasstransferCommon.Model.Entity;
-
-[Table("message_failure_record"), Description("消息发送失败记录")]
-public class MessageFailureRecord : Entity
-{
- [Column("topic"), Description("主题")] public string Topic { get; set; }
-
- [Column("payload"), Description("消息内容")]
- public string Payload { get; set; }
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Entity/MinioParams.cs b/MasstransferCommon/Model/Entity/MinioParams.cs
deleted file mode 100644
index 4d8a4b6..0000000
--- a/MasstransferCommon/Model/Entity/MinioParams.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System.ComponentModel;
-using SQLite;
-
-namespace MasstransferCommon.Model.Entity;
-
-[Table("minio_params"), Description("MinIO参数")]
-public class MinioParams : Entity
-{
- [Column("minio_access_key"), Description("Minio AccessKey")]
- public string MinioAccessKey { get; set; }
-
- [Column("minio_secret_key"), Description("Minio SecretKey")]
- public string MinioSecretKey { get; set; }
-
- [Column("minio_bucket"), Description("Minio Bucket")]
- public string MinioBucket { get; set; }
-
- [Column("minio_endpoint"), Description("Minio Endpoint")]
- public string MinioEndpoint { get; set; }
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Entity/MqttParams.cs b/MasstransferCommon/Model/Entity/MqttParams.cs
deleted file mode 100644
index 6ad948b..0000000
--- a/MasstransferCommon/Model/Entity/MqttParams.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System.ComponentModel;
-using SQLite;
-
-namespace MasstransferCommon.Model.Entity;
-
-[Table("mqtt_params"), Description("Mqtt连接参数")]
-public class MqttParams : Entity
-{
- [Column("server_address"), Description("服务器地址")]
- public string ServerAddress { get; set; }
-
- [Column("port"), Description("端口")] public int Port { get; set; }
-
- [Column("user_name"), Description("用户名")]
- public string UserName { get; set; }
-
- [Column("password"), Description("密码")]
- public string Password { get; set; }
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Entity/OperationLog.cs b/MasstransferCommon/Model/Entity/OperationLog.cs
deleted file mode 100644
index dbc29f6..0000000
--- a/MasstransferCommon/Model/Entity/OperationLog.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.ComponentModel;
-using SQLite;
-
-namespace MasstransferCommon.Model.Entity;
-
-///
-/// 用户操作日志
-///
-[Table("operation_logs")]
-public class OperationLog : Entity
-{
- [Column("user_id"), Description("用户ID")]
- public string UserId { get; set; }
-
- [Column("user_name"), Description("用户名")]
- public string UserName { get; set; }
-
- [Column("action"), Description("操作")] public string Action { get; set; }
-
- [Column("params"), Description("参数")] public string? Params { get; set; }
-
- [Column("exception"), Description("异常信息")]
- public string? Exception { get; set; }
-
- [Column("operate_time"), Description("操作时间")]
- public DateTime OperateTime { get; set; }
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Entity/PathParams.cs b/MasstransferCommon/Model/Entity/PathParams.cs
deleted file mode 100644
index 3c22701..0000000
--- a/MasstransferCommon/Model/Entity/PathParams.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System.ComponentModel;
-using SQLite;
-
-namespace MasstransferCommon.Model.Entity;
-
-///
-/// 路径参数
-///
-[Table("path_params"), Description("文件路径参数")]
-public class PathParams : Entity
-{
- [Column("AppDir"), Description("应用程序路径")]
- public string AppDir { get; set; }
-
- [Column("AssemblyPath"), Description("程序集路径")]
- public string AssemblyPath { get; set; }
-
- [Column("CriticalBackupDir"), Description("重要文件备份目录地址")]
- public string CriticalBackupDir { get; set; }
-
- [Column("CriticalFileExtension"), Description("重要文件后缀")]
- public string[] CriticalFileExtension { get; set; }
-
- [Column("CriticalSourceLogPath"), Description("重要文件备份记录文件地址")]
- public string CriticalSourceLogPath { get; set; }
-
- [Column("PreviousBackupPath"), Description("原应用程序备份目录地址")]
- public string PreviousBackupPath { get; set; }
-
- [Column("UpdatePackagePath"), Description("更新包下载地址")]
- public string UpdatePackagePath { get; set; }
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Entity/WaferUsedRecord.cs b/MasstransferCommon/Model/Entity/WaferUsedRecord.cs
deleted file mode 100644
index 03c4836..0000000
--- a/MasstransferCommon/Model/Entity/WaferUsedRecord.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System.ComponentModel;
-using SQLite;
-
-namespace MasstransferCommon.Model.Entity;
-
-[Table("wafer_used_record"), Description("晶环使用记录")]
-public class WaferUsedRecord : Entity
-{
- [Column("context_id"), Description("上下文编号")]
- public string? ContextId { get; set; }
-
- [Column("wafer_code"), Description("晶环编号")]
- public string? WaferCode { get; set; }
-
- [Column("substrate_code"), Description("基板编号")]
- public string? SubstrateCode { get; set; }
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Enum/AltimetryStrategyEnum.cs b/MasstransferCommon/Model/Enum/AltimetryStrategyEnum.cs
deleted file mode 100644
index 96ef80a..0000000
--- a/MasstransferCommon/Model/Enum/AltimetryStrategyEnum.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using System.ComponentModel;
-
-namespace MasstransferCommon.Model.Enum;
-
-public enum AltimetryStrategyEnum
-{
- [Description("按面积")] ByArea = 1,
- [Description("按坐标")] ByCoordinate = 2
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Enum/ChipColorEnum.cs b/MasstransferCommon/Model/Enum/ChipColorEnum.cs
deleted file mode 100644
index d74b7bd..0000000
--- a/MasstransferCommon/Model/Enum/ChipColorEnum.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace MasstransferCommon.Model.Enum;
-
-public enum ChipColorEnum
-{
- R = 1,
- G = 2,
- B = 3
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Enum/DirectionEnum.cs b/MasstransferCommon/Model/Enum/DirectionEnum.cs
deleted file mode 100644
index c504aac..0000000
--- a/MasstransferCommon/Model/Enum/DirectionEnum.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using System.ComponentModel;
-
-namespace MasstransferCommon.Model.Enum;
-
-public enum DirectionEnum
-{
- [Description("行方向")] ROW = 1,
- [Description("列方向")] COLUMN = 2,
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Enum/ExceptionLevel.cs b/MasstransferCommon/Model/Enum/ExceptionLevel.cs
deleted file mode 100644
index d01875d..0000000
--- a/MasstransferCommon/Model/Enum/ExceptionLevel.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace MasstransferCommon.Model.Enum;
-
-public enum ExceptionLevel : int
-{
- NORMAL,
- WARN,
- ERROR,
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Enum/GainAutoEnum.cs b/MasstransferCommon/Model/Enum/GainAutoEnum.cs
deleted file mode 100644
index 2c3dfba..0000000
--- a/MasstransferCommon/Model/Enum/GainAutoEnum.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace MasstransferCommon.Model.Enum;
-
-public enum GainAutoEnum
-{
- Off,
- Once,
- Continuous
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Enum/JobStateEnum.cs b/MasstransferCommon/Model/Enum/JobStateEnum.cs
deleted file mode 100644
index d1ddbe8..0000000
--- a/MasstransferCommon/Model/Enum/JobStateEnum.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System.ComponentModel;
-
-namespace MasstransferCommon.Model.Enum;
-
-///
-/// 生产作业状态
-///
-public enum JobStateEnum
-{
- [Description("待生产")] Waiting = 0,
-
- [Description("生产中")] Producing = 1,
-
- [Description("已完成")] Completed = 2,
-
- [Description("已取消")] Canceled = 3,
-
- [Description("生产异常")] Abnormal = 4,
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Enum/LicenseTypeEnum.cs b/MasstransferCommon/Model/Enum/LicenseTypeEnum.cs
deleted file mode 100644
index 5ec0d7c..0000000
--- a/MasstransferCommon/Model/Enum/LicenseTypeEnum.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-namespace MasstransferCommon.Model.Enum;
-
-///
-/// 防止注册表被恶意篡改,这里的注册许可类型需要做一些混淆
-///
-public enum LicenseTypeEnum
-{
- // 临时许可
- Temporary = unchecked(int.MaxValue - 123456),
-
- // 正式许可
- Formal = unchecked(int.MaxValue - 123457)
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Enum/LineModeEnum.cs b/MasstransferCommon/Model/Enum/LineModeEnum.cs
deleted file mode 100644
index d3a0fff..0000000
--- a/MasstransferCommon/Model/Enum/LineModeEnum.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace MasstransferCommon.Model.Enum;
-
-public enum LineModeEnum
-{
- Strobe
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Enum/LineSelectorEnum.cs b/MasstransferCommon/Model/Enum/LineSelectorEnum.cs
deleted file mode 100644
index 5f4718c..0000000
--- a/MasstransferCommon/Model/Enum/LineSelectorEnum.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace MasstransferCommon.Model.Enum;
-
-public enum LineSelectorEnum
-{
- Line0,
- Line1,
- Line2,
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Enum/LockStateEnum.cs b/MasstransferCommon/Model/Enum/LockStateEnum.cs
deleted file mode 100644
index b9bc109..0000000
--- a/MasstransferCommon/Model/Enum/LockStateEnum.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-namespace MasstransferCommon.Model.Enum;
-
-///
-/// 锁定状态
-///
-public enum LockStateEnum
-{
- // 锁定状态
- LockedState = int.MaxValue / 3,
-
- // 等待锁定状态
- WaitToLockedState = int.MaxValue / 4,
-
- // 解锁状态
- UnLockedState = int.MaxValue / 5,
-
- // 等待解锁状态
- WaitToUnLockedState = int.MaxValue / 6
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Enum/ScannerInterfaceEnum.cs b/MasstransferCommon/Model/Enum/ScannerInterfaceEnum.cs
deleted file mode 100644
index 3846fa2..0000000
--- a/MasstransferCommon/Model/Enum/ScannerInterfaceEnum.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System.ComponentModel;
-
-namespace MasstransferCommon.Model.Enum;
-
-///
-/// 扫码枪接口类型
-///
-public enum ScannerInterfaceEnum
-{
- ///
- /// 串口
- ///
- [Description("串口")] Serial,
-
- ///
- /// TCP
- ///
- [Description("网口")] Tcp,
-
- ///
- /// USB
- ///
- [Description("USB")] Usb,
-
- ///
- /// 蓝牙
- ///
- [Description("蓝牙")] Bluetooth,
-
- ///
- /// 无线
- ///
- [Description("无线")] Wireless
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Enum/SubstrateTypeEnum.cs b/MasstransferCommon/Model/Enum/SubstrateTypeEnum.cs
deleted file mode 100644
index 0992101..0000000
--- a/MasstransferCommon/Model/Enum/SubstrateTypeEnum.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System.ComponentModel;
-
-namespace MasstransferCommon.Model.Enum;
-
-///
-/// 基材类型
-///
-public enum SubstrateTypeEnum
-{
- [Description("PCB")] PCB = 1,
- [Description("玻璃")] Glass = 2
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Enum/TlsProtocolsEnum.cs b/MasstransferCommon/Model/Enum/TlsProtocolsEnum.cs
deleted file mode 100644
index 36f3e81..0000000
--- a/MasstransferCommon/Model/Enum/TlsProtocolsEnum.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace MasstransferCommon.Model.Enum;
-
-public enum TlsProtocolsEnum
-{
- TLS_1_2,
- TLS_1_3
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Enum/TriggerActivationEnum.cs b/MasstransferCommon/Model/Enum/TriggerActivationEnum.cs
deleted file mode 100644
index 530fd15..0000000
--- a/MasstransferCommon/Model/Enum/TriggerActivationEnum.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace MasstransferCommon.Model.Enum;
-
-public enum TriggerActivationEnum
-{
- RisingEdge,
- FallingEdge,
- LevelHigh,
- LevelLow,
- AnyEdge
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Enum/TriggerModeEnum.cs b/MasstransferCommon/Model/Enum/TriggerModeEnum.cs
deleted file mode 100644
index 9071d2d..0000000
--- a/MasstransferCommon/Model/Enum/TriggerModeEnum.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace MasstransferCommon.Model.Enum;
-
-public enum TriggerModeEnum
-{
- Off,
- On
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Model/Enum/TriggerSourceEnum.cs b/MasstransferCommon/Model/Enum/TriggerSourceEnum.cs
deleted file mode 100644
index ed243e7..0000000
--- a/MasstransferCommon/Model/Enum/TriggerSourceEnum.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace MasstransferCommon.Model.Enum;
-
-public enum TriggerSourceEnum
-{
- Software,
- Line0,
- Line2,
- Counter0,
- Anyway
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Scheduler/DelayScheduler.cs b/MasstransferCommon/Scheduler/DelayScheduler.cs
deleted file mode 100644
index 8864e47..0000000
--- a/MasstransferCommon/Scheduler/DelayScheduler.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-using Serilog;
-
-namespace MasstransferCommon.Scheduler;
-
-///
-/// 延时定时任务
-///
-public class DelayScheduler
-{
- ///
- /// 设定延时任务
- ///
- ///
- ///
- ///
- ///
- ///
- public static async void Delay(Action action, TimeSpan delay, CancellationToken cancellationToken = default)
- {
- try
- {
- if (action == null) throw new ArgumentNullException(nameof(action));
- if (delay.TotalMilliseconds < 0)
- throw new ArgumentOutOfRangeException(nameof(delay), "延时时间不能为负数");
-
- await Task.Delay(delay, cancellationToken);
- if (cancellationToken.IsCancellationRequested)
- {
- return;
- }
-
- action();
- }
- catch (Exception e)
- {
- if (e is not TaskCanceledException)
- {
- Log.Error(e, "延时任务执行失败");
- }
- }
- }
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Scheduler/ExecuteTask.cs b/MasstransferCommon/Scheduler/ExecuteTask.cs
deleted file mode 100644
index 22c286e..0000000
--- a/MasstransferCommon/Scheduler/ExecuteTask.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-namespace MasstransferCommon.Scheduler;
-
-///
-/// 通过定时执行某个委托方法
-///
-public class ExecuteTask : ITask
-{
- private readonly Timer _timer;
-
- public ExecuteTask(string name, Action action, int interval = 100)
- {
- Name = name;
- Interval = interval;
- Action = action;
- _timer = new Timer(_ => { Run(); }, null, TimeSpan.Zero, TimeSpan.FromMilliseconds(Interval));
- }
-
- public int Interval { get; set; }
-
- public string Name { get; set; }
-
- public Action Action { get; set; }
-
- ///
- /// 移除任务进行定时任务释放
- ///
- public void Dispose()
- {
- _timer.Dispose();
- }
-
- ///
- /// 定义一个虚方法, 子类可以重写该方法实现具体的轮询逻辑
- ///
- public void Run()
- {
- Action.Invoke();
- }
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Scheduler/ITask.cs b/MasstransferCommon/Scheduler/ITask.cs
deleted file mode 100644
index baedaac..0000000
--- a/MasstransferCommon/Scheduler/ITask.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace MasstransferCommon.Scheduler;
-
-public interface ITask : IDisposable
-{
- public void Run();
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Scheduler/JobScheduler.cs b/MasstransferCommon/Scheduler/JobScheduler.cs
deleted file mode 100644
index 986eff8..0000000
--- a/MasstransferCommon/Scheduler/JobScheduler.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using System.Collections.Concurrent;
-using Serilog;
-
-namespace MasstransferCommon.Scheduler;
-
-public class JobScheduler
-{
- private static readonly ConcurrentDictionary Tasks = new();
-
- ///
- /// 添加调度任务
- ///
- ///
- ///
- ///
- ///
- public static void AddTask(string name, Action action, int interval = 100, int delay = 0)
- {
- try
- {
- if (Tasks.ContainsKey(name)) return;
-
- if (delay > 0)
- {
- Thread.Sleep(delay);
- }
-
- Tasks[name] = new ExecuteTask(name, action, interval);
- }
- catch (Exception e)
- {
- Log.Error(e, $"添加 {name} 任务失败");
- }
- }
-
- ///
- /// 移除任务
- ///
- ///
- public static void RemoveTask(string name)
- {
- if (Tasks.TryRemove(name, out var task)) task.Dispose();
- }
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Scheduler/QuartzScheduler.cs b/MasstransferCommon/Scheduler/QuartzScheduler.cs
deleted file mode 100644
index 192cfb0..0000000
--- a/MasstransferCommon/Scheduler/QuartzScheduler.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using System.Reflection;
-using MasstransferCommon.Annotation;
-using MasstransferCommon.Utils;
-using Quartz;
-using Quartz.Impl;
-
-namespace MasstransferCommon.Scheduler;
-
-///
-/// 定时任务器
-///
-public class QuartzScheduler
-{
- private readonly IScheduler _scheduler;
-
- private QuartzScheduler()
- {
- var schedulerFactory = new StdSchedulerFactory();
- _scheduler = schedulerFactory.GetScheduler().Result;
- }
-
- public static QuartzScheduler Instance { get; } = new();
-
- ///
- /// 启动定时任务器
- ///
- public async Task StartAsync()
- {
- await _scheduler.Start();
-
- // 查找所有带有 ScheduledJobAttribute 的类
- var jobs = AssemblyUtil.GetTypesByAttribute(typeof(ScheduledJobAttribute));
-
- foreach (var job in jobs)
- {
- var attribute = job.GetCustomAttribute();
- var jobDetail = JobBuilder.Create(job)
- .WithIdentity(job.Name)
- .Build();
-
- var trigger = TriggerBuilder.Create()
- .WithIdentity($"{job.Name}.trigger")
- .WithCronSchedule(attribute!.Cron)
- .Build();
-
- await _scheduler.ScheduleJob(jobDetail, trigger);
- }
- }
-
- ///
- /// 停止定时器
- ///
- public async Task StopAsync()
- {
- await _scheduler.Shutdown();
- }
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Service/Instant.cs b/MasstransferCommon/Service/Instant.cs
deleted file mode 100644
index c906ef9..0000000
--- a/MasstransferCommon/Service/Instant.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace MasstransferCommon.Atrributes;
-
-public interface Instant
-{
- ///
- /// 初始化对象后进行回调
- ///
- void Initialized();
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Utils/AssemblyUtil.cs b/MasstransferCommon/Utils/AssemblyUtil.cs
deleted file mode 100644
index ac8a93f..0000000
--- a/MasstransferCommon/Utils/AssemblyUtil.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using System.Reflection;
-
-namespace MasstransferCommon.Utils;
-
-///
-/// 包含程序集相关的工具类
-///
-public class AssemblyUtil
-{
- private const string Token = "masstransfer";
-
- ///
- /// 根据注解来获取类信息
- ///
- ///
- ///
- public static List GetTypesByAttribute(Type attributeType)
- {
- return GetAssemblies()
- .SelectMany(a => a.GetTypes()
- .Where(t => t.GetCustomAttributes(attributeType, true).Length > 0))
- .ToList();
- }
-
- private static IEnumerable GetAssemblies()
- {
- var assemblies = new List();
- foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
- {
- var name = assembly.GetName().Name;
- if (name != null && name.ToLower().Contains(Token)) GetReferenceAssemblies(assembly, assemblies);
- }
-
- return assemblies;
- }
-
- private static void GetReferenceAssemblies(Assembly assembly, ICollection assemblies)
- {
- foreach (var assemblyName in assembly.GetReferencedAssemblies())
- {
- var name = assemblyName.Name;
- if (name == null || !name.ToLower().Contains(Token)) continue;
- var ass = Assembly.Load(assemblyName);
- if (assemblies.Contains(ass)) continue;
- assemblies.Add(ass);
- GetReferenceAssemblies(ass, assemblies);
- }
- }
-}
\ No newline at end of file
diff --git a/MasstransferCommon/Utils/BeanUtil.cs b/MasstransferCommon/Utils/BeanUtil.cs
deleted file mode 100644
index 0bbce97..0000000
--- a/MasstransferCommon/Utils/BeanUtil.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-namespace MasstransferCommon.Utils;
-
-///
-/// bean 工具类
-///
-public class BeanUtil
-{
- ///
- /// 实现Bean的属性复制
- ///
- ///
- ///
- public static void CopyProperties(object source, object target)
- {
- var sourceProperties = source.GetType().GetProperties();
- var targetProperties = target.GetType().GetProperties();
-
- foreach (var sourceProperty in sourceProperties)
- {
- var targetProperty = Array.Find(targetProperties, p => p.Name == sourceProperty.Name &&
- p.PropertyType == sourceProperty.PropertyType);
-
- if (targetProperty != null && targetProperty.CanWrite)
- targetProperty.SetValue(target, sourceProperty.GetValue(source));
- }
- }
-
- public static T CopyProperties(object source)
- {
- var instance = Activator.CreateInstance();
- CopyProperties(source, instance);
- return instance;
- }
-
- public static List CopyProperties(IEnumerable