Browse Source

Jis生成对比

master
mahao 1 year ago
parent
commit
f25887b3ac
  1. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_CAN_SA_DTO.cs
  2. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs
  3. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_DETAIL_SERVICE.cs
  4. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_DETAIL_SERVICE.cs
  5. 33
      code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/Enums/EnumPubSaSeCompareCategory.cs
  6. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/SettleAccount.Domain.Shared.csproj
  7. 369
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/PubSaSeCompareDiff.cs
  8. 108
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs
  9. 21
      code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobAutoMapperProfile.cs
  10. 9
      code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

2
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_CAN_SA_DTO.cs

@ -1,4 +1,4 @@
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

2
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs

@ -179,14 +179,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// 零件号
/// </summary>
[Display(Name = "零件号")]
[Required(ErrorMessage = "{0}不能为空")]
public string LU { get; set; }
/// <summary>
/// 通用码
/// </summary>
[Display(Name = "通用码")]
[Required(ErrorMessage = "{0}不能为空")]
public string PN { get; set; }
/// <summary>

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_DETAIL_SERVICE.cs

@ -17,7 +17,7 @@ public class HBPO_SA_DETAIL_SERVICE
/// HBPO结算与发运比对
/// </summary>
[HttpPost]
public async Task<string> BBACSaSeCompare(JisSaSeCompareRequestDto jisSaSeCompareRequestDto)
public async Task<string> HBPOSaSeCompare(JisSaSeCompareRequestDto jisSaSeCompareRequestDto)
{
await Task.CompletedTask;
throw new NotImplementedException();

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_DETAIL_SERVICE.cs

@ -120,6 +120,8 @@ public class PUB_SA_DETAIL_SERVICE : SettleAccountApplicationBase<PUB_SA_DETAIL>
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = pubSaSeCompareRequestDto.Version });
customConditionList.Add(new CustomCondition() { Name = "BusinessType", Value = ((int)pubSaSeCompareRequestDto.BusinessType).ToString() });
customConditionList.Add(new CustomCondition() { Name = "LU", Value = pubSaSeCompareRequestDto.LU });
customConditionList.Add(new CustomCondition() { Name = "PN", Value = pubSaSeCompareRequestDto.PN });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = projectName });
var _taskid = await _taskJobService.ExportEnqueueAsync(projectName, ExportExtentsion.Excel, pubSaSeCompareRequestDto.Version, string.Empty, CurrentUser, typeof(PubSaSeCompareExportService), customConditionList, (rs) =>

33
code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/Enums/EnumPubSaSeCompareCategory.cs

@ -0,0 +1,33 @@
using System.ComponentModel.DataAnnotations;
namespace Win.Sfs.SettleAccount.Enums;
/// <summary>
/// Pub结算与发运比对类型
/// </summary>
public enum EnumPubSaSeCompareCategory
{
/// <summary>
/// 未定义
/// </summary>
[Display(Name = "未定义")]
None = 0,
/// <summary>
/// 有结算有发运
/// </summary>
[Display(Name = "有结算有发运")]
HaveSaHaveSe = 1,
/// <summary>
/// 有结算无发运
/// </summary>
[Display(Name = "有结算无发运")]
HaveSaNotHaveSe = 2,
/// <summary>
/// 无结算有发运
/// </summary>
[Display(Name = "无结算有发运")]
NotHaveSaHaveSe = 3
}

4
code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/SettleAccount.Domain.Shared.csproj

@ -34,8 +34,4 @@
<Content Remove="Localization\SettleAccount\*.json" />
</ItemGroup>
<ItemGroup>
<Folder Include="Enums\" />
</ItemGroup>
</Project>

369
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/PubSaSeCompareDiff.cs

@ -2,15 +2,294 @@ using System.ComponentModel.DataAnnotations;
using System;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using Win.Sfs.SettleAccount.Enums;
namespace Win.Sfs.SettleAccount.Reports;
[ExcelExporter(MaxRowNumberOnASheet = 900000)]
/// <summary>
/// PUB结算与发运对比
/// </summary>
public class PubSaSeCompareDiff
{
//[Display(Name = "LU+ASN单号")]
//public string KeyCode { get; set; } = null!;
/// <summary>
/// Wms发货单号
/// </summary>
[Display(Name = "Wms发货单号")]
public string WmsBillNum { get; set; }
/// <summary>
/// 发货日期
/// </summary>
[Display(Name = "发货日期")]
public DateTime ShippingDate { get; set; }
/// <summary>
/// 日顺序号
/// </summary>
[Display(Name = "日顺序号")]
public string SeqNumber { get; set; }
/// <summary>
/// PJIS日顺序号
/// </summary>
[Display(Name = "PJIS日顺序号")]
public string PJISSeqNumber { get; set; }
/// <summary>
/// 物料号
/// </summary>
[Display(Name = "物料号")]
public string MaterialNumber { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[Display(Name = "物料描述")]
public string MaterialDes { get; set; }
/// <summary>
/// 结算数据中的过账日期
/// </summary>
[Display(Name = "客户下线时间")]
public DateTime CustomerOfflineTime { get; set; }
/// <summary>
/// 结算数量
/// </summary>
[Display(Name = "结算数量")]
public decimal SAQty { get; set; }
/// <summary>
/// 发货数量
/// </summary>
[Display(Name = "发货数量")]
public decimal SEQty { get; set; }
/// <summary>
/// 差异数量
/// </summary>
[ExporterHeader(DisplayName = "差异数量")]
public decimal DiffQty { set; get; }
[Display(Name = "匹配类型")]
public string MateType { get; set; }
/// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
public decimal FixPrice { get; set; }
/// <summary>
/// 替换零件号
/// </summary>
[Display(Name = "替换零件号")]
public string RepLU { get; set; }
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
public string SeLU { set; get; }
/// <summary>
/// 生产号
/// </summary>
[Display(Name = "生产号")]
public string SePN { set; get; }
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
public string SaLU { set; get; }
/// <summary>
/// 生产号
/// </summary>
[Display(Name = "生产号")]
public string SaPN { set; get; }
/// <summary>
/// 类型
/// </summary>
[Display(Name = "类型")]
public EnumPubSaSeCompareCategory Category { get; set; }
/// <summary>
/// 是否已经移除
/// </summary>
public bool IsRemove { get; set; }
}
/// <summary>
/// PUB结算与发运对比明细
/// </summary>
[ExcelExporter(MaxRowNumberOnASheet = 900000)]
public class PubSaSeCompareDetailExport
{
/// <summary>
/// 类别
/// 有结算有发运
/// 有结算无发运
/// 无结算有发运
/// </summary>
[Display(Name = "类别")]
[ExporterHeader(DisplayName = "类别")]
[ValueMapping("有结算有发运", 1)]
[ValueMapping("有结算无发运", 2)]
[ValueMapping("无结算有发运", 3)]
public EnumPubSaSeCompareCategory Category { get; set; }
/// <summary>
/// Wms发货单号
/// </summary>
[Display(Name = "Wms发货单号")]
[ExporterHeader(DisplayName = "交货单号")]
public string WmsBillNum { get; set; }
/// <summary>
///
/// </summary>
[Display(Name = "发货日期")]
[ExporterHeader(DisplayName = "发货日期", Format = "yyyy-MM-dd")]
public DateTime ShippingDate { get; set; }
/// <summary>
/// 生产码
/// </summary>
[Display(Name = "生产码")]
[ExporterHeader(DisplayName = "ASN发货单号")]
public string PN { get; set; }
/// <summary>
/// 物料号
/// </summary>
[Display(Name = "物料号")]
[ExporterHeader(DisplayName = "厂内物料号")]
public string MaterialNumber { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[Display(Name = "物料描述")]
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDes { get; set; }
/// <summary>
/// 原始LU
/// </summary>
[Display(Name = "原始LU")]
[ExporterHeader(DisplayName = "原始LU")]
public string PrimitiveLU { get; set; }
/// <summary>
///替换LU
/// </summary>
[Display(Name = "替换LU")]
[ExporterHeader(DisplayName = "替换LU")]
public string ReplaceLU { get; set; }
/// <summary>
/// 结算数据中的过账日期
/// </summary>
[Display(Name = "客户下线时间")]
[ExporterHeader(DisplayName = "客户下线时间")]
public DateTime CustomerOfflineTime { get; set; }
/// <summary>
/// 结算数量
/// </summary>
[Display(Name = "结算数量")]
[ExporterHeader(DisplayName = "结算数量")]
public decimal SAQty { get; set; }
/// <summary>
/// 发货数量
/// </summary>
[Display(Name = "发货数量")]
[ExporterHeader(DisplayName = "WMS发货数量")]
public decimal SEQty { get; set; }
/// <summary>
/// 差异数量
/// </summary>
[ExporterHeader(DisplayName = "差异数量")]
public decimal DiffQty { set; get; }
/// <summary>
/// 匹配类型
/// </summary>
[Display(Name = "匹配类型")]
[ExporterHeader(DisplayName = "是否完全匹配")]
public string MateType { get; set; }
/// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
[ExporterHeader(DisplayName = "定价")]
public decimal FixPrice { get; set; }
/// <summary>
/// 日顺序号
/// </summary>
[Display(Name = "日顺序号")]
[ExporterHeader(DisplayName = "日顺序号")]
public string SeqNumber { get; set; }
/// <summary>
/// PJIS日顺序号
/// </summary>
[Display(Name = "PJIS日顺序号")]
[ExporterHeader(DisplayName = "PJIS日顺序号")]
public string PJISSeqNumber { get; set; }
}
/// <summary>
/// PUB结算与发运对比汇总
/// </summary>
[ExcelExporter(MaxRowNumberOnASheet = 900000)]
public class PubSaSeCompareSumExport
{
/// <summary>
/// LU
/// </summary>
[Display(Name = "LU")]
[ExporterHeader(DisplayName = "LU")]
public string LU { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[Display(Name = "物料描述")]
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDes { get; set; }
/// <summary>
/// 结算数量
/// </summary>
[Display(Name = "结算数量")]
[ExporterHeader(DisplayName = "结算数量")]
public decimal SAQty { get; set; }
/// <summary>
/// 发货数量
/// </summary>
[Display(Name = "发货数量")]
[ExporterHeader(DisplayName = "WMS发货数量")]
public decimal SEQty { get; set; }
/// <summary>
/// 差异数量
/// </summary>
[ExporterHeader(DisplayName = "差异数量")]
public decimal DiffQty { set; get; }
}
[ExcelExporter(MaxRowNumberOnASheet = 900000)]
public class PubSaSeCompareDiffExport222
{
/// <summary>
/// 有结算无发货(无EDI数据)
///有结算无发货(有EDI数据)
@ -23,31 +302,28 @@ public class PubSaSeCompareDiff
///有结算有发货(WMS多发)
/// </summary>
[Display(Name = "类别")]
public string Category { get; set; } = null!;
//[Display(Name = "Wms发货单号")]
//public string WmsBillNum { get; set; } = null!;
public string Category { get; set; }
//[Display(Name = "发货时间")]
//public DateTime ShippingDate { get; set; }
[Display(Name = "Wms发货单号")]
public string WmsBillNum { get; set; }
//[Display(Name = "生产码")]
//public string PN { get; set; } = null!;
[Display(Name = "发货日期")]
public DateTime ShippingDate { get; set; }
[Display(Name = "日顺序号")]
public string SeqNumber { get; set; } = null!;
[Display(Name = "PJIS日顺序号")]
public string PJISSeqNumber { get; set; } = null!;
[Display(Name = "生产码")]
public string PN { get; set; }
[Display(Name = "物料号")]
public string MaterialNumber { get; set; } = null!;
public string MaterialNumber { get; set; }
[Display(Name = "物料描述")]
public string MaterialDes { get; set; } = null!;
public string MaterialDes { get; set; }
//[Display(Name = "零件号")]
//public string LU { get; set; } = null!;
[Display(Name = "原始LU")]
public string PrimitiveLU { get; set; }
[Display(Name = "替换LU")]
public string ReplaceLU { get; set; }
/// <summary>
/// 结算数据中的过账日期
@ -55,24 +331,59 @@ public class PubSaSeCompareDiff
[Display(Name = "客户下线时间")]
public DateTime CustomerOfflineTime { get; set; }
[Display(Name = "小总成号")]
public string AssemblyCode { get; set; }
[Display(Name = "注塑码")]
public string InjectionCode { get; set; }
[Display(Name = "结算数量")]
public decimal SAQty { get; set; }
[Display(Name = "发货数量")]
public decimal SEQty { get; set; }
/// <summary>
/// 差异数量
/// </summary>
[ExporterHeader(DisplayName = "差异数量")]
public decimal DiffQty { set; get; }
[Display(Name = "匹配类型")]
public string MateType { get; set; }
[Display(Name = "定价")]
public decimal FixPrice { get; set; }
[Display(Name = "PJIS日顺序号")]
public string PJISSeqNumber { get; set; }
[Display(Name = "日顺序号")]
public string SeqNumber { get; set; }
//[Display(Name = "零件号")]
//public string LU { get; set; } = null!;
[Display(Name = "小总成号")]
public string AssemblyCode { get; set; }
[Display(Name = "注塑码")]
public string InjectionCode { get; set; }
[Display(Name = "期间")]
public int Version { get; set; }
@ -116,9 +427,5 @@ public class PubSaSeCompareDiff
[ExporterHeader(DisplayName = "发运数量")]
public decimal SeQty { set; get; }
/// <summary>
/// 差异数量
/// </summary>
[ExporterHeader(DisplayName = "差异数量")]
public decimal DiffQty { set; get; }
}

108
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs

@ -1,20 +1,24 @@
using System;
using System.Collections.Generic;
using Magicodes.ExporterAndImporter.Excel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using Magicodes.ExporterAndImporter.Excel;
using Microsoft.OpenApi.Extensions;
using NetTopologySuite.Operation.Buffer;
using SettleAccount.Domain.BQ;
using Shouldly;
using TaskJob.EventArgs;
using TaskJob.Interfaces;
using Volo.Abp.BlobStoring;
using Volo.Abp.DependencyInjection;
using Volo.Abp.ObjectMapping;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.Shared.RepositoryBase;
using SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
using Shouldly;
using Volo.Abp.BlobStoring;
using Win.Sfs.SettleAccount.Reports;
using Newtonsoft.Json.Schema;
using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Entities.Prices;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Enums;
using Win.Sfs.SettleAccount.Reports;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
using Win.Sfs.Shared.RepositoryBase;
namespace SettleAccount.Job.Services.Report
{
@ -42,6 +46,8 @@ namespace SettleAccount.Job.Services.Report
private readonly IBlobContainer<MyFileContainer> _fileContainer;
private readonly IObjectMapper _objectMapper;
/// <summary>
/// 构造
/// </summary>
@ -49,25 +55,54 @@ namespace SettleAccount.Job.Services.Report
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository,
INormalEfCoreRepository<TB_RePartsRelationship, Guid> tbRePartsRelationshipRepository,
PubSaSeCompareDapperRepository pubSaSeCompareDapperRepository,
IBlobContainer<MyFileContainer> fileContainer)
IBlobContainer<MyFileContainer> fileContainer,
IObjectMapper objectMapper)
{
_pubSaDetailRepository = pubSaDetailRepository;
_pubSeDetailRepository = pubSeDetailRepository;
_tbRePartsRelationshipRepository = tbRePartsRelationshipRepository;
_pubSaSeCompareDapperRepository = pubSaSeCompareDapperRepository;
_fileContainer = fileContainer;
_objectMapper = objectMapper;
}
/// <summary>
/// 导出
/// 输出报表
/// 结算核对明细输出
/// 结算核对汇总输出
/// 有结算有发货明细输出
/// 有结算有发货汇总输出
/// 有结算无发货明细输出
/// 有结算无发货汇总输出
/// </summary>
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
{
var version = property.Where(p => p.Name == "Version").FirstOrDefault().Value;
var businessType = property.Where(t => t.Name == "BusinessType").FirstOrDefault().Value;
var lu = property.Where(p => p.Name == "LU").FirstOrDefault().Value;
var pn = property.Where(p => p.Name == "PN").FirstOrDefault().Value;
var businessTypeDisplayName = businessType.ToString();
DisplayAttribute attributeOfType = ((EnumBusinessType)Enum.Parse(typeof(EnumBusinessType), businessType)).GetAttributeOfType<DisplayAttribute>();
if (attributeOfType != null)
{
businessTypeDisplayName = attributeOfType.Name;
}
var filename = exportName.FirstOrDefault();
var pubSaSeCompareDiffs = _pubSaSeCompareDapperRepository.GetDetailDiffReportList(businessType);
pubSaSeCompareDiffs.ForEach(p =>
{
p.Category = (string.IsNullOrEmpty(p.SaLU), string.IsNullOrEmpty(p.SeLU)) switch
{
(false, false) => EnumPubSaSeCompareCategory.HaveSaHaveSe,
(false, true) => EnumPubSaSeCompareCategory.HaveSaNotHaveSe,
(true, false) => EnumPubSaSeCompareCategory.NotHaveSaHaveSe,
_ => EnumPubSaSeCompareCategory.None,
};
});
//有结算有发运
var haveSaHaveSe = new List<PubSaSeCompareDiff>();
//有结算无发运
@ -79,9 +114,10 @@ namespace SettleAccount.Job.Services.Report
haveSaNotHaveSe = pubSaSeCompareDiffs.FindAll(t => !string.IsNullOrEmpty(t.SaLU) && string.IsNullOrEmpty(t.SeLU));
notHaveSaHaveSe = pubSaSeCompareDiffs.FindAll(t => string.IsNullOrEmpty(t.SaLU) && !string.IsNullOrEmpty(t.SeLU));
#region 二次对比
//二次对比(替换零件号)
var repLUs = notHaveSaHaveSe.Select(t => t.SeLU).Distinct().ToList();
var tbRePartsRelationships = _tbRePartsRelationshipRepository.GetListAsync(t => repLUs.Contains(t.RepLU) && ((int)t.BusinessType).ToString() == businessType).Result;
var tbRePartsRelationships = _tbRePartsRelationshipRepository.GetListAsync(t => repLUs.Contains(t.RepLU) && ((int)t.BusinessType).ToString() == businessType).Result;
tbRePartsRelationships.ForEach(tbRePartsRelationship =>
{
@ -91,9 +127,48 @@ namespace SettleAccount.Job.Services.Report
t.SeLU = tbRePartsRelationship.LU;
});
});
#endregion
if (string.IsNullOrEmpty(lu) == false)
{
pubSaSeCompareDiffs = pubSaSeCompareDiffs.FindAll(p => p.SaLU == lu || p.SeLU == lu);
}
if (string.IsNullOrEmpty(pn) == false)
{
pubSaSeCompareDiffs = pubSaSeCompareDiffs.FindAll(p => p.SaPN == pn || p.SePN == pn);
}
var pubSaSeCompareDiffExports = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExport>>(pubSaSeCompareDiffs);
//有结算有发运
var haveSaHaveSeExports = pubSaSeCompareDiffExports.FindAll(t => t.Category == EnumPubSaSeCompareCategory.HaveSaHaveSe);
////有结算有发运汇总
//var haveSaHaveSeSumExports = haveSaHaveSeExports.GroupBy(p => p.ReplaceLU).Select(p => new PubSaSeCompareSumExport()
//{
// LU= p.Key,
// MaterialDes = p.FirstOrDefault().MaterialDes,
// SAQty =
//});
//有结算无发运
var haveSaNotHaveSeExports = pubSaSeCompareDiffExports.FindAll(t => t.Category == EnumPubSaSeCompareCategory.HaveSaNotHaveSe);
//无结算有发运
var notHaveSaHaveSeExports = pubSaSeCompareDiffExports.FindAll(t => t.Category == EnumPubSaSeCompareCategory.NotHaveSaHaveSe);
#region MyRegion
#endregion
//var add = from item1 in pubSaSeCompareDiffs
// join item2 in pubSaSeCompareDiffs
// on new { item1.SaLU, item1.SaPN }
// equals new { item2.SeLU, item2.SePN }
// into temp
// from itm3 in temp.DefaultIfEmpty()
// where itm3 == null
// select item1;
@ -115,18 +190,19 @@ namespace SettleAccount.Job.Services.Report
//var query = BlobProviderSelectorExtensions
ExcelExporter excelExporter = new ExcelExporter();
var result = excelExporter
.Append(pubSaSeCompareDiffs, "汇总表")
.Append(pubSaSeCompareDiffExports, $"{businessTypeDisplayName}汇总表")
.SeparateBySheet()
.Append(haveSaHaveSe, "有结算有发运")
.Append(haveSaHaveSeExports, $"{businessTypeDisplayName}有结算有发运")
.SeparateBySheet()
.Append(haveSaNotHaveSe, "有结算无发运")
.Append(haveSaNotHaveSeExports, $"{businessTypeDisplayName}有结算无发运")
.SeparateBySheet()
.Append(notHaveSaHaveSe, "无结算有发运")
.Append(notHaveSaHaveSeExports, $"{businessTypeDisplayName}无结算有发运")
.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();
//_fileContainer.SaveAsync(filename, result.Result, true);
_fileContainer.SaveAsync(filename, result.Result, true);
return id.ToString();

21
code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobAutoMapperProfile.cs

@ -0,0 +1,21 @@
using AutoMapper;
using Win.Sfs.SettleAccount.Reports;
namespace SettleAccount.Job
{
public class SettleAccountJobAutoMapperProfile : Profile
{
public SettleAccountJobAutoMapperProfile()
{
CreateMapPubSaSeCompare();
}
/// <summary>
/// Pub结算与发运对比
/// </summary>
private void CreateMapPubSaSeCompare()
{
CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExport>().ReverseMap();
}
}
}

9
code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

@ -36,6 +36,7 @@ namespace Win.Sfs.SettleAccount
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
ConfigureAutoMapper();
GlobalJobFilters.Filters.Add(new AutomaticRetryAttribute{ Attempts = 0});
context.Services.AddTransient<PubSaSeCompareExportService>();
@ -263,5 +264,13 @@ namespace Win.Sfs.SettleAccount
});
}
/// <summary>
/// AutoMapper
/// </summary>
private void ConfigureAutoMapper()
{
Configure<AbpAutoMapperOptions>(options => { options.AddMaps<SettleAccountJobModule>(); });
}
}
}

Loading…
Cancel
Save