From be54b0aa0330c8800dbd19ac289548c232ce2d7d Mon Sep 17 00:00:00 2001 From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com> Date: 星期六, 28 十二月 2024 17:25:01 +0800 Subject: [PATCH] 货位初始化 --- Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs index 3d56886..d737843 100644 --- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs +++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs @@ -144,9 +144,12 @@ List<DtStockInfoDetail> detail = _stockInfoDetailRepository.QueryData(x => x.StockId == stock.Id).ToList(); if (detail != null && detail.Count() > 0) { + List<DtStockInfoDetail_Hty> details = detail.Adapt<List<DtStockInfoDetail_Hty>>(); await DeleteStockInfoDetailsAsync(detail); + AddStockInfoDetailHty(details); } await AddStockInfoHtyAsync(stockInfo_Hty); + location.LocationStatus = (int)LocationEnum.Lock; BaseDal.UpdateData(location); @@ -413,6 +416,16 @@ throw new Exception("搴撳瓨璇︽儏淇℃伅鏇存柊澶辫触"); } } + private void AddStockInfoDetailHty(List<DtStockInfoDetail_Hty> details) + { + + var isStockAdd = SqlSugarHelper.Db.Insertable(details).ExecuteCommand(); + if (isStockAdd==0) + { + throw new Exception("搴撳瓨鏄庣粏鍘嗗彶淇℃伅娣诲姞澶辫触"); + } + } + #endregion #endregion 鍐呴儴鏂规硶 -- Gitblit v1.9.3