From 19a5a9c321752f815091d9732307b2d29b03a004 Mon Sep 17 00:00:00 2001 From: "qianhao.xu" Date: Mon, 23 Dec 2024 18:02:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=8A=E6=97=A5=E5=90=84=E5=B7=A5=E5=BA=8F?= =?UTF-8?q?=E5=AE=9E=E6=97=B6=E7=B4=AF=E8=AE=A1=E5=AE=8C=E5=B7=A5=E6=95=B0?= =?UTF-8?q?=E6=8A=98=E7=BA=BF=E5=9B=BE=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MES/SmartScreen/Product/ProductSmartScreenService.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DOAN.Service/MES/SmartScreen/Product/ProductSmartScreenService.cs b/DOAN.Service/MES/SmartScreen/Product/ProductSmartScreenService.cs index b317def..59286e1 100644 --- a/DOAN.Service/MES/SmartScreen/Product/ProductSmartScreenService.cs +++ b/DOAN.Service/MES/SmartScreen/Product/ProductSmartScreenService.cs @@ -330,7 +330,8 @@ namespace DOAN.Service.MES.SmartScreen.Product //1.查询各个工序 int[] processArray= Context.Queryable() .Where(it => it.JobDateTime > DateTime.Today && it.JobDateTime < DateTime.Today.AddDays(1)) - .Select(it => it.ProcessId) + .OrderBy(it => it.ProcessId) + .Select(it => it.ProcessId) .Distinct() .ToArray(); //1 X轴 @@ -392,7 +393,8 @@ namespace DOAN.Service.MES.SmartScreen.Product // 和X轴一 一对应 - for (int j = 0; j < DateTimeArray.Count; j++) + int currentNum = Array.IndexOf(DateTimeArrayString.ToArray(), echartsSeriesDatas.Select(it => it.Name).LastOrDefault()); + for (int j = 0; j < currentNum; j++) { int point = 0; foreach (var item in echartsSeriesDatas)