From 2c9627e058670e4a56437f2880270160c197dabb Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期二, 09 十二月 2025 19:40:05 +0800
Subject: [PATCH] 提交
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_AllocateService/AllocateDetailService.cs | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 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_AllocateService/AllocateDetailService.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_AllocateService/AllocateDetailService.cs"
index cd2b75e..3130d90 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_AllocateService/AllocateDetailService.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_AllocateService/AllocateDetailService.cs"
@@ -71,16 +71,22 @@
//}
//return new PageGridData<Dt_AllocateOrderDetail>(totalCount, data);
- Dt_AllocateOrder allocateOrder = _allocateOrderRepository.QueryFirst(x => x.Id == options.Filter.FirstOrDefault().Value.ObjToInt());
- Dt_OutboundOrder _InboundOrder = SqlSugarHelper.DbWMS.Queryable<Dt_OutboundOrder>().Where(x => x.UpperOrderNo == allocateOrder.UpperOrderNo).First();
+ try
+ {
+ Dt_AllocateOrder allocateOrder = _allocateOrderRepository.QueryFirst(x => x.Id == options.Filter.FirstOrDefault().Value.ObjToInt());
+ Dt_OutboundOrder _InboundOrder = SqlSugarHelper.DbWMS.Queryable<Dt_OutboundOrder>().Where(x => x.UpperOrderNo == allocateOrder.UpperOrderNo).First();
+ var Id = _InboundOrder == null ? 0 : _InboundOrder.Id;
+ var data = BaseDal.Db.Queryable<Dt_OutboundOrderDetail>()
+ .Where(x => x.OrderId == Id)
+ .OrderBy(orderByModels)
+ .ToPageList(options.Page, options.Rows, ref totalCount);
- var data = BaseDal.Db.Queryable<Dt_OutboundOrderDetail>()
- .WhereIF(!_InboundOrder.IsNullOrEmpty(), x => x.OrderId == _InboundOrder.Id)
- .OrderBy(orderByModels)
- .ToPageList(options.Page, options.Rows, ref totalCount);
-
-
- return new PageGridData<Dt_OutboundOrderDetail>(totalCount, data);
+ return new PageGridData<Dt_OutboundOrderDetail>(totalCount, data);
+ }
+ catch(Exception ex)
+ {
+ throw new Exception("鏃犳槑缁�");
+ }
}
}
}
--
Gitblit v1.9.3