Browse Source

更新SADETAIL表partcode数据

master^2
zhouhongjun 1 week ago
parent
commit
bacfb723a1
  1. 18
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeEdiCompareExportBaseService.cs

18
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.Database.ExecuteSqlRaw(sql_NOTCAN_SA);
_settleAccountDbContext.SaveChanges(); _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 else
{ {
@ -269,6 +278,15 @@ WHERE a.version='" + version + "'";
_settleAccountDbContext.Database.ExecuteSqlRaw(sql_NOTCAN_SA); _settleAccountDbContext.Database.ExecuteSqlRaw(sql_NOTCAN_SA);
_settleAccountDbContext.SaveChanges(); _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();
} }

Loading…
Cancel
Save