dengjunjie
2025-04-19 9e579eda4601ed7b492b9d19a24e8146f6ebdf8d
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -87,10 +87,12 @@
                List<Dt_Task> tasks = new List<Dt_Task>();
                foreach (var item in taskDTOs)
                {
                    if (BaseDal.QueryFirst(x => x.TaskNum == item.TaskNum || x.PalletCode == item.PalletCode) != null)
                    if (BaseDal.QueryFirst(x => x.TaskNum == item.TaskNum) != null)
                    {
                        throw new Exception($"任务号【{item.TaskNum}已存在任务】");
                        throw new Exception($"任务号【{item.TaskNum}】已存在任务");
                    }
                    if (BaseDal.QueryFirst(x => x.PalletCode == item.PalletCode) != null)
                        throw new Exception($"托盘号【{item.PalletCode}】已存在任务");
                    Dt_Task task = _mapper.Map<Dt_Task>(item);
                    task.Creater = "WMS";
                    if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
@@ -624,7 +626,7 @@
            }
            if (!string.IsNullOrEmpty(TargetAddress) && TargetAddress != "")
            {
                Dt_Task? task = BaseDal.QueryFirst(x => x.SourceAddress == TargetAddress && x.TaskType == TaskOtherTypeEnum.RelocationCar.ObjToInt());
                Dt_Task? task = BaseDal.QueryFirst(x => x.TargetAddress == TargetAddress && x.TaskType == TaskOtherTypeEnum.RelocationCar.ObjToInt());
                if (task != null) return WebResponseContent.Instance.Error();
            }
            #region åˆ›å»ºå †åž›æœºç§»è½¦ä»»åŠ¡