Browse Source

备件寄售库

master
mahao 1 year ago
parent
commit
4de8bd0827
  1. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs
  2. 9
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BeiSeSyncAppService.cs
  3. 59
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeEdiCompareAppService.cs
  4. 259
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JitSeSyncAppService.cs
  5. 12
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/YinDuSeSyncAppService.cs
  6. 15
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/ZhiGongBBACSeSyncAppService.cs
  7. 18
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/ZhiGongHBPOSeSyncAppService.cs
  8. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/Options/SeConfigOptions.cs
  9. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_OTHER_RECORD.cs
  10. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Boms/Bom.cs

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs

@ -79,8 +79,8 @@ public class Startup
app.UseEndpoints(endpoints => endpoints.MapHub<PageHub>("/api/hub"));
app.ApplicationServices.UseScheduler(scheduler =>
{
//scheduler.Schedule<JisBBACSeEdiCompareAppService>().EverySeconds(10);
//scheduler.Schedule<JisHBPOSeEdiCompareAppService>().EverySeconds(10);
scheduler.Schedule<JisBBACSeEdiCompareAppService>().EveryMinute();
scheduler.Schedule<JisHBPOSeEdiCompareAppService>().EveryMinute();
});
var contentTypeProvider = new FileExtensionContentTypeProvider();
contentTypeProvider.Mappings.Add(".mjs", "text/javascript");

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

@ -22,14 +22,7 @@ public class BeiSeSyncAppService : JitSeSyncAppService, IJobService
/// <summary>
/// 构造
/// </summary>
public BeiSeSyncAppService(
WMSBJBMPTDbContext wmsBJBMPTContext,
SettleAccountDbContext settleAccountDbContext,
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService
) : base(wmsBJBMPTContext, settleAccountDbContext, syncPositionFlagRepository, pubSeDetailRepository, materialRelationshipManager, vmiService)
public BeiSeSyncAppService(WMSBJBMPTDbContext wmsBJBMPTContext, SettleAccountDbContext settleAccountDbContext) : base(wmsBJBMPTContext, settleAccountDbContext)
{
base.SeSyncConfigInfo = new SeSyncConfig()
{

59
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeEdiCompareAppService.cs

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading.Tasks;
@ -62,36 +61,38 @@ public class JisHBPOSeEdiCompareAppService : ApplicationService, IInvocable
await HandDelEdiDataAsync().ConfigureAwait(false);
using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: false))
{
var seDetailGroup = db.Set<HBPO_SE_DETAIL>().Where(t => t.IsHaveEdiData == false).GroupBy(t => new { t.PN, t.CustomerPartCodeNoSpace }).Select(t => new { t.Key.PN, LU = t.Key.CustomerPartCodeNoSpace });
var ediDetailGroup = db.Set<HBPO_SE_EDI>().Where(t => t.IsDeleted == false && t.IsHaveSeData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU });
var seDetailGroup = db.Set<HBPO_SE_DETAIL>().Where(t => t.IsHaveEdiData == false).GroupBy(t => new { t.PN, t.CustomerPartCodeNoSpace }).Select(t => new { t.Key.PN, LU = t.Key.CustomerPartCodeNoSpace });
var ediDetailGroup = db.Set<HBPO_SE_EDI>().Where(t => t.IsDeleted == false && t.IsHaveSeData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU });
var keyCodes = from se in seDetailGroup
from edi in ediDetailGroup
where se.PN == edi.PN && se.LU == edi.LU
select new { se.PN, se.LU };
var seDetailsQuery = from se in db.Set<HBPO_SE_DETAIL>()
from keyCode in keyCodes
where se.PN == keyCode.PN && se.CustomerPartCodeNoSpace == keyCode.LU && se.IsHaveEdiData == false
select se;
var ediDetailsQuery = from edi in db.Set<HBPO_SE_EDI>()
from keyCode in keyCodes
where edi.PN == keyCode.PN && edi.LU == keyCode.LU && edi.IsDeleted == false && edi.IsHaveSeData == false
select edi;
var keyCodes = from se in seDetailGroup
from edi in ediDetailGroup
where se.PN == edi.PN && se.LU == edi.LU
select new { se.PN, se.LU };
var seDetailsQuery = from se in db.Set<HBPO_SE_DETAIL>()
from keyCode in keyCodes
where se.PN == keyCode.PN && se.CustomerPartCodeNoSpace == keyCode.LU && se.IsHaveEdiData == false
select se;
var ediDetailsQuery = from edi in db.Set<HBPO_SE_EDI>()
from keyCode in keyCodes
where edi.PN == keyCode.PN && edi.LU == keyCode.LU && edi.IsDeleted == false && edi.IsHaveSeData == false
select edi;
var seDetails = seDetailsQuery.Take(5000).ToList();
var ediDetails = ediDetailsQuery.Take(5000).ToList();
seDetails.ForEach(t => t.IsHaveEdiData = true);
ediDetails.ForEach(t => t.IsHaveSeData = true);
var seDetails = seDetailsQuery.Take(5000).ToList();
var ediDetails = ediDetailsQuery.Take(5000).ToList();
if (seDetails.Any())
{
seDetails.ForEach(t => t.IsHaveEdiData = true);
db.BulkUpdate<HBPO_SE_DETAIL>(seDetails);
}
if (ediDetails.Any())
{
ediDetails.ForEach(t => t.IsHaveSeData = true);
db.BulkUpdate<HBPO_SE_EDI>(ediDetails);
}
using var transaction = await db.Database.BeginTransactionAsync().ConfigureAwait(false);
try
{
await db.BulkUpdateAsync<HBPO_SE_DETAIL>(seDetails).ConfigureAwait(false);
await db.BulkUpdateAsync<HBPO_SE_EDI>(ediDetails).ConfigureAwait(false);
await transaction.CommitAsync().ConfigureAwait(false);
}
catch (Exception)
{
await transaction.RollbackAsync().ConfigureAwait(false);
throw;
}
}
catch (Exception)

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

@ -7,9 +7,9 @@ using Coravel.Invocable;
using EFCore.BulkExtensions;
using LinqToDB;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using SettleAccount.Domain.BQ;
using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.MaterialRelationships;
@ -27,52 +27,28 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
/// WMS数据上下文
/// </summary>
private readonly WMSBJBMPTDbContext _wmsBJBMPTContext;
/// <summary>
/// 数据上下文
/// </summary>
private readonly SettleAccountDbContext _settleAccountDbContext;
/// <summary>
/// 同步位置标记
/// </summary>
private readonly INormalEfCoreRepository<SyncPositionFlag, Guid> _syncPositionFlagRepository;
/// <summary>
/// Jit发运数据仓储
/// </summary>
private readonly INormalEfCoreRepository<PUB_SE_DETAIL, Guid> _pubSeDetailRepository;
/// <summary>
/// 客户零件关系领域
/// </summary>
private readonly MaterialRelationshipManager _materialRelationshipManager;
//private readonly IVmiService _vmiService;
/// <summary>
/// 构造
/// </summary>
public JitSeSyncAppService(
WMSBJBMPTDbContext wmsBJBMPTContext,
SettleAccountDbContext settleAccountDbContext,
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService)
public JitSeSyncAppService(WMSBJBMPTDbContext wmsBJBMPTContext, SettleAccountDbContext settleAccountDbContext)
{
_wmsBJBMPTContext = wmsBJBMPTContext;
_settleAccountDbContext = settleAccountDbContext;
_syncPositionFlagRepository = syncPositionFlagRepository;
_pubSeDetailRepository = pubSeDetailRepository;
_materialRelationshipManager = materialRelationshipManager;
//_vmiService = vmiService;
}
/// <summary>
/// 发运同步配置
/// </summary>
public SeSyncConfig SeSyncConfigInfo { get; set; }
/// <summary>
/// Seed
/// </summary>
public int Seed { get; set; }
[HttpPost]
public async Task Invoke()
@ -90,30 +66,70 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
//业务类别
var businessType = SeSyncConfigInfo.BusinessType;
Expression<Func<TM_BJBMPT_OTHER_RECORD, bool>> predicate = (t) => t.DeliverBillType == deliverBillType && (!deliverSubBillTypes.Any() || deliverSubBillTypes.Contains(t.DeliverSubBillType));
var syncPositionFlag = await _syncPositionFlagRepository.FindAsync(t => t.TableName == syncTableName).ConfigureAwait(false);
if (syncPositionFlag != null)
while (Seed < 10)
{
Seed++;
var syncPositionFlag = await _settleAccountDbContext.Set<SyncPositionFlag>().FirstOrDefaultAsync(t => t.TableName == syncTableName).ConfigureAwait(false);
var syncPosition = syncPositionFlag?.Position ?? "0";
Expression<Func<TM_BJBMPT_OTHER_RECORD, bool>> predicate = (t) => t.DeliverBillType == deliverBillType && t.UID > int.Parse(syncPosition) && (!deliverSubBillTypes.Any() || deliverSubBillTypes.Contains(t.DeliverSubBillType));
//WMS发运记录
var wmsSeRecords = _wmsBJBMPTContext.TM_BJBMPT_OTHER_RECORD.Where(predicate).Take(100_000).OrderBy(b => b.UID).ToList();
var pubSeDetails = ObjectMapper.Map<List<TM_BJBMPT_OTHER_RECORD>, List<PUB_SE_DETAIL>>(wmsSeRecords);
if (pubSeDetails.Any())
{
await SeDataPutInStorageAsync(pubSeDetails).ConfigureAwait(false);
}
else
{
break;
}
}
}
#region 私有方法
/// <summary>
/// 添加零件关系
/// </summary>
private async Task AddNewMaterialRelationshipsAsync(IEnumerable<MaterialRelationship> materialRelationships)
{
//新客户零件号和厂内零件号
var noHaveLuRePartCodes = from item1 in materialRelationships
join item2 in _settleAccountDbContext.Set<MaterialRelationship>()
on new { item1.ErpMaterialCode, item1.SettleMaterialCode } equals new { item2.ErpMaterialCode, item2.SettleMaterialCode }
into temp
from item3 in temp.DefaultIfEmpty()
where item3 == null
select item1;
if (noHaveLuRePartCodes.Any())
{
predicate = (t) => t.DeliverBillType == deliverBillType && t.UID > int.Parse(syncPositionFlag.Position) && (!deliverSubBillTypes.Any() || deliverSubBillTypes.Contains(t.DeliverSubBillType));
await _settleAccountDbContext.BulkInsertAsync(noHaveLuRePartCodes.ToList()).ConfigureAwait(false);
}
//WMS发运记录
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);
if (pubSeDetails.Any())
}
/// <summary>
/// 发运数据入库
/// </summary>
private async Task SeDataPutInStorageAsync(List<PUB_SE_DETAIL> seDetails)
{
var syncTableName = SeSyncConfigInfo.SyncTableName;
var businessType = SeSyncConfigInfo.BusinessType;
if (seDetails.Any())
{
if (businessType != EnumBusinessType.BeiJian)
{
//备件以外其他业务添加客户零件号与厂内零件号关系
//客户零件号和厂内零件号
var luRePartCodes = pubSeDetails.Where(t => !string.IsNullOrEmpty(t.LU) && !string.IsNullOrEmpty(t.FactoryPartCode)).Select(t => new { t.LU, t.FactoryPartCode }).Distinct().ToList();
var luRePartCodes = seDetails.Where(t => !string.IsNullOrEmpty(t.LU) && !string.IsNullOrEmpty(t.FactoryPartCode)).Select(t => new { t.LU, t.FactoryPartCode }).Distinct().ToList();
if (luRePartCodes.Any())
{
var materialRelationships = luRePartCodes.Select(t => new MaterialRelationship(GuidGenerator.Create(), t.FactoryPartCode, "", t.LU, businessType));
await this.AddNewMaterialRelationships(materialRelationships).ConfigureAwait(false);
await this.AddNewMaterialRelationshipsAsync(materialRelationships).ConfigureAwait(false);
}
}
pubSeDetails.ForEach(t =>
seDetails.ForEach(t =>
{
t.SetId(GuidGenerator.Create());
t.BusinessType = businessType;
@ -124,108 +140,101 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
t.Version = int.Parse(t.BillTime?.ToString("yyyyMM"));
}
});
if (syncPositionFlag != null)
{
syncPositionFlag.Position = wmsSeRecords.Last().UID.ToString();
}
else
{
syncPositionFlag = new SyncPositionFlag()
{
TableName = syncTableName,
Position = wmsSeRecords.Last().UID.ToString()
};
}
var syncPosition = seDetails.Last().UID.ToString();
using var transaction = await _settleAccountDbContext.Database.BeginTransactionAsync().ConfigureAwait(false);
try
{
_settleAccountDbContext.Set<SyncPositionFlag>().AddOrUpdate(t => t.TableName == syncPositionFlag.TableName, syncPositionFlag);
await _settleAccountDbContext.BulkInsertAsync(pubSeDetails).ConfigureAwait(false);
await transaction.CommitAsync().ConfigureAwait(false);
}
catch (Exception)
{
await transaction.RollbackAsync().ConfigureAwait(false);
throw;
}
foreach (var pubSeDetail in pubSeDetails)
{
if (pubSeDetail.TransType == EnumDelTransType.)
var syncPositionFlag = await _settleAccountDbContext.Set<SyncPositionFlag>().FirstOrDefaultAsync(t => t.TableName == syncTableName).ConfigureAwait(false);
if (syncPositionFlag != null)
{
var vmiBalance = new VmiBalance()
{
RealPartCode = pubSeDetail.PartCode,
VinCode = pubSeDetail.PN,
CustPartCode = default,
CodeType = default,
DeliverBillType = pubSeDetail.DeliverBillType,
Qty = pubSeDetail.Qty,
BillTime = pubSeDetail.BillTime ?? new DateTime(),
AssembleData = pubSeDetail.AssembleData,
ErpToLoc = pubSeDetail.ToErpLocCode,
Seq = default,
OrderNum = pubSeDetail.DeliveryIndex,
UniqueCode = default,
MatchNumber = default,
PjsNum = default,
Configcode = default,
factory = default,
DeliverSubBillType = pubSeDetail.DeliverSubBillType,
RealCode = default,
ReMark = pubSeDetail.Remark,
};
//await _vmiService.In(logType: Vmi.VmiLogType.Type100, changedNumber: pubSeDetail.DnBillNum, data: vmiBalance).ConfigureAwait(false);
syncPositionFlag.Position = syncPosition;
_settleAccountDbContext.Update<SyncPositionFlag>(syncPositionFlag);
}
else if (pubSeDetail.TransType == EnumDelTransType.退)
else
{
var vmiLog = new VmiLog()
syncPositionFlag = new SyncPositionFlag()
{
RealPartCode = pubSeDetail.PartCode,
VinCode = pubSeDetail.PN,
CustPartCode = default,
CodeType = default,
DeliverBillType = pubSeDetail.DeliverBillType,
Qty = pubSeDetail.Qty,
BillTime = pubSeDetail.BillTime ?? new DateTime(),
AssembleData = pubSeDetail.DnBillTime,
ErpToLoc = pubSeDetail.ToErpLocCode,
Seq = default,
OrderNum = pubSeDetail.DnBillNum,
UniqueCode = default,
MatchNumber = default,
PjsNum = default,
Configcode = default,
factory = default,
DeliverSubBillType = pubSeDetail.DeliverSubBillType,
RealCode = default,
ReMark = pubSeDetail.Remark,
TableName = syncTableName,
Position = syncPosition
};
//await _vmiService.Out(VmiLogType.Type400, pubSeDetail.DnBillNum, vmiLog).ConfigureAwait(false);
_settleAccountDbContext.Add<SyncPositionFlag>(syncPositionFlag);
}
await _settleAccountDbContext.BulkInsertAsync(seDetails).ConfigureAwait(false);
await SaveVmiLogsAsync(seDetails).ConfigureAwait(false);
await _settleAccountDbContext.SaveChangesAsync().ConfigureAwait(false);
await transaction.CommitAsync().ConfigureAwait(false);
}
catch (Exception)
{
await transaction.RollbackAsync().ConfigureAwait(false);
throw;
}
}
}
/// <summary>
/// 添加零件关系
/// 保存寄售库Log
/// </summary>
public async Task AddNewMaterialRelationships(IEnumerable<MaterialRelationship> materialRelationships)
private async Task SaveVmiLogsAsync(List<PUB_SE_DETAIL> seDetails)
{
//新客户零件号和厂内零件号
var noHaveLuRePartCodes = from item1 in materialRelationships
join item2 in _settleAccountDbContext.Set<MaterialRelationship>()
on new { item1.ErpMaterialCode, item1.SettleMaterialCode } equals new { item2.ErpMaterialCode, item2.SettleMaterialCode }
into temp
from item3 in temp.DefaultIfEmpty()
where item3 == null
select item1;
var deliverSeDetails = seDetails.FindAll(t => t.TransType == EnumDelTransType.);
var returnSeDetails = seDetails.FindAll(t => t.TransType == EnumDelTransType.退);
var dateTimeNow = DateTime.Now;
if (noHaveLuRePartCodes.Any())
var vmiLogList = deliverSeDetails.Select(t => new VmiLog(Guid.NewGuid())
{
await _settleAccountDbContext.BulkInsertAsync(noHaveLuRePartCodes.ToList()).ConfigureAwait(false);
}
LogType = VmiLogType.Type100,
ChangedQty = t.Qty,
ChangedType = VmiType.In,
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.DnBillNum,
Qty = t.Qty,
ReMark = t.Remark,
RealCode = t.PartCode
}).ToList();
var returnVmiLogList = returnSeDetails.Select(t => new VmiLog(Guid.NewGuid())
{
LogType = VmiLogType.Type400,
ChangedQty = t.Qty,
ChangedType = VmiType.In,
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.DnBillNum,
Qty = -t.Qty,
ReMark = t.Remark,
RealCode = t.PartCode
}).ToList();
vmiLogList.AddRange(returnVmiLogList);
await SaveVmiMessagesAsync(vmiLogList).ConfigureAwait(false);
await _settleAccountDbContext.BulkInsertAsync(vmiLogList).ConfigureAwait(false);
}
/// <summary>
/// 保存寄售库Message
/// </summary>
public async Task SaveVmiMessagesAsync(List<VmiLog> vmiLogs)
{
var vmiMessages = vmiLogs.Select(t => new VmiMessage(Guid.NewGuid())
{
Message = JsonConvert.SerializeObject(t)
}).ToList();
await _settleAccountDbContext.BulkInsertAsync(vmiMessages).ConfigureAwait(false);
}
#endregion
}

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

@ -3,11 +3,8 @@ using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
@ -21,14 +18,7 @@ public class YinDuSeSyncAppService : JitSeSyncAppService, IJobService
/// <summary>
/// 构造
/// </summary>
public YinDuSeSyncAppService(
WMSBJBMPTDbContext wmsBJBMPTContext,
SettleAccountDbContext settleAccountDbContext,
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService
) : base(wmsBJBMPTContext, settleAccountDbContext, syncPositionFlagRepository, pubSeDetailRepository, materialRelationshipManager, vmiService)
public YinDuSeSyncAppService(WMSBJBMPTDbContext wmsBJBMPTContext, SettleAccountDbContext settleAccountDbContext) : base(wmsBJBMPTContext, settleAccountDbContext)
{
base.SeSyncConfigInfo = new SeSyncConfig()
{

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

@ -3,12 +3,8 @@ using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
@ -22,14 +18,7 @@ public class ZhiGongBBACSeSyncAppService : JitSeSyncAppService, IJobService
/// <summary>
/// 构造
/// </summary>
public ZhiGongBBACSeSyncAppService(
WMSBJBMPTDbContext wmsBJBMPTContext,
SettleAccountDbContext settleAccountDbContext,
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService
) : base(wmsBJBMPTContext, settleAccountDbContext, syncPositionFlagRepository, pubSeDetailRepository, materialRelationshipManager, vmiService)
public ZhiGongBBACSeSyncAppService(WMSBJBMPTDbContext wmsBJBMPTContext, SettleAccountDbContext settleAccountDbContext) : base(wmsBJBMPTContext, settleAccountDbContext)
{
base.SeSyncConfigInfo = new SeSyncConfig()
{
@ -46,6 +35,6 @@ public class ZhiGongBBACSeSyncAppService : JitSeSyncAppService, IJobService
[HttpPost]
public async Task Invoke(IServiceProvider serviceProvider)
{
await this.Invoke();
await this.Invoke().ConfigureAwait(false);
}
}

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

@ -1,18 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.Entities.Prices;
using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
@ -26,15 +18,7 @@ public class ZhiGongHBPOSeSyncAppService : JitSeSyncAppService, IJobService
/// <summary>
/// 构造
/// </summary>
public ZhiGongHBPOSeSyncAppService(
IHost host,
WMSBJBMPTDbContext wmsBJBMPTContext,
SettleAccountDbContext settleAccountDbContext,
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService
) : base(wmsBJBMPTContext, settleAccountDbContext, syncPositionFlagRepository, pubSeDetailRepository, materialRelationshipManager, vmiService)
public ZhiGongHBPOSeSyncAppService(WMSBJBMPTDbContext wmsBJBMPTContext, SettleAccountDbContext settleAccountDbContext) : base(wmsBJBMPTContext, settleAccountDbContext)
{
base.SeSyncConfigInfo = new SeSyncConfig()
{

8
code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/Options/SeConfigOptions.cs

@ -0,0 +1,8 @@
namespace Win.Sfs.SettleAccount.Options;
/// <summary>
/// 发运配置选项
/// </summary>
public class SeConfigOptions
{
}

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

@ -6,7 +6,7 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
/// <summary>
/// Jit(非Jis
/// Jit(非Jis)
/// </summary>
public class TM_BJBMPT_OTHER_RECORD
{

6
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Boms/Bom.cs

@ -1,4 +1,4 @@
using System;
using System;
using System.ComponentModel.DataAnnotations;
using Win.Sfs.Shared.DomainBase;
@ -83,7 +83,7 @@ namespace Win.Sfs.SettleAccount.Boms
protected Bom()
public Bom()
{
}
@ -159,4 +159,4 @@ namespace Win.Sfs.SettleAccount.Boms
Enabled = enabled;
}
}
}
}

Loading…
Cancel
Save