Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
837f30f86f
  1. 3
      .gitignore
  2. 5
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json
  3. 187
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  4. 22
      code/src/SmartFactorySuite.sln

3
.gitignore

@ -14,4 +14,5 @@ obj/
*.db
*.db-shm
*.db-wal
/code/src/Shared/*/obj
/code/src/Shared/*/bin

5
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json

@ -7,9 +7,8 @@
// "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService1;user id=sa;Password=1q2w!@#;"
//},
"ConnectionStrings": {
"Default": "Server=192.168.0.140;Database=ABP;User ID=sa;Password=Microsoft2008;",
"SettleAccountService": "Server=192.168.0.140;Database=SettleAccountService;user id=sa;password=Microsoft2008;",
"Wms": "Server=192.168.0.140;Database=CPAT_WMS_TEST;user id=sa;password=Microsoft2008;"
"Default": "Server=dev.ccwin-in.com,13319;Database=BJABP;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True",
"SettleAccountService": "Server=dev.ccwin-in.com,13319;Database=BJABP;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;"
},
"Logging": {
"LogLevel": {

187
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs

@ -64,12 +64,32 @@ namespace Win.Sfs.SettleAccount
SettleAccountDbProperties.DbSchema
);
#region 基础数据
//价格
builder.ConfigurePriceListVersion(options);
builder.ConfigurePriceList(options);
//BJ备件价格
builder.ConfigurePriceListVersionBJ(options);
builder.ConfigurePriceListBJ(options);
//物料、物料关系
builder.ConfigureMaterial(options);
builder.ConfigureMaterialRelationship(options);
//BOM
builder.ConfigureBom(options);
builder.ConfigureBomVersion(options);
//期间
builder.ConfigureCentralizedControl(options);
#endregion
#region 北汽结算
builder.ConfigureBBAC_CAN_SA(options);
builder.ConfigureBBAC_CAN_SA(options);
builder.ConfigureBBAC_CAN_SA_DETAIL(options);
builder.ConfigureBBAC_NOT_SA_DETAIL(options);
builder.ConfigureBBAC_PD_DETAIL(options);
@ -139,6 +159,171 @@ namespace Win.Sfs.SettleAccount
}
#region 基础数据
private static void ConfigurePriceListBJ(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<PriceListBJ>(b =>
{
b.ToTable($"{options.TablePrefix}_PriceListBJ", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.MaterialCode).HasMaxLength(50);
b.Property(x => x.CustomerCode).HasMaxLength(50);
});
}
private static void ConfigurePriceListVersionBJ(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<PriceListVersionBJ>(b =>
{
b.ToTable($"{options.TablePrefix}_PriceListVersionBJ", 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);
});
}
private static void ConfigureCentralizedControl(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<CentralizedControl>(b =>
{
b.ToTable($"{options.TablePrefix}_control", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.Year).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Period).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.Year, x.Period }).IsUnique().HasFilter(IsDeletedFilter);
});
}
private static void ConfigureBomVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<BomVersion>(b =>
{
b.ToTable($"{options.TablePrefix}_bom_version", options.Schema);
b.ConfigureByConvention();
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.CustomerCode).HasMaxLength(CommonConsts.MaxCodeLength);
});
}
private static void ConfigureBom(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<Bom>(b =>
{
b.ToTable($"{options.TablePrefix}_bom", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.Year).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Period).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Factory).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Version).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.ParentItemCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.ChildItemCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Qty).IsRequired();
b.Property(x => x.OperateProcess);
b.Property(x => x.ScrapPercent);
b.Property(x => x.BomType).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.EffectiveTime);
b.Property(x => x.ExpireTime);
b.Property(x => x.IssuePosition);
b.Property(x => x.BomLevel);
b.Property(x => x.Enabled);
b.HasIndex(x => new { x.ParentItemCode, x.ChildItemCode, x.Version }).IsUnique().HasFilter(IsDeletedFilter);
});
}
private static void ConfigureMaterial(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<Material>(b =>
{
b.ToTable($"{options.TablePrefix}_material", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.EstimateType).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Unit).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.MaterialCode }).IsUnique().HasFilter(IsDeletedFilter);
});
}
private static void ConfigureMaterialRelationship(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<MaterialRelationship>(b =>
{
b.ToTable($"{options.TablePrefix}_relationship", options.Schema);
b.ConfigureByConvention();
//b.Property(x => x.SettleMaterialCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.MaterialProperty).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
//b.Property(x => x.ShipMaterailCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.ErpMaterialCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.ErpMaterialCode });
b.HasIndex(x => new { x.ErpMaterialCode }).IsUnique().HasFilter(IsDeletedFilter);
});
}
private static void ConfigurePriceList(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<PriceList>(b =>
{
b.ToTable($"{options.TablePrefix}_PriceList", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.MaterialCode).HasMaxLength(50);
b.Property(x => x.CustomerCode).HasMaxLength(50);
});
}
private static void ConfigurePriceListVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<PriceListVersion>(b =>
{
b.ToTable($"{options.TablePrefix}_PriceListVersion", 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);
});
}
#endregion

22
code/src/SmartFactorySuite.sln

@ -1,10 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
<<<<<<< HEAD
VisualStudioVersion = 17.5.33516.290
=======
VisualStudioVersion = 17.6.33815.320
>>>>>>> 1c2946500765850db29fa7d216f5e55e2e4de888
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Gateways", "Gateways", "{593B8559-1521-4E54-A7DF-7F58E5F6EA86}"
EndProject
@ -69,11 +65,10 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaseService.HttpApi.Client", "Modules\BaseService\BaseService.HttpApi.Client\BaseService.HttpApi.Client.csproj", "{1913786D-E64D-48E4-98A7-42C3BCA9C282}"
EndProject
<<<<<<< HEAD
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AuthServer.Host", "AuthServer\AuthServer.Host\AuthServer.Host.csproj", "{C94F578D-C331-4A9D-B001-93DAECB51447}"
=======
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AuthServer.Host", "AuthServer\AuthServer.Host\AuthServer.Host.csproj", "{4C7A0E8B-2DBC-4E76-8F68-0DD200CE88E7}"
>>>>>>> 1c2946500765850db29fa7d216f5e55e2e4de888
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AuthServer.Host", "AuthServer\AuthServer.Host\AuthServer.Host.csproj", "{C94F578D-C331-4A9D-B001-93DAECB51447}"
EndProject
>>>>>>> a6caef3ae6ef92cf26cf92097f5fdc9ceb1053fe
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -165,16 +160,12 @@ Global
{1913786D-E64D-48E4-98A7-42C3BCA9C282}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1913786D-E64D-48E4-98A7-42C3BCA9C282}.Release|Any CPU.Build.0 = Release|Any CPU
<<<<<<< HEAD
=======
{C94F578D-C331-4A9D-B001-93DAECB51447}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C94F578D-C331-4A9D-B001-93DAECB51447}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C94F578D-C331-4A9D-B001-93DAECB51447}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C94F578D-C331-4A9D-B001-93DAECB51447}.Release|Any CPU.Build.0 = Release|Any CPU
=======
{4C7A0E8B-2DBC-4E76-8F68-0DD200CE88E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C7A0E8B-2DBC-4E76-8F68-0DD200CE88E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C7A0E8B-2DBC-4E76-8F68-0DD200CE88E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C7A0E8B-2DBC-4E76-8F68-0DD200CE88E7}.Release|Any CPU.Build.0 = Release|Any CPU
>>>>>>> 1c2946500765850db29fa7d216f5e55e2e4de888
>>>>>>> a6caef3ae6ef92cf26cf92097f5fdc9ceb1053fe
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -206,10 +197,9 @@ Global
{65DEB438-557B-4268-8EC6-25A9A2ED6FE1} = {B55F5923-5FDE-4BEB-9E81-BE270D5909A1}
{1913786D-E64D-48E4-98A7-42C3BCA9C282} = {B55F5923-5FDE-4BEB-9E81-BE270D5909A1}
<<<<<<< HEAD
{C94F578D-C331-4A9D-B001-93DAECB51447} = {BD0465F1-50F8-4913-8B01-7C2E44CEED27}
=======
{4C7A0E8B-2DBC-4E76-8F68-0DD200CE88E7} = {BD0465F1-50F8-4913-8B01-7C2E44CEED27}
>>>>>>> 1c2946500765850db29fa7d216f5e55e2e4de888
{C94F578D-C331-4A9D-B001-93DAECB51447} = {BD0465F1-50F8-4913-8B01-7C2E44CEED27}
>>>>>>> a6caef3ae6ef92cf26cf92097f5fdc9ceb1053fe
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CAAF5A4A-B83D-4CCD-BF50-58035AD87837}

Loading…
Cancel
Save