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 1/6] =?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 2/6] =?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 3/6] =?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"] + "'))"; From 4e4c1c14c846ff65b44f04448c6c916243386cbf Mon Sep 17 00:00:00 2001 From: FoxV Date: Tue, 20 Sep 2022 18:12:43 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E4=B8=A4=E6=AD=A5=E8=B0=83=E5=85=A5?= =?UTF-8?q?=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ICSSoft.DataProject/ICSWareHouseLotInfoService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs index 71ede0e..ef373dd 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs @@ -1229,7 +1229,7 @@ namespace ICSSoft.DataProject RETURN END - UPDATE ICSWareHouseLotInfo SET WarehouseCode='{2}',LocationCode='{3}',Quantity='{4}' WHERE LotNo='{0}' AND WorkPoint='{1}' + UPDATE ICSWareHouseLotInfo SET WarehouseCode='{2}',LocationCode='{3}',Quantity=Quantity+'{4}' WHERE LotNo='{0}' AND WorkPoint='{1}' "; sql = string.Format(sql, LotNo, WorkPoint, WarehouseCode, LocationCode, Quantity); From 47c0f34b2b21e8c6b37ba8991ea262b8a0e1b47a Mon Sep 17 00:00:00 2001 From: FoxV Date: Wed, 21 Sep 2022 09:38:44 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=B8=A4=E6=AD=A5=E8=B0=83=E5=85=A5?= =?UTF-8?q?=E6=9D=A5=E6=BA=90=E4=BB=93=E5=BA=93=E5=86=99null?= 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 ef373dd..be9555d 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs @@ -1202,12 +1202,12 @@ namespace ICSSoft.DataProject END INSERT INTO ICSWareHouseLotInfoLog(ID,Identification,TransCode,TransSequence,LotNo,InvCode, - FromWarehouseCode,FromLocationCode,ToWarehouseCode,ToLocationCode,Quantity, + ToWarehouseCode,ToLocationCode,Quantity, Memo,Lock,TransType,BusinessCode,ERPUpload,ERPID, ERPDetailID,ERPCode,ERPSequence,MUSER,MUSERName, MTIME,WorkPoint,EATTRIBUTE1) SELECT NEWID(),'{3}','{4}','{5}',a.LotNo ,a.InvCode , - c.WarehouseCode,c.LocationCode,'{9}','{10}','{6}', + '{9}','{10}','{6}', '','0','{7}','{8}','0','', '','','',f.F_Account ,f.F_RealName , SYSDATETIME() ,a.WorkPoint ,'' From 5fb4055936850184e9b9140b4a18f6c5c363ac4b Mon Sep 17 00:00:00 2001 From: FoxV Date: Wed, 21 Sep 2022 09:40:47 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E5=80=92=E5=86=B2=E5=AD=90=E4=BB=B6?= =?UTF-8?q?=E5=9B=9E=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ICSSoft.DataProject/ICSManufactureService.cs | 4 ++-- .../ICSSoft.DataProject/ICSOutsourcingService.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs index 4c43605..3757f69 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs @@ -833,8 +833,8 @@ namespace ICSSoft.DataProject foreach (var details in resdetails) { JObject dets = (JObject)details; - ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["MODetailID"].ToString(), Identification, det["IDSS"].ToString(), - dets["DetailID"].ToString(), dets["MRCVCode"].ToString(), dets["Sequence"].ToString(), cmd, language); + ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["MODetailID"].ToString(), Identification, det["ERPID"].ToString(), + dets["ERPDetailID"].ToString(), dets["MRCVCode"].ToString(), dets["Sequence"].ToString(), cmd, language); } } } diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSOutsourcingService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSOutsourcingService.cs index 2d7f263..ed180f1 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSOutsourcingService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSOutsourcingService.cs @@ -922,8 +922,8 @@ namespace ICSSoft.DataProject foreach (var details in resdetails) { JObject dets = (JObject)details; - ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["OODetailID"].ToString(), Identification, det["IDSS"].ToString(), - dets["DetailID"].ToString(), dets["MRCVCode"].ToString(), dets["Sequence"].ToString(), cmd, language); + ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["OODetailID"].ToString(), Identification, det["ERPID"].ToString(), + dets["ERPDetailID"].ToString(), dets["MRCVCode"].ToString(), dets["Sequence"].ToString(), cmd, language); } } }