Browse Source

红旗未结按照财务要求重新调整字段等

FoShanPG
44673626 3 years ago
parent
commit
9905367891
  1. 67
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs
  2. 303
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs
  3. 16
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHUnSettledDetailDiffExportService.cs
  4. 10
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleUnSparePartExportService.cs

67
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs

@ -556,7 +556,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
/// <summary>
/// 红旗未结比对(包含有发货有结算中发货大于结算的数据)
/// 红旗未结明细数据输出(包含有发货有结算中发货大于结算的数据)
/// </summary>
/// <param name="version"></param>
/// <param name="materialCode"></param>
@ -565,10 +565,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
/// <param name="materialGroup"></param>
/// <param name="iscontionversion"></param>
/// <returns></returns>
public virtual List<HQHUnSettledDetailDiff> GetReverseSettledDetailDiffReportList(string version, string materialCode, string begin, string end, string materialGroup, string iscontionversion)
public virtual List<HQUnSettledDetailDiff> GetReverseSettledDetailDiffReportList(string version, string materialCode, string begin, string end, string materialGroup, string iscontionversion)
{
List<HQHUnSettledDetailDiff> _list = new List<HQHUnSettledDetailDiff>();
List<HQUnSettledDetailDiff> _list = new List<HQUnSettledDetailDiff>();
string condition = "";
@ -612,9 +612,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" isnull( TEMP2.Price, 0 ) AS 发货定价,\n" +
" isnull( temp1.发货数量, 0 ) * isnull( TEMP2.Price, 0 ) AS 发货总金额,\n" +
" isnull( tt.Qty, 0 ) 退货数量,\n" +
" isnull( temp1.发货数量, 0 ) - isnull( tt.Qty, 0 ) AS 数量差异,\n" +
" isnull( temp1.发货数量, 0 ) - isnull( tt.Qty, 0 ) AS 实际发货数量,\n" +
" temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) AS 单价差异,\n" +
" ( temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) ) * ( isnull( temp1.发货数量, 0 ) - isnull( tt.Qty, 0 ) ) AS 差异总金额 \n" +
" ISNULL( TEMP2.Price, 0 ) * ( isnull( temp1.发货数量, 0 ) - isnull( tt.Qty, 0 ) ) AS 实际发货总金额 \n" +
" FROM\n" +
" (\n" +
" SELECT\n" +
@ -663,9 +663,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" isnull( TEMP2.Price, 0 ) AS 发货定价,\n" +
" isnull( temp1.发货数量, 0 ) * isnull( TEMP2.Price, 0 ) AS 发货总金额,\n" +
" isnull( tt.Qty, 0 ) 退货数量,\n" +
" isnull( temp1.发货数量, 0 ) - isnull( temp1.结算数量, 0 )- isnull( tt.Qty, 0 ) AS 数量差异,\n" +
" isnull( temp1.发货数量, 0 ) - isnull( temp1.结算数量, 0 )- isnull( tt.Qty, 0 ) AS 实际发货数量,\n" +
" temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) AS 单价差异,\n" +
" ( temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) ) * ( isnull( temp1.发货数量, 0 ) - isnull( temp1.结算数量, 0 ) - isnull( tt.Qty, 0 ) ) AS 差异总金额 \n" +
" ISNULL( TEMP2.Price, 0 ) * ( isnull( temp1.发货数量, 0 ) - isnull( temp1.结算数量, 0 ) - isnull( tt.Qty, 0 ) ) AS 实际发货总金额 \n" +
" FROM\n" +
" (\n" +
" SELECT\n" +
@ -912,7 +912,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
_ls.Add(itm);
}
var _query = DbConnection.Query<HQHUnSettledDetailDiff>(_sql, null, null, true, 1200, null);
var _query = DbConnection.Query<HQUnSettledDetailDiff>(_sql, null, null, true, 1200, null);
_list = _query.ToList();
//数据整合,相同看板号+物料号的交货单号合并成一行中以逗号分隔
@ -930,7 +930,6 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
itm1. = itmcopy.KanbanNumber;
itm1. = itmcopy.AcceptanceDate;
itm1. = itmcopy.ExternalKanbanNumber;
}
}
@ -1569,6 +1568,56 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public string { set; get; }
}
/// <summary>
/// 红旗未结明细输出字段
/// </summary>
public class HQUnSettledDetailDiff
{
[ExporterHeader(DisplayName = "交货单号")]
public string { set; get; }
[ExporterHeader(DisplayName = "交货时间")]
public string { set; get; }
[ExporterHeader(DisplayName = "订货看板编号")]
public string { set; get; }
[ExporterHeader(DisplayName = "订货零件号", IsIgnore = true)]
public string { set; get; }
[ExporterHeader(DisplayName = "发货零件号", IsIgnore = true)]
public string { set; get; }
[ExporterHeader(DisplayName = "Sap编码")]
public string Sap编码 { set; get; }
[ExporterHeader(DisplayName = "客户物料号")]
public string { set; get; }
[ExporterHeader(DisplayName = "零件中文名称")]
public string { set; get; }
[ExporterHeader(DisplayName = "物料组(车型)")]
public string { set; get; }
[ExporterHeader(DisplayName = "验收单日期",IsIgnore =true)]
public string { set; get; }
[ExporterHeader(DisplayName = "发货数量")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "退货数量")]
public decimal 退 { set; get; }
[ExporterHeader(DisplayName = "实际发货数量")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "发货定价")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "实际发货总金额")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "看板编号",IsIgnore =true)]
public string { set; get; }
}
public class HQHSettleQtyDiff

303
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs

@ -30,131 +30,130 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
/// <param name="begintime"></param>
/// <param name="endtime"></param>
/// <returns></returns>
public virtual List<SettleSparePartExport> GetSettleSparePartReportList(string purchaseOrderNo, string version, string sapCode, string matialCode,
public virtual List<SettleSparePartDetailExport> GetSettleSparePartReportList(string purchaseOrderNo, string version, string sapCode, string matialCode,
string begintime, string endtime)
{
string sqlString = "SELECT\n" +
" union1.* \n" +
"FROM\n" +
" (\n" +
" SELECT\n" +
" temp1.交货日期,\n" +
" temp1.交货单号,\n" +
" NULL 订单日期,\n" +
" temp1.采购订单号,\n" +
" temp1.SAP编码,\n" +
" temp1.物料代码,\n" +
" temp1.物料描述,\n" +
" temp1.采购订单文本,\n" +
" temp1.收货数量,\n" +
" temp1.开票数量,\n" +
" ISNULL( temp1.收货数量, 0 ) - ISNULL( temp1.开票数量, 0 ) AS 收货与开票差异,\n" +
" ISNULL( TEMP4.PurchasePriceNoTax, 0 ) AS 开票单价,\n" +
" ISNULL( temp1.开票数量, 0 ) * ISNULL( TEMP4.PurchasePriceNoTax, 0 ) AS 开票金额,\n" +
" ISNULL( TEMP2.Price, 0 ) AS 定价,\n" +
" ISNULL( TEMP4.PurchasePriceNoTax, 0 ) - ISNULL( TEMP2.Price, 0 ) AS 单价差异 ,\n" +
" ( ISNULL( TEMP4.PurchasePriceNoTax, 0 ) - ISNULL( TEMP2.Price, 0 ) ) * temp1.开票数量 AS 差异总金额,\n" +
" temp1.交货数量,\n" +
" temp1.收货与交货差异,\n" +
" ISNULL( temp1.交货数量, 0 ) - ISNULL( temp3.Qty, 0 ) 实际交货数量,\n" +
" ISNULL( temp3.Qty, 0 ) 退货数量 \n" +
" FROM\n" +
" (\n" +
" SELECT\n" +
" a.PurchaseOrderNoText AS 采购订单文本,\n" +
" '' AS 交货单号,\n" +
" NULL AS 交货日期,\n" +
" a.PurchaseOrderNo AS 采购订单号,\n" +
" b.MaterialCode AS SAP编码,\n" +
" b.CustomerPartCode AS 物料代码,\n" +
" b.MaterialDesc AS 物料描述,\n" +
" b.EstimateTypeDesc AS 物料组,\n" +
" ISNULL( a.ReceiptQty, 0 ) AS 收货数量,\n" +
" ISNULL( a.InvoicedQty, 0 ) AS 开票数量 ,\n" +
" ISNULL( C.WMSDeliveryQty, 0 ) AS 交货数量,\n" +
" ( ISNULL( a.ReceiptQty, 0 ) - ISNULL( C.WMSDeliveryQty, 0 ) ) AS 收货与交货差异 \n" +
" FROM\n" +
" (\n" +
" SELECT SUM\n" +
" ( ReceiptQty ) ReceiptQty,\n" +
" SUM ( InvoicedQty ) InvoicedQty,\n" +
" PurchaseOrderNo,\n" +
" MaterialCode,\n" +
" PurchaseOrderNoText \n" +
" FROM\n" +
" Set_SparePart \n" +
" WHERE\n" +
" Extend != 'is90' \n" +
" AND PurchaseOrderNo != 'NoOrder' \n" +
" AND Version = '{0}' \n" +
" GROUP BY\n" +
" PurchaseOrderNo,\n" +
" MaterialCode,\n" +
" PurchaseOrderNoText \n" +
" ) AS a\n" +
" LEFT OUTER JOIN Set_material AS b ON a.MaterialCode = b.CustomerPartCode\n" +
" LEFT JOIN (\n" +
"   SELECT\n" +
" ( ISNULL( temp1.Qty, 0 ) - ISNULL( temp2.Qty, 0 ) ) WMSDeliveryQty,\n" +
" temp1.MaterialCode,\n" +
" temp1.PurchaseOrderNo \n" +
" FROM\n" +
" (\n" +
" ( SELECT SUM ( ReceiptQty ) Qty, PurchaseOrderNo, MaterialCode FROM Set_WMSSparePart GROUP BY PurchaseOrderNo, MaterialCode ) temp1\n" +
" LEFT JOIN (\n" +
" SELECT SUM\n" +
" ( ReceiptQty ) Qty,\n" +
" PurchaseOrderNo,\n" +
" MaterialCode \n" +
" FROM\n" +
" Set_SparePart \n" +
" WHERE\n" +
" VERSION < '{0}' \n" +
" AND Extend != 'is90' \n" +
" AND PurchaseOrderNo != 'NoOrder' \n" +
" GROUP BY\n" +
" PurchaseOrderNo,\n" +
" MaterialCode \n" +
" ) temp2 ON temp1.PurchaseOrderNo = temp2.PurchaseOrderNo \n" +
" AND temp1.MaterialCode = temp2.MaterialCode \n" +
" ) \n" +
" ) C ON A.PurchaseOrderNo = C.PurchaseOrderNo \n" +
" AND A.MaterialCode = C.MaterialCode \n" +
" ) AS temp1\n" +
" LEFT JOIN ( SELECT * FROM set_backQty WHERE Version = '{0}' ) temp3 ON temp1.采购订单号 = temp3.Code \n" +
" AND temp1.SAP编码= temp3.MaterialCode\n" +
" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE Version = '202110' ) AS TEMP2 ON temp1.SAP编码 = TEMP2.MaterialCode\n" +
" LEFT JOIN (\n" +
" SELECT\n" +
" ROUND( SUM ( AmountNoTax ) / SUM ( ReceiptQty ), 4 ) PurchasePriceNoTax,\n" +
" PurchaseOrderNo,\n" +
" MaterialCode \n" +
" FROM\n" +
" Set_SparePart \n" +
" WHERE\n" +
" Extend != 'is90' \n" +
" AND PurchaseOrderNo != 'NoOrder' \n" +
" AND Version = '{0}' \n" +
" GROUP BY\n" +
" PurchaseOrderNo,\n" +
" MaterialCode \n" +
" ) AS TEMP4 ON temp1.[物料代码] = TEMP4.MaterialCode \n" +
" AND temp1.采购订单号 = TEMP4.PurchaseOrderNo \n" +
" ) union1";
" union1.* \n" +
"FROM\n" +
" (\n" +
" SELECT\n" +
" temp1.交货日期,\n" +
" temp1.交货单号,\n" +
" NULL 订单日期,\n" +
" temp1.采购订单号,\n" +
" temp1.SAP编码,\n" +
" temp1.物料代码,\n" +
" temp1.物料描述,\n" +
" temp1.采购订单文本,\n" +
" temp1.开票数量,\n" +
" ISNULL( TEMP4.PurchasePriceNoTax, 0 ) AS 开票单价,\n" +
" ISNULL( temp1.开票数量, 0 ) * ISNULL( TEMP4.PurchasePriceNoTax, 0 ) AS 开票金额,\n" +
" ISNULL( TEMP2.Price, 0 ) AS 定价,\n" +
" ISNULL( TEMP4.PurchasePriceNoTax, 0 ) - ISNULL( TEMP2.Price, 0 ) AS 单价差异 ,\n" +
" ( ISNULL( TEMP4.PurchasePriceNoTax, 0 ) - ISNULL( TEMP2.Price, 0 ) ) * temp1.开票数量 AS 差异总金额,\n" +
" temp1.发货数量,\n" +
" temp1.发货与开票差异,\n" +
" ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) 实际交货数量,\n" +
" ISNULL( temp1.发货数量, 0 ) - ISNULL( temp1.开票数量, 0 ) - ISNULL( temp3.Qty, 0 ) AS 实际交货与开票差异,\n" +
" ISNULL( temp3.Qty, 0 ) 退货数量 \n" +
" FROM\n" +
" (\n" +
" SELECT\n" +
" a.PurchaseOrderNoText AS 采购订单文本,\n" +
" '' AS 交货单号,\n" +
" NULL AS 交货日期,\n" +
" a.PurchaseOrderNo AS 采购订单号,\n" +
" b.MaterialCode AS SAP编码,\n" +
" b.CustomerPartCode AS 物料代码,\n" +
" b.MaterialDesc AS 物料描述,\n" +
" b.EstimateTypeDesc AS 物料组,\n" +
" ISNULL( a.InvoicedQty, 0 ) AS 开票数量 ,\n" +
" ISNULL( C.Qty, 0 ) AS 发货数量,\n" +
" ISNULL( C.Qty, 0 ) - ISNULL( a.InvoicedQty, 0 ) AS 发货与开票差异 \n" +
" FROM\n" +
" (\n" +
" SELECT SUM\n" +
" ( InvoicedQty ) InvoicedQty,\n" +
" PurchaseOrderNo,\n" +
" MaterialCode,\n" +
" PurchaseOrderNoText \n" +
" FROM\n" +
" Set_SparePart \n" +
" WHERE\n" +
" Extend != 'is90' \n" +
" AND PurchaseOrderNo != 'NoOrder' \n" +
" AND Version = '{0}' \n" +
" GROUP BY\n" +
" PurchaseOrderNo,\n" +
" MaterialCode,\n" +
" PurchaseOrderNoText \n" +
" ) AS a\n" +
" LEFT OUTER JOIN Set_material AS b ON a.MaterialCode = b.CustomerPartCode\n" +
" LEFT JOIN (\n" +
"   SELECT\n" +
" ISNULL( temp1.Qty, 0 ) AS Qty,\n" +
" ( ISNULL( temp1.Qty, 0 ) - ISNULL( temp2.Qty, 0 ) ) WMSDeliveryQty,\n" +
" temp1.MaterialCode,\n" +
" temp1.PurchaseOrderNo \n" +
" FROM\n" +
" (\n" +
" ( SELECT SUM ( ReceiptQty ) Qty, PurchaseOrderNo, MaterialCode FROM Set_WMSSparePart GROUP BY PurchaseOrderNo, MaterialCode ) temp1\n" +
" LEFT JOIN (\n" +
" SELECT SUM\n" +
" ( InvoicedQty ) Qty,\n" +
" PurchaseOrderNo,\n" +
" MaterialCode \n" +
" FROM\n" +
" Set_SparePart \n" +
" WHERE\n" +
" VERSION = '{0}' \n" +
" AND Extend != 'is90' \n" +
" AND PurchaseOrderNo != 'NoOrder' \n" +
" GROUP BY\n" +
" PurchaseOrderNo,\n" +
" MaterialCode \n" +
" ) temp2 ON temp1.PurchaseOrderNo = temp2.PurchaseOrderNo \n" +
" AND temp1.MaterialCode = temp2.MaterialCode \n" +
" ) \n" +
" ) C ON A.PurchaseOrderNo = C.PurchaseOrderNo \n" +
" AND A.MaterialCode = C.MaterialCode \n" +
" ) AS temp1\n" +
" LEFT JOIN ( SELECT * FROM set_backQty WHERE Version = '{0}' ) temp3 ON temp1.采购订单号 = temp3.Code \n" +
" AND temp1.SAP编码= temp3.MaterialCode\n" +
" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE Version = '202110' ) AS TEMP2 ON temp1.SAP编码 = TEMP2.MaterialCode\n" +
" LEFT JOIN (\n" +
" SELECT\n" +
" ROUND( SUM ( AmountNoTax ) / SUM ( InvoicedQty ), 4 ) PurchasePriceNoTax,\n" +
" PurchaseOrderNo,\n" +
" MaterialCode \n" +
" FROM\n" +
" Set_SparePart \n" +
" WHERE\n" +
" Extend != 'is90' \n" +
" AND PurchaseOrderNo != 'NoOrder' \n" +
" AND Version = '{0}' \n" +
" GROUP BY\n" +
" PurchaseOrderNo,\n" +
" MaterialCode \n" +
" ) AS TEMP4 ON temp1.[物料代码] = TEMP4.MaterialCode \n" +
" AND temp1.采购订单号 = TEMP4.PurchaseOrderNo \n" +
" ) union1";
string _sql = string.Format(sqlString, version);
var _query = DbConnection.Query<SettleSparePartExport>(_sql, null, null, true, 1200, null);
var _query = DbConnection.Query<SettleSparePartDetailExport>(_sql, null, null, true, 1200, null);
var _lst = _query.ToList();
//取客户物料号CustomerPartCode来匹配
var sql1 = "SELECT\n" +
" A.WMSDeliveryNote WmsBillNum,\n" +
" t1.MaterialCode MaterialCode,\n" +
" t1.CustomerPartCode MaterialCode,\n" +
" A.PurchaseOrderNo Kanban,\n" +
" A.SpareDate WmsDate \n" +
"FROM\n" +
@ -196,10 +195,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
//取客户物料号CustomerPartCode来匹配
var sql2 = "SELECT\n" +
" A.WMSDeliveryNote WmsBillNum,\n" +
" t1.MaterialCode MaterialCode,\n" +
" t1.CustomerPartCode MaterialCode,\n" +
" A.PurchaseOrderNo Kanban,\n" +
" A.SpareDate WmsDate \n" +
"FROM\n" +
@ -355,7 +354,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
foreach (var itm1 in _lst)
{
//itm1.收货与交货差异 = itm1.收货数量 - ((!string.IsNullOrEmpty(itm1.实际交货数量)) ? decimal.Parse(itm1.实际交货数量) : 0);
var item = _ls1.FirstOrDefault(p => p.Kanban == itm1. && p.MaterialCode == itm1.SAP编);
var item = _ls1.FirstOrDefault(p => p.Kanban == itm1. && p.MaterialCode == itm1.);
if (item != null)
{
itm1. = item.WmsBillNum;
@ -364,7 +363,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
var itm = _ls.FirstOrDefault(p => p.Kanban == itm1. && p.MaterialCode == itm1.SAP编);
var itm = _ls.FirstOrDefault(p => p.Kanban == itm1. && p.MaterialCode == itm1.);
if (itm != null)
{
itm1. = itm.WmsBillNum;
@ -416,9 +415,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ISNULL( TEMP2.Price, 0 ) AS 定价,\n" +
" temp1.开票单价 - ISNULL( TEMP2.Price, 0 ) AS 单价差异 ,\n" +
" ( temp1.开票单价 - ISNULL( TEMP2.Price, 0 ) ) * temp1.开票数量 AS 差异总金额,\n" +
" temp1.货数量,\n" +
" temp1.货数量,\n" +
" temp1.收货与交货差异,\n" +
" ISNULL( temp1.货数量, 0 ) - ISNULL( temp3.Qty, 0 ) 实际交货数量,\n" +
" ISNULL( temp1.货数量, 0 ) - ISNULL( temp3.Qty, 0 ) 实际交货数量,\n" +
" ISNULL( temp3.Qty, 0 ) 退货数量 \n" +
"FROM\n" +
" (\n" +
@ -436,7 +435,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ISNULL( a.ReceiptQty, 0 ) AS 收货数量,\n" +
" ISNULL( a.InvoicedQty, 0 ) AS 开票数量 ,\n" +
" ISNULL( a.InvoicedQty, 0 ) * ISNULL( a.PurchasePriceNoTax, 0 ) AS 开票金额,\n" +
" ISNULL( C.WMSDeliveryQty, 0 ) AS 货数量,\n" +
" ISNULL( C.WMSDeliveryQty, 0 ) AS 货数量,\n" +
" ( ISNULL( a.ReceiptQty, 0 ) - ISNULL( C.WMSDeliveryQty, 0 ) ) AS 收货与交货差异 \n" +
" FROM\n" +
" ( SELECT * FROM Set_SparePart WHERE Extend != 'is90' AND Version = '{0}' and PurchaseOrderNo!='NoOrder' ) AS a\n" +
@ -959,6 +958,76 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "收货与交货差异", IsIgnore = true)]
public decimal { set; get; }
}
public class SettleSparePartDetailExport
{
public SettleSparePartDetailExport()
{
}
[ExporterHeader(DisplayName = "交货单号")]
public string { set; get; }
[ExporterHeader(DisplayName = "交货日期 ")]
public string { set; get; }
[ExporterHeader(DisplayName = "订单日期")]
public string { set; get; }
[ExporterHeader(DisplayName = "采购订单号")]
public string { set; get; }
[ExporterHeader(DisplayName = "SAP编码")]
public string SAP编码 { set; get; }
[ExporterHeader(DisplayName = "物料代码")]
public string { set; get; }
[ExporterHeader(DisplayName = "物料描述")]
public string { set; get; }
[ExporterHeader(DisplayName = "采购订单文本", IsIgnore = true)]
public string { set; get; }
[ExporterHeader(DisplayName = "发货数量")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "开票数量")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "发货与开票差异", IsIgnore = true)]
public decimal { set; get; }
[ExporterHeader(DisplayName = "开票单价")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "开票金额")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "定价")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "单价差异")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "差异总金额")]
public decimal { set; get; }
[ExporterHeader(DisplayName = "寄售库存数量", IsIgnore = true)]
public decimal { set; get; }
[ExporterHeader(DisplayName = "退货数量")]
public string 退 { set; get; }
[ExporterHeader(DisplayName = "实际交货数量")]
public string { set; get; }
[ExporterHeader(DisplayName = "实际交货与开票差异")]
public string { set; get; }
}
/// <summary>

16
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHUnSettledDetailDiffExportService.cs

@ -60,14 +60,14 @@ namespace SettleAccount.Job.Services.Report
//有发货无结算+有发货有结算中发货数量大于结算数量的数据-----组合
//有发货无结算+有发货有结算中发货数量大于结算数量的数据-----组合:红旗未结明细
var _ls = _dapperRepository.GetReverseSettledDetailDiffReportList(version, materialCode, begin, end, materialGroup, iscontionversion);
//原始正常的红旗未结数据(不包含有发货有结算中发货大于结算的数据,数量也未求和)
var _ls_original = _dapperRepository.GetOriginalSettledDetailDiffReportList(version, materialCode, begin, end, materialGroup, iscontionversion);
//var _ls_original = _dapperRepository.GetOriginalSettledDetailDiffReportList(version, materialCode, begin, end, materialGroup, iscontionversion);
//有发货有结算,且发货数量大于结算数量的数据汇总
var _ls_innerjoin = _dapperRepository.GetInnerJoinSettledDetailDiffReportList(version, materialCode, begin, end, materialGroup, iscontionversion);
//var _ls_innerjoin = _dapperRepository.GetInnerJoinSettledDetailDiffReportList(version, materialCode, begin, end, materialGroup, iscontionversion);
if (!string.IsNullOrEmpty(sapCode))
@ -83,11 +83,11 @@ namespace SettleAccount.Job.Services.Report
ExcelExporter _exporter = new ExcelExporter();//导出Excel
var result = _exporter.Append(_ls.ToList(), "有发货对比(无结算加指定条件结算)")
.SeparateBySheet()
.Append(_ls_original.ToList(), "原始红旗未结数据")
.SeparateBySheet()
.Append(_ls_innerjoin.ToList(), "有发货有结算(发货数量大于结算)")
var result = _exporter.Append(_ls.ToList(), "红旗看板未结明细")
//.SeparateBySheet()
//.Append(_ls_original.ToList(), "原始红旗未结数据")
// .SeparateBySheet()
//.Append(_ls_innerjoin.ToList(), "有发货有结算(发货数量大于结算)")
.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();
_fileContainer.SaveAsync(_filename, result.Result, true);

10
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleUnSparePartExportService.cs

@ -125,11 +125,11 @@ namespace SettleAccount.Job.Services.Report
ExcelExporter _exporter = new ExcelExporter();//导出Excel
var result = _exporter.Append(_reversels_withcode.ToList(), "大众备件未结(包含发货数量大于结算数据)")
.SeparateBySheet()
.Append(queryStockList_nocode.ToList(), "大众备件无单号汇总")
.SeparateBySheet()
.Append(queryStockList.ToList(), "零件汇总比对寄售库存")
var result = _exporter.Append(_reversels_withcode.ToList(), "大众备件未结明细")
// .SeparateBySheet()
//.Append(queryStockList_nocode.ToList(), "大众备件无单号汇总")
// .SeparateBySheet()
//.Append(queryStockList.ToList(), "零件汇总比对寄售库存")
.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();
_fileContainer.SaveAsync(fileName, result.Result, true);

Loading…
Cancel
Save