Browse Source

更新版本

FoShanPG
Administrator 3 years ago
parent
commit
dc696d2e09
  1. 4
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs
  2. 9
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/KanBanUnSettledExport.cs

4
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/KanbanUnSettledDapperRepository.cs

@ -152,9 +152,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" C.CustomerPartCode,\n" +
" C.EstimateTypeDesc MaterialGroup,\n" +
" ISNULL( B.Qty, 0 ) SettleQty,\n" +
" a.Qty,\n" +
" a.WMSDeliveryQty,\n" +
" (\n" +
" a.Qty - ISNULL( b.Qty, 0 )) AS DiffQty \n" +
" a.WMSDeliveryQty - ISNULL( b.Qty, 0 )) AS DiffQty \n" +
" FROM\n" +
" Set_WMSKanBanSettle A\n" +
" LEFT JOIN ( SELECT * FROM Set_KanBanSettle WHERE version = '{0}' ) B ON A.Kanban = B.Kanban \n" +

9
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/KanBanUnSettledExport.cs

@ -42,7 +42,7 @@ namespace SettleAccount.Job.Services.Report
var materialGroup = p_list.Where(p => p.Name == "MaterialGroup").FirstOrDefault().Value;
var sapCode = p_list.Where(p => p.Name == "SapCode").FirstOrDefault().Value;
var _ls = _dapper.GetKanbanReportList(version, begin,end);
var _lst = _dapper.GetNoKanbanReportList(version, begin, end);
// var _lst = _dapper.GetNoKanbanReportList(version, begin, end);
if (!string.IsNullOrEmpty(materialGroup))
{
var _groupList = materialGroup.Split(new char[] { ',' }).Distinct().ToList();
@ -72,7 +72,7 @@ namespace SettleAccount.Job.Services.Report
var _groupList = materialGroup.Split(new char[] { ',' }).Distinct().ToList();
if (_groupList.Count() > 0)
{
_lst = _lst.Where(p => _groupList.Contains(p.MaterialGroup)).ToList();
_ls = _ls.Where(p => _groupList.Contains(p.MaterialGroup)).ToList();
}
}
//if (!string.IsNullOrEmpty(materialCode))
@ -88,13 +88,12 @@ namespace SettleAccount.Job.Services.Report
var _groupList = sapCode.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0)
{
_lst = _lst.Where(p => _groupList.Contains(p.SapCode)).ToList();
_ls = _ls.Where(p => _groupList.Contains(p.SapCode)).ToList();
}
}
ExcelExporter _exporter = new ExcelExporter();//导出Excel
var result = _exporter.Append(_ls.ToList(), "有看板号未结差异对比")
.SeparateBySheet()
.Append(_lst.ToList(), "无看板号未结差异对比")
.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();
_fileContainer.SaveAsync(_filename, result.Result, true);

Loading…
Cancel
Save