huangxiaoqiang
2025-04-25 a8f4641741af34ffbe5fd565003cc5d55bbec119
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs
@@ -1,4 +1,5 @@
using LogLibrary.Log;
using Masuit.Tools;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
@@ -33,6 +34,9 @@
                if (string.IsNullOrEmpty(result?.PalletBarcode))
                    throw new Exception("上传托盘号为空");
                LogFactory.GetLog("分容测试完成通知").Info(true, $"\r\r--------------------------------------");
                LogFactory.GetLog("分容测试完成通知").Info(true, result.ToJsonString());
                var location = _locationRepository.QueryFirst(x => x.AreaId == result.LocationArea && x.LocationCode == result.LocationID);
                if (location == null) throw new Exception("未知库位");
@@ -61,7 +65,7 @@
                    CreateDate = DateTime.Now,
                    Creater = "HK",
                    CurrentAddress = result.LocationID,
                    Grade = 1,
                    Grade = result.IsNG == 1 ? 1 : 2,
                    Dispatchertime = DateTime.Now,
                    PalletCode = result.PalletBarcode,
                    Roadway = location.RoadwayNo,
@@ -78,7 +82,7 @@
                WMSTaskDTO taskDTO = new WMSTaskDTO()
                {
                    TaskNum = task.TaskNum.Value,
                    Grade = 1,
                    Grade = result.IsNG == 1 ? 1 : 2,
                    PalletCode = task.PalletCode,
                    RoadWay = task.Roadway,
                    SourceAddress = task.SourceAddress,
@@ -104,6 +108,10 @@
                    if (respone.Status)
                    {
                        var taskId = _taskRepository.AddData(task);
                        location.LocationStatus = (int) LocationEnum.InStockDisable;
                        _locationRepository.UpdateData(location);
                        //_simpleCacheService.HashDel<DtStockInfo>(WIDESEA_Cache.CacheConst.Cache_DtStockInfo, new string[] { taskDTO.PalletCode });
                    }
                    else
@@ -115,6 +123,7 @@
                {
                    throw new Exception("WCS处理失败");
                }
                //WMSTaskDTO taskDTO = new WMSTaskDTO
                //{
                //    Id = 0,
@@ -127,7 +136,7 @@
                //    TaskState = (int)TaskOutStatusEnum.OutNew,
                //};
                LogFactory.GetLog("分容测试完成通知").Info(true, $"\r\r--------------------------------------");
                LogFactory.GetLog("分容测试完成通知").Info(true, result);
                LogFactory.GetLog("分容测试完成通知").Info(true, result.ToJsonString());
                return content.OK();
            }
            catch (Exception ex)