Browse Source

更新版本

branch_ccpg_220107
Administrator 3 years ago
parent
commit
668f2abe46
  1. 2
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs
  2. 23
      src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
  3. 2
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SharePartUnSettledDapperRepository.cs
  4. 22
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SharePartUnSettledExport.cs
  5. 5
      src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

2
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs

@ -179,8 +179,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
/// <returns></returns>
[HttpPost]
[Route("WmsSharePartOutPut")]
public async Task<string> WmsSharePartOutPut(WmsJitRequestDto input)
{
var _billNum = "B" + DateTime.Now.ToString("yyyyMMddhhmmss");

23
src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs

@ -215,6 +215,29 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
#endregion
[HttpGet]
[Route("SettleSparePartExport")]
[DisableRequestSizeLimit]
public async Task<string> SharePartUnSettled( string sapCode, string version,
DateTime begin, DateTime end)
{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "SAPCode", Value = sapCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = begin.ToString() });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end.ToString() });
var _taskid = await _service.ExportEnqueueAsync("备件未结对比", ExportExtentsion.Excel, version, string.Empty, CurrentUser, typeof(SharePartUnSettledExport), customConditionList, (rs) =>
{
});
return _taskid;
}

2
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SharePartUnSettledDapperRepository.cs

@ -106,7 +106,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
}
public virtual List<SharePartUnSettled> GetKanbanReportList( string version, string begintime, string endtime)
public virtual List<SharePartUnSettled> GetOrderSharePartReportList( string version, string begintime, string endtime)
{
var sql = "SELECT\n" +

22
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SharePartUnSettledExport.cs

@ -18,10 +18,10 @@ namespace SettleAccount.Job.Services.Report
{
private readonly OutputService _outputService;
KanbanUnSettledDapperRepository _dapper;
SharePartUnSettledDapperRepository _dapper;
private readonly IBlobContainer<MyFileContainer> _fileContainer;
public SharePartUnSettledExport(KanbanUnSettledDapperRepository dapper, OutputService outputService,
public SharePartUnSettledExport(SharePartUnSettledDapperRepository dapper, OutputService outputService,
IBlobContainer<MyFileContainer> fileContainer
)
@ -46,14 +46,14 @@ namespace SettleAccount.Job.Services.Report
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;
var _ls = _dapper.GetKanbanReportList(version, begin,end);
var _lst = _dapper.GetNoKanbanReportList(version, begin, end);
var _ls = _dapper.GetOrderSharePartReportList(version, begin,end);
var _lst = _dapper.GetNoOrderSharePartReportList(version, begin, end);
if (!string.IsNullOrEmpty(materialGroup))
{
var _groupList = materialGroup.Split(new char[] { ',' }).Distinct().ToList();
if (_groupList.Count() > 0)
{
_ls = _ls.Where(p => _groupList.Contains(p.MaterialGroup)).ToList();
_ls = _ls.Where(p => _groupList.Contains(p.MaterilGroup)).ToList();
}
}
if (!string.IsNullOrEmpty(materialCode))
@ -61,7 +61,7 @@ namespace SettleAccount.Job.Services.Report
var _groupList = materialCode.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0)
{
_ls = _ls.Where(p => _groupList.Contains(p.CustomerPartCode)).ToList();
_ls = _ls.Where(p => _groupList.Contains(p.MaterialCode)).ToList();
}
}
if (!string.IsNullOrEmpty(sapCode))
@ -69,7 +69,7 @@ namespace SettleAccount.Job.Services.Report
var _groupList = sapCode.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0)
{
_ls = _ls.Where(p => _groupList.Contains(p.SapCode)).ToList();
_ls = _ls.Where(p => _groupList.Contains(p.SAPCode)).ToList();
}
}
if (!string.IsNullOrEmpty(materialGroup))
@ -77,7 +77,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();
_lst = _lst.Where(p => _groupList.Contains(p.MaterilGroup)).ToList();
}
}
if (!string.IsNullOrEmpty(materialCode))
@ -93,13 +93,13 @@ 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();
_lst = _lst.Where(p => _groupList.Contains(p.SAPCode)).ToList();
}
}
ExcelExporter _exporter = new ExcelExporter();//导出Excel
var result = _exporter.Append(_ls.ToList(), "有看板号未结差异对比")
var result = _exporter.Append(_ls.ToList(), "备件未结差异对比")
.SeparateBySheet()
.Append(_lst.ToList(), "无看板号未结差异对比")
.Append(_lst.ToList(), "备件未结差异对比(无订单号)")
.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();
_fileContainer.SaveAsync(_filename, result.Result, true);

5
src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

@ -144,6 +144,11 @@ namespace Win.Sfs.SettleAccount
{
return implementationFactory.GetService<SettleKBWithOutCodeExportService>();
}
if (key.Equals(typeof(SharePartUnSettledExport).FullName))
{
return implementationFactory.GetService<SharePartUnSettledExport>();
}

Loading…
Cancel
Save