|
|
@ -65,7 +65,7 @@ namespace Win.Sfs.SettleAccount |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
#region 派格结算
|
|
|
|
#region 北汽结算
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -133,7 +133,7 @@ namespace Win.Sfs.SettleAccount |
|
|
|
//有条码
|
|
|
|
//builder.ConfigureWmsDetailWithCodeReport(options);
|
|
|
|
|
|
|
|
builder.ConfigureErrorBill(options); |
|
|
|
//builder.ConfigureErrorBill(options);
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
@ -141,150 +141,15 @@ namespace Win.Sfs.SettleAccount |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 红旗M平台、一汽轿车
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 北汽
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// M平台出库详表
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="builder"></param>
|
|
|
|
/// <param name="options"></param>
|
|
|
|
private static void ConfigureErrorBill(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) |
|
|
|
{ |
|
|
|
|
|
|
|
builder.Entity<ErrorBill>(b => |
|
|
|
{ |
|
|
|
b.ToTable($"{options.TablePrefix}_ErrorBill", options.Schema); |
|
|
|
b.ConfigureByConvention(); |
|
|
|
b.Property(x => x.BillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); |
|
|
|
b.Property(x => x.WmsBillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); |
|
|
|
|
|
|
|
b.Property(x => x.CustomerMaterialCode).HasMaxLength(CommonConsts.MaxCodeLength); |
|
|
|
|
|
|
|
b.Property(x => x.MaterialCode).HasMaxLength(CommonConsts.MaxCodeLength); |
|
|
|
b.HasIndex(x => new { x.CustomerMaterialCode, x.BillNum }); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region PG-派格
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static void ConfigureWmsDetailReport(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) |
|
|
|
{ |
|
|
|
|
|
|
|
builder.Entity<WmsDetailReport>(b => |
|
|
|
{ |
|
|
|
|
|
|
|
b.ToTable($"{options.TablePrefix}_WmsDetailReport", options.Schema); |
|
|
|
|
|
|
|
b.ConfigureByConvention(); |
|
|
|
b.Property(x => x.BillNum).IsRequired().HasMaxLength(50);//必填项
|
|
|
|
b.Property(x => x.MaterialCode).HasMaxLength(50); |
|
|
|
b.Property(x => x.MaterialDesc).HasMaxLength(100); |
|
|
|
b.Property(x => x.Client).IsRequired().HasMaxLength(50); |
|
|
|
b.Property(x => x.ClientCode).HasMaxLength(50); |
|
|
|
b.Property(x => x.MaterialCode).HasMaxLength(50); |
|
|
|
b.Property(x => x.MaterialDesc).HasMaxLength(150); |
|
|
|
|
|
|
|
b.Property(x => x.MaterialGroup).HasMaxLength(50); |
|
|
|
b.Property(x => x.MaterialGroupCode).HasMaxLength(50); |
|
|
|
b.Property(x => x.SaleCode).HasMaxLength(50); |
|
|
|
b.Property(x => x.SettleCode).HasMaxLength(50); |
|
|
|
//创建组合索引
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
private static void ConfigureWmsDetailDiffReport(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) |
|
|
|
{ |
|
|
|
|
|
|
|
builder.Entity<WmsDetailDiffReport>(b => |
|
|
|
{ |
|
|
|
|
|
|
|
b.ToTable($"{options.TablePrefix}_WmsDetailDiffReport", options.Schema); |
|
|
|
|
|
|
|
b.ConfigureByConvention(); |
|
|
|
b.Property(x => x.BillNum).IsRequired().HasMaxLength(50);//必填项
|
|
|
|
b.Property(x => x.MaterialCode).HasMaxLength(50); |
|
|
|
b.Property(x => x.MaterialDesc).HasMaxLength(100); |
|
|
|
b.Property(x => x.Client).IsRequired().HasMaxLength(50); |
|
|
|
|
|
|
|
b.Property(x => x.MaterialCode).HasMaxLength(50); |
|
|
|
b.Property(x => x.MaterialDesc).HasMaxLength(150); |
|
|
|
|
|
|
|
b.Property(x => x.MaterialGroup).HasMaxLength(50); |
|
|
|
b.Property(x => x.MaterialGroupCode).HasMaxLength(50); |
|
|
|
|
|
|
|
//创建组合索引
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
private static void ConfigureWmsDetailCancelReport(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) |
|
|
|
{ |
|
|
|
|
|
|
|
builder.Entity<WmsDetailCancelReport>(b => |
|
|
|
{ |
|
|
|
|
|
|
|
b.ToTable($"{options.TablePrefix}_WmsDetailCancelReport", options.Schema); |
|
|
|
|
|
|
|
b.ConfigureByConvention(); |
|
|
|
b.Property(x => x.BillNum).IsRequired().HasMaxLength(50);//必填项
|
|
|
|
b.Property(x => x.MaterialCode).HasMaxLength(50); |
|
|
|
b.Property(x => x.MaterialDesc).HasMaxLength(100); |
|
|
|
b.Property(x => x.Client).IsRequired().HasMaxLength(50); |
|
|
|
|
|
|
|
b.Property(x => x.MaterialCode).HasMaxLength(50); |
|
|
|
b.Property(x => x.MaterialDesc).HasMaxLength(150); |
|
|
|
|
|
|
|
b.Property(x => x.MaterialGroup).HasMaxLength(50); |
|
|
|
b.Property(x => x.MaterialGroupCode).HasMaxLength(50); |
|
|
|
|
|
|
|
//创建组合索引
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 有条码
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="builder"></param>
|
|
|
|
/// <param name="options"></param>
|
|
|
|
private static void ConfigureWmsDetailWithCodeReport(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) |
|
|
|
{ |
|
|
|
|
|
|
|
builder.Entity<WmsDetailWithCodeReport>(b => |
|
|
|
{ |
|
|
|
|
|
|
|
b.ToTable($"{options.TablePrefix}_WmsDetailWithCodeReport", options.Schema); |
|
|
|
|
|
|
|
b.ConfigureByConvention(); |
|
|
|
b.Property(x => x.BillNum).IsRequired().HasMaxLength(50);//必填项
|
|
|
|
b.Property(x => x.MaterialCode).HasMaxLength(50); |
|
|
|
b.Property(x => x.MaterialDesc).HasMaxLength(100); |
|
|
|
b.Property(x => x.Client).IsRequired().HasMaxLength(50); |
|
|
|
|
|
|
|
b.Property(x => x.MaterialCode).HasMaxLength(50); |
|
|
|
b.Property(x => x.MaterialDesc).HasMaxLength(150); |
|
|
|
|
|
|
|
b.Property(x => x.MaterialGroup).HasMaxLength(50); |
|
|
|
b.Property(x => x.EstimateType).HasMaxLength(50); |
|
|
|
|
|
|
|
//创建组合索引
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -340,81 +205,81 @@ namespace Win.Sfs.SettleAccount |
|
|
|
/// </summary>
|
|
|
|
/// <param name="builder"></param>
|
|
|
|
/// <param name="options"></param>
|
|
|
|
private static void ConfigureUnHQSettleAccount(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) |
|
|
|
{ |
|
|
|
//private static void ConfigureUnHQSettleAccount(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
|
|
|
|
//{
|
|
|
|
|
|
|
|
builder.Entity<UnHQSettleAccount>(b => |
|
|
|
{ |
|
|
|
// builder.Entity<UnHQSettleAccount>(b =>
|
|
|
|
// {
|
|
|
|
|
|
|
|
b.ToTable($"{options.TablePrefix}_UnHQSettleAccount", options.Schema); |
|
|
|
// b.ToTable($"{options.TablePrefix}_UnHQSettleAccount", 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); |
|
|
|
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.Property(x => x.AcceptanceNo).HasMaxLength(50); |
|
|
|
// 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);
|
|
|
|
// 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.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);
|
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
// });
|
|
|
|
//}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 红旗主机场-未结明细-版本
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="builder"></param>
|
|
|
|
/// <param name="options"></param>
|
|
|
|
private static void ConfigureUnHQSettleAccountVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) |
|
|
|
{ |
|
|
|
//private static void ConfigureUnHQSettleAccountVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
|
|
|
|
//{
|
|
|
|
|
|
|
|
builder.Entity<UnHQSettleAccountVersion>(b => |
|
|
|
{ |
|
|
|
b.ToTable($"{options.TablePrefix}_UnHQSettleAccountVersion", 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); |
|
|
|
}); |
|
|
|
// builder.Entity<UnHQSettleAccountVersion>(b =>
|
|
|
|
// {
|
|
|
|
// b.ToTable($"{options.TablePrefix}_UnHQSettleAccountVersion", 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>
|
|
|
|
/// 大众发票汇总导入
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="builder"></param>
|
|
|
|
/// <param name="options"></param>
|
|
|
|
private static void ConfigureInvoice(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) |
|
|
|
{ |
|
|
|
//private static void ConfigureInvoice(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
|
|
|
|
//{
|
|
|
|
|
|
|
|
builder.Entity<Invoice>(b => |
|
|
|
{ |
|
|
|
// builder.Entity<Invoice>(b =>
|
|
|
|
// {
|
|
|
|
|
|
|
|
b.ToTable($"{options.TablePrefix}_Invoice", options.Schema); |
|
|
|
// b.ToTable($"{options.TablePrefix}_Invoice", options.Schema);
|
|
|
|
|
|
|
|
b.ConfigureByConvention(); |
|
|
|
b.Property(x => x.Year).HasMaxLength(50); |
|
|
|
b.Property(x => x.Period).HasMaxLength(50); |
|
|
|
b.Property(x => x.Version).HasMaxLength(50); |
|
|
|
b.Property(x => x.Factory).HasMaxLength(50); |
|
|
|
b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(50);//零件号不能为空
|
|
|
|
b.Property(x => x.MaterialDesc).HasMaxLength(50); |
|
|
|
b.Property(x => x.Remark).HasMaxLength(1000); |
|
|
|
// b.ConfigureByConvention();
|
|
|
|
// b.Property(x => x.Year).HasMaxLength(50);
|
|
|
|
// b.Property(x => x.Period).HasMaxLength(50);
|
|
|
|
// b.Property(x => x.Version).HasMaxLength(50);
|
|
|
|
// b.Property(x => x.Factory).HasMaxLength(50);
|
|
|
|
// b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(50);//零件号不能为空
|
|
|
|
// b.Property(x => x.MaterialDesc).HasMaxLength(50);
|
|
|
|
// b.Property(x => x.Remark).HasMaxLength(1000);
|
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
// });
|
|
|
|
//}
|
|
|
|
/// <summary>
|
|
|
|
/// 大众发票汇总导入-版本
|
|
|
|
/// </summary>
|
|
|
@ -443,31 +308,31 @@ namespace Win.Sfs.SettleAccount |
|
|
|
/// </summary>
|
|
|
|
/// <param name="builder"></param>
|
|
|
|
/// <param name="options"></param>
|
|
|
|
private static void ConfigureSettleAccount(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) |
|
|
|
{ |
|
|
|
builder.Entity<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>(b => |
|
|
|
{ |
|
|
|
b.ToTable($"{options.TablePrefix}_Settle", options.Schema); |
|
|
|
b.ConfigureByConvention(); |
|
|
|
//private static void ConfigureSettleAccount(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
|
|
|
|
//{
|
|
|
|
// builder.Entity<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>(b =>
|
|
|
|
// {
|
|
|
|
// b.ToTable($"{options.TablePrefix}_Settle", options.Schema);
|
|
|
|
// b.ConfigureByConvention();
|
|
|
|
|
|
|
|
b.Property(x => x.KENNCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); |
|
|
|
// b.Property(x => x.KENNCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
|
|
|
|
|
|
|
|
b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); |
|
|
|
b.Property(x => x.Year).HasMaxLength(CommonConsts.MaxCodeLength); |
|
|
|
b.Property(x => x.Period).HasMaxLength(CommonConsts.MaxCodeLength); |
|
|
|
b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); |
|
|
|
b.Property(x => x.Qty).IsRequired(); |
|
|
|
b.Property(x => x.Model).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); |
|
|
|
b.Property(x => x.SettlementID).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); |
|
|
|
b.Property(x => x.SettlementSupplier).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); |
|
|
|
b.Property(x => x.ChassisNumber).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); |
|
|
|
//b.Property(x => x.SettlementSupplier).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
|
|
|
|
|
|
|
|
b.Property(x => x.Enabled); |
|
|
|
b.HasIndex(x => new { x.state }); |
|
|
|
b.HasIndex(x => new { x.Version, x.ChassisNumber, x.MaterialCode, x.KENNCode }); |
|
|
|
}); |
|
|
|
} |
|
|
|
// b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
|
|
|
|
// b.Property(x => x.Year).HasMaxLength(CommonConsts.MaxCodeLength);
|
|
|
|
// b.Property(x => x.Period).HasMaxLength(CommonConsts.MaxCodeLength);
|
|
|
|
// b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
|
|
|
|
// b.Property(x => x.Qty).IsRequired();
|
|
|
|
// b.Property(x => x.Model).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
|
|
|
|
// b.Property(x => x.SettlementID).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
|
|
|
|
// b.Property(x => x.SettlementSupplier).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
|
|
|
|
// b.Property(x => x.ChassisNumber).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
|
|
|
|
// //b.Property(x => x.SettlementSupplier).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
|
|
|
|
|
|
|
|
// b.Property(x => x.Enabled);
|
|
|
|
// b.HasIndex(x => new { x.state });
|
|
|
|
// b.HasIndex(x => new { x.Version, x.ChassisNumber, x.MaterialCode, x.KENNCode });
|
|
|
|
// });
|
|
|
|
//}
|
|
|
|
/// <summary>
|
|
|
|
/// 大众准时化结算明细导入-版本
|
|
|
|
/// </summary>
|
|
|
@ -1205,14 +1070,8 @@ namespace Win.Sfs.SettleAccount |
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#region 红旗
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|