From 4c3c24f6e7ea53e50782a910aa471882bfc2f12e Mon Sep 17 00:00:00 2001 From: chenlin Date: Tue, 27 Jan 2026 09:04:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=BC=80=E6=9C=BA=E5=81=9C?= =?UTF-8?q?=E6=9C=BA=20=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/MES/report/ReportController.cs | 6 +++--- DOAN.Admin.WebApi/appsettings.Development.json | 2 +- DOAN.Model/MES/report/Dto/ReportDto.cs | 4 ++-- DOAN.Service/MES/report/ReportService.cs | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/DOAN.Admin.WebApi/Controllers/MES/report/ReportController.cs b/DOAN.Admin.WebApi/Controllers/MES/report/ReportController.cs index a2cf42e..ebe2e7b 100644 --- a/DOAN.Admin.WebApi/Controllers/MES/report/ReportController.cs +++ b/DOAN.Admin.WebApi/Controllers/MES/report/ReportController.cs @@ -41,7 +41,7 @@ namespace DOAN.WebApi.Controllers /// /// [HttpGet("devicePoweronRate")] - public IActionResult DevicePoweronRate(DeviceReportDto param) + public IActionResult DevicePoweronRate([FromQuery] DeviceReportDto param) { var response = _ReportService.DevicePoweronRate(param); return SUCCESS(response); @@ -52,7 +52,7 @@ namespace DOAN.WebApi.Controllers /// /// [HttpGet("deviceDowntimeRate")] - public IActionResult DeviceDowntimeRate(DeviceReportDto param) + public IActionResult DeviceDowntimeRate([FromQuery] DeviceReportDto param) { var response = _ReportService.DeviceDowntimeRate(param); return SUCCESS(response); @@ -63,7 +63,7 @@ namespace DOAN.WebApi.Controllers /// /// [HttpGet("productionCompletionRate")] - public IActionResult ProductionCompletionRate(string groupName) + public IActionResult ProductionCompletionRate([FromQuery] string groupName) { var response = _ReportService.ProductionCompletionRate(groupName, DateTime.Today); return SUCCESS(response); diff --git a/DOAN.Admin.WebApi/appsettings.Development.json b/DOAN.Admin.WebApi/appsettings.Development.json index f9986e9..84669b3 100644 --- a/DOAN.Admin.WebApi/appsettings.Development.json +++ b/DOAN.Admin.WebApi/appsettings.Development.json @@ -9,7 +9,7 @@ "dbConfigs": [ { // "Conn": "Data Source=139.224.232.211;User ID=root;Password=doantech123;Initial Catalog=GXAssembly;Port=3308", - //"Conn": "Data Source=118.25.48.201;User ID=root;Password=123456;Initial Catalog=gxassembly;Port=3306;AllowLoadLocalInfile=true", + //"Conn": "Data Source=47.101.40.214;User ID=root;Password=Rizo123456@;Initial Catalog=gxassembly;Port=3306;AllowLoadLocalInfile=true", "Conn": "Data Source=192.168.1.48;User ID=root;Password=123456;Initial Catalog=GXAssembly;Port=3306;AllowLoadLocalInfile=true", // "Conn": "Data Source=127.0.0.1;User ID=root;Password=123456;Initial Catalog=GXAssembly;Port=3306", //"Conn": "Data Source=192.168.50.163;User ID=root;Password=123456;Initial Catalog=GXAssembly;Port=3306", diff --git a/DOAN.Model/MES/report/Dto/ReportDto.cs b/DOAN.Model/MES/report/Dto/ReportDto.cs index 88c22f9..b3720b7 100644 --- a/DOAN.Model/MES/report/Dto/ReportDto.cs +++ b/DOAN.Model/MES/report/Dto/ReportDto.cs @@ -13,7 +13,7 @@ namespace DOAN.Model.MES public class DeviceReportDto //: PagerInfo { - public DateTime StartDate { get; set; } - public DateTime EndDate { get; set; } + public DateTime StartTime { get; set; } + public DateTime EndTime { get; set; } } } diff --git a/DOAN.Service/MES/report/ReportService.cs b/DOAN.Service/MES/report/ReportService.cs index 4a7959b..130bd75 100644 --- a/DOAN.Service/MES/report/ReportService.cs +++ b/DOAN.Service/MES/report/ReportService.cs @@ -24,7 +24,7 @@ namespace DOAN.Service.MES.report .LeftJoin((a, b) => a.FkShift == b.Id) .LeftJoin((a, b, c) => a.GroupCode == c.GroupCode && c.WorkorderDate.Value.ToString("yyyy-MM-dd") == a.ScheduleDate.Value.ToString("yyyy-MM-dd")) - .Where((a, b, c) => a.ScheduleDate.Value>= param.StartDate && a.ScheduleDate.Value <= param.EndDate) + .Where((a, b, c) => a.ScheduleDate.Value>= param.StartTime && a.ScheduleDate.Value <= param.EndTime) .Select((a, b, c) => new { @@ -94,8 +94,8 @@ namespace DOAN.Service.MES.report list = Context.Queryable() .LeftJoin((a, b) => a.Code == b.LineCode - && b.WorkorderDate.Value>= param.StartDate - && b.WorkorderDate.Value<= param.EndDate) + && b.WorkorderDate.Value>= param.StartTime + && b.WorkorderDate.Value<= param.EndTime) .OrderBy((a,b)=>a.Id) .Select((a, b) => new DeviceDowntimeRateModel @@ -116,8 +116,8 @@ namespace DOAN.Service.MES.report .Where(t=>t.FaultDict== "设备异常" && t.StartTime.HasValue && t.EndTime.HasValue - && t.EndTime.Value>= param.StartDate - && t.EndTime.Value<= param.EndDate) + && t.EndTime.Value>= param.StartTime + && t.EndTime.Value<= param.EndTime) .Select(it => new { it.LineCode,