From 670dbb3d580f9273b5b4b3ebe391f33be1a6adce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=92=E6=9E=97=E6=9D=B0?= <1205395967@qq.com> Date: Fri, 16 Sep 2022 17:27:02 +0800 Subject: [PATCH 1/4] Mao --- ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs index dde0972..6667c97 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs @@ -4937,7 +4937,12 @@ namespace ICSSoft.DataProject foreach (var itemInfo in item.detail) { int len = itemInfo.SelectLevel.Length; - sql = @"INSERT INTO ICSCheck (ID,CheckCode,SelectLevel,Status,Quantity,Amount,MUSER,MUSERName,MTIME,WorkPoint) + sql = @"IF NOT EXISTS(SELECT id FROM ICSWareHouseLotInfo WHERE SUBSTRING(LocationCode,1,{4}) = '{1}') + BEGIN + RAISERROR('" + language.GetNameByCode("WMSAPIInfo460") + @"',16,1); + RETURN + END + INSERT INTO ICSCheck (ID,CheckCode,SelectLevel,Status,Quantity,Amount,MUSER,MUSERName,MTIME,WorkPoint) SELECT NEWID(),'{0}','{1}','2',SUM(a.Quantity),0,b.F_Account,b.F_RealName,GETDATE(),b.F_Location FROM ICSWareHouseLotInfo a INNER JOIN Sys_SRM_User b ON b.F_Account='{2}' AND b.F_Location='{3}' From aa0437fa0a411f68e495c8a1703d57c1313ecb41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=92=E6=9E=97=E6=9D=B0?= <1205395967@qq.com> Date: Mon, 19 Sep 2022 10:23:48 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=9B=98=E7=82=B9=EF=BC=8C=E6=8B=92?= =?UTF-8?q?=E6=94=B6=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ICSSoft.DataProject/ICSOutsourcingService.cs | 8 ++++---- .../ICSSoft.DataProject/ICSPurchaseService.cs | 2 +- .../ICSSoft.DataProject/ICSSubmitService.cs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSOutsourcingService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSOutsourcingService.cs index 2d7f263..d19f6dc 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSOutsourcingService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSOutsourcingService.cs @@ -1219,8 +1219,8 @@ namespace ICSSoft.DataProject try { #region ERP - string sql = @"SELECT a.VenCode+a.DepCode+a.DNCode+a.MUSER AS Costre,a.VenCode,a.DepCode,a.ODNCode AS DNCode,a.MUSER,a.MTIME, - a.Sequence,a.InvCode,Sum(x.Quantity) AS Quantity,a.Amount,ISNULL(a.UnitPrice,0) AS UnitPrice,a.Currency,a.ODNDetailID AS DNDetailID + string sql = @"SELECT a.VenCode+a.DepCode+a.ODNCode+a.MUSER AS Costre,a.VenCode,a.DepCode,a.ODNCode,a.MUSER,a.MTIME, + a.Sequence,a.InvCode,Sum(x.Quantity) AS Quantity,a.Amount,ISNULL(a.UnitPrice,0) AS UnitPrice,a.Currency,a.ODNDetailID ,a.WorkPoint,ISNULL(ext.ProjectCode, '') AS ProjectCode,CASE WHEN ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END AS BatchCode,ISNULL(ext.Version, '') AS Version,ISNULL(ext.Brand, '') AS Brand, ISNULL(ext.cFree1, '') AS cFree1,ISNULL(ext.cFree2, '') AS cFree2,ISNULL(ext.cFree3, '') AS cFree3,ISNULL(ext.cFree4, '') AS cFree4,ISNULL(ext.cFree5, '') AS cFree5,ISNULL(ext.cFree6, '') AS cFree6,ISNULL(ext.cFree7, '') AS cFree7,ISNULL(ext.cFree8, '') AS cFree8,ISNULL(ext.cFree9, '') AS cFree9,ISNULL(ext.cFree10, '') AS cFree10 INTO #TempERP @@ -1233,8 +1233,8 @@ namespace ICSSoft.DataProject a.WorkPoint,ISNULL(ext.ProjectCode, ''),ISNULL(invBat.BatchEnable, ''),ISNULL(ext.BatchCode, ''),ISNULL(ext.Version, ''),ISNULL(ext.Brand, ''), ISNULL(ext.cFree1, ''),ISNULL(ext.cFree2, ''),ISNULL(ext.cFree3, ''),ISNULL(ext.cFree4, ''),ISNULL(ext.cFree5, ''),ISNULL(ext.cFree6, ''),ISNULL(ext.cFree7, ''),ISNULL(ext.cFree8, ''),ISNULL(ext.cFree9, ''),ISNULL(ext.cFree10, '') - SELECT DISTINCT Costre,WorkPoint,VenCode,DepCode,DNCode,MUSER AS [User],SYSDATETIME() AS MTime FROM #TempERP - SELECT Costre,Sequence,InvCode,Quantity,Amount,UnitPrice,Currency,DNDetailID,ProjectCode,BatchCode,Version,Brand,cFree1,cFree2,cFree3,cFree4,cFree5,cFree6,cFree7,cFree8,cFree9,cFree10 + SELECT DISTINCT Costre,WorkPoint,VenCode,DepCode,ODNCode,MUSER AS [User],SYSDATETIME() AS MTime FROM #TempERP + SELECT Costre,Sequence,InvCode,Quantity,Amount,UnitPrice,Currency,ODNDetailID,ProjectCode,BatchCode,Version,Brand,cFree1,cFree2,cFree3,cFree4,cFree5,cFree6,cFree7,cFree8,cFree9,cFree10 FROM #TempERP DROP TABLE #TempERP"; diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs index c2b853d..ee9cdda 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs @@ -503,7 +503,7 @@ namespace ICSSoft.DataProject FROM ICSDeliveryNotice a INNER JOIN ICSExtension ext ON a.ExtensionID=ext.ID AND a.WorkPoint=ext.WorkPoint INNER JOIN ICSInventory invBat ON a.InvCode=invBat.InvCode AND a.WorkPoint=invBat.WorkPoint - INNER JOIN ICSDeliveryNotice x ON a.DNDetailID=x.PODetailID AND a.Sequence=x.Sequence AND a.WorkPoint=x.WorkPoint + INNER JOIN ICSDeliveryNotice x ON a.DNDetailID=x.PODetailID AND a.WorkPoint=x.WorkPoint WHERE a.DNCode='{0}' AND a.WorkPoint='{1}' GROUP BY a.VenCode,a.DepCode,a.DNCode,a.MUSER,a.MTIME,a.Sequence,a.InvCode,a.Amount,a.Quantity,a.UnitPrice,a.Currency,a.DNDetailID, a.WorkPoint,ISNULL(ext.ProjectCode, ''),ISNULL(invBat.BatchEnable, ''),ISNULL(ext.BatchCode, ''),ISNULL(ext.Version, ''),ISNULL(ext.Brand, ''), diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs index 6667c97..bba92f8 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs @@ -4945,7 +4945,7 @@ namespace ICSSoft.DataProject INSERT INTO ICSCheck (ID,CheckCode,SelectLevel,Status,Quantity,Amount,MUSER,MUSERName,MTIME,WorkPoint) SELECT NEWID(),'{0}','{1}','2',SUM(a.Quantity),0,b.F_Account,b.F_RealName,GETDATE(),b.F_Location FROM ICSWareHouseLotInfo a - INNER JOIN Sys_SRM_User b ON b.F_Account='{2}' AND b.F_Location='{3}' + INNER JOIN Sys_SRM_User b ON b.F_Account='{2}' AND b.F_Location='{3}' WHERE SUBSTRING(a.LocationCode,1,{4}) = '{1}' GROUP BY b.F_Account,b.F_RealName,b.F_Location"; sql = string.Format(sql, Code, itemInfo.SelectLevel, item.User, item.WorkPoint, len); From cc3030fd7be9f43277635c58350d5e341ca7a372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=92=E6=9E=97=E6=9D=B0?= <1205395967@qq.com> Date: Mon, 19 Sep 2022 10:33:36 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=9B=98=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ICSSoft.DataProject/ICSWareHouseLotInfoService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs index 71ede0e..69ffa2b 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs @@ -827,14 +827,14 @@ namespace ICSSoft.DataProject MTIME,WorkPoint,EATTRIBUTE1) SELECT NEWID(),'{3}','{4}','{5}',a.LotNo ,a.InvCode , a.WarehouseCode,a.LocationCode,'','',a.Quantity, - '盘点','0','{6}','{7}','0','', + '{8}','0','{6}','{7}','0','', '','','',f.F_Account ,f.F_RealName , SYSDATETIME() ,a.WorkPoint ,'' FROM ICSWareHouseLotInfo a 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}' "; - sql = string.Format(sql, LotNo, WorkPoint, User, Identification, TransCode, TransSequence, TransType, TransTypeEnum.LOTCheckAfter.GetDescription()); + sql = string.Format(sql, LotNo, WorkPoint, User, Identification, TransCode, TransSequence, TransType, TransTypeEnum.LOTCheckAfter.GetDescription(), CheckKind); if (!DBHelper.ExecuteNonQuery(sql, cmd)) { From 17536acdf317ee39f9c893e3a0f97d59dc3d087f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=92=E6=9E=97=E6=9D=B0?= <1205395967@qq.com> Date: Tue, 20 Sep 2022 15:48:14 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=A7=94=E5=A4=96?= =?UTF-8?q?=E9=80=80=E8=B4=A7=E5=8A=A0=E4=BB=93=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs index bba92f8..76bb64c 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs @@ -684,7 +684,7 @@ namespace ICSSoft.DataProject inv.InvName, inv.InvStd, inv.InvUnit, - '' AS WHCode, + a.WHCode, inv.AmountUnit, '' AS WHName, a.ExtensionID, @@ -1682,6 +1682,7 @@ namespace ICSSoft.DataProject CheckTrans(dataView, rowFilter, string.Format(language.GetNameByCode("WMSAPIInfo041"), Lot, drLot["InvCode"])); rowFilter += " AND (LEN(ISNULL(WHCode,''))<=0 OR (LEN(ISNULL(WHCode,''))>0 AND WHCode='" + drLot["WHCode"] + "'))"; CheckTrans(dataView, rowFilter, string.Format(language.GetNameByCode("WMSAPIInfo042"), Lot, drLot["WHCode"])); + rowFilter += " AND (LEN(ISNULL(ProjectCode,''))<=0 OR (LEN(ISNULL(ProjectCode,''))>0 AND ProjectCode='" + drLot["ProjectCode"] + "'))"; CheckTrans(dataView, rowFilter, string.Format(language.GetNameByCode("WMSAPIInfo043"), Lot, drLot["ProjectCode"])); rowFilter += "AND (LEN(ISNULL(BatchCode,''))<=0 OR (LEN(ISNULL(BatchCode,''))>0 AND BatchCode='" + drLot["BatchCode"] + "'))";