diff --git a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccount.HttpApi.Host.csproj b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccount.HttpApi.Host.csproj index e202ba99..88fd5632 100644 --- a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccount.HttpApi.Host.csproj +++ b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccount.HttpApi.Host.csproj @@ -11,6 +11,7 @@ Linux ..\..\..\.. net5.0 + True diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsDetailReportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsDetailReportDto.cs index 4a983185..4cb5bb4f 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsDetailReportDto.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsDetailReportDto.cs @@ -72,8 +72,14 @@ namespace Win.Sfs.SettleAccount.Entities.Wms.WmsSumOutput } + [Display(Name = "行号")] public int LineNumber { set; get; } + + [Display(Name = "版本号")] + public string Version { set; get; } + + [Display(Name = "客户")] public string Client { set; get; } [Display(Name = "出库类型")] @@ -86,10 +92,10 @@ namespace Win.Sfs.SettleAccount.Entities.Wms.WmsSumOutput public string ClientCode { set; get; } [Display(Name = "结算单")] public string BillNum { set; get; } - [Display(Name = "结算单")] + [Display(Name = "物料号")] public string MaterialCode { set; get; } - [Display(Name = "寄售类别")] - public string SaleType { set; get; } + //[Display(Name = "寄售类别")] + //public string SaleType { set; get; } [Display(Name = "结算数量")] public decimal Qty { set; get; } [Display(Name = "实际出库数量")] @@ -112,9 +118,69 @@ namespace Win.Sfs.SettleAccount.Entities.Wms.WmsSumOutput public string MaterialDesc { set; get; } [Display(Name = "备注")] public string Remark1 { set; get; } + [Display(Name = "状态")] + public int State { set; get; } + [Display(Name = "过账日期")] + public DateTime AccountDate { set; get; } + } + + + public class WmsDetailDiffReportDto + { + public WmsDetailDiffReportDto() + { + } + + + + [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; } + } } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsDetailUnInterface.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsDetailUnInterface.cs index 05298cdf..dde7096f 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsDetailUnInterface.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsDetailUnInterface.cs @@ -57,6 +57,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS _erpDapper = erpDapper; _wmsRepository = wmsRepository; _dapper = dapper; + _excelImportService = excelImportService; } @@ -127,7 +128,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS return await _wmsRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters); } [HttpPost] - [Route("Sync")] + [Route("ModifyTaskState")] public virtual async Task SyncInterface() { @@ -161,10 +162,11 @@ namespace Win.Sfs.SettleAccount.Entities.WMS input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, int.MaxValue, 0, true); + var dtoDetails = ObjectMapper.Map, List>(entities); IExporter _excel = new ExcelExporter(); byte[] result = null; var _fileName = string.Format("差异清单报表_{0}.xlsx", Guid.NewGuid().ToString()); - result = await _excel.ExportAsByteArray(entities); + result = await _excel.ExportAsByteArray(dtoDetails); result.ShouldNotBeNull(); //保存导出文件到服务器存成二进制 await _excelImportService.SaveBlobAsync( diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs index b89583a7..6daa71ba 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs @@ -188,10 +188,12 @@ namespace Win.Sfs.SettleAccount.Entities.WMS input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, int.MaxValue, 0, true); + + var dtoDetails = ObjectMapper.Map, List>(entities); IExporter _excel = new ExcelExporter(); byte[] result = null; var _fileName = string.Format("汇总合计报表_{0}.xlsx", Guid.NewGuid().ToString()); - result = await _excel.ExportAsByteArray(entities); + result = await _excel.ExportAsByteArray(dtoDetails); result.ShouldNotBeNull(); //保存导出文件到服务器存成二进制 await _excelImportService.SaveBlobAsync( diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj index 7976fc11..1c338884 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj @@ -11,7 +11,7 @@ - SettleAccount.Application.xml + ..\..\OutPut diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs index b4c4d436..967e3b5e 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs @@ -265,6 +265,7 @@ namespace Win.Sfs.SettleAccount CreateMapWmsHQCar(); CreateMapWmsOneTimeSale(); CreateMapWMSOutputSum(); + CreateMapWMSDiffOutputSum(); #endregion } @@ -277,6 +278,11 @@ namespace Win.Sfs.SettleAccount CreateMap().ReverseMap(); CreateMap().ReverseMap(); } + private void CreateMapWMSDiffOutputSum() + { + CreateMap().ReverseMap(); + + } private void CreateMapWMSJit() { diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WmsDetailReport.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WmsDetailReport.cs index 87f12cf9..25d6e285 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WmsDetailReport.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WmsDetailReport.cs @@ -91,6 +91,14 @@ namespace Win.Sfs.SettleAccount.Entities [Display(Name ="过账日期")] public DateTime AccountDate { set; get; } + + + + + + + + } public class WmsDetailDiffReport : FullAuditedAggregateRootBase { diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs index c9955756..156291f0 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs @@ -24,14 +24,14 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report [ImporterHeader(Name = "出库类型")] [ExporterHeader(DisplayName = "出库类型")] public string 出库类型 { set; get; } - //[ImporterHeader(Name = "结算编码")] - //[ExporterHeader(DisplayName = "结算编码")] - //public string 结算编码 { set; get; } - //[ImporterHeader(Name = "销售渠道")] - //[ExporterHeader(DisplayName = "销售渠道")] - //public string 销售渠道 { set; get; } - //[ImporterHeader(Name = "客户代码")] - //[ExporterHeader(DisplayName = "客户代码")] + [ImporterHeader(Name = "结算编码")] + [ExporterHeader(DisplayName = "结算编码")] + public string 结算编码 { set; get; } + [ImporterHeader(Name = "销售渠道")] + [ExporterHeader(DisplayName = "销售渠道")] + public string 销售渠道 { set; get; } + [ImporterHeader(Name = "客户代码")] + [ExporterHeader(DisplayName = "客户代码")] public string 客户代码 { set; get; } [ImporterHeader(Name = "结算单")] [ExporterHeader(DisplayName = "结算单")] @@ -42,9 +42,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report [ImporterHeader(Name = "条码号")] [ExporterHeader(DisplayName = "条码号")] public string 通用代码号 { set; get; } - //[ImporterHeader(Name = "寄售类别")] - //[ExporterHeader(DisplayName = "寄售类别")] - //public string 寄售类别 { set; get; } + [ImporterHeader(Name = "寄售类别")] + [ExporterHeader(DisplayName = "寄售类别")] + public string 寄售类别 { set; get; } [ImporterHeader(Name = "结算数量")] [ExporterHeader(DisplayName = "结算数量")] public decimal 结算数量 { set; get; } @@ -78,6 +78,13 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report [ImporterHeader(Name = "备注")] [ExporterHeader(DisplayName = "备注")] public string 备注 { set; get; } + + + + + + + }