From 76eef0389848065963a295c66163a630697054fa Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期日, 07 七月 2024 09:47:01 +0800
Subject: [PATCH] PDA
---
代码管理/PCS/WCS_Server/WIDESEA_WCS/Common/equipment/Wheel_info_trace.cs | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/equipment/Wheel_info_trace.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/equipment/Wheel_info_trace.cs"
index b9cc677..bd144c8 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/equipment/Wheel_info_trace.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/equipment/Wheel_info_trace.cs"
@@ -63,7 +63,7 @@
}
}
#region 鏇挎崲鑰丳CS鏃朵娇鐢�
- if (/*StackerDBItem.oi_on == 1*/true)
+ if (StackerDBItem.oi_on == 1)
{
if (string.IsNullOrEmpty(StackerDBItem.o_wp_id)) throw new Exception($"{StackerDBItem.Name}锛歋N鍙蜂负绌�");
if (string.IsNullOrEmpty(StackerDBItem.o_online_time)) throw new Exception($"{StackerDBItem.Name}锛氫笂绾挎椂闂翠负绌�");
@@ -76,7 +76,7 @@
info.trace_status = "寰呭姞宸�";
info.trace_online_time = time;
info.trace_line_number = StackerDBItem.Name;
- var Work = workinfoRepository.Find(x => x.SN == info.trace_SN && x.processCode == "17").FirstOrDefault();
+ var Work = workinfoRepository.Find(x => x.SN == info.trace_SN && (key.Key.Contains("4鍗曞厓") ? x.processCode == "28" : x.processCode == "17")).OrderByDescending(x => x.CreateTime).FirstOrDefault();
if (Work != null)
{
info.trace_workOrder = Work.workOrder;
@@ -87,7 +87,9 @@
info.trace_billetID = Work.billetID.ToString();
}
traceRepository.Add(info, true);
- //client.Write(key.FirstOrDefault(x => x.name == "oi_on").dbAddress, (byte)0);//淇″彿澶嶄綅
+
+
+ client.Write(key.FirstOrDefault(x => x.name == "oi_on").dbAddress, (byte)0);//淇″彿澶嶄綅
}
#endregion
}
@@ -155,7 +157,7 @@
}
}
#region 鏇挎崲鑰丳CS鏃朵娇鐢�
- if (/*StackerDBItem.oi_on == 1*/true)
+ if (StackerDBItem.oi_on == 1)
{
if (string.IsNullOrEmpty(StackerDBItem.o_wp_id)) throw new Exception($"{StackerDBItem.Name}锛歋N鍙蜂负绌�");
var info = traceRepository.Find(x => x.trace_SN == StackerDBItem.o_wp_id).FirstOrDefault();
@@ -172,7 +174,7 @@
info.trace_mach_number = StackerDBItem.Name;
traceRepository.Update(info, x => new { x.trace_mach_start_time, x.trace_mach_finish_time, x.trace_operator, x.trace_shift, x.trace_mach_statu, x.trace_process, x.trace_mach_number }, true);
}
- //client.Write(key.FirstOrDefault(x => x.name == "oi_on").dbAddress, (byte)0);//淇″彿澶嶄綅
+ client.Write(key.FirstOrDefault(x => x.name == "oi_on").dbAddress, (byte)0);//淇″彿澶嶄綅
}
#endregion
}
@@ -228,7 +230,7 @@
}
}
#region 鏇挎崲鑰丳CS鏃朵娇鐢�
- if (/*StackerDBItem.oi_on == 1*/true)
+ if (StackerDBItem.oi_on == 1)
{
if (string.IsNullOrEmpty(StackerDBItem.o_wp_id)) throw new Exception($"{StackerDBItem.Name}锛歋N鍙蜂负绌�");
var info = traceRepository.Find(x => x.trace_SN == StackerDBItem.o_wp_id).FirstOrDefault();
@@ -240,7 +242,7 @@
//info.trace_line_number = info.trace_line_number + StackerDBItem.Name;
traceRepository.Update(info, x => new { x.trace_offline_time, x.trace_direction }, true);
}
- //client.Write(key.FirstOrDefault(x => x.name == "oi_on").dbAddress, (byte)0);//淇″彿澶嶄綅
+ client.Write(key.FirstOrDefault(x => x.name == "oi_on").dbAddress, (byte)0);//淇″彿澶嶄綅
}
#endregion
}
--
Gitblit v1.9.3