Browse Source

Pub结算与发运对比

master
mahao 1 year ago
parent
commit
007a4cee3f
  1. 104
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs

104
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs

@ -241,112 +241,10 @@ namespace SettleAccount.Job.Services.Report
_fileContainer.SaveAsync(filename, result.Result, true);
return id.ToString();
//var add = from item1 in pubSaSeCompareDiffs
// join item2 in pubSaSeCompareDiffs
// on new { item1.SaLU, item1.SaPN }
// equals new { item2.SeLU, item2.SePN }
// into temp
// from itm3 in temp.DefaultIfEmpty()
// where itm3 == null
// select item1;
//var add = from item1 in haveSaNotHaveSe
// join item2 in notHaveSaHaveSe
// on new { item1.SaLU, item1.SaPN }
// equals new { item2.SeLU, item2.SePN }
// into temp
// from itm3 in temp.DefaultIfEmpty()
// where itm3 == null
// select item1;
//var query = BlobProviderSelectorExtensions
//结算
//var _lsSum = _ls.GroupBy(p => new { p.MaterialCode, p.SapMaterialCode, p.MaterialGroup, p.InvoicePrice }).Select(p => new UnInvoiceSettledDetailSum
//{
// MaterialCode = p.Key.MaterialCode,
// SapMaterailCode = p.Key.SapMaterialCode,
// MaterialGroup = p.Key.MaterialGroup,
// SettleQty = p.Sum(itm => itm.SettledQty),
// FisQty = 0,
// DiffQty = -p.Sum(itm => itm.SettledQty),
// Price = p.Key.InvoicePrice,
// DiffAmt = p.Sum(itm => itm.SettledQty) * p.Key.InvoicePrice
//}).ToList();
//var _sumTotal = new UnInvoiceSettledDetailSum()
//{
// SettleQty = _lsSum.Sum(p => p.SettleQty),
// DiffQty = _lsSum.Sum(p => p.DiffQty),
// Price = _lsSum.Sum(p => p.Price),
// DiffAmt = _lsSum.Sum(p => p.DiffAmt)
//};
//_lsSum.Add(_sumTotal);
//var _ls1 = DiffPrice(id, exportName, p_list);
//var report1List = _ls1.Where(p => p.DiffPrice != 0).GroupBy(p => new { p.MaterialGroup, p.MaterialCode, p.MaterialDesc, p.Price, p.InvoicePrice, p.DiffPrice, p.SapMaterialCode })
// .Select(t => new SettleDoorPanelExport { MaterialGroup = t.FirstOrDefault().MaterialGroup, MaterialCode = t.FirstOrDefault().MaterialCode, MaterialDesc = t.FirstOrDefault().MaterialDesc, Price = t.FirstOrDefault().Price, InvoicePrice = t.FirstOrDefault().InvoicePrice, InvoiceDiffPrice = t.FirstOrDefault().DiffPrice, SAPCode = t.FirstOrDefault().SapMaterialCode }).ToList();
//var report2List = _ls1.Where(p => p.DiffPrice != 0).Select(p => new { p.MaterialGroup, DiffAmt = p.DiffPrice * p.Qty }).GroupBy(p => new { p.MaterialGroup }).Select(p => new SettleDoorPanelSumExport { MaterialGroup = p.Key.MaterialGroup, InvoiceDiffPrice = p.Sum(itm => itm.DiffAmt), Version = version });
//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
//var result = _exporter
//.Append(_ls, "差异明细表")
//.SeparateBySheet()
//.Append(_lsSum, "数量差异汇总表")
//.SeparateBySheet()
//.Append(report1List, "按物料价格差异明细表")
//.SeparateBySheet()
//.Append(report1, "差异汇总验证表")
//.ExportAppendDataAsByteArray();
//result.ShouldNotBeNull();
//_fileContainer.SaveAsync(_filename, result.Result, true);
////_outputService.Export<InvoiceSettledDetailDiff>(id, string.Format("大众结算未发运核对明细表_{0}.xlsx", Guid.NewGuid().ToString()), _ls);
//return id.ToString();
return this.GetType().FullName;
}
/// <summary>
/// 导出
/// 导出(废弃)
/// </summary>
public string ExportFile333(Guid id, List<string> exportName, List<CustomCondition> property)
{

Loading…
Cancel
Save