From 5b977a953accc873621313c515fed39a97a6b520 Mon Sep 17 00:00:00 2001 From: "qianhao.xu" Date: Fri, 1 Nov 2024 14:16:56 +0800 Subject: [PATCH] 112 --- DOAN.Model/PBL/Dto/LightLogDto.cs | 30 +++++++ DOAN.Model/PBL/Dto/MesInterationLogDto.cs | 34 ++++++++ DOAN.Model/PBL/LightLog.cs | 40 ++++++++++ DOAN.Model/PBL/MesInterationLog.cs | 49 ++++++++++++ DOAN.Service/PBL/IService/ILightLogService.cs | 21 +++++ .../PBL/IService/IMesInterationLogService.cs | 21 +++++ DOAN.Service/PBL/LightLogService.cs | 79 +++++++++++++++++++ DOAN.Service/PBL/MesInterationLogService.cs | 79 +++++++++++++++++++ 8 files changed, 353 insertions(+) create mode 100644 DOAN.Model/PBL/Dto/LightLogDto.cs create mode 100644 DOAN.Model/PBL/Dto/MesInterationLogDto.cs create mode 100644 DOAN.Model/PBL/LightLog.cs create mode 100644 DOAN.Model/PBL/MesInterationLog.cs create mode 100644 DOAN.Service/PBL/IService/ILightLogService.cs create mode 100644 DOAN.Service/PBL/IService/IMesInterationLogService.cs create mode 100644 DOAN.Service/PBL/LightLogService.cs create mode 100644 DOAN.Service/PBL/MesInterationLogService.cs diff --git a/DOAN.Model/PBL/Dto/LightLogDto.cs b/DOAN.Model/PBL/Dto/LightLogDto.cs new file mode 100644 index 0000000..c2dbcb2 --- /dev/null +++ b/DOAN.Model/PBL/Dto/LightLogDto.cs @@ -0,0 +1,30 @@ + +namespace DOAN.Model.PBL.Dto +{ + /// + /// 查询对象 + /// + public class LightLogQueryDto : PagerInfo + { + } + + /// + /// 输入输出对象 + /// + public class LightLogDto + { + [Required(ErrorMessage = "雪花不能为空")] + public string Id { get; set; } + + public int? LightOperation { get; set; } + + public string ShelfCode { get; set; } + + public string Operationer { get; set; } + + public DateTime? CreatedTime { get; set; } + + + + } +} \ No newline at end of file diff --git a/DOAN.Model/PBL/Dto/MesInterationLogDto.cs b/DOAN.Model/PBL/Dto/MesInterationLogDto.cs new file mode 100644 index 0000000..0e786d1 --- /dev/null +++ b/DOAN.Model/PBL/Dto/MesInterationLogDto.cs @@ -0,0 +1,34 @@ + +namespace DOAN.Model.PBL.Dto +{ + /// + /// 查询对象 + /// + public class MesInterationLogQueryDto : PagerInfo + { + } + + /// + /// 输入输出对象 + /// + public class MesInterationLogDto + { + [Required(ErrorMessage = "雪花不能为空")] + public string Id { get; set; } + + public string Workorder { get; set; } + + public string OrderNumber { get; set; } + + public string AssemblyPartNumber { get; set; } + + public string Scancode { get; set; } + + public DateTime? CreatedTime { get; set; } + + public DateTime? UpdatedTime { get; set; } + + + + } +} \ No newline at end of file diff --git a/DOAN.Model/PBL/LightLog.cs b/DOAN.Model/PBL/LightLog.cs new file mode 100644 index 0000000..8125a4e --- /dev/null +++ b/DOAN.Model/PBL/LightLog.cs @@ -0,0 +1,40 @@ + +namespace DOAN.Model.PBL +{ + /// + /// + /// + [SugarTable("light_log")] + public class LightLog + { + /// + /// 雪花 + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = false)] + public string Id { get; set; } + + /// + /// 1亮灯、2灭灯 + /// + [SugarColumn(ColumnName = "light_operation")] + public int? LightOperation { get; set; } + + /// + /// 货架号 + /// + [SugarColumn(ColumnName = "shelf_code")] + public string ShelfCode { get; set; } + + /// + /// PBL系统、人工 + /// + public string Operationer { get; set; } + + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "created_time")] + public DateTime? CreatedTime { get; set; } + + } +} \ No newline at end of file diff --git a/DOAN.Model/PBL/MesInterationLog.cs b/DOAN.Model/PBL/MesInterationLog.cs new file mode 100644 index 0000000..0a4c158 --- /dev/null +++ b/DOAN.Model/PBL/MesInterationLog.cs @@ -0,0 +1,49 @@ + +namespace DOAN.Model.PBL +{ + /// + /// + /// + [SugarTable("mes_interation_log")] + public class MesInterationLog + { + /// + /// 雪花 + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = false)] + public string Id { get; set; } + + /// + /// 工单号 + /// + public string Workorder { get; set; } + + /// + /// 订单号 + /// + public string OrderNumber { get; set; } + + /// + /// 总成零件号 + /// + public string AssemblyPartNumber { get; set; } + + /// + /// 扫描码 + /// + public string Scancode { get; set; } + + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "created_time")] + public DateTime? CreatedTime { get; set; } + + /// + /// 更改时间 + /// + [SugarColumn(ColumnName = "updated_time")] + public DateTime? UpdatedTime { get; set; } + + } +} \ No newline at end of file diff --git a/DOAN.Service/PBL/IService/ILightLogService.cs b/DOAN.Service/PBL/IService/ILightLogService.cs new file mode 100644 index 0000000..f57fcf5 --- /dev/null +++ b/DOAN.Service/PBL/IService/ILightLogService.cs @@ -0,0 +1,21 @@ +using DOAN.Model.PBL.Dto; +using DOAN.Model.PBL; + +namespace DOAN.Service.PBL.IPBLService +{ + /// + /// service接口 + /// + public interface ILightLogService : IBaseService + { + PagedInfo GetList(LightLogQueryDto parm); + + LightLog GetInfo(string Id); + + + LightLog AddLightLog(LightLog parm); + int UpdateLightLog(LightLog parm); + + + } +} diff --git a/DOAN.Service/PBL/IService/IMesInterationLogService.cs b/DOAN.Service/PBL/IService/IMesInterationLogService.cs new file mode 100644 index 0000000..91c6872 --- /dev/null +++ b/DOAN.Service/PBL/IService/IMesInterationLogService.cs @@ -0,0 +1,21 @@ +using DOAN.Model.PBL.Dto; +using DOAN.Model.PBL; + +namespace DOAN.Service.PBL.IPBLService +{ + /// + /// service接口 + /// + public interface IMesInterationLogService : IBaseService + { + PagedInfo GetList(MesInterationLogQueryDto parm); + + MesInterationLog GetInfo(string Id); + + + MesInterationLog AddMesInterationLog(MesInterationLog parm); + int UpdateMesInterationLog(MesInterationLog parm); + + + } +} diff --git a/DOAN.Service/PBL/LightLogService.cs b/DOAN.Service/PBL/LightLogService.cs new file mode 100644 index 0000000..5641982 --- /dev/null +++ b/DOAN.Service/PBL/LightLogService.cs @@ -0,0 +1,79 @@ +using Infrastructure.Attribute; +using Infrastructure.Extensions; +using DOAN.Model.PBL.Dto; +using DOAN.Model.PBL; +using DOAN.Repository; +using DOAN.Service.PBL.IPBLService; + +namespace DOAN.Service.PBL +{ + /// + /// Service业务层处理 + /// + [AppService(ServiceType = typeof(ILightLogService), ServiceLifetime = LifeTime.Transient)] + public class LightLogService : BaseService, ILightLogService + { + /// + /// 查询列表 + /// + /// + /// + public PagedInfo GetList(LightLogQueryDto parm) + { + var predicate = QueryExp(parm); + + var response = Queryable() + .Where(predicate.ToExpression()) + .ToPage(parm); + + return response; + } + + + /// + /// 获取详情 + /// + /// + /// + public LightLog GetInfo(string Id) + { + var response = Queryable() + .Where(x => x.Id == Id) + .First(); + + return response; + } + + /// + /// 添加 + /// + /// + /// + public LightLog AddLightLog(LightLog model) + { + return Insertable(model).ExecuteReturnEntity(); + } + + /// + /// 修改 + /// + /// + /// + public int UpdateLightLog(LightLog model) + { + return Update(model, true); + } + + /// + /// 查询导出表达式 + /// + /// + /// + private static Expressionable QueryExp(LightLogQueryDto parm) + { + var predicate = Expressionable.Create(); + + return predicate; + } + } +} \ No newline at end of file diff --git a/DOAN.Service/PBL/MesInterationLogService.cs b/DOAN.Service/PBL/MesInterationLogService.cs new file mode 100644 index 0000000..55162b9 --- /dev/null +++ b/DOAN.Service/PBL/MesInterationLogService.cs @@ -0,0 +1,79 @@ +using Infrastructure.Attribute; +using Infrastructure.Extensions; +using DOAN.Model.PBL.Dto; +using DOAN.Model.PBL; +using DOAN.Repository; +using DOAN.Service.PBL.IPBLService; + +namespace DOAN.Service.PBL +{ + /// + /// Service业务层处理 + /// + [AppService(ServiceType = typeof(IMesInterationLogService), ServiceLifetime = LifeTime.Transient)] + public class MesInterationLogService : BaseService, IMesInterationLogService + { + /// + /// 查询列表 + /// + /// + /// + public PagedInfo GetList(MesInterationLogQueryDto parm) + { + var predicate = QueryExp(parm); + + var response = Queryable() + .Where(predicate.ToExpression()) + .ToPage(parm); + + return response; + } + + + /// + /// 获取详情 + /// + /// + /// + public MesInterationLog GetInfo(string Id) + { + var response = Queryable() + .Where(x => x.Id == Id) + .First(); + + return response; + } + + /// + /// 添加 + /// + /// + /// + public MesInterationLog AddMesInterationLog(MesInterationLog model) + { + return Insertable(model).ExecuteReturnEntity(); + } + + /// + /// 修改 + /// + /// + /// + public int UpdateMesInterationLog(MesInterationLog model) + { + return Update(model, true); + } + + /// + /// 查询导出表达式 + /// + /// + /// + private static Expressionable QueryExp(MesInterationLogQueryDto parm) + { + var predicate = Expressionable.Create(); + + return predicate; + } + } +} \ No newline at end of file