Browse Source

日常提交

FoShanPG
44673626 3 years ago
parent
commit
f418337760
  1. 12
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/TaskListDto.cs
  2. 4
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs
  3. 2
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs
  4. 1
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs
  5. 24
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs
  6. 16
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQCarSettledDetailDiffExportService.cs
  7. 38
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSettledDetailDiffExportService.cs
  8. 34
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSharePartSettledDetailDiffExportService.cs
  9. 18
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleSparePart90ExportService.cs

12
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/TaskListDto.cs

@ -185,7 +185,7 @@ namespace Win.Sfs.SettleAccount.Entities
[ExporterHeader(DisplayName = "结算数量")] [ExporterHeader(DisplayName = "结算数量")]
public decimal Qty { set; get; } public decimal Qty { set; get; }
[ImporterHeader(Name = "寄售库存数量", IsIgnore = true)] [ImporterHeader(Name = "寄售库存数量", IsIgnore = true)]
[ExporterHeader(DisplayName = "寄售库存数量", IsIgnore = true)] [ExporterHeader(DisplayName = "寄售库存数量")]
public decimal SockQty { set; get; } public decimal SockQty { set; get; }
[ImporterHeader(Name = "真实数量", IsIgnore = true)] [ImporterHeader(Name = "真实数量", IsIgnore = true)]
@ -272,7 +272,7 @@ namespace Win.Sfs.SettleAccount.Entities
[ExporterHeader(DisplayName = "任务代码", IsIgnore = true)] [ExporterHeader(DisplayName = "任务代码", IsIgnore = true)]
public Guid TaskId { set; get; } public Guid TaskId { set; get; }
[ExporterHeader(DisplayName = "寄销库数量", IsIgnore = true)] [ExporterHeader(DisplayName = "寄销库数量")]
public decimal StockQty { set; get; } public decimal StockQty { set; get; }
[ExporterHeader(DisplayName = "出库数量", IsIgnore = true)] [ExporterHeader(DisplayName = "出库数量", IsIgnore = true)]
@ -288,7 +288,7 @@ namespace Win.Sfs.SettleAccount.Entities
/// <summary> /// <summary>
/// 大众备件手工出库单 /// 大众备件手工出库单,带条码号
/// </summary> /// </summary>
public class WmsSharePart90OutPutDetialDto public class WmsSharePart90OutPutDetialDto
{ {
@ -400,7 +400,7 @@ namespace Win.Sfs.SettleAccount.Entities
[ExporterHeader(DisplayName = "结算数量")] [ExporterHeader(DisplayName = "结算数量")]
public decimal Qty { set; get; } public decimal Qty { set; get; }
[ImporterHeader(Name = "寄售库存数量", IsIgnore = true)] [ImporterHeader(Name = "寄售库存数量", IsIgnore = true)]
[ExporterHeader(DisplayName = "寄售库存数量", IsIgnore = true)] [ExporterHeader(DisplayName = "寄售库存数量")]
public decimal SockQty { set; get; } public decimal SockQty { set; get; }
[ImporterHeader(Name = "真实数量", IsIgnore = true)] [ImporterHeader(Name = "真实数量", IsIgnore = true)]
@ -454,7 +454,7 @@ namespace Win.Sfs.SettleAccount.Entities
[ExporterHeader(DisplayName = "结算数量")] [ExporterHeader(DisplayName = "结算数量")]
public decimal Qty { set; get; } public decimal Qty { set; get; }
[ImporterHeader(Name = "寄售库存数量", IsIgnore = true)] [ImporterHeader(Name = "寄售库存数量", IsIgnore = true)]
[ExporterHeader(DisplayName = "寄售库存数量", IsIgnore = true)] [ExporterHeader(DisplayName = "寄售库存数量")]
public decimal SockQty { set; get; } public decimal SockQty { set; get; }
[ImporterHeader(Name = "真实数量", IsIgnore = true)] [ImporterHeader(Name = "真实数量", IsIgnore = true)]
@ -494,7 +494,7 @@ namespace Win.Sfs.SettleAccount.Entities
//交货单号 //交货单号
[ImporterHeader(Name = "寄销库数量", IsIgnore = true)] [ImporterHeader(Name = "寄销库数量", IsIgnore = true)]
[ExporterHeader(DisplayName = "寄销库数量", IsIgnore = true)] [ExporterHeader(DisplayName = "寄销库数量")]
public decimal StockQty { set; get; } public decimal StockQty { set; get; }
[ImporterHeader(Name = "出库数量", IsIgnore = true)] [ImporterHeader(Name = "出库数量", IsIgnore = true)]

4
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs

@ -226,11 +226,11 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart
switch (input.FileType) switch (input.FileType)
{ {
case 0: case 0:
_fileName = string.Format("大众备件结算明细_{0}.csv", input.UserId.ToString()); _fileName = string.Format("大众备件结算调整_{0}.csv", input.UserId.ToString());
result = await _csv.ExportAsByteArray(dtoDetails); result = await _csv.ExportAsByteArray(dtoDetails);
break; break;
case 1: case 1:
_fileName = string.Format("大众备件结算明细_{0}.xlsx", input.UserId.ToString()); _fileName = string.Format("大众备件结算调整_{0}.xlsx", input.UserId.ToString());
result = await _excel.ExportAsByteArray(dtoDetails); result = await _excel.ExportAsByteArray(dtoDetails);
break; break;
} }

2
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHKanbanAppService.cs

@ -578,7 +578,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
IExporter _excel = new ExcelExporter(); IExporter _excel = new ExcelExporter();
byte[] result = null; 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); result = await _excel.ExportAsByteArray(entities);

1
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs

@ -465,6 +465,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
_lsCopy.Add(_detail); _lsCopy.Add(_detail);
} }
_lst.AddRange(_lsCopy.ToArray()); _lst.AddRange(_lsCopy.ToArray());
//检验3:导入模板中的SAP编号不能重复,按其汇总出库 //检验3:导入模板中的SAP编号不能重复,按其汇总出库
var _isRepeatOfReportList = _lst.GroupBy(x => new { x.MaterialCode, x.Version }).Select(p => new { Count = p.Count(), MaterialCode = p.Key.MaterialCode }); 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) foreach (var itm in _isRepeatOfReportList)

24
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQKBOutputAppService.cs

@ -249,7 +249,6 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
// return await ExportErrorReportAsync(checkList); // return await ExportErrorReportAsync(checkList);
// } // }
//} //}
var _billNum = "HQKB" + DateTime.Now.ToString("yyyyMMddhhmmss");
//var _list = _dapper.GetNoKanbanSettleDetail(input.Version); //var _list = _dapper.GetNoKanbanSettleDetail(input.Version);
@ -261,8 +260,8 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
{ {
throw new BusinessException("导入模板数据不能为空!"); throw new BusinessException("导入模板数据不能为空!");
} }
//物料号不能为空 //物料号不能为空,直接过滤掉,模板的中看不到有空行的情况,但是通过个IE这个插件发现有空行数据导入
var _list = _listOrgin.Where(p => p.SapMaterialCode != ""); var _list = _listOrgin.Where(p =>!string.IsNullOrEmpty(p.SapMaterialCode));
foreach (var itm in _list) foreach (var itm in _list)
{ {
@ -271,10 +270,6 @@ 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)); 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) foreach (var itm in _list)
{ {
@ -291,7 +286,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
//翻译一下是否备件 //翻译一下是否备件
foreach (var itm in _list) foreach (var itm in _list)
{ {
if (itm.IsBack == "是") if (itm.IsBack.Trim() == "是")
{ {
itm.IsBack = "1"; itm.IsBack = "1";
} }
@ -300,6 +295,17 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
itm.IsBack = "0"; 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 stockList = _wmsDapper.GetSalesStock();
var query = from itm in _list var query = from itm in _list
@ -456,7 +462,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
/// 导出 /// 导出
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>7
[HttpPost] [HttpPost]
[Route("Export")] [Route("Export")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]

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

@ -117,14 +117,14 @@ namespace SettleAccount.Job.Services.Report
//} //}
if (!string.IsNullOrEmpty(warehouseDesc)) //if (!string.IsNullOrEmpty(warehouseDesc))
{ //{
var _groupList = warehouseDesc.Split(new char[] { '\n' }).Distinct().ToList(); // var _groupList = warehouseDesc.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0) // 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(materialGroup))
{ {

38
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQHSettledDetailDiffExportService.cs

@ -76,6 +76,7 @@ namespace SettleAccount.Job.Services.Report
_first. = itm.; _first. = itm.;
} }
} }
//订货看板编号
if (!string.IsNullOrEmpty(kanban)) if (!string.IsNullOrEmpty(kanban))
{ {
var _groupList = kanban.Split(new char[] { '\n' }).Distinct().ToList(); 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(); _ls = _ls.Where(p => _groupList.Contains(p.)).ToList();
} }
} }
if (!string.IsNullOrEmpty(warehouseDesc)) //if (!string.IsNullOrEmpty(warehouseDesc))
{ //{
var _groupList = warehouseDesc.Split(new char[] { '\n' }).Distinct().ToList(); // var _groupList = warehouseDesc.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0) // if (_groupList.Count() > 0)
{ // {
_ls = _ls.Where(p => _groupList.Contains(p.)).ToList(); // _ls = _ls.Where(p => _groupList.Contains(p.收货仓库描述)).ToList();
} // }
} //}
if (!string.IsNullOrEmpty(acceptNo)) //if (!string.IsNullOrEmpty(acceptNo))
{ //{
var _groupList = acceptNo.Split(new char[] { '\n' }).Distinct().ToList(); // var _groupList = acceptNo.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0) // 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(materialGroup))
{ {
var _groupList = materialGroup.Split(new char[] { ',' }).Distinct().ToList(); 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(); _ls = _ls.Where(p => _groupList.Contains(p.)).ToList();
} }
} }
//发货零件号
if (!string.IsNullOrEmpty(materialCode)) if (!string.IsNullOrEmpty(materialCode))
{ {
var _groupList = materialCode.Split(new char[] { '\n' }).Distinct().ToList(); 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(); _ls = _ls.Where(p => _groupList.Contains(p.)).ToList();
} }
} }
//厂内物料号
if (!string.IsNullOrEmpty(sapCode)) if (!string.IsNullOrEmpty(sapCode))
{ {
var _groupList = sapCode.Split(new char[] { '\n' }).Distinct().ToList(); var _groupList = sapCode.Split(new char[] { '\n' }).Distinct().ToList();

34
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(); var _groupList = kanban.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0) if (_groupList.Count() > 0)
{ {
_ls = _ls.Where(p => _groupList.Contains(p.)).ToList(); _ls = _ls.Where(p => _groupList.Contains(p.)).ToList();
} }
} }
if (!string.IsNullOrEmpty(warehouseDesc)) //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[] { ',' }).Distinct().ToList(); // var _groupList = warehouseDesc.Split(new char[] { '\n' }).Distinct().ToList();
// if (_groupList.Count() > 0) // 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) // 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)) if (!string.IsNullOrEmpty(materialCode))
{ {
var _groupList = materialCode.Split(new char[] { '\n' }).Distinct().ToList(); var _groupList = materialCode.Split(new char[] { '\n' }).Distinct().ToList();

18
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(); // _ls = _ls.Where(p => _groupList.Contains(p.物料代码)).ToList();
// } // }
//} //}
//if (!string.IsNullOrEmpty(purchaseOrderNo))
//{ //采购订单号
// var _groupList = purchaseOrderNo.Split(new char[] { '\n' }).Distinct().ToList(); if (!string.IsNullOrEmpty(purchaseOrderNo))
// if (_groupList.Count() > 0) {
// { var _groupList = purchaseOrderNo.Split(new char[] { '\n' }).Distinct().ToList();
// _ls = _ls.Where(p => _groupList.Contains(p.采购订单号)).ToList(); if (_groupList.Count() > 0)
// } {
//} _ls = _ls.Where(p => _groupList.Contains(p.)).ToList();
}
}

Loading…
Cancel
Save