From f7078cc9ea0fd857a33d1895b29036c0c577eb85 Mon Sep 17 00:00:00 2001 From: Administrator Date: Tue, 22 Feb 2022 15:06:09 +0800 Subject: [PATCH 1/2] =?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 --- .vs/Win.Sfs.SmartSettlementSystem.PG/v16/.suo | Bin 79872 -> 79872 bytes .../HQHSettledDetailDapperRepository.cs | 21 +++++++++++++----- .../HQHSettledDetailDiffExportService.cs | 1 + 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.vs/Win.Sfs.SmartSettlementSystem.PG/v16/.suo b/.vs/Win.Sfs.SmartSettlementSystem.PG/v16/.suo index e3209a30f23ac4d791eb31ca428c10d85fa7e0c6..d884462a7ec332495927ad3b04c6d291435bf003 100644 GIT binary patch delta 1228 zcmb`FUr1AN6vuz(?k?xuG_|R-baQhy|6RGxyQ$$n>aBt_C5jBT>C7ZFG)*XQYMENZ z+=)iy(*(7LLUy51Pg)WpJqSklSWs_07-Uor)w$xJAW*3D<8yxh&hLEBkKZq_!3Q?@ z`Qsee(8^g7=S|Pj#~tgCgMHi}9K%iWGWKZ{IDmzGUCvLkRK}Rvo2j=DxrCKSo@~s- zDPG5`n>fdNP^ZsEyVj^XLA#BFQm-|@wo-8A>EDzRW|J}~QcENdq^ffyI%xERk_rg? zzN~-IPrMD7BJj8>G{aG}>Zg@ueE@V>B(PQWP?FuzLlX~>BRj=r>i z_$m}(pK%b%ag)4L=}TYJ{QpX|Ta_x`vTkZsZ5**I?pTOb4;Zi%;GE5b0b7BorPJ?k zJumvYyDy7AZ?8W-pI)#*$i8IIZC@&WF|4oQm9O@(-DimuaG}Dexr^1ZBqp#U>=0{V z#lcUV9S;W1tljqvcb;V{%4(?ukrFPte+h7@xO%cV8?&YCboJ}}Zb;=A>9Z(!vLRP#lk)|8TWgie z+ukaRUa#a8<%)6|$^J62wX&?-@0WdUZ<|+nRNIsgtsdv>K3A2mqC%2Hr|hZ{B>;VD7LMnU-AJ&6gaYt9qVM>n;8>aa1=^Qv28!*Bcgnj9d77ivr zOROsm?g9p{3RwTp94pFzH-N(*Ix+W3ZfwE^{V-z!Va5gAJv*%9^J^36X-^Jc%7ftS Zf&;klI~iWaMi0VA%?^(fTP*@9=@*|rj~D;| delta 1316 zcmbVLZ)jUp6o2RCrF~t~*=1=P*De1RUDD=-m-lYoOZ<~1&7Ti-j&=?=wL;V61zUC1 zq>)KG7KezAfoskr3=58IUNG1#sED^uPGtZotdqLHxou(A){QIgqUTS8cxbiOd@zyDBDk z3v}K8;e)x&0N)Jr%@B{tVA(az&2oph2`MDFBv=FZ8g#NF>7Pa_nsj0`xnOtXi;8*M}oB8g{04tui--MBhjDN@}#Jds8mo? zRU+|{E={QgRWkIV9x+OKu|#D0Rq};S969ZxF4q*aCwCBl5q$t_2?tYWdo}kCT1(Ub zuct4@GrvRTDVcrqDJ7THNj4&l=tPwwk&G;*vXPV|%PBb>mvgyXT0OGx%=6QgLT>sE z14rBmyb?^*Lp!1i^C>N@6OxKaa+ahdl1pn+ET*wyjVLiyjuK5LN4odtE3faFuFQoC zl}`Y(?x+6&*v@b8GNHVo=y`2QmJF5Mn<2!cxK=DlQ6pbcdB|M3*APVnHHBnZ1fah!igr4JD>4a#W{ZCig@0cz<(5 zKxJW>F0YF`T{$<_)ok+UIk1oJTRHzK@(1iVIp0B@=YN8RYy*4aq!lJwhkD@@G{_*l z(>lBv7;DQf54DEu@IBynZ;CCkAJ)6@*pD;ldDqiA9)i7mYfXdzG`t@8p!Lm@@U!Ki M$lSU;3>~(=0V&_VsQ>@~ 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 d0053c72..5e891ea1 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 @@ -62,7 +62,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report //// condition += string.Format(" B.chassisNumber='{0}' ", materialGroup); ////} string str = "SELECT\n" + - " temp1.交货日期,\n" + + " Convert(varchar(10),temp1.交货日期,120) 交货日期,\n" + " isnull( temp1.手工或自动, '' ) 手工或自动,\n" + " isnull( temp1.交货单号, '' ) 交货单号,\n" + " temp1.收货仓库,\n" + @@ -79,6 +79,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " temp1.结算数量,\n" + " temp1.结算单价,\n" + " temp1.结算金额,\n" + + + " TEMP1.工厂,\n" + + " isnull( TEMP2.Price, 0 ) AS 发货定价,\n" + " isnull( temp1.发货数量, 0 ) * isnull( TEMP2.Price, 0 ) AS 发货总金额,\n" + " 0 AS 数量差异,\n" + @@ -103,7 +106,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report " isnull( a.Qty, 0 ) AS 结算数量,\n" + " isnull( a.Price, 0 ) AS 结算单价,\n" + " isnull( a.Amt, 0 ) AS 结算金额 ,\n" + - " C.EstimateTypeDesc AS 物料组 \n" + + " C.EstimateTypeDesc AS 物料组, \n" + + " A.Factory 工厂 \n"+ + " FROM\n" + " Set_HQ_H_Platform AS a\n" + " LEFT OUTER JOIN Set_HQ_H_Kanban AS b ON a.HQHKanBan = b.Kanban \n" + @@ -260,15 +265,19 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report { [ExporterHeader(DisplayName = "交货单号")] public string 交货单号 { set; get; } - [ExporterHeader(DisplayName = "交货时间")] - public string 交货时间 { set; get; } + [ExporterHeader(DisplayName = "交货日期")] + public string 交货日期 { set; get; } [ExporterHeader(DisplayName = "手工或自动")] public string 手工或自动 { set; get; } + + [ExporterHeader(DisplayName = "工厂")] + public string 工厂 { set; get; } + [ExporterHeader(DisplayName = "收货仓库")] public string 收货仓库 { set; get; } [ExporterHeader(DisplayName = "收货仓库描述")] public string 收货仓库描述 { set; get; } - [ExporterHeader(DisplayName = "订货看板编号")] + [ExporterHeader(DisplayName = "看板编号")] public string 订货看板编号 { set; get; } [ExporterHeader(DisplayName = "订货零件号")] public string 订货零件号 { set; get; } @@ -284,7 +293,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report public decimal 发货数量 { set; get; } [ExporterHeader(DisplayName = "发货状态")] public string 发货状态 { set; get; } - [ExporterHeader(DisplayName = "结算验收单号")] + [ExporterHeader(DisplayName = "验收单号")] public string 结算验收单号 { set; get; } [ExporterHeader(DisplayName = "结算数量")] public decimal 结算数量 { set; get; } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSettledDetailDiffExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSettledDetailDiffExportService.cs index fb67fc45..6666505c 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSettledDetailDiffExportService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSettledDetailDiffExportService.cs @@ -109,6 +109,7 @@ namespace SettleAccount.Job.Services.Report _ls = _ls.Where(p => _groupList.Contains(p.Sap编码)).ToList(); } } + _ls=_ls.OrderBy(p => p.交货单号).ToList(); _outputService.Export(id, _filename, _ls); return id.ToString(); } From 2d81afec7cc59b9cb1e9c44ea6a81562ab010360 Mon Sep 17 00:00:00 2001 From: Administrator Date: Tue, 22 Feb 2022 15:49:42 +0800 Subject: [PATCH 2/2] =?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 --- ...UnInvoiceSettledDetailDiffExportService.cs | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnInvoiceSettledDetailDiffExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnInvoiceSettledDetailDiffExportService.cs index 5d3dffd2..43335a1e 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnInvoiceSettledDetailDiffExportService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnInvoiceSettledDetailDiffExportService.cs @@ -184,6 +184,12 @@ namespace SettleAccount.Job.Services var list1= LSettleSum(id, exportName, p_list); var report1 = report2List.ToList(); + + foreach (var itm in list1) + { + itm.MaterialGroup = itm.MaterialGroup + "(漏结)"; + } + report1.AddRange(list1); ExcelExporter _exporter = new ExcelExporter();//导出Excel @@ -331,14 +337,14 @@ namespace SettleAccount.Job.Services { var _first = exportName.FirstOrDefault(); var version = p_list.Where(p => p.Name == "Version").FirstOrDefault().Value; - var customerCode = p_list.Where(p => p.Name == "CustomerCode").FirstOrDefault().Value; - var materailCode = p_list.Where(p => p.Name == "MaterialCode").FirstOrDefault().Value; - var materialGroup = p_list.Where(p => p.Name == "MaterialGroup").FirstOrDefault().Value; - var sapcode = p_list.Where(p => p.Name == "SapMaterialCode").FirstOrDefault().Value; - var begin = p_list.Where(p => p.Name == "Begin").FirstOrDefault().Value; - var end = p_list.Where(p => p.Name == "End").FirstOrDefault().Value; + var materialCode = p_list.Where(p => p.Name == "MaterialCode").FirstOrDefault().Value; + var begin = p_list.Where(p => p.Name == "BeginTime").FirstOrDefault().Value; + var end = p_list.Where(p => p.Name == "EndTime").FirstOrDefault().Value; + var cp7begin = p_list.Where(p => p.Name == "Cp7BeginTime").FirstOrDefault().Value; + var cp7end = p_list.Where(p => p.Name == "Cp7EndTime").FirstOrDefault().Value; var kenncode = p_list.Where(p => p.Name == "KennCode").FirstOrDefault().Value; var chassisNumber = p_list.Where(p => p.Name == "ChassisNumber").FirstOrDefault().Value; + var materialGroup = p_list.Where(p => p.Name == "MaterialGroup").FirstOrDefault().Value; var sapCode = p_list.Where(p => p.Name == "SapCode").FirstOrDefault().Value; @@ -350,7 +356,7 @@ namespace SettleAccount.Job.Services var _end = DateTime.Parse(_beginstr).AddMonths(1).AddDays(-1); end=_end.ToString("yyyy-MM-dd")+" 23:59:59"; - var _list = _dapperRepository2.GetDiffReport(DateTime.Now.Year.ToString(), begin, end, customerCode, version, materailCode, materialGroup, sapcode); + var _list = _dapperRepository2.GetDiffReport(DateTime.Now.Year.ToString(), begin, end, "", version,"", materialGroup, sapCode); var _ls = _list.Where(p => p.Flag == "L").Where(p => p.ParentSapMaterialCode != p.SapMaterialCode).GroupBy(p => new { p.KENNCode, p.ChassisNumber, p.ParentSapMaterialCode }).Select(p => p.FirstOrDefault()).ToList(); //var _lst = _erpDapper.GetSapList(_ls, version, false); //_lst.ForEach(p => @@ -394,14 +400,14 @@ namespace SettleAccount.Job.Services _list = _list.Where(p => _groupList.Contains(p.SapMaterialCode)).ToList(); } } - if (!string.IsNullOrEmpty(materailCode)) - { - var _groupList = materailCode.Split(new char[] { '\n' }).Distinct().ToList(); - if (_groupList.Count() > 0) - { - _list = _list.Where(p => _groupList.Contains(p.SapMaterialCode)).ToList(); - } - } + //if (!string.IsNullOrEmpty(materailCode)) + //{ + // var _groupList = materailCode.Split(new char[] { '\n' }).Distinct().ToList(); + // if (_groupList.Count() > 0) + // { + // _list = _list.Where(p => _groupList.Contains(p.SapMaterialCode)).ToList(); + // } + //} _list = _list.OrderBy(p => p.ChassisNumber).ThenBy(p => p.SapMaterialCode).ThenBy(p => p.Flag).ToList(); var report2List = _list.Select(p => new { p.MaterialGroup, DiffAmt = p.Price * p.Qty }).GroupBy(p => new { p.MaterialGroup }).Select(p => new SettleDoorPanelSumExport { MaterialGroup = p.Key.MaterialGroup, InvoiceDiffPrice = p.Sum(itm => itm.DiffAmt), Version = version });