diff --git a/ZR.Admin.WebApi/Controllers/mes/ql/PainLab02Controller.cs b/ZR.Admin.WebApi/Controllers/mes/ql/PainLab02Controller.cs index 68cc4ce6..dd8aeb9b 100644 --- a/ZR.Admin.WebApi/Controllers/mes/ql/PainLab02Controller.cs +++ b/ZR.Admin.WebApi/Controllers/mes/ql/PainLab02Controller.cs @@ -40,8 +40,8 @@ namespace ZR.Admin.WebApi.Controllers.mes.ql [HttpGet("gettestlist")] public IActionResult GetTestlist(DateTime starttime, DateTime endTime, int pageNum, int pageSize) { - starttime = starttime.AddHours(8); - endTime = endTime.AddHours(8); + //starttime = starttime.AddHours(8); + //endTime = endTime.AddHours(8); // 时间要增加,8个小时 (List, int) lst = plTestService.GetPLTestTable(starttime, endTime, pageNum, pageSize); diff --git a/ZR.Admin.WebApi/Controllers/mes/ql/PainLab03Controller.cs b/ZR.Admin.WebApi/Controllers/mes/ql/PainLab03Controller.cs index 0bfb97a5..d45e9a5b 100644 --- a/ZR.Admin.WebApi/Controllers/mes/ql/PainLab03Controller.cs +++ b/ZR.Admin.WebApi/Controllers/mes/ql/PainLab03Controller.cs @@ -41,8 +41,8 @@ namespace ZR.Admin.WebApi.Controllers.mes.ql public IActionResult GetBatchlist(DateTime starttime, DateTime endTime, int pageNum, int pageSize) { - starttime = starttime.AddHours(8); - endTime = endTime.AddHours(8); + //starttime = starttime.AddHours(8); + //endTime = endTime.AddHours(8); // 时间要增加,8个小时 (List, int) lst = plBatchService.GetPLBatchTable(starttime, endTime, pageNum, pageSize); diff --git a/ZR.Admin.WebApi/Controllers/mes/ql/PainLabController.cs b/ZR.Admin.WebApi/Controllers/mes/ql/PainLabController.cs index 19bb486b..a43766c8 100644 --- a/ZR.Admin.WebApi/Controllers/mes/ql/PainLabController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/ql/PainLabController.cs @@ -41,8 +41,8 @@ namespace ZR.Admin.WebApi.Controllers.mes.ql [HttpGet("getrawmateriallist")] public IActionResult GetRawMateriallist(DateTime starttime, DateTime endTime, int pageNum, int pageSize) { - starttime = starttime.AddHours(8); - endTime = endTime.AddHours(8); + //starttime = starttime.AddHours(8); + //endTime = endTime.AddHours(8); // 时间要增加,8个小时 (List, int) lst = plRawMaterialService.GetRawMaterialTable(starttime, endTime, pageNum, pageSize); diff --git a/ZR.Service/mes/ql/PLBatchService.cs b/ZR.Service/mes/ql/PLBatchService.cs index 4d9ed2be..fe52e528 100644 --- a/ZR.Service/mes/ql/PLBatchService.cs +++ b/ZR.Service/mes/ql/PLBatchService.cs @@ -76,7 +76,10 @@ namespace ZR.Service.mes.ql public (List, int) GetPLBatchTable(DateTime starttime, DateTime endTime, int pageNum, int pageSize) { int totalNum = 0; - List data = Context.Queryable().Where(it => it.Id > 0).OrderBy(it => it.Id).ToPageList(pageNum, pageSize, ref totalNum); + List data = Context.Queryable() + .Where(it => it.CreatedTime > starttime.ToLocalTime() && it.CreatedTime <= endTime.ToLocalTime()) + .OrderBy(it => it.Id) + .ToPageList(pageNum, pageSize, ref totalNum); return (data, totalNum); } diff --git a/ZR.Service/mes/ql/PLRawMaterialService.cs b/ZR.Service/mes/ql/PLRawMaterialService.cs index c3e3c4a8..02be8d4c 100644 --- a/ZR.Service/mes/ql/PLRawMaterialService.cs +++ b/ZR.Service/mes/ql/PLRawMaterialService.cs @@ -101,7 +101,10 @@ namespace ZR.Service.mes.ql //return (data, totalNum); int totalNum = 0; - List data = Context.Queryable().Where(it => it.Id > 0).OrderBy(it => it.Id).ToPageList(pageNum, pageSize, ref totalNum); + List data = Context.Queryable() + .Where(it => it.CreatedTime > starttime.ToLocalTime() && it.CreatedTime<= endTime.ToLocalTime()) + .OrderBy(it => it.Id) + .ToPageList(pageNum, pageSize, ref totalNum); return (data, totalNum); //return (Context.Queryable().Where(it => it.Id > 0).ToList(),100); } diff --git a/ZR.Service/mes/ql/PLTestService.cs b/ZR.Service/mes/ql/PLTestService.cs index 2267558a..7e0aaf70 100644 --- a/ZR.Service/mes/ql/PLTestService.cs +++ b/ZR.Service/mes/ql/PLTestService.cs @@ -76,7 +76,10 @@ namespace ZR.Service.mes.ql public (List, int) GetPLTestTable(DateTime starttime, DateTime endTime, int pageNum, int pageSize) { int totalNum = 0; - List data = Context.Queryable().Where(it => it.Id > 0).OrderBy(it => it.Id).ToPageList(pageNum, pageSize, ref totalNum); + List data = Context.Queryable() + .Where(it => it.CreatedTime > starttime.ToLocalTime() && it.CreatedTime <= endTime.ToLocalTime()) + .OrderBy(it => it.Id) + .ToPageList(pageNum, pageSize, ref totalNum); return (data, totalNum); }