From 97b7035b2aaffb18d01983f1ed326b2b71818818 Mon Sep 17 00:00:00 2001 From: Administrator Date: Tue, 26 Apr 2022 13:06:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SettleAccountJob/Report/WmsDapperRepository.cs | 4 ++-- .../Services/Report/UnSettledSumService.cs | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) 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 b832a1a0..1f4d490e 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 @@ -99,11 +99,11 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " TM_PG_TIME_STOCK_DETAIL \n" + " A LEFT JOIN ( \n" + " SELECT DISTINCT \n" + -" [PartCode], \n" + +" PartCode, \n" + " ( ISNULL ( [PartDesc1], '' ) + ISNULL ( [PartDesc2], '' ) ) PartDesc, \n" + " PartGroup \n" + " FROM \n" + -" [VIEW_PG_SIMPLE_PART] \n" + +" VIEW_PG_SIMPLE_PART \n" + " ) B ON A.PartCode = B.PartCode where a.version='{0}'"; str = string.Format(str, version); var _list = DbConnection.Query(str); 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 9780ee34..4de3da6f 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs @@ -160,6 +160,7 @@ namespace SettleAccount.Job.Services.Report var _fislist = _lst.GroupBy(p => new { p.SapMaterialCode, p.MaterialDesc, p.MaterialGroup, p.MaterialCode }) .Select(p => new UnSettledSum { + 库位 = "PLJS", 版本 = version, 物料号 = p.Key.SapMaterialCode, 客户物料 = p.Key.MaterialCode, @@ -237,6 +238,7 @@ namespace SettleAccount.Job.Services.Report var kanbanList = _ls.GroupBy(p => new { p.SapCode, p.MaterialDesc, p.MaterialGroup, p.CustomerPartCode }) .Select(p => new UnSettledSum { + 库位 = "PLJS", 版本 = version, 物料号 = p.Key.SapCode, 客户物料 = p.Key.CustomerPartCode, @@ -287,6 +289,7 @@ namespace SettleAccount.Job.Services.Report var kanbanList = _ls.GroupBy(p => new { p.Sap编码, p.零件中文名称, p.物料组, p.客户物料号 }) .Select(p => new UnSettledSum { + 库位="PLJS", 版本=version, 物料号 = p.Key.Sap编码, 客户物料 = p.Key.客户物料号, @@ -325,6 +328,7 @@ namespace SettleAccount.Job.Services.Report var kanbanList = _ls.GroupBy(p => new { p.SAP编码, p.物料描述, p.物料代码 }) .Select(p => new UnSettledSum { + 库位 = "BJJS", 版本 = version, 物料号 = p.Key.SAP编码, 客户物料 = p.Key.物料代码, @@ -353,9 +357,9 @@ namespace SettleAccount.Job.Services.Report var _lst = _wmsDapper.GetSalesStockSum(version); - var query = from itm in _lst + var query = from itm in _lst join itm1 in _ls - on new { Version = itm.Version, PartCode = itm.PartCode } equals new { Version = itm1.版本, PartCode = itm1.物料号 } + on new { Version = itm.Version, PartCode = itm.PartCode, LocCode= itm.LocCode.ToUpper()} equals new { Version = itm1.版本, PartCode = itm1.物料号, LocCode = itm1.库位} into temp from tm in temp.DefaultIfEmpty() select new UnSettledSum