Merge branch 'master' of http://47.95.120.53:8083/r/~hewh/JC26WCS
33个文件已添加
1个文件已删除
11个文件已修改
| | |
| | | <ProjectReference Include="..\Plugins\Admin.NET.Plugin.GoView\Admin.NET.Plugin.GoView.csproj" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | | <Folder Include="Entity\" /> |
| | | </ItemGroup> |
| | | |
| | | </Project> |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace Admin.NET.Core; |
| | | |
| | | /// <summary> |
| | | /// 导出日志数据 |
| | | /// </summary> |
| | | [ExcelExporter(Name = "日志数据", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true)] |
| | | public class ExportLogDto |
| | | { |
| | | /// <summary> |
| | | /// 记录器类别名称 |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "记录器类别名称", IsBold = true)] |
| | | public string LogName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 日志级别 |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "日志级别", IsBold = true)] |
| | | public string LogLevel { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 事件Id |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "事件Id", IsBold = true)] |
| | | public string EventId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 日志消息 |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "日志消息", IsBold = true)] |
| | | public string Message { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 异常对象 |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "异常对象", IsBold = true)] |
| | | public string Exception { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 当前状态值 |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "当前状态值", IsBold = true)] |
| | | public string State { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 日志记录时间 |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "日志记录时间", IsBold = true)] |
| | | public DateTime LogDateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 线程Id |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "线程Id", IsBold = true)] |
| | | public int ThreadId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 请求跟踪Id |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "请求跟踪Id", IsBold = true)] |
| | | public string TraceId { get; set; } |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace Admin.NET.Core.Service; |
| | | |
| | | public class PageOpLogInput : PageVisLogInput |
| | | { |
| | | /// <summary> |
| | | /// 模块名称 |
| | | /// </summary> |
| | | public string? ControllerName { get; set; } |
| | | } |
| | | |
| | | public class PageExLogInput : PageOpLogInput |
| | | { |
| | | } |
| | | |
| | | public class PageVisLogInput : PageLogInput |
| | | { |
| | | /// <summary> |
| | | /// 方法名称 |
| | | ///</summary> |
| | | public string? ActionName { get; set; } |
| | | } |
| | | |
| | | public class PageLogInput : BasePageInput |
| | | { |
| | | /// <summary> |
| | | /// 开始时间 |
| | | /// </summary> |
| | | public DateTime? StartTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 结束时间 |
| | | /// </summary> |
| | | public DateTime? EndTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 账号 |
| | | /// </summary> |
| | | public string? Account { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 操作用时 |
| | | /// </summary> |
| | | public long? Elapsed { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 状态 |
| | | /// </summary> |
| | | public string Status { get; set; } |
| | | |
| | | /// <summary> |
| | | /// IP地址 |
| | | /// </summary> |
| | | public string? RemoteIp { get; set; } |
| | | } |
| | | |
| | | public class LogInput |
| | | { |
| | | /// <summary> |
| | | /// 开始时间 |
| | | /// </summary> |
| | | public DateTime? StartTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 结束时间 |
| | | /// </summary> |
| | | public DateTime? EndTime { get; set; } |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace Admin.NET.Core.Service; |
| | | |
| | | public class LogVisOutput |
| | | { |
| | | /// <summary> |
| | | /// 登录地点 |
| | | /// </summary> |
| | | public string Location { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 经度 |
| | | /// </summary> |
| | | public double? Longitude { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 维度 |
| | | /// </summary> |
| | | public double? Latitude { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 真实姓名 |
| | | /// </summary> |
| | | public string RealName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 日志时间 |
| | | /// </summary> |
| | | public DateTime? LogDateTime { get; set; } |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace Admin.NET.Core.Service; |
| | | |
| | | /// <summary> |
| | | /// 系统差异日志服务 🧩 |
| | | /// </summary> |
| | | [ApiDescriptionSettings(Order = 330)] |
| | | public class SysLogDiffService : IDynamicApiController, ITransient |
| | | { |
| | | private readonly SqlSugarRepository<SysLogDiff> _sysLogDiffRep; |
| | | |
| | | public SysLogDiffService(SqlSugarRepository<SysLogDiff> sysLogDiffRep) |
| | | { |
| | | _sysLogDiffRep = sysLogDiffRep; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取差异日志分页列表 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [SuppressMonitor] |
| | | [DisplayName("获取差异日志分页列表")] |
| | | public async Task<SqlSugarPagedList<SysLogDiff>> Page(PageLogInput input) |
| | | { |
| | | return await _sysLogDiffRep.AsQueryable() |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.StartTime.ToString()), u => u.CreateTime >= input.StartTime) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.EndTime.ToString()), u => u.CreateTime <= input.EndTime) |
| | | .OrderBy(u => u.CreateTime, OrderByType.Desc) |
| | | .ToPagedListAsync(input.Page, input.PageSize); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取差异日志详情 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [SuppressMonitor] |
| | | [DisplayName("获取差异日志详情")] |
| | | public async Task<SysLogDiff> GetDetail(long id) |
| | | { |
| | | return await _sysLogDiffRep.GetFirstAsync(u => u.Id == id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 清空差异日志 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [ApiDescriptionSettings(Name = "Clear"), HttpPost] |
| | | [DisplayName("清空差异日志")] |
| | | public void Clear() |
| | | { |
| | | _sysLogDiffRep.AsSugarClient().DbMaintenance.TruncateTable<SysLogDiff>(); |
| | | } |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace Admin.NET.Core.Service; |
| | | |
| | | /// <summary> |
| | | /// 系统异常日志服务 🧩 |
| | | /// </summary> |
| | | [ApiDescriptionSettings(Order = 350)] |
| | | public class SysLogExService : IDynamicApiController, ITransient |
| | | { |
| | | private readonly SqlSugarRepository<SysLogEx> _sysLogExRep; |
| | | |
| | | public SysLogExService(SqlSugarRepository<SysLogEx> sysLogExRep) |
| | | { |
| | | _sysLogExRep = sysLogExRep; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取异常日志分页列表 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [SuppressMonitor] |
| | | [DisplayName("获取异常日志分页列表")] |
| | | public async Task<SqlSugarPagedList<SysLogEx>> Page(PageExLogInput input) |
| | | { |
| | | return await _sysLogExRep.AsQueryable() |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.StartTime.ToString()), u => u.CreateTime >= input.StartTime) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.EndTime.ToString()), u => u.CreateTime <= input.EndTime) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Account), u => u.Account == input.Account) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.ControllerName), u => u.ControllerName == input.ControllerName) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.ActionName), u => u.ActionName == input.ActionName) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.RemoteIp), u => u.RemoteIp == input.RemoteIp) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Elapsed.ToString()), u => u.Elapsed >= input.Elapsed) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Status) && input.Status == "200", u => u.Status == input.Status) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Status) && input.Status != "200", u => u.Status != input.Status) |
| | | //.OrderBy(u => u.CreateTime, OrderByType.Desc) |
| | | .IgnoreColumns(u => new { u.RequestParam, u.ReturnResult, u.Message }) |
| | | .OrderBuilder(input) |
| | | .ToPagedListAsync(input.Page, input.PageSize); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取异常日志详情 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [SuppressMonitor] |
| | | [DisplayName("获取异常日志详情")] |
| | | public async Task<SysLogEx> GetDetail(long id) |
| | | { |
| | | return await _sysLogExRep.GetFirstAsync(u => u.Id == id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 清空异常日志 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [ApiDescriptionSettings(Name = "Clear"), HttpPost] |
| | | [DisplayName("清空异常日志")] |
| | | public void Clear() |
| | | { |
| | | _sysLogExRep.AsSugarClient().DbMaintenance.TruncateTable<SysLogEx>(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导出异常日志 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [ApiDescriptionSettings(Name = "Export"), NonUnify] |
| | | [DisplayName("导出异常日志")] |
| | | public async Task<IActionResult> ExportLogEx(LogInput input) |
| | | { |
| | | var logExList = await _sysLogExRep.AsQueryable() |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.StartTime.ToString()) && !string.IsNullOrWhiteSpace(input.EndTime.ToString()), |
| | | u => u.CreateTime >= input.StartTime && u.CreateTime <= input.EndTime) |
| | | .OrderBy(u => u.CreateTime, OrderByType.Desc) |
| | | .Select<ExportLogDto>().ToListAsync(); |
| | | |
| | | IExcelExporter excelExporter = new ExcelExporter(); |
| | | var res = await excelExporter.ExportAsByteArray(logExList); |
| | | return new FileStreamResult(new MemoryStream(res), "application/octet-stream") { FileDownloadName = DateTime.Now.ToString("yyyyMMddHHmm") + "异常日志.xlsx" }; |
| | | } |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace Admin.NET.Core.Service; |
| | | |
| | | /// <summary> |
| | | /// 系统操作日志服务 🧩 |
| | | /// </summary> |
| | | [ApiDescriptionSettings(Order = 360)] |
| | | public class SysLogOpService : IDynamicApiController, ITransient |
| | | { |
| | | private readonly SqlSugarRepository<SysLogOp> _sysLogOpRep; |
| | | |
| | | public SysLogOpService(SqlSugarRepository<SysLogOp> sysLogOpRep) |
| | | { |
| | | _sysLogOpRep = sysLogOpRep; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取操作日志分页列表 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [SuppressMonitor] |
| | | [DisplayName("获取操作日志分页列表")] |
| | | public async Task<SqlSugarPagedList<SysLogOp>> Page(PageOpLogInput input) |
| | | { |
| | | return await _sysLogOpRep.AsQueryable() |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.StartTime.ToString()), u => u.CreateTime >= input.StartTime) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.EndTime.ToString()), u => u.CreateTime <= input.EndTime) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Account), u => u.Account == input.Account) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.RemoteIp), u => u.RemoteIp == input.RemoteIp) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.ControllerName), u => u.ControllerName == input.ControllerName) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.ActionName), u => u.ActionName == input.ActionName) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Elapsed.ToString()), u => u.Elapsed >= input.Elapsed) |
| | | //.OrderBy(u => u.CreateTime, OrderByType.Desc) |
| | | .IgnoreColumns(u => new { u.RequestParam, u.ReturnResult, u.Message }) |
| | | .OrderBuilder(input) |
| | | .ToPagedListAsync(input.Page, input.PageSize); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取操作日志详情 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [SuppressMonitor] |
| | | [DisplayName("获取操作日志详情")] |
| | | public async Task<SysLogOp> GetDetail(long id) |
| | | { |
| | | return await _sysLogOpRep.GetFirstAsync(u => u.Id == id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 清空操作日志 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [ApiDescriptionSettings(Name = "Clear"), HttpPost] |
| | | [DisplayName("清空操作日志")] |
| | | public void Clear() |
| | | { |
| | | _sysLogOpRep.AsSugarClient().DbMaintenance.TruncateTable<SysLogOp>(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导出操作日志 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [ApiDescriptionSettings(Name = "Export"), NonUnify] |
| | | [DisplayName("导出操作日志")] |
| | | public async Task<IActionResult> ExportLogOp(LogInput input) |
| | | { |
| | | var logOpList = await _sysLogOpRep.AsQueryable() |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.StartTime.ToString()) && !string.IsNullOrWhiteSpace(input.EndTime.ToString()), |
| | | u => u.CreateTime >= input.StartTime && u.CreateTime <= input.EndTime) |
| | | .OrderBy(u => u.CreateTime, OrderByType.Desc) |
| | | .Select<ExportLogDto>().ToListAsync(); |
| | | |
| | | IExcelExporter excelExporter = new ExcelExporter(); |
| | | var res = await excelExporter.ExportAsByteArray(logOpList); |
| | | return new FileStreamResult(new MemoryStream(res), "application/octet-stream") { FileDownloadName = DateTime.Now.ToString("yyyyMMddHHmm") + "操作日志.xlsx" }; |
| | | } |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace Admin.NET.Core.Service; |
| | | |
| | | /// <summary> |
| | | /// 系统访问日志服务 🧩 |
| | | /// </summary> |
| | | [ApiDescriptionSettings(Order = 340)] |
| | | public class SysLogVisService : IDynamicApiController, ITransient |
| | | { |
| | | private readonly SqlSugarRepository<SysLogVis> _sysLogVisRep; |
| | | |
| | | public SysLogVisService(SqlSugarRepository<SysLogVis> sysLogVisRep) |
| | | { |
| | | _sysLogVisRep = sysLogVisRep; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取访问日志分页列表 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [SuppressMonitor] |
| | | [DisplayName("获取访问日志分页列表")] |
| | | public async Task<SqlSugarPagedList<SysLogVis>> Page(PageVisLogInput input) |
| | | { |
| | | return await _sysLogVisRep.AsQueryable() |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.StartTime.ToString()), u => u.CreateTime >= input.StartTime) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.EndTime.ToString()), u => u.CreateTime <= input.EndTime) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Account), u => u.Account == input.Account) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.ActionName), u => u.ActionName == input.ActionName) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.RemoteIp), u => u.RemoteIp == input.RemoteIp) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Elapsed.ToString()), u => u.Elapsed >= input.Elapsed) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Status) && input.Status == "200", u => u.Status == input.Status) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Status) && input.Status != "200", u => u.Status != input.Status) |
| | | .OrderBy(u => u.CreateTime, OrderByType.Desc) |
| | | .ToPagedListAsync(input.Page, input.PageSize); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 清空访问日志 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [ApiDescriptionSettings(Name = "Clear"), HttpPost] |
| | | [DisplayName("清空访问日志")] |
| | | public void Clear() |
| | | { |
| | | _sysLogVisRep.AsSugarClient().DbMaintenance.TruncateTable<SysLogVis>(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取访问日志列表 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [DisplayName("获取访问日志列表")] |
| | | public async Task<List<LogVisOutput>> GetList() |
| | | { |
| | | return await _sysLogVisRep.AsQueryable() |
| | | .Where(u => u.Longitude > 0 && u.Longitude > 0) |
| | | .Select(u => new LogVisOutput |
| | | { |
| | | Location = u.Location, |
| | | Longitude = u.Longitude, |
| | | Latitude = u.Latitude, |
| | | RealName = u.RealName, |
| | | LogDateTime = u.LogDateTime |
| | | }).ToListAsync(); |
| | | } |
| | | } |
| | |
| | | { |
| | | foreach (var groupInfo in SpecificationDocumentBuilder.GetOpenApiGroups()) |
| | | { |
| | | groupInfo.Description += "<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>"; |
| | | //groupInfo.Description += "<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>"; |
| | | } |
| | | }); |
| | | |
| | |
| | | 装X|特么的|SB|屌爆了|你妹|马勒戈壁|蛋疼|买了个表|妈蛋|日了狗 |
| | | 吃翔 |
| | | 装13 |
| | | 屁民 |
| | |
| | | { |
| | | // 代码生成配置项-程序集名称集合 |
| | | "CodeGen": { |
| | | "EntityAssemblyNames": [ "Admin.NET.Core", "Admin.NET.Application" ], |
| | | "EntityAssemblyNames": [ "Admin.NET.Core", "WCS.Application" ], |
| | | "BaseEntityNames": [ "EntityTenantId", "EntityTenant", "EntityTenantBaseData", "EntityBaseData", "EntityBase", "EntityBaseId" ], |
| | | "EntityBaseColumn": { |
| | | "EntityTenantId": [ "Id", "TenantId" ], |
| | |
| | | //"BaseId": [ "Id" ] |
| | | }, |
| | | "FrontRootPath": "Web", // 前端项目根目录 |
| | | "BackendApplicationNamespaces": [ "Admin.NET.Application", "Admin.NET.Application2" ] // 后端生成到的项目 |
| | | "BackendApplicationNamespaces": [ "WCS.Application" ] // 后端生成到的项目 |
| | | } |
| | | } |
| | |
| | | // } |
| | | //], |
| | | "DbSettings": { |
| | | "EnableInitDb": true, // 启用库初始化 |
| | | "EnableInitDb": false, // 启用库初始化 |
| | | "EnableDiffLog": false, // 启用库表差异日志 |
| | | "EnableUnderLine": false // 启用驼峰转下划线 |
| | | }, |
| | | "TableSettings": { |
| | | "EnableInitTable": true, // 启用表初始化 |
| | | "EnableInitTable": false, // 启用表初始化 |
| | | "EnableIncreTable": false // 启用表增量更新-特性[IncreTable] |
| | | }, |
| | | "SeedSettings": { |
| | | "EnableInitSeed": true, // 启用种子初始化 |
| | | "EnableInitSeed": false, // 启用种子初始化 |
| | | "EnableIncreSeed": false // 启用种子增量更新-特性[IncreSeed] |
| | | } |
| | | } |
| | |
| | | { |
| | | // 枚举实体所在程序集名称集合 |
| | | "Enum": { |
| | | "EntityAssemblyNames": [ "Admin." ] |
| | | "EntityAssemblyNames": [ "Admin.", "WCS." ] |
| | | } |
| | | } |
| | |
| | | namespace Admin.NET.Application; |
| | | |
| | | |
| | | namespace WCS.Application; |
| | | /// <summary> |
| | | /// 业务应用相关常量 |
| | | /// </summary> |
| | |
| | | /// <summary> |
| | | /// API分组名称 |
| | | /// </summary> |
| | | public const string GroupName = "xxx业务应用"; |
| | | } |
| | | public const string GroupName = "WCS"; |
| | | } |
| New file |
| | |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 上下游系统配置常量 |
| | | /// </summary> |
| | | public class SystemConfigConst |
| | | { |
| | | /// <summary> |
| | | /// 服务地址 |
| | | /// </summary> |
| | | public const string ServiceAddress = "system_service_address"; |
| | | /// <summary> |
| | | /// 服务端口 |
| | | /// </summary> |
| | | public const string ServicePort = "system_service_port"; |
| | | |
| | | /// <summary> |
| | | /// WMS地址 |
| | | /// </summary> |
| | | public const string WMSAddress = "system_wms_address"; |
| | | /// <summary> |
| | | /// WMS端口 |
| | | /// </summary> |
| | | public const string WMSPort = "system_wms_port"; |
| | | |
| | | /// <summary> |
| | | /// 赋码系统地址 |
| | | /// </summary> |
| | | public const string CodingAddress = "system_coding_address"; |
| | | /// <summary> |
| | | /// 赋码系统端口 |
| | | /// </summary> |
| | | public const string CodingPort = "system_coding_port"; |
| | | |
| | | /// <summary> |
| | | /// RCS地址 |
| | | /// </summary> |
| | | public const string RCSAddress = "system_rcs_address"; |
| | | /// <summary> |
| | | /// RCS端口 |
| | | /// </summary> |
| | | public const string RCSPort = "system_rcs_port"; |
| | | } |
| New file |
| | |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 报警信息表 |
| | | /// </summary> |
| | | [SugarTable("WCSAlarmInfo","报警信息表")] |
| | | public class WcsAlarmInfo : EntityBaseData |
| | | { |
| | | /// <summary> |
| | | /// PLCIP地址 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "PlcIP", ColumnDescription = "PLCIP地址", Length = 20)] |
| | | public string? PlcIP { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 报警编号 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "AlarmCode", ColumnDescription = "报警编号", Length = 20)] |
| | | public string? AlarmCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 报警描述 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "AlarmName", ColumnDescription = "报警描述", Length = 100)] |
| | | public string? AlarmName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 显示屏ip地址 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "LedIP", ColumnDescription = "显示屏ip地址", Length = 20)] |
| | | public string? LedIP { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 状态 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "Status", ColumnDescription = "状态")] |
| | | public YesNoEnum? Status { get; set; } = YesNoEnum.N; |
| | | |
| | | /// <summary> |
| | | /// 设备类型 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "Type", ColumnDescription = "设备类型", Length = 20)] |
| | | public string? Type { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 报警日期 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "AlarmTime", ColumnDescription = "报警日期")] |
| | | public DateTime? AlarmTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// LED状态 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "LedStatus", ColumnDescription = "LED状态")] |
| | | public int? LedStatus { get; set; } |
| | | |
| | | } |
| New file |
| | |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 报警日志表 |
| | | /// </summary> |
| | | [SugarTable("WCSAlarmLog", "报警日志表")] |
| | | public class WcsAlarmLog : EntityBaseData |
| | | { |
| | | /// <summary> |
| | | /// PLCIP地址 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "PlcIP", ColumnDescription = "PLCIP地址", Length = 20)] |
| | | public string? PlcIP { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 报警编号 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "AlarmCode", ColumnDescription = "报警编号", Length = 20)] |
| | | public string? AlarmCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 报警描述 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "AlarmName", ColumnDescription = "报警描述", Length = 100)] |
| | | public string? AlarmName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 设备类型 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "Type", ColumnDescription = "设备类型", Length = 20)] |
| | | public string? Type { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 报警日期 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "AlarmTime", ColumnDescription = "报警日期")] |
| | | public DateTime? AlarmTime { get; set; } |
| | | |
| | | } |
| New file |
| | |
| | | using Admin.NET.Core; |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 任务表 |
| | | /// </summary> |
| | | [SugarTable("WCSTask","任务表")] |
| | | public class WcsTask : EntityBaseData |
| | | { |
| | | /// <summary> |
| | | /// 任务号 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "TaskNo", ColumnDescription = "任务号", Length = 20)] |
| | | public string? TaskNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 任务类型 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "TaskType", ColumnDescription = "任务类型")] |
| | | public TaskTypeEnum? TaskType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 状态 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "Status", ColumnDescription = "状态")] |
| | | public TaskStatusEnum? Status { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否回馈成功 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "IsSuccess", ColumnDescription = "是否回馈成功")] |
| | | public TaskSuccessEnum? IsSuccess { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 异常信息 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "Information", ColumnDescription = "异常信息", Length = 32)] |
| | | public string? Information { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 来源 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "Origin", ColumnDescription = "来源", Length = 20)] |
| | | public string? Origin { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 起始位置 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "StartLocate", ColumnDescription = "起始位置", Length = 20)] |
| | | public string? StartLocate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 起始巷道 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "StartRoadway", ColumnDescription = "起始巷道", Length = 20)] |
| | | public string? StartRoadway { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 结束位置 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "EndLocate", ColumnDescription = "结束位置", Length = 20)] |
| | | public string? EndLocate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 目标巷道 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "EndRoadway", ColumnDescription = "目标巷道", Length = 20)] |
| | | public string? EndRoadway { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘号 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "PalletNo", ColumnDescription = "托盘号", Length = 20)] |
| | | public string? PalletNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次号 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "LotNo", ColumnDescription = "批次号", Length = 20)] |
| | | public string? LotNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 供货批次 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "SupplierLot", ColumnDescription = "供货批次", Length = 20)] |
| | | public string? SupplierLot { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料编码 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "SkuNo", ColumnDescription = "物料编码", Length = 20)] |
| | | public string? SkuNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料名称 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "SkuName", ColumnDescription = "物料名称", Length = 20)] |
| | | public string? SkuName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 数量 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "Qty", ColumnDescription = "数量")] |
| | | public int? Qty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 拆垛数量 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "CompleteQty", ColumnDescription = "拆垛数量")] |
| | | public int? CompleteQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 拣货方式 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "UnstackingMode", ColumnDescription = "拣货方式", Length = 10)] |
| | | public string? UnstackingMode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 取消时间 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "CancelDate", ColumnDescription = "取消时间")] |
| | | public DateTime? CancelDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 完成时间 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "FinishDate", ColumnDescription = "完成时间")] |
| | | public DateTime? FinishDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 最后写入流程控制字值 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "WcsPosValue", ColumnDescription = "最后写入流程控制字值", Length = 20)] |
| | | public string? WcsPosValue { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 优先级 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "Levels", ColumnDescription = "优先级")] |
| | | public int? Levels { get; set; } |
| | | |
| | | } |
| New file |
| | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 任务明细\监控表 |
| | | /// </summary> |
| | | [SugarTable("WCSTaskMonitor","任务明细监控表")] |
| | | public class WcsTaskMonitor : EntityBaseData |
| | | { |
| | | /// <summary> |
| | | /// 任务号 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "TaskNo", ColumnDescription = "任务号", Length = 20)] |
| | | public string? TaskNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 交互工位号 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "PlcId", ColumnDescription = "交互工位号")] |
| | | public long? PlcId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 交互位置 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "PlcName", ColumnDescription = "交互位置", Length = 32)] |
| | | public string? PlcName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 起始位置 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "StartLocat", ColumnDescription = "起始位置", Length = 20)] |
| | | public string? StartLocat { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 目标位置 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "EndLocat", ColumnDescription = "目标位置", Length = 32)] |
| | | public string? EndLocat { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 交互信息 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "InteractiveMsg", ColumnDescription = "交互信息", Length = 100)] |
| | | public string? InteractiveMsg { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 异常记录 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "ErrorMsg", ColumnDescription = "异常记录", Length = 100)] |
| | | public string? ErrorMsg { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘号 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "PalletNo", ColumnDescription = "托盘号", Length = 20)] |
| | | public string? PalletNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 状态 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "Status", ColumnDescription = "状态")] |
| | | public TaskStatusEnum? Status { get; set; } |
| | | |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 任务类型枚举 |
| | | /// </summary> |
| | | [Description("任务类型枚举")] |
| | | public enum TaskTypeEnum |
| | | { |
| | | /// <summary> |
| | | /// 入库任务 |
| | | /// </summary> |
| | | [Description("入库任务")] |
| | | In = 0, |
| | | |
| | | /// <summary> |
| | | /// 出库任务 |
| | | /// </summary> |
| | | [Description("出库任务")] |
| | | Out = 1, |
| | | |
| | | /// <summary> |
| | | /// 移库任务 |
| | | /// </summary> |
| | | [Description("移库任务")] |
| | | Move = 2, |
| | | |
| | | /// <summary> |
| | | /// PLC申请入库 |
| | | /// </summary> |
| | | [Description("PLC申请入库")] |
| | | PLC = 3, |
| | | } |
| | | /// <summary> |
| | | /// 任务状态枚举 |
| | | /// </summary> |
| | | [Description("任务状态枚举")] |
| | | public enum TaskStatusEnum |
| | | { |
| | | /// <summary> |
| | | /// 等待执行 |
| | | /// </summary> |
| | | [Description("等待执行")] |
| | | Wait = 0, |
| | | /// <summary> |
| | | /// 正在执行 |
| | | /// </summary> |
| | | [Description("正在执行")] |
| | | Doing = 1, |
| | | /// <summary> |
| | | /// 执行完成 |
| | | /// </summary> |
| | | [Description("执行完成")] |
| | | Complete = 2, |
| | | /// <summary> |
| | | /// 异常结束 |
| | | /// </summary> |
| | | [Description("异常结束")] |
| | | Exception = 3, |
| | | /// <summary> |
| | | /// 任务取消 |
| | | /// </summary> |
| | | [Description("任务取消")] |
| | | Cancell = 4, |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 是否成功枚举 |
| | | /// </summary> |
| | | [Description("是否成功枚举")] |
| | | public enum TaskSuccessEnum |
| | | { |
| | | /// <summary> |
| | | /// 回传成功 |
| | | /// </summary> |
| | | [Description("回传成功")] |
| | | Success = 0, |
| | | /// <summary> |
| | | /// 回传失败 |
| | | /// </summary> |
| | | [Description("回传失败")] |
| | | Fail = 1 |
| | | } |
| | |
| | | namespace Admin.NET.Application; |
| | | namespace WCS.Application; |
| | | |
| | | ///// <summary> |
| | | ///// 示例开放接口 |
| New file |
| | |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 系统信息保存输入参数 |
| | | /// </summary> |
| | | public class SystemSaveInput |
| | | { |
| | | /// <summary> |
| | | /// 服务地址 |
| | | /// </summary> |
| | | public string ServiceAddress { get; set; } |
| | | /// <summary> |
| | | /// 服务端口 |
| | | /// </summary> |
| | | public string ServicePort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// WMS地址 |
| | | /// </summary> |
| | | public string WMSAddress { get; set; } |
| | | /// <summary> |
| | | /// WMS端口 |
| | | /// </summary> |
| | | public string WMSPort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 赋码系统 |
| | | /// </summary> |
| | | public string CodingAddress { get; set; } |
| | | /// <summary> |
| | | /// 赋码端口 |
| | | /// </summary> |
| | | public string CodingPort { get; set; } |
| | | |
| | | /// <summary> |
| | | /// RCS地址 |
| | | /// </summary> |
| | | public string RCSAddress { get; set; } |
| | | /// <summary> |
| | | /// RCS端口 |
| | | /// </summary> |
| | | public string RCSPort { get; set; } |
| | | } |
| New file |
| | |
| | | |
| | | using Admin.NET.Core.Service; |
| | | using Furion.DatabaseAccessor; |
| | | using System.Text.RegularExpressions; |
| | | using static SKIT.FlurlHttpClient.Wechat.Api.Models.TCBGetPressureTestReportResponse.Types; |
| | | |
| | | namespace WCS.Application; |
| | | /// <summary> |
| | | /// 系统参数配置服务 🧩 |
| | | /// </summary> |
| | | [ApiDescriptionSettings(Order = 440)] |
| | | public class SysConfigService : IDynamicApiController, ITransient |
| | | { |
| | | private readonly SysCacheService _sysCacheService; |
| | | private readonly SqlSugarRepository<SysConfig> _sysConfigRep; |
| | | |
| | | public SysConfigService(SysCacheService sysCacheService, |
| | | SqlSugarRepository<SysConfig> sysConfigRep) |
| | | { |
| | | _sysCacheService = sysCacheService; |
| | | _sysConfigRep = sysConfigRep; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取上下游系统信息 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [SuppressMonitor] |
| | | //[AllowAnonymous] |
| | | [DisplayName("获取上下游系统信息")] |
| | | public async Task<dynamic> GetSystemInfo() |
| | | { |
| | | var serviceAddress = await GetConfigValue<string>(SystemConfigConst.ServiceAddress); |
| | | var servicePort = await GetConfigValue<string>(SystemConfigConst.ServicePort); |
| | | var wmsAddress = await GetConfigValue<string>(SystemConfigConst.WMSAddress); |
| | | var wmsPort = await GetConfigValue<string>(SystemConfigConst.WMSPort); |
| | | var codingAddress = await GetConfigValue<string>(SystemConfigConst.CodingAddress); |
| | | var codingPort = await GetConfigValue<string>(SystemConfigConst.CodingPort); |
| | | var rcsAddress = await GetConfigValue<string>(SystemConfigConst.RCSAddress); |
| | | var rcsPort = await GetConfigValue<string>(SystemConfigConst.RCSPort); |
| | | |
| | | return new |
| | | { |
| | | ServiceAddress = serviceAddress, |
| | | ServicePort = servicePort, |
| | | WMSAddress = wmsAddress, |
| | | WMSPort = wmsPort, |
| | | CodingAddress = codingAddress, |
| | | CodingPort = codingPort, |
| | | RCSAddress = rcsAddress, |
| | | RCSPort = rcsPort, |
| | | }; |
| | | } |
| | | /// <summary> |
| | | /// 保存上下游系统信息 🔖 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [UnitOfWork] |
| | | [DisplayName("保存上下游系统信息")] |
| | | public async Task SaveSystemInfo(SystemSaveInput input) |
| | | { |
| | | await UpdateConfigValue(SystemConfigConst.ServiceAddress, input.ServiceAddress); |
| | | await UpdateConfigValue(SystemConfigConst.ServicePort, input.ServicePort); |
| | | await UpdateConfigValue(SystemConfigConst.WMSAddress, input.WMSAddress); |
| | | await UpdateConfigValue(SystemConfigConst.WMSPort, input.WMSPort); |
| | | await UpdateConfigValue(SystemConfigConst.CodingAddress, input.CodingAddress); |
| | | await UpdateConfigValue(SystemConfigConst.CodingPort, input.CodingPort); |
| | | await UpdateConfigValue(SystemConfigConst.RCSAddress, input.RCSAddress); |
| | | await UpdateConfigValue(SystemConfigConst.RCSPort, input.RCSPort); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取参数配置值 |
| | | /// </summary> |
| | | /// <param name="code"></param> |
| | | /// <returns></returns> |
| | | [NonAction] |
| | | public async Task<T> GetConfigValue<T>(string code) |
| | | { |
| | | if (string.IsNullOrWhiteSpace(code)) return default; |
| | | |
| | | var value = _sysCacheService.Get<string>($"{CacheConst.KeyConfig}{code}"); |
| | | if (string.IsNullOrEmpty(value)) |
| | | { |
| | | var config = await _sysConfigRep.CopyNew().GetFirstAsync(u => u.Code == code); |
| | | value = config != null ? config.Value : default; |
| | | _sysCacheService.Set($"{CacheConst.KeyConfig}{code}", value); |
| | | } |
| | | if (string.IsNullOrWhiteSpace(value)) return default; |
| | | return (T)Convert.ChangeType(value, typeof(T)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新参数配置值 |
| | | /// </summary> |
| | | /// <param name="code"></param> |
| | | /// <param name="value"></param> |
| | | /// <returns></returns> |
| | | [NonAction] |
| | | public async Task UpdateConfigValue(string code, string value) |
| | | { |
| | | var config = await _sysConfigRep.GetFirstAsync(u => u.Code == code); |
| | | if (config == null) return; |
| | | |
| | | config.Value = value; |
| | | await _sysConfigRep.AsUpdateable(config).ExecuteCommandAsync(); |
| | | |
| | | _sysCacheService.Remove($"{CacheConst.KeyConfig}{config.Code}"); |
| | | } |
| | | } |
| New file |
| | |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 报警日志输出参数 |
| | | /// </summary> |
| | | public class WcsAlarmLogDto |
| | | { |
| | | /// <summary> |
| | | /// 主键Id |
| | | /// </summary> |
| | | public long Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// PLCIP地址 |
| | | /// </summary> |
| | | public string? PlcIP { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 报警编号 |
| | | /// </summary> |
| | | public string? AlarmCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 报警描述 |
| | | /// </summary> |
| | | public string? AlarmName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 设备类型 |
| | | /// </summary> |
| | | public string? Type { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 报警日期 |
| | | /// </summary> |
| | | public DateTime? AlarmTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建时间 |
| | | /// </summary> |
| | | public DateTime? CreateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 更新时间 |
| | | /// </summary> |
| | | public DateTime? UpdateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者Id |
| | | /// </summary> |
| | | public long? CreateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者姓名 |
| | | /// </summary> |
| | | public string? CreateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者Id |
| | | /// </summary> |
| | | public long? UpdateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者姓名 |
| | | /// </summary> |
| | | public string? UpdateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门Id |
| | | /// </summary> |
| | | public long? CreateOrgId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门名称 |
| | | /// </summary> |
| | | public string? CreateOrgName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | public bool IsDelete { get; set; } |
| | | |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | using Admin.NET.Core; |
| | | using System.ComponentModel.DataAnnotations; |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 报警日志基础输入参数 |
| | | /// </summary> |
| | | public class WcsAlarmLogBaseInput |
| | | { |
| | | /// <summary> |
| | | /// PLCIP地址 |
| | | /// </summary> |
| | | public virtual string? PlcIP { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 报警编号 |
| | | /// </summary> |
| | | public virtual string? AlarmCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 报警描述 |
| | | /// </summary> |
| | | public virtual string? AlarmName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 设备类型 |
| | | /// </summary> |
| | | public virtual string? Type { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 报警日期 |
| | | /// </summary> |
| | | public virtual DateTime? AlarmTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建时间 |
| | | /// </summary> |
| | | public virtual DateTime? CreateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 更新时间 |
| | | /// </summary> |
| | | public virtual DateTime? UpdateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者Id |
| | | /// </summary> |
| | | public virtual long? CreateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者姓名 |
| | | /// </summary> |
| | | public virtual string? CreateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者Id |
| | | /// </summary> |
| | | public virtual long? UpdateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者姓名 |
| | | /// </summary> |
| | | public virtual string? UpdateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门Id |
| | | /// </summary> |
| | | public virtual long? CreateOrgId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门名称 |
| | | /// </summary> |
| | | public virtual string? CreateOrgName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | public virtual bool IsDelete { get; set; } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 报警日志分页查询输入参数 |
| | | /// </summary> |
| | | public class PageWcsAlarmLogInput : BasePageInput |
| | | { |
| | | /// <summary> |
| | | /// 关键字查询 |
| | | /// </summary> |
| | | public string? SearchKey { get; set; } |
| | | |
| | | /// <summary> |
| | | /// PLCIP地址 |
| | | /// </summary> |
| | | public string? PlcIP { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 报警编号 |
| | | /// </summary> |
| | | public string? AlarmCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 设备类型 |
| | | /// </summary> |
| | | public string? Type { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 报警日期 |
| | | /// </summary> |
| | | public DateTime? AlarmTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 报警日期范围 |
| | | /// </summary> |
| | | public DateTime?[] AlarmTimeRange { get; set; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 报警日志增加输入参数 |
| | | /// </summary> |
| | | public class AddWcsAlarmLogInput : WcsAlarmLogBaseInput |
| | | { |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | [Required(ErrorMessage = "软删除不能为空")] |
| | | public override bool IsDelete { get; set; } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 报警日志删除输入参数 |
| | | /// </summary> |
| | | public class DeleteWcsAlarmLogInput : BaseIdInput |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 报警日志更新输入参数 |
| | | /// </summary> |
| | | public class UpdateWcsAlarmLogInput : WcsAlarmLogBaseInput |
| | | { |
| | | /// <summary> |
| | | /// 主键Id |
| | | /// </summary> |
| | | [Required(ErrorMessage = "主键Id不能为空")] |
| | | public long Id { get; set; } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 报警日志主键查询输入参数 |
| | | /// </summary> |
| | | public class QueryByIdWcsAlarmLogInput : DeleteWcsAlarmLogInput |
| | | { |
| | | |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 报警日志输出参数 |
| | | /// </summary> |
| | | public class WcsAlarmLogOutput |
| | | { |
| | | /// <summary> |
| | | /// 主键Id |
| | | /// </summary> |
| | | public long Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// PLCIP地址 |
| | | /// </summary> |
| | | public string? PlcIP { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 报警编号 |
| | | /// </summary> |
| | | public string? AlarmCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 报警描述 |
| | | /// </summary> |
| | | public string? AlarmName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 设备类型 |
| | | /// </summary> |
| | | public string? Type { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 报警日期 |
| | | /// </summary> |
| | | public DateTime? AlarmTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建时间 |
| | | /// </summary> |
| | | public DateTime? CreateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 更新时间 |
| | | /// </summary> |
| | | public DateTime? UpdateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者Id |
| | | /// </summary> |
| | | public long? CreateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者姓名 |
| | | /// </summary> |
| | | public string? CreateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者Id |
| | | /// </summary> |
| | | public long? UpdateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者姓名 |
| | | /// </summary> |
| | | public string? UpdateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门Id |
| | | /// </summary> |
| | | public long? CreateOrgId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门名称 |
| | | /// </summary> |
| | | public string? CreateOrgName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | public bool IsDelete { get; set; } |
| | | |
| | | } |
| | | |
| | | |
| New file |
| | |
| | | |
| | | using Admin.NET.Core.Service; |
| | | using Microsoft.AspNetCore.Http; |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 报警日志服务 |
| | | /// </summary> |
| | | [ApiDescriptionSettings(ApplicationConst.GroupName, Order = 100)] |
| | | public class WcsAlarmLogService : IDynamicApiController, ITransient |
| | | { |
| | | private readonly SqlSugarRepository<WcsAlarmLog> _wcsAlarmLogRep; |
| | | public WcsAlarmLogService(SqlSugarRepository<WcsAlarmLog> wcsAlarmLogRep) |
| | | { |
| | | _wcsAlarmLogRep = wcsAlarmLogRep; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 分页查询报警日志 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "Page")] |
| | | [DisplayName("分页查询报警日志")] |
| | | public async Task<SqlSugarPagedList<WcsAlarmLogOutput>> Page(PageWcsAlarmLogInput input) |
| | | { |
| | | input.SearchKey = input.SearchKey?.Trim(); |
| | | var query = _wcsAlarmLogRep.AsQueryable() |
| | | .WhereIF(!string.IsNullOrEmpty(input.SearchKey), u => |
| | | u.PlcIP.Contains(input.SearchKey) |
| | | || u.AlarmCode.Contains(input.SearchKey) |
| | | || u.Type.Contains(input.Type) |
| | | ) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.PlcIP), u => u.PlcIP.Contains(input.PlcIP.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.AlarmCode), u => u.AlarmCode.Contains(input.AlarmCode.Trim())) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.Type), u => u.Type == input.Type) |
| | | .WhereIF(input.AlarmTimeRange != null && input.AlarmTimeRange.Length == 2, u => u.AlarmTime >= input.AlarmTimeRange[0] && u.AlarmTime <= input.AlarmTimeRange[1]) |
| | | .Select<WcsAlarmLogOutput>(); |
| | | return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 增加报警日志 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "Add")] |
| | | [DisplayName("增加报警日志")] |
| | | public async Task<long> Add(AddWcsAlarmLogInput input) |
| | | { |
| | | var entity = input.Adapt<WcsAlarmLog>(); |
| | | await _wcsAlarmLogRep.InsertAsync(entity); |
| | | return entity.Id; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取报警日志 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [ApiDescriptionSettings(Name = "Detail")] |
| | | [DisplayName("获取报警日志")] |
| | | public async Task<WcsAlarmLog> Detail([FromQuery] QueryByIdWcsAlarmLogInput input) |
| | | { |
| | | return await _wcsAlarmLogRep.GetFirstAsync(u => u.Id == input.Id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取报警日志列表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [ApiDescriptionSettings(Name = "List")] |
| | | [DisplayName("获取报警日志列表")] |
| | | public async Task<List<WcsAlarmLogOutput>> List([FromQuery] PageWcsAlarmLogInput input) |
| | | { |
| | | return await _wcsAlarmLogRep.AsQueryable().Select<WcsAlarmLogOutput>().ToListAsync(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 任务表输出参数 |
| | | /// </summary> |
| | | public class WcsTaskDto |
| | | { |
| | | /// <summary> |
| | | /// 主键Id |
| | | /// </summary> |
| | | public long Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 任务号 |
| | | /// </summary> |
| | | public string? TaskNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 任务类型 |
| | | /// </summary> |
| | | public TaskTypeEnum TaskType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 状态 |
| | | /// </summary> |
| | | public TaskStatusEnum Status { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否回馈成功 |
| | | /// </summary> |
| | | public TaskSuccessEnum IsSuccess { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 异常信息 |
| | | /// </summary> |
| | | public string? Information { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 来源 |
| | | /// </summary> |
| | | public string? Origin { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 起始位置 |
| | | /// </summary> |
| | | public string? StartLocate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 起始巷道 |
| | | /// </summary> |
| | | public string? StartRoadway { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 结束位置 |
| | | /// </summary> |
| | | public string? EndLocate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 目标巷道 |
| | | /// </summary> |
| | | public string? EndRoadway { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘号 |
| | | /// </summary> |
| | | public string? PalletNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次号 |
| | | /// </summary> |
| | | public string? LotNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 供货批次 |
| | | /// </summary> |
| | | public string? SupplierLot { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料编码 |
| | | /// </summary> |
| | | public string? SkuNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料名称 |
| | | /// </summary> |
| | | public string? SkuName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 数量 |
| | | /// </summary> |
| | | public int? Qty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 拆垛数量 |
| | | /// </summary> |
| | | public int? CompleteQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 拣货方式 |
| | | /// </summary> |
| | | public string? UnstackingMode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 取消时间 |
| | | /// </summary> |
| | | public DateTime? CancelDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 完成时间 |
| | | /// </summary> |
| | | public DateTime? FinishDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 最后写入流程控制字值 |
| | | /// </summary> |
| | | public string? WcsPosValue { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 优先级 |
| | | /// </summary> |
| | | public int? Levels { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建时间 |
| | | /// </summary> |
| | | public DateTime? CreateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 更新时间 |
| | | /// </summary> |
| | | public DateTime? UpdateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者Id |
| | | /// </summary> |
| | | public long? CreateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者姓名 |
| | | /// </summary> |
| | | public string? CreateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者Id |
| | | /// </summary> |
| | | public long? UpdateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者姓名 |
| | | /// </summary> |
| | | public string? UpdateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门Id |
| | | /// </summary> |
| | | public long? CreateOrgId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门名称 |
| | | /// </summary> |
| | | public string? CreateOrgName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | public bool IsDelete { get; set; } |
| | | |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | using Admin.NET.Core; |
| | | using System.ComponentModel.DataAnnotations; |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 任务表基础输入参数 |
| | | /// </summary> |
| | | public class WcsTaskBaseInput |
| | | { |
| | | /// <summary> |
| | | /// 任务号 |
| | | /// </summary> |
| | | public virtual string? TaskNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 任务类型 |
| | | /// </summary> |
| | | public virtual TaskTypeEnum TaskType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 状态 |
| | | /// </summary> |
| | | public virtual TaskStatusEnum Status { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否回馈成功 |
| | | /// </summary> |
| | | public virtual TaskSuccessEnum IsSuccess { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 异常信息 |
| | | /// </summary> |
| | | public virtual string? Information { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 来源 |
| | | /// </summary> |
| | | public virtual string? Origin { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 起始位置 |
| | | /// </summary> |
| | | public virtual string? StartLocate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 起始巷道 |
| | | /// </summary> |
| | | public virtual string? StartRoadway { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 结束位置 |
| | | /// </summary> |
| | | public virtual string? EndLocate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 目标巷道 |
| | | /// </summary> |
| | | public virtual string? EndRoadway { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘号 |
| | | /// </summary> |
| | | public virtual string? PalletNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次号 |
| | | /// </summary> |
| | | public virtual string? LotNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 供货批次 |
| | | /// </summary> |
| | | public virtual string? SupplierLot { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料编码 |
| | | /// </summary> |
| | | public virtual string? SkuNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料名称 |
| | | /// </summary> |
| | | public virtual string? SkuName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 数量 |
| | | /// </summary> |
| | | public virtual int? Qty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 拆垛数量 |
| | | /// </summary> |
| | | public virtual int? CompleteQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 拣货方式 |
| | | /// </summary> |
| | | public virtual string? UnstackingMode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 取消时间 |
| | | /// </summary> |
| | | public virtual DateTime? CancelDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 完成时间 |
| | | /// </summary> |
| | | public virtual DateTime? FinishDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 最后写入流程控制字值 |
| | | /// </summary> |
| | | public virtual string? WcsPosValue { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 优先级 |
| | | /// </summary> |
| | | public virtual int? Levels { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建时间 |
| | | /// </summary> |
| | | public virtual DateTime? CreateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 更新时间 |
| | | /// </summary> |
| | | public virtual DateTime? UpdateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者Id |
| | | /// </summary> |
| | | public virtual long? CreateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者姓名 |
| | | /// </summary> |
| | | public virtual string? CreateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者Id |
| | | /// </summary> |
| | | public virtual long? UpdateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者姓名 |
| | | /// </summary> |
| | | public virtual string? UpdateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门Id |
| | | /// </summary> |
| | | public virtual long? CreateOrgId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门名称 |
| | | /// </summary> |
| | | public virtual string? CreateOrgName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | public virtual bool IsDelete { get; set; } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 任务表分页查询输入参数 |
| | | /// </summary> |
| | | public class PageWcsTaskInput : BasePageInput |
| | | { |
| | | /// <summary> |
| | | /// 关键字查询 |
| | | /// </summary> |
| | | public string? SearchKey { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 任务号 |
| | | /// </summary> |
| | | public string? TaskNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 任务类型 |
| | | /// </summary> |
| | | public TaskTypeEnum? TaskType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 状态 |
| | | /// </summary> |
| | | public TaskStatusEnum? Status { get; set; } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 任务表增加输入参数 |
| | | /// </summary> |
| | | public class AddWcsTaskInput : WcsTaskBaseInput |
| | | { |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | [Required(ErrorMessage = "软删除不能为空")] |
| | | public override bool IsDelete { get; set; } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 任务表删除输入参数 |
| | | /// </summary> |
| | | public class DeleteWcsTaskInput : BaseIdInput |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 任务表更新输入参数 |
| | | /// </summary> |
| | | public class UpdateWcsTaskInput : WcsTaskBaseInput |
| | | { |
| | | /// <summary> |
| | | /// 主键Id |
| | | /// </summary> |
| | | [Required(ErrorMessage = "主键Id不能为空")] |
| | | public long Id { get; set; } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 任务表主键查询输入参数 |
| | | /// </summary> |
| | | public class QueryByIdWcsTaskInput : DeleteWcsTaskInput |
| | | { |
| | | |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 任务表输出参数 |
| | | /// </summary> |
| | | public class WcsTaskOutput |
| | | { |
| | | /// <summary> |
| | | /// 主键Id |
| | | /// </summary> |
| | | public long Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 任务号 |
| | | /// </summary> |
| | | public string? TaskNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 任务类型 |
| | | /// </summary> |
| | | public TaskTypeEnum TaskType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 状态 |
| | | /// </summary> |
| | | public TaskStatusEnum Status { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 是否回馈成功 |
| | | /// </summary> |
| | | public TaskSuccessEnum IsSuccess { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 异常信息 |
| | | /// </summary> |
| | | public string? Information { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 来源 |
| | | /// </summary> |
| | | public string? Origin { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 起始位置 |
| | | /// </summary> |
| | | public string? StartLocate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 起始巷道 |
| | | /// </summary> |
| | | public string? StartRoadway { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 结束位置 |
| | | /// </summary> |
| | | public string? EndLocate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 目标巷道 |
| | | /// </summary> |
| | | public string? EndRoadway { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘号 |
| | | /// </summary> |
| | | public string? PalletNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 批次号 |
| | | /// </summary> |
| | | public string? LotNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 供货批次 |
| | | /// </summary> |
| | | public string? SupplierLot { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料编码 |
| | | /// </summary> |
| | | public string? SkuNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 物料名称 |
| | | /// </summary> |
| | | public string? SkuName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 数量 |
| | | /// </summary> |
| | | public int? Qty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 拆垛数量 |
| | | /// </summary> |
| | | public int? CompleteQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 拣货方式 |
| | | /// </summary> |
| | | public string? UnstackingMode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 取消时间 |
| | | /// </summary> |
| | | public DateTime? CancelDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 完成时间 |
| | | /// </summary> |
| | | public DateTime? FinishDate { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 最后写入流程控制字值 |
| | | /// </summary> |
| | | public string? WcsPosValue { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 优先级 |
| | | /// </summary> |
| | | public int? Levels { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建时间 |
| | | /// </summary> |
| | | public DateTime? CreateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 更新时间 |
| | | /// </summary> |
| | | public DateTime? UpdateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者Id |
| | | /// </summary> |
| | | public long? CreateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者姓名 |
| | | /// </summary> |
| | | public string? CreateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者Id |
| | | /// </summary> |
| | | public long? UpdateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者姓名 |
| | | /// </summary> |
| | | public string? UpdateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门Id |
| | | /// </summary> |
| | | public long? CreateOrgId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门名称 |
| | | /// </summary> |
| | | public string? CreateOrgName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | public bool IsDelete { get; set; } |
| | | |
| | | } |
| | | |
| | | |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | using Admin.NET.Core.Service; |
| | | using Microsoft.AspNetCore.Http; |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 任务表服务 |
| | | /// </summary> |
| | | [ApiDescriptionSettings(ApplicationConst.GroupName, Order = 100)] |
| | | public class WcsTaskService : IDynamicApiController, ITransient |
| | | { |
| | | private readonly SqlSugarRepository<WcsTask> _wcsTaskRep; |
| | | public WcsTaskService(SqlSugarRepository<WcsTask> wcsTaskRep) |
| | | { |
| | | _wcsTaskRep = wcsTaskRep; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 分页查询任务表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "Page")] |
| | | [DisplayName("分页查询任务表")] |
| | | public async Task<SqlSugarPagedList<WcsTaskOutput>> Page(PageWcsTaskInput input) |
| | | { |
| | | input.SearchKey = input.SearchKey?.Trim(); |
| | | var query = _wcsTaskRep.AsQueryable() |
| | | .WhereIF(!string.IsNullOrEmpty(input.SearchKey), u => |
| | | u.TaskNo.Contains(input.SearchKey) |
| | | ) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.TaskNo), u => u.TaskNo.Contains(input.TaskNo.Trim())) |
| | | .WhereIF(input.TaskType.HasValue, u => u.TaskType == input.TaskType) |
| | | .WhereIF(input.Status.HasValue, u => u.Status == input.Status) |
| | | .Select<WcsTaskOutput>(); |
| | | return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 增加任务表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "Add")] |
| | | [DisplayName("增加任务表")] |
| | | public async Task<long> Add(AddWcsTaskInput input) |
| | | { |
| | | var entity = input.Adapt<WcsTask>(); |
| | | await _wcsTaskRep.InsertAsync(entity); |
| | | return entity.Id; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除任务表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "Delete")] |
| | | [DisplayName("删除任务表")] |
| | | public async Task Delete(DeleteWcsTaskInput input) |
| | | { |
| | | var entity = await _wcsTaskRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); |
| | | await _wcsTaskRep.FakeDeleteAsync(entity); //假删除 |
| | | //await _wcsTaskRep.DeleteAsync(entity); //真删除 |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新任务表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "Update")] |
| | | [DisplayName("更新任务表")] |
| | | public async Task Update(UpdateWcsTaskInput input) |
| | | { |
| | | var entity = input.Adapt<WcsTask>(); |
| | | await _wcsTaskRep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取任务表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [ApiDescriptionSettings(Name = "Detail")] |
| | | [DisplayName("获取任务表")] |
| | | public async Task<WcsTask> Detail([FromQuery] QueryByIdWcsTaskInput input) |
| | | { |
| | | return await _wcsTaskRep.GetFirstAsync(u => u.Id == input.Id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取任务表列表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [ApiDescriptionSettings(Name = "List")] |
| | | [DisplayName("获取任务表列表")] |
| | | public async Task<List<WcsTaskOutput>> List([FromQuery] PageWcsTaskInput input) |
| | | { |
| | | return await _wcsTaskRep.AsQueryable().Select<WcsTaskOutput>().ToListAsync(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 任务明细监控表输出参数 |
| | | /// </summary> |
| | | public class WcsTaskMonitorDto |
| | | { |
| | | /// <summary> |
| | | /// 主键Id |
| | | /// </summary> |
| | | public long Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 任务号 |
| | | /// </summary> |
| | | public string? TaskNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 交互工位号 |
| | | /// </summary> |
| | | public long? PlcId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 交互位置 |
| | | /// </summary> |
| | | public string? PlcName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 起始位置 |
| | | /// </summary> |
| | | public string? StartLocat { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 目标位置 |
| | | /// </summary> |
| | | public string? EndLocat { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 交互信息 |
| | | /// </summary> |
| | | public string? InteractiveMsg { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 异常记录 |
| | | /// </summary> |
| | | public string? ErrorMsg { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘号 |
| | | /// </summary> |
| | | public string? PalletNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 状态 |
| | | /// </summary> |
| | | public int? Status { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建时间 |
| | | /// </summary> |
| | | public DateTime? CreateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 更新时间 |
| | | /// </summary> |
| | | public DateTime? UpdateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者Id |
| | | /// </summary> |
| | | public long? CreateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者姓名 |
| | | /// </summary> |
| | | public string? CreateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者Id |
| | | /// </summary> |
| | | public long? UpdateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者姓名 |
| | | /// </summary> |
| | | public string? UpdateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门Id |
| | | /// </summary> |
| | | public long? CreateOrgId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门名称 |
| | | /// </summary> |
| | | public string? CreateOrgName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | public bool IsDelete { get; set; } |
| | | |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | using Admin.NET.Core; |
| | | using System.ComponentModel.DataAnnotations; |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 任务明细监控表基础输入参数 |
| | | /// </summary> |
| | | public class WcsTaskMonitorBaseInput |
| | | { |
| | | /// <summary> |
| | | /// 任务号 |
| | | /// </summary> |
| | | public virtual string? TaskNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 交互工位号 |
| | | /// </summary> |
| | | public virtual long? PlcId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 交互位置 |
| | | /// </summary> |
| | | public virtual string? PlcName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 起始位置 |
| | | /// </summary> |
| | | public virtual string? StartLocat { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 目标位置 |
| | | /// </summary> |
| | | public virtual string? EndLocat { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 交互信息 |
| | | /// </summary> |
| | | public virtual string? InteractiveMsg { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 异常记录 |
| | | /// </summary> |
| | | public virtual string? ErrorMsg { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘号 |
| | | /// </summary> |
| | | public virtual string? PalletNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 状态 |
| | | /// </summary> |
| | | public virtual int? Status { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建时间 |
| | | /// </summary> |
| | | public virtual DateTime? CreateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 更新时间 |
| | | /// </summary> |
| | | public virtual DateTime? UpdateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者Id |
| | | /// </summary> |
| | | public virtual long? CreateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者姓名 |
| | | /// </summary> |
| | | public virtual string? CreateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者Id |
| | | /// </summary> |
| | | public virtual long? UpdateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者姓名 |
| | | /// </summary> |
| | | public virtual string? UpdateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门Id |
| | | /// </summary> |
| | | public virtual long? CreateOrgId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门名称 |
| | | /// </summary> |
| | | public virtual string? CreateOrgName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | public virtual bool IsDelete { get; set; } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 任务明细监控表分页查询输入参数 |
| | | /// </summary> |
| | | public class PageWcsTaskMonitorInput : BasePageInput |
| | | { |
| | | /// <summary> |
| | | /// 关键字查询 |
| | | /// </summary> |
| | | public string? SearchKey { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 任务号 |
| | | /// </summary> |
| | | public string? TaskNo { get; set; } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 任务明细监控表增加输入参数 |
| | | /// </summary> |
| | | public class AddWcsTaskMonitorInput : WcsTaskMonitorBaseInput |
| | | { |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | [Required(ErrorMessage = "软删除不能为空")] |
| | | public override bool IsDelete { get; set; } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 任务明细监控表删除输入参数 |
| | | /// </summary> |
| | | public class DeleteWcsTaskMonitorInput : BaseIdInput |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 任务明细监控表更新输入参数 |
| | | /// </summary> |
| | | public class UpdateWcsTaskMonitorInput : WcsTaskMonitorBaseInput |
| | | { |
| | | /// <summary> |
| | | /// 主键Id |
| | | /// </summary> |
| | | [Required(ErrorMessage = "主键Id不能为空")] |
| | | public long Id { get; set; } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 任务明细监控表主键查询输入参数 |
| | | /// </summary> |
| | | public class QueryByIdWcsTaskMonitorInput : DeleteWcsTaskMonitorInput |
| | | { |
| | | |
| | | } |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 任务明细监控表输出参数 |
| | | /// </summary> |
| | | public class WcsTaskMonitorOutput |
| | | { |
| | | /// <summary> |
| | | /// 主键Id |
| | | /// </summary> |
| | | public long Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 任务号 |
| | | /// </summary> |
| | | public string? TaskNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 交互工位号 |
| | | /// </summary> |
| | | public long? PlcId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 交互位置 |
| | | /// </summary> |
| | | public string? PlcName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 起始位置 |
| | | /// </summary> |
| | | public string? StartLocat { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 目标位置 |
| | | /// </summary> |
| | | public string? EndLocat { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 交互信息 |
| | | /// </summary> |
| | | public string? InteractiveMsg { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 异常记录 |
| | | /// </summary> |
| | | public string? ErrorMsg { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 托盘号 |
| | | /// </summary> |
| | | public string? PalletNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 状态 |
| | | /// </summary> |
| | | public int? Status { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建时间 |
| | | /// </summary> |
| | | public DateTime? CreateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 更新时间 |
| | | /// </summary> |
| | | public DateTime? UpdateTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者Id |
| | | /// </summary> |
| | | public long? CreateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者姓名 |
| | | /// </summary> |
| | | public string? CreateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者Id |
| | | /// </summary> |
| | | public long? UpdateUserId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 修改者姓名 |
| | | /// </summary> |
| | | public string? UpdateUserName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门Id |
| | | /// </summary> |
| | | public long? CreateOrgId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 创建者部门名称 |
| | | /// </summary> |
| | | public string? CreateOrgName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 软删除 |
| | | /// </summary> |
| | | public bool IsDelete { get; set; } |
| | | |
| | | } |
| | | |
| | | |
| New file |
| | |
| | | // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 |
| | | // |
| | | // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 |
| | | // |
| | | // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! |
| | | |
| | | using Admin.NET.Core.Service; |
| | | using Microsoft.AspNetCore.Http; |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// 任务明细监控表服务 |
| | | /// </summary> |
| | | [ApiDescriptionSettings(ApplicationConst.GroupName, Order = 100)] |
| | | public class WcsTaskMonitorService : IDynamicApiController, ITransient |
| | | { |
| | | private readonly SqlSugarRepository<WcsTaskMonitor> _wcsTaskMonitorRep; |
| | | public WcsTaskMonitorService(SqlSugarRepository<WcsTaskMonitor> wcsTaskMonitorRep) |
| | | { |
| | | _wcsTaskMonitorRep = wcsTaskMonitorRep; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 分页查询任务明细监控表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "Page")] |
| | | [DisplayName("分页查询任务明细监控表")] |
| | | public async Task<SqlSugarPagedList<WcsTaskMonitorOutput>> Page(PageWcsTaskMonitorInput input) |
| | | { |
| | | input.SearchKey = input.SearchKey?.Trim(); |
| | | var query = _wcsTaskMonitorRep.AsQueryable() |
| | | .WhereIF(!string.IsNullOrEmpty(input.SearchKey), u => |
| | | u.TaskNo.Contains(input.SearchKey) |
| | | ) |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.TaskNo), u => u.TaskNo.Contains(input.TaskNo.Trim())) |
| | | .Select<WcsTaskMonitorOutput>(); |
| | | return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 增加任务明细监控表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "Add")] |
| | | [DisplayName("增加任务明细监控表")] |
| | | public async Task<long> Add(AddWcsTaskMonitorInput input) |
| | | { |
| | | var entity = input.Adapt<WcsTaskMonitor>(); |
| | | await _wcsTaskMonitorRep.InsertAsync(entity); |
| | | return entity.Id; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除任务明细监控表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "Delete")] |
| | | [DisplayName("删除任务明细监控表")] |
| | | public async Task Delete(DeleteWcsTaskMonitorInput input) |
| | | { |
| | | var entity = await _wcsTaskMonitorRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); |
| | | await _wcsTaskMonitorRep.FakeDeleteAsync(entity); //假删除 |
| | | //await _wcsTaskMonitorRep.DeleteAsync(entity); //真删除 |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新任务明细监控表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "Update")] |
| | | [DisplayName("更新任务明细监控表")] |
| | | public async Task Update(UpdateWcsTaskMonitorInput input) |
| | | { |
| | | var entity = input.Adapt<WcsTaskMonitor>(); |
| | | await _wcsTaskMonitorRep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取任务明细监控表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [ApiDescriptionSettings(Name = "Detail")] |
| | | [DisplayName("获取任务明细监控表")] |
| | | public async Task<WcsTaskMonitor> Detail([FromQuery] QueryByIdWcsTaskMonitorInput input) |
| | | { |
| | | return await _wcsTaskMonitorRep.GetFirstAsync(u => u.Id == input.Id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取任务明细监控表列表 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [ApiDescriptionSettings(Name = "List")] |
| | | [DisplayName("获取任务明细监控表列表")] |
| | | public async Task<List<WcsTaskMonitorOutput>> List([FromQuery] PageWcsTaskMonitorInput input) |
| | | { |
| | | return await _wcsTaskMonitorRep.AsQueryable().Select<WcsTaskMonitorOutput>().ToListAsync(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | using Microsoft.AspNetCore.Builder; |
| | | using Microsoft.AspNetCore.Hosting; |
| | | |
| | | namespace Admin.NET.Application; |
| | | namespace WCS.Application; |
| | | |
| | | [AppStartup(100)] |
| | | public class Startup : AppStartup |
| | |
| | | }, |
| | | /** |
| | | * |
| | | * @summary 保存上下游系统信息 🔖 |
| | | * @param {InfoSaveInput} [body] |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | */ |
| | | apiSysConfigSaveSystemInfoPost: async (body?: InfoSaveInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => { |
| | | const localVarPath = `/api/sysConfig/saveSystemInfo`; |
| | | // use dummy base URL string because the URL constructor only accepts absolute URLs. |
| | | const localVarUrlObj = new URL(localVarPath, 'https://example.com'); |
| | | let baseOptions; |
| | | if (configuration) { |
| | | baseOptions = configuration.baseOptions; |
| | | } |
| | | const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; |
| | | const localVarHeaderParameter = {} as any; |
| | | const localVarQueryParameter = {} as any; |
| | | |
| | | // authentication Bearer required |
| | | // http bearer authentication required |
| | | if (configuration && configuration.accessToken) { |
| | | const accessToken = typeof configuration.accessToken === 'function' |
| | | ? await configuration.accessToken() |
| | | : await configuration.accessToken; |
| | | localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; |
| | | } |
| | | |
| | | localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; |
| | | |
| | | const query = new URLSearchParams(localVarUrlObj.search); |
| | | for (const key in localVarQueryParameter) { |
| | | query.set(key, localVarQueryParameter[key]); |
| | | } |
| | | for (const key in options.params) { |
| | | query.set(key, options.params[key]); |
| | | } |
| | | localVarUrlObj.search = (new URLSearchParams(query)).toString(); |
| | | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; |
| | | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; |
| | | const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; |
| | | localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); |
| | | |
| | | return { |
| | | url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, |
| | | options: localVarRequestOptions, |
| | | }; |
| | | }, |
| | | /** |
| | | * |
| | | * @summary 获取系统信息 🔖 |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | */ |
| | | apiSysConfigSysInfoGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => { |
| | | const localVarPath = `/api/sysConfig/sysInfo`; |
| | | // use dummy base URL string because the URL constructor only accepts absolute URLs. |
| | | const localVarUrlObj = new URL(localVarPath, 'https://example.com'); |
| | | let baseOptions; |
| | | if (configuration) { |
| | | baseOptions = configuration.baseOptions; |
| | | } |
| | | const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; |
| | | const localVarHeaderParameter = {} as any; |
| | | const localVarQueryParameter = {} as any; |
| | | |
| | | // authentication Bearer required |
| | | // http bearer authentication required |
| | | if (configuration && configuration.accessToken) { |
| | | const accessToken = typeof configuration.accessToken === 'function' |
| | | ? await configuration.accessToken() |
| | | : await configuration.accessToken; |
| | | localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; |
| | | } |
| | | |
| | | const query = new URLSearchParams(localVarUrlObj.search); |
| | | for (const key in localVarQueryParameter) { |
| | | query.set(key, localVarQueryParameter[key]); |
| | | } |
| | | for (const key in options.params) { |
| | | query.set(key, options.params[key]); |
| | | } |
| | | localVarUrlObj.search = (new URLSearchParams(query)).toString(); |
| | | let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; |
| | | localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; |
| | | |
| | | return { |
| | | url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, |
| | | options: localVarRequestOptions, |
| | | }; |
| | | }, |
| | | /** |
| | | * |
| | | * @summary 获取系统信息 🔖 |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | */ |
| | | apiSysConfigSystemInfoGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => { |
| | | const localVarPath = `/api/sysConfig/systemInfo`; |
| | | // use dummy base URL string because the URL constructor only accepts absolute URLs. |
| | | const localVarUrlObj = new URL(localVarPath, 'https://example.com'); |
| | | let baseOptions; |
| | |
| | | }, |
| | | /** |
| | | * |
| | | * @summary 保存系统信息 🔖 |
| | | * @param {InfoSaveInput} [body] |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | */ |
| | | async apiSysConfigSaveSystemInfoPost(body?: InfoSaveInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> { |
| | | const localVarAxiosArgs = await SysConfigApiAxiosParamCreator(configuration).apiSysConfigSaveSystemInfoPost(body, options); |
| | | return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { |
| | | const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; |
| | | return axios.request(axiosRequestArgs); |
| | | }; |
| | | }, |
| | | /** |
| | | * |
| | | * @summary 获取系统信息 🔖 |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | */ |
| | | async apiSysConfigSysInfoGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> { |
| | | const localVarAxiosArgs = await SysConfigApiAxiosParamCreator(configuration).apiSysConfigSysInfoGet(options); |
| | | return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { |
| | | const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; |
| | | return axios.request(axiosRequestArgs); |
| | | }; |
| | | }, |
| | | /** |
| | | * |
| | | * @summary 获取系统信息 🔖 |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | */ |
| | | async apiSysConfigSystemInfoGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultObject>>> { |
| | | const localVarAxiosArgs = await SysConfigApiAxiosParamCreator(configuration).apiSysConfigSystemInfoGet(options); |
| | | return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { |
| | | const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; |
| | | return axios.request(axiosRequestArgs); |
| | |
| | | }, |
| | | /** |
| | | * |
| | | * @summary 保存系统信息 🔖 |
| | | * @param {InfoSaveInput} [body] |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | */ |
| | | async apiSysConfigSaveSystemInfoPost(body?: InfoSaveInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> { |
| | | return SysConfigApiFp(configuration).apiSysConfigSaveSystemInfoPost(body, options).then((request) => request(axios, basePath)); |
| | | }, |
| | | /** |
| | | * |
| | | * @summary 获取系统信息 🔖 |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | */ |
| | | async apiSysConfigSysInfoGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> { |
| | | return SysConfigApiFp(configuration).apiSysConfigSysInfoGet(options).then((request) => request(axios, basePath)); |
| | | }, |
| | | /** |
| | | * |
| | | * @summary 获取系统信息 🔖 |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | */ |
| | | async apiSysConfigSystemInfoGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultObject>> { |
| | | return SysConfigApiFp(configuration).apiSysConfigSystemInfoGet(options).then((request) => request(axios, basePath)); |
| | | }, |
| | | /** |
| | | * |
| | |
| | | public async apiSysConfigSaveSysInfoPost(body?: InfoSaveInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> { |
| | | return SysConfigApiFp(this.configuration).apiSysConfigSaveSysInfoPost(body, options).then((request) => request(this.axios, this.basePath)); |
| | | } |
| | | /** |
| | | * |
| | | * @summary 保存系统信息 🔖 |
| | | * @param {InfoSaveInput} [body] |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | * @memberof SysConfigApi |
| | | */ |
| | | public async apiSysConfigSaveSystemInfoPost(body?: any, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> { |
| | | return SysConfigApiFp(this.configuration).apiSysConfigSaveSystemInfoPost(body, options).then((request) => request(this.axios, this.basePath)); |
| | | } |
| | | /** |
| | | * |
| | | * @summary 获取系统信息 🔖 |
| | |
| | | public async apiSysConfigSysInfoGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> { |
| | | return SysConfigApiFp(this.configuration).apiSysConfigSysInfoGet(options).then((request) => request(this.axios, this.basePath)); |
| | | } |
| | | /** |
| | | * |
| | | * @summary 获取系统信息 🔖 |
| | | * @param {*} [options] Override http request option. |
| | | * @throws {RequiredError} |
| | | * @memberof SysConfigApi |
| | | */ |
| | | public async apiSysConfigSystemInfoGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultObject>> { |
| | | return SysConfigApiFp(this.configuration).apiSysConfigSystemInfoGet(options).then((request) => request(this.axios, this.basePath)); |
| | | } |
| | | /** |
| | | * |
| | | * @summary 更新参数配置 🔖 |
| New file |
| | |
| | | import request from '/@/utils/request'; |
| | | enum Api { |
| | | AddWcsTask = '/api/wcsTask/add', |
| | | DeleteWcsTask = '/api/wcsTask/delete', |
| | | UpdateWcsTask = '/api/wcsTask/update', |
| | | PageWcsTask = '/api/wcsTask/page', |
| | | DetailWcsTask = '/api/wcsTask/detail', |
| | | } |
| | | |
| | | // 增加任务表 |
| | | export const addWcsTask = (params?: any) => |
| | | request({ |
| | | url: Api.AddWcsTask, |
| | | method: 'post', |
| | | data: params, |
| | | }); |
| | | |
| | | // 删除任务表 |
| | | export const deleteWcsTask = (params?: any) => |
| | | request({ |
| | | url: Api.DeleteWcsTask, |
| | | method: 'post', |
| | | data: params, |
| | | }); |
| | | |
| | | // 编辑任务表 |
| | | export const updateWcsTask = (params?: any) => |
| | | request({ |
| | | url: Api.UpdateWcsTask, |
| | | method: 'post', |
| | | data: params, |
| | | }); |
| | | |
| | | // 分页查询任务表 |
| | | export const pageWcsTask = (params?: any) => |
| | | request({ |
| | | url: Api.PageWcsTask, |
| | | method: 'post', |
| | | data: params, |
| | | }); |
| | | |
| | | // 详情任务表 |
| | | export const detailWcsTask = (id: any) => |
| | | request({ |
| | | url: Api.DetailWcsTask, |
| | | method: 'get', |
| | | data: { id }, |
| | | }); |
| | | |
| | | |
| New file |
| | |
| | | import request from '/@/utils/request'; |
| | | enum Api { |
| | | PageWcsMonitorTask = '/api/wcsTaskMonitor/page', |
| | | DetailWcsMonitorTask = '/api/wcsTaskMonitor/detail', |
| | | } |
| | | |
| | | // 分页查询任务表 |
| | | export const pageWcsMonitorTask = (params?: any) => |
| | | request({ |
| | | url: Api.PageWcsMonitorTask, |
| | | method: 'post', |
| | | data: params, |
| | | }); |
| | | |
| | | // 详情任务表 |
| | | export const detailWcsMonitorTask = (id: any) => |
| | | request({ |
| | | url: Api.DetailWcsMonitorTask, |
| | | method: 'get', |
| | | data: { id }, |
| | | }); |
| | | |
| | | |
| New file |
| | |
| | | <template> |
| | | <div> |
| | | <el-card shadow="hover" v-loading="state.isLoading"> |
| | | <el-descriptions title="上下游系统信息配置" :column="2" :border="true"> |
| | | <template #title> |
| | | <el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> |
| | | <ele-Setting /> </el-icon> 上下游系统信息配置 |
| | | </template> |
| | | |
| | | <el-descriptions-item label="服务地址"> |
| | | <el-input v-model="state.formData.serviceAddress" /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="服务端口"> |
| | | <el-input v-model="state.formData.servicePort" /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="WMS地址"> |
| | | <el-input v-model="state.formData.wmsAddress" /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="WMS端口"> |
| | | <el-input v-model="state.formData.wmsPort" /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="赋码系统地址"> |
| | | <el-input v-model="state.formData.codingAddress" /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="赋码系统端口"> |
| | | <el-input v-model="state.formData.codingPort" /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="RCS地址"> |
| | | <el-input v-model="state.formData.rcsAddress" /> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="RCS端口"> |
| | | <el-input v-model="state.formData.rcsPort" /> |
| | | </el-descriptions-item> |
| | | |
| | | <template #extra> |
| | | <el-button type="primary" icon="ele-SuccessFilled" @click="onSave">保存</el-button> |
| | | </template> |
| | | </el-descriptions> |
| | | </el-card> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts" name="systemInfoSetting"> |
| | | import { nextTick, reactive, ref } from 'vue'; |
| | | import { ElMessage } from 'element-plus'; |
| | | |
| | | import { getAPI } from '/@/utils/axios-utils'; |
| | | import { SysConfigApi } from '/@/api-services'; |
| | | |
| | | const state = reactive({ |
| | | isLoading: false, |
| | | formData: { |
| | | serviceAddress: '', |
| | | servicePort: '', |
| | | wmsAddress: '', |
| | | wmsPort: '', |
| | | codingAddress: '', |
| | | codingPort: '', |
| | | rcsAddress: '', |
| | | rcsPort: '', |
| | | }, |
| | | }); |
| | | |
| | | |
| | | // 保存 |
| | | const onSave = async () => { |
| | | try { |
| | | state.isLoading = true; |
| | | const res = await getAPI(SysConfigApi).apiSysConfigSaveSystemInfoPost({ |
| | | serviceAddress: state.formData.serviceAddress, |
| | | servicePort: state.formData.servicePort, |
| | | wmsAddress: state.formData.wmsAddress, |
| | | wmsPort: state.formData.wmsPort, |
| | | codingAddress: state.formData.codingAddress, |
| | | codingPort: state.formData.codingPort, |
| | | rcsAddress: state.formData.rcsAddress, |
| | | rcsPort: state.formData.rcsPort |
| | | }); |
| | | if (res.data!.type !== 'success') return; |
| | | await loadData(); |
| | | ElMessage.success('保存成功'); |
| | | } finally { |
| | | nextTick(() => { |
| | | state.isLoading = false; |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | // 加载数据 |
| | | const loadData = async () => { |
| | | try { |
| | | state.isLoading = true; |
| | | const res = await getAPI(SysConfigApi).apiSysConfigSystemInfoGet(); |
| | | if (res.data!.type !== 'success') return; |
| | | |
| | | const result = res.data.result; |
| | | state.formData = { |
| | | serviceAddress: result.serviceAddress, |
| | | servicePort: result.servicePort, |
| | | wmsAddress: result.wmsAddress, |
| | | wmsPort: result.wmsPort, |
| | | codingAddress: result.codingAddress, |
| | | codingPort: result.codingPort, |
| | | rcsAddress: result.rcsAddress, |
| | | rcsPort: result.rcsPort |
| | | }; |
| | | } finally { |
| | | nextTick(() => { |
| | | state.isLoading = false; |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | loadData(); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .avatar-uploader .avatar { |
| | | width: 100px; |
| | | height: 100px; |
| | | display: block; |
| | | object-fit: contain; |
| | | } |
| | | |
| | | :deep(.avatar-uploader) .el-upload { |
| | | border: 1px dashed var(--el-border-color); |
| | | cursor: pointer; |
| | | position: relative; |
| | | overflow: hidden; |
| | | transition: var(--el-transition-duration-fast); |
| | | } |
| | | |
| | | :deep(.avatar-uploader) .el-upload:hover { |
| | | border-color: var(--el-color-primary); |
| | | } |
| | | |
| | | .el-icon.avatar-uploader-icon { |
| | | color: #8c939d; |
| | | width: 100px; |
| | | height: 100px; |
| | | text-align: center; |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <div class="wcsAlarmLog-container"> |
| | | <el-card shadow="hover" :body-style="{ paddingBottom: '0' }"> |
| | | <el-form :model="queryParams" ref="queryForm" labelWidth="90"> |
| | | <el-row> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10"> |
| | | <el-form-item label="关键字"> |
| | | <el-input v-model="queryParams.searchKey" clearable="" placeholder="请输入模糊查询关键字"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="PLCIP地址"> |
| | | <el-input v-model="queryParams.plcIP" clearable="" placeholder="请输入PLCIP地址"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="报警编号"> |
| | | <el-input v-model="queryParams.alarmCode" clearable="" placeholder="请输入报警编号"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="设备类型"> |
| | | <el-input v-model="queryParams.type" clearable="" placeholder="请输入设备类型"/> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="报警日期"> |
| | | <el-date-picker type="daterange" v-model="queryParams.alarmTimeRange" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" /> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10"> |
| | | <el-form-item > |
| | | <el-button-group style="display: flex; align-items: center;"> |
| | | <el-button type="primary" icon="ele-Search" @click="handleQuery" v-auth="'wcsAlarmLog:page'"> 查询 </el-button> |
| | | <el-button icon="ele-Refresh" @click="() => queryParams = {}"> 重置 </el-button> |
| | | <el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI" style="margin-left:5px;"> 高级查询 </el-button> |
| | | <el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" style="margin-left:5px;"> 隐藏 </el-button> |
| | | </el-button-group> |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </el-card> |
| | | <el-card class="full-table" shadow="hover" style="margin-top: 5px"> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | v-loading="loading" |
| | | tooltip-effect="light" |
| | | row-key="id" |
| | | @sort-change="sortChange" |
| | | border=""> |
| | | <el-table-column type="index" label="序号" width="55" align="center"/> |
| | | <el-table-column prop="plcIP" label="PLCIP地址" show-overflow-tooltip="" /> |
| | | <el-table-column prop="alarmCode" label="报警编号" show-overflow-tooltip="" /> |
| | | <el-table-column prop="alarmName" label="报警描述" show-overflow-tooltip="" /> |
| | | <el-table-column prop="type" label="设备类型" show-overflow-tooltip="" /> |
| | | <el-table-column prop="alarmTime" label="报警日期" show-overflow-tooltip="" /> |
| | | <el-table-column label="修改记录" width="80" align="center" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <ModifyRecord :data="scope.row" /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination |
| | | v-model:currentPage="tableParams.page" |
| | | v-model:page-size="tableParams.pageSize" |
| | | :total="tableParams.total" |
| | | :page-sizes="[10, 20, 50, 100, 200, 500]" |
| | | size="small" |
| | | background="" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | /> |
| | | <printDialog |
| | | ref="printDialogRef" |
| | | :title="printWcsAlarmLogTitle" |
| | | @reloadTable="handleQuery" /> |
| | | </el-card> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts" setup="" name="wcsAlarmLog"> |
| | | import { ref } from "vue"; |
| | | import { ElMessageBox, ElMessage } from "element-plus"; |
| | | import { auth } from '/@/utils/authFunction'; |
| | | |
| | | import ModifyRecord from '/@/components/table/modifyRecord.vue'; |
| | | import { formatDate } from '/@/utils/formatTime'; |
| | | |
| | | |
| | | import printDialog from '/@/views/system/print/component/hiprint/preview.vue' |
| | | import { pageWcsAlarmLog, deleteWcsAlarmLog } from '/@/api/log/wcsAlarmLog'; |
| | | |
| | | const showAdvanceQueryUI = ref(false); |
| | | const printDialogRef = ref(); |
| | | const editDialogRef = ref(); |
| | | const loading = ref(false); |
| | | const tableData = ref<any>([]); |
| | | const queryParams = ref<any>({}); |
| | | const tableParams = ref({ |
| | | page: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | | }); |
| | | |
| | | const printWcsAlarmLogTitle = ref(""); |
| | | const editWcsAlarmLogTitle = ref(""); |
| | | |
| | | // 改变高级查询的控件显示状态 |
| | | const changeAdvanceQueryUI = () => { |
| | | showAdvanceQueryUI.value = !showAdvanceQueryUI.value; |
| | | } |
| | | |
| | | // 查询操作 |
| | | const handleQuery = async () => { |
| | | loading.value = true; |
| | | var res = await pageWcsAlarmLog(Object.assign(queryParams.value, tableParams.value)); |
| | | tableData.value = res.data.result?.items ?? []; |
| | | tableParams.value.total = res.data.result?.total; |
| | | loading.value = false; |
| | | }; |
| | | |
| | | // 列排序 |
| | | const sortChange = async (column: any) => { |
| | | queryParams.value.field = column.prop; |
| | | queryParams.value.order = column.order; |
| | | await handleQuery(); |
| | | }; |
| | | |
| | | // 打开新增页面 |
| | | const openAddWcsAlarmLog = () => { |
| | | editWcsAlarmLogTitle.value = '添加报警日志'; |
| | | editDialogRef.value.openDialog({}); |
| | | }; |
| | | |
| | | // 打开打印页面 |
| | | const openPrintWcsAlarmLog = async (row: any) => { |
| | | printWcsAlarmLogTitle.value = '打印报警日志'; |
| | | } |
| | | |
| | | |
| | | // 改变页面容量 |
| | | const handleSizeChange = (val: number) => { |
| | | tableParams.value.pageSize = val; |
| | | handleQuery(); |
| | | }; |
| | | |
| | | // 改变页码序号 |
| | | const handleCurrentChange = (val: number) => { |
| | | tableParams.value.page = val; |
| | | handleQuery(); |
| | | }; |
| | | |
| | | handleQuery(); |
| | | </script> |
| | | <style scoped> |
| | | :deep(.el-input), |
| | | :deep(.el-select), |
| | | :deep(.el-input-number) { |
| | | width: 100%; |
| | | } |
| | | </style> |
| | | |
| New file |
| | |
| | | <template> |
| | | <div class="wcsTask-container"> |
| | | <el-dialog v-model="isShowDialog" :width="800" draggable="" :close-on-click-modal="false"> |
| | | <template #header> |
| | | <div style="color: #fff"> |
| | | <!--<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Edit /> </el-icon>--> |
| | | <span>{{ props.title }}</span> |
| | | </div> |
| | | </template> |
| | | <el-form :model="ruleForm" ref="ruleFormRef" label-width="auto" :rules="rules"> |
| | | <el-row :gutter="35"> |
| | | <el-form-item v-show="false"> |
| | | <el-input v-model="ruleForm.id" /> |
| | | </el-form-item> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="任务号" prop="taskNo"> |
| | | <el-input v-model="ruleForm.taskNo" placeholder="请输入任务号" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="任务类型" prop="taskType"> |
| | | <el-select clearable v-model="ruleForm.taskType" placeholder="请选择任务类型"> |
| | | <el-option v-for="(item,index) in dl('TaskTypeEnum')" :key="index" :value="Number(item.value)" :label="`${item.name} (${item.code}) [${item.value}]`"></el-option> |
| | | |
| | | </el-select> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="来源" prop="origin"> |
| | | <el-input v-model="ruleForm.origin" placeholder="请输入来源" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="起始位置" prop="startLocate"> |
| | | <el-input v-model="ruleForm.startLocate" placeholder="请输入起始位置" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="起始巷道" prop="startRoadway"> |
| | | <el-input v-model="ruleForm.startRoadway" placeholder="请输入起始巷道" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="结束位置" prop="endLocate"> |
| | | <el-input v-model="ruleForm.endLocate" placeholder="请输入结束位置" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="目标巷道" prop="endRoadway"> |
| | | <el-input v-model="ruleForm.endRoadway" placeholder="请输入目标巷道" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="托盘号" prop="palletNo"> |
| | | <el-input v-model="ruleForm.palletNo" placeholder="请输入托盘号" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="批次号" prop="lotNo"> |
| | | <el-input v-model="ruleForm.lotNo" placeholder="请输入批次号" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="供货批次" prop="supplierLot"> |
| | | <el-input v-model="ruleForm.supplierLot" placeholder="请输入供货批次" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="物料编码" prop="skuNo"> |
| | | <el-input v-model="ruleForm.skuNo" placeholder="请输入物料编码" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="物料名称" prop="skuName"> |
| | | <el-input v-model="ruleForm.skuName" placeholder="请输入物料名称" maxlength="20" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="数量" prop="qty"> |
| | | <el-input-number v-model="ruleForm.qty" placeholder="请输入数量" clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="拆垛数量" prop="completeQty"> |
| | | <el-input-number v-model="ruleForm.completeQty" placeholder="请输入拆垛数量" clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="拣货方式" prop="unstackingMode"> |
| | | <el-input v-model="ruleForm.unstackingMode" placeholder="请输入拣货方式" maxlength="10" show-word-limit clearable /> |
| | | |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | <el-button type="primary" @click="submit">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <style lang="scss" scoped> |
| | | :deep(.el-select), |
| | | :deep(.el-input-number) { |
| | | width: 100%; |
| | | } |
| | | </style> |
| | | <script lang="ts" setup> |
| | | import { ref,onMounted } from "vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | import type { FormRules } from "element-plus"; |
| | | import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils'; |
| | | import { getDictLabelByVal as dv } from '/@/utils/dict-utils'; |
| | | import { formatDate } from '/@/utils/formatTime'; |
| | | import { addWcsTask, updateWcsTask, detailWcsTask } from "/@/api/wcs/wcsTask"; |
| | | import { getAPI } from '/@/utils/axios-utils'; |
| | | import { SysEnumApi } from '/@/api-services/api'; |
| | | |
| | | //父级传递来的参数 |
| | | var props = defineProps({ |
| | | title: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | }); |
| | | //父级传递来的函数,用于回调 |
| | | const emit = defineEmits(["reloadTable"]); |
| | | const ruleFormRef = ref(); |
| | | const isShowDialog = ref(false); |
| | | const ruleForm = ref<any>({}); |
| | | //自行添加其他规则 |
| | | const rules = ref<FormRules>({ |
| | | }); |
| | | |
| | | // 页面加载时 |
| | | onMounted(() => { |
| | | |
| | | }); |
| | | |
| | | // 打开弹窗 |
| | | const openDialog = async (row: any) => { |
| | | // ruleForm.value = JSON.parse(JSON.stringify(row)); |
| | | // 改用detail获取最新数据来编辑 |
| | | let rowData = JSON.parse(JSON.stringify(row)); |
| | | if (rowData.id) |
| | | ruleForm.value = (await detailWcsTask(rowData.id)).data.result; |
| | | else |
| | | ruleForm.value = rowData; |
| | | isShowDialog.value = true; |
| | | }; |
| | | |
| | | // 关闭弹窗 |
| | | const closeDialog = () => { |
| | | emit("reloadTable"); |
| | | isShowDialog.value = false; |
| | | }; |
| | | |
| | | // 取消 |
| | | const cancel = () => { |
| | | isShowDialog.value = false; |
| | | }; |
| | | |
| | | // 提交 |
| | | const submit = async () => { |
| | | ruleFormRef.value.validate(async (isValid: boolean, fields?: any) => { |
| | | if (isValid) { |
| | | let values = ruleForm.value; |
| | | if (ruleForm.value.id == undefined || ruleForm.value.id == null || ruleForm.value.id == "" || ruleForm.value.id == 0) { |
| | | await addWcsTask(values); |
| | | } else { |
| | | await updateWcsTask(values); |
| | | } |
| | | closeDialog(); |
| | | } else { |
| | | ElMessage({ |
| | | message: `表单有${Object.keys(fields).length}处验证失败,请修改后再提交`, |
| | | type: "error", |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //将属性或者函数暴露给父组件 |
| | | defineExpose({ openDialog }); |
| | | </script> |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | <template> |
| | | <div class="wcsTask-container"> |
| | | <el-row :gutter="8" style="width: 100%; height: 100%; flex: 1"> |
| | | <el-col :span="12" :xs="24" style="display: flex; height: 100%; flex: 1"> |
| | | <el-card class="full-table" shadow="hover" ::body-style="{ height: 'calc(100% - 51px)' }"> |
| | | <template #header> |
| | | <el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"><ele-Collection /></el-icon>任务日志 |
| | | </template> |
| | | <el-form :model="queryParams" ref="queryForm" labelWidth="90"> |
| | | <el-row> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10"> |
| | | <el-form-item label="关键字"> |
| | | <el-input v-model="queryParams.searchKey" clearable="" placeholder="请输入模糊查询关键字" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="任务号"> |
| | | <el-input v-model="queryParams.taskNo" clearable="" placeholder="请输入任务号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="任务类型"> |
| | | <el-select clearable="" v-model="queryParams.taskType" placeholder="请选择任务类型"> |
| | | <el-option v-for="(item, index) in dl('TaskTypeEnum')" :key="index" :value="item.value" |
| | | :label="`${item.name} (${item.code}) [${item.value}] `" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="状态"> |
| | | <el-select clearable="" v-model="queryParams.status" placeholder="请选择状态"> |
| | | <el-option v-for="(item, index) in dl('TaskStatusEnum')" :key="index" :value="item.value" |
| | | :label="`${item.name} (${item.code}) [${item.value}] `" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10"> |
| | | <el-form-item> |
| | | <el-button-group style="display: flex; align-items: center;"> |
| | | <el-button type="primary" icon="ele-Search" @click="handleQuery" v-auth="'wcsTask:page'"> 查询 |
| | | </el-button> |
| | | <el-button icon="ele-Refresh" @click="() => queryParams = {}"> 重置 </el-button> |
| | | <el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI" |
| | | style="margin-left:5px;"> 高级查询 </el-button> |
| | | <el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" |
| | | style="margin-left:5px;"> 隐藏 </el-button> |
| | | <el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddWcsTask" |
| | | v-auth="'wcsTask:add'"> 新增 </el-button> |
| | | |
| | | </el-button-group> |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <el-table :data="tableData" style="width: 100%" v-loading="loading" tooltip-effect="light" row-key="id" @row-click="handleClick" |
| | | @sort-change="sortChange" border=""> |
| | | <el-table-column type="index" label="序号" width="55" align="center" /> |
| | | <el-table-column prop="taskNo" label="任务号" show-overflow-tooltip="" /> |
| | | <el-table-column prop="taskType" width="85" label="任务类型" show-overflow-tooltip=""> |
| | | <template #default="scope"> |
| | | <el-tag :type="dv('TaskTypeEnum', scope.row.taskType)?.tagType"> {{ dv('TaskTypeEnum', |
| | | scope.row.taskType)?.name }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="status" width="85" label="状态" show-overflow-tooltip=""> |
| | | <template #default="scope"> |
| | | <el-tag :type="dv('TaskStatusEnum', scope.row.status)?.tagType"> {{ dv('TaskStatusEnum', |
| | | scope.row.status)?.name }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="startLocate" label="起始位置" show-overflow-tooltip="" /> |
| | | <el-table-column prop="endLocate" label="结束位置" show-overflow-tooltip="" /> |
| | | <el-table-column prop="palletNo" label="托盘号" show-overflow-tooltip="" /> |
| | | <el-table-column prop="cancelDate" label="取消时间" show-overflow-tooltip="" /> |
| | | <el-table-column prop="finishDate" label="完成时间" show-overflow-tooltip="" /> |
| | | <el-table-column label="修改记录" width="80" align="center" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <ModifyRecord :data="scope.row" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="130" align="center" fixed="right" show-overflow-tooltip="" |
| | | v-if="auth('wcsTask:complete') || auth('wcsTask:cancell')"> |
| | | <template #default="scope"> |
| | | <!-- <el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditWcsTask(scope.row)" |
| | | v-auth="'wcsTask:update'"> 编辑 </el-button> |
| | | <el-button icon="ele-Delete" size="small" text="" type="primary" @click="delWcsTask(scope.row)" |
| | | v-auth="'wcsTask:delete'"> 删除 </el-button> --> |
| | | <el-button icon="ele-Check" size="small" text="" type="primary" @click="completeTask(scope.row)" |
| | | v-auth="'wcsTask:complete'"> 完成 </el-button> |
| | | <el-button icon="ele-Close" size="small" text="" type="primary" @click="cancellTask(scope.row)" |
| | | v-auth="'wcsTask:cancell'"> 取消 </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination v-model:currentPage="tableParams.page" v-model:page-size="tableParams.pageSize" |
| | | :total="tableParams.total" :page-sizes="[10, 20, 50, 100, 200, 500]" size="small" background="" |
| | | @size-change="handleSizeChange" @current-change="handleCurrentChange" |
| | | layout="total, sizes, prev, pager, next, jumper" /> |
| | | <printDialog ref="printDialogRef" :title="printWcsTaskTitle" @reloadTable="handleQuery" /> |
| | | <editDialog ref="editDialogRef" :title="editWcsTaskTitle" @reloadTable="handleQuery" /> |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :span="12" :xs="24" style="display: flex; height: 100%; flex: 1"> |
| | | <el-card class="full-table" shadow="hover" :body-style="{ height: 'calc(100% - 51px)' }"> |
| | | <template #header> |
| | | <el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"><ele-Collection /></el-icon>任务详情 |
| | | </template> |
| | | <el-form :model="queryParams2" ref="queryForm2" labelWidth="90"> |
| | | <el-row> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10"> |
| | | <el-form-item label="任务号"> |
| | | <el-input v-model="queryParams2.taskNo" clearable="" placeholder="请输入任务号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10"> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="ele-Search" @click="handleQuery2"> 查询 |
| | | </el-button> |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <el-table :data="tableData2" style="width: 100%" v-loading="loading" tooltip-effect="light" row-key="id" border=""> |
| | | <el-table-column type="index" label="序号" width="55" align="center" /> |
| | | <el-table-column prop="taskNo" label="任务号" show-overflow-tooltip="" /> |
| | | <el-table-column prop="plcId" label="交互工位号" show-overflow-tooltip="" /> |
| | | <el-table-column prop="plcName" label="交互位置" show-overflow-tooltip="" /> |
| | | <el-table-column prop="interactiveMsg" label="交互信息" show-overflow-tooltip="" /> |
| | | <el-table-column label="修改记录" width="80" align="center" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <ModifyRecord :data="scope.row" /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination v-model:currentPage="tableParams2.page" v-model:page-size="tableParams2.pageSize" |
| | | :total="tableParams2.total" :page-sizes="[10, 20, 50, 100, 200, 500]" size="small" background="" |
| | | @size-change="handleSizeChange2" @current-change="handleCurrentChange2" |
| | | layout="total, sizes, prev, pager, next, jumper" /> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts" setup="" name="wcsTask"> |
| | | import ModifyRecord from '/@/components/table/modifyRecord.vue'; |
| | | import { ref } from "vue"; |
| | | import { ElMessageBox, ElMessage } from "element-plus"; |
| | | import { auth } from '/@/utils/authFunction'; |
| | | |
| | | import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils'; |
| | | import { getDictLabelByVal as dv } from '/@/utils/dict-utils'; |
| | | import { formatDate } from '/@/utils/formatTime'; |
| | | |
| | | |
| | | import printDialog from '/@/views/system/print/component/hiprint/preview.vue' |
| | | import editDialog from '/@/views/wcs/wcsTask/component/editDialog.vue' |
| | | import { pageWcsTask, deleteWcsTask } from '/@/api/wcs/wcsTask'; |
| | | import { pageWcsMonitorTask } from '/@/api/wcs/wcsTaskMonitor'; |
| | | import { getAPI } from '/@/utils/axios-utils'; |
| | | import { SysEnumApi } from '/@/api-services/api'; |
| | | import commonFunction from '/@/utils/commonFunction'; |
| | | |
| | | const showAdvanceQueryUI = ref(false); |
| | | const printDialogRef = ref(); |
| | | const editDialogRef = ref(); |
| | | const loading = ref(false); |
| | | const tableData = ref<any>([]); |
| | | const tableData2 = ref<any>([]); |
| | | const queryParams = ref<any>({}); |
| | | const queryParams2 = ref<any>({}); |
| | | const tableParams = ref({ |
| | | page: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | | }); |
| | | const tableParams2 = ref({ |
| | | page: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | | }); |
| | | const printWcsTaskTitle = ref(""); |
| | | const editWcsTaskTitle = ref(""); |
| | | |
| | | // 改变高级查询的控件显示状态 |
| | | const changeAdvanceQueryUI = () => { |
| | | showAdvanceQueryUI.value = !showAdvanceQueryUI.value; |
| | | } |
| | | |
| | | // 查询操作 |
| | | const handleQuery = async () => { |
| | | loading.value = true; |
| | | var res = await pageWcsTask(Object.assign(queryParams.value, tableParams.value)); |
| | | tableData.value = res.data.result?.items ?? []; |
| | | tableParams.value.total = res.data.result?.total; |
| | | loading.value = false; |
| | | }; |
| | | // 查询操作 |
| | | const handleQuery2 = async () => { |
| | | loading.value = true; |
| | | var res = await pageWcsMonitorTask(Object.assign(queryParams2.value, tableParams2.value)); |
| | | tableData2.value = res.data.result?.items ?? []; |
| | | tableParams2.value.total = res.data.result?.total; |
| | | loading.value = false; |
| | | }; |
| | | |
| | | // 列排序 |
| | | const sortChange = async (column: any) => { |
| | | queryParams.value.field = column.prop; |
| | | queryParams.value.order = column.order; |
| | | await handleQuery(); |
| | | }; |
| | | |
| | | // 打开新增页面 |
| | | const openAddWcsTask = () => { |
| | | editWcsTaskTitle.value = '添加任务表'; |
| | | editDialogRef.value.openDialog({}); |
| | | }; |
| | | |
| | | // 打开打印页面 |
| | | const openPrintWcsTask = async (row: any) => { |
| | | printWcsTaskTitle.value = '打印任务表'; |
| | | } |
| | | |
| | | // 打开编辑页面 |
| | | const openEditWcsTask = (row: any) => { |
| | | editWcsTaskTitle.value = '编辑任务表'; |
| | | editDialogRef.value.openDialog(row); |
| | | }; |
| | | //完成任务 |
| | | const completeTask = (row: any) => { |
| | | |
| | | } |
| | | //取消任务 |
| | | const cancellTask = (row: any) => { |
| | | |
| | | } |
| | | // 点击表格 |
| | | const handleClick = (row: any, event: any, column: any) => { |
| | | queryParams2.value.taskNo = row.taskNo; |
| | | handleQuery2(); |
| | | }; |
| | | // 删除 |
| | | const delWcsTask = (row: any) => { |
| | | ElMessageBox.confirm(`确定要删除吗?`, "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(async () => { |
| | | await deleteWcsTask(row); |
| | | handleQuery(); |
| | | ElMessage.success("删除成功"); |
| | | }) |
| | | .catch(() => { }); |
| | | }; |
| | | |
| | | // 改变页面容量 |
| | | const handleSizeChange = (val: number) => { |
| | | tableParams.value.pageSize = val; |
| | | handleQuery(); |
| | | }; |
| | | |
| | | // 改变页码序号 |
| | | const handleCurrentChange = (val: number) => { |
| | | tableParams.value.page = val; |
| | | handleQuery(); |
| | | }; |
| | | // 改变页面容量 |
| | | const handleSizeChange2 = (val: number) => { |
| | | tableParams2.value.pageSize = val; |
| | | handleQuery(); |
| | | }; |
| | | |
| | | // 改变页码序号 |
| | | const handleCurrentChange2 = (val: number) => { |
| | | tableParams2.value.page = val; |
| | | handleQuery(); |
| | | }; |
| | | handleQuery(); |
| | | handleQuery2(); |
| | | </script> |
| | | <style scoped> |
| | | :deep(.el-input), |
| | | :deep(.el-select), |
| | | :deep(.el-input-number) { |
| | | width: 100%; |
| | | } |
| | | </style> |
| | |
| | | "isolatedModules": true /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */, |
| | | |
| | | /* Strict Type-Checking Options */ |
| | | "strict": true /* Enable all strict type-checking options. */, |
| | | // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ |
| | | // "strictNullChecks": true, /* Enable strict null checks. */ |
| | | // "strictFunctionTypes": true, /* Enable strict checking of function types. */ |
| | | // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ |
| | | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ |
| | | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ |
| | | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ |
| | | "strict": false /* Enable all strict type-checking options. */, |
| | | "noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */ |
| | | "strictNullChecks": false, /* Enable strict null checks. */ |
| | | "strictFunctionTypes": false, /* Enable strict checking of function types. */ |
| | | "strictBindCallApply": false, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ |
| | | "strictPropertyInitialization": false, /* Enable strict checking of property initialization in classes. */ |
| | | "noImplicitThis": false, /* Raise error on 'this' expressions with an implied 'any' type. */ |
| | | "alwaysStrict": false, /* Parse in strict mode and emit "use strict" for each source file. */ |
| | | |
| | | /* Additional Checks */ |
| | | // "noUnusedLocals": true, /* Report errors on unused locals. */ |
| | |
| | | "skipLibCheck": true /* Skip type checking of declaration files. */, |
| | | "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ |
| | | }, |
| | | "include": ["src/**/*.ts", "src/**/*.vue", "src/**/*.tsx", "src/**/*.d.ts"], // **Represents any directory, and * represents any file. Indicates that all files in the src directory will be compiled |
| | | "include": [ |
| | | "src/**/*.ts", |
| | | "src/**/*.d.ts", |
| | | "src/**/*.tsx", |
| | | "src/**/*.vue" |
| | | ], // **Represents any directory, and * represents any file. Indicates that all files in the src directory will be compiled |
| | | "exclude": ["node_modules", "dist"] // Indicates the file directory that does not need to be compiled |
| | | } |