|
|
@ -421,59 +421,6 @@ namespace Win.Sfs.SettleAccount |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 一汽轿车平台验收结算明细-导入
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="builder"></param>
|
|
|
|
/// <param name="options"></param>
|
|
|
|
private static void ConfigureHQCar(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) |
|
|
|
{ |
|
|
|
|
|
|
|
builder.Entity<HQ_Car_Platform>(b => |
|
|
|
{ |
|
|
|
|
|
|
|
b.ToTable($"{options.TablePrefix}_HQ_Car_Platform", options.Schema); |
|
|
|
|
|
|
|
b.ConfigureByConvention(); |
|
|
|
b.Property(x => x.HQCarKanBan).HasMaxLength(150);//看板号(一汽轿车没有看板号)
|
|
|
|
b.Property(x => x.MaterialVoucherNo).HasMaxLength(150); |
|
|
|
b.Property(x => x.Factory).HasMaxLength(50); |
|
|
|
b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(150); |
|
|
|
b.Property(x => x.ExternalKanbanNumber).HasMaxLength(50); |
|
|
|
b.Property(x => x.KanbanNumber).HasMaxLength(150);//看板编号
|
|
|
|
b.Property(x => x.Period).HasMaxLength(50); |
|
|
|
b.Property(x => x.Year).HasMaxLength(50); |
|
|
|
b.Property(x => x.Version).HasMaxLength(50); |
|
|
|
b.Property(x => x.Supplier).HasMaxLength(50); |
|
|
|
b.Property(x => x.StorageLocation).HasMaxLength(50); |
|
|
|
b.Property(x => x.StorageLocationDesc).HasMaxLength(150); |
|
|
|
//创建组合索引
|
|
|
|
b.HasIndex(x => new { x.Version, x.KanbanNumber, x.MaterialCode }).IsUnique().HasFilter(IsDeletedFilter); |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
private static void ConfigureHQCarVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) |
|
|
|
{ |
|
|
|
|
|
|
|
builder.Entity<HQ_Car_PlatformVersion>(b => |
|
|
|
{ |
|
|
|
b.ToTable($"{options.TablePrefix}_HQ_Car_PlatformVersion", options.Schema); |
|
|
|
b.ConfigureByConvention(); |
|
|
|
b.Property(x => x.Year).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); |
|
|
|
b.Property(x => x.Period).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); |
|
|
|
b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); |
|
|
|
b.Property(x => x.CustomerCode).HasMaxLength(CommonConsts.MaxCodeLength); |
|
|
|
b.HasIndex(x => new { x.Version }).IsUnique().HasFilter(IsDeletedFilter); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 红旗工厂F平台验收结算明细-导入
|
|
|
|
/// </summary>
|
|
|
@ -488,7 +435,7 @@ namespace Win.Sfs.SettleAccount |
|
|
|
b.ToTable($"{options.TablePrefix}_HQ_F_Platform", options.Schema); |
|
|
|
|
|
|
|
b.ConfigureByConvention(); |
|
|
|
b.Property(x => x.HQHKanBan).IsRequired().HasMaxLength(150);//必填项
|
|
|
|
b.Property(x => x.HQHKanBan).HasMaxLength(150);//看板号有空的情况,如备品库
|
|
|
|
b.Property(x => x.MaterialVoucherNo).HasMaxLength(150); |
|
|
|
b.Property(x => x.Factory).HasMaxLength(50); |
|
|
|
b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(150); |
|
|
@ -502,7 +449,7 @@ namespace Win.Sfs.SettleAccount |
|
|
|
b.Property(x => x.StorageLocationDesc).HasMaxLength(150); |
|
|
|
b.Property(x => x.AcceptanceNo).HasMaxLength(50); |
|
|
|
//创建组合索引
|
|
|
|
b.HasIndex(x => new { x.Version, x.HQHKanBan, x.MaterialCode }).IsUnique().HasFilter(IsDeletedFilter); |
|
|
|
//b.HasIndex(x => new { x.Version, x.HQHKanBan, x.MaterialCode }).IsUnique().HasFilter(IsDeletedFilter);
|
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
@ -550,7 +497,7 @@ namespace Win.Sfs.SettleAccount |
|
|
|
b.Property(x => x.StorageLocation).HasMaxLength(50); |
|
|
|
b.Property(x => x.StorageLocationDesc).HasMaxLength(150); |
|
|
|
//创建组合索引
|
|
|
|
b.HasIndex(x => new { x.Version, x.KanbanNumber, x.MaterialCode }).IsUnique().HasFilter(IsDeletedFilter); |
|
|
|
//b.HasIndex(x => new { x.Version, x.KanbanNumber, x.MaterialCode }).IsUnique().HasFilter(IsDeletedFilter);
|
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
@ -614,7 +561,7 @@ namespace Win.Sfs.SettleAccount |
|
|
|
b.ToTable($"{options.TablePrefix}_HQ_M_Platform", options.Schema); |
|
|
|
|
|
|
|
b.ConfigureByConvention(); |
|
|
|
b.Property(x => x.HQMKanBan).IsRequired().HasMaxLength(150);//必填项
|
|
|
|
b.Property(x => x.HQMKanBan).HasMaxLength(150);//有空的情况
|
|
|
|
b.Property(x => x.MaterialVoucherNo).HasMaxLength(150); |
|
|
|
b.Property(x => x.Factory).HasMaxLength(50); |
|
|
|
b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(150); |
|
|
@ -627,7 +574,7 @@ namespace Win.Sfs.SettleAccount |
|
|
|
b.Property(x => x.StorageLocation).HasMaxLength(50); |
|
|
|
b.Property(x => x.StorageLocationDesc).HasMaxLength(150); |
|
|
|
//创建组合索引
|
|
|
|
b.HasIndex(x => new { x.Version, x.HQMKanBan, x.MaterialCode }).IsUnique().HasFilter(IsDeletedFilter); |
|
|
|
//b.HasIndex(x => new { x.Version, x.HQMKanBan, x.MaterialCode }).IsUnique().HasFilter(IsDeletedFilter);
|
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
@ -662,7 +609,8 @@ namespace Win.Sfs.SettleAccount |
|
|
|
b.ToTable($"{options.TablePrefix}_HQ_H_Platform", options.Schema); |
|
|
|
|
|
|
|
b.ConfigureByConvention(); |
|
|
|
b.Property(x => x.HQHKanBan).IsRequired().HasMaxLength(150);//必填项
|
|
|
|
//b.Property(x => x.HQHKanBan).IsRequired().HasMaxLength(150);//必填项
|
|
|
|
b.Property(x => x.HQHKanBan).HasMaxLength(150);//有空的情况
|
|
|
|
b.Property(x => x.MaterialVoucherNo).HasMaxLength(150); |
|
|
|
b.Property(x => x.Factory).HasMaxLength(50); |
|
|
|
b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(150); |
|
|
@ -677,7 +625,7 @@ namespace Win.Sfs.SettleAccount |
|
|
|
b.Property(x => x.AcceptanceNo).HasMaxLength(50); |
|
|
|
|
|
|
|
//创建组合索引
|
|
|
|
b.HasIndex(x => new { x.Version, x.HQHKanBan, x.MaterialCode }).IsUnique().HasFilter(IsDeletedFilter); |
|
|
|
//b.HasIndex(x => new { x.Version, x.HQHKanBan, x.MaterialCode }).IsUnique().HasFilter(IsDeletedFilter);
|
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|