From 5610ce8f05f45e8da7bffa286c6db5c61ea06a79 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期四, 16 十月 2025 17:00:12 +0800
Subject: [PATCH] 改为按采集时间查询采集数
---
Services/MesOrderStaManager.cs | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/Services/MesOrderStaManager.cs b/Services/MesOrderStaManager.cs
index 62948a3..89adf53 100644
--- a/Services/MesOrderStaManager.cs
+++ b/Services/MesOrderStaManager.cs
@@ -111,7 +111,11 @@
var automaticIpqcFirstCheck =
mesQaItemsDetect02Manager
.AutomaticIpqcFirstCheck(womdaa.Daa001);
- if (!automaticIpqcFirstCheck) throw new Exception("棣栨鐢熸垚澶辫触");
+ if (!automaticIpqcFirstCheck)
+ {
+ Console.WriteLine($"鑷姩棣栨澶辫触锛屽伐鍗曞彿锛歿womdaa.Daa001}");
+ throw new Exception("棣栨鐢熸垚澶辫触");
+ }
// 鑾峰彇褰撳墠鏃堕棿
var s1 = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
@@ -134,7 +138,7 @@
var editDate = DateTime.Now.ToString("yyyy-MM-dd");
// 鍙戦�丠TTP璇锋眰鍒版暟鎹埛鏂版帴鍙�
- MesNumerical mesNumerical = null;
+ MesNumericalBycl mesNumerical = null;
try
{
using (var httpClient = new HttpClient())
@@ -161,7 +165,7 @@
if (responseObj != null && responseObj.code == 200)
{
// 璇锋眰鎴愬姛锛岃幏鍙朚esNumerical鏁版嵁
- mesNumerical = Db.Queryable<MesNumerical>()
+ mesNumerical = Db.Queryable<MesNumericalBycl>()
.Where(s => s.EditDate == editDate
&& s.MachineNo == entity.MachineNo)
.OrderByDescending(s => s.Id)
@@ -451,7 +455,7 @@
// var reportingOkQty =
// Convert.ToDecimal(vOrder.todayOutput) -
// reporting.OkQty;
- var CjQty = Db.Queryable<MesNumerical>()
+ var CjQty = Db.Queryable<MesNumericalBycl>()
.Where(s => s.MachineNo == entity.MachineNo && s.EditDate == date)
.OrderByDescending(s=>s.CjTiem)
.Select<long?>(s=>s.CjNum).First();
--
Gitblit v1.9.3