From 9ed1862621fce5c825fa101ec0443e6c055ead96 Mon Sep 17 00:00:00 2001 From: lilili Date: Mon, 29 May 2023 09:35:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ICSSoft.DataProject/ICSSubmitService.cs | 2 +- .../ICSSoft.DataProject/ICSWareHouseLotInfoService.cs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs index ec57e95..e6d3d71 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs @@ -5403,7 +5403,7 @@ namespace ICSSoft.DataProject AND Sequence = '{item.TransSequence}' AND WorkPoint = '{item.WorkPoint}' AND Type = '{item.TransType}'"; - var workPoint=DBHelper.ExecuteScalar(checksql, cmd).ToString(); + var workPoint=DBHelper.ExecuteScalar(checksql, cmd)?.ToString(); if (workPoint == null|| workPoint=="") { tranferWorkpoint = item.WorkPoint; diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs index 0419b4b..1495929 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs @@ -987,8 +987,8 @@ namespace ICSSoft.DataProject AND Sequence = '{TransSequence}' AND WorkPoint = '{WorkPoint}' AND Type = '{TransType}'"; - var workPoint = DBHelper.ExecuteScalar(checksql, cmd); - if (workPoint == null) + var workPoint = DBHelper.ExecuteScalar(checksql, cmd).ToString(); + if (workPoint == null|| workPoint=="") { tranferWorkpoint = WorkPoint; } @@ -1046,7 +1046,7 @@ namespace ICSSoft.DataProject throw new Exception(language.GetNameByCode("WMSAPIInfo166")); } ///更新库存 - sql = @"UPDATE ICSWareHouseLotInfo SET Quantity=ISNULL(Quantity,0)-'{2}',LocationCode = '{3}', + sql = @"UPDATE ICSWareHouseLotInfo SET Quantity=ISNULL(Quantity,0)-'{2}',--LocationCode = '{3}', WorkPoint ='{4}' WHERE LotNo='{0}' AND WorkPoint='{1}'; UPDATE ICSInventoryLot SET WorkPoint='{4}' WHERE LotNo='{0}' AND WorkPoint='{1}'; @@ -1099,7 +1099,7 @@ namespace ICSSoft.DataProject } #endregion sql = @"INSERT INTO ICSWareHouseLotInfo(ID,LotNO,WarehouseCode,LocationCode,InvCode,Quantity,InDate,LockQuantity,MUSER,MUSERName,MTIME,WorkPoint,EATTRIBUTE1) - select NEWID(),'{0}','{4}','{3}',InvCode,'{2}',InDate,LockQuantity + select NEWID(),'{0}','{4}','{5}',InvCode,'{2}',InDate,LockQuantity ,MUSER,MUSERName,GETDATE(),'{3}','' from ICSWareHouseLotInfo where LotNO='{1}' AND WorkPoint='{3}'"; @@ -1116,7 +1116,7 @@ namespace ICSSoft.DataProject FROM ICSInventoryLot a INNER JOIN ICSInventoryLotDetail b ON b.LotNo='{3}' AND a.WorkPoint=b.WorkPoint INNER JOIN Sys_SRM_User f ON f.F_Account='{2}' AND a.WorkPoint=f.F_Location - WHERE a.LotNo='{0}' AND a.WorkPoint='{1}'"; + WHERE a.LotNo='{3}' AND a.WorkPoint='{1}'"; sql = string.Format(sql, lotstr, tranferWorkpoint, User,LotNo); if (!DBHelper.ExecuteNonQuery(sql, cmd))