From f418337760fd1108274f74172cbec35a28155539 Mon Sep 17 00:00:00 2001
From: 44673626 <44673626@qq.com>
Date: Tue, 22 Mar 2022 19:28:10 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E6=97=A5=E5=B8=B8=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Entities/TaskListDto.cs | 12 +++---
.../VWSparePart/SparePartAppService.cs | 4 +-
.../Entities/WMS/WMSHQHKanbanAppService.cs | 2 +-
.../Entities/WMS/WMSKanbanAppService.cs | 10 ++---
.../Entities/WMS/WmsHQCarAppService.cs | 1 +
.../Entities/WMS/WmsHQKBOutputAppService.cs | 26 +++++++-----
.../HQCarSettledDetailDiffExportService.cs | 16 ++++----
.../HQHSettledDetailDiffExportService.cs | 40 +++++++++++--------
...SharePartSettledDetailDiffExportService.cs | 34 ++++++++--------
.../Report/SettleSparePart90ExportService.cs | 18 +++++----
10 files changed, 90 insertions(+), 73 deletions(-)
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/TaskListDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/TaskListDto.cs
index 7d7edfce..8e9e5d04 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/TaskListDto.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/TaskListDto.cs
@@ -185,7 +185,7 @@ namespace Win.Sfs.SettleAccount.Entities
[ExporterHeader(DisplayName = "结算数量")]
public decimal Qty { set; get; }
[ImporterHeader(Name = "寄售库存数量", IsIgnore = true)]
- [ExporterHeader(DisplayName = "寄售库存数量", IsIgnore = true)]
+ [ExporterHeader(DisplayName = "寄售库存数量")]
public decimal SockQty { set; get; }
[ImporterHeader(Name = "真实数量", IsIgnore = true)]
@@ -272,7 +272,7 @@ namespace Win.Sfs.SettleAccount.Entities
[ExporterHeader(DisplayName = "任务代码", IsIgnore = true)]
public Guid TaskId { set; get; }
- [ExporterHeader(DisplayName = "寄销库数量", IsIgnore = true)]
+ [ExporterHeader(DisplayName = "寄销库数量")]
public decimal StockQty { set; get; }
[ExporterHeader(DisplayName = "出库数量", IsIgnore = true)]
@@ -288,7 +288,7 @@ namespace Win.Sfs.SettleAccount.Entities
///
- /// 大众备件手工出库单
+ /// 大众备件手工出库单,带条码号
///
public class WmsSharePart90OutPutDetialDto
{
@@ -400,7 +400,7 @@ namespace Win.Sfs.SettleAccount.Entities
[ExporterHeader(DisplayName = "结算数量")]
public decimal Qty { set; get; }
[ImporterHeader(Name = "寄售库存数量", IsIgnore = true)]
- [ExporterHeader(DisplayName = "寄售库存数量", IsIgnore = true)]
+ [ExporterHeader(DisplayName = "寄售库存数量")]
public decimal SockQty { set; get; }
[ImporterHeader(Name = "真实数量", IsIgnore = true)]
@@ -454,7 +454,7 @@ namespace Win.Sfs.SettleAccount.Entities
[ExporterHeader(DisplayName = "结算数量")]
public decimal Qty { set; get; }
[ImporterHeader(Name = "寄售库存数量", IsIgnore = true)]
- [ExporterHeader(DisplayName = "寄售库存数量", IsIgnore = true)]
+ [ExporterHeader(DisplayName = "寄售库存数量")]
public decimal SockQty { set; get; }
[ImporterHeader(Name = "真实数量", IsIgnore = true)]
@@ -494,7 +494,7 @@ namespace Win.Sfs.SettleAccount.Entities
//交货单号
[ImporterHeader(Name = "寄销库数量", IsIgnore = true)]
- [ExporterHeader(DisplayName = "寄销库数量", IsIgnore = true)]
+ [ExporterHeader(DisplayName = "寄销库数量")]
public decimal StockQty { set; get; }
[ImporterHeader(Name = "出库数量", IsIgnore = true)]
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs
index 32d54b99..866e580b 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs
@@ -226,11 +226,11 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart
switch (input.FileType)
{
case 0:
- _fileName = string.Format("大众备件结算明细_{0}.csv", input.UserId.ToString());
+ _fileName = string.Format("大众备件结算调整_{0}.csv", input.UserId.ToString());
result = await _csv.ExportAsByteArray(dtoDetails);
break;
case 1:
- _fileName = string.Format("大众备件结算明细_{0}.xlsx", input.UserId.ToString());
+ _fileName = string.Format("大众备件结算调整_{0}.xlsx", input.UserId.ToString());
result = await _excel.ExportAsByteArray(dtoDetails);
break;
}
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs
index 362d2232..d5fe277e 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs
@@ -578,7 +578,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
IExporter _excel = new ExcelExporter();
byte[] result = null;
- var _fileName = string.Format("红旗H平台出库单_{0}.xlsx", Guid.NewGuid().ToString());
+ var _fileName = string.Format("红旗批量出库单_{0}.xlsx", Guid.NewGuid().ToString());
result = await _excel.ExportAsByteArray(entities);
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs
index ced3113e..34efa817 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs
@@ -811,11 +811,11 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
IExporter _excel = new ExcelExporter();
byte[] result = null;
-
- var _fileName = string.Format("大众看板出库单_{0}.xlsx", Guid.NewGuid().ToString());
- result = await _excel.ExportAsByteArray(dtos);
-
-
+
+ var _fileName = string.Format("大众看板出库单_{0}.xlsx", Guid.NewGuid().ToString());
+ result = await _excel.ExportAsByteArray(dtos);
+
+
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs
index b970a058..f06da6d9 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs
@@ -465,6 +465,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
_lsCopy.Add(_detail);
}
_lst.AddRange(_lsCopy.ToArray());
+
//检验3:导入模板中的SAP编号不能重复,按其汇总出库
var _isRepeatOfReportList = _lst.GroupBy(x => new { x.MaterialCode, x.Version }).Select(p => new { Count = p.Count(), MaterialCode = p.Key.MaterialCode });
foreach (var itm in _isRepeatOfReportList)
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs
index cc9fc28f..a319b4f9 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs
@@ -249,7 +249,6 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
// return await ExportErrorReportAsync(checkList);
// }
//}
- var _billNum = "HQKB" + DateTime.Now.ToString("yyyyMMddhhmmss");
//var _list = _dapper.GetNoKanbanSettleDetail(input.Version);
@@ -261,8 +260,8 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
{
throw new BusinessException("导入模板数据不能为空!");
}
- //物料号不能为空
- var _list = _listOrgin.Where(p => p.SapMaterialCode != "");
+ //物料号不能为空,直接过滤掉,模板的中看不到有空行的情况,但是通过个IE这个插件发现有空行数据导入
+ var _list = _listOrgin.Where(p =>!string.IsNullOrEmpty(p.SapMaterialCode));
foreach (var itm in _list)
{
@@ -271,11 +270,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
checkList.Add(new ErrorExportDto(version, "红旗一轿出库单导入", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入模板中SAP编码{0}的是否备件及客户号不能为空,影响出库请检查!", itm.SapMaterialCode), string.Empty));
}
}
- if (checkList.Count > 0)
- {
- return await ExportErrorReportAsync(checkList);
- }
-
+
foreach (var itm in _list)
{
if (itm.IsBack != "是" && itm.IsBack != "否")
@@ -291,7 +286,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
//翻译一下是否备件
foreach (var itm in _list)
{
- if (itm.IsBack == "是")
+ if (itm.IsBack.Trim() == "是")
{
itm.IsBack = "1";
}
@@ -300,6 +295,17 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
itm.IsBack = "0";
}
}
+ var getbillName = "HQVSBT";//混合数据
+ if(_list.FirstOrDefault().Extend== "100113")
+ {
+ getbillName = "BT";//一轿
+ }
+ else if(_list.FirstOrDefault().Extend == "100053")
+ {
+ getbillName = "HQKB";//红旗
+ }
+
+ var _billNum = getbillName + DateTime.Now.ToString("yyyyMMddhhmmss");
var stockList = _wmsDapper.GetSalesStock();
var query = from itm in _list
@@ -456,7 +462,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
/// 导出
///
///
- ///
+ /// 7
[HttpPost]
[Route("Export")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQCarSettledDetailDiffExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQCarSettledDetailDiffExportService.cs
index b31efe5c..2a9290e1 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQCarSettledDetailDiffExportService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQCarSettledDetailDiffExportService.cs
@@ -117,14 +117,14 @@ namespace SettleAccount.Job.Services.Report
//}
- if (!string.IsNullOrEmpty(warehouseDesc))
- {
- var _groupList = warehouseDesc.Split(new char[] { '\n' }).Distinct().ToList();
- if (_groupList.Count() > 0)
- {
- _ls = _ls.Where(p => _groupList.Contains(p.收货仓库描述)).ToList();
- }
- }
+ //if (!string.IsNullOrEmpty(warehouseDesc))
+ //{
+ // var _groupList = warehouseDesc.Split(new char[] { '\n' }).Distinct().ToList();
+ // if (_groupList.Count() > 0)
+ // {
+ // _ls = _ls.Where(p => _groupList.Contains(p.收货仓库描述)).ToList();
+ // }
+ //}
if (!string.IsNullOrEmpty(materialGroup))
{
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSettledDetailDiffExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSettledDetailDiffExportService.cs
index 099c4979..00704dca 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSettledDetailDiffExportService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSettledDetailDiffExportService.cs
@@ -76,6 +76,7 @@ namespace SettleAccount.Job.Services.Report
_first.数量差异 = itm.差异数量;
}
}
+ //订货看板编号
if (!string.IsNullOrEmpty(kanban))
{
var _groupList = kanban.Split(new char[] { '\n' }).Distinct().ToList();
@@ -84,23 +85,26 @@ namespace SettleAccount.Job.Services.Report
_ls = _ls.Where(p => _groupList.Contains(p.订货看板编号)).ToList();
}
}
- if (!string.IsNullOrEmpty(warehouseDesc))
- {
- var _groupList = warehouseDesc.Split(new char[] { '\n' }).Distinct().ToList();
- if (_groupList.Count() > 0)
- {
- _ls = _ls.Where(p => _groupList.Contains(p.收货仓库描述)).ToList();
- }
- }
-
- if (!string.IsNullOrEmpty(acceptNo))
- {
- var _groupList = acceptNo.Split(new char[] { '\n' }).Distinct().ToList();
- if (_groupList.Count() > 0)
- {
- _ls = _ls.Where(p => _groupList.Contains(p.结算验收单号)).ToList();
- }
- }
+ //if (!string.IsNullOrEmpty(warehouseDesc))
+ //{
+ // var _groupList = warehouseDesc.Split(new char[] { '\n' }).Distinct().ToList();
+ // if (_groupList.Count() > 0)
+ // {
+ // _ls = _ls.Where(p => _groupList.Contains(p.收货仓库描述)).ToList();
+ // }
+ //}
+
+ //if (!string.IsNullOrEmpty(acceptNo))
+ //{
+ // var _groupList = acceptNo.Split(new char[] { '\n' }).Distinct().ToList();
+ // if (_groupList.Count() > 0)
+ // {
+ // _ls = _ls.Where(p => _groupList.Contains(p.结算验收单号)).ToList();
+ // }
+ //}
+
+
+ //物料组车型
if (!string.IsNullOrEmpty(materialGroup))
{
var _groupList = materialGroup.Split(new char[] { ',' }).Distinct().ToList();
@@ -109,6 +113,7 @@ namespace SettleAccount.Job.Services.Report
_ls = _ls.Where(p => _groupList.Contains(p.物料组)).ToList();
}
}
+ //发货零件号
if (!string.IsNullOrEmpty(materialCode))
{
var _groupList = materialCode.Split(new char[] { '\n' }).Distinct().ToList();
@@ -117,6 +122,7 @@ namespace SettleAccount.Job.Services.Report
_ls = _ls.Where(p => _groupList.Contains(p.发货零件号)).ToList();
}
}
+ //厂内物料号
if (!string.IsNullOrEmpty(sapCode))
{
var _groupList = sapCode.Split(new char[] { '\n' }).Distinct().ToList();
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSharePartSettledDetailDiffExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSharePartSettledDetailDiffExportService.cs
index ebd7acdb..30bdb6dc 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSharePartSettledDetailDiffExportService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSharePartSettledDetailDiffExportService.cs
@@ -101,36 +101,38 @@ namespace SettleAccount.Job.Services.Report
var _groupList = kanban.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0)
{
- _ls = _ls.Where(p => _groupList.Contains(p.结算物料号)).ToList();
+ _ls = _ls.Where(p => _groupList.Contains(p.订货看板编号)).ToList();
}
}
- if (!string.IsNullOrEmpty(warehouseDesc))
- {
- var _groupList = warehouseDesc.Split(new char[] { '\n' }).Distinct().ToList();
- if (_groupList.Count() > 0)
- {
- _ls = _ls.Where(p => _groupList.Contains(p.收货仓库描述)).ToList();
- }
- }
-
- //if (!string.IsNullOrEmpty(acceptNo))
+ //if (!string.IsNullOrEmpty(warehouseDesc))
//{
- // var _groupList = acceptNo.Split(new char[] { ',' }).Distinct().ToList();
+ // var _groupList = warehouseDesc.Split(new char[] { '\n' }).Distinct().ToList();
// if (_groupList.Count() > 0)
// {
- // _ls = _ls.Where(p => _groupList.Contains(p.结算验收单号)).ToList();
+ // _ls = _ls.Where(p => _groupList.Contains(p.收货仓库描述)).ToList();
// }
//}
- //if (!string.IsNullOrEmpty(materialGroup))
+
+ //if (!string.IsNullOrEmpty(acceptNo))
//{
- // var _groupList = materialGroup.Split(new char[] { ',' }).Distinct().ToList();
+ // var _groupList = acceptNo.Split(new char[] { ',' }).Distinct().ToList();
// if (_groupList.Count() > 0)
// {
- // _ls = _ls.Where(p => _groupList.Contains(p.物料组)).ToList();
+ // _ls = _ls.Where(p => _groupList.Contains(p.结算验收单号)).ToList();
// }
//}
+
+ if (!string.IsNullOrEmpty(materialGroup))
+ {
+ var _groupList = materialGroup.Split(new char[] { ',' }).Distinct().ToList();
+ if (_groupList.Count() > 0)
+ {
+ _ls = _ls.Where(p => _groupList.Contains(p.物料组)).ToList();
+ }
+ }
+
if (!string.IsNullOrEmpty(materialCode))
{
var _groupList = materialCode.Split(new char[] { '\n' }).Distinct().ToList();
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleSparePart90ExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleSparePart90ExportService.cs
index 133dbdb7..9cfbc6bf 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleSparePart90ExportService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleSparePart90ExportService.cs
@@ -82,14 +82,16 @@ namespace SettleAccount.Job.Services.Report
// _ls = _ls.Where(p => _groupList.Contains(p.物料代码)).ToList();
// }
//}
- //if (!string.IsNullOrEmpty(purchaseOrderNo))
- //{
- // var _groupList = purchaseOrderNo.Split(new char[] { '\n' }).Distinct().ToList();
- // if (_groupList.Count() > 0)
- // {
- // _ls = _ls.Where(p => _groupList.Contains(p.采购订单号)).ToList();
- // }
- //}
+
+ //采购订单号
+ if (!string.IsNullOrEmpty(purchaseOrderNo))
+ {
+ var _groupList = purchaseOrderNo.Split(new char[] { '\n' }).Distinct().ToList();
+ if (_groupList.Count() > 0)
+ {
+ _ls = _ls.Where(p => _groupList.Contains(p.采购订单号)).ToList();
+ }
+ }
From 2c07ea0a87ed295e733a504413a6b8b9221b24e8 Mon Sep 17 00:00:00 2001
From: 44673626 <44673626@qq.com>
Date: Wed, 23 Mar 2022 18:12:44 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E5=B7=B2=E7=BB=93=E7=AE=97=E5=87=BA?=
=?UTF-8?q?=E5=BA=93=E6=9F=A5=E8=AF=A2=20=E5=8F=8A=E5=AF=BC=E5=85=A5?=
=?UTF-8?q?=E8=BF=87=E6=BB=A4null=E5=80=BC=E7=AD=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Entities/WMS/WMSHQHKanbanAppService.cs | 2 +-
.../Entities/WMS/WMSKanbanAppService.cs | 4 +-
.../Entities/WMS/WMSSharePart90AppService.cs | 2 +-
.../Entities/WMS/WmsDetailUnInterface.cs | 22 ++++
.../Entities/WMS/WmsUnInterface.cs | 2 +
.../Entities/WMS/WmsUnSumInterface.cs | 31 +++++-
.../Entities/WmsDetailReport.cs | 34 ++++--
...AccountDbContextModelCreatingExtensions.cs | 2 +-
.../SettleAccountDbContextModelSnapshot.cs | 20 +++-
.../Report/WmsOutputSumDapperRepository.cs | 100 +++++++++++++++++-
10 files changed, 200 insertions(+), 19 deletions(-)
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs
index d5fe277e..ad3a308c 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs
@@ -457,7 +457,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
}
- var filteResult = result.Where(p => p.Kanban != "" && p.MaterialCode !="");//过滤掉看板号为空的数据
+ var filteResult = result.Where(p =>!string.IsNullOrEmpty(p.Kanban));//过滤掉看板号为空的数据
//检验2:导入模板中的结算数据是否为0
foreach (var itm in filteResult)
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs
index 34efa817..110bc02c 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs
@@ -697,7 +697,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
checkList.Add(new ErrorExportDto(version, "大众看板出库单导入", string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入模板中看板号{0}的结算数量为0,影响出库请检查!", itm.Kanban), string.Empty));
}
}
- var filteResult = result.Where(p => p.Kanban != "");
+ //发现导入模板中存在空行,直接过滤掉
+ var filteResult = result.Where(p =>!string.IsNullOrEmpty(p.Kanban));
+
List _lst = new List();
var _lsCopy = new List();
foreach (var itm in filteResult)
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs
index 26b9ae8c..e37f500f 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePart90AppService.cs
@@ -492,7 +492,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
}
- var filteResult = result.Where(p => p.OrderBillNum != "" && p.MaterialCode !="");//过滤掉订单号为空的数据,限制这样数据导入
+ var filteResult = result.Where(p =>!string.IsNullOrEmpty(p.OrderBillNum));//过滤掉订单号为空的数据,限制这样数据导入
//检验2:导入模板中的结算数据是否为0
foreach (var itm in filteResult)
{
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsDetailUnInterface.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsDetailUnInterface.cs
index dde7096f..f9495796 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsDetailUnInterface.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsDetailUnInterface.cs
@@ -2,6 +2,7 @@
using EFCore.BulkExtensions;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
+using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Shouldly;
using System;
@@ -28,6 +29,7 @@ using Win.Sfs.Shared.Filter;
namespace Win.Sfs.SettleAccount.Entities.WMS
{
+ [Authorize(SettleAccountPermissions.WMSJIT.Default)]
[Route("api/settleaccount/WMSOutputDetailDiffReport")]
public class WMSOutputDetailDiffReportAppService :
SettleAccountApplicationBase
@@ -115,6 +117,16 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
virtual public async Task> GetListAsync(WmsRequestDetailReportDto input)
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
+ //客户过滤
+ if (!string.IsNullOrEmpty(input.Client))
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Client", Logic = EnumFilterLogic.And, Value = input.Client });
+ }
+ //出库类型
+ if (!string.IsNullOrEmpty(input.Type))
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Type", Logic = EnumFilterLogic.And, Value = input.Type });
+ }
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
@@ -160,6 +172,16 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
virtual public async Task ExportAsync(WmsRequestDetailReportDto input)
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
+ //客户过滤
+ if (!string.IsNullOrEmpty(input.Client))
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Client", Logic = EnumFilterLogic.And, Value = input.Client });
+ }
+ //出库类型
+ if (!string.IsNullOrEmpty(input.Type))
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Type", Logic = EnumFilterLogic.And, Value = input.Type });
+ }
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, int.MaxValue,
0, true);
var dtoDetails = ObjectMapper.Map, List>(entities);
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs
index 99f8ae42..8fa16dd7 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs
@@ -2,6 +2,7 @@
using EFCore.BulkExtensions;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
+using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Shouldly;
using System;
@@ -28,6 +29,7 @@ using Win.Sfs.Shared.Filter;
namespace Win.Sfs.SettleAccount.Entities.WMS
{
+ [Authorize(SettleAccountPermissions.WMSJIT.Default)]
[Route("api/settleaccount/WMSOutputSumReport")]
public class WMSOutputSumReportAppService :
SettleAccountApplicationBase
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnSumInterface.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnSumInterface.cs
index f86fb613..a87e60d0 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnSumInterface.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnSumInterface.cs
@@ -1,6 +1,7 @@
using EFCore.BulkExtensions;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
+using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Shouldly;
using System;
@@ -23,6 +24,7 @@ using Win.Sfs.Shared.Filter;
namespace Win.Sfs.SettleAccount.Entities.WMS
{
+ [Authorize(SettleAccountPermissions.WMSJIT.Default)]
[Route("api/settleaccount/WMSOutputDetailWithCodeReport")]
public class WMSOutputDetailWithCodeReportAppService :
SettleAccountApplicationBase
@@ -94,7 +96,12 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
itm.物料组车型,
itm.物料描述,
itm.备注,
- 0));
+ 0,
+ itm.行号,
+ itm.开票单价,
+ itm.物料组编码,
+ itm.结算金额
+ ));
}
}
await _wmsRepository.GetDbContext().BulkInsertAsync(_lst);
@@ -111,6 +118,16 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
virtual public async Task> GetListAsync(WmsRequestDetailReportDto input)
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
+ //客户过滤
+ if (!string.IsNullOrEmpty(input.Client))
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Client", Logic = EnumFilterLogic.And, Value = input.Client });
+ }
+ //出库类型
+ if (!string.IsNullOrEmpty(input.Type))
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Type", Logic = EnumFilterLogic.And, Value = input.Type });
+ }
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
@@ -137,12 +154,22 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
virtual public async Task ExportAsync(WmsRequestDetailReportDto input)
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
+ //客户过滤
+ if (!string.IsNullOrEmpty(input.Client))
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Client", Logic = EnumFilterLogic.And, Value = input.Client });
+ }
+ //出库类型
+ if (!string.IsNullOrEmpty(input.Type))
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Type", Logic = EnumFilterLogic.And, Value = input.Type });
+ }
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, int.MaxValue,
0, true);
var dtoDetails = ObjectMapper.Map, List>(entities);
IExporter _excel = new ExcelExporter();
byte[] result = null;
- var _fileName = string.Format("差异清单(有条码)报表_{0}.xlsx", Guid.NewGuid().ToString());
+ var _fileName = string.Format("差异清单(有单号)报表_{0}.xlsx", Guid.NewGuid().ToString());
result = await _excel.ExportAsByteArray(dtoDetails);
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WmsDetailReport.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WmsDetailReport.cs
index 1e2e15af..c4ace711 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WmsDetailReport.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WmsDetailReport.cs
@@ -182,7 +182,11 @@ namespace Win.Sfs.SettleAccount.Entities
{
}
- public WmsDetailWithCodeReport(Guid id, string client, string type, string version, string billNum, string switchCode, string materialCode, decimal qty, decimal outputQty, decimal diffQty, string materialGroupCode, string materialGroup, string materialDesc, string remark1, int state) : base(id)
+ public WmsDetailWithCodeReport(Guid id, string client, string type, string version,
+ string billNum, string switchCode, string materialCode, decimal qty,
+ decimal outputQty, decimal diffQty, string materialGroupCode, string materialGroup,
+ string materialDesc, string remark1, int state,string lineNumber,
+ decimal price,string estimateType,decimal amt) : base(id)
{
Version = version;
Type = type;
@@ -193,13 +197,27 @@ namespace Win.Sfs.SettleAccount.Entities
Qty = qty;
OutputQty = outputQty;
DiffQty = diffQty;
- MaterialGroupCode = materialGroupCode;
+ EstimateType = materialGroupCode;
MaterialGroup = materialGroup;
MaterialDesc = materialDesc;
Remark1 = remark1;
State = state;
+ LineNumber = lineNumber;
+ //CNumber = cNumber;
+ Price = price;
+ Amt = amt;
}
+ [Display(Name = "结算金额")]
+ public decimal Amt { set; get; }
+
+
+ [Display(Name = "行号")]
+ public string LineNumber { set; get; }
+
+ //[Display(Name = "通用代码号")]
+ //public string CNumber { set; get; }
+
[Display(Name = "版本号")]
public string Version { set; get; }
@@ -207,6 +225,7 @@ namespace Win.Sfs.SettleAccount.Entities
public string Client { set; get; }
[Display(Name = "出库类型")]
public string Type { set; get; }
+
//[Display(Name = "结算编码")]
//public string SettleCode { set; get; }
//[Display(Name = "销售渠道")]
@@ -218,8 +237,6 @@ namespace Win.Sfs.SettleAccount.Entities
[Display(Name = "交货编码")]
public string SwitchCode { set; get; }
- [Display(Name = "物料号")]
- public string MaterialCode { set; get; }
//[Display(Name = "寄售类别")]
//public string SaleType { set; get; }
[Display(Name = "结算数量")]
@@ -228,16 +245,19 @@ namespace Win.Sfs.SettleAccount.Entities
public decimal OutputQty { set; get; }
[Display(Name = "差异数量")]
public decimal DiffQty { set; get; }
- //[Display(Name = "开票单价")]
- //public decimal Price { set; get; }
+ [Display(Name = "开票单价")]
+ public decimal Price { set; get; }
//[Display(Name = "结算金额")]
//public decimal Amt { set; get; }
//[Display(Name = "已出库金额")]
//public decimal OutPutAmt { set; get; }
//[Display(Name = "WMS待出库金额")]
//public decimal DiffAmt { set; get; }
+
+ [Display(Name = "物料号")]
+ public string MaterialCode { set; get; }
[Display(Name = "物料组编码")]
- public string MaterialGroupCode { set; get; }
+ public string EstimateType { set; get; }
[Display(Name = "物料组(车型)")]
public string MaterialGroup { set; get; }
[Display(Name = "物料组描述")]
diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
index 27586979..bc7bcc6d 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
@@ -632,7 +632,7 @@ namespace Win.Sfs.SettleAccount
b.Property(x => x.MaterialDesc).HasMaxLength(150);
b.Property(x => x.MaterialGroup).HasMaxLength(50);
- b.Property(x => x.MaterialGroupCode).HasMaxLength(50);
+ b.Property(x => x.EstimateType).HasMaxLength(50);
//创建组合索引
diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs
index 9d05c644..5a2a7651 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs
@@ -11643,6 +11643,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
+ b.Property("Amt")
+ .HasColumnType("decimal(18,2)");
+
b.Property("BillNum")
.IsRequired()
.HasMaxLength(50)
@@ -11651,6 +11654,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property("BranchId")
.HasColumnType("uniqueidentifier");
+ b.Property("CNumber")
+ .HasColumnType("nvarchar(max)");
+
b.Property("Client")
.IsRequired()
.HasMaxLength(50)
@@ -11684,6 +11690,10 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property("Enabled")
.HasColumnType("bit");
+ b.Property("EstimateType")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
b.Property("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
@@ -11702,6 +11712,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
+ b.Property("LineNumber")
+ .HasColumnType("nvarchar(max)");
+
b.Property("MaterialCode")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
@@ -11714,13 +11727,12 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
- b.Property("MaterialGroupCode")
- .HasMaxLength(50)
- .HasColumnType("nvarchar(50)");
-
b.Property("OutputQty")
.HasColumnType("decimal(18,2)");
+ b.Property("Price")
+ .HasColumnType("decimal(18,2)");
+
b.Property("Qty")
.HasColumnType("decimal(18,2)");
diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs
index f0ab200e..9a4f3aad 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs
@@ -202,6 +202,102 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "已出库")]
public string 已出库 { set; get; }
+ }
+
+
+ public class WmsOutputtSearchWithCode
+ {
+ [ImporterHeader(Name = "行号")]
+ [ExporterHeader(DisplayName = "行号")]
+ public string 行号 { set; get; }
+ [ImporterHeader(Name = "客户")]
+ [ExporterHeader(DisplayName = "客户")]
+ public string 客户 { set; get; }
+ [ImporterHeader(Name = "出库类型")]
+ [ExporterHeader(DisplayName = "出库类型")]
+ public string 出库类型 { set; get; }
+
+
+ //[ImporterHeader(Name = "结算编码")]
+ //[ExporterHeader(DisplayName = "结算编码")]
+ //public string 结算编码 { set; get; }
+ //[ImporterHeader(Name = "销售渠道")]
+ //[ExporterHeader(DisplayName = "销售渠道")]
+ //public string 销售渠道 { set; get; }
+ //[ImporterHeader(Name = "客户代码")]
+ //[ExporterHeader(DisplayName = "客户代码")]
+ //public string 客户代码 { set; get; }
+ [ImporterHeader(Name = "结算单")]
+ [ExporterHeader(DisplayName = "结算单")]
+ public string 结算单 { set; get; }
+ [ImporterHeader(Name = "物料号")]
+ [ExporterHeader(DisplayName = "物料号")]
+ public string 物料号 { set; get; }
+ [ImporterHeader(Name = "条码号")]
+ [ExporterHeader(DisplayName = "条码号")]
+ public string 通用代码号 { set; get; }
+ [ImporterHeader(Name = "寄售类别")]
+ [ExporterHeader(DisplayName = "寄售类别")]
+ //public string 寄售类别 { set; get; }
+ //[ImporterHeader(Name = "结算数量")]
+ //[ExporterHeader(DisplayName = "结算数量")]
+ public decimal 结算数量 { set; get; }
+ [ImporterHeader(Name = "实际出库数量")]
+ [ExporterHeader(DisplayName = "实际出库数量")]
+ public decimal 实际出库数量 { set; get; }
+ [ImporterHeader(Name = "差异数量")]
+ [ExporterHeader(DisplayName = "差异数量")]
+ public decimal 差异数量 { set; get; }
+ [ImporterHeader(Name = "开票单价")]
+ [ExporterHeader(DisplayName = "开票单价")]
+ public decimal 开票单价 { set; get; }
+ [ImporterHeader(Name = "结算金额")]
+ [ExporterHeader(DisplayName = "结算金额")]
+ public decimal 结算金额 { set; get; }
+
+ //[ImporterHeader(Name = "已出库金额")]
+ //[ExporterHeader(DisplayName = "已出库金额")]
+ //public decimal 已出库金额 { set; get; }
+ //[ImporterHeader(Name = "WMS待出库金额")]
+ //[ExporterHeader(DisplayName = "WMS待出库金额")]
+ //public decimal WMS待出库金额 { set; get; }
+ [ImporterHeader(Name = "物料组编码")]
+ [ExporterHeader(DisplayName = "物料组编码")]
+ public string 物料组编码 { set; get; }
+ [ImporterHeader(Name = "物料组车型")]
+ [ExporterHeader(DisplayName = "物料组车型")]
+ public string 物料组车型 { set; get; }
+ [ImporterHeader(Name = "物料描述")]
+ [ExporterHeader(DisplayName = "物料描述")]
+ public string 物料描述 { set; get; }
+ [ImporterHeader(Name = "备注")]
+ [ExporterHeader(DisplayName = "备注")]
+ public string 备注 { set; get; }
+
+
+
+ //public string 行号 { set; get; }
+ //public string 客户 { set; get; }
+ //public string 出库类型 { set; get; }
+ //public string 结算单 { set; get; }
+ //public string 物料号 { set; get; }
+ //public string 通用代码号 { set; get; }
+ //public string 结算数量 { set; get; }
+ //public string 实际出库数量 { set; get; }
+ //public string 差异数量 { set; get; }
+ //public string 开票单价 { set; get; }
+ //public string 结算金额 { set; get; }
+ //public string WMS待出库金额 { set; get; }
+ //public string 物料组编码 { set; get; }
+ //public string 物料组车型 { set; get; }
+ //public string 物料描述 { set; get; }
+
+ //public string 备注 { set; get; }
+
+
+
+
+
}
@@ -911,7 +1007,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
///
///
///
- public virtual List GetWmsSearchWithCodeReportList(string version, string state)
+ public virtual List GetWmsSearchWithCodeReportList(string version, string state)
{
var _sql = "SELECT\n" +
" ROW_NUMBER ( ) OVER ( ORDER BY Type DESC ) 行号 ,\n" +
@@ -1002,7 +1098,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
_sql = string.Format(_sql, version, state);
- var _query = DbConnection.Query(_sql, null, null, true, 1200, null);
+ var _query = DbConnection.Query(_sql, null, null, true, 1200, null);
return _query.ToList();
}
From 54e3bd61008bc5d8d778079f0e79def170e13a25 Mon Sep 17 00:00:00 2001
From: 44673626 <44673626@qq.com>
Date: Wed, 23 Mar 2022 19:26:18 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E5=B7=B2=E7=BB=93=E5=87=BA=E5=BA=93?=
=?UTF-8?q?=E5=8D=95=E6=9F=A5=E8=AF=A2SQL=E6=9B=B4=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Entities/WmsDetailReport.cs | 3 +-
.../Report/WmsOutputSumDapperRepository.cs | 159 +++++++++++++++++-
2 files changed, 156 insertions(+), 6 deletions(-)
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WmsDetailReport.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WmsDetailReport.cs
index c4ace711..c984f6f2 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WmsDetailReport.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WmsDetailReport.cs
@@ -247,8 +247,7 @@ namespace Win.Sfs.SettleAccount.Entities
public decimal DiffQty { set; get; }
[Display(Name = "开票单价")]
public decimal Price { set; get; }
- //[Display(Name = "结算金额")]
- //public decimal Amt { set; get; }
+
//[Display(Name = "已出库金额")]
//public decimal OutPutAmt { set; get; }
//[Display(Name = "WMS待出库金额")]
diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs
index 9a4f3aad..759d92ea 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs
@@ -1043,7 +1043,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" Set_WmsJitOutPutDetial \n" +
" WHERE\n" +
" VERSION = '{0}' \n" +
- " AND State = 2 UNION ALL\n" +
+ " AND State =2 UNION ALL\n" +
" SELECT\n" +
" '大众看板出库' AS Type,\n" +
" '大众' Client,\n" +
@@ -1059,7 +1059,39 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" Set_WmsKanbanOutPutDetial \n" +
" WHERE\n" +
" VERSION = '{0}' \n" +
- " AND State = 2 UNION ALL\n" +
+ " AND State =2 UNION ALL\n" +
+ " SELECT\n" +
+ " '大众无看板出库' AS Type,\n" +
+ " '大众' Client,\n" +
+ " BillNum,\n" +
+ " SapMaterialCode MaterialCode,\n" +
+ " Qty Qty,\n" +
+ " RealityNumber OutputQty,\n" +
+ " 0 IsBack,\n" +
+ " Price,\n" +
+ " '' CNumber,\n" +
+ " Remark \n" +
+ " FROM\n" +
+ " Set_WmsWithOutKanbanOutPutDetial \n" +
+ " WHERE\n" +
+ " VERSION = '{0}' \n" +
+ " AND State =2 UNION ALL\n" +
+ " SELECT\n" +
+ " '大众备件汇总出库' AS Type,\n" +
+ " '大众' Client,\n" +
+ " BillNum,\n" +
+ " MaterialCode,\n" +
+ " Qty Qty,\n" +
+ " RealityNumber OutputQty,\n" +
+ " 1 IsBack,\n" +
+ " Price,\n" +
+ " '' CNumber,\n" +
+ " Remark \n" +
+ " FROM\n" +
+ " Set_WmsSharePartOutPutDetial \n" +
+ " WHERE\n" +
+ " VERSION = '{0}' \n" +
+ " AND State =2 UNION ALL\n" +
" SELECT\n" +
" '大众备件条码出库' AS Type,\n" +
" '大众' Client,\n" +
@@ -1075,7 +1107,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" Set_WmsSharePart90OutPutDetial \n" +
" WHERE\n" +
" VERSION = '{0}' \n" +
- " AND State = 2 UNION ALL\n" +
+ " AND State =2 UNION ALL\n" +
" SELECT\n" +
" '红旗看板出库' AS Type,\n" +
" '红旗' Client,\n" +
@@ -1091,9 +1123,128 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" Set_WmsHQHKanbanOutPutDetial \n" +
" WHERE\n" +
" VERSION = '{0}' \n" +
- " AND State = 2 \n" +
+ " AND State =2 UNION ALL\n" +
+ " SELECT\n" +
+ " '红旗一轿手工出库' AS Type,\n" +
+ " '红旗' Client,\n" +
+ " BillNum,\n" +
+ " SapMaterialCode MaterialCode,\n" +
+ " Qty,\n" +
+ " RealityNumber OutputQty,\n" +
+ " IsBack,\n" +
+ " Price,\n" +
+ " '' CNumber,\n" +
+ " Remark \n" +
+ " FROM\n" +
+ " Set_WmsHQWithOutKanbanOutPutDetial \n" +
+ " WHERE\n" +
+ " IsBack = 0 \n" +
+ " AND VERSION = '{0}' \n" +
+ " AND State =2 UNION ALL\n" +
+ " SELECT\n" +
+ " '红旗一轿手工出库(备件)' AS Type,\n" +
+ " '红旗' Client,\n" +
+ " BillNum,\n" +
+ " SapMaterialCode,\n" +
+ " Qty Qty,\n" +
+ " RealityNumber OutputQty,\n" +
+ " IsBack,\n" +
+ " Price,\n" +
+ " '' CNumber,\n" +
+ " Remark \n" +
+ " FROM\n" +
+ " Set_WmsHQWithOutKanbanOutPutDetial \n" +
+ " WHERE\n" +
+ " IsBack = 1 \n" +
+ " AND VERSION = '{0}' \n" +
+ " AND State =2 \n" +
" ) temp1\n" +
" LEFT JOIN ( SELECT MAX ( Id ) Id, MaterialCode, MaterialDesc, EstimateType, EstimateTypeDesc FROM Set_material GROUP BY MaterialCode, MaterialDesc, EstimateTypeDesc, EstimateType ) temp2 ON temp1.MaterialCode = temp2.MaterialCode";
+ //var _sql = "SELECT\n" +
+ // " ROW_NUMBER ( ) OVER ( ORDER BY Type DESC ) 行号 ,\n" +
+ // " temp1.Client 客户,\n" +
+ // " temp1.Type 出库类型,\n" +
+ // " temp1.BillNum 结算单,\n" +
+ // " temp1.MaterialCode 物料号,\n" +
+ // " temp1.CNumber 通用代码号,\n" +
+ // " Isnull( temp1.Qty, 0 ) 结算数量,\n" +
+ // " Isnull( temp1.OutputQty, 0 ) 实际出库数量,\n" +
+ // " Isnull( temp1.Qty, 0 ) - Isnull( temp1.OutputQty, 0 ) 差异数量,\n" +
+ // " temp1.Price 开票单价,\n" +
+ // " Round( Isnull( temp1.Qty, 0 ) * temp1.Price, 2 ) 结算金额,\n" +
+ // " Round( ( Isnull( temp1.Qty, 0 ) - Isnull( temp1.OutputQty, 0 ) ) * temp1.Price, 2 ) WMS待出库金额,\n" +
+ // " temp2.EstimateType 物料组编码,\n" +
+ // " temp2.EstimateTypeDesc 物料组车型,\n" +
+ // " temp2.MaterialDesc 物料描述,\n" +
+ // " temp1.remark 备注 \n" +
+ // "FROM\n" +
+ // " (\n" +
+ // " SELECT\n" +
+ // " '大众准时化出库' AS Type,\n" +
+ // " '大众' Client,\n" +
+ // " BillNum,\n" +
+ // " MaterialCode,\n" +
+ // " Qty,\n" +
+ // " 0 OutputQty,\n" +
+ // " 0 IsBack,\n" +
+ // " Price,\n" +
+ // " ChassisNumber CNumber,\n" +
+ // " Remark \n" +
+ // " FROM\n" +
+ // " Set_WmsJitOutPutDetial \n" +
+ // " WHERE\n" +
+ // " VERSION = '{0}' \n" +
+ // " AND State = 2 UNION ALL\n" +
+ // " SELECT\n" +
+ // " '大众看板出库' AS Type,\n" +
+ // " '大众' Client,\n" +
+ // " BillNum,\n" +
+ // " MaterialCode,\n" +
+ // " Qty Qty,\n" +
+ // " 0 OutputQty,\n" +
+ // " 0 IsBack,\n" +
+ // " Price,\n" +
+ // " Kanban CNumber,\n" +
+ // " Remark \n" +
+ // " FROM\n" +
+ // " Set_WmsKanbanOutPutDetial \n" +
+ // " WHERE\n" +
+ // " VERSION = '{0}' \n" +
+ // " AND State = 2 UNION ALL\n" +
+ // " SELECT\n" +
+ // " '大众备件条码出库' AS Type,\n" +
+ // " '大众' Client,\n" +
+ // " BillNum,\n" +
+ // " MaterialCode,\n" +
+ // " Qty Qty,\n" +
+ // " 0 OutPutQty,\n" +
+ // " 1 IsBack,\n" +
+ // " Price,\n" +
+ // " OrderBillNum CNumber,\n" +
+ // " Remark \n" +
+ // " FROM\n" +
+ // " Set_WmsSharePart90OutPutDetial \n" +
+ // " WHERE\n" +
+ // " VERSION = '{0}' \n" +
+ // " AND State = 2 UNION ALL\n" +
+ // " SELECT\n" +
+ // " '红旗看板出库' AS Type,\n" +
+ // " '红旗' Client,\n" +
+ // " BillNum,\n" +
+ // " MaterialCode,\n" +
+ // " Qty Qty,\n" +
+ // " 0 OutPutQty,\n" +
+ // " 0 IsBack,\n" +
+ // " Price,\n" +
+ // " Kanban CNumber,\n" +
+ // " Remark \n" +
+ // " FROM\n" +
+ // " Set_WmsHQHKanbanOutPutDetial \n" +
+ // " WHERE\n" +
+ // " VERSION = '{0}' \n" +
+ // " AND State = 2 \n" +
+ // " ) temp1\n" +
+ // " LEFT JOIN ( SELECT MAX ( Id ) Id, MaterialCode, MaterialDesc, EstimateType, EstimateTypeDesc FROM Set_material GROUP BY MaterialCode, MaterialDesc, EstimateTypeDesc, EstimateType ) temp2 ON temp1.MaterialCode = temp2.MaterialCode";
_sql = string.Format(_sql, version, state);
From 7d4635fba5a6cd30a34a83e8159bea232ccc4412 Mon Sep 17 00:00:00 2001
From: 44673626 <44673626@qq.com>
Date: Thu, 24 Mar 2022 17:36:46 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E7=BA=A2=E6=97=97=E4=B8=80=E8=BD=BF?=
=?UTF-8?q?=E5=85=B1=E8=AE=A15=E4=B8=AA=E6=8A=A5=E8=A1=A8=E7=9A=84?=
=?UTF-8?q?=E9=AA=8C=E6=94=B6=E5=8D=95=E5=8F=B7=E6=9B=B4=E6=94=B9=E4=B8=BA?=
=?UTF-8?q?=E2=80=9C=E5=A4=96=E9=83=A8=E9=AA=8C=E6=94=B6=E5=8D=95=E5=8F=B7?=
=?UTF-8?q?=E2=80=9D=EF=BC=8C=E6=A0=B9=E6=8D=AE=E5=AE=A2=E6=88=B7=E8=B4=A2?=
=?UTF-8?q?=E5=8A=A1=E8=A6=81=E6=B1=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Entities/BT_Car/BT_Car_PlatformDto.cs | 2 +-
.../BT_Car/BT_Car_PlatformExportDto.cs | 4 +-
.../BT_Car/BT_Car_PlatformImportDto.cs | 2 +-
.../Entities/HQ_H/HQ_H_PlatformExportDto.cs | 2 +-
.../Entities/HQ_H/HQ_H_PlatformImportDto.cs | 2 +-
.../UnHQSettleAccounts/UnHQSettleDto.cs | 2 +-
.../UnHQSettleAccounts/UnHQSettleExportDto.cs | 2 +-
.../UnHQSettleAccounts/UnHQSettleImportDto.cs | 2 +-
.../ReportServices/ReportMakeService.cs | 321 ++++++-------
.../Entities/BT_Car/BT_Car_Platform.cs | 4 +-
.../HQCarSettledDetailDapperRepository.cs | 13 +-
.../HQFactorySettledDetailDapperRepository.cs | 321 ++++++-------
.../HQHSettledDetailDapperRepository.cs | 443 ++++++------------
13 files changed, 487 insertions(+), 633 deletions(-)
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BT_Car/BT_Car_PlatformDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BT_Car/BT_Car_PlatformDto.cs
index e230bc17..9cd50c92 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BT_Car/BT_Car_PlatformDto.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BT_Car/BT_Car_PlatformDto.cs
@@ -14,7 +14,7 @@ namespace Win.Sfs.SettleAccount.Entities.BT_Car
///
public string Factory { get; set; }
///
- ///外部看板编号
+ ///外部验收单号
///
public string ExternalKanbanNumber { get; set; }
///
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BT_Car/BT_Car_PlatformExportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BT_Car/BT_Car_PlatformExportDto.cs
index a835d119..db09adb9 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BT_Car/BT_Car_PlatformExportDto.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BT_Car/BT_Car_PlatformExportDto.cs
@@ -15,9 +15,9 @@ namespace Win.Sfs.SettleAccount.Entities.BT_Car
[ExporterHeader(DisplayName = "工厂")]
public string Factory { get; set; }
///
- ///外部看板编号
+ ///外部验收单号
///
- [ExporterHeader(DisplayName = "外部看板编号")]
+ [ExporterHeader(DisplayName = "外部验收单号")]
public string ExternalKanbanNumber { get; set; }
///
///看板编号
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BT_Car/BT_Car_PlatformImportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BT_Car/BT_Car_PlatformImportDto.cs
index 5bbd5503..9fc419a5 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BT_Car/BT_Car_PlatformImportDto.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BT_Car/BT_Car_PlatformImportDto.cs
@@ -17,7 +17,7 @@ namespace Win.Sfs.SettleAccount.Entities.BT_Car
///
///外部看板编号
///
- [ImporterHeader(Name = "外部看板编号")]
+ [ImporterHeader(Name = "外部验收单号")]
public string ExternalKanbanNumber { get; set; }
///
///看板编号
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformExportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformExportDto.cs
index 213804bd..282d5539 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformExportDto.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformExportDto.cs
@@ -17,7 +17,7 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
///
///外部单号
///
- [ExporterHeader(DisplayName = "外部单号")]
+ [ExporterHeader(DisplayName = "外部看板编号")]
public string ExternalKanbanNumber { get; set; }
///
///看板编号
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformImportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformImportDto.cs
index e46caa69..a16a4afe 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformImportDto.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/HQ_H/HQ_H_PlatformImportDto.cs
@@ -17,7 +17,7 @@ namespace Win.Sfs.SettleAccount.Entities.HQ_H
///
///外部单号
///
- [ImporterHeader(Name = "外部单号")]
+ [ImporterHeader(Name = "外部看板编号")]
public string ExternalKanbanNumber { get; set; }
///
///看板编号
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleDto.cs
index 484b4899..b92fc6a9 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleDto.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleDto.cs
@@ -18,7 +18,7 @@ namespace Win.Sfs.SettleAccount.Entities.UnHQSettleAccounts
///
public string ExternalKanbanNumber { get; set; }
///
- ///看板编号
+ ///外部看板编号
///
public string KanbanNumber { get; set; }
///
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleExportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleExportDto.cs
index 44041295..dc532b15 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleExportDto.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleExportDto.cs
@@ -17,7 +17,7 @@ namespace Win.Sfs.SettleAccount.Entities.UnHQSettleAccounts
///
///外部看板编号
///
- [ExporterHeader(DisplayName = "外部单号")]
+ [ExporterHeader(DisplayName = "外部看板编号")]
public string ExternalKanbanNumber { get; set; }
///
///看板编号
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleImportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleImportDto.cs
index ceb4f942..1a4fff9b 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleImportDto.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnHQSettleAccounts/UnHQSettleImportDto.cs
@@ -17,7 +17,7 @@ namespace Win.Sfs.SettleAccount.Entities.UnHQSettleAccounts
///
///外部看板编号
///
- [ImporterHeader(Name = "外部单号")]
+ [ImporterHeader(Name = "外部看板编号")]
public string ExternalKanbanNumber { get; set; }
///
///看板编号
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
index c4b2dff7..c6f0afa0 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
@@ -820,122 +820,148 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
return _taskid;
}
- ///
- ///红旗F平台核对明细
- ///
- /// 上传的文件(前端已经限制只能上传一个附件)
- ///
+
[HttpPost]
- [Route("HQFSettledDetailDiffExportService")]
+ [Route("FisUpdateExportService")]
[DisableRequestSizeLimit]
- public async Task HQFSettledDetailDiffExportServiceMake(
- HQKanbanRequestDto input
- )
+ [UnitOfWork(isTransactional: false)]
+ public async Task FisUpdateExportServiceMake(
+ HQKanbanRequestDto input
+ )
{
-
List customConditionList = new List();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
- customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
- customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
- customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
- customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
- customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
- customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
- customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
- var _taskid = await _service.ExportEnqueueAsync("F平台核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQFSettledDetailDiffExportService), customConditionList, (rs) =>
+ var _taskid = await _service.ExportEnqueueAsync("Fis发货数据更新状态", ExportExtentsion.Excel, input.Version, null, CurrentUser, typeof(FisUpdateExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
+
+
+
+
+
+
+ #region F及M平台已经合并入H平台
+
+ ///
+ ///红旗F平台核对明细
+ ///
+ /// 上传的文件(前端已经限制只能上传一个附件)
+ ///
+ //[HttpPost]
+ //[Route("HQFSettledDetailDiffExportService")]
+ //[DisableRequestSizeLimit]
+ //public async Task HQFSettledDetailDiffExportServiceMake(
+ // HQKanbanRequestDto input
+ // )
+ //{
+
+ // List customConditionList = new List();
+ // customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
+ // customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
+ // customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
+ // customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
+ // customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
+ // customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
+ // customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
+ // customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
+ // customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
+ // customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
+ // var _taskid = await _service.ExportEnqueueAsync("F平台核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQFSettledDetailDiffExportService), customConditionList, (rs) =>
+ // {
+ // });
+ // return _taskid;
+ //}
///
/// 红旗F平台备件结算出库
///
///
///
- [HttpPost]
- [Route("HQFSharePartSettledDetailDiffExportService")]
- [DisableRequestSizeLimit]
- public async Task HQFSharePartSettledDetailDiffExportServiceMake(
- HQKanbanRequestDto input
- )
- {
- List customConditionList = new List();
- customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
-
- customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
- customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
- customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
- customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
- customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
- customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
- customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
- customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
- var _taskid = await _service.ExportEnqueueAsync("F平台备件核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQFSharePartSettledDetailDiffExportService), customConditionList, (rs) =>
- {
- });
- return _taskid;
- }
+ //[HttpPost]
+ //[Route("HQFSharePartSettledDetailDiffExportService")]
+ //[DisableRequestSizeLimit]
+ //public async Task HQFSharePartSettledDetailDiffExportServiceMake(
+ // HQKanbanRequestDto input
+ // )
+ //{
+ // List customConditionList = new List();
+ // customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
+
+ // customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
+ // customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
+ // customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
+ // customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
+ // customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
+ // customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
+ // customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
+ // customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
+ // var _taskid = await _service.ExportEnqueueAsync("F平台备件核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQFSharePartSettledDetailDiffExportService), customConditionList, (rs) =>
+ // {
+ // });
+ // return _taskid;
+ //}
///
///红旗M平台核对明细
///
/// 上传的文件(前端已经限制只能上传一个附件)
///
- [HttpPost]
- [Route("HQMSettledDetailDiffExportService")]
- [DisableRequestSizeLimit]
- public async Task HQMSettledDetailDiffExportServiceMake(
- HQKanbanRequestDto input
- )
- {
+ //[HttpPost]
+ //[Route("HQMSettledDetailDiffExportService")]
+ //[DisableRequestSizeLimit]
+ //public async Task HQMSettledDetailDiffExportServiceMake(
+ // HQKanbanRequestDto input
+ // )
+ //{
- List customConditionList = new List();
- customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
- customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
- customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
- customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
- customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
- customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
- customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
- customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
- customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
- customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
- var _taskid = await _service.ExportEnqueueAsync("M平台核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQMSettledDetailDiffExportService), customConditionList, (rs) =>
- {
- });
- return _taskid;
- }
+ // List customConditionList = new List();
+ // customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
+ // customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
+ // customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
+ // customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
+ // customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
+ // customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
+ // customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
+ // customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
+ // customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
+ // customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
+ // var _taskid = await _service.ExportEnqueueAsync("M平台核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQMSettledDetailDiffExportService), customConditionList, (rs) =>
+ // {
+ // });
+ // return _taskid;
+ //}
///
/// 红旗M平台备件结算出库
///
///
///
- [HttpPost]
- [Route("HQMSharePartSettledDetailDiffExportService")]
- [DisableRequestSizeLimit]
- public async Task HQMSharePartSettledDetailDiffExportServiceMake(
- HQKanbanRequestDto input
- )
- {
- List customConditionList = new List();
- customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
-
- customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
- customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
- customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
- customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
- customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
- customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
- customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
- customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
- var _taskid = await _service.ExportEnqueueAsync("M平台备件核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQMSharePartSettledDetailDiffExportService), customConditionList, (rs) =>
- {
- });
- return _taskid;
- }
+ //[HttpPost]
+ //[Route("HQMSharePartSettledDetailDiffExportService")]
+ //[DisableRequestSizeLimit]
+ //public async Task HQMSharePartSettledDetailDiffExportServiceMake(
+ // HQKanbanRequestDto input
+ // )
+ //{
+ // List customConditionList = new List();
+ // customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
+
+ // customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
+ // customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
+ // customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
+ // customConditionList.Add(new CustomCondition() { Name = "AcceptNo", Value = input.AcceptNo });
+ // customConditionList.Add(new CustomCondition() { Name = "WarehouseDesc", Value = input.WarehouseDesc });
+ // customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.Kanban });
+ // customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
+ // customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
+ // var _taskid = await _service.ExportEnqueueAsync("M平台备件核对明细", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(HQMSharePartSettledDetailDiffExportService), customConditionList, (rs) =>
+ // {
+ // });
+ // return _taskid;
+ //}
@@ -947,91 +973,70 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
///
///
///
- [HttpPost]
- [Route("HQHShippingExportService")]
- [DisableRequestSizeLimit]
- public async Task HQHShippingExportServiceMake(
- HQKanbanRequestDto input
- )
- {
- List customConditionList = new List();
- customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
- customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
- customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
- customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
- var _taskid = await _service.ExportEnqueueAsync("H平台发运核对输出", ExportExtentsion.Excel, input.Version, null, CurrentUser, typeof(HQHShippingExportService), customConditionList, (rs) =>
- {
- });
- return _taskid;
- }
+ //[HttpPost]
+ //[Route("HQHShippingExportService")]
+ //[DisableRequestSizeLimit]
+ //public async Task HQHShippingExportServiceMake(
+ // HQKanbanRequestDto input
+ // )
+ //{
+ // List customConditionList = new List();
+ // customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
+ // customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
+ // customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
+ // customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
+ // var _taskid = await _service.ExportEnqueueAsync("H平台发运核对输出", ExportExtentsion.Excel, input.Version, null, CurrentUser, typeof(HQHShippingExportService), customConditionList, (rs) =>
+ // {
+ // });
+ // return _taskid;
+ //}
///
/// F平台未结明细
///
///
///
- [HttpPost]
- [Route("HQHShippingExportService")]
- [DisableRequestSizeLimit]
- public async Task HQFShippingExportServiceMake(
- HQKanbanRequestDto input
- )
- {
- List customConditionList = new List();
- customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
- customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
- customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
- var _taskid = await _service.ExportEnqueueAsync("F平台未结明细", ExportExtentsion.Excel, input.Version, null, CurrentUser, typeof(HQFShippingExportService), customConditionList, (rs) =>
- {
- });
- return _taskid;
- }
+ //[HttpPost]
+ //[Route("HQHShippingExportService")]
+ //[DisableRequestSizeLimit]
+ //public async Task HQFShippingExportServiceMake(
+ // HQKanbanRequestDto input
+ // )
+ //{
+ // List customConditionList = new List();
+ // customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
+ // customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
+ // customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
+ // var _taskid = await _service.ExportEnqueueAsync("F平台未结明细", ExportExtentsion.Excel, input.Version, null, CurrentUser, typeof(HQFShippingExportService), customConditionList, (rs) =>
+ // {
+ // });
+ // return _taskid;
+ //}
///
/// M平台未明细
///
///
///
- [HttpPost]
- [Route("HQMShippingExportService")]
- [DisableRequestSizeLimit]
- public async Task HQMShippingExportServiceMake(
- HQKanbanRequestDto input
- )
- {
- List customConditionList = new List();
- customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
- customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
- customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
- var _taskid = await _service.ExportEnqueueAsync("M平台未明细", ExportExtentsion.Excel, input.Version, null, CurrentUser, typeof(HQMShippingExportService), customConditionList, (rs) =>
- {
- });
- return _taskid;
- }
-
-
-
- [HttpPost]
- [Route("FisUpdateExportService")]
- [DisableRequestSizeLimit]
- [UnitOfWork(isTransactional: false)]
- public async Task FisUpdateExportServiceMake(
- HQKanbanRequestDto input
- )
- {
- List customConditionList = new List();
- customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
- customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
- customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
- var _taskid = await _service.ExportEnqueueAsync("Fis发货数据更新状态", ExportExtentsion.Excel, input.Version, null, CurrentUser, typeof(FisUpdateExportService), customConditionList, (rs) =>
- {
- });
- return _taskid;
- }
-
+ //[HttpPost]
+ //[Route("HQMShippingExportService")]
+ //[DisableRequestSizeLimit]
+ //public async Task HQMShippingExportServiceMake(
+ // HQKanbanRequestDto input
+ // )
+ //{
+ // List customConditionList = new List();
+ // customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
+ // customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
+ // customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
+ // var _taskid = await _service.ExportEnqueueAsync("M平台未明细", ExportExtentsion.Excel, input.Version, null, CurrentUser, typeof(HQMShippingExportService), customConditionList, (rs) =>
+ // {
+ // });
+ // return _taskid;
+ //}
+ #endregion
-
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BT_Car/BT_Car_Platform.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BT_Car/BT_Car_Platform.cs
index 0916c151..2592adc9 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BT_Car/BT_Car_Platform.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BT_Car/BT_Car_Platform.cs
@@ -57,9 +57,9 @@ namespace Win.Sfs.SettleAccount.Entities.BT_Car
[Display(Name = "工厂")]
public string Factory { get; set; }
///
- ///外部看板编号
+ ///外部验收单号
///
- [Display(Name = "外部看板编号")]
+ [Display(Name = "外部验收单号")]
public string ExternalKanbanNumber { get; set; }
///
///看板编号
diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQCarSettledDetailDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQCarSettledDetailDapperRepository.cs
index a932e55c..c34a64ae 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQCarSettledDetailDapperRepository.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQCarSettledDetailDapperRepository.cs
@@ -89,7 +89,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" C.EstimateTypeDesc 物料组,\n" +
" C.MaterialDesc 物料描述,\n" +
" CONVERT ( VARCHAR ( 100 ), A.AcceptanceDate, 23 ) 验收单日期,\n" +
- " a.[AcceptanceNo] AS 结算验收单号,\n" +
+ " a.[ExternalKanbanNumber] AS 外部验收单号,\n" +
" ISNULL( A.Price, 0 ) 结算单价,\n" +
" ISNULL( A.Qty, 0 ) 结算数量,\n" +
" ISNULL( A.Price, 0 ) * ISNULL( A.Qty, 0 ) 结算金额,\n" +
@@ -230,7 +230,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" C.EstimateTypeDesc 物料组,\n" +
" C.MaterialDesc 物料描述,\n" +
" CONVERT ( VARCHAR ( 100 ), A.AcceptanceDate, 23 ) 验收单日期,\n" +
- " a.[AcceptanceNo] AS 结算验收单号,\n" +
+ " a.[ExternalKanbanNumber] AS 外部验收单号,\n" +
" ISNULL( A.Price, 0 ) 结算单价,\n" +
" ISNULL( A.Qty, 0 ) 结算数量,\n" +
" ISNULL( A.Price, 0 ) * ISNULL( A.Qty, 0 ) 结算金额,\n" +
@@ -341,7 +341,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public HQCarSettledDetailDiff(string sapMaterialCode, string materialCode, string materialDesc, decimal price,
string storageLocation, string storageLocationDesc, decimal selprice, decimal diffprice, decimal sumprice, decimal settleprice, decimal qty,
- decimal sockQty,string metarialGroup,string acceptanceNo,string acceptanceDate)
+ decimal sockQty,string metarialGroup,string externalKanbanNumber, string acceptanceDate)
{
SAP编码 = sapMaterialCode;
物料描述 = materialDesc;
@@ -356,7 +356,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
结算数量 = qty;
结算金额 = settleprice;
物料组 = metarialGroup;
- 结算验收单号 = acceptanceNo;
+ 外部验收单号 = externalKanbanNumber;
验收单日期 = acceptanceDate;
}
@@ -377,9 +377,12 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "验收单日期")]
public string 验收单日期 { set; get; }
- [ExporterHeader(DisplayName = "结算验收单号")]
+ [ExporterHeader(DisplayName = "结算验收单号",IsIgnore =true)]
public string 结算验收单号 { set; get; }
+ [ExporterHeader(DisplayName = "外部验收单号")]
+ public string 外部验收单号 { set; get; }
+
[ExporterHeader(DisplayName = "物料组")]
public string 物料组 { set; get; }
diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFactorySettledDetailDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFactorySettledDetailDapperRepository.cs
index 172a1e66..e6f2bdfa 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFactorySettledDetailDapperRepository.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQFactorySettledDetailDapperRepository.cs
@@ -44,88 +44,88 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
//}
string str = "SELECT\n" +
- " temp3.StorageLocation 收货仓库,\n" +
- " temp3.StorageLocationDesc 收货仓库描述,\n" +
- " temp3.HQHKanBan 订货看板编号,\n" +
- " temp3.AcceptanceNo 结算验收单号,\n" +
- " temp3.AcceptanceDate 验收单日期,\n" +
- " temp3.MaterialCode Sap编码,\n" +
- " temp3.hqMaterialCode 客户物料号,\n" +
- " temp3.EstimateTypeDesc 物料组,\n" +
- " temp3.MaterialDesc 零件中文名称,\n" +
- " isnull( TEMP2.Price, 0 ) AS 发货定价,\n" +
- " temp3.UnHQAmt 金额,\n" +
- " temp3.系统未结数量,\n" +
- " temp3.UnHQQty 红旗未结数量,\n" +
- " ( ISNULL( temp3.系统未结数量, 0 ) - ISNULL( temp3.UnHQQty, 0 ) ) 差异 \n" +
- "FROM\n" +
- " (\n" +
- " SELECT\n" +
- " * \n" +
- " FROM\n" +
- " (\n" +
- " SELECT\n" +
- " h.StorageLocation,\n" +
- " h.StorageLocationDesc,\n" +
- " h.HQHKanBan,\n" +
- " h.AcceptanceNo,\n" +
- " CONVERT ( VARCHAR ( 100 ), h.AcceptanceDate, 23 ) AcceptanceDate,\n" +
- " m.MaterialCode,\n" +
- " h.MaterialCode hqMaterialCode,\n" +
- " m.CustomerPartCode,\n" +
- " m.MaterialDesc,\n" +
- " m.EstimateTypeDesc,\n" +
- " ISNULL( h.Qty, 0 ) AS UnHQQty,\n" +
- " ISNULL( h.Amt, 0 ) AS UnHQAmt \n" +
- " FROM\n" +
- " (\n" +
- " SELECT SUM\n" +
- " ( Qty ) Qty,\n" +
- " Amt,\n" +
- " HQHKanBan,\n" +
- " StorageLocation,\n" +
- " StorageLocationDesc,\n" +
- " AcceptanceNo,\n" +
- " MaterialCode,\n" +
- " AcceptanceDate \n" +
- " FROM\n" +
- " Set_UnHQSettleAccount \n" +
- " GROUP BY\n" +
- " HQHKanBan,\n" +
- " StorageLocation,\n" +
- " StorageLocationDesc,\n" +
- " AcceptanceNo,\n" +
- " Amt,\n" +
- " MaterialCode,\n" +
- " AcceptanceDate \n" +
- " ) AS h\n" +
- " LEFT JOIN Set_material AS m ON h.MaterialCode = m.CustomerPartCode \n" +
- " ) AS unhq\n" +
- " LEFT JOIN (\n" +
- " SELECT\n" +
- " a.Kanban AS 订货看板编号,\n" +
- " b.MaterialCode AS 订货零件号,\n" +
- " c.MaterialCode Sap编码,\n" +
- " c.CustomerPartCode 客户物料号,\n" +
- " c.MaterialDesc AS 零件中文名称,\n" +
- " isnull( a.Qty, 0 ) AS 系统未结数量,\n" +
- " b.AcceptanceNo AS 结算验收单号,\n" +
- " C.EstimateTypeDesc AS 物料组 \n" +
- " FROM\n" +
- " ( SELECT SUM ( Qty ) Qty, Kanban, MaterialCode FROM Set_HQ_H_Kanban GROUP BY Kanban, MaterialCode ) AS a\n" +
- " LEFT OUTER JOIN ( SELECT * FROM Set_HQ_H_Platform WHERE HQHKanBan <> 'BJ' ) AS b ON a.Kanban = b.HQHKanBan \n" +
- " AND a.MaterialCode = b.MaterialCode\n" +
- " LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
- " WHERE\n" +
- " b.HQHKanBan IS NULL \n" +
- " AND b.MaterialCode IS NULL \n" +
- " ) AS temp1 ON unhq.HQHKanBan = temp1.[订货看板编号] \n" +
- " AND unhq.CustomerPartCode= temp1.客户物料号 -- WHERE\n" +
- "-- temp1.[订货看板编号] IS NULL\n" +
- "-- AND temp1.客户物料号 IS NULL\n" +
- " \n" +
- " ) temp3\n" +
- " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp3.MaterialCode = TEMP2.MaterialCode";
+ " temp3.StorageLocation 收货仓库,\n" +
+ " temp3.StorageLocationDesc 收货仓库描述,\n" +
+ " temp3.HQHKanBan 订货看板编号,\n" +
+ " temp3.ExternalKanbanNumber 外部验收单号,\n" +
+ " temp3.AcceptanceDate 验收单日期,\n" +
+ " temp3.MaterialCode Sap编码,\n" +
+ " temp3.hqMaterialCode 客户物料号,\n" +
+ " temp3.EstimateTypeDesc 物料组,\n" +
+ " temp3.MaterialDesc 零件中文名称,\n" +
+ " isnull( TEMP2.Price, 0 ) AS 发货定价,\n" +
+ " temp3.UnHQAmt 金额,\n" +
+ " temp3.系统未结数量,\n" +
+ " temp3.UnHQQty 红旗未结数量,\n" +
+ " ( ISNULL( temp3.系统未结数量, 0 ) - ISNULL( temp3.UnHQQty, 0 ) ) 差异 \n" +
+ "FROM\n" +
+ " (\n" +
+ " SELECT\n" +
+ " * \n" +
+ " FROM\n" +
+ " (\n" +
+ " SELECT\n" +
+ " h.StorageLocation,\n" +
+ " h.StorageLocationDesc,\n" +
+ " h.HQHKanBan,\n" +
+ " h.ExternalKanbanNumber,\n" +
+ " CONVERT ( VARCHAR ( 100 ), h.AcceptanceDate, 23 ) AcceptanceDate,\n" +
+ " m.MaterialCode,\n" +
+ " h.MaterialCode hqMaterialCode,\n" +
+ " m.CustomerPartCode,\n" +
+ " m.MaterialDesc,\n" +
+ " m.EstimateTypeDesc,\n" +
+ " ISNULL( h.Qty, 0 ) AS UnHQQty,\n" +
+ " ISNULL( h.Amt, 0 ) AS UnHQAmt \n" +
+ " FROM\n" +
+ " (\n" +
+ " SELECT SUM\n" +
+ " ( Qty ) Qty,\n" +
+ " Amt,\n" +
+ " HQHKanBan,\n" +
+ " StorageLocation,\n" +
+ " StorageLocationDesc,\n" +
+ " ExternalKanbanNumber,\n" +
+ " MaterialCode,\n" +
+ " AcceptanceDate \n" +
+ " FROM\n" +
+ " Set_UnHQSettleAccount \n" +
+ " GROUP BY\n" +
+ " HQHKanBan,\n" +
+ " StorageLocation,\n" +
+ " StorageLocationDesc,\n" +
+ " ExternalKanbanNumber,\n" +
+ " Amt,\n" +
+ " MaterialCode,\n" +
+ " AcceptanceDate \n" +
+ " ) AS h\n" +
+ " LEFT JOIN Set_material AS m ON h.MaterialCode = m.CustomerPartCode \n" +
+ " ) AS unhq\n" +
+ " LEFT JOIN (\n" +
+ " SELECT\n" +
+ " a.Kanban AS 订货看板编号,\n" +
+ " b.MaterialCode AS 订货零件号,\n" +
+ " c.MaterialCode Sap编码,\n" +
+ " c.CustomerPartCode 客户物料号,\n" +
+ " c.MaterialDesc AS 零件中文名称,\n" +
+ " isnull( a.Qty, 0 ) AS 系统未结数量,\n" +
+ " b.ExternalKanbanNumber AS 外部验收单号,\n" +
+ " C.EstimateTypeDesc AS 物料组 \n" +
+ " FROM\n" +
+ " ( SELECT SUM ( Qty ) Qty, Kanban, MaterialCode FROM Set_HQ_H_Kanban GROUP BY Kanban, MaterialCode ) AS a\n" +
+ " LEFT OUTER JOIN ( SELECT * FROM Set_HQ_H_Platform WHERE HQHKanBan <> 'BJ' ) AS b ON a.Kanban = b.HQHKanBan \n" +
+ " AND a.MaterialCode = b.MaterialCode\n" +
+ " LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
+ " WHERE\n" +
+ " b.HQHKanBan IS NULL \n" +
+ " AND b.MaterialCode IS NULL \n" +
+ " ) AS temp1 ON unhq.HQHKanBan = temp1.[订货看板编号] \n" +
+ " AND unhq.CustomerPartCode= temp1.客户物料号 -- WHERE\n" +
+ "-- temp1.[订货看板编号] IS NULL\n" +
+ "-- AND temp1.客户物料号 IS NULL\n" +
+ " \n" +
+ " ) temp3\n" +
+ " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp3.MaterialCode = TEMP2.MaterialCode";
var _sql = string.Format(str, condition);
@@ -163,88 +163,88 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
var sql10 = "SELECT DISTINCT\n" +
- " t1.* \n" +
- "FROM\n" +
- " (\n" +
- " SELECT\n" +
- " a.AcceptanceNo AS AcceptanceNo,\n" +
- " a.KanbanNumber AS KanbanNumber,\n" +
- " CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
- " HQHKanBan,\n" +
- " b2.MaterialCode \n" +
- " FROM\n" +
- " Set_UnHQSettleAccount a\n" +
- " LEFT JOIN Set_material b2 ON a.MaterialCode = b2.CustomerPartCode \n" +
- " WHERE\n" +
- " Version = '{0}' \n" +
- " AND HQHKanBan <> 'BJ' \n" +
- " ) t1\n" +
- " LEFT JOIN (\n" +
- " SELECT\n" +
- " HQHKanBan,\n" +
- " MaterialCode \n" +
- " FROM\n" +
- " Set_UnHQSettleAccount a \n" +
- " WHERE\n" +
- " Version = '{0}' \n" +
- " AND HQHKanBan <> 'BJ' \n" +
- " GROUP BY\n" +
- " HQHKanBan,\n" +
- " MaterialCode \n" +
- " HAVING\n" +
- " COUNT ( * ) > 1 \n" +
- " ) t2 ON t1.HQHKanBan = t2.HQHKanBan \n" +
- " AND t1.MaterialCode = t2.MaterialCode \n" +
- "WHERE\n" +
- " t2.HQHKanBan IS NULL";
+ " t1.* \n" +
+ "FROM\n" +
+ " (\n" +
+ " SELECT\n" +
+ " a.ExternalKanbanNumber AS ExternalKanbanNumber,\n" +
+ " a.KanbanNumber AS KanbanNumber,\n" +
+ " CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
+ " HQHKanBan,\n" +
+ " b2.MaterialCode \n" +
+ " FROM\n" +
+ " Set_UnHQSettleAccount a\n" +
+ " LEFT JOIN Set_material b2 ON a.MaterialCode = b2.CustomerPartCode \n" +
+ " WHERE\n" +
+ " Version = '{0}' \n" +
+ " AND HQHKanBan <> 'BJ' \n" +
+ " ) t1\n" +
+ " LEFT JOIN (\n" +
+ " SELECT\n" +
+ " HQHKanBan,\n" +
+ " MaterialCode \n" +
+ " FROM\n" +
+ " Set_UnHQSettleAccount a \n" +
+ " WHERE\n" +
+ " Version = '{0}' \n" +
+ " AND HQHKanBan <> 'BJ' \n" +
+ " GROUP BY\n" +
+ " HQHKanBan,\n" +
+ " MaterialCode \n" +
+ " HAVING\n" +
+ " COUNT ( * ) > 1 \n" +
+ " ) t2 ON t1.HQHKanBan = t2.HQHKanBan \n" +
+ " AND t1.MaterialCode = t2.MaterialCode \n" +
+ "WHERE\n" +
+ " t2.HQHKanBan IS NULL";
var list11 = DbConnection.Query(string.Format(sql10, version));
var sql11 = "SELECT DISTINCT\n" +
- " t1.* \n" +
- "FROM\n" +
- " (\n" +
- " SELECT\n" +
- " a.AcceptanceNo AS AcceptanceNo,\n" +
- " a.KanbanNumber AS KanbanNumber,\n" +
- " CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
- " HQHKanBan,\n" +
- " b2.MaterialCode \n" +
- " FROM\n" +
- " Set_UnHQSettleAccount a\n" +
- " LEFT JOIN Set_material b2 ON a.MaterialCode = b2.CustomerPartCode \n" +
- " WHERE\n" +
- " Version = '{0}' \n" +
- " AND HQHKanBan <> 'BJ' \n" +
- " ) t1\n" +
- " INNER JOIN (\n" +
- " SELECT\n" +
- " HQHKanBan,\n" +
- " MaterialCode \n" +
- " FROM\n" +
- " Set_UnHQSettleAccount a \n" +
- " WHERE\n" +
- " Version = '{0}' \n" +
- " AND HQHKanBan <> 'BJ' \n" +
- " GROUP BY\n" +
- " HQHKanBan,\n" +
- " MaterialCode \n" +
- " HAVING\n" +
- " COUNT ( * ) > 1 \n" +
- " ) t2 ON t1.HQHKanBan = t2.HQHKanBan \n" +
- " AND t1.MaterialCode = t2.MaterialCode \n" +
- "ORDER BY\n" +
- " t1.HQHKanBan,\n" +
- " t1.MaterialCode";
+" t1.* \n" +
+"FROM\n" +
+" (\n" +
+" SELECT\n" +
+" a.ExternalKanbanNumber AS ExternalKanbanNumber,\n" +
+" a.KanbanNumber AS KanbanNumber,\n" +
+" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
+" HQHKanBan,\n" +
+" b2.MaterialCode \n" +
+" FROM\n" +
+" Set_UnHQSettleAccount a\n" +
+" LEFT JOIN Set_material b2 ON a.MaterialCode = b2.CustomerPartCode \n" +
+" WHERE\n" +
+" Version = '{0}' \n" +
+" AND HQHKanBan <> 'BJ' \n" +
+" ) t1\n" +
+" INNER JOIN (\n" +
+" SELECT\n" +
+" HQHKanBan,\n" +
+" MaterialCode \n" +
+" FROM\n" +
+" Set_UnHQSettleAccount a \n" +
+" WHERE\n" +
+" Version = '{0}' \n" +
+" AND HQHKanBan <> 'BJ' \n" +
+" GROUP BY\n" +
+" HQHKanBan,\n" +
+" MaterialCode \n" +
+" HAVING\n" +
+" COUNT ( * ) > 1 \n" +
+" ) t2 ON t1.HQHKanBan = t2.HQHKanBan \n" +
+" AND t1.MaterialCode = t2.MaterialCode \n" +
+"ORDER BY\n" +
+" t1.HQHKanBan,\n" +
+" t1.MaterialCode";
var list12 = DbConnection.Query(string.Format(sql11, version));
var sql12 = "SELECT\n" +
- " a.AcceptanceNo AS AcceptanceNo,\n" +
+ " a.ExternalKanbanNumber AS ExternalKanbanNumber,\n" +
" a.KanbanNumber AS KanbanNumber,\n" +
" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
" HQHKanBan,\n" +
@@ -267,7 +267,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
first.KanbanNumber += "," + itm.KanbanNumber;
first.AcceptanceDate += "," + itm.AcceptanceDate;
- first.AcceptanceNo += "," + itm.AcceptanceNo;
+ first.ExternalKanbanNumber += "," + itm.ExternalKanbanNumber;
}
else
{
@@ -336,7 +336,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
//itm1.看板编号 = itmcopy.KanbanNumber;
itm1.验收单日期 = itmcopy.AcceptanceDate;
- itm1.结算验收单号 = itmcopy.AcceptanceNo;
+ itm1.外部验收单号 = itmcopy.ExternalKanbanNumber;
}
}
@@ -370,14 +370,14 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
condition += string.Format(" and a.LastModificationTime<='{0}' ", end);
}
-
+ //按照客户财务要求 去掉结算验收单号换成外部验收单号
string str = "SELECT\n" +
" temp1.交货单号,\n" +
" temp1.交货时间,\n" +
" temp1.收货仓库,\n" +
" temp1.收货仓库描述,\n" +
" temp1.订货看板编号,\n" +
- " temp1.结算验收单号,\n" +
+ " temp1.外部验收单号,\n" +
" temp1.Sap编码,\n" +
" temp1.[客户物料号],\n" +
" temp1.物料组,\n" +
@@ -398,7 +398,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" c.CustomerPartCode 客户物料号,\n" +
" c.MaterialDesc AS 零件中文名称,\n" +
" isnull( a.Qty, 0 ) AS 系统未结数量,\n" +
- " b.AcceptanceNo AS 结算验收单号,\n" +
+ " b.ExternalKanbanNumber AS 外部验收单号,\n" +
" C.EstimateTypeDesc AS 物料组 \n" +
" FROM\n" +
" ( SELECT SUM ( Qty ) AS Qty, Kanban, MaterialCode, WmsBillNum, LastModificationTime FROM Set_HQ_H_Kanban GROUP BY Kanban, MaterialCode, WmsBillNum, LastModificationTime ) AS a\n" +
@@ -410,7 +410,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" AND b.MaterialCode IS NULL {0}\n" +
" ) AS temp1\n" +
" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode\n" +
- " LEFT JOIN ( SELECT SUM(Qty) Qty, HQHKanBan, MaterialCode FROM Set_UnHQSettleAccount GROUP BY HQHKanBan, MaterialCode ) temp3 ON temp1.[订货看板编号] = temp3.HQHKanBan \n" +
+ " LEFT JOIN ( SELECT SUM ( Qty ) Qty, HQHKanBan, MaterialCode FROM Set_UnHQSettleAccount GROUP BY HQHKanBan, MaterialCode ) temp3 ON temp1.[订货看板编号] = temp3.HQHKanBan \n" +
" AND temp1.[客户物料号] = temp3.MaterialCode";
var _sql = string.Format(str, condition);
@@ -434,9 +434,12 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "订货看板编号")]
public string 订货看板编号 { set; get; }
- [ExporterHeader(DisplayName = "结算验收单号")]
+ [ExporterHeader(DisplayName = "结算验收单号", IsIgnore = true)]
public string 结算验收单号 { set; get; }
+ [ExporterHeader(DisplayName = "外部验收单号")]
+ public string 外部验收单号 { set; get; }
+
[ExporterHeader(DisplayName = "Sap编码")]
public string Sap编码 { set; get; }
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 e518bfdd..78d18374 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
@@ -23,7 +23,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public class CompareExtend1
{
- public string AcceptanceNo { set; get; }
+ public string ExternalKanbanNumber { set; get; }
public string KanbanNumber { set; get; }
public string AcceptanceDate { set; get; }
public string HQHKanBan { set; get; }
@@ -88,7 +88,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" temp1.零件中文名称,\n" +
" temp1.发货数量,\n" +
" temp1.发货状态,\n" +
- " temp1.结算验收单号,\n" +
+ " temp1.外部验收单号,\n" +
" temp1.结算数量,\n" +
" temp3.Price AS 结算单价,\n" +
" ( temp1.[结算数量] * ISNULL( temp3.Price, 0 ) ) AS 结算金额,\n" +
@@ -113,7 +113,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" c.MaterialDesc AS 零件中文名称,\n" +
" isnull( b.Qty, 0 ) AS 发货数量,\n" +
" 2 AS 发货状态,\n" +
- " a.[AcceptanceNo] AS 结算验收单号,\n" +
+ " a.[ExternalKanbanNumber] AS 外部验收单号,\n" +
" isnull( a.Qty, 0 ) AS 结算数量,\n" +
" C.EstimateTypeDesc AS 物料组,\n" +
" a.Factory AS 工厂,\n" +
@@ -129,7 +129,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" Factory,\n" +
- " AcceptanceNo \n" +
+ " ExternalKanbanNumber \n" +
" FROM\n" +
" Set_HQ_H_Platform \n" +
" GROUP BY\n" +
@@ -139,7 +139,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" Factory,\n" +
- " AcceptanceNo \n" +
+ " ExternalKanbanNumber \n" +
" ) AS a\n" +
" INNER JOIN ( SELECT SUM ( Qty ) AS Qty, Kanban, MaterialCode FROM Set_HQ_H_Kanban GROUP BY Kanban, MaterialCode ) AS b ON a.HQHKanBan = b.Kanban \n" +
" AND a.MaterialCode = b.MaterialCode\n" +
@@ -227,7 +227,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
"FROM\n" +
" (\n" +
" SELECT\n" +
- " a.AcceptanceNo AS AcceptanceNo,\n" +
+ " a.ExternalKanbanNumber AS ExternalKanbanNumber,\n" +
" a.KanbanNumber AS KanbanNumber,\n" +
" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
" HQHKanBan,\n" +
@@ -258,7 +258,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
"FROM\n" +
" (\n" +
" SELECT\n" +
- " a.AcceptanceNo AS AcceptanceNo,\n" +
+ " a.ExternalKanbanNumber AS ExternalKanbanNumber,\n" +
" a.KanbanNumber AS KanbanNumber,\n" +
" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
" HQHKanBan,\n" +
@@ -283,7 +283,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
var sql12 = "SELECT\n" +
- " a.AcceptanceNo AS AcceptanceNo,\n" +
+ " a.ExternalKanbanNumber AS ExternalKanbanNumber,\n" +
" a.KanbanNumber AS KanbanNumber,\n" +
" CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS AcceptanceDate,\n" +
" HQHKanBan,\n" +
@@ -308,7 +308,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
first.KanbanNumber +="," +itm.KanbanNumber;
first.AcceptanceDate += "," + itm.AcceptanceDate;
- first.AcceptanceNo += "," + itm.AcceptanceNo;
+ first.ExternalKanbanNumber += "," + itm.ExternalKanbanNumber;
}
else
{
@@ -377,7 +377,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
itm1.看板编号 = itmcopy.KanbanNumber;
itm1.验收单日期 = itmcopy.AcceptanceDate;
- itm1.结算验收单号 = itmcopy.AcceptanceNo;
+ itm1.外部验收单号 = itmcopy.ExternalKanbanNumber;
}
}
@@ -455,7 +455,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" c.MaterialDesc AS 零件中文名称,\n" +
" isnull( b.Qty, 0 ) AS 发货数量,\n" +
" isnull( b.State, 0 ) AS 发货状态,\n" +
- " a.AcceptanceNo AS 结算验收单号,\n" +
+ " a.ExternalKanbanNumber AS 外部验收单号,\n" +
" isnull( a.Qty, 0 ) AS 结算数量,\n" +
" isnull( a.Price, 0 ) AS 结算单价,\n" +
" isnull( a.Amt, 0 ) AS 结算金额 ,\n" +
@@ -518,7 +518,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" c.MaterialDesc AS 零件中文名称,\n" +
" 0 AS 发货数量,\n" +
" 0 AS 发货状态,\n" +
- " a.AcceptanceNo AS 结算验收单号,\n" +
+ " a.ExternalKanbanNumber AS 结算验收单号,\n" +
" isnull( a.Qty, 0 ) AS 结算数量,\n" +
" C.EstimateTypeDesc AS 物料组,\n" +
" a.Factory AS 工厂,\n" +
@@ -532,7 +532,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" Version,\n" +
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
- " Factory,AcceptanceNo \n" +
+ " Factory,ExternalKanbanNumber \n" +
" FROM\n" +
" Set_HQ_H_Platform \n" +
" WHERE\n" +
@@ -542,7 +542,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" Version,\n" +
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
- " Factory,AcceptanceNo \n" +
+ " Factory,ExternalKanbanNumber \n" +
" ) AS a\n" +
" LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
" WHERE\n" +
@@ -565,62 +565,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ) AS TEMP3 ON temp1.[结算物料代码] = TEMP3.MaterialCode \n" +
" ) ccc";
- //string str = "SELECT\n" +
- // " temp1.交货时间,\n" +
- // " isnull( temp1.手工或自动, '' ) 手工或自动,\n" +
- // " isnull( temp1.交货单号, '' ) 交货单号,\n" +
- // " temp1.[工厂],\n" +
- // " temp1.收货仓库,\n" +
- // " temp1.收货仓库描述,\n" +
- // " temp1.订货看板编号,\n" +
- // " temp1.订货零件号,\n" +
- // " temp1.验收单日期,\n" +
- // " temp1.Sap编码,\n" +
- // " temp1.看板编号,\n" +
- // " temp1.物料组,\n" +
- // " temp1.零件中文名称,\n" +
- // " temp1.发货数量,\n" +
- // " temp1.发货状态,\n" +
- // " temp1.结算验收单号,\n" +
- // " temp1.结算数量,\n" +
- // " temp1.结算单价,\n" +
- // " temp1.结算金额,\n" +
- // " isnull( TEMP2.Price, 0 ) AS 发货定价,\n" +
- // " isnull( temp1.发货数量, 0 ) * isnull( TEMP2.Price, 0 ) AS 发货总金额,\n" +
- // " 0 AS 数量差异,\n" +
- // " temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) AS 单价差异,\n" +
- // " ( temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" +
- // "FROM\n" +
- // " (\n" +
- // " SELECT\n" +
- // " b.WmsBillNum AS 交货单号,\n" +
- // " CONVERT ( VARCHAR ( 100 ), b.LastModificationTime, 23 ) AS 交货时间,\n" +
- // " b.IsAuto AS 手工或自动,\n" +
- // " a.StorageLocation AS 收货仓库,\n" +
- // " a.StorageLocationDesc AS 收货仓库描述,\n" +
- // " a.HQHKanBan AS 订货看板编号,\n" +
- // " a.MaterialCode AS 订货零件号,\n" +
- // " c.MaterialCode Sap编码,\n" +
- // " c.MaterialDesc AS 零件中文名称,\n" +
- // " isnull( b.Qty, 0 ) AS 发货数量,\n" +
- // " isnull( b.State, 0 ) AS 发货状态,\n" +
- // " a.AcceptanceNo AS 结算验收单号,\n" +
- // " isnull( a.Qty, 0 ) AS 结算数量,\n" +
- // " isnull( a.Price, 0 ) AS 结算单价,\n" +
- // " isnull( a.Amt, 0 ) AS 结算金额 ,\n" +
- // " C.EstimateTypeDesc AS 物料组,\n" +
- // " a.Factory AS 工厂,\n" +
- // " a.KanbanNumber AS 看板编号,\n" +
- // " CONVERT ( VARCHAR ( 100 ), a.AcceptanceDate, 23 ) AS 验收单日期 \n" +
- // " FROM\n" +
- // " Set_HQ_H_Platform AS a\n" +
- // " LEFT OUTER JOIN Set_HQ_H_Kanban AS b ON a.HQHKanBan = b.Kanban \n" +
- // " AND a.MaterialCode = b.MaterialCode\n" +
- // " LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
- // " WHERE\n" +
- // " a.HQHKanBan <>'BJ' AND a.Version= '{0}' \n" +
- // " ) AS temp1\n" +
- // " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode WHERE temp1.[交货单号] is null ";
+
var _sql = string.Format(str, version);
var _query = DbConnection.Query(_sql, null, null, true, 1200, null);
@@ -629,15 +574,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
}
- ///
- /// 反向对比,有发货无结算报表
- ///
- ///
- ///
- ///
- ///
- ///
- ///
+
+
public virtual List GetReverseSettledDetailDiffReportList(string version, string materialCode, string begin, string end, string materialGroup)
{
@@ -653,62 +591,124 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
{
condition += string.Format(" and a.LastModificationTime<='{0}' ", end);
}
-
+ //更改:按照财务要求,将有发货有结算中发货数量大于结算数据的数据整合到未结报表中20220324
string str = "SELECT\n" +
- " temp1.交货时间,\n" +
- " isnull( temp1.手工或自动, '' ) 手工或自动,\n" +
- " isnull( temp1.交货单号, '' ) 交货单号,\n" +
- " temp1.收货仓库,\n" +
- " temp1.收货仓库描述,\n" +
- " temp1.订货看板编号,\n" +
- " temp1.订货零件号,\n" +
- " temp1.Sap编码,\n" +
- " temp1.[客户物料号],\n" +
- " temp1.物料组,\n" +
- " temp1.零件中文名称,\n" +
- " temp1.发货数量,\n" +
- " temp1.发货状态,\n" +
- " temp1.结算验收单号,\n" +
- " temp1.结算数量,\n" +
- " temp1.结算单价,\n" +
- " temp1.结算金额,\n" +
- " 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" +
- "temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) AS 单价差异,\n" +
- "(temp1.结算单价 - ISNULL( TEMP2.Price, 0 )) * (isnull( temp1.发货数量, 0 )-isnull( tt.Qty, 0 )) AS 差异总金额 \n" +
+ " * \n" +
"FROM\n" +
" (\n" +
" SELECT\n" +
- " a.WmsBillNum AS 交货单号,\n" +
- " CONVERT ( VARCHAR ( 100 ), a.LastModificationTime, 23 ) AS 交货时间 ,\n" +
- " a.IsAuto AS 手工或自动,\n" +
- " b.StorageLocation AS 收货仓库,\n" +
- " b.StorageLocationDesc AS 收货仓库描述,\n" +
- " a.Kanban AS 订货看板编号,\n" +
- " b.MaterialCode AS 订货零件号,\n" +
- " c.MaterialCode Sap编码,\n" +
- " c.CustomerPartCode 客户物料号,\n" +
- " c.MaterialDesc AS 零件中文名称,\n" +
- " isnull( a.Qty, 0 ) AS 发货数量,\n" +
- " isnull( a.State, 0 ) AS 发货状态,\n" +
- " b.AcceptanceNo AS 结算验收单号,\n" +
- " isnull( b.Qty, 0 ) AS 结算数量,\n" +
- " isnull( b.Price, 0 ) AS 结算单价,\n" +
- " isnull( b.Amt, 0 ) AS 结算金额 ,\n" +
- " C.EstimateTypeDesc AS 物料组 \n" +
+ " temp1.交货时间,\n" +
+ " isnull( temp1.交货单号, '' ) 交货单号,\n" +
+ " temp1.收货仓库,\n" +
+ " temp1.收货仓库描述,\n" +
+ " temp1.订货看板编号,\n" +
+ " temp1.订货零件号,\n" +
+ " temp1.Sap编码,\n" +
+ " temp1.[客户物料号],\n" +
+ " temp1.物料组,\n" +
+ " temp1.零件中文名称,\n" +
+ " temp1.发货数量,\n" +
+ " temp1.发货状态,\n" +
+ " temp1.外部验收单号,\n" +
+ " temp1.结算数量,\n" +
+ " temp1.结算单价,\n" +
+ " temp1.结算金额,\n" +
+ " 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" +
+ " temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) AS 单价差异,\n" +
+ " ( temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) ) * ( isnull( temp1.发货数量, 0 ) - isnull( tt.Qty, 0 ) ) AS 差异总金额 \n" +
" FROM\n" +
- " Set_HQ_H_Kanban AS a\n" +
- " LEFT OUTER JOIN ( SELECT * FROM Set_HQ_H_Platform WHERE HQHKanBan <> 'BJ' ) AS b ON a.Kanban = b.HQHKanBan \n" +
- " AND a.MaterialCode = b.MaterialCode\n" +
- " LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
- " WHERE\n" +
- " b.HQHKanBan IS NULL \n" +
- " AND b.MaterialCode IS NULL {0}\n" +
- " ) AS temp1\n" +
- " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode \n" +
- " left join set_backQty tt on temp1.Sap编码 = tt.MaterialCode and temp1.订货看板编号 = tt.Code ";
+ " (\n" +
+ " SELECT\n" +
+ " a.WmsBillNum AS 交货单号,\n" +
+ " CONVERT ( VARCHAR ( 100 ), a.LastModificationTime, 23 ) AS 交货时间 ,\n" +
+ " b.StorageLocation AS 收货仓库,\n" +
+ " b.StorageLocationDesc AS 收货仓库描述,\n" +
+ " a.Kanban AS 订货看板编号,\n" +
+ " b.MaterialCode AS 订货零件号,\n" +
+ " c.MaterialCode Sap编码,\n" +
+ " c.CustomerPartCode 客户物料号,\n" +
+ " c.MaterialDesc AS 零件中文名称,\n" +
+ " isnull( a.Qty, 0 ) AS 发货数量,\n" +
+ " isnull( a.State, 0 ) AS 发货状态,\n" +
+ " b.ExternalKanbanNumber AS 外部验收单号,\n" +
+ " isnull( b.Qty, 0 ) AS 结算数量,\n" +
+ " isnull( b.Price, 0 ) AS 结算单价,\n" +
+ " isnull( b.Amt, 0 ) AS 结算金额 ,\n" +
+ " C.EstimateTypeDesc AS 物料组 \n" +
+ " FROM\n" +
+ " Set_HQ_H_Kanban AS a\n" +
+ " LEFT OUTER JOIN Set_HQ_H_Platform AS b ON a.Kanban = b.HQHKanBan \n" +
+ " AND a.MaterialCode = b.MaterialCode\n" +
+ " LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
+ " WHERE\n" +
+ " b.HQHKanBan IS NULL \n" +
+ " AND b.MaterialCode IS NULL {0}\n" +
+ " ) AS temp1\n" +
+ " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode\n" +
+ " LEFT JOIN set_backQty tt ON temp1.Sap编码 = tt.MaterialCode \n" +
+ " AND temp1.订货看板编号 = tt.Code \n" +
+ " ) UNION1 UNION ALL\n" +
+ "SELECT\n" +
+ " * \n" +
+ "FROM\n" +
+ " (\n" +
+ " SELECT\n" +
+ " temp1.交货时间,\n" +
+ " isnull( temp1.交货单号, '' ) 交货单号,\n" +
+ " temp1.收货仓库,\n" +
+ " temp1.收货仓库描述,\n" +
+ " temp1.订货看板编号,\n" +
+ " temp1.订货零件号,\n" +
+ " temp1.Sap编码,\n" +
+ " temp1.[客户物料号],\n" +
+ " temp1.物料组,\n" +
+ " temp1.零件中文名称,\n" +
+ " temp1.发货数量,\n" +
+ " temp1.发货状态,\n" +
+ " temp1.外部验收单号,\n" +
+ " temp1.结算数量,\n" +
+ " temp1.结算单价,\n" +
+ " temp1.结算金额,\n" +
+ " 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 ) AS 数量差异,\n" +
+ " temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) AS 单价差异,\n" +
+ " ( temp1.结算单价 - ISNULL( TEMP2.Price, 0 ) ) * ( isnull( temp1.发货数量, 0 ) - isnull( tt.Qty, 0 ) ) AS 差异总金额 \n" +
+ " FROM\n" +
+ " (\n" +
+ " SELECT\n" +
+ " a.WmsBillNum AS 交货单号,\n" +
+ " CONVERT ( VARCHAR ( 100 ), a.LastModificationTime, 23 ) AS 交货时间 ,\n" +
+ " '' AS 收货仓库,\n" +
+ " '' AS 收货仓库描述,\n" +
+ " a.Kanban AS 订货看板编号,\n" +
+ " b.MaterialCode AS 订货零件号,\n" +
+ " c.MaterialCode Sap编码,\n" +
+ " c.CustomerPartCode 客户物料号,\n" +
+ " c.MaterialDesc AS 零件中文名称,\n" +
+ " isnull( a.Qty, 0 ) AS 发货数量,\n" +
+ " 0 AS 发货状态,\n" +
+ " '' AS 外部验收单号,\n" +
+ " isnull( b.Qty, 0 ) AS 结算数量,\n" +
+ " 0 AS 结算单价,\n" +
+ " 0 AS 结算金额 ,\n" +
+ " C.EstimateTypeDesc AS 物料组 \n" +
+ " FROM\n" +
+ " ( SELECT SUM ( Qty ) Qty, Kanban, MaterialCode, WmsBillNum, LastModificationTime FROM Set_HQ_H_Kanban GROUP BY kanban, MaterialCode, WmsBillNum, LastModificationTime ) AS a\n" +
+ " INNER JOIN ( SELECT SUM ( Qty ) Qty, HQHKanBan, MaterialCode FROM Set_HQ_H_Platform GROUP BY HQHKanBan, MaterialCode ) AS b ON a.Kanban = b.HQHKanBan \n" +
+ " AND a.MaterialCode = b.MaterialCode\n" +
+ " LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
+ " WHERE\n" +
+ " a.Qty> b.Qty {0}\n" +
+ " ) AS temp1\n" +
+ " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode\n" +
+ " LEFT JOIN set_backQty tt ON temp1.Sap编码 = tt.MaterialCode \n" +
+ " AND temp1.订货看板编号 = tt.Code \n" +
+ " ) UNION2";
var _sql = string.Format(str, condition);
var _query = DbConnection.Query(_sql, null, null, true, 1200, null);
@@ -718,126 +718,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
}
- /////
- ///// 反向对比,有发货无结算报表
- /////
- /////
- /////
- /////
- /////
- /////
- /////
- //public virtual List GetReverseSettledDetailDiffReportList(string version, string materialCode, string begin, string end, string materialGroup)
- //{
-
- // List _list = new List();
-
- // string condition = " ";
-
- // string str = "SELECT\n" +
- // " isnull( temp1.交货单号, '' ) 交货单号,\n" +
- // " temp1.交货时间,\n" +
- // " isnull( temp1.手工或自动, '' ) 手工或自动,\n" +
- // " temp1.[工厂],\n" +
- // " temp1.收货仓库,\n" +
- // " temp1.收货仓库描述,\n" +
- // " temp1.订货看板编号,\n" +
- // " temp1.订货零件号,\n" +
- // " temp1.验收单日期,\n" +
- // " temp1.Sap编码,\n" +
- // " temp1.看板编号,\n" +
- // " temp1.物料组,\n" +
- // " temp1.零件中文名称,\n" +
- // " temp1.发货数量,\n" +
- // " temp1.发货状态,\n" +
- // " temp1.结算验收单号,\n" +
- // " temp1.结算数量,\n" +
- // " temp3.Price AS 结算单价,\n" +
- // " ( temp1.[结算数量] * ISNULL( temp3.Price, 0 ) ) AS 结算金额,\n" +
- // " isnull( TEMP2.Price, 0 ) AS 发货定价,\n" +
- // " isnull( temp1.发货数量, 0 ) * isnull( TEMP2.Price, 0 ) AS 发货总金额,\n" +
- // " ( isnull( temp1.发货数量, 0 ) - isnull( temp1.[结算数量], 0 ) ) AS 数量差异,\n" +
- // " ISNULL( temp3.Price, 0 ) - ISNULL( TEMP2.Price, 0 ) AS 单价差异,\n" +
- // " ( ISNULL( temp3.Price, 0 ) - ISNULL( TEMP2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" +
- // "FROM\n" +
- // " (\n" +
- // " SELECT\n" +
- // " '' AS 交货单号,\n" +
- // " NULL AS 交货时间,\n" +
- // " '' AS 手工或自动,\n" +
- // " b.StorageLocation AS 收货仓库,\n" +
- // " b.StorageLocationDesc AS 收货仓库描述,\n" +
- // " a.Kanban AS 订货看板编号,\n" +
- // " a.MaterialCode AS 订货零件号,\n" +
- // " c.MaterialCode Sap编码,\n" +
- // " a.MaterialCode 结算物料代码,\n" +
- // " c.MaterialDesc AS 零件中文名称,\n" +
- // " isnull( a.Qty, 0 ) AS 发货数量,\n" +
- // " 0 AS 发货状态,\n" +
- // " '' AS 结算验收单号,\n" +
- // " isnull( b.Qty, 0 ) AS 结算数量,\n" +
- // " C.EstimateTypeDesc AS 物料组,\n" +
- // " b.Factory AS 工厂,\n" +
- // " '' AS 看板编号,\n" +
- // " '' AS 验收单日期 \n" +
- // " FROM\n" +
- // " (\n" +
- // " SELECT SUM ( Qty ) AS Qty, Kanban, MaterialCode FROM Set_HQ_H_Kanban GROUP BY Kanban, MaterialCode\n" +
- // " ) AS a\n" +
- // " LEFT JOIN \n" +
- // " ( \n" +
- // " SELECT SUM\n" +
- // " ( Qty ) AS Qty,\n" +
- // " HQHKanBan,\n" +
- // " MaterialCode,\n" +
- // " Version,\n" +
- // " StorageLocation,\n" +
- // " StorageLocationDesc,\n" +
- // " Factory \n" +
- // " FROM\n" +
- // " Set_HQ_H_Platform WHERE HQHKanBan <> 'BJ'\n" +
- // " GROUP BY\n" +
- // " HQHKanBan,\n" +
- // " MaterialCode,\n" +
- // " Version,\n" +
- // " StorageLocation,\n" +
- // " StorageLocationDesc,\n" +
- // " Factory\n" +
- // " \n" +
- // " ) AS b \n" +
- // " ON a.Kanban = b.HQHKanBan \n" +
- // " AND a.MaterialCode = b.MaterialCode\n" +
- // " LEFT OUTER JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
- // " WHERE\n" +
- // " b.HQHKanBan is NULL \n" +
- // " AND b.MaterialCode is NULL \n" +
- // " ) AS temp1\n" +
- // " LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) FROM Set_PriceList ) ) ) AS TEMP2 ON temp1.Sap编码 = TEMP2.MaterialCode\n" +
- // " LEFT JOIN (\n" +
- // " SELECT SUM\n" +
- // " ( Amt ) / SUM ( Qty ) AS Price,\n" +
- // " HQHKanBan,\n" +
- // " MaterialCode,\n" +
- // " Version \n" +
- // " FROM\n" +
- // " Set_HQ_H_Platform \n" +
- // " WHERE\n" +
- // " HQHKanBan <> 'BJ' \n" +
- // " GROUP BY\n" +
- // " HQHKanBan,\n" +
- // " MaterialCode,\n" +
- // " Version \n" +
- // " ) AS TEMP3 ON temp1.[结算物料代码] = TEMP3.MaterialCode \n" +
- // " AND temp1.订货看板编号 = TEMP3.HQHKanBan";
- // var _sql = string.Format(str, version, condition);
-
- // var _query = DbConnection.Query(_sql, null, null, true, 1200, null);
-
-
-
- // return _list;
-
- //}
+
public virtual List GetDiffQtyList(string version)
@@ -901,7 +782,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" C.EstimateTypeDesc 物料组,\n" +
" C.MaterialCode Sap编码,\n" +
" C.MaterialDesc 零件中文名称,\n" +
- " a.[AcceptanceNo] AS 结算验收单号,\n" +
+ " a.[ExternalKanbanNumber] AS 外部验收单号,\n" +
" a.Factory AS 工厂,\n" +
" a.HQHKanBan AS 订货看板编号,\n" +
" a.AcceptanceDate 验收单日期,\n" +
@@ -915,7 +796,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" Factory,\n" +
- " AcceptanceNo,\n" +
+ " ExternalKanbanNumber,\n" +
" Price,\n" +
" HQHKanBan,\n" +
" CONVERT ( VARCHAR ( 100 ), AcceptanceDate, 23 ) AcceptanceDate \n" +
@@ -930,7 +811,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" StorageLocation,\n" +
" StorageLocationDesc,\n" +
" Factory,\n" +
- " AcceptanceNo,\n" +
+ " ExternalKanbanNumber,\n" +
" Price,\n" +
" HQHKanBan,\n" +
" AcceptanceDate \n" +
@@ -939,51 +820,6 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ) temp1\n" +
" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) AS Expr1 FROM Set_PriceList ) ) ) AS temp2 ON temp1.Sap编码 = temp2.MaterialCode";
-
- //string str = "SELECT\n" +
- //" temp1.*,\n" +
- //" isnull( temp2.Price, 0 ) 销售单价,\n" +
- //" ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) 价格差异,\n" +
- //" ( isnull( temp1.结算单价, 0 ) - isnull( temp2.Price, 0 ) ) * temp1.结算数量 AS 差异总金额 \n" +
- //"FROM\n" +
- //" (\n" +
- //" SELECT\n" +
- //" ISNULL( A.Price, 0 ) 结算单价,\n" +
- //" ISNULL( A.Qty, 0 ) 结算数量,\n" +
- //" ISNULL( A.Price, 0 ) * ISNULL( A.Qty, 0 ) 结算金额,\n" +
- //" A.MaterialCode 结算物料号,\n" +
- //" A.StorageLocation 收货仓库,\n" +
- //" A.StorageLocationDesc 收货仓库描述,\n" +
- //" a.[AcceptanceNo] AS 结算验收单号,\n" +
- //" C.EstimateTypeDesc 物料组,\n" +
- //" C.MaterialCode Sap编码,\n" +
- //" C.MaterialDesc 零件中文名称,\n" +
- //" 0 寄销库数量 \n" +
- //" FROM\n" +
- //" (\n" +
- //" SELECT\n" +
- //" Price,\n" +
- //" SUM ( Qty ) Qty,\n" +
- //" MaterialCode,\n" +
- //" StorageLocation,\n" +
- //" StorageLocationDesc,\n" +
- //" AcceptanceNo \n" +
- //" FROM\n" +
- //" Set_HQ_H_Platform \n" +
- //" WHERE\n" +
- //" version = '{0}' \n" +
- //" AND HQHKanBan = 'BJ' \n" +
- //" GROUP BY\n" +
- //" MaterialCode,\n" +
- //" StorageLocation,\n" +
- //" StorageLocationDesc,\n" +
- //" price,\n" +
- //" AcceptanceNo \n" +
- //" ) A\n" +
- //" LEFT JOIN Set_material AS c ON a.MaterialCode = c.CustomerPartCode \n" +
- //" ) temp1\n" +
- //" LEFT OUTER JOIN ( SELECT Price, MaterialCode FROM Set_PriceList WHERE ( Version = ( SELECT MAX ( Version ) AS Expr1 FROM Set_PriceList ) ) ) AS temp2 ON temp1.Sap编码 = temp2.MaterialCode";
- // var _sql = string.Format(str, version, condition);
var _sql = string.Format(str, version);
var _query = DbConnection.Query(_sql, null, null, true, 1200, null);
@@ -1198,8 +1034,12 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
public decimal 发货数量 { set; get; }
[ExporterHeader(DisplayName = "发货状态")]
public string 发货状态 { set; get; }
- [ExporterHeader(DisplayName = "结算验收单号")]
+
+ [ExporterHeader(DisplayName = "结算验收单号",IsIgnore =true)]
public string 结算验收单号 { set; get; }
+
+ [ExporterHeader(DisplayName = "外部验收单号")]
+ public string 外部验收单号 { set; get; }
[ExporterHeader(DisplayName = "结算数量")]
public decimal 结算数量 { set; get; }
[ExporterHeader(DisplayName = "结算单价")]
@@ -1266,9 +1106,12 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "验收单日期")]
public string 验收单日期 { set; get; }
- [ExporterHeader(DisplayName = "结算验收单号")]
+ [ExporterHeader(DisplayName = "结算验收单号",IsIgnore =true)]
public string 结算验收单号 { set; get; }
+ [ExporterHeader(DisplayName = "外部验收单号")]
+ public string 外部验收单号 { set; get; }
+
[ExporterHeader(DisplayName = "发货数量")]
public decimal 发货数量 { set; get; }
[ExporterHeader(DisplayName = "发货状态", IsIgnore = true)]