diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsDapperRepository.cs index 38f9dc8d..6d04fb66 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsDapperRepository.cs @@ -74,7 +74,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report } - public virtual List GetSalesStockSum() + + public virtual List GetSalesStockSum(string version) { string str = "SELECT A\n" + @@ -90,15 +91,16 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " PartGroup \n" + " FROM\n" + " [ VIEW_PG_SIMPLE_PART ] \n" + - " ) B ON A.PartCode = B.PartCode"; - + " ) B ON A.PartCode = B.PartCode where a.version='{0}'"; + str = string.Format(str, version); var _list = DbConnection.Query(str); return _list.ToList(); - } + + //public virtual Dictionary GetSapList(List childList, string version, bool isNotHistoryPart = false) where T : ReportDetailBase, new() //{ diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs index 60dcef94..e041cbe4 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs @@ -288,13 +288,14 @@ namespace SettleAccount.Job.Services.Report public List GetReport(Guid id, List exportName, List p_list) { + var version = p_list.Where(p => p.Name == "Version").FirstOrDefault().Value; List _ls = new List(); _ls.AddRange(GetFisSum(id, exportName, p_list)); _ls.AddRange(GetHQKanbanSum(id, exportName, p_list)); _ls.AddRange(GetKanbanSum(id, exportName, p_list)); - var _lst = _wmsDapper.GetSalesStockSum(); + var _lst = _wmsDapper.GetSalesStockSum(version); var query = from itm in _lst join itm1 in _ls on new { Version = itm.Version, PartCode = itm.PartCode } equals new { Version = itm1.版本, PartCode = itm1.物料号 }