Browse Source

备件价格单

master
mahao 1 year ago
parent
commit
ac20d903ff
  1. 27
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs
  2. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs
  3. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs
  4. 33
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs
  5. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BeiSeSyncAppService.cs
  6. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/YinDuSeSyncAppService.cs
  7. 65
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
  8. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SA.cs
  9. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs
  10. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIT_RECORD.cs

27
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs

@ -293,58 +293,55 @@ public class PriceListBJExportDto
/// <summary> /// <summary>
/// 客户备件价格导入 /// 客户备件价格导入
/// </summary> /// </summary>
[Importer(HeaderRowIndex = 22)]
public class PriceListBJImportDto public class PriceListBJImportDto
{ {
/// <summary> /// <summary>
/// 客户零件号 /// 客户零件号
/// </summary> /// </summary>
[Display(Name = "客户零件号")] [Display(Name = "客户零件号")]
[ImporterHeader(Name = "Part No.")] [ImporterHeader(Name = "客户零件号")]
public string LU { get; set; } public string LU { get; set; }
/// <summary> /// <summary>
/// 价格 /// 价格
/// </summary> /// </summary>
[Display(Name = "客户零件号")] [Display(Name = "价格")]
[ImporterHeader(Name = "Total Price")] [ImporterHeader(Name = "价格")]
public decimal Price { get; set; } public decimal Price { get; set; }
/// <summary> /// <summary>
/// 开始时间 /// 开始时间
/// </summary> /// </summary>
[Display(Name = "开始时间")] [Display(Name = "开始时间")]
[ImporterHeader(Name = "Valid From")] [ImporterHeader(Name = "开始时间")]
public DateTime BeginDate { set; get; } public DateTime BeginDate { set; get; }
/// <summary> /// <summary>
/// 结束时间 /// 结束时间
/// </summary> /// </summary>
[Display(Name = "结束时间")] [Display(Name = "结束时间")]
[ImporterHeader(Name = "Valid To")] [ImporterHeader(Name = "结束时间")]
public DateTime EndDate { set; get; } public DateTime EndDate { set; get; }
/// <summary> /// <summary>
/// 客户编码 /// 客户编码
/// </summary> /// </summary>
[Display(Name = "客户零件号")] [Display(Name = "客户编码")]
[ImporterHeader(Name = "Plant")] [ImporterHeader(Name = "客户编码")]
public string ClientCode { get; set; } public string ClientCode { get; set; }
/// <summary> /// <summary>
/// 合同签订时间 /// 合同签订时间
/// </summary> /// </summary>
[Display(Name = "客户零件号")] [Display(Name = "合同签订时间")]
[ImporterHeader(IsIgnore = true)] [ImporterHeader(Name = "合同签订时间")]
[ExcelImporterHeadDesc(Row = 1, Cell = 1)] public DateTime Date { get; set; }
public string Date { get; set; }
/// <summary> /// <summary>
/// 合同号 /// 合同号
/// </summary> /// </summary>
[Display(Name = "客户零件号")] [Display(Name = "合同号")]
[ImporterHeader(IsIgnore = true)] [ImporterHeader(Name = "合同号")]
[ExcelImporterHeadDesc(Row = 2, Cell = 1)]
public string ContractNo { get; set; } public string ContractNo { get; set; }
} }

8
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs

@ -5,6 +5,7 @@ using System.LinqAsync;
using System.Security.Policy; using System.Security.Policy;
using System.Threading.Tasks; using System.Threading.Tasks;
using AutoMapper; using AutoMapper;
using EFCore.BulkExtensions;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
@ -306,6 +307,7 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase<BBAC_SA>
var bbacCanSa = new BBAC_CAN_SA() var bbacCanSa = new BBAC_CAN_SA()
{ {
BillNum = bbacCanSaBillNum, BillNum = bbacCanSaBillNum,
InvGroupNum = bbacCanSaBillNum,
SettleBillNum = bbacSaBillNum, SettleBillNum = bbacSaBillNum,
State = SettleBillState., State = SettleBillState.,
BusinessType = _businessType BusinessType = _businessType
@ -323,6 +325,7 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase<BBAC_SA>
bbacSaDetails.ForEach(bbacSaDetail => bbacSaDetails.ForEach(bbacSaDetail =>
{ {
bbacSaDetail.SetId(GuidGenerator.Create());
List<string> lus = bbacSaDetail.LU.Split(" ").ToList(); List<string> lus = bbacSaDetail.LU.Split(" ").ToList();
bbacSaDetail.LU = lus[0].Replace(" ", ""); bbacSaDetail.LU = lus[0].Replace(" ", "");
if (lus.Count > 1) if (lus.Count > 1)
@ -379,10 +382,9 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase<BBAC_SA>
#region 添加入库 #region 添加入库
await _bbacSaRepository.InsertAsync(bbacSa); await _bbacSaRepository.InsertAsync(bbacSa);
await _bbacSaDetailRepository.InsertManyAsync(bbacSaDetails); await _bbacSaDetailRepository.DbContext.BulkInsertAsync(bbacSaDetails);
if (bbacCanSaDetails.Count > 0) if (bbacCanSaDetails.Count > 0)
{ {
bbacCanSa.InvGroupNum = bbacCanSaDetails.Count.ToString();
bbacCanSaDetails.ForEach(bbacCanSaDetail => bbacCanSaDetails.ForEach(bbacCanSaDetail =>
{ {
bbacCanSaDetail.BillNum = bbacCanSaDetail.InvGroupNum = bbacCanSaBillNum; bbacCanSaDetail.BillNum = bbacCanSaDetail.InvGroupNum = bbacCanSaBillNum;
@ -390,7 +392,7 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase<BBAC_SA>
}); });
await _bbacCanSaRepository.InsertAsync(bbacCanSa); await _bbacCanSaRepository.InsertAsync(bbacCanSa);
await _bbacCanSaDetailRepository.InsertManyAsync(bbacCanSaDetails); await _bbacCanSaDetailRepository.DbContext.BulkInsertAsync(bbacCanSaDetails);
} }
if (bbacNotSaDetails.Count > 0) if (bbacNotSaDetails.Count > 0)
{ {

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

@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using EFCore.BulkExtensions;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
@ -305,6 +306,7 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase<HBPO_SA>
var hbpoCanSa = new HBPO_CAN_SA() var hbpoCanSa = new HBPO_CAN_SA()
{ {
BillNum = hbpoCanSaBillNum, BillNum = hbpoCanSaBillNum,
InvGroupNum = hbpoCanSaBillNum,
SettleBillNum = hbpoSaBillNum, SettleBillNum = hbpoSaBillNum,
State = SettleBillState., State = SettleBillState.,
BusinessType = _businessType, BusinessType = _businessType,
@ -323,6 +325,7 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase<HBPO_SA>
hbpoSaDetails.ForEach(hbpoSaDetail => hbpoSaDetails.ForEach(hbpoSaDetail =>
{ {
hbpoSaDetail.SetId(GuidGenerator.Create());
List<string> lus = hbpoSaDetail.LU.Split(" ").ToList(); List<string> lus = hbpoSaDetail.LU.Split(" ").ToList();
hbpoSaDetail.LU = lus[0].Replace(" ", ""); hbpoSaDetail.LU = lus[0].Replace(" ", "");
if (lus.Count > 1) if (lus.Count > 1)
@ -379,21 +382,20 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase<HBPO_SA>
#region 添加入库 #region 添加入库
await _hbpoSaRepository.InsertAsync(hbpoSa).ConfigureAwait(false); await _hbpoSaRepository.InsertAsync(hbpoSa).ConfigureAwait(false);
await _hbpoSaDetailRepository.InsertManyAsync(hbpoSaDetails).ConfigureAwait(false); await _hbpoSaDetailRepository.DbContext.BulkInsertAsync(hbpoSaDetails).ConfigureAwait(false);
if (hbpoCanSaDetails.Count > 0) if (hbpoCanSaDetails.Count > 0)
{ {
hbpoCanSa.InvGroupNum = hbpoCanSaDetails.Count.ToString();
hbpoCanSaDetails.ForEach(hbpoCanSaDetail => hbpoCanSaDetails.ForEach(hbpoCanSaDetail =>
{ {
hbpoCanSaDetail.BillNum = hbpoCanSaDetail.InvGroupNum = hbpoCanSaBillNum; hbpoCanSaDetail.BillNum = hbpoCanSaDetail.InvGroupNum = hbpoCanSaBillNum;
}); });
await _hbpoCanSaRepository.InsertAsync(hbpoCanSa).ConfigureAwait(false); await _hbpoCanSaRepository.InsertAsync(hbpoCanSa).ConfigureAwait(false);
await _hbpoCanSaDetailRepository.InsertManyAsync(hbpoCanSaDetails).ConfigureAwait(false); await _hbpoCanSaDetailRepository.DbContext.BulkInsertAsync(hbpoCanSaDetails).ConfigureAwait(false);
} }
if (hbpoNotSaDetails.Count > 0) if (hbpoNotSaDetails.Count > 0)
{ {
await _hbpoNotSaDetailRepository.InsertManyAsync(hbpoNotSaDetails).ConfigureAwait(false); await _hbpoNotSaDetailRepository.DbContext.BulkInsertAsync(hbpoNotSaDetails).ConfigureAwait(false);
} }
if (materialRelationships.Count > 0) if (materialRelationships.Count > 0)
{ {

33
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs

@ -67,6 +67,11 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase<PUB_SA>
/// </summary> /// </summary>
private readonly INormalEfCoreRepository<PriceList, Guid> _priceListRepository; private readonly INormalEfCoreRepository<PriceList, Guid> _priceListRepository;
/// <summary>
/// 备件价格仓储
/// </summary>
private readonly INormalEfCoreRepository<PriceListBJ, Guid> _priceBjListRepository;
/// <summary> /// <summary>
/// 客户零件关系仓储 /// 客户零件关系仓储
/// </summary> /// </summary>
@ -86,6 +91,7 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase<PUB_SA>
INormalEfCoreRepository<PUB_CAN_SA_DETAIL, Guid> pubCanSaDetailRepository, INormalEfCoreRepository<PUB_CAN_SA_DETAIL, Guid> pubCanSaDetailRepository,
INormalEfCoreRepository<PUB_NOT_SA_DETAIL, Guid> pubNotSaDetailRepository, INormalEfCoreRepository<PUB_NOT_SA_DETAIL, Guid> pubNotSaDetailRepository,
INormalEfCoreRepository<PriceList, Guid> priceListRepository, INormalEfCoreRepository<PriceList, Guid> priceListRepository,
INormalEfCoreRepository<PriceListBJ, Guid> priceBjListRepository,
INormalEfCoreRepository<MaterialRelationship, Guid> materialRelationshipRepository, INormalEfCoreRepository<MaterialRelationship, Guid> materialRelationshipRepository,
INormalEfCoreRepository<TB_RePartsRelationship, Guid> tbRePartsRelationshipRepository, INormalEfCoreRepository<TB_RePartsRelationship, Guid> tbRePartsRelationshipRepository,
IDistributedCache<PUB_SA> cache, IDistributedCache<PUB_SA> cache,
@ -100,6 +106,7 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase<PUB_SA>
_pubCanSaDetailRepository = pubCanSaDetailRepository; _pubCanSaDetailRepository = pubCanSaDetailRepository;
_pubNotSaDetailRepository = pubNotSaDetailRepository; _pubNotSaDetailRepository = pubNotSaDetailRepository;
_priceListRepository = priceListRepository; _priceListRepository = priceListRepository;
_priceBjListRepository = priceBjListRepository;
_materialRelationshipRepository = materialRelationshipRepository; _materialRelationshipRepository = materialRelationshipRepository;
_tbRePartsRelationshipRepository = tbRePartsRelationshipRepository; _tbRePartsRelationshipRepository = tbRePartsRelationshipRepository;
} }
@ -460,9 +467,6 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase<PUB_SA>
var materialRelationships = new List<MaterialRelationship>(); var materialRelationships = new List<MaterialRelationship>();
#region 处理结算数据 #region 处理结算数据
//销售价格
var priceListEntitys = await _priceListRepository.GetAllAsync().ConfigureAwait(false);
pubSaDetails.ForEach(importPubSaDetail => pubSaDetails.ForEach(importPubSaDetail =>
{ {
importPubSaDetail.SetId(GuidGenerator.Create()); importPubSaDetail.SetId(GuidGenerator.Create());
@ -479,11 +483,30 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase<PUB_SA>
importPubSaDetail.Version = _version; importPubSaDetail.Version = _version;
importPubSaDetail.BusinessType = businessType; importPubSaDetail.BusinessType = businessType;
importPubSaDetail.Site = "XX工厂"; importPubSaDetail.Site = "XX工厂";
});
var lus = pubSaDetails.Select(t => t.LU).Distinct().ToList();
if (businessType == EnumBusinessType.BeiJian)
{
//备件销售价格
var priceListEntitys = _priceBjListRepository.Where(t => lus.Contains(t.LU)).ToList();
pubSaDetails.ForEach(importPubSaDetail =>
{
//根据物料号、结算日期获取价格 //根据物料号、结算日期获取价格
var priceListEntity = priceListEntitys.Find(t => t.LU == importPubSaDetail.LU && importPubSaDetail.SettleDate > t.BeginTime && importPubSaDetail.SettleDate < t.EndTime); var priceListEntity = priceListEntitys.Find(t => t.LU == importPubSaDetail.LU && importPubSaDetail.SettleDate >= t.BeginDate && importPubSaDetail.SettleDate <= t.EndDate);
importPubSaDetail.Price = priceListEntity?.Price ?? 0; importPubSaDetail.Price = priceListEntity?.Price ?? 0;
}); });
}
else
{
//销售价格
var priceListEntitys = _priceListRepository.Join(lus, a => a.LU, b => b, (a, b) => a).ToList();
pubSaDetails.ForEach(importPubSaDetail =>
{
//根据物料号、结算日期获取价格
var priceListEntity = priceListEntitys.Find(t => t.LU == importPubSaDetail.LU && importPubSaDetail.SettleDate >= t.BeginTime && importPubSaDetail.SettleDate <= t.EndTime);
importPubSaDetail.Price = priceListEntity?.Price ?? 0;
});
}
//导入的零件号集合 //导入的零件号集合
var importPubSaLUs = pubSaDetails.Select(t => t.LU).Distinct(); var importPubSaLUs = pubSaDetails.Select(t => t.LU).Distinct();

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BeiSeSyncAppService.cs

@ -36,7 +36,7 @@ public class BeiSeSyncAppService : JitSeSyncAppService, IJobService
SyncDeliverBillType = EnumDeliverBjBmpBillType.4S备件, SyncDeliverBillType = EnumDeliverBjBmpBillType.4S备件,
SyncDeliverSubBillTypes = new List<EnumDeliverSubBillType> SyncDeliverSubBillTypes = new List<EnumDeliverSubBillType>
{ {
EnumDeliverSubBillType. EnumDeliverSubBillType.4S备件BBAC
}, },
BusinessType = EnumBusinessType.BeiJian BusinessType = EnumBusinessType.BeiJian
}; };

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/YinDuSeSyncAppService.cs

@ -36,7 +36,7 @@ public class YinDuSeSyncAppService : JitSeSyncAppService, IJobService
SyncDeliverBillType = EnumDeliverBjBmpBillType., SyncDeliverBillType = EnumDeliverBjBmpBillType.,
SyncDeliverSubBillTypes = new List<EnumDeliverSubBillType> SyncDeliverSubBillTypes = new List<EnumDeliverSubBillType>
{ {
EnumDeliverSubBillType. EnumDeliverSubBillType.BBAC
}, },
BusinessType = EnumBusinessType.YinDuJian BusinessType = EnumBusinessType.YinDuJian
}; };

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

@ -562,8 +562,7 @@ namespace Win.Sfs.SettleAccount
/// </summary> /// </summary>
private void CreateMapPriceListBJ() private void CreateMapPriceListBJ()
{ {
CreateMap<PriceListBJImportDto, PriceListBJ>() CreateMap<PriceListBJImportDto, PriceListBJ>();
.ForMember(x => x.Date, y => y.MapFrom(y => DateTime.ParseExact(y.Date, "dd.MM.yyyy", System.Globalization.CultureInfo.CurrentCulture)));
CreateMap<PriceListBJ, PriceListBJDto>().ReverseMap(); CreateMap<PriceListBJ, PriceListBJDto>().ReverseMap();
CreateMap<PriceListBJ, PriceListBJRequestDto>().ReverseMap(); CreateMap<PriceListBJ, PriceListBJRequestDto>().ReverseMap();
@ -1128,66 +1127,66 @@ namespace Win.Sfs.SettleAccount
/// </summary> /// </summary>
private void CreateMapSeSync() private void CreateMapSeSync()
{ {
CreateMap<TM_BJBMPT_JIT_RECORD, BBAC_SE_DETAIL>() CreateMap<TM_BJBMPT_JIS_RECORD, BBAC_SE_DETAIL>()
.ForMember(x => x.SeqNumber, y => y.MapFrom(d => d.Seq)) .ForMember(x => x.SeqNumber, y => y.MapFrom(d => d.JISNum))
.ForMember(x => x.AssemblyCode, y => y.MapFrom(d => d.MatchNumber)) .ForMember(x => x.AssemblyCode, y => y.MapFrom(d => d.RealPartCode))
.ForMember(x => x.InjectionCode, y => y.MapFrom(d => d.UniqueCode)) .ForMember(x => x.InjectionCode, y => y.MapFrom(d => d.DeliverCode))
.ForMember(x => x.BeginDate, y => y.MapFrom(d => d.AssembleData)) .ForMember(x => x.BeginDate, y => y.MapFrom(d => d.BillTime))
.ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime)) .ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime))
.ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum)) .ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
.ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode)) .ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode))
.ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode)) .ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode))
.ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode)) .ForMember(x => x.PN, y => y.MapFrom(d => d.OrderNum))
.ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty)); .ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
CreateMap<TM_BJBMPT_JIT_RECORD, HBPO_SE_DETAIL>() CreateMap<TM_BJBMPT_JIS_RECORD, HBPO_SE_DETAIL>()
.ForMember(x => x.SeqNumber, y => y.MapFrom(d => d.Seq)) .ForMember(x => x.SeqNumber, y => y.MapFrom(d => d.JISNum))
.ForMember(x => x.AssemblyCode, y => y.MapFrom(d => d.MatchNumber)) .ForMember(x => x.AssemblyCode, y => y.MapFrom(d => d.RealPartCode))
.ForMember(x => x.InjectionCode, y => y.MapFrom(d => d.UniqueCode)) .ForMember(x => x.InjectionCode, y => y.MapFrom(d => d.DeliverCode))
.ForMember(x => x.BeginDate, y => y.MapFrom(d => d.AssembleData)) .ForMember(x => x.BeginDate, y => y.MapFrom(d => d.BillTime))
.ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime)) .ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime))
.ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum)) .ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
.ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode)) .ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode))
.ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode)) .ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode))
.ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode)) .ForMember(x => x.PN, y => y.MapFrom(d => d.OrderNum))
.ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty)); .ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
CreateMap<TM_BJBMPT_JIT_RECORD, PUB_SE_DETAIL>() CreateMap<TM_BJBMPT_JIS_RECORD, PUB_SE_DETAIL>()
.ForMember(x => x.BeginDate, y => y.MapFrom(d => d.AssembleData)) .ForMember(x => x.BeginDate, y => y.MapFrom(d => d.BillTime))
.ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime)) .ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime))
.ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum)) .ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
.ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode)) .ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode))
.ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode)) .ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode))
.ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode)) .ForMember(x => x.PN, y => y.MapFrom(d => d.OrderNum))
.ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty)); .ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
CreateMap<TM_BJBMPT_JIS_RECORD, BBAC_SE_DETAIL>() CreateMap<TM_BJBMPT_JIT_RECORD, BBAC_SE_DETAIL>()
.ForMember(x => x.SeqNumber, y => y.MapFrom(d => d.JISNum)) .ForMember(x => x.SeqNumber, y => y.MapFrom(d => d.Seq))
.ForMember(x => x.AssemblyCode, y => y.MapFrom(d => d.RealPartCode)) .ForMember(x => x.AssemblyCode, y => y.MapFrom(d => d.MatchNumber))
.ForMember(x => x.InjectionCode, y => y.MapFrom(d => d.DeliverCode)) .ForMember(x => x.InjectionCode, y => y.MapFrom(d => d.UniqueCode))
.ForMember(x => x.BeginDate, y => y.MapFrom(d => d.BillTime)) .ForMember(x => x.BeginDate, y => y.MapFrom(d => d.AssembleData))
.ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime)) .ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime))
.ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum)) .ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
.ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode)) .ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode))
.ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode)) .ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode))
.ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode)) .ForMember(x => x.PN, y => y.MapFrom(d => d.JISNum))
.ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty)); .ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
CreateMap<TM_BJBMPT_JIS_RECORD, HBPO_SE_DETAIL>() CreateMap<TM_BJBMPT_JIT_RECORD, HBPO_SE_DETAIL>()
.ForMember(x => x.SeqNumber, y => y.MapFrom(d => d.JISNum)) .ForMember(x => x.SeqNumber, y => y.MapFrom(d => d.Seq))
.ForMember(x => x.AssemblyCode, y => y.MapFrom(d => d.RealPartCode)) .ForMember(x => x.AssemblyCode, y => y.MapFrom(d => d.MatchNumber))
.ForMember(x => x.InjectionCode, y => y.MapFrom(d => d.DeliverCode)) .ForMember(x => x.InjectionCode, y => y.MapFrom(d => d.UniqueCode))
.ForMember(x => x.BeginDate, y => y.MapFrom(d => d.BillTime)) .ForMember(x => x.BeginDate, y => y.MapFrom(d => d.AssembleData))
.ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime)) .ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime))
.ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum)) .ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
.ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode)) .ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode))
.ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode)) .ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode))
.ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode)) .ForMember(x => x.PN, y => y.MapFrom(d => d.JISNum))
.ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty)); .ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
CreateMap<TM_BJBMPT_JIS_RECORD, PUB_SE_DETAIL>() CreateMap<TM_BJBMPT_JIT_RECORD, PUB_SE_DETAIL>()
.ForMember(x => x.BeginDate, y => y.MapFrom(d => d.BillTime)) .ForMember(x => x.BeginDate, y => y.MapFrom(d => d.AssembleData))
.ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime)) .ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime))
.ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum)) .ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
.ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode)) .ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode))
.ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode)) .ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode))
.ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode)) .ForMember(x => x.PN, y => y.MapFrom(d => d.JISNum))
.ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty)); .ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
CreateMap<TM_BJBMPT_OTHER_RECORD, PUB_SE_DETAIL>() CreateMap<TM_BJBMPT_OTHER_RECORD, PUB_SE_DETAIL>()
@ -1196,7 +1195,7 @@ namespace Win.Sfs.SettleAccount
.ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum)) .ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
.ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode)) .ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode))
.ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.PartCode)) .ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.PartCode))
.ForMember(x => x.PN, y => y.MapFrom(d => d.BillNum)) .ForMember(x => x.PN, y => y.MapFrom(d => d.DeliveryIndex))
.ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty)); .ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
} }

5
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SA.cs

@ -153,4 +153,9 @@ public class BBAC_SA_DETAIL:SA_BASE
{ {
} }
public void SetId(Guid id)
{
Id = id;
}
} }

5
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs

@ -142,4 +142,9 @@ public class HBPO_SA_DETAIL : SA_BASE
public HBPO_SA_DETAIL() public HBPO_SA_DETAIL()
{ {
} }
public void SetId(Guid id)
{
Id = id;
}
} }

2
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIT_RECORD.cs

@ -203,4 +203,6 @@ public enum EnumDeliverSubBillType
HBPO = 8, HBPO = 8,
JIT直供件BBAC = 9, JIT直供件BBAC = 9,
JIT直供件HBPO = 10, JIT直供件HBPO = 10,
BBAC = 11,
4S备件BBAC = 12,
} }

Loading…
Cancel
Save