From 0825b125e5979d5dcf21ee6669bec44f9ae4fa23 Mon Sep 17 00:00:00 2001
From: zhangxiaofeng <1939543722@qq.com>
Date: Tue, 15 Oct 2024 11:54:57 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=9F=BA=E7=A1=80=E8=A1=A8?=
=?UTF-8?q?=EF=BC=9A=E6=B7=BB=E5=8A=A0=E6=8B=93=E5=B1=95=E5=AD=97=E6=AE=B5?=
=?UTF-8?q?=E6=8F=92=E5=85=A5=E5=8F=8A=E4=BE=9B=E6=9F=A5=E8=AF=A2=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Dtos/TaskManageOrderMessageMainInfo.cs | 5 +++++
.../TaskPlat/Entity/TaskBaseInfo.cs | 6 ++++++
.../TaskPlat/Method/TaskManageService.cs | 20 +++++++++++++++++++
3 files changed, 31 insertions(+)
diff --git a/ds-wms-service/DS.WMS.Core/TaskPlat/Dtos/TaskManageOrderMessageMainInfo.cs b/ds-wms-service/DS.WMS.Core/TaskPlat/Dtos/TaskManageOrderMessageMainInfo.cs
index a9d6a3d1..79a7ba4e 100644
--- a/ds-wms-service/DS.WMS.Core/TaskPlat/Dtos/TaskManageOrderMessageMainInfo.cs
+++ b/ds-wms-service/DS.WMS.Core/TaskPlat/Dtos/TaskManageOrderMessageMainInfo.cs
@@ -363,5 +363,10 @@ namespace DS.WMS.Core.TaskPlat.Dtos
/// 卸货港
///
public string? PortDischarge { get; set; }
+
+ ///
+ /// 拓展数据
+ ///
+ public object? ExtData { get; set; }
}
}
diff --git a/ds-wms-service/DS.WMS.Core/TaskPlat/Entity/TaskBaseInfo.cs b/ds-wms-service/DS.WMS.Core/TaskPlat/Entity/TaskBaseInfo.cs
index 086f7853..e5a95538 100644
--- a/ds-wms-service/DS.WMS.Core/TaskPlat/Entity/TaskBaseInfo.cs
+++ b/ds-wms-service/DS.WMS.Core/TaskPlat/Entity/TaskBaseInfo.cs
@@ -302,6 +302,12 @@ namespace DS.WMS.Core.TaskPlat.Entity
[SugarColumn(ColumnDescription = "批次统计", IsNullable = true, Length = 50)]
public string? BATCH_STATIC { get; set; }
+ ///
+ /// 拓展数据
+ ///
+ [SugarColumn(ColumnDescription = "拓展数据", IsNullable = true, Length = 255, ColumnDataType = "varchar")]
+ public object? ExtData { get; set; }
+
/////
///// 大简云userid
/////
diff --git a/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs b/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs
index fc89dba9..4984428e 100644
--- a/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs
+++ b/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs
@@ -28,6 +28,7 @@ using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
using SqlSugar;
using System.Linq.Expressions;
@@ -480,6 +481,12 @@ namespace DS.WMS.Core.TaskPlat.Method
CreateTime = DateTime.Now,
};
+
+ if (info.Main.ExtData != null)
+ {
+ taskInfo.ExtData = info.Main.ExtData.ToJson();
+ }
+
if (Enum.TryParse(typeof(TaskBaseTypeEnum), taskInfo.TASK_TYPE, out object? taskTypeTemp))
{
taskInfo.TASK_TYPE_NAME = ((TaskBaseTypeEnum)taskTypeTemp).EnumDescription();
@@ -2671,6 +2678,19 @@ namespace DS.WMS.Core.TaskPlat.Method
item.CARRIER_ID = item.orderCarrierId;
item.CARRIER_NAME = null;
}
+
+ // 3.ExtData字段从Data转为对象
+ if (!string.IsNullOrEmpty(item.ExtData))
+ {
+ try
+ {
+ item.ExtData = JObject.Parse(item.ExtData);
+ }
+ catch
+ {
+ item.ExtData = new { ParseError = true, ParseMessage = "ExtData为非标准Json,导致解析异常" };
+ }
+ }
}
}
}