Browse Source

未知总成修改

master
lvzb 1 year ago
parent
commit
75088ae32e
  1. 35
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/UnknownAssemblys/UnknownAssemblyAppService.cs
  2. 2
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml
  3. 2
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/PrintTypeEnum.cs
  4. 18
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/BillNumberRecordDomainService.cs

35
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/UnknownAssemblys/UnknownAssemblyAppService.cs

@ -24,6 +24,7 @@ using WY.NewJit.MsgTransmission;
using Volo.Abp.EventBus.Distributed;
using WY.NewJit.SettleAccountFis;
using WY.NewJit.MsgTransmission.PaiGe;
using WY.NewJit.PrintTable;
namespace WY.NewJit.MsgCheck
{
@ -47,6 +48,7 @@ namespace WY.NewJit.MsgCheck
private readonly IRepository<BillR100, Guid> _billR100Repository;
private readonly IRepository<BillM100, Guid> _billM100Repository;
private readonly IRepository<WaitPrint, Guid> _waitPrintRepository;
/// <summary>
/// ERP总成仓储
@ -131,7 +133,8 @@ namespace WY.NewJit.MsgCheck
R100CheckDomainService r100CheckDomainSrv,
M100CheckDomainService m100CheckDomainService,
IDistributedEventBus distributedEventBus,
IRepository<PartCfg, Guid> partCfgRepository
IRepository<PartCfg, Guid> partCfgRepository,
IRepository<WaitPrint, Guid> waitPrintRepository
)
{
_UnknownAssemblyRepository = UnknownAssemblyRepository;
@ -153,6 +156,7 @@ namespace WY.NewJit.MsgCheck
_m100CheckDomainService = m100CheckDomainService;
_distributedEventBus = distributedEventBus;
_partCfgRepository = partCfgRepository;
_waitPrintRepository = waitPrintRepository;
}
#endregion
@ -909,6 +913,35 @@ select * from
{
m100Obj.NeedReplenishPrint = 1;
await _billM100Repository.UpdateAsync(m100Obj);
//var waititem=await _waitPrintRepository.GetAsync(r=>r.M100Id== m100Obj.Id);
// if (waititem == null)
// {
// WaitPrint targetWaitPrint = new WaitPrint(GuidGenerator.Create());
// targetWaitPrint.M100Id = m100Obj.Id;
// //targetWaitPrint.BusinessType = m100Obj.BusinessType;
// //targetWaitPrint.ProductLine = sourceWaitPrint.ProductLine;
// //targetWaitPrint.OnlineTime = sourceWaitPrint.OnlineTime;
// //targetWaitPrint.HostSN = breaknum.ToString().Right(5).TryToIntZero();
// //targetWaitPrint.KNR = null;
// //targetWaitPrint.VIN = null;
// //targetWaitPrint.VehicleModelCode = null;
// //targetWaitPrint.AssemblyID = null;
// //targetWaitPrint.BillStatus = BillStatusEnum.BreakNum;
// //targetWaitPrint.PrintType = PrintTypeEnum.ReplenishPrint;
// //targetWaitPrint.HostSN2 = Convert.ToInt32 (m100Obj.HostSN2);
// //targetWaitPrint.Description = null;
// //targetWaitPrint.ReceiveTime = null;
// //targetWaitPrint.CreationTime = null;
// //targetWaitPrint.CreatorId = null;
// //targetWaitPrint.LastModificationTime = null;
// //targetWaitPrint.LastModifierId = null;
// await _waitPrintRepository.InsertAsync(targetWaitPrint);
// }
// else
// {
// waititem.PrintType =PrintTypeEnum.ReplenishPrint;
// }
}
#endregion
}

2
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml

@ -1800,7 +1800,7 @@
错误信息前缀
</summary>
</member>
<member name="M:WY.NewJit.MsgCheck.UnknownAssemblyAppService.#ctor(Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgCheck.UnknownAssembly,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgCheck.UnknownAssemblyPart,System.Guid},Microsoft.Extensions.Logging.ILogger{WY.NewJit.MsgCheck.UnknownAssemblyAppService},WY.NewJit.EntityFrameworkCore.NewJitDapperRepository,Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.AssemblyCfgVehicle,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.AssemblyCfgErp,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.AssemblyCfgPart,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgCheck.BillR100,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgCheck.BillM100,System.Guid},Volo.Abp.BlobStoring.IBlobContainer{WY.NewJit.Common.OurFileContainer},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.AssemblyCfgErp,System.Guid},WY.NewJit.MsgTransmission.PaiGe.MsgTransmissionAppService,WY.NewJit.MsgCheck.R100CheckDomainService,WY.NewJit.MsgCheck.M100CheckDomainService,Volo.Abp.EventBus.Distributed.IDistributedEventBus,Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.PartCfg,System.Guid})">
<member name="M:WY.NewJit.MsgCheck.UnknownAssemblyAppService.#ctor(Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgCheck.UnknownAssembly,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgCheck.UnknownAssemblyPart,System.Guid},Microsoft.Extensions.Logging.ILogger{WY.NewJit.MsgCheck.UnknownAssemblyAppService},WY.NewJit.EntityFrameworkCore.NewJitDapperRepository,Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.AssemblyCfgVehicle,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.AssemblyCfgErp,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.AssemblyCfgPart,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgCheck.BillR100,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgCheck.BillM100,System.Guid},Volo.Abp.BlobStoring.IBlobContainer{WY.NewJit.Common.OurFileContainer},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.AssemblyCfgErp,System.Guid},WY.NewJit.MsgTransmission.PaiGe.MsgTransmissionAppService,WY.NewJit.MsgCheck.R100CheckDomainService,WY.NewJit.MsgCheck.M100CheckDomainService,Volo.Abp.EventBus.Distributed.IDistributedEventBus,Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.MsgBaseData.PartCfg,System.Guid},Volo.Abp.Domain.Repositories.IRepository{WY.NewJit.PrintTable.WaitPrint,System.Guid})">
<summary>
构造函数
</summary>

2
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/PrintTypeEnum.cs

@ -13,7 +13,7 @@ namespace WY.NewJit.PrintTable
[Description("顺序打印")]
OrderPrint = 1,
[Description("")]
[Description("补账打印")]
ReplenishPrint = 2,
}

18
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/BillNumberRecordDomainService.cs

@ -18,7 +18,7 @@ namespace WY.NewJit.MsgCheck
private readonly IRepository<WaitPrint, Guid> _waitPrintRepository;
private ILogger<M100CheckDomainService> _logger;
private readonly LogRemindDomainService _logRemindDomainService;
public static List<BillNumberRecord> _billNumberRecordCaches= new List<BillNumberRecord>() ;
public static List<BillNumberRecord> _billNumberRecordCaches= new List<BillNumberRecord>() ;//记录内存
public BillNumberRecordDomainService(
IRepository<BillNumberRecord, Guid> billNumberRepository,
@ -38,7 +38,11 @@ namespace WY.NewJit.MsgCheck
{
_billNumberRecordCaches.Clear();
}
/// <summary>
/// 获取和更新记录和内存
/// </summary>
/// <param name="isupdate"></param>
/// <returns></returns>
public async Task<ObjectResultDto> GetOrUpDateBillNumberRecordCache(bool isupdate)
{
ObjectResultDto ret = new ObjectResultDto(true, null);
@ -78,8 +82,14 @@ namespace WY.NewJit.MsgCheck
var recordcache= _billNumberRecordCaches.FirstOrDefault(r=>r.ProductLine==productLine);
if (recordcache == null)
{
_logger.LogDebug("缓存记录为空无法解析!");
throw new BusinessException("1001", "缓存记录为空无法解析!");
recordcache = new BillNumberRecord();
recordcache.RecordNumber = 0;
recordcache.RoundNumber = 1;
recordcache.RecordNumber = 0;
recordcache.ProductLine = productLine;
_billNumberRecordCaches.Add(recordcache);
//_logger.LogDebug("缓存记录为空无法解析!");
//throw new BusinessException("1001", "缓存记录为空无法解析!");
}
int recordNumber = recordcache.RecordNumber;//记录号
int roundNumber = recordcache.RoundNumber; //记录轮数

Loading…
Cancel
Save