Browse Source

HPBO到货时间映射到结算时间

master
zhouhongjun 11 months ago
parent
commit
62c4acde6b
  1. 16
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SA_DTO.cs
  2. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs
  3. 9
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs

16
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SA_DTO.cs

@ -122,12 +122,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
public class HBPO_SA_DETAIL_IMPORT_DTO
{
/// <summary>
/// 结算日期
/// </summary>
[Display(Name = "ReceiveDate")]
[ImporterHeader(Name = "ReceiveDate", Format = "yyyy/MM/dd HH:mm:ss")]
public DateTime SettleDate { set; get; }
///// <summary>
///// 结算日期
///// </summary>
//[Display(Name = "ReceiveDate")]
//[ImporterHeader(Name = "ReceiveDate", Format = "yyyy/MM/dd HH:mm:ss")]
//public DateTime SettleDate { set; get; }
/// <summary>
/// 结算分组号
/// </summary>
@ -140,8 +140,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
[Display(Name = "DeliveryDate")]
[Required(ErrorMessage = "{0}不能为空")]
[ImporterHeader(Name = "DeliveryDate", Format = "MM/yyyy/dd HH:mm:ss")]
public DateTime? DeliveryDate { get; set; }
[ImporterHeader(Name = "DeliveryDate", Format = "yyyy/MM/dd HH:mm:ss")]
public DateTime DeliveryDate { get; set; }
/// <summary>
/// 客户零件号
/// </summary>

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

@ -224,6 +224,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var exportImporter = new ExportImporter();
var result = await exportImporter.UploadExcelImport<HBPO_SA_DETAIL_IMPORT_DTO>(files, _excelImportService).ConfigureAwait(false);
var importHBOPSaDetails = ObjectMapper.Map<List<HBPO_SA_DETAIL_IMPORT_DTO>, List<HBPO_SA_DETAIL>>(result);
return await SaDataGroupByPlaceAsync(importHBOPSaDetails).ConfigureAwait(false);
}

9
code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs

@ -995,13 +995,18 @@ namespace Win.Sfs.SettleAccount
CreateMap<HBPO_SA_DETAIL, HBPO_SA_DETAIL_DTO>()
.ForMember(x => x.SettleDate, y => y.MapFrom(d => d.SettleDate.ToString("yyyy-MM-dd")));
CreateMap<HBPO_SA_DETAIL, HBPO_CAN_SA_DETAIL>()
.ForMember(x => x.SettleBillNum, y => y.MapFrom(d => d.BillNum));
.ForMember(x => x.SettleBillNum, y => y.MapFrom(d => d.BillNum));
CreateMap<HBPO_SA_DETAIL, HBPO_NOT_SA_DETAIL>()
.ForMember(x => x.SettleBillNum, y => y.MapFrom(d => d.BillNum));
CreateMap<HBPO_SA_DETAIL, HBPO_SA_DETAIL_EXPORT_DTO>();
CreateMap<HBPO_SA_DETAIL_IMPORT_DTO, HBPO_SA_DETAIL>();
CreateMap<HBPO_SA_DETAIL_IMPORT_DTO, HBPO_SA_DETAIL>().
ForMember(x => x.SettleDate, y => y.MapFrom(d => d.DeliveryDate)).ReverseMap();
CreateMap<MaiDanJianHBPOImportDto, HBPO_SA_DETAIL>();
}
/// <summary>

Loading…
Cancel
Save