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. 29
      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. 7
      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");

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

@ -214,7 +214,30 @@ 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;
}
@ -234,7 +257,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
//[HttpGet]
//[Route("UnSettledDiff-Make")]
//[DisableRequestSizeLimit]
//public async Task<string> UnSettledMake(string year, string period, string version, string customerCode, string factory, string matialCode, string state,DateTime begin,DateTime end)
//{
@ -272,7 +295,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
//[HttpGet]
//[Route("FisUnSettledDiff-Make")]
//[DisableRequestSizeLimit]
//public async Task<string> FisUnSettledMake(string year, string version, string customerCode, string factory, string state)
//{
@ -302,7 +325,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
//[HttpGet]
//[Route("PriceQtyDiff-Make")]
//[DisableRequestSizeLimit]
//public async Task<string> PriceQtyDiffMake(string year, string version, string customerCode, string factory, string state)
//{
// //if (!_invoiceVersionRepository.Any(p => p.Version == version))

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
{
[ExporterHeader(DisplayName = "交货单号")]
public string WMSDeliveryNote {set;get;}
public string WMSDeliveryNote { set; get; }
[ExporterHeader(DisplayName = "发货日期")]
public string OrderDate {set;get;}
public string OrderDate { set; get; }
[ExporterHeader(DisplayName = "订单编号")]
public string PurchaseOrderNo {set;get;}
public string PurchaseOrderNo { set; get; }
[ExporterHeader(DisplayName = "物料编码")]
public string SAPCode {set;get;}
public string SAPCode { set; get; }
[ExporterHeader(DisplayName = "客户物料号")]
public string MaterialCode {set;get;}
public string MaterialCode { set; get; }
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDesc {set;get;}
public string MaterialDesc { set; get; }
[ExporterHeader(DisplayName = "物料组(车型)")]
public string MaterilGroup {set;get;}
public string MaterilGroup { set; get; }
[ExporterHeader(DisplayName = "发货数量")]
//public string PurchaseOrderNoText {set;get;}
public decimal Qty {set;get;}
public decimal Qty { set; get; }
[ExporterHeader(DisplayName = "收货数量")]
public decimal ReceiptQty {set;get;}
public decimal ReceiptQty { set; get; }
[ExporterHeader(DisplayName = "数量差异")]
public decimal DiffQty {set;get;}
public decimal DiffQty { set; get; }
[ExporterHeader(DisplayName = "单价")]
public decimal Price { set; get; }
[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" +

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);

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

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

Loading…
Cancel
Save