莫海杰 1 ماه پیش
والد
کامیت
8ac4a3a23a
2فایلهای تغییر یافته به همراه19 افزوده شده و 5 حذف شده
  1. 9 2
      SCADA_DAQ/Customer/Service/Wcs_WebOperationService.cs
  2. 10 3
      SCADA_DAQ/Customer/Service/Wcs_WmsService.cs

+ 9 - 2
SCADA_DAQ/Customer/Service/Wcs_WebOperationService.cs

@@ -1,4 +1,5 @@
-using SCADA.CommonLib;
+using DBModel;
+using SCADA.CommonLib;
 using SCADA.CommonLib.Helper;
 using SCADA_DAQ.Customer.Machines;
 using SCADA_DAQ.Customer.Models;
@@ -81,7 +82,13 @@ namespace SCADA_DAQ.Customer.Service
                     return res;
                 }
             }
-            var sl = operation.RowColLayerFormat();
+            var rcl = $"L-{operation.RowColLayerFormat()}";
+            var inventory = Env.DAL.App_BC_Inventory.GetData<App_BC_Inventory>(t=>t.SourceLocation_Str == rcl).FirstOrDefault();
+            if (inventory != null)
+            {
+                operation.ItemName = inventory.ItemName_Str;
+                operation.ItemCode = inventory.ItemCode_Str;
+            }
             if (operation.Crane == 1)
             {
                 CustomerEnv.OperationCrane1List.Add(operation);

+ 10 - 3
SCADA_DAQ/Customer/Service/Wcs_WmsService.cs

@@ -382,11 +382,18 @@ namespace SCADA_DAQ.Customer.Service
                 }
             });
             wmsTasks.Sort((item1, item2) => item1.TaskNo.CompareTo(item2.TaskNo)); //排序
-            var dbRes = Env.DAL.Insert(noSourceLocationWmsTask);
+            var dbRes = new SCADA.CommonLib.Data.ExecuteResult
+            {
+                IsSucceed = true
+            };
+            if (noSourceLocationWmsTask.Count != 0)
+            {
+                dbRes = Env.DAL.Insert(noSourceLocationWmsTask);
+            }
             Log.Info(taskNos);
-            //sourceLocationWmsTask = sourceLocationWmsTask.Where(t=>!t.WoNo.StartsWith("CS12")).ToList();
+
             AddDeviceTaskList(sourceLocationWmsTask);
-            //UpLoadWms(sourceLocationWmsTask);
+
             if (dbRes.IsSucceed == true)
             {
                 res.Message = $"{taskNos}";