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