From 81946b468aff97b96fe50186246d3a853ce79b1b Mon Sep 17 00:00:00 2001
From: liulijun <liulijun@hnkhzn.com>
Date: 星期五, 06 三月 2026 11:38:48 +0800
Subject: [PATCH] 增加已有任务超时提示在任务完成后自动清除
---
项目代码/WMS/WMSServices/WIDESEA_StockService/StockInfoService.cs | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/StockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/StockInfoService.cs"
index c5458b1..447614a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/StockInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_StockService/StockInfoService.cs"
@@ -155,11 +155,12 @@
BSTResponse<BSTStockInfoDTO> bSTResponse = _invokeERPService.BSTStockAsync(item.PalletCode).DeserializeObject<BSTResponse<BSTStockInfoDTO>>();
if (bSTResponse.Code == 500)
{
- content.Message += $"鏉$爜{item.PalletCode}涓�鏈烢RP搴撳瓨涓嶅瓨鍦�,";
+ stockInfosDel.Add(item);
+ content.Message += $"鏉$爜{item.PalletCode}涓�鏈烢RP搴撳瓨宸蹭笉瀛樺湪,";
continue;
}
BSTStockInfoDTO bSTStockInfoDTO = bSTResponse.Data ?? throw new Exception($"涓�鏈烢RP鏈繑鍥瀧item.PalletCode}鐨勫簱瀛樹俊鎭�");
- if (item.StockLength != bSTStockInfoDTO.StockMeter && bSTStockInfoDTO.StockMeter>0)
+ if (item.StockLength != bSTStockInfoDTO.StockMeter)
{
item.MaterielThickness = bSTStockInfoDTO.Thick;
item.MaterielWeight = bSTStockInfoDTO.Qty;
@@ -167,10 +168,6 @@
item.Remark = $"{item.StockLength}-{bSTStockInfoDTO.StockMeter}";
item.StockLength = bSTStockInfoDTO.StockMeter;
stockInfosUp.Add(item);
- }
- else if(item.StockLength != bSTStockInfoDTO.StockMeter && bSTStockInfoDTO.StockMeter == 0)
- {
- stockInfosDel.Add(item);
}
}
//鏁版嵁搴撴搷浣�
@@ -206,6 +203,14 @@
return BaseDal.GetStockInfos(materielCode, width, locationCodes);
}
+ /// <summary>
+ /// 鑾峰彇鑰佸巶缂撳瓨鍙敤搴撳瓨
+ /// </summary>
+ /// <returns></returns>
+ public List<Dt_StockInfo> GetUseOldCacheStocks(string materielCode, decimal width)
+ {
+ return Db.Queryable<Dt_StockInfo>().Where(x => x.MaterielCode.StartsWith(materielCode) && x.StockStatus == StockStatusEmun.鑰佸巶閫�鏂欐殏瀛�.ObjToInt() && x.MaterielWide == width && x.StockOutLength <= 0 && x.StockLength > 0).OrderBy(x => x.CreateDate).ToList();
+ }
public List<Dt_StockInfo> GetUseableStocks(string materielCode, int warehoseId)
{
List<string> locationCodes = _basicRepository.LocationInfoRepository.GetCanOutLocationCodes(warehoseId);
--
Gitblit v1.9.3