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