yanjinhui
3 天以前 39531cf0ea52494fe56b8734afa552db32b7a164
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs
@@ -1,6 +1,7 @@
using Autofac.Core;
using Magicodes.IE.Core;
using NetTaste;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -84,7 +85,7 @@
                                task.TaskState = (int)TaskStatusEnum.HktransportIng;
                                BaseDal.UpdateData(task);
                            }
                            else
                            else if (task.TaskState == (int)TaskStatusEnum.Execut)
                            {
                                task.TaskState = (int)TaskStatusEnum.Takeing;
                                TaskFeedback(task, 1);
@@ -293,7 +294,7 @@
                            break;
                        case "leavelift": //离开电梯
                            {
                                if (task.TaskType == (int)TaskTypeEnum.Q3RK || task.TaskType == (int)TaskTypeEnum.MOVE || task.TaskType == (int)TaskTypeEnum.F01|| task.TaskType == (int)TaskTypeEnum.Q3CK)
                                if (task.TaskType == (int)TaskTypeEnum.Q3RK || task.TaskType == (int)TaskTypeEnum.MOVE || task.TaskType == (int)TaskTypeEnum.F01 || task.TaskType == (int)TaskTypeEnum.Q3CK)
                                {
                                    task.TaskState = TaskStatusEnum.HKleavelift.ObjToInt();
                                    BaseDal.UpdateData(task);
@@ -396,16 +397,24 @@
                            {
                                task.ExceptionMessage = Rgv.content.errorReason;
                                var Error = _taskErrorMessageService.Repository.QueryFirst(x => x.ErrorCode == Rgv.content.errorCode && x.DeviceType == (int)deviceTypeEnum);
                                if (Error != null)
                                if (task.TaskType == (int)TaskTypeEnum.CPOutbound && task.TaskState == (int)TaskStatusEnum.Execut && Rgv.content.errorCode == 1330003)//成品出库任务下发后反馈有阻碍托,修改任务状态为新建重新查询阻碍托关系
                                {
                                    task.ExceptionMessage = Error.ExceptionMessage;
                                    MatchCollection matches = Regex.Matches(Rgv.content.errorReason, @"\(([^)]+)\)");
                                    if (matches.Count > 0)
                                        task.ExceptionMessage = ReplacePlaceholders(Rgv.content.errorReason, Error.ExceptionMessage);
                                    ErrorTaskFeedback(task, true, Error.ErrorCode.ToString());
                                    task.TaskState = (int)TaskStatusEnum.New;
                                    BaseDal.UpdateData(task);
                                }
                                else
                                    ErrorTaskFeedback(task, true);
                                {
                                    if (Error != null)
                                    {
                                        task.ExceptionMessage = Error.ExceptionMessage;
                                        MatchCollection matches = Regex.Matches(Rgv.content.errorReason, @"\(([^)]+)\)");
                                        if (matches.Count > 0)
                                            task.ExceptionMessage = ReplacePlaceholders(Rgv.content.errorReason, Error.ExceptionMessage);
                                        ErrorTaskFeedback(task, true, Error.ErrorCode.ToString());
                                    }
                                    else
                                        ErrorTaskFeedback(task, true);
                                }
                            }
                        }
                    }