huangxiaoqiang
2024-12-28 be54b0aa0330c8800dbd19ac289548c232ce2d7d
货位初始化
已修改1个文件
13 ■■■■■ 文件已修改
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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 内部方法