From bacfb723a1d76a31cd404f1aa3cf9ece430c47ed Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Tue, 21 Jan 2025 10:50:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0SADETAIL=E8=A1=A8partcode?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Report/SaSeEdiCompareExportBaseService.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeEdiCompareExportBaseService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeEdiCompareExportBaseService.cs index 1a2a9880..65272734 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeEdiCompareExportBaseService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeEdiCompareExportBaseService.cs @@ -248,6 +248,15 @@ WHERE a.version='" + version + "'"; _settleAccountDbContext.Database.ExecuteSqlRaw(sql_NOTCAN_SA); _settleAccountDbContext.SaveChanges(); + + var sql_SA = @"UPDATE a +SET a.PartCode=b.RealPartCode +FROM [BQ_SA].[dbo].[Set_BBAC_SA_DETAIL] a +INNER JOIN [BQ_SA].[dbo].[Set_BBAC_SE_DETAIL] b ON a.LU=b.lu and a.PN=b.PN and a.BusinessType=b.BusinessType +WHERE a.PartCode!=b.RealPartCode and a.version='" + version + "'"; + + _settleAccountDbContext.Database.ExecuteSqlRaw(sql_SA); + _settleAccountDbContext.SaveChanges(); } else { @@ -269,6 +278,15 @@ WHERE a.version='" + version + "'"; _settleAccountDbContext.Database.ExecuteSqlRaw(sql_NOTCAN_SA); _settleAccountDbContext.SaveChanges(); + var sql_SA = @"UPDATE a +SET a.PartCode=b.RealPartCode +FROM [BQ_SA].[dbo].[Set_HBPO_SA_DETAIL] a +INNER JOIN [BQ_SA].[dbo].[Set_HBPO_SE_DETAIL] b ON a.LU=b.lu and a.PN=b.PN and a.BusinessType=b.BusinessType +WHERE a.PartCode!=b.RealPartCode and a.version='" + version + "'"; + + _settleAccountDbContext.Database.ExecuteSqlRaw(sql_SA); + _settleAccountDbContext.SaveChanges(); + }