From 5335e892470760a25db793d249c94d8aa32e8b0b Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期二, 09 十二月 2025 13:44:46 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
index 72f08a3..ccbb4de 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
@@ -1,6 +1,7 @@
锘縰sing AutoMapper;
using SqlSugar;
using System.Dynamic;
+using System.Text.RegularExpressions;
using System.Threading.Tasks;
using WIDESEA_Common.CommonEnum;
using WIDESEA_Common.OrderEnum;
@@ -681,8 +682,10 @@
return WebResponseContent.Instance.Error($"鎵樼洏{palletCode}涓嬫湭鎵惧埌鏉$爜{barcode}鐨勬槑缁嗚褰�");
}
+ ResetInboundOrderStatus(new List<string> { targetDetail.OrderNo},new List<string> { targetDetail.Barcode});
// 鍒犻櫎鎸囧畾鏄庣粏
_stockDetailRepository.DeleteData(targetDetail);
+
// 閲嶆柊鏌ヨ鍓╀綑鏄庣粏锛堜繚璇佹暟鎹噯纭�э級
var remainingDetails = _stockDetailRepository.Db.Queryable<Dt_StockInfoDetail>()
@@ -748,8 +751,13 @@
if (inboundOrder == null) continue;
- inboundOrder.OrderStatus = 0;
- _inboundOrderRepository.UpdateData(inboundOrder);
+ bool isSingleBarcode = barcodes != null && barcodes.Count == 1;
+ if (!isSingleBarcode)
+ {
+ // 闈炲崟涓潯鐮侊紙鏁村崟/澶氫釜鏉$爜锛夛細閲嶇疆涓昏〃鐘舵�佷负0
+ inboundOrder.OrderStatus = 0;
+ _inboundOrderRepository.UpdateData(inboundOrder);
+ }
// 閲嶇疆鍏ュ簱鍗曟槑缁嗙姸鎬�
if (inboundOrder.Details == null || !inboundOrder.Details.Any()) continue;
@@ -770,6 +778,10 @@
public override PageGridData<Dt_InboundOrder> GetPageData(PageDataOptions options)
{
string wheres = ValidatePageOptions(options);
+
+ string pattern = @"inboundOrderNo like '[^']+'\s*and\s*";
+ wheres = Regex.Replace(wheres, pattern, "", RegexOptions.IgnoreCase);
+
//鑾峰彇鎺掑簭瀛楁
Dictionary<string, SqlSugar.OrderByType> orderbyDic = GetPageDataSort(options, TProperties);
List<OrderByModel> orderByModels = new List<OrderByModel>();
@@ -789,7 +801,7 @@
if (!string.IsNullOrEmpty(options.Wheres))
{
try
- {
+ {
searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>();
if (searchParametersList.Count > 0)
{
--
Gitblit v1.9.3