1
Huangxiaoqiang-03
2024-10-31 0bfe24ddf438636aeef8c1e6989d5c8c28b0bb1a
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
@@ -8,6 +8,7 @@
using WIDESEA_Core;
using WIDESEA_Model.Models;
using WIDESEA_Core.Helper;
using Microsoft.Extensions.Logging;
namespace WIDESEA_TaskInfoService
{
@@ -100,6 +101,7 @@
            try
            {
                Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(stationCode, taskType);
                //Dt_LocationInfo dt_LocationInfo = null;
                if (locationInfo != null)
                {
                    Dt_Task task = new()
@@ -117,10 +119,13 @@
                    BaseDal.AddData(task);
                    int beforeStatus = locationInfo.LocationStatus;
                    locationInfo.LocationStatus = LocationStatusEnum.PalletLock.ObjToInt();
                    if (isUpdateStock)
                    {
                        locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
                        _basicService.LocationInfoService.UpdateLocationLock(locationInfo, task.TaskNum, StockChangeType.Inbound.ObjToInt(), false);
                        if (stockInfo != null && stockInfo.Details != null && stockInfo.Details.Count > 0)
                        {
                            orderNo = stockInfo.Details.FirstOrDefault()?.OrderNo ?? "";
@@ -133,6 +138,11 @@
                            return content = WebResponseContent.Instance.Error("未找到库存信息");
                        }
                    }
                    else
                    {
                        locationInfo.LocationStatus = LocationStatusEnum.PalletLock.ObjToInt();
                        _basicService.LocationInfoService.UpdateLocationLock(locationInfo, task.TaskNum, StockChangeType.Inbound.ObjToInt(), false);
                    }
                    _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
                    _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), orderNo, task.TaskNum);