From ed82ad3a75afb740911cd9128fbada56566a571f Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周一, 23 12月 2024 09:15:33 +0800
Subject: [PATCH] 040310 许工说这个工位机器人达不到,强行锁定 【Editby shaocx,2024-12-23】
---
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ThirdInterFace/ThirdInterFaceService.cs | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ThirdInterFace/ThirdInterFaceService.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ThirdInterFace/ThirdInterFaceService.cs
index 5d69793..c849f71 100644
--- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ThirdInterFace/ThirdInterFaceService.cs
+++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ThirdInterFace/ThirdInterFaceService.cs
@@ -45,6 +45,25 @@
throw Oops.Oh("鏈鏈夐噸澶嶇殑UPI锛侀噸澶嶅彿涓�:" + dit.Key + ",閲嶅鏉℃暟:" + dit.Value);
}
+ //鏍¢獙鏁版嵁鏄惁姝g‘ 銆怑ditby shaocx,2024-12-20銆�
+ var gg = input.GroupBy(x => x.PackageCode);
+ foreach (var item in gg)
+ {
+ var _list = item.ToList();
+ if (_list.Count() == 1)
+ {
+ throw Oops.Oh($"鍖呭彿{item.Key}涓彧鏈変竴鍧楁澘锛屼笉绗﹀悎瑕佹眰!");
+ }
+ _list = _list.OrderBy(x => x.Shelf).ToList();
+ for (int i = 0; i < _list.Count; i++)
+ {
+ if (_list[i].Shelf != (i + 1))
+ {
+ throw Oops.Oh($"鍖呭彿{item.Key}涓{(i + 1)}鍧楁澘鐨勬搴忎笉鏄瘂i + 1}锛岃�屾槸{_list[i].Shelf}锛屼笉绗﹀悎瑕佹眰!");
+ }
+ }
+ }
+
//鍚屼竴涓猆PI鍙兘灞炰簬涓�涓� 鎵规鍙�+璁㈠崟鍙�
//浼氬瓨鍦� 涓�涓壒娆″彿锛屽涓鍗曞彿鐨勬儏鍐�
//浼氬瓨鍦� 涓�涓鍗曞彿锛屽涓壒娆″彿鐨勬儏鍐�
@@ -72,6 +91,7 @@
{
item.AreaCode = AreaCodeEnum.鏃犲尯鍩�;
item.UpiStatus = UpiStatusEnum.鍒濆;
+ item.CreateUserName = item.UpdateUserName = "MES";
}
List<Mes_Package_Gather> addGatherList = new List<Mes_Package_Gather>();
var groups = input.GroupBy(x => x.PackageCode);
@@ -81,6 +101,7 @@
Mes_Package_Gather newGather = first.Adapt<Mes_Package_Gather>();
newGather.AreaCode = AreaCodeEnum.鏃犲尯鍩�;
newGather.UpiStatus = UpiStatusEnum.鍒濆;
+ newGather.CreateUserName = newGather.UpdateUserName = "MES";
addGatherList.Add(newGather);
}
await _mes_Package_Gather_Rep.InsertRangeAsync(addGatherList);
--
Gitblit v1.9.3