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",
"AbpBackgroundJobs": "Server=192.168.0.140;Database=CPAT_WMS_Json_TEST;User ID=sa;Password=Microsoft2008",
"AgvInLoc": "A01",
"AgvOutLoc": "B01"
"AgvInLoc": "CUST",
"AgvOutLoc": "CUST"
},
"Redis": {
"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<WmsWebApiStockMoveDTO> StockMoveDtos { get; set; }
public virtual DbSet<WmsWebApiProductRecieveDTO> ProductRecieveDtos { get; set; }
public virtual DbSet<TB_STOCK_MOVE> TbStockMoves { get; set; }
public WmsWebApiDbContext(DbContextOptions<WmsWebApiDbContext> options)
: base(options)

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

@ -86,6 +86,8 @@ namespace WmsWebApi.EntityFrameworkCore
ConfigureProductRecieve(builder);
ConfigureWmsWebApiStockMove(builder);
ConfigureTbStockMoves(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)
{
builder.Entity<WmsWebApiStockMoveDTO>(b =>

Loading…
Cancel
Save