Administrator 3 years ago
parent
commit
ec301e8ab3
  1. 6675
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Logs/log-20220111.txt
  2. 23
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSHQFSharePartAppService .cs
  3. 20
      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. 67
      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

23
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,29 +213,29 @@ 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
WmsHQFSharePartOutPutDetial( WmsHQFSharePartOutPutDetial(
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());
} }

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

@ -151,7 +151,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,
@ -217,7 +217,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
@ -225,21 +225,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());
} }

67
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,14 +816,15 @@ 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()
{ {
} }
public WmsHQFSharePartOutPutDetial(Guid id, string wmsBillNum, string orderBillNum, string materialCode, string materialDesc, string materialGroup, string outPut, string inPut, int state, string extend1, string extend2, string extend3, string parentMaterialCode, string billNum, Guid taskId,string remark,decimal qty ,decimal stockQty ) public WmsHQFSharePartOutPutDetial(Guid id, string wmsBillNum, string orderBillNum, string materialCode, string materialDesc, string materialGroup, string outPut, string inPut, int state, string extend1, string extend2, string extend3, string parentMaterialCode, string billNum, Guid taskId, string remark, decimal qty, decimal stockQty)
{ {
Id = id; Id = id;
WmsBillNum = wmsBillNum; WmsBillNum = wmsBillNum;
@ -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,57 +851,32 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
} }
//交货单号 //交货单号
//[ExporterHeader(DisplayName = "收货仓库")] [ImporterHeader(Name = "寄销库数量", IsIgnore = true)]
//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)]
public decimal StockQty { set; get; } public decimal StockQty { set; get; }
[ImporterHeader(Name = "组件组物料",IsIgnore =true)] [ImporterHeader(Name = "组件组物料", IsIgnore = true)]
public string ParentMaterialCode { set; get; } public string ParentMaterialCode { set; get; }
[ImporterHeader(Name = "交货单号",IsIgnore =true)] [ImporterHeader(Name = "交货单号", IsIgnore = true)]
public string WmsBillNum { set; get; } public string WmsBillNum { set; get; }
[ImporterHeader(Name = "看板号",IsIgnore =true)] [ImporterHeader(Name = "看板号", IsIgnore = true)]
//KENN号 //KENN号
public string OrderBillNum { set; get; } public string OrderBillNum { set; get; }
[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 = "物料组(车型)")]
//物料组(车型) //物料组(车型)
public string MaterialGroup { set; get; } public string MaterialGroup { set; get; }
[ImporterHeader(Name = "出库库位",IsIgnore =true)] [ImporterHeader(Name = "出库库位", IsIgnore = true)]
//出库库位 //出库库位
public string OutPut { set; get; } public string OutPut { set; get; }
[ImporterHeader(Name = "入库库位",IsIgnore =true)] [ImporterHeader(Name = "入库库位", IsIgnore = true)]
//入库库位 //入库库位
public string InPut { set; get; } public string InPut { set; get; }
[ImporterHeader(Name = "状态",IsIgnore =true)] [ImporterHeader(Name = "状态", IsIgnore = true)]
public int State { get; set; } public int State { get; set; }
[ImporterHeader(Name = "结算物料号")] [ImporterHeader(Name = "结算物料号")]
/// <summary> /// <summary>
@ -921,12 +891,13 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
/// <summary> /// <summary>
/// 扩展字段3 /// 扩展字段3
/// </summary> /// </summary>
[ImporterHeader(Name = "版本号",IsIgnore =true)] [ImporterHeader(Name = "版本号", IsIgnore = true)]
public string Version { set; get; } public string Version { set; get; }
[ImporterHeader(Name = "结算数量")] [ImporterHeader(Name = "结算数量")]
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