Browse Source

EF迁移BBAC、HBPO发运数据表结构

master
mahao 1 year ago
parent
commit
701fa2ec1e
  1. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs
  2. 26
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BBACSeSyncAppService.cs
  3. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BeiSeSyncAppService.cs
  4. 18
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/HBPOSeSyncAppService.cs
  5. 23
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JitSeSyncAppService.cs
  6. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/YinDuSeSyncAppService.cs
  7. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/ZhiGongBBACSeSyncAppService.cs
  8. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/ZhiGongHBPOSeSyncAppService.cs
  9. 21
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
  10. 199
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_DETAIL.cs
  11. 201
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SE_DETAIL.cs
  12. 42
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/MaterialRelationshipManager.cs
  13. 5503
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230815054853_20230815-3.Designer.cs
  14. 368
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230815054853_20230815-3.cs
  15. 98
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

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

@ -155,7 +155,6 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase<PUB_SA>
[HttpPost] [HttpPost]
public async Task<PagedResultDto<PUB_SA_DTO>> GetListAsync(PUB_SARequestDto input) public async Task<PagedResultDto<PUB_SA_DTO>> GetListAsync(PUB_SARequestDto input)
{ {
input.Filters.Add(new FilterCondition("BusinessType", input.BusinessType.ToString(), EnumFilterAction.Equal, EnumFilterLogic.And));
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true); var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);
var totalCount = await _repository.GetCountByFilterAsync(input.Filters); var totalCount = await _repository.GetCountByFilterAsync(input.Filters);
var dtos = ObjectMapper.Map<List<PUB_SA>, List<PUB_SA_DTO>>(entities); var dtos = ObjectMapper.Map<List<PUB_SA>, List<PUB_SA_DTO>>(entities);

26
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BBACSeSyncAppService.cs

@ -8,8 +8,10 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore; using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs; namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
@ -36,17 +38,29 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService
/// </summary> /// </summary>
private readonly INormalEfCoreRepository<BBAC_SE_DETAIL, Guid> _bbacSeDetailRepository; private readonly INormalEfCoreRepository<BBAC_SE_DETAIL, Guid> _bbacSeDetailRepository;
/// <summary>
/// 客户零件关系仓储
/// </summary>
private readonly INormalEfCoreRepository<MaterialRelationship, Guid> _materialRelationshipRepository;
/// <summary>
/// 客户零件关系领域
/// </summary>
private readonly MaterialRelationshipManager _materialRelationshipManager;
/// <summary> /// <summary>
/// 构造 /// 构造
/// </summary> /// </summary>
public BBACSeSyncAppService( public BBACSeSyncAppService(
WMSBJBMPTDbContext wmsBJBMPTContext, WMSBJBMPTDbContext wmsBJBMPTContext,
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository, INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<BBAC_SE_DETAIL, Guid> bbacSeDetailRepository) INormalEfCoreRepository<BBAC_SE_DETAIL, Guid> bbacSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager)
{ {
_wmsBJBMPTContext = wmsBJBMPTContext; _wmsBJBMPTContext = wmsBJBMPTContext;
_syncPositionFlagRepository = syncPositionFlagRepository; _syncPositionFlagRepository = syncPositionFlagRepository;
_bbacSeDetailRepository = bbacSeDetailRepository; _bbacSeDetailRepository = bbacSeDetailRepository;
_materialRelationshipManager = materialRelationshipManager;
} }
[ApiExplorerSettings(IgnoreApi = true)] [ApiExplorerSettings(IgnoreApi = true)]
@ -73,7 +87,7 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService
var EnumDeliverSubBillTypes = GetDeliverSubBillTypes(); var EnumDeliverSubBillTypes = GetDeliverSubBillTypes();
Expression<Func<TM_BJBMPT_JIT_RECORD, bool>> predicate = (t) => t.DeliverBillType == EnumDeliverBjBmpBillType.JIS件 && EnumDeliverSubBillTypes.Contains(t.DeliverSubBillType); Expression<Func<TM_BJBMPT_JIT_RECORD, bool>> predicate = (t) => t.DeliverBillType == EnumDeliverBjBmpBillType.JIS件 && EnumDeliverSubBillTypes.Contains(t.DeliverSubBillType);
var syncPositionFlag = await _syncPositionFlagRepository.FindAsync(t => t.TableName == syncTableName); var syncPositionFlag = await _syncPositionFlagRepository.FindAsync(t => t.TableName == syncTableName).ConfigureAwait(false);
if (syncPositionFlag != null) if (syncPositionFlag != null)
{ {
predicate = (t) => t.UID > int.Parse(syncPositionFlag.Position) && t.DeliverBillType == EnumDeliverBjBmpBillType.JIS件 && EnumDeliverSubBillTypes.Contains(t.DeliverSubBillType); predicate = (t) => t.UID > int.Parse(syncPositionFlag.Position) && t.DeliverBillType == EnumDeliverBjBmpBillType.JIS件 && EnumDeliverSubBillTypes.Contains(t.DeliverSubBillType);
@ -85,6 +99,10 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService
var bbacSeDetails = ObjectMapper.Map<List<TM_BJBMPT_JIT_RECORD>, List<BBAC_SE_DETAIL>>(wmsSeRecords); var bbacSeDetails = ObjectMapper.Map<List<TM_BJBMPT_JIT_RECORD>, List<BBAC_SE_DETAIL>>(wmsSeRecords);
if (bbacSeDetails.Any()) if (bbacSeDetails.Any())
{ {
//客户零件号和厂内零件号
var materialRelationships = bbacSeDetails.GroupBy(t => new { t.LU, t.PartCode }).Select(t => new MaterialRelationship(GuidGenerator.Create(), t.Key.LU, "", t.Key.PartCode, ""));
await _materialRelationshipManager.AddNewMaterialRelationships(materialRelationships).ConfigureAwait(false);
bbacSeDetails.ForEach(bbacSeDetail => bbacSeDetails.ForEach(bbacSeDetail =>
{ {
bbacSeDetail.KeyCode = bbacSeDetail.PN + bbacSeDetail.LU; bbacSeDetail.KeyCode = bbacSeDetail.PN + bbacSeDetail.LU;
@ -131,6 +149,10 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService
var bbacSeDetails = ObjectMapper.Map<List<TM_BJBMPT_JIS_RECORD>, List<BBAC_SE_DETAIL>>(wmsRecords); var bbacSeDetails = ObjectMapper.Map<List<TM_BJBMPT_JIS_RECORD>, List<BBAC_SE_DETAIL>>(wmsRecords);
if (bbacSeDetails.Any()) if (bbacSeDetails.Any())
{ {
//客户零件号和厂内零件号
var materialRelationships = bbacSeDetails.GroupBy(t => new { t.LU, t.PartCode }).Select(t => new MaterialRelationship(GuidGenerator.Create(), t.Key.LU, "", t.Key.PartCode, ""));
await _materialRelationshipManager.AddNewMaterialRelationships(materialRelationships).ConfigureAwait(false);
bbacSeDetails.ForEach(bbacSeDetail => bbacSeDetail.KeyCode = bbacSeDetail.PN + bbacSeDetail.LU); bbacSeDetails.ForEach(bbacSeDetail => bbacSeDetail.KeyCode = bbacSeDetail.PN + bbacSeDetail.LU);
await _bbacSeDetailRepository.InsertManyAsync(bbacSeDetails); await _bbacSeDetailRepository.InsertManyAsync(bbacSeDetails);

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

@ -4,8 +4,10 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore; using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs; namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
@ -24,8 +26,9 @@ public class BeiSeSyncAppService : JitSeSyncAppService, IJobService
WMSBJBMPTDbContext wmsBJBMPTContext, WMSBJBMPTDbContext wmsBJBMPTContext,
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository, INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository, INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService VmiAppService vmiService
) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, vmiService) ) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, materialRelationshipManager, vmiService)
{ {
base.SeSyncConfigInfo = new SeSyncConfig() base.SeSyncConfigInfo = new SeSyncConfig()
{ {

18
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/HBPOSeSyncAppService.cs

@ -9,8 +9,10 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore; using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs; namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
@ -42,6 +44,11 @@ public class HBPOSeSyncAppService : ApplicationService, IInvocable, IJobService
/// </summary> /// </summary>
private readonly INormalEfCoreRepository<PUB_SE_DETAIL, Guid> _pubSeDetailRepository; private readonly INormalEfCoreRepository<PUB_SE_DETAIL, Guid> _pubSeDetailRepository;
/// <summary>
/// 客户零件关系领域
/// </summary>
private readonly MaterialRelationshipManager _materialRelationshipManager;
/// <summary> /// <summary>
/// 构造 /// 构造
/// </summary> /// </summary>
@ -49,12 +56,14 @@ public class HBPOSeSyncAppService : ApplicationService, IInvocable, IJobService
WMSBJBMPTDbContext wmsBJBMPTContext, WMSBJBMPTDbContext wmsBJBMPTContext,
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository, INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<HBPO_SE_DETAIL, Guid> hbpoSeDetailRepository, INormalEfCoreRepository<HBPO_SE_DETAIL, Guid> hbpoSeDetailRepository,
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository) INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager)
{ {
_wmsBJBMPTContext = wmsBJBMPTContext; _wmsBJBMPTContext = wmsBJBMPTContext;
_syncPositionFlagRepository = syncPositionFlagRepository; _syncPositionFlagRepository = syncPositionFlagRepository;
_hbpoSeDetailRepository = hbpoSeDetailRepository; _hbpoSeDetailRepository = hbpoSeDetailRepository;
_pubSeDetailRepository = pubSeDetailRepository; _pubSeDetailRepository = pubSeDetailRepository;
_materialRelationshipManager = materialRelationshipManager;
} }
[ApiExplorerSettings(IgnoreApi = true)] [ApiExplorerSettings(IgnoreApi = true)]
@ -186,6 +195,13 @@ public class HBPOSeSyncAppService : ApplicationService, IInvocable, IJobService
/// </summary> /// </summary>
private async Task SaveSeDataAsync(List<HBPO_SE_DETAIL> hbpoSeDetails, List<PUB_SE_DETAIL> maiDanHBPOSeDetails) private async Task SaveSeDataAsync(List<HBPO_SE_DETAIL> hbpoSeDetails, List<PUB_SE_DETAIL> maiDanHBPOSeDetails)
{ {
//客户零件号和厂内零件号
var hbpoSeLuRePartCodes = hbpoSeDetails.Select(t => new { t.LU, t.PartCode });
var maiDanHBPOSeLuRePartCodes = maiDanHBPOSeDetails.Select(t => new { t.LU, t.PartCode });
var luRePartCodes = hbpoSeLuRePartCodes.Union(maiDanHBPOSeLuRePartCodes);
var materialRelationships = luRePartCodes.GroupBy(t => new { t.LU, t.PartCode }).Select(t => new MaterialRelationship(GuidGenerator.Create(), t.Key.LU, "", t.Key.PartCode, ""));
await _materialRelationshipManager.AddNewMaterialRelationships(materialRelationships).ConfigureAwait(false);
hbpoSeDetails.ForEach(hbpoSeDetail => hbpoSeDetail.KeyCode = hbpoSeDetail.PN + hbpoSeDetail.LU); hbpoSeDetails.ForEach(hbpoSeDetail => hbpoSeDetail.KeyCode = hbpoSeDetail.PN + hbpoSeDetail.LU);
maiDanHBPOSeDetails.ForEach(maiDanHBPOSeDetail => maiDanHBPOSeDetails.ForEach(maiDanHBPOSeDetail =>
{ {

23
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JitSeSyncAppService.cs

@ -7,9 +7,11 @@ using Coravel.Invocable;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore; using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.MaterialRelationships; using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.CurrentBranch;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs; namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
@ -36,9 +38,9 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
private readonly INormalEfCoreRepository<PUB_SE_DETAIL, Guid> _pubSeDetailRepository; private readonly INormalEfCoreRepository<PUB_SE_DETAIL, Guid> _pubSeDetailRepository;
/// <summary> /// <summary>
/// 客户零件关系仓储 /// 客户零件关系领域
/// </summary> /// </summary>
private readonly INormalEfCoreRepository<MaterialRelationship, Guid> _materialRelationshipRepository; private readonly MaterialRelationshipManager _materialRelationshipManager;
private readonly IVmiService _vmiService; private readonly IVmiService _vmiService;
@ -49,11 +51,13 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
WMSBJBMPTDbContext wmsBJBMPTContext, WMSBJBMPTDbContext wmsBJBMPTContext,
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository, INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository, INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService) VmiAppService vmiService)
{ {
_wmsBJBMPTContext = wmsBJBMPTContext; _wmsBJBMPTContext = wmsBJBMPTContext;
_syncPositionFlagRepository = syncPositionFlagRepository; _syncPositionFlagRepository = syncPositionFlagRepository;
_pubSeDetailRepository = pubSeDetailRepository; _pubSeDetailRepository = pubSeDetailRepository;
_materialRelationshipManager = materialRelationshipManager;
_vmiService = vmiService; _vmiService = vmiService;
} }
@ -88,20 +92,15 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
var wmsSeRecords = _wmsBJBMPTContext.TM_BJBMPT_OTHER_RECORD.Where(predicate).OrderBy(b => b.UID).ToList(); var wmsSeRecords = _wmsBJBMPTContext.TM_BJBMPT_OTHER_RECORD.Where(predicate).OrderBy(b => b.UID).ToList();
var pubSeDetails = ObjectMapper.Map<List<TM_BJBMPT_OTHER_RECORD>, List<PUB_SE_DETAIL>>(wmsSeRecords); var pubSeDetails = ObjectMapper.Map<List<TM_BJBMPT_OTHER_RECORD>, List<PUB_SE_DETAIL>>(wmsSeRecords);
pubSeDetails.RemoveAll(t => !string.IsNullOrEmpty(t.LU) || !string.IsNullOrEmpty(t.PartCode)); pubSeDetails.RemoveAll(t => string.IsNullOrEmpty(t.LU) || string.IsNullOrEmpty(t.PartCode));
if (pubSeDetails.Any()) if (pubSeDetails.Any())
{ {
//客户零件号和厂内零件号 //客户零件号和厂内零件号
var luRePartCodes = pubSeDetails.Select(t => new { t.LU, t.PartCode }); var luRePartCodes = pubSeDetails.Select(t => new { t.LU, t.PartCode }).Distinct().ToList();
if (luRePartCodes.Any())
var haveLuRePartCodes = (await _materialRelationshipRepository.GetListAsync(t => luRePartCodes.Contains(new { LU = t.ErpMaterialCode, PartCode = t.SettleMaterialCode })).ConfigureAwait(false)).Select(t => new { LU = t.ErpMaterialCode, PartCode = t.SettleMaterialCode });
var noHaveLuRePartCodes = luRePartCodes.Except(haveLuRePartCodes);
if (noHaveLuRePartCodes.Any())
{ {
var materialRelationships = noHaveLuRePartCodes.Select(t => new MaterialRelationship(GuidGenerator.Create(), t.LU, "", t.PartCode, "")); var materialRelationships = luRePartCodes.Select(t => new MaterialRelationship(GuidGenerator.Create(), t.LU, "", t.PartCode, businessType.ToString()));
await _materialRelationshipRepository.InsertManyAsync(materialRelationships).ConfigureAwait(false); await _materialRelationshipManager.AddNewMaterialRelationships(materialRelationships).ConfigureAwait(false);
} }
pubSeDetails.ForEach(t => pubSeDetails.ForEach(t =>

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

@ -4,8 +4,10 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore; using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs; namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
@ -24,8 +26,9 @@ public class YinDuSeSyncAppService : JitSeSyncAppService, IJobService
WMSBJBMPTDbContext wmsBJBMPTContext, WMSBJBMPTDbContext wmsBJBMPTContext,
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository, INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository, INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService VmiAppService vmiService
) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, vmiService) ) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, materialRelationshipManager, vmiService)
{ {
base.SeSyncConfigInfo = new SeSyncConfig() base.SeSyncConfigInfo = new SeSyncConfig()
{ {

5
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/ZhiGongBBACSeSyncAppService.cs

@ -4,8 +4,10 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore; using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs; namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
@ -24,8 +26,9 @@ public class ZhiGongBBACSeSyncAppService : JitSeSyncAppService, IJobService
WMSBJBMPTDbContext wmsBJBMPTContext, WMSBJBMPTDbContext wmsBJBMPTContext,
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository, INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository, INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService VmiAppService vmiService
) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, vmiService) ) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, materialRelationshipManager, vmiService)
{ {
base.SeSyncConfigInfo = new SeSyncConfig() base.SeSyncConfigInfo = new SeSyncConfig()
{ {

5
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/ZhiGongHBPOSeSyncAppService.cs

@ -4,8 +4,10 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore; using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs; namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
@ -24,8 +26,9 @@ public class ZhiGongHBPOSeSyncAppService : JitSeSyncAppService, IJobService
WMSBJBMPTDbContext wmsBJBMPTContext, WMSBJBMPTDbContext wmsBJBMPTContext,
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository, INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository, INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService VmiAppService vmiService
) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, vmiService) ) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, materialRelationshipManager, vmiService)
{ {
base.SeSyncConfigInfo = new SeSyncConfig() base.SeSyncConfigInfo = new SeSyncConfig()
{ {

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

@ -1129,27 +1129,27 @@ namespace Win.Sfs.SettleAccount
private void CreateMapSeSync() private void CreateMapSeSync()
{ {
CreateMap<TM_BJBMPT_JIT_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.PartCode)) .ForMember(x => x.LU, y => y.MapFrom(d => d.PartCode))
.ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode)) .ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode))
.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_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.PartCode)) .ForMember(x => x.LU, y => y.MapFrom(d => d.PartCode))
.ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode)) .ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode))
.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_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.PartCode)) .ForMember(x => x.LU, y => y.MapFrom(d => d.PartCode))
@ -1188,7 +1188,8 @@ namespace Win.Sfs.SettleAccount
.ForMember(x => x.BeginDate, y => y.MapFrom(d => d.AssembleData)) .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.LU, 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.BillNum))
.ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty)); .ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
} }

199
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_DETAIL.cs

@ -1,7 +1,9 @@
using System; using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using SettleAccount.Bases; using SettleAccount.Bases;
using Win.Sfs.SettleAccount; using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
namespace SettleAccount.Domain.BQ; namespace SettleAccount.Domain.BQ;
@ -46,157 +48,196 @@ public class BBAC_SE_DETAIL:SE_BASE
//[Display(Name = "Wms发货单号")] //[Display(Name = "Wms发货单号")]
//public string WmsBillNum { get; set; } = null!; //public string WmsBillNum { get; set; } = null!;
/// <summary> /// <summary>
/// 单据编 /// JIT订单号
/// </summary> /// </summary>
[Display(Name = "单据编号")] [Display(Name = "JIT订单号")]
public string Num { get; set; } [DisplayName("JIT订单号")]
public string JISNum { get; set; }
/// <summary> /// <summary>
/// 发货时间 /// JIT排序生产码
/// </summary> /// </summary>
[Display(Name = "发货时间")] [Display(Name = "JIT排序生产码")]
public DateTime BillTime { get; set; } public string VinCode { get; set; }
/// <summary> /// <summary>
/// 发货人 /// JIT排序生产码类型
/// </summary> /// </summary>
[Display(Name = "发货人")] [Display(Name = "JIT排序生产码类型")]
public string Oper { get; set; } public string CodeType { get; set; }
/// <summary> /// <summary>
/// 排序单 /// 订单零件
/// </summary> /// </summary>
[Display(Name = "排序单号")] [Display(Name = "订单零件号")]
public string OrderNum { get; set; } public string PartCode { get; set; }
/// <summary>
/// 订单零件号
/// </summary>
[Display(Name = "订单零件号")]
public string RealPartCode { get; set; }
/// <summary>
/// 批次
/// </summary>
[Display(Name = "批次")]
public string Batch { get; set; }
/// <summary>
/// 客户零件号
/// </summary>
[Display(Name = "客户零件号")]
public string CustPartCode { get; set; }
/// <summary> /// <summary>
/// 订单序号 /// 订单序号
/// </summary> /// </summary>
[Display(Name = "订单序号")] [Display(Name = "订单序号")]
public string Seq { get; set; } public string Seq { get; set; }
/// <summary> /// <summary>
/// 实际生产码 /// 订单时间
/// </summary> /// </summary>
[Display(Name = "实际生产码")] [Display(Name = "订单时间")]
public string RealCode { get; set; } public DateTime AssembleData { get; set; }
/// <summary> /// <summary>
/// 订单生产码 /// 发货条
/// </summary> /// </summary>
[Display(Name = "订单生产码")] [Display(Name = "发货条码")]
public string VinCode { get; set; } public string DeliverCode { get; set; }
/// <summary> /// <summary>
/// 生产码类型 /// 发货单号
/// </summary> /// </summary>
[Display(Name = "生产码类型")] [Display(Name = "发货单号")]
public string CodeType { get; set; } public string BillNum { get; set; }
/// <summary> /// <summary>
/// 实际零件号 /// 发货时间
/// </summary> /// </summary>
[Display(Name = "实际零件号")] [Display(Name = "发货时间")]
public string RealPartCode { get; set; } public DateTime? BillTime { get; set; }
/// <summary> /// <summary>
/// 零件号 /// 发货人
/// </summary> /// </summary>
[Display(Name = "零件号")] [Display(Name = "发货人")]
public string PartCode { get; set; } public string Oper { get; set; }
/// <summary> /// <summary>
/// 批次 /// 客户位置
/// </summary> /// </summary>
[Display(Name = "批次")] [Display(Name = "客户位置")]
public string Batch { get; set; } public string Position { get; set; }
/// <summary>
/// 工厂
/// </summary>
[Display(Name = "工厂")]
public string Factory { get; set; }
/// <summary> /// <summary>
/// MES配置码 /// MES配置码
/// </summary> /// </summary>
[Display(Name = "MES配置码")] [Display(Name = "MES配置码")]
public string MESConfigCode { get; set; } public string MESConfigCode { get; set; }
/// <summary>
/// 来源库位
/// </summary>
[Display(Name = "来源库位")]
public string FromLoc { get; set; }
/// <summary> /// <summary>
/// 目标库位 /// 目标库位
/// </summary> /// </summary>
[Display(Name = "目标库位")] [Display(Name = "目标库位")]
public string ToLoc { get; set; } public string ToLoc { get; set; }
/// <summary> /// <summary>
/// 参照订单生产码 /// 单据类型
/// </summary> /// </summary>
[Display(Name = "参照订单生产码")] public EnumBillType BillType { get; set; }
public string RefVinCode { get; set; }
/// <summary> /// <summary>
/// 单据性质 /// 子单据类型
/// </summary> /// </summary>
[Display(Name = "单据性质")] [Display(Name = "子单据类型")]
public string BillCharacter { get; set; } public EnumSubBillType SubBillType { get; set; }
/// <summary> /// <summary>
/// 发货关联单号 /// 事务类型
/// </summary> /// </summary>
[Display(Name = "发货关联单号")] [Display(Name = "事务类型")]
public string RefBillNum { get; set; } public EnumDelTransType TransType { get; set; }
/// <summary> /// <summary>
/// Erp目标库位 /// 发运主类型
/// </summary> /// </summary>
[Display(Name = "Erp目标库位")] [Display(Name = "发运主类型")]
public string ErpToLoc { get; set; } public EnumDeliverBjBmpBillType DeliverBillType { get; set; }
/// <summary>
/// 发运子类型
/// </summary>
[Display(Name = "发运子类型")]
public EnumDeliverSubBillType DeliverSubBillType { get; set; }
/// <summary>
/// 单据性质
/// </summary>
[Display(Name = "单据性质")]
public string BillCharacter { get; set; }
/// <summary> /// <summary>
/// 原生产码 /// 原生产码
/// </summary> /// </summary>
[Display(Name = "原生产码")] [Display(Name = "原生产码")]
public string OrigiCode { get; set; } public string OrigiCode { get; set; }
/// <summary>
/// 描述
/// </summary>
[Display(Name = "描述")]
public string PartDesc { get; set; }
/// <summary> /// <summary>
/// 备注 /// 备注
/// </summary> /// </summary>
[Display(Name = "备注")] [Display(Name = "备注")]
public string Remark { get; set; } public string Remark { get; set; }
/// <summary>
/// 业务类型
/// </summary>
[Display(Name = "业务类型")]
public EnumProTpe ProType { get; set; }
/// <summary>
/// JIS排序单号
/// </summary>
[Display(Name = "JIS排序单号")]
public string OrderNum { get; set; }
/// <summary>
/// JIS实际生产码
/// </summary>
[Display(Name = "JIS实际生产码")]
public string RealCode { get; set; }
/// <summary>
/// 来源库位
/// </summary>
[Display(Name = "来源库位")]
public string FromLoc { get; set; }
/// <summary>
/// 参照订单生产码
/// </summary>
[Display(Name = "参照订单生产码")]
public string RefVinCode { get; set; }
/// <summary>
/// 发货关联单号
/// </summary>
[Display(Name = "发货关联单号")]
public string RefBillNum { get; set; }
/// <summary>
/// Erp目标库位
/// </summary>
[Display(Name = "Erp目标库位")]
public string ErpToLoc { get; set; }
/// <summary> /// <summary>
/// 塑件唯一码 /// 塑件唯一码
/// </summary> /// </summary>
[Display(Name = "塑件唯一码")] [Display(Name = "塑件唯一码")]
public string UniqueCode { get; set; } public string UniqueCode { get; set; }
/// <summary> /// <summary>
/// PJS顺序号 /// PJS顺序号
/// </summary> /// </summary>
[Display(Name = "PJS顺序号")] [Display(Name = "PJS顺序号")]
public string PjsNum { get; set; } public string PjsNum { get; set; }
/// <summary> /// <summary>
/// 虚拟小总成 /// 虚拟小总成
/// </summary> /// </summary>
[Display(Name = "虚拟小总成")] [Display(Name = "虚拟小总成")]
public string MatchNumber { get; set; } public string MatchNumber { get; set; }
/// <summary> /// <summary>
/// 发货条码 /// 状态
/// </summary> /// </summary>
[Display(Name = "发货条码")] [Display(Name = "状态")]
public string DeliverCode { get; set; } public EnumBillState State { get; set; }
/// <summary> /// <summary>
/// 客户位置 /// 创建时间
/// </summary> /// </summary>
[Display(Name = "客户位置")] [Display(Name = "创建时间")]
public string Position { get; set; } public DateTime CreateTime { get; set; }
/// <summary> /// <summary>
/// 是否有EDI数据 /// 是否有EDI数据
/// </summary> /// </summary>

201
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SE_DETAIL.cs

@ -2,8 +2,8 @@ using SettleAccount.Bases;
using System; using System;
using System.ComponentModel; using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
namespace SettleAccount.Domain.BQ; namespace SettleAccount.Domain.BQ;
@ -42,157 +42,196 @@ public class HBPO_SE_DETAIL :SE_BASE
//[Display(Name = "Wms发货单号")] //[Display(Name = "Wms发货单号")]
//public string WmsBillNum { get; set; } = null!; //public string WmsBillNum { get; set; } = null!;
/// <summary> /// <summary>
/// 单据编 /// JIT订单号
/// </summary> /// </summary>
[Display(Name = "单据编号")] [Display(Name = "JIT订单号")]
public string Num { get; set; } [DisplayName("JIT订单号")]
public string JISNum { get; set; }
/// <summary> /// <summary>
/// 发货时间 /// JIT排序生产码
/// </summary> /// </summary>
[Display(Name = "发货时间")] [Display(Name = "JIT排序生产码")]
public DateTime BillTime { get; set; } public string VinCode { get; set; }
/// <summary> /// <summary>
/// 发货人 /// JIT排序生产码类型
/// </summary> /// </summary>
[Display(Name = "发货人")] [Display(Name = "JIT排序生产码类型")]
public string Oper { get; set; } public string CodeType { get; set; }
/// <summary> /// <summary>
/// 排序单 /// 订单零件
/// </summary> /// </summary>
[Display(Name = "排序单号")] [Display(Name = "订单零件号")]
public string OrderNum { get; set; } public string PartCode { get; set; }
/// <summary>
/// 订单零件号
/// </summary>
[Display(Name = "订单零件号")]
public string RealPartCode { get; set; }
/// <summary>
/// 批次
/// </summary>
[Display(Name = "批次")]
public string Batch { get; set; }
/// <summary>
/// 客户零件号
/// </summary>
[Display(Name = "客户零件号")]
public string CustPartCode { get; set; }
/// <summary> /// <summary>
/// 订单序号 /// 订单序号
/// </summary> /// </summary>
[Display(Name = "订单序号")] [Display(Name = "订单序号")]
public string Seq { get; set; } public string Seq { get; set; }
/// <summary> /// <summary>
/// 实际生产码 /// 订单时间
/// </summary> /// </summary>
[Display(Name = "实际生产码")] [Display(Name = "订单时间")]
public string RealCode { get; set; } public DateTime AssembleData { get; set; }
/// <summary> /// <summary>
/// 订单生产码 /// 发货条
/// </summary> /// </summary>
[Display(Name = "订单生产码")] [Display(Name = "发货条码")]
public string VinCode { get; set; } public string DeliverCode { get; set; }
/// <summary> /// <summary>
/// 生产码类型 /// 发货单号
/// </summary> /// </summary>
[Display(Name = "生产码类型")] [Display(Name = "发货单号")]
public string CodeType { get; set; } public string BillNum { get; set; }
/// <summary> /// <summary>
/// 实际零件号 /// 发货时间
/// </summary> /// </summary>
[Display(Name = "实际零件号")] [Display(Name = "发货时间")]
public string RealPartCode { get; set; } public DateTime? BillTime { get; set; }
/// <summary> /// <summary>
/// 零件号 /// 发货人
/// </summary> /// </summary>
[Display(Name = "零件号")] [Display(Name = "发货人")]
public string PartCode { get; set; } public string Oper { get; set; }
/// <summary> /// <summary>
/// 批次 /// 客户位置
/// </summary> /// </summary>
[Display(Name = "批次")] [Display(Name = "客户位置")]
public string Batch { get; set; } public string Position { get; set; }
/// <summary>
/// 工厂
/// </summary>
[Display(Name = "工厂")]
public string Factory { get; set; }
/// <summary> /// <summary>
/// MES配置码 /// MES配置码
/// </summary> /// </summary>
[Display(Name = "MES配置码")] [Display(Name = "MES配置码")]
public string MESConfigCode { get; set; } public string MESConfigCode { get; set; }
/// <summary>
/// 来源库位
/// </summary>
[Display(Name = "来源库位")]
public string FromLoc { get; set; }
/// <summary> /// <summary>
/// 目标库位 /// 目标库位
/// </summary> /// </summary>
[Display(Name = "目标库位")] [Display(Name = "目标库位")]
public string ToLoc { get; set; } public string ToLoc { get; set; }
/// <summary> /// <summary>
/// 参照订单生产码 /// 单据类型
/// </summary> /// </summary>
[Display(Name = "参照订单生产码")] public EnumBillType BillType { get; set; }
public string RefVinCode { get; set; }
/// <summary> /// <summary>
/// 单据性质 /// 子单据类型
/// </summary> /// </summary>
[Display(Name = "单据性质")] [Display(Name = "子单据类型")]
public string BillCharacter { get; set; } public EnumSubBillType SubBillType { get; set; }
/// <summary> /// <summary>
/// 发货关联单号 /// 事务类型
/// </summary> /// </summary>
[Display(Name = "发货关联单号")] [Display(Name = "事务类型")]
public string RefBillNum { get; set; } public EnumDelTransType TransType { get; set; }
/// <summary> /// <summary>
/// Erp目标库位 /// 发运主类型
/// </summary> /// </summary>
[Display(Name = "Erp目标库位")] [Display(Name = "发运主类型")]
public string ErpToLoc { get; set; } public EnumDeliverBjBmpBillType DeliverBillType { get; set; }
/// <summary>
/// 发运子类型
/// </summary>
[Display(Name = "发运子类型")]
public EnumDeliverSubBillType DeliverSubBillType { get; set; }
/// <summary>
/// 单据性质
/// </summary>
[Display(Name = "单据性质")]
public string BillCharacter { get; set; }
/// <summary> /// <summary>
/// 原生产码 /// 原生产码
/// </summary> /// </summary>
[Display(Name = "原生产码")] [Display(Name = "原生产码")]
public string OrigiCode { get; set; } public string OrigiCode { get; set; }
/// <summary>
/// 描述
/// </summary>
[Display(Name = "描述")]
public string PartDesc { get; set; }
/// <summary> /// <summary>
/// 备注 /// 备注
/// </summary> /// </summary>
[Display(Name = "备注")] [Display(Name = "备注")]
public string Remark { get; set; } public string Remark { get; set; }
/// <summary>
/// 业务类型
/// </summary>
[Display(Name = "业务类型")]
public EnumProTpe ProType { get; set; }
/// <summary>
/// JIS排序单号
/// </summary>
[Display(Name = "JIS排序单号")]
public string OrderNum { get; set; }
/// <summary>
/// JIS实际生产码
/// </summary>
[Display(Name = "JIS实际生产码")]
public string RealCode { get; set; }
/// <summary>
/// 来源库位
/// </summary>
[Display(Name = "来源库位")]
public string FromLoc { get; set; }
/// <summary>
/// 参照订单生产码
/// </summary>
[Display(Name = "参照订单生产码")]
public string RefVinCode { get; set; }
/// <summary>
/// 发货关联单号
/// </summary>
[Display(Name = "发货关联单号")]
public string RefBillNum { get; set; }
/// <summary>
/// Erp目标库位
/// </summary>
[Display(Name = "Erp目标库位")]
public string ErpToLoc { get; set; }
/// <summary> /// <summary>
/// 塑件唯一码 /// 塑件唯一码
/// </summary> /// </summary>
[Display(Name = "塑件唯一码")] [Display(Name = "塑件唯一码")]
public string UniqueCode { get; set; } public string UniqueCode { get; set; }
/// <summary> /// <summary>
/// PJS顺序号 /// PJS顺序号
/// </summary> /// </summary>
[Display(Name = "PJS顺序号")] [Display(Name = "PJS顺序号")]
public string PjsNum { get; set; } public string PjsNum { get; set; }
/// <summary> /// <summary>
/// 虚拟小总成 /// 虚拟小总成
/// </summary> /// </summary>
[Display(Name = "虚拟小总成")] [Display(Name = "虚拟小总成")]
public string MatchNumber { get; set; } public string MatchNumber { get; set; }
/// <summary> /// <summary>
/// 发货条码 /// 状态
/// </summary> /// </summary>
[Display(Name = "发货条码")] [Display(Name = "状态")]
public string DeliverCode { get; set; } public EnumBillState State { get; set; }
/// <summary> /// <summary>
/// 客户位置 /// 创建时间
/// </summary> /// </summary>
[Display(Name = "客户位置")] [Display(Name = "创建时间")]
public string Position { get; set; } public DateTime CreateTime { get; set; }
/// <summary> /// <summary>
/// 是否有EDI数据 /// 是否有EDI数据
/// </summary> /// </summary>

42
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/MaterialRelationshipManager.cs

@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Domain.Services;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Managers;
/// <summary>
/// 客户零件关系
/// </summary>
public class MaterialRelationshipManager : DomainService
{
/// <summary>
/// 客户零件关系仓储
/// </summary>
private readonly INormalEfCoreRepository<MaterialRelationship, Guid> _materialRelationshipRepository;
public MaterialRelationshipManager(INormalEfCoreRepository<MaterialRelationship, Guid> materialRelationshipRepository)
{
_materialRelationshipRepository = materialRelationshipRepository;
}
/// <summary>
/// 添加零件关系
/// </summary>
public async Task AddNewMaterialRelationships(IEnumerable<MaterialRelationship> materialRelationships)
{
//客户零件号和厂内零件号
var luRePartCodes = materialRelationships.Select(t => new { t.ErpMaterialCode, t.SettleMaterialCode }).Distinct().ToList();
var haveLuRePartCodes = materialRelationships.Join(_materialRelationshipRepository,
a => new { a.ErpMaterialCode, a.SettleMaterialCode },
b => new { b.ErpMaterialCode, b.SettleMaterialCode },
(a, b) => a).ToList();
var noHaveLuRePartCodes = materialRelationships.Except(haveLuRePartCodes).ToList();
if (noHaveLuRePartCodes.Any())
{
await _materialRelationshipRepository.InsertManyAsync(noHaveLuRePartCodes).ConfigureAwait(false);
}
}
}

5503
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230815054853_20230815-3.Designer.cs

File diff suppressed because it is too large

368
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230815054853_20230815-3.cs

@ -0,0 +1,368 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202308153 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("75ce4934-06de-4cac-a1f0-536935975b38"));
migrationBuilder.RenameColumn(
name: "Num",
table: "Set_HBPO_SE_DETAIL",
newName: "PartDesc");
migrationBuilder.RenameColumn(
name: "Num",
table: "Set_BBAC_SE_DETAIL",
newName: "PartDesc");
migrationBuilder.AlterColumn<DateTime>(
name: "BillTime",
table: "Set_HBPO_SE_DETAIL",
type: "datetime2",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "datetime2");
migrationBuilder.AddColumn<DateTime>(
name: "AssembleData",
table: "Set_HBPO_SE_DETAIL",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "BillNum",
table: "Set_HBPO_SE_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "BillType",
table: "Set_HBPO_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<DateTime>(
name: "CreateTime",
table: "Set_HBPO_SE_DETAIL",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "CustPartCode",
table: "Set_HBPO_SE_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "DeliverBillType",
table: "Set_HBPO_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "DeliverSubBillType",
table: "Set_HBPO_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<string>(
name: "Factory",
table: "Set_HBPO_SE_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "JISNum",
table: "Set_HBPO_SE_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "ProType",
table: "Set_HBPO_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "State",
table: "Set_HBPO_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "SubBillType",
table: "Set_HBPO_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "TransType",
table: "Set_HBPO_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AlterColumn<DateTime>(
name: "BillTime",
table: "Set_BBAC_SE_DETAIL",
type: "datetime2",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "datetime2");
migrationBuilder.AddColumn<DateTime>(
name: "AssembleData",
table: "Set_BBAC_SE_DETAIL",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "BillNum",
table: "Set_BBAC_SE_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "BillType",
table: "Set_BBAC_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<DateTime>(
name: "CreateTime",
table: "Set_BBAC_SE_DETAIL",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "CustPartCode",
table: "Set_BBAC_SE_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "DeliverBillType",
table: "Set_BBAC_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "DeliverSubBillType",
table: "Set_BBAC_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<string>(
name: "Factory",
table: "Set_BBAC_SE_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "JISNum",
table: "Set_BBAC_SE_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "ProType",
table: "Set_BBAC_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "State",
table: "Set_BBAC_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "SubBillType",
table: "Set_BBAC_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "TransType",
table: "Set_BBAC_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("c085a562-1da9-4dd3-8e65-85e4518f1383"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "4b83550d90bf425493e93dcd552a0bd1", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("c085a562-1da9-4dd3-8e65-85e4518f1383"));
migrationBuilder.DropColumn(
name: "AssembleData",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "BillNum",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "BillType",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "CreateTime",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "CustPartCode",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "DeliverBillType",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "DeliverSubBillType",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "Factory",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "JISNum",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "ProType",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "State",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "SubBillType",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "TransType",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "AssembleData",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "BillNum",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "BillType",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "CreateTime",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "CustPartCode",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "DeliverBillType",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "DeliverSubBillType",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "Factory",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "JISNum",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "ProType",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "State",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "SubBillType",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "TransType",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.RenameColumn(
name: "PartDesc",
table: "Set_HBPO_SE_DETAIL",
newName: "Num");
migrationBuilder.RenameColumn(
name: "PartDesc",
table: "Set_BBAC_SE_DETAIL",
newName: "Num");
migrationBuilder.AlterColumn<DateTime>(
name: "BillTime",
table: "Set_HBPO_SE_DETAIL",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
oldClrType: typeof(DateTime),
oldType: "datetime2",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "BillTime",
table: "Set_BBAC_SE_DETAIL",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
oldClrType: typeof(DateTime),
oldType: "datetime2",
oldNullable: true);
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("75ce4934-06de-4cac-a1f0-536935975b38"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "8e865c8947ea4381b1b48c3ee4d572b4", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null });
}
}
}

98
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

@ -611,6 +611,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<DateTime>("AssembleData")
.HasColumnType("datetime2");
b.Property<string>("AssemblyCode") b.Property<string>("AssemblyCode")
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("nvarchar(50)");
@ -624,9 +627,15 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("BillCharacter") b.Property<string>("BillCharacter")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<DateTime>("BillTime") b.Property<string>("BillNum")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("BillTime")
.HasColumnType("datetime2"); .HasColumnType("datetime2");
b.Property<int>("BillType")
.HasColumnType("int");
b.Property<int>("BusinessType") b.Property<int>("BusinessType")
.HasColumnType("int"); .HasColumnType("int");
@ -639,6 +648,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("nvarchar(50)") .HasColumnType("nvarchar(50)")
.HasColumnName("ConcurrencyStamp"); .HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2") .HasColumnType("datetime2")
.HasColumnName("CreationTime"); .HasColumnName("CreationTime");
@ -647,6 +659,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("uniqueidentifier") .HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId"); .HasColumnName("CreatorId");
b.Property<string>("CustPartCode")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("DeleterId") b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier") .HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId"); .HasColumnName("DeleterId");
@ -655,9 +670,15 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("datetime2") .HasColumnType("datetime2")
.HasColumnName("DeletionTime"); .HasColumnName("DeletionTime");
b.Property<int>("DeliverBillType")
.HasColumnType("int");
b.Property<string>("DeliverCode") b.Property<string>("DeliverCode")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<int>("DeliverSubBillType")
.HasColumnType("int");
b.Property<string>("ErpToLoc") b.Property<string>("ErpToLoc")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
@ -665,6 +686,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("nvarchar(max)") .HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties"); .HasColumnName("ExtraProperties");
b.Property<string>("Factory")
.HasColumnType("nvarchar(max)");
b.Property<string>("FromLoc") b.Property<string>("FromLoc")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
@ -681,6 +705,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<bool>("IsHaveEdiData") b.Property<bool>("IsHaveEdiData")
.HasColumnType("bit"); .HasColumnType("bit");
b.Property<string>("JISNum")
.HasColumnType("nvarchar(max)");
b.Property<string>("KeyCode") b.Property<string>("KeyCode")
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("nvarchar(50)");
@ -703,9 +730,6 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("MatchNumber") b.Property<string>("MatchNumber")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<string>("Num")
.HasColumnType("nvarchar(max)");
b.Property<string>("Oper") b.Property<string>("Oper")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
@ -722,12 +746,18 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("PartCode") b.Property<string>("PartCode")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<string>("PartDesc")
.HasColumnType("nvarchar(max)");
b.Property<string>("PjsNum") b.Property<string>("PjsNum")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<string>("Position") b.Property<string>("Position")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<int>("ProType")
.HasColumnType("int");
b.Property<decimal>("Qty") b.Property<decimal>("Qty")
.HasColumnType("decimal(18,2)"); .HasColumnType("decimal(18,2)");
@ -756,9 +786,18 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<DateTime>("ShippingDate") b.Property<DateTime>("ShippingDate")
.HasColumnType("datetime2"); .HasColumnType("datetime2");
b.Property<int>("State")
.HasColumnType("int");
b.Property<int>("SubBillType")
.HasColumnType("int");
b.Property<string>("ToLoc") b.Property<string>("ToLoc")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<int>("TransType")
.HasColumnType("int");
b.Property<string>("UniqueCode") b.Property<string>("UniqueCode")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
@ -1758,6 +1797,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<DateTime>("AssembleData")
.HasColumnType("datetime2");
b.Property<string>("AssemblyCode") b.Property<string>("AssemblyCode")
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("nvarchar(50)");
@ -1771,9 +1813,15 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("BillCharacter") b.Property<string>("BillCharacter")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<DateTime>("BillTime") b.Property<string>("BillNum")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("BillTime")
.HasColumnType("datetime2"); .HasColumnType("datetime2");
b.Property<int>("BillType")
.HasColumnType("int");
b.Property<string>("CodeType") b.Property<string>("CodeType")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
@ -1783,6 +1831,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("nvarchar(50)") .HasColumnType("nvarchar(50)")
.HasColumnName("ConcurrencyStamp"); .HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<DateTime>("CreationTime") b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2") .HasColumnType("datetime2")
.HasColumnName("CreationTime"); .HasColumnName("CreationTime");
@ -1791,6 +1842,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("uniqueidentifier") .HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId"); .HasColumnName("CreatorId");
b.Property<string>("CustPartCode")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("DeleterId") b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier") .HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId"); .HasColumnName("DeleterId");
@ -1799,9 +1853,15 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("datetime2") .HasColumnType("datetime2")
.HasColumnName("DeletionTime"); .HasColumnName("DeletionTime");
b.Property<int>("DeliverBillType")
.HasColumnType("int");
b.Property<string>("DeliverCode") b.Property<string>("DeliverCode")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<int>("DeliverSubBillType")
.HasColumnType("int");
b.Property<string>("ErpToLoc") b.Property<string>("ErpToLoc")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
@ -1809,6 +1869,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("nvarchar(max)") .HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties"); .HasColumnName("ExtraProperties");
b.Property<string>("Factory")
.HasColumnType("nvarchar(max)");
b.Property<string>("FromLoc") b.Property<string>("FromLoc")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
@ -1825,6 +1888,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<bool>("IsHaveEdiData") b.Property<bool>("IsHaveEdiData")
.HasColumnType("bit"); .HasColumnType("bit");
b.Property<string>("JISNum")
.HasColumnType("nvarchar(max)");
b.Property<string>("KeyCode") b.Property<string>("KeyCode")
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("nvarchar(50)");
@ -1847,9 +1913,6 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("MatchNumber") b.Property<string>("MatchNumber")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<string>("Num")
.HasColumnType("nvarchar(max)");
b.Property<string>("Oper") b.Property<string>("Oper")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
@ -1866,12 +1929,18 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("PartCode") b.Property<string>("PartCode")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<string>("PartDesc")
.HasColumnType("nvarchar(max)");
b.Property<string>("PjsNum") b.Property<string>("PjsNum")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<string>("Position") b.Property<string>("Position")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<int>("ProType")
.HasColumnType("int");
b.Property<decimal>("Qty") b.Property<decimal>("Qty")
.HasColumnType("decimal(18,2)"); .HasColumnType("decimal(18,2)");
@ -1900,9 +1969,18 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<DateTime>("ShippingDate") b.Property<DateTime>("ShippingDate")
.HasColumnType("datetime2"); .HasColumnType("datetime2");
b.Property<int>("State")
.HasColumnType("int");
b.Property<int>("SubBillType")
.HasColumnType("int");
b.Property<string>("ToLoc") b.Property<string>("ToLoc")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<int>("TransType")
.HasColumnType("int");
b.Property<string>("UniqueCode") b.Property<string>("UniqueCode")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
@ -4414,10 +4492,10 @@ namespace Win.Sfs.SettleAccount.Migrations
b.HasData( b.HasData(
new new
{ {
Id = new Guid("75ce4934-06de-4cac-a1f0-536935975b38"), Id = new Guid("c085a562-1da9-4dd3-8e65-85e4518f1383"),
BillTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), BillTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
BillType = 1, BillType = 1,
ConcurrencyStamp = "8e865c8947ea4381b1b48c3ee4d572b4", ConcurrencyStamp = "4b83550d90bf425493e93dcd552a0bd1",
DeliverTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), DeliverTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
ErpToLoc = "ErpToLoc", ErpToLoc = "ErpToLoc",
OrderNum = "OrderNum", OrderNum = "OrderNum",

Loading…
Cancel
Save