dengjunjie
5 天以前 7ca9651f81d7b84f054194d3d46fdbd1d9c8b922
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -119,6 +119,10 @@
                            task.NextAddress = routers.FirstOrDefault().ChildPosi;
                        }
                    }
                    else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup)
                    {
                        task.TaskState = item.SourceIsPickPlace ? TaskRelocationStatusEnum.CarSource_Finish.ObjToInt() : TaskRelocationStatusEnum.RelocationNew.ObjToInt();
                    }
                    tasks.Add(task);
                }
                BaseDal.AddData(tasks);
@@ -318,14 +322,14 @@
            {
                Dt_Task task = BaseDal.QueryFirst(x => x.TaskNum == taskNum);
                if (task == null) return WebResponseContent.Instance.Error($"未找到该任务信息,任务号:【{taskNum}】");
                if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
                {
                    task.TaskState = (int)TaskOutStatusEnum.OutPending;
                }
                else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
                {
                    task.TaskState = (int)TaskInStatusEnum.InPending;
                }
                //if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
                //{
                //    task.TaskState = (int)TaskOutStatusEnum.OutPending;
                //}
                //else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
                //{
                //    task.TaskState = (int)TaskInStatusEnum.InPending;
                //}
                task.ExceptionMessage = message;
                task.ModifyDate = DateTime.Now;
                BaseDal.UpdateData(task);
@@ -619,9 +623,9 @@
        /// <param name="TaskState"></param>
        /// <param name="TaskType"></param>
        /// <returns></returns>
        public Dt_Task GetTaskState(int TaskState, int TaskType)
        public Dt_Task? GetTaskState(int TaskState, int TaskType)
        {
            Dt_Task task = null;
            Dt_Task? task = null;
            if (TaskState > 0 && TaskType > 0)
                task = BaseDal.QueryFirst(x => x.TaskState == TaskState && x.TaskType == TaskType);
            else if (TaskState > 0)
@@ -646,12 +650,17 @@
            {
                if (!string.IsNullOrEmpty(SourceAddress) && SourceAddress != "")
                {
                    Dt_Task? task = BaseDal.QueryFirst(x => x.SourceAddress == SourceAddress && (x.TaskType == TaskOtherTypeEnum.RelocationCar.ObjToInt() || x.TaskType == TaskOtherTypeEnum.RelocationCarCharging.ObjToInt()));
                    Dt_Task? task = BaseDal.QueryFirst(x => x.SourceAddress == SourceAddress &&
                    x.ShuttleCarCode == ShuttleCarCode &&
                    (x.TaskType == TaskOtherTypeEnum.RelocationCar.ObjToInt() ||
                    x.TaskType == TaskOtherTypeEnum.RelocationCarCharging.ObjToInt()));
                    if (task != null) return;
                }
                if (!string.IsNullOrEmpty(TargetAddress) && TargetAddress != "")
                {
                    Dt_Task? task = BaseDal.QueryFirst(x => x.TargetAddress == TargetAddress && (x.TaskType == TaskOtherTypeEnum.RelocationCar.ObjToInt() || x.TaskType == TaskOtherTypeEnum.RelocationCarCharging.ObjToInt()));
                    Dt_Task? task = BaseDal.QueryFirst(x => x.TargetAddress == TargetAddress &&
                    (x.TaskType == TaskOtherTypeEnum.RelocationCar.ObjToInt() ||
                    x.TaskType == TaskOtherTypeEnum.RelocationCarCharging.ObjToInt()));
                    if (task != null) return;
                }
                #region åˆ›å»ºå †åž›æœºç§»è½¦ä»»åŠ¡