Browse Source

更新版本

FoShanPG
Administrator 3 years ago
parent
commit
a855d528a1
  1. 1
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccount.HttpApi.Host.csproj
  2. 72
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsDetailReportDto.cs
  3. 6
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsDetailUnInterface.cs
  4. 4
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsUnInterface.cs
  5. 2
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj
  6. 6
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
  7. 8
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WmsDetailReport.cs
  8. 29
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs

1
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccount.HttpApi.Host.csproj

@ -11,6 +11,7 @@
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS> <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..\..\..</DockerfileContext> <DockerfileContext>..\..\..\..</DockerfileContext>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

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

@ -72,8 +72,14 @@ namespace Win.Sfs.SettleAccount.Entities.Wms.WmsSumOutput
} }
[Display(Name = "行号")] [Display(Name = "行号")]
public int LineNumber { set; get; } public int LineNumber { set; get; }
[Display(Name = "版本号")]
public string Version { set; get; }
[Display(Name = "客户")] [Display(Name = "客户")]
public string Client { set; get; } public string Client { set; get; }
[Display(Name = "出库类型")] [Display(Name = "出库类型")]
@ -86,10 +92,10 @@ namespace Win.Sfs.SettleAccount.Entities.Wms.WmsSumOutput
public string ClientCode { set; get; } public string ClientCode { set; get; }
[Display(Name = "结算单")] [Display(Name = "结算单")]
public string BillNum { set; get; } public string BillNum { set; get; }
[Display(Name = "结算单")] [Display(Name = "物料号")]
public string MaterialCode { set; get; } public string MaterialCode { set; get; }
[Display(Name = "寄售类别")] //[Display(Name = "寄售类别")]
public string SaleType { set; get; } //public string SaleType { set; get; }
[Display(Name = "结算数量")] [Display(Name = "结算数量")]
public decimal Qty { set; get; } public decimal Qty { set; get; }
[Display(Name = "实际出库数量")] [Display(Name = "实际出库数量")]
@ -112,9 +118,69 @@ namespace Win.Sfs.SettleAccount.Entities.Wms.WmsSumOutput
public string MaterialDesc { set; get; } public string MaterialDesc { set; get; }
[Display(Name = "备注")] [Display(Name = "备注")]
public string Remark1 { set; get; } 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 = "状态")] [Display(Name = "状态")]
public int State { set; get; } public int State { set; get; }
} }
} }

6
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WmsDetailUnInterface.cs

@ -57,6 +57,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
_erpDapper = erpDapper; _erpDapper = erpDapper;
_wmsRepository = wmsRepository; _wmsRepository = wmsRepository;
_dapper = dapper; _dapper = dapper;
_excelImportService = excelImportService;
} }
@ -127,7 +128,7 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
return await _wmsRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters); return await _wmsRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters);
} }
[HttpPost] [HttpPost]
[Route("Sync")] [Route("ModifyTaskState")]
public virtual async Task<bool> SyncInterface() public virtual async Task<bool> 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 }); 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, 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);
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());
result = await _excel.ExportAsByteArray(entities); result = await _excel.ExportAsByteArray(dtoDetails);
result.ShouldNotBeNull(); result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制 //保存导出文件到服务器存成二进制
await _excelImportService.SaveBlobAsync( await _excelImportService.SaveBlobAsync(

4
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 }); 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, var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, int.MaxValue,
0, true); 0, true);
var dtoDetails = ObjectMapper.Map<List<WmsDetailReport>, List<WmsDetailReportDto>>(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());
result = await _excel.ExportAsByteArray(entities); result = await _excel.ExportAsByteArray(dtoDetails);
result.ShouldNotBeNull(); result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制 //保存导出文件到服务器存成二进制
await _excelImportService.SaveBlobAsync( await _excelImportService.SaveBlobAsync(

2
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj

@ -11,7 +11,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>SettleAccount.Application.xml</DocumentationFile> <DocumentationFile></DocumentationFile>
<OutputPath>..\..\OutPut</OutputPath> <OutputPath>..\..\OutPut</OutputPath>
</PropertyGroup> </PropertyGroup>

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

@ -265,6 +265,7 @@ namespace Win.Sfs.SettleAccount
CreateMapWmsHQCar(); CreateMapWmsHQCar();
CreateMapWmsOneTimeSale(); CreateMapWmsOneTimeSale();
CreateMapWMSOutputSum(); CreateMapWMSOutputSum();
CreateMapWMSDiffOutputSum();
#endregion #endregion
} }
@ -277,6 +278,11 @@ namespace Win.Sfs.SettleAccount
CreateMap<WmsDetailReport, WmsDetailReportDto>().ReverseMap(); CreateMap<WmsDetailReport, WmsDetailReportDto>().ReverseMap();
CreateMap<WmsDetailReport, WmsRequestDetailReportDto>().ReverseMap(); CreateMap<WmsDetailReport, WmsRequestDetailReportDto>().ReverseMap();
} }
private void CreateMapWMSDiffOutputSum()
{
CreateMap<WmsDetailDiffReport, WmsDetailDiffReportDto>().ReverseMap();
}
private void CreateMapWMSJit() private void CreateMapWMSJit()
{ {

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

@ -91,6 +91,14 @@ namespace Win.Sfs.SettleAccount.Entities
[Display(Name ="过账日期")] [Display(Name ="过账日期")]
public DateTime AccountDate { set; get; } public DateTime AccountDate { set; get; }
} }
public class WmsDetailDiffReport : FullAuditedAggregateRootBase<Guid> public class WmsDetailDiffReport : FullAuditedAggregateRootBase<Guid>
{ {

29
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/WmsOutputSumDapperRepository.cs

@ -24,14 +24,14 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ImporterHeader(Name = "出库类型")] [ImporterHeader(Name = "出库类型")]
[ExporterHeader(DisplayName = "出库类型")] [ExporterHeader(DisplayName = "出库类型")]
public string { set; get; } public string { set; get; }
//[ImporterHeader(Name = "结算编码")] [ImporterHeader(Name = "结算编码")]
//[ExporterHeader(DisplayName = "结算编码")] [ExporterHeader(DisplayName = "结算编码")]
//public string 结算编码 { set; get; } public string { set; get; }
//[ImporterHeader(Name = "销售渠道")] [ImporterHeader(Name = "销售渠道")]
//[ExporterHeader(DisplayName = "销售渠道")] [ExporterHeader(DisplayName = "销售渠道")]
//public string 销售渠道 { set; get; } public string { set; get; }
//[ImporterHeader(Name = "客户代码")] [ImporterHeader(Name = "客户代码")]
//[ExporterHeader(DisplayName = "客户代码")] [ExporterHeader(DisplayName = "客户代码")]
public string { set; get; } public string { set; get; }
[ImporterHeader(Name = "结算单")] [ImporterHeader(Name = "结算单")]
[ExporterHeader(DisplayName = "结算单")] [ExporterHeader(DisplayName = "结算单")]
@ -42,9 +42,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ImporterHeader(Name = "条码号")] [ImporterHeader(Name = "条码号")]
[ExporterHeader(DisplayName = "条码号")] [ExporterHeader(DisplayName = "条码号")]
public string { set; get; } public string { set; get; }
//[ImporterHeader(Name = "寄售类别")] [ImporterHeader(Name = "寄售类别")]
//[ExporterHeader(DisplayName = "寄售类别")] [ExporterHeader(DisplayName = "寄售类别")]
//public string 寄售类别 { set; get; } public string { set; get; }
[ImporterHeader(Name = "结算数量")] [ImporterHeader(Name = "结算数量")]
[ExporterHeader(DisplayName = "结算数量")] [ExporterHeader(DisplayName = "结算数量")]
public decimal { set; get; } public decimal { set; get; }
@ -78,6 +78,13 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ImporterHeader(Name = "备注")] [ImporterHeader(Name = "备注")]
[ExporterHeader(DisplayName = "备注")] [ExporterHeader(DisplayName = "备注")]
public string { set; get; } public string { set; get; }
} }

Loading…
Cancel
Save