Browse Source

AGV对接

master
mahao 2 years ago
parent
commit
92edbc48e8
  1. 4
      host/WmsWebApi.HttpApi.Host/appsettings.json
  2. 1
      src/WmsWebApi.EntityFrameworkCore/EntityFrameworkCore/WmsWebApiDbContext.cs
  3. 12
      src/WmsWebApi.EntityFrameworkCore/EntityFrameworkCore/WmsWebApiDbContextModelCreatingExtensions.cs

4
host/WmsWebApi.HttpApi.Host/appsettings.json

@ -14,8 +14,8 @@
"WmsWebApiJson": "Server=192.168.0.140;Database=CPAT_WMS_Json_TEST;User ID=sa;Password=Microsoft2008", "WmsWebApiJson": "Server=192.168.0.140;Database=CPAT_WMS_Json_TEST;User ID=sa;Password=Microsoft2008",
"AbpBackgroundJobs": "Server=192.168.0.140;Database=CPAT_WMS_Json_TEST;User ID=sa;Password=Microsoft2008", "AbpBackgroundJobs": "Server=192.168.0.140;Database=CPAT_WMS_Json_TEST;User ID=sa;Password=Microsoft2008",
"AgvInLoc": "A01", "AgvInLoc": "CUST",
"AgvOutLoc": "B01" "AgvOutLoc": "CUST"
}, },
"Redis": { "Redis": {
"Configuration": "127.0.0.1" "Configuration": "127.0.0.1"

1
src/WmsWebApi.EntityFrameworkCore/EntityFrameworkCore/WmsWebApiDbContext.cs

@ -43,6 +43,7 @@ namespace WmsWebApi.EntityFrameworkCore
public virtual DbSet<WmsWebApiOtherZLLDTO> OtherZllDtos { get; set; } public virtual DbSet<WmsWebApiOtherZLLDTO> OtherZllDtos { get; set; }
public virtual DbSet<WmsWebApiStockMoveDTO> StockMoveDtos { get; set; } public virtual DbSet<WmsWebApiStockMoveDTO> StockMoveDtos { get; set; }
public virtual DbSet<WmsWebApiProductRecieveDTO> ProductRecieveDtos { get; set; } public virtual DbSet<WmsWebApiProductRecieveDTO> ProductRecieveDtos { get; set; }
public virtual DbSet<TB_STOCK_MOVE> TbStockMoves { get; set; }
public WmsWebApiDbContext(DbContextOptions<WmsWebApiDbContext> options) public WmsWebApiDbContext(DbContextOptions<WmsWebApiDbContext> options)
: base(options) : base(options)

12
src/WmsWebApi.EntityFrameworkCore/EntityFrameworkCore/WmsWebApiDbContextModelCreatingExtensions.cs

@ -86,6 +86,8 @@ namespace WmsWebApi.EntityFrameworkCore
ConfigureProductRecieve(builder); ConfigureProductRecieve(builder);
ConfigureWmsWebApiStockMove(builder); ConfigureWmsWebApiStockMove(builder);
ConfigureTbStockMoves(builder);
} }
private static void ConfigureTbOrder(ModelBuilder builder) private static void ConfigureTbOrder(ModelBuilder builder)
@ -662,6 +664,16 @@ namespace WmsWebApi.EntityFrameworkCore
}); });
} }
private static void ConfigureTbStockMoves(ModelBuilder builder)
{
builder.Entity<TB_STOCK_MOVE>(b =>
{
b.ToTable("TB_STOCK_MOVE", WmsWebApiDbProperties.DbSchema);
b.ConfigureByConvention();
b.Property(q => q.Id).HasColumnName("UID").ValueGeneratedOnAdd();
});
}
private static void ConfigureWmsWebApiStockMove(ModelBuilder builder) private static void ConfigureWmsWebApiStockMove(ModelBuilder builder)
{ {
builder.Entity<WmsWebApiStockMoveDTO>(b => builder.Entity<WmsWebApiStockMoveDTO>(b =>

Loading…
Cancel
Save