diff --git a/DOAN.Admin.WebApi/Controllers/MES/Product/ProWorkorderController.cs b/DOAN.Admin.WebApi/Controllers/MES/Product/ProWorkorderController.cs index 531025a..5284dcb 100644 --- a/DOAN.Admin.WebApi/Controllers/MES/Product/ProWorkorderController.cs +++ b/DOAN.Admin.WebApi/Controllers/MES/Product/ProWorkorderController.cs @@ -348,13 +348,13 @@ namespace DOAN.Admin.WebApi.Controllers //TODO 工单变更日志 [HttpGet("workorder_log")] - public IActionResult WorkOrderLog(string workorder, string log) + public IActionResult WorkOrderLog(string workorder) { if (string.IsNullOrEmpty(workorder)) { return SUCCESS(null); } - var response = _ProWorkorderService.WorkOrderLog(workorder, log, HttpContext.GetName()); + var response = _ProWorkorderService.WorkOrderLog(workorder); return SUCCESS(response); } diff --git a/DOAN.Service/MES/Product/IService/IProWorkorderService.cs b/DOAN.Service/MES/Product/IService/IProWorkorderService.cs index f37d255..eba0d83 100644 --- a/DOAN.Service/MES/Product/IService/IProWorkorderService.cs +++ b/DOAN.Service/MES/Product/IService/IProWorkorderService.cs @@ -62,7 +62,7 @@ namespace DOAN.Service.MES.product.IService List SearchBOMNum(string workorder_num); - int WorkOrderLog(string workorder, string log, string Operator); + List WorkOrderLog(string workorder); Task<(string, Stream)> ExportPDFByQuestPDFDemo(string[] workorderArray); Task PrintTicketsByTemplate(ProWorkorderExportDto param); diff --git a/DOAN.Service/MES/Product/IService/IProWorkorderUtilityService.cs b/DOAN.Service/MES/Product/IService/IProWorkorderUtilityService.cs index a400951..4da9e56 100644 --- a/DOAN.Service/MES/Product/IService/IProWorkorderUtilityService.cs +++ b/DOAN.Service/MES/Product/IService/IProWorkorderUtilityService.cs @@ -34,13 +34,13 @@ namespace DOAN.Service.MES.product.IService List SearchBOMNum(string workorder_num); /// - /// 工单日志 + /// 工单变更日志 /// /// /// /// /// - int WorkOrderLog(string workorder, string log, string Operator); + List WorkOrderLog(string workorder); /// /// 导出PDF diff --git a/DOAN.Service/MES/Product/ProWorkorderService.cs b/DOAN.Service/MES/Product/ProWorkorderService.cs index ce256c8..1277a6e 100644 --- a/DOAN.Service/MES/Product/ProWorkorderService.cs +++ b/DOAN.Service/MES/Product/ProWorkorderService.cs @@ -222,9 +222,9 @@ namespace DOAN.Service.MES.product /// /// /// - public int WorkOrderLog(string workorder, string log, string Operator) + public List WorkOrderLog(string workorder) { - return _utilityService.WorkOrderLog(workorder, log, Operator); + return _utilityService.WorkOrderLog(workorder); } /// diff --git a/DOAN.Service/MES/Product/ProWorkorderUtilityService.cs b/DOAN.Service/MES/Product/ProWorkorderUtilityService.cs index 281b2e4..5d5726d 100644 --- a/DOAN.Service/MES/Product/ProWorkorderUtilityService.cs +++ b/DOAN.Service/MES/Product/ProWorkorderUtilityService.cs @@ -9,7 +9,10 @@ namespace DOAN.Service.MES.product /// /// 工单工具服务 /// - [AppService(ServiceType = typeof(IProWorkorderUtilityService), ServiceLifetime = LifeTime.Transient)] + [AppService( + ServiceType = typeof(IProWorkorderUtilityService), + ServiceLifetime = LifeTime.Transient + )] public class ProWorkorderUtilityService : BaseService, IProWorkorderUtilityService { /// @@ -109,17 +112,20 @@ namespace DOAN.Service.MES.product } /// - /// 工单日志 + /// 工单变更日志 /// /// /// /// /// - public int WorkOrderLog(string workorder, string log, string Operator) + public List WorkOrderLog(string workorder) { - // 这里需要实现工单日志记录逻辑 - // 暂时返回成功 - return 1; + var result = Context + .Queryable() + .Where(it => it.Workorder == workorder) + .OrderByDescending(it => it.ChangeTime) + .ToList(); + return result; } ///