From 858a6bac983f25199186bb4ba5dc487f9ef52ec6 Mon Sep 17 00:00:00 2001
From: 44673626 <44673626@qq.com>
Date: Sat, 7 May 2022 10:18:18 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BA=A2=E6=97=97=E6=9C=AA=E7=BB=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Report/HQHSettledDetailDapperRepository.cs | 2 +-
.../SettleSparePartDapperReportRepository.cs | 12 ++++++------
.../Services/Report/UnSettledSumService.cs | 18 ++++++++++++------
3 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs
index c68ce3a3..888bd13c 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQHSettledDetailDapperRepository.cs
@@ -2104,7 +2104,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "实际发货数量")]
public decimal 实际发货数量 { set; get; }
- [ExporterHeader(DisplayName = "未结数量")]
+ [ExporterHeader(DisplayName = "未结数量", IsIgnore = true)]
public decimal 未结数量 { set; get; }
[ExporterHeader(DisplayName = "发货定价")]
diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs
index 6d6cdb11..06602b29 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleSparePartDapperReportRepository.cs
@@ -695,10 +695,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" temp1.开票数量,\n" +
" temp1.收货与交货差异,\n" +
" ISNULL( temp3.Qty, 0 ) 退货数量,\n" +
-" ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) 实际发货数量,\n" +
-" ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) - ISNULL( temp1.开票数量, 0 ) 未结数量,\n" +
+" ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) 未结数量,\n" +
+" ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) - ISNULL( temp1.开票数量, 0 ) 实际发货数量,\n" +
" ISNULL( TEMP2.Price, 0 ) AS 定价,\n" +
-" ISNULL( TEMP2.Price, 0 ) * ( ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) ) 实际发货总金额 \n" +
+" ISNULL( TEMP2.Price, 0 ) * ( ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) - ISNULL( temp1.开票数量, 0 ) ) 实际发货总金额 \n" +
" FROM\n" +
" (\n" +
" SELECT\n" +
@@ -755,10 +755,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" temp1.开票数量,\n" +
" temp1.收货与交货差异,\n" +
" ISNULL( temp3.Qty, 0 ) 退货数量,\n" +
-" ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) 实际发货数量,\n" +
-" ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) - ISNULL( temp1.开票数量, 0 ) 未结数量,\n" +
+" ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) 未结数量,\n" +
+" ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) - ISNULL( temp1.开票数量, 0 ) 实际发货数量,\n" +
" ISNULL( TEMP2.Price, 0 ) AS 定价,\n" +
-" ISNULL( TEMP2.Price, 0 ) * ( ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) ) 实际发货总金额 \n" +
+" ISNULL( TEMP2.Price, 0 ) * (ISNULL( temp1.发货数量, 0 ) - ISNULL( temp3.Qty, 0 ) - ISNULL( temp1.开票数量, 0 ) ) 实际发货总金额 \n" +
" FROM\n" +
" (\n" +
" SELECT\n" +
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs
index 47fba3e8..5be7b2f3 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettledSumService.cs
@@ -239,7 +239,7 @@ namespace SettleAccount.Job.Services.Report
}
-
+ //DiffQty 为实际发货数量=发货数量-结算数量-退货数量 财务要求
var kanbanList = _ls.GroupBy(p => new { p.SapCode, p.MaterialDesc, p.MaterialGroup, p.CustomerPartCode })
.Select(p => new UnSettledSum
{
@@ -249,7 +249,7 @@ namespace SettleAccount.Job.Services.Report
//客户物料 = p.Key.CustomerPartCode,
物料描述 = p.Key.MaterialDesc,
物料组车型 = p.Key.MaterialGroup,
- SAS未结明细汇总 = p.Sum(p => p.WMSDeliveryQty).ToString()
+ SAS未结明细汇总 = p.Sum(p => p.DiffQty).ToString()
}).ToList();
@@ -305,14 +305,20 @@ namespace SettleAccount.Job.Services.Report
//客户物料 = p.Key.客户物料号,
物料描述 = p.Key.零件中文名称,
物料组车型 = p.Key.物料组,
- SAS未结明细汇总 = p.Sum(p => p.发货数量).ToString()
+ SAS未结明细汇总 = p.Sum(p => p.未结数量).ToString()
}).ToList();
return kanbanList;
}
-
+ ///
+ /// 大众备件未对
+ ///
+ ///
+ ///
+ ///
+ ///
public List GetSparePartSum(Guid id, List exportName, List p_list)
{
var fileName = exportName.FirstOrDefault();
@@ -337,7 +343,7 @@ namespace SettleAccount.Job.Services.Report
_ls = _ls.Where(p => _groupList.Contains(p.SAP编码)).ToList();
}
}
-
+ //说明 为实际发货数量=发货数量-结算数量-退货数量 财务要求
var kanbanList = _ls.GroupBy(p => new { p.SAP编码, p.物料描述, p.物料代码 })
.Select(p => new UnSettledSum
{
@@ -347,7 +353,7 @@ namespace SettleAccount.Job.Services.Report
//客户物料 = p.Key.物料代码,
物料描述 = p.Key.物料描述,
物料组车型 = string.Empty,
- SAS未结明细汇总 = p.Sum(p => p.发货数量).ToString()
+ SAS未结明细汇总 = p.Sum(p =>Convert.ToDecimal(p.实际发货数量)).ToString()
}).ToList();