mahao 1 year ago
parent
commit
1fdde38a41
  1. 11
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncAppService.cs
  2. 65
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncBaseAppService.cs
  3. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JitSeSyncAppService.cs
  4. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/MaiDanHBPOSeSyncAppService.cs
  5. 98
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/SeSyncExtendManager.cs
  6. 209
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs
  7. 203
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_DETAIL.cs
  8. 207
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SE_DETAIL.cs

11
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncAppService.cs

@ -4,6 +4,7 @@ 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 Volo.Abp.Uow;
using Win.Sfs.SettleAccount.Entities.BQ.Managers; 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;
@ -14,8 +15,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
/// <summary> /// <summary>
/// JisHBPO发运同步 /// JisHBPO发运同步
/// </summary> /// </summary>
[AllowAnonymous] [ApiExplorerSettings(IgnoreApi = true)]
[Route("api/settleaccount/[controller]/[action]")]
public class JisHBPOSeSyncAppService : JisHBPOSeSyncBaseAppService, IJobService public class JisHBPOSeSyncAppService : JisHBPOSeSyncBaseAppService, IJobService
{ {
/// <summary> /// <summary>
@ -27,8 +27,8 @@ public class JisHBPOSeSyncAppService : JisHBPOSeSyncBaseAppService, IJobService
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository, INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<HBPO_SE_DETAIL, Guid> jisSeDetailRepository, INormalEfCoreRepository<HBPO_SE_DETAIL, Guid> jisSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager, MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService SeSyncExtendManager syncExtendManager
) : base(wmsBJBMPTContext, settleAccountDbContext, syncPositionFlagRepository, jisSeDetailRepository, materialRelationshipManager, vmiService) ) : base(wmsBJBMPTContext, settleAccountDbContext, syncPositionFlagRepository, jisSeDetailRepository, materialRelationshipManager, syncExtendManager)
{ {
base.SeSyncConfigInfo = new SeSyncConfig() base.SeSyncConfigInfo = new SeSyncConfig()
{ {
@ -43,7 +43,8 @@ public class JisHBPOSeSyncAppService : JisHBPOSeSyncBaseAppService, IJobService
}; };
} }
public async Task Invoke(IServiceProvider serviceProvider) [UnitOfWork(IsDisabled = false)]
public virtual async Task Invoke(IServiceProvider serviceProvider)
{ {
await this.Invoke().ConfigureAwait(false); await this.Invoke().ConfigureAwait(false);
} }

65
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncBaseAppService.cs

@ -2,13 +2,16 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.LinqAsync;
using System.Threading.Tasks; using System.Threading.Tasks;
using Coravel.Invocable; using Coravel.Invocable;
using EFCore.BulkExtensions; using EFCore.BulkExtensions;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Org.BouncyCastle.Asn1.Cmp;
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.Managers;
using Win.Sfs.SettleAccount.Entities.MaterialRelationships;
using Win.Sfs.SettleAccount.EntityFrameworkCore; using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.MaterialRelationships; using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
@ -45,8 +48,10 @@ public class JisHBPOSeSyncBaseAppService : ApplicationService, IInvocable
/// 客户零件关系领域 /// 客户零件关系领域
/// </summary> /// </summary>
private readonly MaterialRelationshipManager _materialRelationshipManager; private readonly MaterialRelationshipManager _materialRelationshipManager;
/// <summary>
//private readonly IVmiService _vmiService; /// 发运同步扩展
/// </summary>
private readonly SeSyncExtendManager _syncExtendManager;
/// <summary> /// <summary>
/// 构造 /// 构造
@ -57,14 +62,14 @@ public class JisHBPOSeSyncBaseAppService : ApplicationService, IInvocable
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository, INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<HBPO_SE_DETAIL, Guid> jisSeDetailRepository, INormalEfCoreRepository<HBPO_SE_DETAIL, Guid> jisSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager, MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService) SeSyncExtendManager syncExtendManager)
{ {
_wmsBJBMPTContext = wmsBJBMPTContext; _wmsBJBMPTContext = wmsBJBMPTContext;
_settleAccountDbContext = settleAccountDbContext; _settleAccountDbContext = settleAccountDbContext;
_syncPositionFlagRepository = syncPositionFlagRepository; _syncPositionFlagRepository = syncPositionFlagRepository;
_jisSeDetailRepository = jisSeDetailRepository; _jisSeDetailRepository = jisSeDetailRepository;
_materialRelationshipManager = materialRelationshipManager; _materialRelationshipManager = materialRelationshipManager;
//_vmiService = vmiService; _syncExtendManager = syncExtendManager;
} }
/// <summary> /// <summary>
@ -80,8 +85,7 @@ public class JisHBPOSeSyncBaseAppService : ApplicationService, IInvocable
return; return;
} }
await SyncJitRecordAsync().ConfigureAwait(false); await SyncJitRecordAsync().ConfigureAwait(false);
await _settleAccountDbContext.SaveChangesAsync().ConfigureAwait(false); //await SyncJisRecordAsync().ConfigureAwait(false);
await SyncJisRecordAsync().ConfigureAwait(false);
} }
/// <summary> /// <summary>
@ -98,15 +102,12 @@ public class JisHBPOSeSyncBaseAppService : ApplicationService, IInvocable
//业务类别 //业务类别
var businessType = SeSyncConfigInfo.BusinessType; var businessType = SeSyncConfigInfo.BusinessType;
Expression<Func<TM_BJBMPT_JIT_RECORD, bool>> predicate = (t) => t.DeliverBillType == deliverBillType && deliverSubBillTypes.Contains(t.DeliverSubBillType); var syncPositionFlag = await _settleAccountDbContext.Set<SyncPositionFlag>().FirstOrDefaultAsync(t => t.TableName == syncTableName).ConfigureAwait(false);
var syncPositionFlag = await _syncPositionFlagRepository.FindAsync(t => t.TableName == syncTableName).ConfigureAwait(false); var syncPosition = syncPositionFlag?.Position ?? "0";
if (syncPositionFlag != null)
{
predicate = (t) => t.UID > int.Parse(syncPositionFlag.Position) && t.DeliverBillType == deliverBillType && deliverSubBillTypes.Contains(t.DeliverSubBillType);
}
Expression<Func<TM_BJBMPT_JIT_RECORD, bool>> predicate = (t) => t.UID > int.Parse(syncPositionFlag.Position) && t.DeliverBillType == deliverBillType && deliverSubBillTypes.Contains(t.DeliverSubBillType);
//WMS发运记录 //WMS发运记录
var wmsSeRecords = _wmsBJBMPTContext.TM_BJBMPT_JIT_RECORD.Where(predicate).OrderBy(b => b.UID).Take(100000).ToList(); var wmsSeRecords = _wmsBJBMPTContext.TM_BJBMPT_JIT_RECORD.Where(predicate).OrderBy(b => b.UID).Take(100_000).ToList();
var jisSeDetails = ObjectMapper.Map<List<TM_BJBMPT_JIT_RECORD>, List<HBPO_SE_DETAIL>>(wmsSeRecords); var jisSeDetails = ObjectMapper.Map<List<TM_BJBMPT_JIT_RECORD>, List<HBPO_SE_DETAIL>>(wmsSeRecords);
if (jisSeDetails.Any()) if (jisSeDetails.Any())
{ {
@ -115,7 +116,7 @@ public class JisHBPOSeSyncBaseAppService : ApplicationService, IInvocable
if (luRePartCodes.Any()) if (luRePartCodes.Any())
{ {
var materialRelationships = luRePartCodes.Select(t => new MaterialRelationship(GuidGenerator.Create(), t.FactoryPartCode, "", t.LU, businessType)); var materialRelationships = luRePartCodes.Select(t => new MaterialRelationship(GuidGenerator.Create(), t.FactoryPartCode, "", t.LU, businessType));
await this.AddNewMaterialRelationships(materialRelationships).ConfigureAwait(false); await _syncExtendManager.AddNewMaterialRelationshipsAsync(materialRelationships).ConfigureAwait(false);
} }
jisSeDetails.ForEach(t => jisSeDetails.ForEach(t =>
@ -129,21 +130,35 @@ public class JisHBPOSeSyncBaseAppService : ApplicationService, IInvocable
t.Version = int.Parse(t.BillTime?.ToString("yyyyMM")); t.Version = int.Parse(t.BillTime?.ToString("yyyyMM"));
} }
}); });
await _settleAccountDbContext.BulkInsertAsync(jisSeDetails).ConfigureAwait(false);
if (syncPositionFlag != null) var syncPositionNew = jisSeDetails.Last().UID.ToString();
using var transaction = await _settleAccountDbContext.Database.BeginTransactionAsync().ConfigureAwait(false);
try
{ {
syncPositionFlag.Position = wmsSeRecords.Last().UID.ToString(); if (syncPositionFlag != null)
await _syncPositionFlagRepository.UpdateAsync(syncPositionFlag).ConfigureAwait(false); {
syncPositionFlag.Position = syncPositionNew;
_settleAccountDbContext.Update<SyncPositionFlag>(syncPositionFlag);
}
else
{
syncPositionFlag = new SyncPositionFlag()
{
TableName = syncTableName,
Position = syncPositionNew
};
_settleAccountDbContext.Add<SyncPositionFlag>(syncPositionFlag);
}
await _settleAccountDbContext.BulkInsertAsync(jisSeDetails).ConfigureAwait(false);
await _syncExtendManager.JisSeDetailsSaveConsignAsync(jisSeDetails, false).ConfigureAwait(false);
await _settleAccountDbContext.SaveChangesAsync().ConfigureAwait(false);
await transaction.CommitAsync().ConfigureAwait(false);
} }
else catch (Exception)
{ {
syncPositionFlag = new SyncPositionFlag() await transaction.RollbackAsync().ConfigureAwait(false);
{ throw;
TableName = syncTableName,
Position = wmsSeRecords.Last().UID.ToString()
};
await _syncPositionFlagRepository.InsertAsync(syncPositionFlag).ConfigureAwait(false);
} }
} }
} }

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

@ -145,7 +145,7 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
_settleAccountDbContext.Add<SyncPositionFlag>(syncPositionFlag); _settleAccountDbContext.Add<SyncPositionFlag>(syncPositionFlag);
} }
await _settleAccountDbContext.BulkInsertAsync(seDetails).ConfigureAwait(false); await _settleAccountDbContext.BulkInsertAsync(seDetails).ConfigureAwait(false);
await _syncExtendManager.SaveVmiLogsAsync(seDetails).ConfigureAwait(false); await _syncExtendManager.PubSeDetailsSaveConsignAsync(seDetails).ConfigureAwait(false);
await _settleAccountDbContext.SaveChangesAsync().ConfigureAwait(false); await _settleAccountDbContext.SaveChangesAsync().ConfigureAwait(false);
await transaction.CommitAsync().ConfigureAwait(false); await transaction.CommitAsync().ConfigureAwait(false);
} }

10
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/MaiDanHBPOSeSyncAppService.cs

@ -1,9 +1,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using Volo.Abp.Uow;
using Win.Sfs.SettleAccount.Entities.BQ.Managers; 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;
@ -14,8 +14,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
/// <summary> /// <summary>
/// 买单件HBPO发运同步 /// 买单件HBPO发运同步
/// </summary> /// </summary>
[AllowAnonymous] [ApiExplorerSettings(IgnoreApi = true)]
[Route("api/settleaccount/[controller]/[action]")]
public class MaiDanHBPOSeSyncAppService : JisHBPOSeSyncBaseAppService, IJobService public class MaiDanHBPOSeSyncAppService : JisHBPOSeSyncBaseAppService, IJobService
{ {
/// <summary> /// <summary>
@ -27,8 +26,8 @@ public class MaiDanHBPOSeSyncAppService : JisHBPOSeSyncBaseAppService, IJobServi
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository, INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<HBPO_SE_DETAIL, Guid> jisSeDetailRepository, INormalEfCoreRepository<HBPO_SE_DETAIL, Guid> jisSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager, MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService SeSyncExtendManager syncExtendManager
) : base(wmsBJBMPTContext, settleAccountDbContext, syncPositionFlagRepository, jisSeDetailRepository, materialRelationshipManager, vmiService) ) : base(wmsBJBMPTContext, settleAccountDbContext, syncPositionFlagRepository, jisSeDetailRepository, materialRelationshipManager, syncExtendManager)
{ {
base.SeSyncConfigInfo = new SeSyncConfig() base.SeSyncConfigInfo = new SeSyncConfig()
{ {
@ -43,6 +42,7 @@ public class MaiDanHBPOSeSyncAppService : JisHBPOSeSyncBaseAppService, IJobServi
}; };
} }
[UnitOfWork(IsDisabled = false)]
public async Task Invoke(IServiceProvider serviceProvider) public async Task Invoke(IServiceProvider serviceProvider)
{ {
await this.Invoke().ConfigureAwait(false); await this.Invoke().ConfigureAwait(false);

98
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/SeSyncExtendManager.cs

@ -5,6 +5,7 @@ using System.Threading.Tasks;
using EFCore.BulkExtensions; using EFCore.BulkExtensions;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json; using Newtonsoft.Json;
using SettleAccount.Bases;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using Volo.Abp.Domain.Services; using Volo.Abp.Domain.Services;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
@ -49,9 +50,9 @@ public class SeSyncExtendManager : DomainService
} }
/// <summary> /// <summary>
/// 保存寄售库Log /// Jis发运数据保存寄售库
/// </summary> /// </summary>
public async Task SaveVmiLogsAsync(List<PUB_SE_DETAIL> seDetails) public async Task JisSeDetailsSaveConsignAsync<T>(List<T> seDetails, bool isJisTable) where T : JisSeBase
{ {
var deliverSeDetails = seDetails.FindAll(t => t.TransType == EnumDelTransType.); var deliverSeDetails = seDetails.FindAll(t => t.TransType == EnumDelTransType.);
var returnSeDetails = seDetails.FindAll(t => t.TransType == EnumDelTransType.退); var returnSeDetails = seDetails.FindAll(t => t.TransType == EnumDelTransType.退);
@ -67,19 +68,69 @@ public class SeSyncExtendManager : DomainService
ChangedTime = dateTimeNow, ChangedTime = dateTimeNow,
AssembleData = t.AssembleData, AssembleData = t.AssembleData,
BillTime = t.BillTime, BillTime = t.BillTime,
CodeType = t.CodeType,
Configcode = t.MESConfigCode,
CustPartCode = t.CustPartCode, CustPartCode = t.CustPartCode,
DeliverBillType = t.DeliverBillType, DeliverBillType = t.DeliverBillType,
DeliverSubBillType = t.DeliverSubBillType, DeliverSubBillType = t.DeliverSubBillType,
ErpToLoc = t.ToErpLocCode, ErpToLoc = t.ErpToLoc,
OrderNum = t.DnBillNum, MatchNumber = t.MatchNumber,
OrderNum = isJisTable ? t.OrderNum : t.JISNum,
PjsNum = t.PjsNum,
Qty = t.Qty, Qty = t.Qty,
ReMark = t.Remark, ReMark = t.Remark,
RealCode = t.PartCode RealCode = t.RealCode,
RealPartCode = t.PartCode,
Seq = t.Seq,
UniqueCode = isJisTable ? t.UniqueCode : t.DeliverCode,
VinCode = t.VinCode,
factory = t.Factory
}).ToList(); }).ToList();
var returnVmiLogList = returnSeDetails.Select(t => new VmiLog(Guid.NewGuid()) var returnVmiLogList = returnSeDetails.Select(t => new VmiLog(Guid.NewGuid())
{ {
LogType = VmiLogType.Type400, LogType = VmiLogType.Type400,
ChangedQty = t.Qty, ChangedQty = t.Qty,
ChangedType = VmiType.Out,
ChangedBy = "WMS",
ChangedNumber = t.PN,
ChangedTime = dateTimeNow,
AssembleData = t.AssembleData,
BillTime = t.BillTime,
CodeType = t.CodeType,
Configcode = t.MESConfigCode,
CustPartCode = t.CustPartCode,
DeliverBillType = t.DeliverBillType,
DeliverSubBillType = t.DeliverSubBillType,
ErpToLoc = t.ErpToLoc,
MatchNumber = t.MatchNumber,
OrderNum = isJisTable ? t.OrderNum : t.JISNum,
PjsNum = t.PjsNum,
Qty = -t.Qty,
ReMark = t.Remark,
RealCode = t.RealCode,
RealPartCode = t.PartCode,
Seq = t.Seq,
UniqueCode = isJisTable ? t.UniqueCode : t.DeliverCode,
VinCode = t.VinCode,
factory = t.Factory
}).ToList();
vmiLogList.AddRange(returnVmiLogList);
await SaveVmiLogsAsync(vmiLogList).ConfigureAwait(false);
}
/// <summary>
/// Pub发运数据保存寄售库
/// </summary>
public async Task PubSeDetailsSaveConsignAsync(List<PUB_SE_DETAIL> seDetails)
{
var deliverSeDetails = seDetails.FindAll(t => t.TransType == EnumDelTransType.);
var returnSeDetails = seDetails.FindAll(t => t.TransType == EnumDelTransType.退);
var dateTimeNow = DateTime.Now;
var vmiLogList = deliverSeDetails.Select(t => new VmiLog(Guid.NewGuid())
{
LogType = VmiLogType.Type100,
ChangedQty = t.Qty,
ChangedType = VmiType.In, ChangedType = VmiType.In,
ChangedBy = "WMS", ChangedBy = "WMS",
ChangedNumber = t.PN, ChangedNumber = t.PN,
@ -90,20 +141,47 @@ public class SeSyncExtendManager : DomainService
DeliverBillType = t.DeliverBillType, DeliverBillType = t.DeliverBillType,
DeliverSubBillType = t.DeliverSubBillType, DeliverSubBillType = t.DeliverSubBillType,
ErpToLoc = t.ToErpLocCode, ErpToLoc = t.ToErpLocCode,
OrderNum = t.DnBillNum, OrderNum = t.DeliveryIndex,
Qty = t.Qty,
ReMark = t.Remark,
RealPartCode = t.PartCode
}).ToList();
var returnVmiLogList = returnSeDetails.Select(t => new VmiLog(Guid.NewGuid())
{
LogType = VmiLogType.Type400,
ChangedQty = t.Qty,
ChangedType = VmiType.Out,
ChangedBy = "WMS",
ChangedNumber = t.PN,
ChangedTime = dateTimeNow,
AssembleData = t.AssembleData,
BillTime = t.BillTime,
CustPartCode = t.CustPartCode,
DeliverBillType = t.DeliverBillType,
DeliverSubBillType = t.DeliverSubBillType,
ErpToLoc = t.ToErpLocCode,
OrderNum = t.DeliveryIndex,
Qty = -t.Qty, Qty = -t.Qty,
ReMark = t.Remark, ReMark = t.Remark,
RealCode = t.PartCode RealPartCode = t.PartCode
}).ToList(); }).ToList();
vmiLogList.AddRange(returnVmiLogList); vmiLogList.AddRange(returnVmiLogList);
await SaveVmiMessagesAsync(vmiLogList).ConfigureAwait(false); await SaveVmiLogsAsync(vmiLogList).ConfigureAwait(false);
await _settleAccountDbContext.BulkInsertAsync(vmiLogList).ConfigureAwait(false); }
/// <summary>
/// 保存寄售库Log
/// </summary>
private async Task SaveVmiLogsAsync(List<VmiLog> vmiLogs)
{
await SaveVmiMessagesAsync(vmiLogs).ConfigureAwait(false);
await _settleAccountDbContext.BulkInsertAsync(vmiLogs).ConfigureAwait(false);
} }
/// <summary> /// <summary>
/// 保存寄售库Message /// 保存寄售库Message
/// </summary> /// </summary>
public async Task SaveVmiMessagesAsync(List<VmiLog> vmiLogs) private async Task SaveVmiMessagesAsync(List<VmiLog> vmiLogs)
{ {
var vmiMessages = vmiLogs.Select(t => new VmiMessage(Guid.NewGuid()) var vmiMessages = vmiLogs.Select(t => new VmiMessage(Guid.NewGuid())
{ {

209
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Linq; using System.Linq;
using System.Security.Policy; using System.Security.Policy;
@ -9,6 +10,7 @@ using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Validation; using Volo.Abp.Validation;
using Win.Sfs.SettleAccount; using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
using Win.Sfs.SettleAccount.Entities.SettleAccountDomain; using Win.Sfs.SettleAccount.Entities.SettleAccountDomain;
using static System.Runtime.CompilerServices.RuntimeHelpers; using static System.Runtime.CompilerServices.RuntimeHelpers;
@ -678,8 +680,209 @@ namespace SettleAccount.Bases
} }
public class JisSeBase : SE_BASE
{
/// <summary>
/// UID
/// </summary>
[Display(Name = "UID")]
[DisplayName("UID")]
public long UID { get; set; }
/// <summary>
/// JIT订单号
/// </summary>
[Display(Name = "JIT订单号")]
[DisplayName("JIT订单号")]
public string JISNum { get; set; }
/// <summary>
/// JIT排序生产码
/// </summary>
[Display(Name = "JIT排序生产码")]
public string VinCode { get; set; }
/// <summary>
/// JIT排序生产码类型
/// </summary>
[Display(Name = "JIT排序生产码类型")]
public string CodeType { get; set; }
/// <summary>
/// 订单零件号
/// </summary>
[Display(Name = "订单零件号")]
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>
[Display(Name = "订单序号")]
public string Seq { get; set; }
/// <summary>
/// 订单时间
/// </summary>
[Display(Name = "订单时间")]
public DateTime AssembleData { get; set; }
/// <summary>
/// 发货条码
/// </summary>
[Display(Name = "发货条码")]
public string DeliverCode { get; set; }
/// <summary>
/// 发货单号
/// </summary>
[Display(Name = "发货单号")]
public string BillNum { get; set; }
/// <summary>
/// 发货时间
/// </summary>
[Display(Name = "发货时间")]
public DateTime? BillTime { get; set; }
/// <summary>
/// 发货人
/// </summary>
[Display(Name = "发货人")]
public string Oper { get; set; }
/// <summary>
/// 客户位置
/// </summary>
[Display(Name = "客户位置")]
public string Position { get; set; }
/// <summary>
/// 工厂
/// </summary>
[Display(Name = "工厂")]
public string Factory { get; set; }
/// <summary>
/// MES配置码
/// </summary>
[Display(Name = "MES配置码")]
public string MESConfigCode { get; set; }
/// <summary>
/// 目标库位
/// </summary>
[Display(Name = "目标库位")]
public string ToLoc { get; set; }
/// <summary>
/// 单据类型
/// </summary>
public EnumBillType BillType { get; set; }
/// <summary>
/// 子单据类型
/// </summary>
[Display(Name = "子单据类型")]
public EnumSubBillType SubBillType { get; set; }
/// <summary>
/// 事务类型
/// </summary>
[Display(Name = "事务类型")]
public EnumDelTransType TransType { get; set; }
/// <summary>
/// 发运主类型
/// </summary>
[Display(Name = "发运主类型")]
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>
[Display(Name = "原生产码")]
public string OrigiCode { get; set; }
/// <summary>
/// 描述
/// </summary>
[Display(Name = "描述")]
public string PartDesc { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "备注")]
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>
[Display(Name = "塑件唯一码")]
public string UniqueCode { get; set; }
/// <summary>
/// PJS顺序号
/// </summary>
[Display(Name = "PJS顺序号")]
public string PjsNum { get; set; }
/// <summary>
/// 虚拟小总成
/// </summary>
[Display(Name = "虚拟小总成")]
public string MatchNumber { get; set; }
/// <summary>
/// 状态
/// </summary>
[Display(Name = "状态")]
public EnumBillState State { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Display(Name = "创建时间")]
public DateTime CreateTime { get; set; }
/// <summary>
/// 是否有EDI数据
/// </summary>
[Display(Name = "是否有EDI数据")]
public bool IsHaveEdiData { get; set; }
}
} }

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

@ -8,7 +8,7 @@ using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
namespace SettleAccount.Domain.BQ; namespace SettleAccount.Domain.BQ;
[Display(Name = "BBAC发运单")] [Display(Name = "BBAC发运单")]
public class BBAC_SE_DETAIL:SE_BASE public class BBAC_SE_DETAIL : JisSeBase
{ {
/// <summary> /// <summary>
/// 业务分类 /// 业务分类
@ -48,207 +48,6 @@ 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>
/// UID
/// </summary>
[Display(Name = "UID")]
[DisplayName("UID")]
public long UID { get; set; }
/// <summary>
/// JIT订单号
/// </summary>
[Display(Name = "JIT订单号")]
[DisplayName("JIT订单号")]
public string JISNum { get; set; }
/// <summary>
/// JIT排序生产码
/// </summary>
[Display(Name = "JIT排序生产码")]
public string VinCode { get; set; }
/// <summary>
/// JIT排序生产码类型
/// </summary>
[Display(Name = "JIT排序生产码类型")]
public string CodeType { get; set; }
/// <summary>
/// 订单零件号
/// </summary>
[Display(Name = "订单零件号")]
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>
[Display(Name = "订单序号")]
public string Seq { get; set; }
/// <summary>
/// 订单时间
/// </summary>
[Display(Name = "订单时间")]
public DateTime AssembleData { get; set; }
/// <summary>
/// 发货条码
/// </summary>
[Display(Name = "发货条码")]
public string DeliverCode { get; set; }
/// <summary>
/// 发货单号
/// </summary>
[Display(Name = "发货单号")]
public string BillNum { get; set; }
/// <summary>
/// 发货时间
/// </summary>
[Display(Name = "发货时间")]
public DateTime? BillTime { get; set; }
/// <summary>
/// 发货人
/// </summary>
[Display(Name = "发货人")]
public string Oper { get; set; }
/// <summary>
/// 客户位置
/// </summary>
[Display(Name = "客户位置")]
public string Position { get; set; }
/// <summary>
/// 工厂
/// </summary>
[Display(Name = "工厂")]
public string Factory { get; set; }
/// <summary>
/// MES配置码
/// </summary>
[Display(Name = "MES配置码")]
public string MESConfigCode { get; set; }
/// <summary>
/// 目标库位
/// </summary>
[Display(Name = "目标库位")]
public string ToLoc { get; set; }
/// <summary>
/// 单据类型
/// </summary>
public EnumBillType BillType { get; set; }
/// <summary>
/// 子单据类型
/// </summary>
[Display(Name = "子单据类型")]
public EnumSubBillType SubBillType { get; set; }
/// <summary>
/// 事务类型
/// </summary>
[Display(Name = "事务类型")]
public EnumDelTransType TransType { get; set; }
/// <summary>
/// 发运主类型
/// </summary>
[Display(Name = "发运主类型")]
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>
[Display(Name = "原生产码")]
public string OrigiCode { get; set; }
/// <summary>
/// 描述
/// </summary>
[Display(Name = "描述")]
public string PartDesc { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "备注")]
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>
[Display(Name = "塑件唯一码")]
public string UniqueCode { get; set; }
/// <summary>
/// PJS顺序号
/// </summary>
[Display(Name = "PJS顺序号")]
public string PjsNum { get; set; }
/// <summary>
/// 虚拟小总成
/// </summary>
[Display(Name = "虚拟小总成")]
public string MatchNumber { get; set; }
/// <summary>
/// 状态
/// </summary>
[Display(Name = "状态")]
public EnumBillState State { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Display(Name = "创建时间")]
public DateTime CreateTime { get; set; }
/// <summary>
/// 是否有EDI数据
/// </summary>
[Display(Name = "是否有EDI数据")]
public bool IsHaveEdiData { get; set; }
public BBAC_SE_DETAIL(Guid guid, string keyCode, int version, string lU, string pN, string seqNumber, string assemblyCode, string injectionCode, decimal qty, DateTime beginDate, DateTime shippingDate, string wmsBillNum) public BBAC_SE_DETAIL(Guid guid, string keyCode, int version, string lU, string pN, string seqNumber, string assemblyCode, string injectionCode, decimal qty, DateTime beginDate, DateTime shippingDate, string wmsBillNum)
{ {

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

@ -1,14 +1,12 @@
using SettleAccount.Bases;
using System; using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
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;
[Display(Name = "HBPO发运数据")] [Display(Name = "HBPO发运数据")]
public class HBPO_SE_DETAIL :SE_BASE public class HBPO_SE_DETAIL : JisSeBase
{ {
/// <summary> /// <summary>
/// 业务分类 /// 业务分类
@ -48,207 +46,6 @@ 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>
/// UID
/// </summary>
[Display(Name = "UID")]
[DisplayName("UID")]
public long UID { get; set; }
/// <summary>
/// JIT订单号
/// </summary>
[Display(Name = "JIT订单号")]
[DisplayName("JIT订单号")]
public string JISNum { get; set; }
/// <summary>
/// JIT排序生产码
/// </summary>
[Display(Name = "JIT排序生产码")]
public string VinCode { get; set; }
/// <summary>
/// JIT排序生产码类型
/// </summary>
[Display(Name = "JIT排序生产码类型")]
public string CodeType { get; set; }
/// <summary>
/// 订单零件号
/// </summary>
[Display(Name = "订单零件号")]
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>
[Display(Name = "订单序号")]
public string Seq { get; set; }
/// <summary>
/// 订单时间
/// </summary>
[Display(Name = "订单时间")]
public DateTime AssembleData { get; set; }
/// <summary>
/// 发货条码
/// </summary>
[Display(Name = "发货条码")]
public string DeliverCode { get; set; }
/// <summary>
/// 发货单号
/// </summary>
[Display(Name = "发货单号")]
public string BillNum { get; set; }
/// <summary>
/// 发货时间
/// </summary>
[Display(Name = "发货时间")]
public DateTime? BillTime { get; set; }
/// <summary>
/// 发货人
/// </summary>
[Display(Name = "发货人")]
public string Oper { get; set; }
/// <summary>
/// 客户位置
/// </summary>
[Display(Name = "客户位置")]
public string Position { get; set; }
/// <summary>
/// 工厂
/// </summary>
[Display(Name = "工厂")]
public string Factory { get; set; }
/// <summary>
/// MES配置码
/// </summary>
[Display(Name = "MES配置码")]
public string MESConfigCode { get; set; }
/// <summary>
/// 目标库位
/// </summary>
[Display(Name = "目标库位")]
public string ToLoc { get; set; }
/// <summary>
/// 单据类型
/// </summary>
public EnumBillType BillType { get; set; }
/// <summary>
/// 子单据类型
/// </summary>
[Display(Name = "子单据类型")]
public EnumSubBillType SubBillType { get; set; }
/// <summary>
/// 事务类型
/// </summary>
[Display(Name = "事务类型")]
public EnumDelTransType TransType { get; set; }
/// <summary>
/// 发运主类型
/// </summary>
[Display(Name = "发运主类型")]
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>
[Display(Name = "原生产码")]
public string OrigiCode { get; set; }
/// <summary>
/// 描述
/// </summary>
[Display(Name = "描述")]
public string PartDesc { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "备注")]
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>
[Display(Name = "塑件唯一码")]
public string UniqueCode { get; set; }
/// <summary>
/// PJS顺序号
/// </summary>
[Display(Name = "PJS顺序号")]
public string PjsNum { get; set; }
/// <summary>
/// 虚拟小总成
/// </summary>
[Display(Name = "虚拟小总成")]
public string MatchNumber { get; set; }
/// <summary>
/// 状态
/// </summary>
[Display(Name = "状态")]
public EnumBillState State { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Display(Name = "创建时间")]
public DateTime CreateTime { get; set; }
/// <summary>
/// 是否有EDI数据
/// </summary>
[Display(Name = "是否有EDI数据")]
public bool IsHaveEdiData { get; set; }
public HBPO_SE_DETAIL(Guid guid, string keyCode, int version, string lU, string pN, string seqNumber, string assemblyCode, string injectionCode, decimal qty, DateTime beginDate, DateTime shippingDate, string wmsBillNum) public HBPO_SE_DETAIL(Guid guid, string keyCode, int version, string lU, string pN, string seqNumber, string assemblyCode, string injectionCode, decimal qty, DateTime beginDate, DateTime shippingDate, string wmsBillNum)
{ {

Loading…
Cancel
Save