diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSalesService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSalesService.cs index 0492e71..d4f7c5b 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSalesService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSalesService.cs @@ -34,6 +34,16 @@ namespace ICSSoft.DataProject { try { + + string chekksql = @"select c.EATTRIBUTE1 FROM ICSSDN a + INNER JOIN ICSInventory c on a.InvCode=c.InvCode and a.WorkPoint=c.WorkPoint + WHERE a.Sequence='{2}' AND a.SDNCode='{0}' AND a.WorkPoint='{1}' and c.AmountEnable='1'"; + chekksql = string.Format(chekksql, TransCode, WorkPoint, TransSequence); + DataTable dta = DBHelper.SQlReturnData(chekksql, cmd); + if (dta.Rows.Count > 0) + { + Quantity = (decimal.Parse(Quantity) * decimal.Parse(dta.Rows[0]["EATTRIBUTE1"].ToString())).ToString(); + } string sql = @"DECLARE @Status VARCHAR(10) SELECT @Status=a.Status FROM ICSSDN a WHERE a.SDNCode='{0}' AND a.Sequence='{3}' AND a.WorkPoint='{1}' AND a.Type='1' diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs index eaa5148..e1743ec 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs @@ -4893,6 +4893,16 @@ a.ExtensionID foreach (var itemInfo in item.detail) { //出库 + string chekksql = @"select c.EATTRIBUTE1 FROM ICSMOPick a + INNER JOIN ICSMO b ON a.MODetailID=b.MODetailID AND a.WorkPoint=b.WorkPoint + INNER JOIN ICSInventory c on a.InvCode=c.InvCode and a.WorkPoint=c.WorkPoint + WHERE b.MOCode='{0}' AND b.Sequence+'~'+a.Sequence='{3}' AND a.WorkPoint='{1}' and c.AmountEnable='1'"; + chekksql = string.Format(chekksql, item.TransCode, item.WorkPoint, itemInfo.CurrentQuantity, item.TransSequence); + DataTable dta = DBHelper.SQlReturnData(chekksql, cmd); + if (dta.Rows.Count > 0) + { + itemInfo.CurrentQuantity = (decimal.Parse(itemInfo.CurrentQuantity) * decimal.Parse(dta.Rows[0]["EATTRIBUTE1"].ToString())).ToString(); + } printTable = ICSWareHouseLotInfoService.AMWareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, item.User, item.WorkPoint, "3", TransTypeEnum.MOIssueDoc.GetDescription(), cmd, language, itemInfo.LogID, MergeID); } @@ -4908,7 +4918,17 @@ a.ExtensionID foreach (var itemInfo in item.detail) { //出库 - printTable = ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, + //出库 + string chekksql = @"select c.EATTRIBUTE1 FROM ICSSDN a + INNER JOIN ICSInventory c on a.InvCode=c.InvCode and a.WorkPoint=c.WorkPoint + WHERE a.SDNCode='{0}' AND a.Sequence='{2}' AND a.WorkPoint='{1}' and c.AmountEnable='1'"; + chekksql = string.Format(chekksql, item.TransCode, item.WorkPoint, item.TransSequence); + DataTable dta = DBHelper.SQlReturnData(chekksql, cmd); + if (dta.Rows.Count > 0) + { + itemInfo.CurrentQuantity = (decimal.Parse(itemInfo.CurrentQuantity) * decimal.Parse(dta.Rows[0]["EATTRIBUTE1"].ToString())).ToString(); + } + printTable = ICSWareHouseLotInfoService.AMWareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, item.User, item.WorkPoint, "3", TransTypeEnum.SalesShipmentDoc.GetDescription(), cmd, language, itemInfo.LogID, MergeID); } } diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs index b609cef..4079570 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs @@ -1871,16 +1871,16 @@ namespace ICSSoft.DataProject //DataTable dtaa = DBHelper.SQlReturnData(sqql, cmd); //amount = dtaa.Rows[0]["Amount"].ToString(); - string chekksql = @"select c.EATTRIBUTE1 FROM ICSMOPick a - INNER JOIN ICSMO b ON a.MODetailID=b.MODetailID AND a.WorkPoint=b.WorkPoint - INNER JOIN ICSInventory c on a.InvCode=c.InvCode and a.WorkPoint=c.WorkPoint - WHERE b.MOCode='{0}' AND b.Sequence+'~'+a.Sequence='{3}' AND a.WorkPoint='{1}' and c.AmountEnable='1'"; - chekksql = string.Format(chekksql, TransCode, WorkPoint, Quantity, TransSequence); - DataTable dta = DBHelper.SQlReturnData(chekksql, cmd); - if (dta.Rows.Count > 0) - { - Quantity = (decimal.Parse(Quantity) * decimal.Parse(dta.Rows[0]["EATTRIBUTE1"].ToString())).ToString(); - } + //string chekksql = @"select c.EATTRIBUTE1 FROM ICSMOPick a + // INNER JOIN ICSMO b ON a.MODetailID=b.MODetailID AND a.WorkPoint=b.WorkPoint + // INNER JOIN ICSInventory c on a.InvCode=c.InvCode and a.WorkPoint=c.WorkPoint + // WHERE b.MOCode='{0}' AND b.Sequence+'~'+a.Sequence='{3}' AND a.WorkPoint='{1}' and c.AmountEnable='1'"; + //chekksql = string.Format(chekksql, TransCode, WorkPoint, Quantity, TransSequence); + //DataTable dta = DBHelper.SQlReturnData(chekksql, cmd); + //if (dta.Rows.Count > 0) + //{ + // Quantity = (decimal.Parse(Quantity) * decimal.Parse(dta.Rows[0]["EATTRIBUTE1"].ToString())).ToString(); + //} diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Web.config b/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Web.config index 45dfb29..6ab34c6 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Web.config +++ b/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Web.config @@ -7,7 +7,7 @@ - +