From a29bf360f42cc3c6942a0ef6604f0ac84ab54a7c Mon Sep 17 00:00:00 2001
From: liulijun <liulijun@hnkhzn.com>
Date: 星期四, 19 三月 2026 17:19:36 +0800
Subject: [PATCH] 修复老厂排程在没生成任务就不更新缺料状态的问题,按照要求修改库位平面图
---
项目代码/WMS/WMSServices/WIDESEA_BasicService/Base/LocationInfoService.cs | 41 ++++++++++++++++++++++++++++++-----------
1 files changed, 30 insertions(+), 11 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Base/LocationInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Base/LocationInfoService.cs"
index 0f6bef4..7319aee 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Base/LocationInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Base/LocationInfoService.cs"
@@ -1,4 +1,4 @@
-锘縰sing HslCommunication.WebSocket;
+using HslCommunication.WebSocket;
using OfficeOpenXml.FormulaParsing.Excel.Functions.RefAndLookup;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
using SqlSugar;
@@ -44,7 +44,7 @@
}
/// <summary>
- /// 鏌ヨ璐т綅瀵瑰簲鐨凴FID
+ /// 鏌ヨ璐т綅瀵瑰簲鐨凴FID鍙婂簱瀛樹俊鎭�
/// </summary>
/// <param name="locationCodes"></param>
/// <returns></returns>
@@ -60,28 +60,47 @@
if (warehouseId == 1)
{
- // 鏌ヨ鍘熸枡搴揇t_StockInfo琛紝鑾峰彇RFID淇℃伅
+ // 鏌ヨ鍘熸枡搴揇t_StockInfo琛紝鑾峰彇RFID鍙婂簱瀛樹俊鎭�
var rawMaterialRfidList = _stockInfoRepository.QueryData()
.Where(x => locationCodes.Contains(x.LocationCode))
- .Select(x => new { x.LocationCode, x.RfidCode })
+ .Select(x => new {
+ locationCode = x.LocationCode,
+ rfidCode = x.RfidCode,
+ paperRoll = x.MaterielName, // 绾稿嵎鍚嶇О
+ width = x.MaterielWide, // 闂ㄥ箙锛堝箙瀹斤級
+ barcode = x.PalletCode, // 绾稿嵎鏉$爜
+ status = x.StockStatus, // 鐘舵��
+ inDate = x.CreateDate // 鍏ュ簱鏃堕棿锛堝垱寤烘椂闂达級
+ })
.ToList();
- var rfidList = rawMaterialRfidList.ToList();
// 杩斿洖缁撴灉
- return WebResponseContent.Instance.OK(data: rfidList);
+ return WebResponseContent.Instance.OK(data: rawMaterialRfidList);
}
if (warehouseId == 2)
{
- // 鏌ヨ鎴愬搧搴揇t_ProStockInfo琛紝鑾峰彇PalletCode淇℃伅
- var finishedProductRfidList =_proStockInfoRepository.QueryData()
+ // 鏇挎崲鍘熸湁鐨� .Select(x => new { ... Detail = x.proStockInfoDetails?.FirstOrDefault() ... }) 浠g爜鍧�
+ var finishedProductRfidList = _proStockInfoRepository.Db.Queryable<Dt_ProStockInfo>()
+ .Includes(x => x.proStockInfoDetails)
.Where(x => locationCodes.Contains(x.LocationCode))
- .Select(x => new { x.LocationCode, RfidCode = x.PalletCode })
+ .ToList()
+ .Select(x => new
+ {
+ locationCode = x.LocationCode,
+ rfidCode = x.PalletCode,
+ paperRoll = (x.proStockInfoDetails != null && x.proStockInfoDetails.Count > 0) ? x.proStockInfoDetails[0].ProductName : string.Empty,
+ productName = (x.proStockInfoDetails != null && x.proStockInfoDetails.Count > 0) ? x.proStockInfoDetails[0].ProductName : string.Empty,
+ width = (x.proStockInfoDetails != null && x.proStockInfoDetails.Count > 0) ? x.proStockInfoDetails[0].StockQty : 0,
+ quantity = (x.proStockInfoDetails != null && x.proStockInfoDetails.Count > 0) ? x.proStockInfoDetails[0].StockQty : 0,
+ barcode = x.PalletCode,
+ status = x.StockStatus,
+ inDate = x.CreateDate
+ })
.ToList();
- var rfidList = finishedProductRfidList.ToList();
// 杩斿洖缁撴灉
- return WebResponseContent.Instance.OK(data: rfidList);
+ return WebResponseContent.Instance.OK(data: finishedProductRfidList);
}
// 濡傛灉娌℃湁鍖归厤鐨勪粨搴揑D锛岃繑鍥炵┖鍒楄〃
return WebResponseContent.Instance.OK(data: new List<object>());
--
Gitblit v1.9.3