From a101152fdcb82ff80c821b9f9f3e57f47557b877 Mon Sep 17 00:00:00 2001 From: lixh Date: Wed, 25 May 2022 15:32:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=A4=E6=AD=A5=E8=B0=83=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs | 6 +++--- .../ICSSoft.DataProject/ICSWareHouseLotInfoService.cs | 4 ++-- .../ICSSoft.DataProject/ICSWareHouseService.cs | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs index f6bae26..22bfb8e 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs @@ -738,13 +738,13 @@ namespace ICSSoft.DataProject INNER JOIN ICSOtherOut out ON out.TransferDetailID=tra.TransferDetailID AND out.WorkPoint=tra.WorkPoint INNER JOIN ICSWareHouseLotInfoLog log ON out.OutCode=log.TransCode AND out.Sequence=log.TransSequence AND out.WorkPoint=log.WorkPoint INNER JOIN ICSWareHouseLotInfo a ON a.LotNo=log.LotNo AND a.WorkPoint=log.WorkPoint - WHERE a.LotNo='{2}' AND a.WorkPoint='{3}') + WHERE a.LotNo='{2}' AND a.WorkPoint='{3}' AND Otin.InCode = '" + JsonData.TransCode + @"') BEGIN RAISERROR('" + language.GetNameByCode("WMSAPIInfo036") + @"',16,1); RETURN END - " + sql + "AND Otin.InCode = '" + JsonData.TransCode + "'" - + @"GROUP BY a.ID,con.ContainerCode,con.ContainerName,a.LotNo,a.InvCode,inv.InvName,inv.InvStd,inv.InvUnit,a.WarehouseCode, + " + sql + "AND Otin.InCode = '" + JsonData.TransCode + @"' + GROUP BY a.ID,con.ContainerCode,con.ContainerName,a.LotNo,a.InvCode,inv.InvName,inv.InvStd,inv.InvUnit,a.WarehouseCode, wh.WarehouseName,a.LocationCode,loc.LocationName,CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END,inv.AmountUnit, ext.ID,ext.ProjectCode,ext.Version,ext.Brand,ext.cFree1,ext.cFree2,ext.cFree3,ext.cFree4,ext.cFree5,ext.cFree6,ext.cFree7,ext.cFree8,ext.cFree9,ext.cFree10,a.MUSER,a.MTIME"; diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs index 4743809..1e06e27 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs @@ -444,9 +444,9 @@ namespace ICSSoft.DataProject throw new Exception("" + language.GetNameByCode("WMSAPIInfo166") + @""); } ///添加库存 - sql = @"IF EXISTS(SELECT a.ID FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND Quantity>0) + sql = @"IF NOT EXISTS(SELECT a.ID FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}') BEGIN - RAISERROR('" + language.GetNameByCode("WMSAPIInfo164") + @"',16,1); + RAISERROR('" + language.GetNameByCode("WMSAPIInfo171") + @"',16,1); RETURN END diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseService.cs index 237909d..32bd1f4 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseService.cs @@ -265,7 +265,7 @@ namespace ICSSoft.DataProject RAISERROR('" + language.GetNameByCode("WMSAPIInfo137") + @"',16,1); RETURN END - UPDATE Otin SET InQuantity=ISNULL(InQuantity,0)+'{2}' + UPDATE Otin SET InQuantity=ISNULL(InQuantity,0)+'{4}' FROM ICSOtherIn Otin INNER JOIN ICSTransfer tra ON Otin.TransferDetailID=tra.TransferDetailID AND Otin.WorkPoint=tra.WorkPoint INNER JOIN ICSOtherOut out ON out.TransferDetailID=tra.TransferDetailID AND out.WorkPoint=tra.WorkPoint @@ -281,7 +281,7 @@ namespace ICSSoft.DataProject BEGIN RAISERROR('" + language.GetNameByCode("WMSAPIInfo149") + @"',16,1); END"; - sql = string.Format(sql, LotNo, WorkPoint, Quantity,TransCode,TransSequence); + sql = string.Format(sql, LotNo, WorkPoint,TransCode,TransSequence, Quantity); if (!DBHelper.ExecuteNonQuery(sql, cmd)) { throw new Exception(language.GetNameByCode("WMSAPIInfo150"));//"两步调入单更新失败!");