From a1f7a7a68d23f7b9de7c4237bf167fa4808fb20d Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期日, 09 十一月 2025 13:36:39 +0800
Subject: [PATCH] 1
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoService.cs | 41 ++++++++++++++++++++++++++++++++++++++++-
1 files changed, 40 insertions(+), 1 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoService.cs"
index 2a555ff..e9d5900 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoService.cs"
@@ -14,6 +14,7 @@
using WIDESEA_Common;
using WIDESEA_Core;
using WIDESEA_Core.Enums;
+using WIDESEA_Core.Helper;
using WIDESEA_DTO;
using WIDESEA_DTO.Basic;
using WIDESEA_DTO.Order;
@@ -24,6 +25,7 @@
using WIDESEA_Model.Models.Order;
using WIDESEA_OrderRepository;
using WIDESEA_StorageTaskRepository;
+using JsonSerializer = System.Text.Json.JsonSerializer;
namespace WIDESEA_StorageBasicService;
@@ -57,7 +59,7 @@
_taskRepository = taskRepository;
_outDetailsRepository = outDetailsRepository;
}
-
+ #region 鏂规硶閲嶅啓
/// <summary>
/// 鍒嗛〉
/// </summary>
@@ -130,6 +132,41 @@
return new PageGridData<DtStockInfo>(totalCount, data);
}
+ public override WebResponseContent UpdateData(SaveModel saveModel)
+ {
+ var remark = saveModel.MainData["remark"].ToString();
+ var palletCode = saveModel.MainData["palletCode"].ToString();
+ List<DtStockInfoDetail> details = DeserializeList<DtStockInfoDetail>(saveModel.DetailData);
+ if (remark == "璋冩嫧鍑哄簱")
+ {
+ return _taskService.HandAllocateOutBoundTaskAsync(details).Result;
+ }
+ else if (remark == "鍏朵粬鍑哄簱")
+ {
+ return _taskService.OtherOutBoundTaskAsync(details).Result;
+ }
+ else
+ {
+ return WebResponseContent.Instance.Error("绯荤粺寮傚父");
+ }
+ }
+ public List<T> DeserializeList<T>(List<Dictionary<string, object>> rawData)
+ {
+ if (rawData == null) return new List<T>();
+ var processedData = rawData.Select(dict =>
+ {
+ var newDict = new Dictionary<string, object>();
+ foreach (var kvp in dict)
+ {
+ var newKey = char.ToUpper(kvp.Key[0]) + kvp.Key.Substring(1);
+ newDict[newKey] = kvp.Value;
+ }
+ return newDict;
+ }).ToList();
+ var json = JsonSerializer.Serialize(processedData);
+ return JsonSerializer.Deserialize<List<T>>(json);
+ }
+
public List<DtLocationInfo> GetStockLocations(List<DtLocationInfo>? locations)
{
List<DtLocationInfo> locationsNew = new List<DtLocationInfo>();
@@ -182,6 +219,8 @@
return locationsNew;
}
+ #endregion
+
#region 搴撳瓨瑙嗗浘
public List<StockSelectViewDTO> GetStockSelectViews(GetStockSelectViewDto viewDto)
{
--
Gitblit v1.9.3