莫海杰 3 maanden geleden
bovenliggende
commit
e96833a10c
2 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. 1 1
      SCADA_DAQ/Customer/Controllers/WmsController.cs
  2. 3 3
      SCADA_DAQ/Customer/Service/Wcs_WmsService.cs

+ 1 - 1
SCADA_DAQ/Customer/Controllers/WmsController.cs

@@ -24,7 +24,7 @@ namespace SCADA_DAQ.Customer.Controllers
         [HttpPost]
         public async Task<IHttpActionResult> LowShelfTask([FromBody] List<LowShelfTaskBo> taskList)
         {
-            var res = await Task.Run(() => _wcsService.WmsLowShelfTask(taskList));
+            var res = await Task.Run(() => _wcsService.WmsLowAutoShelfTask(taskList));
             return Ok(res);
         }
 

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

@@ -369,7 +369,7 @@ namespace SCADA_DAQ.Customer.Service
                             ErrorMsg = wmsRes.Result.Error
                         });
                     }
-                    
+                    // wmsRes.Success == true && wmsRes.Result.IsSuccess == true
                     if (wmsRes.Success == true && wmsRes.Result.IsSuccess == true)
                     {
                         message = $@"{message} {task[i].TaskNo}上传成功";
@@ -388,7 +388,7 @@ namespace SCADA_DAQ.Customer.Service
             var updateSumItemQtyList = new List<AppBCInventoryModel>();
             #region /完成任务更新库存数量逻辑
             var successItemTaskQtyList = successItemTaskQty.ToLookup(t => new { t.ItemCode, t.SourceLocation, t.WarehouseCode }).ToList();
-            string inventoryFilter = null;
+            string inventoryFilter = "ID = 0";
             foreach (var itemTaskQtyValues in successItemTaskQtyList)
             {
                 foreach (var itemTaskQtyValue in itemTaskQtyValues)
@@ -416,7 +416,7 @@ namespace SCADA_DAQ.Customer.Service
             //以上foreach为了将相同物料,库区,库位的数量相加
             for (int j = 0; j < updateSumItemQtyList.Count; j++)
             {
-                if (inventoryFilter == null)
+                if (inventoryFilter == "ID = 0")
                 {
                     inventoryFilter = $" (ItemCode_Str = '{updateSumItemQtyList[j].ItemCode}' and SourceLocation_Str = '{updateSumItemQtyList[j].SourceLocation}' and WarehouseCode_Str = '{updateSumItemQtyList[j].WarehouseCode}') ";
                 }