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] =?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();
+ }
+ }