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. 22
      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> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("WmsSharePartOutPut")] [Route("WmsSharePartOutPut")]
public async Task<string> WmsSharePartOutPut(WmsJitRequestDto input) public async Task<string> WmsSharePartOutPut(WmsJitRequestDto input)
{ {
var _billNum = "B" + DateTime.Now.ToString("yyyyMMddhhmmss"); 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 #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;
}

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

@ -18,26 +18,26 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public class SharePartUnSettled public class SharePartUnSettled
{ {
[ExporterHeader(DisplayName = "交货单号")] [ExporterHeader(DisplayName = "交货单号")]
public string WMSDeliveryNote {set;get;} public string WMSDeliveryNote { set; get; }
[ExporterHeader(DisplayName = "发货日期")] [ExporterHeader(DisplayName = "发货日期")]
public string OrderDate {set;get;} public string OrderDate { set; get; }
[ExporterHeader(DisplayName = "订单编号")] [ExporterHeader(DisplayName = "订单编号")]
public string PurchaseOrderNo {set;get;} public string PurchaseOrderNo { set; get; }
[ExporterHeader(DisplayName = "物料编码")] [ExporterHeader(DisplayName = "物料编码")]
public string SAPCode {set;get;} public string SAPCode { set; get; }
[ExporterHeader(DisplayName = "客户物料号")] [ExporterHeader(DisplayName = "客户物料号")]
public string MaterialCode {set;get;} public string MaterialCode { set; get; }
[ExporterHeader(DisplayName = "物料描述")] [ExporterHeader(DisplayName = "物料描述")]
public string MaterialDesc {set;get;} public string MaterialDesc { set; get; }
[ExporterHeader(DisplayName = "物料组(车型)")] [ExporterHeader(DisplayName = "物料组(车型)")]
public string MaterilGroup {set;get;} public string MaterilGroup { set; get; }
[ExporterHeader(DisplayName = "发货数量")] [ExporterHeader(DisplayName = "发货数量")]
//public string PurchaseOrderNoText {set;get;} //public string PurchaseOrderNoText {set;get;}
public decimal Qty {set;get;} public decimal Qty { set; get; }
[ExporterHeader(DisplayName = "收货数量")] [ExporterHeader(DisplayName = "收货数量")]
public decimal ReceiptQty {set;get;} public decimal ReceiptQty { set; get; }
[ExporterHeader(DisplayName = "数量差异")] [ExporterHeader(DisplayName = "数量差异")]
public decimal DiffQty {set;get;} public decimal DiffQty { set; get; }
[ExporterHeader(DisplayName = "单价")] [ExporterHeader(DisplayName = "单价")]
public decimal Price { set; get; } public decimal Price { set; get; }
[ExporterHeader(DisplayName = "差异金额")] [ExporterHeader(DisplayName = "差异金额")]
@ -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" + 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; private readonly OutputService _outputService;
KanbanUnSettledDapperRepository _dapper; SharePartUnSettledDapperRepository _dapper;
private readonly IBlobContainer<MyFileContainer> _fileContainer; private readonly IBlobContainer<MyFileContainer> _fileContainer;
public SharePartUnSettledExport(KanbanUnSettledDapperRepository dapper, OutputService outputService, public SharePartUnSettledExport(SharePartUnSettledDapperRepository dapper, OutputService outputService,
IBlobContainer<MyFileContainer> fileContainer IBlobContainer<MyFileContainer> fileContainer
) )
@ -46,14 +46,14 @@ namespace SettleAccount.Job.Services.Report
var chassisNumber = p_list.Where(p => p.Name == "ChassisNumber").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 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.GetOrderSharePartReportList(version, begin,end);
var _lst = _dapper.GetNoKanbanReportList(version, begin, end); var _lst = _dapper.GetNoOrderSharePartReportList(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();
if (_groupList.Count() > 0) 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)) if (!string.IsNullOrEmpty(materialCode))
@ -61,7 +61,7 @@ namespace SettleAccount.Job.Services.Report
var _groupList = materialCode.Split(new char[] { '\n' }).Distinct().ToList(); var _groupList = materialCode.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0) 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)) if (!string.IsNullOrEmpty(sapCode))
@ -69,7 +69,7 @@ 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)
{ {
_ls = _ls.Where(p => _groupList.Contains(p.SapCode)).ToList(); _ls = _ls.Where(p => _groupList.Contains(p.SAPCode)).ToList();
} }
} }
if (!string.IsNullOrEmpty(materialGroup)) if (!string.IsNullOrEmpty(materialGroup))
@ -77,7 +77,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(); _lst = _lst.Where(p => _groupList.Contains(p.MaterilGroup)).ToList();
} }
} }
if (!string.IsNullOrEmpty(materialCode)) if (!string.IsNullOrEmpty(materialCode))
@ -93,13 +93,13 @@ 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(); _lst = _lst.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() .SeparateBySheet()
.Append(_lst.ToList(), "无看板号未结差异对比") .Append(_lst.ToList(), "备件未结差异对比(无订单号)")
.ExportAppendDataAsByteArray(); .ExportAppendDataAsByteArray();
result.ShouldNotBeNull(); result.ShouldNotBeNull();
_fileContainer.SaveAsync(_filename, result.Result, true); _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>(); return implementationFactory.GetService<SettleKBWithOutCodeExportService>();
} }
if (key.Equals(typeof(SharePartUnSettledExport).FullName))
{
return implementationFactory.GetService<SharePartUnSettledExport>();
}

Loading…
Cancel
Save