From 56538e602b927c232ac5b991ef84175edd2ce3ce Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期五, 24 四月 2026 14:20:20 +0800
Subject: [PATCH] feat(WMS/WCS): 增加机器人历史信息记录 fix(WMS/WCS): 修复前端bug
---
Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs | 29 ++++++++++++++++++++++++++---
1 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
index 9a84608..227c7cf 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
@@ -197,7 +197,7 @@
/// <returns>搴撳瓨淇℃伅</returns>
public async Task<Dt_StockInfo> GetStockInfoAsync(string palletCode, string locationCode)
{
- return await BaseDal.QueryFirstAsync(x => x.PalletCode == palletCode && x.LocationCode == locationCode);
+ return await BaseDal.QueryDataNavFirstAsync(x => x.PalletCode == palletCode && x.LocationCode == locationCode);
}
/// <summary>
@@ -257,12 +257,12 @@
// 绌烘墭鐩樹篃鏈夊簱瀛樿褰曪紝鍙槸涓嶅寘鍚槑缁�
item.PalletCode = stockInfo.PalletCode;
item.StockStatus = stockInfo.StockStatus; // 鐩存帴浣跨敤鍚庣搴撳瓨鐘舵��
-
+
// 鍙湁褰揇etails涓嶄负null涓旀湁鏁版嵁鏃舵墠澶勭悊搴撳瓨鏄庣粏
if (stockInfo.Details != null && stockInfo.Details.Any())
{
item.StockQuantity = stockInfo.Details.Sum(d => d.StockQuantity);
-
+ item.OutboundDate = stockInfo.OutboundDate;
// 鑾峰彇绗竴涓槑缁嗙殑鐗╂枡淇℃伅锛堝鏋滃瓨鍦級
var firstDetail = stockInfo.Details.FirstOrDefault();
if (firstDetail != null)
@@ -278,6 +278,7 @@
Id = d.Id,
MaterielCode = d.MaterielCode,
MaterielName = d.MaterielName,
+ SerialNumber = d.SerialNumber,
BatchNo = d.BatchNo,
StockQuantity = d.StockQuantity,
Unit = d.Unit,
@@ -381,5 +382,27 @@
return WebResponseContent.Instance.Error($"鍒犻櫎搴撳瓨鍜屾槑缁嗘椂鍙戠敓寮傚父: {ex.Message}");
}
}
+ /// <summary>
+ /// 鏇存柊MES涓婁紶鐘舵��
+ /// </summary>
+ /// <param name="palletCode">鎵樼洏鍙�</param>
+ /// <param name="status">MES涓婁紶鐘舵�佸��</param>
+ /// <returns>鏇存柊鏄惁鎴愬姛</returns>
+ public async Task<bool> UpdateMesUploadStatusAsync(string palletCode, int status)
+ {
+ try
+ {
+ var stockInfo = await BaseDal.QueryFirstAsync(x => x.PalletCode == palletCode);
+ if (stockInfo == null)
+ return false;
+
+ stockInfo.MesUploadStatus = status;
+ return await BaseDal.UpdateDataAsync(stockInfo);
+ }
+ catch
+ {
+ return false;
+ }
+ }
}
}
--
Gitblit v1.9.3