From 43cbfa8906239ec64560cd86bede64159081c9ef Mon Sep 17 00:00:00 2001 From: tongfei <244188119@qq.com> Date: Tue, 9 Apr 2024 15:19:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=89=B9=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/WMS.Web.Domain/Services/InStockService.cs | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/WMS.Web.Domain/Services/InStockService.cs b/src/WMS.Web.Domain/Services/InStockService.cs index fbd28370..5ab4bac1 100644 --- a/src/WMS.Web.Domain/Services/InStockService.cs +++ b/src/WMS.Web.Domain/Services/InStockService.cs @@ -797,25 +797,25 @@ namespace WMS.Web.Domain.Services purchaseInStock.Details[0].Qty = erpDetail.Qty; - if (string.IsNullOrEmpty(erpDetail.BatchBillNo)) - { - var current_erp_material = await sc_erpService.BillQueryForMaterialByNumber(erpDetail.MaterialNumber); - if (current_erp_material != null && current_erp_material.IsBatchManage == true) - { - //1.获取最新的erp明细信息 - var billNo_new = await sc_inStockRepositories.GetLastBillNo(); - //erp明细:生成批号 - int new_firstBillNo = billNo_new == null ? 0 : (billNo_new.FirstBillNo.HasValue ? billNo_new.FirstBillNo.Value : 0); - int new_lastBillNo = billNo_new == null ? 0 : (billNo_new.LastBillNo.HasValue ? billNo_new.LastBillNo.Value : 0); + //if (string.IsNullOrEmpty(erpDetail.BatchBillNo)) + //{ + // var current_erp_material = await sc_erpService.BillQueryForMaterialByNumber(erpDetail.MaterialNumber); + // if (current_erp_material != null && current_erp_material.IsBatchManage == true) + // { + // //1.获取最新的erp明细信息 + // var billNo_new = await sc_inStockRepositories.GetLastBillNo(); + // //erp明细:生成批号 + // int new_firstBillNo = billNo_new == null ? 0 : (billNo_new.FirstBillNo.HasValue ? billNo_new.FirstBillNo.Value : 0); + // int new_lastBillNo = billNo_new == null ? 0 : (billNo_new.LastBillNo.HasValue ? billNo_new.LastBillNo.Value : 0); - erpDetail.GenerateBatchBillNo(new_firstBillNo, new_lastBillNo, current_erp_material.IsBatchManage); - _logger.LogInformation($"入库单->批号{erpDetail.BatchBillNo}"); - if (!string.IsNullOrEmpty(erpDetail.BatchBillNo)) - purchaseInStock.Details[0].Lot = erpDetail.BatchBillNo; - } - } - else - purchaseInStock.Details[0].Lot = erpDetail.BatchBillNo; + // erpDetail.GenerateBatchBillNo(new_firstBillNo, new_lastBillNo, current_erp_material.IsBatchManage); + // _logger.LogInformation($"入库单->批号{erpDetail.BatchBillNo}"); + // if (!string.IsNullOrEmpty(erpDetail.BatchBillNo)) + // purchaseInStock.Details[0].Lot = erpDetail.BatchBillNo; + // } + //} + //else + // purchaseInStock.Details[0].Lot = erpDetail.BatchBillNo; string formId = dto.TargetFormId.ToString(); _logger.LogInformation($"入库单->开始同步金蝶 单号:{billNo} erp明细Id:{erpDetail.ErpDetailId} 数据: {JsonConvert.SerializeObject(dto)}");