From 31313886399748bdd01b5c88977d168f4b4e31c0 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期三, 15 四月 2026 13:51:40 +0800
Subject: [PATCH] 添加接口日志表,添加接口调用方法,api表添加推送次数,优化成品出库任务被阻碍托阻挡修改任务状态为新建重新走出库任务流程
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs | 69 +++++++++++++++-------------------
1 files changed, 31 insertions(+), 38 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs"
index 6f0807f..28f1f26 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskMethods.cs"
@@ -1,6 +1,7 @@
锘縰sing 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);
+ }
}
}
}
@@ -637,38 +646,22 @@
dt_RGVLocationInfo.LocationStatus = locationStatusEnum.ObjToInt();
_rGVLocationInfoService.Repository.UpdateData(dt_RGVLocationInfo);
}
- }
- else//骞冲簱搴撲綅
- {
- }
- return WebResponseContent.Instance.OK();
- }
- catch (Exception ex)
- {
- throw new Exception(ex.Message);
- }
- }
- #endregion
-
- #region 鏇存柊涓�妤肩珯鍙扮姸鎬�
- public WebResponseContent UpdateStandStatus(Dt_Task task, string stationCode, LocationStatusEnum locationStatusEnum)
- {
- try
- {
- Dt_StationManger? stationManger = _stationMangerService.Repository.QueryFirst(x => x.StationCode == task.TargetAddress);
- //stationManger.IsOccupied = LocationStatusEnum.Lock.ObjToInt();
- if (stationManger != null)
- {
- if (locationStatusEnum == LocationStatusEnum.Free) //濡傛灉璧风偣瀹屾垚灏辩粰璐т綅璧嬪�兼墭鐩樺彿
+ Dt_StationManger stationManger = _stationMangerService.Repository.QueryFirst(x => x.StationCode == locationCode);
+ if (stationManger != null)
{
- stationManger.IsOccupied = LocationStatusEnum.Lock.ObjToInt();
+ if (locationStatusEnum == LocationStatusEnum.Free) //濡傛灉璧风偣瀹屾垚灏辩粰璐т綅璧嬪�兼墭鐩樺彿
+ {
+ stationManger.Remark = "";
+ stationManger.IsOccupied = LocationStatusEnum.Free.ObjToInt();
+ }
+ else
+ {
+ stationManger.Remark = palletCode;
+ stationManger.IsOccupied = LocationStatusEnum.Lock.ObjToInt();
+ }
+ _stationMangerService.UpdateData(stationManger);
}
- else
- {
- stationManger.IsOccupied = LocationStatusEnum.Free.ObjToInt();
- }
- _stationMangerService.UpdateData(stationManger);
}
return WebResponseContent.Instance.OK();
}
--
Gitblit v1.9.3