Browse Source

添加号码记录实体

master
lvzb 1 year ago
parent
commit
957b398540
  1. 38
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Entitys/BillNumberRecord.cs
  2. 30
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/BillNumberRecordDomainService.cs
  3. 3
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContext.cs
  4. 8
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs

38
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Entitys/BillNumberRecord.cs

@ -0,0 +1,38 @@
using JetBrains.Annotations;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;
namespace WY.NewJit.MsgCheck
{
/// <summary>
/// 单号纪律表
/// </summary>
public class BillNumberRecord : AuditedAggregateRoot<Guid>
{
/// <summary>
/// 产线#
/// </summary>
public virtual string ProductLine { get; set; }
/// <summary>
/// 轮数#
/// </summary>
public virtual int RoundNumber { get; set; }
/// <summary>
/// 记录号#
/// </summary>
public virtual int RecordNumber { get; set; }
/// <summary>
/// 插入数据条数#
/// </summary>
public virtual int InsertedRows { get; set; }
/// <summary>
/// 更新时间#
/// </summary>
public virtual DateTime UpdateTime { get; set; }
}
}

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

@ -0,0 +1,30 @@
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Domain.Services;
using WY.NewJit.MsgBaseData;
namespace WY.NewJit.MsgCheck
{
public class BillNumberRecordDomainService : DomainService
{
private readonly IRepository<BillNumberRecord, Guid> _billNumberRepository;
private ILogger<M100CheckDomainService> _logger;
private readonly LogRemindDomainService _logRemindDomainService;
public BillNumberRecordDomainService(
IRepository<BillNumberRecord, Guid> billNumberRepository,
ILogger<M100CheckDomainService> logger,
LogRemindDomainService logRemindDomainService)
{
_billNumberRepository = billNumberRepository;
_logger = logger;
_logRemindDomainService = logRemindDomainService;
}
}
}

3
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContext.cs

@ -77,6 +77,8 @@ namespace WY.NewJit.EntityFrameworkCore
public DbSet<UnknownAssembly> UnknownAssemblys { get; set; }
public DbSet<UnknownAssemblyPart> UnknownAssemblyParts { get; set; }
public DbSet<BillNumberRecord> BillNumberRecords { get; set; }
#endregion
@ -146,6 +148,7 @@ namespace WY.NewJit.EntityFrameworkCore
#endregion
/* Add DbSet properties for your Aggregate Roots / Entities here.
* Also map them inside NewJitDbContextModelCreatingExtensions.ConfigureNewJit
*/

8
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs

@ -167,6 +167,14 @@ namespace WY.NewJit.EntityFrameworkCore
#region 报文解析及校验
builder.Entity<BillNumberRecord>(b => {
b.ToTable(NewJitConsts.DbTablePrefix + nameof(BillNumberRecord));
b.ConfigureByConvention();
b.Property(itm => itm.ProductLine).HasColumnType("varchar").HasMaxLength(50);
b.HasIndex(x => new { x.ProductLine }).IsUnique();
});
builder.Entity<ZHBPrintStatus>(b => {
b.ToTable(NewJitConsts.DbTablePrefix + nameof(ZHBPrintStatus));
b.ConfigureByConvention();

Loading…
Cancel
Save