|
|
@ -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" + |
|
|
|