heshaofeng
2025-11-30 deece687b14bc4542562a38abe3c2d0c4e6ffe3f
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs
@@ -29,10 +29,15 @@
        {
            try
            {
                Dt_Task dbtask = Repository.QueryFirst(x => x.PalletCode == palletCode);
                Dt_Task dbtask = Repository.Db.Queryable<Dt_Task>().Where(x => x.PalletCode == palletCode).OrderByDescending(x=>x.CreateDate).First();
                if (dbtask != null)
                {
                    _logger.LogInformation(dbtask.TaskType.ToString());
                    if (dbtask.TaskType == TaskTypeEnum.Outbound.ObjToInt())
                    {
                        return WebResponseContent.Instance.Error($"出库待分拣任务");
                    }
                    else if (dbtask.TaskType == TaskTypeEnum.OutAllocate.ObjToInt())
                    {
                        return WebResponseContent.Instance.Error($"出库待分拣任务");
                    }
@@ -40,7 +45,7 @@
                    {
                        return WebResponseContent.Instance.Error($"该托盘已生成任务");
                    }
                }
                }
                Dt_StockInfo stockInfo = _stockRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First();
                if (stockInfo == null)
@@ -65,7 +70,7 @@
                var newTask = new Dt_Task()
                {
                {
                    CurrentAddress = stationCode,
                    Grade = 0,
                    NextAddress = stations.GetValueOrDefault(stationCode) ?? "",