Browse Source

更新版本

branch_ccpg_220107
Administrator 3 years ago
parent
commit
e9ddad4ff2
  1. 32
      src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
  2. 7
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml
  3. 26
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleFisDiffDetailDapperRepository.cs
  4. 31
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleFisDiffExportService.cs
  5. BIN
      src/Shared/Win.Abp.Snowflakes/obj/Debug/netcoreapp5/Win.Abp.Snowflakes.csproj.AssemblyReference.cache
  6. BIN
      src/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.csproj.AssemblyReference.cache
  7. BIN
      src/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.csproj.AssemblyReference.cache

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

@ -231,6 +231,38 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
return _taskid;
}
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpGet]
[Route("SettleFisDiffExport-Make")]
[DisableRequestSizeLimit]
public async Task<string> SettleFisDiffExportMake( string version, string materialCode, string begin, string end)
{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = materialCode});
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end });
var _taskid = await _service.ExportEnqueueAsync("大众准时化结算数量差异比对表", ExportExtentsion.Excel, CurrentUser, typeof(SettleFisDiffExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
/// <summary>
/// 结算总成和ERP总成价格对比
/// </summary>

7
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml

@ -2294,6 +2294,13 @@
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.SettleFisDiffExportMake(System.String,System.String,System.String,System.String)">
<summary>
导入功能
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.SettledPartAndErpPartPriceDiffMake(System.String,System.String)">
<summary>
结算总成和ERP总成价格对比

26
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleFisDiffDetailDapperRepository.cs

@ -1,5 +1,6 @@
using Dapper;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System;
using System.Collections.Generic;
using System.Data.Common;
@ -12,6 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
[ExcelExporter(Name = "未结明细", AutoFitAllColumn = true, MaxRowNumberOnASheet = 500000)]
public class SettleFisDiffDetail
{
[ExporterHeader(DisplayName = "年")]
@ -29,17 +31,17 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "零件号" )]
public string MaterialCode { set; get; }
[ExporterHeader(DisplayName = "结算数量" )]
public string SettleQty { set; get; }
public decimal SettleQty { set; get; }
[ExporterHeader(DisplayName = "M100状态" )]
public string WMSBillNum { set; get; }
[ExporterHeader(DisplayName = "M100数量" )]
public string Qty { set; get; }
public decimal Qty { set; get; }
[ExporterHeader(DisplayName = "差异")]
public string DiffQty { set; get; }
public decimal DiffQty { set; get; }
[ExporterHeader(DisplayName = "开票单价" )]
public string Price{ set; get; }
public decimal Price{ set; get; }
[ExporterHeader(DisplayName = "差异金额")]
public string DiffPrice{ set; get; }
public decimal DiffPrice{ set; get; }
[ExporterHeader(DisplayName = "SAP编码")]
public string SapCode { set; get; }
@ -53,22 +55,22 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "物料组车型")]
public string MaterialCodeGroup { set; get; }
[ExporterHeader(DisplayName = "SAP编码")]
public string KENNCode { set; get; }
public string SapCode { set; get; }
[ExporterHeader(DisplayName = "零件号")]
public string MaterialCode { set; get; }
[ExporterHeader(DisplayName = "结算数量")]
public string SettleQty { set; get; }
public decimal SettleQty { set; get; }
[ExporterHeader(DisplayName = "M100状态")]
public string WMSBillNum { set; get; }
[ExporterHeader(DisplayName = "M100数量")]
public string Qty { set; get; }
public decimal Qty { set; get; }
[ExporterHeader(DisplayName = "差异数量")]
public string DiffQty { set; get; }
public decimal DiffQty { set; get; }
[ExporterHeader(DisplayName = "开票单价")]
public string Price { set; get; }
public decimal Price { set; get; }
[ExporterHeader(DisplayName = "差异金额")]
public string DiffPrice { set; get; }
public decimal DiffPrice { set; get; }
}
public class SettleFisDiffDetailDapperRepository : DapperRepository<SettleAccountDbContext>, ITransientDependency
@ -101,7 +103,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" Price,\n" +
" a.SettleQty - isnull( b.Qty, 0 ) DiffQty,(\n" +
" a.SettleQty - isnull( b.Qty, 0 ))* Price DiffPrice,\n" +
" d.CustomerPartCode SapCode \n" +
" d.MaterialCode SapCode \n" +
"FROM\n" +
" ( SELECT YEAR, KENNCode, ChassisNumber, Model, CP5A, CP7, MaterialCode, Qty SettleQty FROM Set_Settle WHERE version = '{0}' ) a\n" +
" LEFT JOIN (\n" +

31
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleFisDiffExportService.cs

@ -27,14 +27,35 @@ namespace SettleAccount.Job.Services.Report
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> p_list)
{
//var year = p_list.Where(p => p.Name == "Year").FirstOrDefault().Value;
//var state = p_list.Where(p => p.Name == "State").FirstOrDefault().Value;
var version = p_list.Where(p => p.Name == "Version").FirstOrDefault().Value;
var customerCode = p_list.Where(p => p.Name == "CustomerCode").FirstOrDefault().Value;
var materialCode = p_list.Where(p => p.Name == "MaterialCode").FirstOrDefault().Value;
var begin = p_list.Where(p => p.Name == "BeginTime").FirstOrDefault().Value;
var end = p_list.Where(p => p.Name == "EndTime").FirstOrDefault().Value;
var _list= _dapper.GetReportList(version,string.Empty,begin,end);
_outputService.Export<SettleFisDiffDetail>(id,string.Format("3.大众准时化结算数量差异比对表_{0}.xlsx", Guid.NewGuid().ToString()), _list);
var _list= _dapper.GetReportList(version, materialCode, begin,end);
_list.GroupBy(p => new { p.MaterialCode,p.SapCode }).Select(p =>new SettleFisDiffSum
{
MaterialCode= p.Key.MaterialCode,
SapCode= p.Key.SapCode,
DiffPrice=p.Sum(p=>p.DiffPrice),
DiffQty=p.Sum(p=>p.DiffQty),
Qty=p.Sum(p=>p.Qty),
SettleQty=p.Sum(p=>p.SettleQty),
Price=p.Sum(p=>p.Price)
});
_outputService.Export<SettleFisDiffDetail>(id,string.Format("大众准时化结算数量差异比对表_{0}.xlsx", Guid.NewGuid().ToString()), _list);
return id.ToString();
}

BIN
src/Shared/Win.Abp.Snowflakes/obj/Debug/netcoreapp5/Win.Abp.Snowflakes.csproj.AssemblyReference.cache

Binary file not shown.

BIN
src/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.csproj.AssemblyReference.cache

Binary file not shown.

BIN
src/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.csproj.AssemblyReference.cache

Binary file not shown.
Loading…
Cancel
Save