From 4c306bda9b99051aec51329227d0096f622b6d9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=86=E6=99=94?= Date: Mon, 16 Oct 2023 18:17:07 +0800 Subject: [PATCH] =?UTF-8?q?PDA=E8=B0=83=E6=8B=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ICSSoft.DataProject/ICSSubmitService.cs | 27 +++++++++++++++---- WMS-BS/NFine.Web/Configs/database.config | 4 +-- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs index aabf784..b37af3c 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs @@ -5546,12 +5546,29 @@ namespace ICSSoft.DataProject DBHelper.ExecuteNonQuery(sql, cmd); BusinessCode = TransTypeEnum.OneStepTransferDocIn.GetDescription(); - //更新源头单据信息 - ICSWareHouseService.OneStepTransferDocIn(item.TransCode, item.TransSequence, item.WorkPoint, itemInfo.CurrentQuantity, cmd, language); + #region 根据占料获取源头单据行信息 + string docsql = @"select TransSequence,Quantity from ICSWareHouseLotInfoLog + where TransType='15' AND TransCode='{0}' AND LotNo='{1}' + AND WorkPoint='{2}'"; + docsql = string.Format(docsql, item.TransCode, itemInfo.LotNo, item.WorkPoint); + DataTable docdt = DBHelper.SQlReturnData(docsql, cmd); + if (docdt.Rows.Count == 0) + { + throw new Exception("扫描条码:" + itemInfo.LotNo + "未查询到占料信息!"); + } + #endregion + else + { + foreach (DataRow dr in docdt.Rows) + { + //更新源头单据信息 + ICSWareHouseService.OneStepTransferDocIn(item.TransCode, dr["TransSequence"].ToString(), item.WorkPoint, dr["Quantity"].ToString(), cmd, language); - //更新条码信息 - printTable = ICSWareHouseLotInfoService.WareHouseLotInfoTransfer(Identification, item.TransCode, item.TransSequence, itemInfo.WarehouseCode, itemInfo.LocationCode, - itemInfo.LotNo, itemInfo.CurrentQuantity, item.User, item.WorkPoint, item.TransType, TransTypeEnum.OneStepTransferDocIn.GetDescription(), cmd, language, MergeID); + //更新条码信息 + printTable = ICSWareHouseLotInfoService.WareHouseLotInfoTransfer(Identification, item.TransCode, dr["TransSequence"].ToString(), itemInfo.WarehouseCode, itemInfo.LocationCode, + itemInfo.LotNo, dr["Quantity"].ToString(), item.User, item.WorkPoint, item.TransType, TransTypeEnum.OneStepTransferDocIn.GetDescription(), cmd, language, MergeID); + } + } } } //上传ERP diff --git a/WMS-BS/NFine.Web/Configs/database.config b/WMS-BS/NFine.Web/Configs/database.config index d48eb9a..85bc1dc 100644 --- a/WMS-BS/NFine.Web/Configs/database.config +++ b/WMS-BS/NFine.Web/Configs/database.config @@ -3,12 +3,12 @@ - + - +