From 34ad8ad8e238d54d9695da9e8d101579c42516bb Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期六, 18 四月 2026 22:40:02 +0800
Subject: [PATCH] fix(RobotJob): 修正机器人任务处理逻辑和注释错误
---
Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/MESDeviceConfigService.cs | 61 ++++++++++++++++++++++++++++++
1 files changed, 61 insertions(+), 0 deletions(-)
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/MESDeviceConfigService.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/MESDeviceConfigService.cs
new file mode 100644
index 0000000..b3189e8
--- /dev/null
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/MESDeviceConfigService.cs
@@ -0,0 +1,61 @@
+using WIDESEA_Core;
+using WIDESEA_Core.BaseRepository;
+using WIDESEA_Core.BaseServices;
+using WIDESEA_IBasicService;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_StockService
+{
+ /// <summary>
+ /// MES璁惧閰嶇疆鏈嶅姟瀹炵幇绫�
+ /// </summary>
+ public class MESDeviceConfigService : ServiceBase<Dt_MESDeviceConfig, IRepository<Dt_MESDeviceConfig>>, IMESDeviceConfigService
+ {
+ /// <summary>
+ /// 鑾峰彇MES璁惧閰嶇疆浠撳偍鎺ュ彛
+ /// </summary>
+ public IRepository<Dt_MESDeviceConfig> Repository => BaseDal;
+
+ /// <summary>
+ /// 鏋勯�犲嚱鏁�
+ /// </summary>
+ /// <param name="baseDal">鍩虹鏁版嵁璁块棶瀵硅薄</param>
+ public MESDeviceConfigService(IRepository<Dt_MESDeviceConfig> baseDal) : base(baseDal)
+ {
+ }
+
+ /// <summary>
+ /// 鏍规嵁璁惧鍚嶇О鑾峰彇MES璁惧閰嶇疆锛堢簿纭尮閰嶏級
+ /// </summary>
+ /// <param name="deviceName">璁惧鍚嶇О</param>
+ /// <returns>MES璁惧閰嶇疆锛屽鏋滄湭鎵惧埌鍒欒繑鍥瀗ull</returns>
+ public Dt_MESDeviceConfig? GetByDeviceName(string deviceName)
+ {
+ if (string.IsNullOrWhiteSpace(deviceName))
+ {
+ return null;
+ }
+
+ return BaseDal.QueryFirst(x => x.DeviceName == deviceName);
+ }
+
+ /// <summary>
+ /// 鏍规嵁璁惧鍚嶇О鍜屼粨搴撶紪鐮佽幏鍙朚ES璁惧閰嶇疆
+ /// 鍖归厤鏉′欢锛欴eviceName绮剧‘鍖归厤涓旓紙WarehouseCode涓虹┖鎴栫瓑浜庢寚瀹氱殑浠撳簱缂栫爜锛�
+ /// </summary>
+ /// <param name="deviceName">璁惧鍚嶇О</param>
+ /// <param name="warehouseCode">浠撳簱缂栫爜</param>
+ /// <returns>MES璁惧閰嶇疆锛屽鏋滄湭鎵惧埌鍒欒繑鍥瀗ull</returns>
+ public Dt_MESDeviceConfig? GetByDeviceNameAndWarehouse(string deviceName, string warehouseCode)
+ {
+ if (string.IsNullOrWhiteSpace(deviceName))
+ {
+ return null;
+ }
+
+ return BaseDal.QueryFirst(x =>
+ x.DeviceName == deviceName &&
+ (string.IsNullOrEmpty(x.WarehouseCode) || x.WarehouseCode == warehouseCode));
+ }
+ }
+}
--
Gitblit v1.9.3