Browse Source

备件报表

FoShanPG
44673626 3 years ago
parent
commit
6e1bcee252
  1. 6675
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Logs/log-20220111.txt
  2. 21
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs
  3. 23
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs
  4. 21
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQCarAppService.cs
  5. 21
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs
  6. 49
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs
  7. 2
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  8. 2
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQMSettledDetailDapperRepository.cs

6675
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Logs/log-20220111.txt

File diff suppressed because one or more lines are too long

21
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs

@ -136,6 +136,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("WmsSharePartDetailList")] [Route("WmsSharePartDetailList")]
[UnitOfWork(false)]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WmsHQFSharePartOutPutDetial>> GetListAsync(WmsSharePartOutPutDetialRequestDto input) virtual public async Task<PagedResultDto<WmsHQFSharePartOutPutDetial>> GetListAsync(WmsSharePartOutPutDetialRequestDto input)
{ {
@ -168,7 +169,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
itm.TaskId, itm.TaskId,
itm.Remark, itm.Remark,
itm.Qty, itm.Qty,
tm1.Qty tm1 == null ? 0 : tm1.Qty
); );
return new PagedResultDto<WmsHQFSharePartOutPutDetial>(totalCount, entities); return new PagedResultDto<WmsHQFSharePartOutPutDetial>(totalCount, entities);
} }
@ -212,7 +213,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{ {
string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename; string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename;
ExcelHelper _excelHelper = new ExcelHelper(fileSavePath); ExcelHelper _excelHelper = new ExcelHelper(fileSavePath);
var _list = _excelHelper.ExcelToList<HQFSharePartSettledDetailDiff>(); var _list = _excelHelper.ExcelToList<WmsHQFSharePartOutPutDetial>();
if (_list.Count() > 0) if (_list.Count() > 0)
{ {
var _lsAry = _list.Select(p => new var _lsAry = _list.Select(p => new
@ -220,21 +221,21 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
GuidGenerator.Create(), GuidGenerator.Create(),
"", "",
string.Empty, string.Empty,
p., p.MaterialCode,
p., p.MaterialDesc,
p., p.MaterialGroup,
string.Empty, string.Empty,
string.Empty, string.Empty,
0, 0,
string.Empty, p.Extend1,
string.Empty, p.Extend2,
input.Version, input.Version,
p.Sap编码, string.Empty,
_billNum, _billNum,
GuidGenerator.Create(), GuidGenerator.Create(),
string.Empty, string.Empty,
p. p.Qty,
,0 p.StockQty
)); ));
_lst.AddRange(_lsAry.ToArray()); _lst.AddRange(_lsAry.ToArray());
} }

23
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQHSharePartAppService.cs

@ -137,6 +137,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("WmsSharePartDetailList")] [Route("WmsSharePartDetailList")]
[UnitOfWork(false)]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WmsHQHSharePartOutPutDetial>> GetListAsync(WmsSharePartOutPutDetialRequestDto input) virtual public async Task<PagedResultDto<WmsHQHSharePartOutPutDetial>> GetListAsync(WmsSharePartOutPutDetialRequestDto input)
{ {
@ -154,7 +155,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
join itm1 in stockList on itm.MaterialCode equals itm1.SapCode join itm1 in stockList on itm.MaterialCode equals itm1.SapCode
into temp1 into temp1
from tm1 in temp1.DefaultIfEmpty() from tm1 in temp1.DefaultIfEmpty()
select new WmsHQHSharePartOutPutDetial( select new WmsHQHSharePartOutPutDetial(//少加个发货,由于零件有重复
itm.Id, itm.Id,
itm.WmsBillNum, itm.WmsBillNum,
itm.OrderBillNum, itm.OrderBillNum,
@ -172,7 +173,7 @@ into temp1
itm.TaskId, itm.TaskId,
itm.Remark, itm.Remark,
itm.Qty, itm.Qty,
tm1.Qty tm1 == null ? 0 : tm1.Qty
); );
@ -220,7 +221,7 @@ into temp1
{ {
string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename; string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename;
ExcelHelper _excelHelper = new ExcelHelper(fileSavePath); ExcelHelper _excelHelper = new ExcelHelper(fileSavePath);
var _list = _excelHelper.ExcelToList<HQFSharePartSettledDetailDiff>(); var _list = _excelHelper.ExcelToList<WmsHQHSharePartOutPutDetial>();
if (_list.Count() > 0) if (_list.Count() > 0)
{ {
var _lsAry = _list.Select(p => new var _lsAry = _list.Select(p => new
@ -228,21 +229,21 @@ into temp1
GuidGenerator.Create(), GuidGenerator.Create(),
"", "",
string.Empty, string.Empty,
p., p.MaterialCode,
p., p.MaterialDesc,
p., p.MaterialGroup,
string.Empty, string.Empty,
string.Empty, string.Empty,
0, 0,
string.Empty, p.Extend1,
string.Empty, p.Extend2,
input.Version, input.Version,
p.Sap编码, string.Empty,
_billNum, _billNum,
GuidGenerator.Create(), GuidGenerator.Create(),
string.Empty, string.Empty,
p., p.Qty,
0 p.StockQty
)); ));
_lst.AddRange(_lsAry.ToArray()); _lst.AddRange(_lsAry.ToArray());
} }

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

@ -113,6 +113,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("WmsSharePartDetailList")] [Route("WmsSharePartDetailList")]
[UnitOfWork(false)]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WmsHQCarOutPutDetial>> GetListAsync(WmsSharePartOutPutDetialRequestDto input) virtual public async Task<PagedResultDto<WmsHQCarOutPutDetial>> GetListAsync(WmsSharePartOutPutDetialRequestDto input)
{ {
@ -148,7 +149,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
itm.TaskId, itm.TaskId,
itm.Remark, itm.Remark,
itm.Qty, itm.Qty,
tm1.Qty tm1 == null ? 0 : tm1.Qty
); );
@ -196,7 +197,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
{ {
string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename; string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename;
ExcelHelper _excelHelper = new ExcelHelper(fileSavePath); ExcelHelper _excelHelper = new ExcelHelper(fileSavePath);
var _list = _excelHelper.ExcelToList<HQFSharePartSettledDetailDiff>(); var _list = _excelHelper.ExcelToList<WmsHQCarOutPutDetial>();
if (_list.Count() > 0) if (_list.Count() > 0)
{ {
var _lsAry = _list.Select(p => new var _lsAry = _list.Select(p => new
@ -204,21 +205,21 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
GuidGenerator.Create(), GuidGenerator.Create(),
"", "",
string.Empty, string.Empty,
p., p.MaterialCode,
p., p.MaterialDesc,
p., p.MaterialGroup,
string.Empty, string.Empty,
string.Empty, string.Empty,
0, 0,
string.Empty, p.Extend1,
string.Empty, p.Extend2,
input.Version, input.Version,
p.Sap编码, string.Empty,
_billNum, _billNum,
GuidGenerator.Create(), GuidGenerator.Create(),
string.Empty, string.Empty,
p., p.Qty,
0 p.StockQty
)); ));
_lst.AddRange(_lsAry.ToArray()); _lst.AddRange(_lsAry.ToArray());
} }

21
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsHQMSharePartAppService.cs

@ -113,6 +113,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("WmsSharePartDetailList")] [Route("WmsSharePartDetailList")]
[UnitOfWork(false)]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WmsHQMSharePartOutPutDetial>> GetListAsync(WmsSharePartOutPutDetialRequestDto input) virtual public async Task<PagedResultDto<WmsHQMSharePartOutPutDetial>> GetListAsync(WmsSharePartOutPutDetialRequestDto input)
{ {
@ -148,7 +149,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
itm.TaskId, itm.TaskId,
itm.Remark, itm.Remark,
itm.Qty, itm.Qty,
tm1.Qty tm1 == null ? 0 : tm1.Qty
); );
@ -196,7 +197,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
{ {
string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename; string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename;
ExcelHelper _excelHelper = new ExcelHelper(fileSavePath); ExcelHelper _excelHelper = new ExcelHelper(fileSavePath);
var _list = _excelHelper.ExcelToList<HQFSharePartSettledDetailDiff>(); var _list = _excelHelper.ExcelToList<WmsHQMSharePartOutPutDetial>();
if (_list.Count() > 0) if (_list.Count() > 0)
{ {
var _lsAry = _list.Select(p => new var _lsAry = _list.Select(p => new
@ -204,21 +205,21 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
GuidGenerator.Create(), GuidGenerator.Create(),
"", "",
string.Empty, string.Empty,
p., p.MaterialCode,
p., p.MaterialDesc,
p., p.MaterialGroup,
string.Empty, string.Empty,
string.Empty, string.Empty,
0, 0,
string.Empty, p.Extend1,
string.Empty, p.Extend2,
input.Version, input.Version,
p.Sap编码, string.Empty,
_billNum, _billNum,
GuidGenerator.Create(), GuidGenerator.Create(),
string.Empty, string.Empty,
p., p.Qty,
0 p.StockQty
)); ));
_lst.AddRange(_lsAry.ToArray()); _lst.AddRange(_lsAry.ToArray());
} }

49
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs

@ -462,14 +462,11 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
/// <summary> /// <summary>
/// 备件出库明细 /// M平台-备件出库明细
/// </summary> /// </summary>
public class WmsHQMSharePartOutPutDetial : FullAuditedAggregateRootBase<Guid> public class WmsHQMSharePartOutPutDetial : FullAuditedAggregateRootBase<Guid>
{ {
public WmsHQMSharePartOutPutDetial() public WmsHQMSharePartOutPutDetial()
{ {
} }
@ -513,7 +510,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
[ImporterHeader(Name = "Sap编码")] [ImporterHeader(Name = "Sap编码")]
//物料号 //物料号
public string MaterialCode { set; get; } public string MaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")] [ImporterHeader(Name = "结算物料描述")]
//物料描述 //物料描述
public string MaterialDesc { set; get; } public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")] [ImporterHeader(Name = "物料组(车型)")]
@ -550,7 +547,6 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
public Guid TaskId { set; get; } public Guid TaskId { set; get; }
} }
#endregion #endregion
#region 一汽轿车出库 #region 一汽轿车出库
@ -582,9 +578,6 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
public class WmsHQCarOutPutDetial : FullAuditedAggregateRootBase<Guid> public class WmsHQCarOutPutDetial : FullAuditedAggregateRootBase<Guid>
{ {
public WmsHQCarOutPutDetial() public WmsHQCarOutPutDetial()
{ {
} }
@ -628,7 +621,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
[ImporterHeader(Name = "Sap编码")] [ImporterHeader(Name = "Sap编码")]
//物料号 //物料号
public string MaterialCode { set; get; } public string MaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")] [ImporterHeader(Name = "结算物料描述")]
//物料描述 //物料描述
public string MaterialDesc { set; get; } public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")] [ImporterHeader(Name = "物料组(车型)")]
@ -823,10 +816,11 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
/// <summary> /// <summary>
/// 备件出库明细 /// F平台-备件出库明细
/// </summary> /// </summary>
public class WmsHQFSharePartOutPutDetial : FullAuditedAggregateRootBase<Guid> public class WmsHQFSharePartOutPutDetial : FullAuditedAggregateRootBase<Guid>
{ {
public WmsHQFSharePartOutPutDetial() public WmsHQFSharePartOutPutDetial()
{ {
} }
@ -849,6 +843,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
TaskId = taskId; TaskId = taskId;
Remark = remark; Remark = remark;
Qty = qty; Qty = qty;
StockQty = stockQty;
} }
public void SetId(Guid id) public void SetId(Guid id)
{ {
@ -856,31 +851,6 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
} }
//交货单号 //交货单号
//[ExporterHeader(DisplayName = "收货仓库")]
//public string 收货仓库 { set; get; }
//[ExporterHeader(DisplayName = "收货仓库描述")]
//public string 收货仓库描述 { set; get; }
//[ExporterHeader(DisplayName = "结算物料号")]
//public string 结算物料号 { set; get; }
//[ExporterHeader(DisplayName = "结算物料描述")]
//public string 物料描述 { set; get; }
//[ExporterHeader(DisplayName = "结算数量")]
//public decimal 结算数量 { set; get; }
//[ExporterHeader(DisplayName = "结算单价")]
//public decimal 结算单价 { set; get; }
//[ExporterHeader(DisplayName = "结算金额")]
//public decimal 结算金额 { set; get; }
//[ExporterHeader(DisplayName = "Sap编码")]
//public string Sap编码 { set; get; }
//[ExporterHeader(DisplayName = "物料组(车型)")]
//public string 物料组 { set; get; }
//[ExporterHeader(DisplayName = "寄销库数量")]
//public decimal 寄销库数量 { set; get; }
[ImporterHeader(Name = "寄销库数量", IsIgnore = true)] [ImporterHeader(Name = "寄销库数量", IsIgnore = true)]
public decimal StockQty { set; get; } public decimal StockQty { set; get; }
@ -894,7 +864,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
[ImporterHeader(Name = "Sap编码")] [ImporterHeader(Name = "Sap编码")]
//物料号 //物料号
public string MaterialCode { set; get; } public string MaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")] [ImporterHeader(Name = "结算物料描述")]
//物料描述 //物料描述
public string MaterialDesc { set; get; } public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")] [ImporterHeader(Name = "物料组(车型)")]
@ -927,6 +897,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
public decimal Qty { set; get; } public decimal Qty { set; get; }
[ImporterHeader(Name = "单据号", IsIgnore = true)] [ImporterHeader(Name = "单据号", IsIgnore = true)]
public string BillNum { set; get; } public string BillNum { set; get; }
[ImporterHeader(Name = "任务ID", IsIgnore = true)]
public Guid TaskId { set; get; } public Guid TaskId { set; get; }
} }
@ -1072,7 +1043,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
/// <summary> /// <summary>
/// 备件出库明细 /// H-平台-备件出库明细
/// </summary> /// </summary>
public class WmsHQHSharePartOutPutDetial : FullAuditedAggregateRootBase<Guid> public class WmsHQHSharePartOutPutDetial : FullAuditedAggregateRootBase<Guid>
{ {
@ -1123,7 +1094,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
[ImporterHeader(Name = "Sap编码")] [ImporterHeader(Name = "Sap编码")]
//物料号 //物料号
public string MaterialCode { set; get; } public string MaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")] [ImporterHeader(Name = "结算物料描述")]
//物料描述 //物料描述
public string MaterialDesc { set; get; } public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")] [ImporterHeader(Name = "物料组(车型)")]

2
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs

@ -474,7 +474,7 @@ namespace Win.Sfs.SettleAccount
private static void ConfigureWmsHQMSharePartOutPutDetial(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) private static void ConfigureWmsHQMSharePartOutPutDetial(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{ {
builder.Entity<WmsHQHSharePartOutPutDetial>(b => builder.Entity<WmsHQMSharePartOutPutDetial>(b =>
{ {
b.ToTable($"{options.TablePrefix}_WmsHQMSharePartOutPutDetial", options.Schema); b.ToTable($"{options.TablePrefix}_WmsHQMSharePartOutPutDetial", options.Schema);
b.ConfigureByConvention(); b.ConfigureByConvention();

2
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/HQMSettledDetailDapperRepository.cs

@ -197,7 +197,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" Set_HQ_M_Platform \n" + " Set_HQ_M_Platform \n" +
" WHERE\n" + " WHERE\n" +
" version = '{0}' \n" + " version = '{0}' \n" +
" AND HQHKanBan = 'BJ' {1} \n" + " AND HQMKanBan = 'BJ' {1} \n" +
" GROUP BY\n" + " GROUP BY\n" +
" MaterialCode,\n" + " MaterialCode,\n" +
" StorageLocation,\n" + " StorageLocation,\n" +

Loading…
Cancel
Save