From 4d83bc8431bb1fda7b3cef959e2505b2402285d2 Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期四, 26 十二月 2024 21:53:14 +0800
Subject: [PATCH] ·
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs | 37 ++++++++++++++++++++++++++++++++++++-
1 files changed, 36 insertions(+), 1 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
index b3d0c99..5f7d14d 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
@@ -4,20 +4,30 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common.StockEnum;
+using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
using WIDESEA_IOutboundRepository;
+using WIDESEA_IRecordService;
+using WIDESEA_IStockService;
using WIDESEA_Model.Models;
namespace WIDESEA_IOutboundService
{
public partial class OutStockLockInfoService : ServiceBase<Dt_OutStockLockInfo, IOutStockLockInfoRepository>, IOutStockLockInfoService
{
+
+ private readonly IStockService _stockService;
+ private readonly IRecordService _recordService;
+
public IOutStockLockInfoRepository Repository => BaseDal;
- public OutStockLockInfoService(IOutStockLockInfoRepository BaseDal) : base(BaseDal)
+
+ public OutStockLockInfoService(IOutStockLockInfoRepository BaseDal, IStockService stockService, IRecordService recordService) : base(BaseDal)
{
+ _recordService = recordService;
+ _stockService = stockService;
}
public List<Dt_OutStockLockInfo> GetOutStockLockInfos(Dt_OutboundOrder outboundOrder, Dt_OutboundOrderDetail outboundOrderDetail, List<Dt_StockInfo> outStocks, int? taskNum = null)
@@ -76,5 +86,30 @@
{
return BaseDal.QueryData(x => x.OrderDetailId == orderDetailId && x.Status == outStockStatus.ObjToInt());
}
+
+ public List<Dt_OutStockLockInfo> GetStockOutboundOrder(SaveModel saveModel)
+ {
+ try
+ {
+ var palletCode = saveModel.MainData["barcode"].ToString();
+ var warehouseId = saveModel.MainData["warehouseId"].ObjToInt();
+ Dt_StockInfo stockInfo = BaseDal.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode && x.WarehouseId == warehouseId).Includes(x => x.Details).First();
+ if (stockInfo == null)
+ {
+ throw new Exception($"鏈壘鍒板簱瀛樹俊鎭�");
+ }
+ Dt_StockInfoDetail stockInfoDetail = stockInfo.Details.FirstOrDefault();
+ if (stockInfoDetail == null)
+ {
+ throw new Exception($"鏈壘鍒板簱瀛樿鎯�");
+ }
+ List<Dt_OutStockLockInfo> stockLockInfos = BaseDal.QueryData(x => x.StockId == stockInfo.Id&&x.Status< OutLockStockStatusEnum.鍑哄簱瀹屾垚.ObjToInt());
+ return stockLockInfos;
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
+ }
}
}
--
Gitblit v1.9.3