1
Huangxiaoqiang-03
2024-11-06 f51582d5b4b498f28513f215f91828ef181df4a1
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
@@ -41,7 +41,7 @@
            {
                return WebResponseContent.Instance.Error("未找到该任务类型业务");
            }
            return WebResponseContent.Instance.Error("错误");
            return WebResponseContent.Instance.Error($"错误");
        }
        /// <summary>
@@ -61,7 +61,7 @@
            }
            catch (Exception ex)
            {
                content = WebResponseContent.Instance.Error(ex.Message);
                content = WebResponseContent.Instance.Error($"{ex.Message}");
            }
            return content;
        }
@@ -84,7 +84,7 @@
            }
            catch (Exception ex)
            {
                content = WebResponseContent.Instance.Error(ex.Message);
                content = WebResponseContent.Instance.Error($"{ex.Message}");
            }
            return content;
        }
@@ -106,9 +106,9 @@
            {
                _unitOfWorkManage.BeginTran();
                Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(stationCode, taskType);
                //Dt_LocationInfo dt_LocationInfo = null;
                if (locationInfo != null)
                {
                    List<Dt_Task> tasks = new List<Dt_Task>();
                    Dt_Task task = new()
                    {
                        CurrentAddress = stationCode,
@@ -124,8 +124,6 @@
                    };
                    BaseDal.AddData(task);
                    int beforeStatus = locationInfo.LocationStatus;
                    
                    if (isUpdateStock)
                    {
@@ -156,9 +154,10 @@
                        }
                    }
                    _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
                    List<Dt_Task> tasks = new List<Dt_Task>();
                    tasks.Add(task);
                    _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), orderNo, task.TaskNum);
                    var response = HttpHelper.Post<WebResponseContent>(url + "ReceiveTask/", tasks, "入库任务下发");
                    if (!response.Status)
                    {
@@ -190,40 +189,40 @@
        {
            if (BaseDal.QueryFirst(x => x.PalletCode == palletCode) != null)
            {
                return (false, "该托盘号已有任务");
                return (false, "该托盘号已有任务!");
            }
            if (BaseDal.QueryFirst(x => (x.SourceAddress == stationCode || x.CurrentAddress == stationCode) && x.TaskStatus == InTaskStatusEnum.InNew.ObjToInt()) != null)
            {
                return (false, "当前入库站台已有一条新建任务");
                return (false, "当前入库站台已有一条新建任务!");
            }
            if (isCheckStock)
            {
                if (stockInfo == null)
                {
                    return (false, "未找到组盘信息");
                    return (false, "未找到组盘信息!");
                }
                if (stockInfo.StockStatus != StockStatusEmun.组盘暂存.ObjToInt())
                {
                    return (false, "该组盘状态不可入库");
                    return (false, "该组盘状态不可入库!");
                }
                if (!string.IsNullOrEmpty(stockInfo.LocationCode))
                {
                    return (false, "该托盘已绑定货位");
                    return (false, "该托盘已绑定货位!");
                }
                if (stockInfo.Details == null || stockInfo.Details.Count == 0)
                {
                    return (false, "没有库存明细信息");
                    return (false, "没有库存明细信息!");
                }
            }
            else
            {
                if (_stockService.StockInfoService.Repository.QueryFirst(x => x.PalletCode == palletCode) != null)
                {
                    return (false, "该托盘已存在库内");
                    return (false, "该托盘已存在库内!");
                }
            }
            return (true, "成功");
            return (true, "成功!");
        }