From ee27bf8209d9e32f76bcfb1e3e13216ba58c3188 Mon Sep 17 00:00:00 2001 From: 44673626 <44673626@qq.com> Date: Wed, 23 Feb 2022 18:41:56 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=A2=E6=97=97=E6=A0=B8=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HQHSettledDetailDapperRepository.cs | 39 +++++++++++++++++-- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs index c69cde7a..399443f6 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs @@ -115,7 +115,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " C.EstimateTypeDesc AS 物料组,\n" + " a.Factory AS 工厂,\n" + " '' AS 看板编号,\n" + - " NULL AS 验收单日期 \n" + + " '' AS 验收单日期 \n" + " FROM\n" + " (\n" + " SELECT SUM\n" + @@ -329,6 +329,39 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report var _query = DbConnection.Query(_sql, null, null, true, 1200, null); _list = _query.ToList(); + + + foreach (var itm1 in _list) + { + var itm = _ls.FirstOrDefault(p => p.Kanban == itm1.订货看板编号 && p.MaterialCode == itm1.Sap编码); + if (itm != null) + { + itm1.交货单号 = itm.WmsBillNum; + itm1.交货时间 = itm.WmsDate; + } + + var itmcopy = _lscopy.FirstOrDefault(p => p.HQHKanBan == itm1.订货看板编号 && p.MaterialCode == itm1.Sap编码); + if (itmcopy != null) + { + itm1.看板编号 = itmcopy.KanbanNumber; + itm1.验收单日期 = itmcopy.AcceptanceDate; + itm1.结算验收单号 = itmcopy.AcceptanceNo; + } + } + + + //var _ls_1 = from itm1 in _list + // join itm2 in _ls on new { Kanban = itm1.订货看板编号, MaterialCode=itm1.Sap编码 } + // equals new { itm2.Kanban, itm2.MaterialCode } into g + // from t in g.DefaultIfEmpty() + // select new HQHSettledDetailDiff + // { + + // } ; + + + + return _list; } @@ -680,8 +713,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report [ExporterHeader(DisplayName = "看板编号")] public string 看板编号 { set; get; } - [ExporterHeader(DisplayName = "验收单日期",Format ="yyyy-MM-dd")] - public DateTime 验收单日期 { set; get; } + [ExporterHeader(DisplayName = "验收单日期")] + public string 验收单日期 { set; get; } } public class HQHSettleQtyDiff {