Browse Source

更新版本

FoShanPG
Administrator 3 years ago
parent
commit
784c5e2b76
  1. 61
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsDetailReportDto.cs
  2. 2
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSCusomerKanbanAppService.cs
  3. 20
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsDetailCancelInterface.cs
  4. 7
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
  5. 71
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WmsDetailReport.cs
  6. 31
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs

61
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsDetailReportDto.cs

@ -184,6 +184,67 @@ namespace Win.Sfs.SettleAccount.Entities.Wms.WmsSumOutput
} }
public class WmsDetailCancelReportDto
{
public WmsDetailCancelReportDto()
{
}
[Display(Name = "版本号")]
public string Version { set; get; }
[Display(Name = "客户")]
public string Client { set; get; }
[Display(Name = "出库类型")]
public string Type { set; get; }
//[Display(Name = "结算编码")]
//public string SettleCode { set; get; }
//[Display(Name = "销售渠道")]
//public string SaleCode { set; get; }
//[Display(Name = "客户代码")]
//public string ClientCode { set; get; }
[Display(Name = "结算单")]
public string BillNum { set; get; }
[Display(Name = "交货编码")]
public string SwitchCode { set; get; }
[Display(Name = "物料号")]
public string MaterialCode { set; get; }
//[Display(Name = "寄售类别")]
//public string SaleType { set; get; }
[Display(Name = "结算数量")]
public decimal Qty { set; get; }
[Display(Name = "实际出库数量")]
public decimal OutputQty { set; get; }
[Display(Name = "差异数量")]
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待出库金额")]
//public decimal DiffAmt { set; get; }
[Display(Name = "物料组编码")]
public string MaterialGroupCode { set; get; }
[Display(Name = "物料组(车型)")]
public string MaterialGroup { set; get; }
[Display(Name = "物料组描述")]
public string MaterialDesc { set; get; }
[Display(Name = "备注")]
public string Remark1 { set; get; }
[Display(Name = "状态")]
public int State { set; get; }
}
/// <summary> /// <summary>
/// 有条码业务 /// 有条码业务
/// </summary> /// </summary>

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

@ -55,7 +55,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
/// 红旗H平台准时化-出库 /// 红旗H平台准时化-出库
/// </summary> /// </summary>
//[AllowAnonymous]
[Authorize(SettleAccountPermissions.WMSHQ.Default)] [Authorize(SettleAccountPermissions.WMSHQ.Default)]
[Route("api/settleaccount/WMSCusomerKanbanoutput")] [Route("api/settleaccount/WMSCusomerKanbanoutput")]
public class WMSCusomerKanbanAppService : public class WMSCusomerKanbanAppService :

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

@ -33,9 +33,9 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
[Authorize(SettleAccountPermissions.WMSJIT.Default)] [Authorize(SettleAccountPermissions.WMSJIT.Default)]
[Route("api/settleaccount/WMSOutputDetailCancelDiffReport")] [Route("api/settleaccount/WMSOutputDetailCancelDiffReport")]
public class WMSOutputDetailCancelDiffReportAppService : public class WMSOutputDetailCancelDiffReportAppService :
SettleAccountApplicationBase<WmsDetailDiffReport> SettleAccountApplicationBase<WmsDetailCancelReport>
{ {
private readonly ISettleAccountBranchEfCoreRepository<WmsDetailDiffReport, Guid> _wmsRepository; private readonly ISettleAccountBranchEfCoreRepository<WmsDetailCancelReport, Guid> _wmsRepository;
private readonly WmsOutputSumDapperRepository _dapper; private readonly WmsOutputSumDapperRepository _dapper;
private readonly IExcelImportAppService _excelImportService; private readonly IExcelImportAppService _excelImportService;
@ -48,10 +48,10 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
public WMSOutputDetailCancelDiffReportAppService( public WMSOutputDetailCancelDiffReportAppService(
WmsOutputSumDapperRepository dapper, WmsOutputSumDapperRepository dapper,
ISettleAccountBranchEfCoreRepository<WmsDetailDiffReport, Guid> wmsRepository, ISettleAccountBranchEfCoreRepository<WmsDetailCancelReport, Guid> wmsRepository,
ISettleAccountBranchEfCoreRepository<TaskJob, Guid> job, ISettleAccountBranchEfCoreRepository<TaskJob, Guid> job,
IExcelImportAppService excelImportService, IExcelImportAppService excelImportService,
IDistributedCache<WmsDetailDiffReport> cache, IDistributedCache<WmsDetailCancelReport> cache,
ISnowflakeIdGenerator snowflakeIdGenerator, ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager, ICommonManager commonManager,
ErpSumOutputDapperRepository erpDapper ErpSumOutputDapperRepository erpDapper
@ -81,12 +81,12 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
var query = _wmsRepository.Where(p => p.Version == version); var query = _wmsRepository.Where(p => p.Version == version);
await query.BatchDeleteAsync(); await query.BatchDeleteAsync();
} }
List<WmsDetailDiffReport> _lst = new List<WmsDetailDiffReport>(); List<WmsDetailCancelReport> _lst = new List<WmsDetailCancelReport>();
if (_ls != null && _ls.Count() > 0) if (_ls != null && _ls.Count() > 0)
{ {
foreach (var itm in _ls) foreach (var itm in _ls)
{ {
_lst.Add(new WmsDetailDiffReport( _lst.Add(new WmsDetailCancelReport(
Guid.NewGuid(), Guid.NewGuid(),
itm., itm.,
itm., itm.,
@ -115,7 +115,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
[HttpPost] [HttpPost]
[Route("WmsDetailReport")] [Route("WmsDetailReport")]
virtual public async Task<PagedResultDto<WmsDetailDiffReport>> GetListAsync(WmsRequestDetailReportDto input) virtual public async Task<PagedResultDto<WmsDetailCancelReport>> GetListAsync(WmsRequestDetailReportDto input)
{ {
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
//客户过滤 //客户过滤
@ -131,7 +131,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount, var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true); input.SkipCount, true);
var totalCount = await GetCountAsync(input); var totalCount = await GetCountAsync(input);
return new PagedResultDto<WmsDetailDiffReport>(totalCount, entities); return new PagedResultDto<WmsDetailCancelReport>(totalCount, entities);
} }
@ -176,7 +176,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
//{ //{
// var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, int.MaxValue, // var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, int.MaxValue,
// 0, true); // 0, true);
// List<WmsDetailDiffReport> _ls = new List<WmsDetailDiffReport>(); // List<WmsDetailCancelReport> _ls = new List<WmsDetailCancelReport>();
// if (entities.Count() > 0) // if (entities.Count() > 0)
// { // {
// var _entity = entities.FirstOrDefault(); // var _entity = entities.FirstOrDefault();
@ -206,7 +206,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
} }
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, int.MaxValue, var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, int.MaxValue,
0, true); 0, true);
var dtoDetails = ObjectMapper.Map<List<WmsDetailDiffReport>, List<WmsDetailDiffReportDto>>(entities); var dtoDetails = ObjectMapper.Map<List<WmsDetailCancelReport>, List<WmsDetailCancelReportDto>>(entities);
IExporter _excel = new ExcelExporter(); IExporter _excel = new ExcelExporter();
byte[] result = null; byte[] result = null;
var _fileName = string.Format("撤销清单报表_{0}.xlsx", Guid.NewGuid().ToString()); var _fileName = string.Format("撤销清单报表_{0}.xlsx", Guid.NewGuid().ToString());

7
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs

@ -267,7 +267,7 @@ namespace Win.Sfs.SettleAccount
CreateMapWMSOutputSum(); CreateMapWMSOutputSum();
CreateMapWMSDiffOutputSum(); CreateMapWMSDiffOutputSum();
CreateMapWMSWithCodeOutputSum(); CreateMapWMSWithCodeOutputSum();
CreateMapWMSCacelOutputSum();
#endregion #endregion
} }
@ -283,6 +283,11 @@ namespace Win.Sfs.SettleAccount
{ {
CreateMap<WmsDetailDiffReport, WmsDetailDiffReportDto>().ReverseMap(); CreateMap<WmsDetailDiffReport, WmsDetailDiffReportDto>().ReverseMap();
}
private void CreateMapWMSCacelOutputSum()
{
CreateMap<WmsDetailCancelReport, WmsDetailCancelReportDto>().ReverseMap();
} }
/// <summary> /// <summary>
/// 有条码业务 /// 有条码业务

71
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WmsDetailReport.cs

@ -172,7 +172,78 @@ namespace Win.Sfs.SettleAccount.Entities
public int State { set; get; } public int State { set; get; }
} }
public class WmsDetailCancelReport : FullAuditedAggregateRootBase<Guid>
{
public WmsDetailCancelReport()
{
}
public WmsDetailCancelReport(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)
{
Version = version;
Type = type;
Client = client;
BillNum = billNum;
SwitchCode = switchCode;
MaterialCode = materialCode;
Qty = qty;
OutputQty = outputQty;
DiffQty = diffQty;
MaterialGroupCode = materialGroupCode;
MaterialGroup = materialGroup;
MaterialDesc = materialDesc;
Remark1 = remark1;
State = state;
}
[Display(Name = "版本号")]
public string Version { set; get; }
[Display(Name = "客户")]
public string Client { set; get; }
[Display(Name = "出库类型")]
public string Type { set; get; }
//[Display(Name = "结算编码")]
//public string SettleCode { set; get; }
//[Display(Name = "销售渠道")]
//public string SaleCode { set; get; }
//[Display(Name = "客户代码")]
//public string ClientCode { set; get; }
[Display(Name = "结算单")]
public string BillNum { set; get; }
[Display(Name = "交货编码")]
public string SwitchCode { set; get; }
[Display(Name = "物料号")]
public string MaterialCode { set; get; }
//[Display(Name = "寄售类别")]
//public string SaleType { set; get; }
[Display(Name = "结算数量")]
public decimal Qty { set; get; }
[Display(Name = "实际出库数量")]
public decimal OutputQty { set; get; }
[Display(Name = "差异数量")]
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待出库金额")]
//public decimal DiffAmt { set; get; }
[Display(Name = "物料组编码")]
public string MaterialGroupCode { set; get; }
[Display(Name = "物料组(车型)")]
public string MaterialGroup { set; get; }
[Display(Name = "物料组描述")]
public string MaterialDesc { set; get; }
[Display(Name = "备注")]
public string Remark1 { set; get; }
[Display(Name = "状态")]
public int State { set; get; }
}
/// <summary> /// <summary>
/// 有条码 /// 有条码
/// </summary> /// </summary>

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

@ -379,6 +379,9 @@ namespace Win.Sfs.SettleAccount
builder.ConfigureWmsDetailReport(options); builder.ConfigureWmsDetailReport(options);
builder.ConfigureWmsDetailDiffReport(options); builder.ConfigureWmsDetailDiffReport(options);
builder.ConfigureWmsDetailCancelReport(options);
//有条码 //有条码
builder.ConfigureWmsDetailWithCodeReport(options); builder.ConfigureWmsDetailWithCodeReport(options);
builder.ConfigureWmsCustomerKanbanOutPut(options); builder.ConfigureWmsCustomerKanbanOutPut(options);
@ -610,6 +613,34 @@ namespace Win.Sfs.SettleAccount
}); });
} }
private static void ConfigureWmsDetailCancelReport(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<WmsDetailCancelReport>(b =>
{
b.ToTable($"{options.TablePrefix}_WmsDetailCancelReport", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.BillNum).IsRequired().HasMaxLength(50);//必填项
b.Property(x => x.MaterialCode).HasMaxLength(50);
b.Property(x => x.MaterialDesc).HasMaxLength(100);
b.Property(x => x.Client).IsRequired().HasMaxLength(50);
b.Property(x => x.MaterialCode).HasMaxLength(50);
b.Property(x => x.MaterialDesc).HasMaxLength(150);
b.Property(x => x.MaterialGroup).HasMaxLength(50);
b.Property(x => x.MaterialGroupCode).HasMaxLength(50);
//创建组合索引
});
}
/// <summary> /// <summary>
/// 有条码 /// 有条码
/// </summary> /// </summary>

Loading…
Cancel
Save