Procházet zdrojové kódy

资源检查bang两张表迁移

Murphy před 3 roky
rodič
revize
062ead8895

+ 4 - 0
MicroServices/Business/Business.EntityFrameworkCore/EntityFrameworkCore/Bang/BusinessBangDbContext.cs

@@ -39,6 +39,10 @@ namespace Business.EntityFrameworkCore
         public DbSet<b_purchase> b_purchase { get; set; }
 
         public DbSet<b_purchase_occupy> b_purchase_occupy { get; set; }
+
+        public DbSet<b_order_detail> b_order_detail { get; set; }
+
+        public DbSet<b_order_examine_result> b_order_examine_result { get; set; }
         #endregion
 
         public BusinessBangDbContext(DbContextOptions<BusinessBangDbContext> options)

+ 10 - 0
MicroServices/Business/Business.EntityFrameworkCore/EntityFrameworkCore/BusinessDbContextModelCreatingExtensions.cs

@@ -632,6 +632,16 @@ namespace Business.EntityFrameworkCore
                 b.ToTable("b_purchase_occupy");
                 b.ConfigureByConvention();
             });
+            builder.Entity<b_order_detail>(b =>
+            {
+                b.ToTable("b_order_detail");
+                b.ConfigureByConvention();
+            });
+            builder.Entity<b_order_examine_result>(b =>
+            {
+                b.ToTable("b_order_examine_result");
+                b.ConfigureByConvention();
+            });
         }
     }
 }

+ 1077 - 0
MicroServices/Business/Business.Host/Migrations/BusinessBangMigrationDb/20230327073906_AddTables.Designer.cs

@@ -0,0 +1,1077 @@
+// <auto-generated />
+using System;
+using Business.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Volo.Abp.EntityFrameworkCore;
+
+#nullable disable
+
+namespace Business.Migrations.BusinessBangMigrationDb
+{
+    [DbContext(typeof(BusinessBangMigrationDbContext))]
+    [Migration("20230327073906_AddTables")]
+    partial class AddTables
+    {
+        protected override void BuildTargetModel(ModelBuilder modelBuilder)
+        {
+#pragma warning disable 612, 618
+            modelBuilder
+                .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql)
+                .HasAnnotation("ProductVersion", "6.0.5")
+                .HasAnnotation("Relational:MaxIdentifierLength", 64);
+
+            modelBuilder.Entity("Bussiness.Model.Bang.b_bom_child_examine", b =>
+                {
+                    b.Property<long>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("bigint");
+
+                    b.Property<bool>("IsDeleted")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("tinyint(1)")
+                        .HasDefaultValue(false)
+                        .HasColumnName("IsDeleted")
+                        .HasComment("删除标识");
+
+                    b.Property<int?>("backflush")
+                        .HasColumnType("int")
+                        .HasComment("是否倒冲");
+
+                    b.Property<long?>("bom_child_id")
+                        .HasColumnType("bigint")
+                        .HasComment("bom明细主键");
+
+                    b.Property<long?>("bom_id")
+                        .HasColumnType("bigint")
+                        .HasComment("BOMid");
+
+                    b.Property<string>("bom_number")
+                        .HasMaxLength(20)
+                        .HasColumnType("varchar(20)")
+                        .HasComment("bom编号");
+
+                    b.Property<long?>("create_by")
+                        .HasColumnType("bigint")
+                        .HasComment("创建人id");
+
+                    b.Property<string>("create_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("创建人名称");
+
+                    b.Property<DateTime?>("create_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("创建时间");
+
+                    b.Property<int?>("erp_cls")
+                        .HasColumnType("int")
+                        .HasComment("物料属性");
+
+                    b.Property<string>("erp_cls_name")
+                        .HasMaxLength(80)
+                        .HasColumnType("varchar(80)")
+                        .HasComment("物料属性名称");
+
+                    b.Property<long?>("examine_id")
+                        .HasColumnType("bigint")
+                        .HasComment("资源检查ID");
+
+                    b.Property<long?>("factory_id")
+                        .HasColumnType("bigint")
+                        .HasComment("工厂ID");
+
+                    b.Property<int?>("haveicsubs")
+                        .HasColumnType("int")
+                        .HasComment("存在替代关系");
+
+                    b.Property<bool>("is_use")
+                        .HasColumnType("tinyint(1)")
+                        .HasComment("是否使用此物料");
+
+                    b.Property<int?>("isbom")
+                        .HasColumnType("int")
+                        .HasComment("是否BOM");
+
+                    b.Property<long?>("item_id")
+                        .HasColumnType("bigint")
+                        .HasComment("物料id");
+
+                    b.Property<string>("item_name")
+                        .HasMaxLength(200)
+                        .HasColumnType("varchar(200)")
+                        .HasComment("物料名称");
+
+                    b.Property<string>("item_number")
+                        .HasMaxLength(80)
+                        .HasColumnType("varchar(80)")
+                        .HasComment("物料编号");
+
+                    b.Property<DateTime?>("kitting_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("齐套时间");
+
+                    b.Property<decimal?>("lack_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("缺料数量");
+
+                    b.Property<int?>("level")
+                        .HasColumnType("int")
+                        .HasComment("level");
+
+                    b.Property<decimal?>("make_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("自制数量");
+
+                    b.Property<decimal?>("mo_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("在制占用数量");
+
+                    b.Property<string>("model")
+                        .HasMaxLength(200)
+                        .HasColumnType("varchar(200)")
+                        .HasComment("规格型号");
+
+                    b.Property<decimal?>("needCount")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("单个产品总需要用量");
+
+                    b.Property<string>("num")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("项次号");
+
+                    b.Property<long?>("num_order")
+                        .HasColumnType("bigint")
+                        .HasComment("排序使用");
+
+                    b.Property<long?>("org_id")
+                        .HasColumnType("bigint")
+                        .HasComment("组织ID");
+
+                    b.Property<long?>("parent_id")
+                        .HasColumnType("bigint")
+                        .HasComment("父级id");
+
+                    b.Property<decimal?>("purchase_occupy_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("采购明细占用数量");
+
+                    b.Property<decimal?>("purchase_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("采购数量");
+
+                    b.Property<decimal?>("qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("单位用量");
+
+                    b.Property<DateTime?>("satisfy_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("满足时间");
+
+                    b.Property<decimal?>("self_lack_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("本级缺料数量");
+
+                    b.Property<long?>("sentry_id")
+                        .HasColumnType("bigint")
+                        .HasComment("订单行ID");
+
+                    b.Property<decimal?>("sqty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("库存数量");
+
+                    b.Property<int?>("stock_state")
+                        .HasColumnType("int")
+                        .HasComment("物料状态");
+
+                    b.Property<decimal?>("subcontracting_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("委外数量");
+
+                    b.Property<int?>("substitute_all_num")
+                        .HasColumnType("int")
+                        .HasComment("群组优先级");
+
+                    b.Property<string>("substitute_code")
+                        .HasMaxLength(20)
+                        .HasColumnType("varchar(20)")
+                        .HasComment("群组代码");
+
+                    b.Property<int?>("substitute_mode")
+                        .HasColumnType("int")
+                        .HasComment("替代方式");
+
+                    b.Property<int?>("substitute_strategy")
+                        .HasColumnType("int")
+                        .HasComment("替代策略");
+
+                    b.Property<long>("tenant_id")
+                        .HasColumnType("bigint")
+                        .HasComment("企业ID");
+
+                    b.Property<int?>("type")
+                        .HasColumnType("int")
+                        .HasComment("类型");
+
+                    b.Property<string>("unit")
+                        .HasMaxLength(80)
+                        .HasColumnType("varchar(80)")
+                        .HasComment("单位");
+
+                    b.Property<long?>("update_by")
+                        .HasColumnType("bigint")
+                        .HasComment("修改人");
+
+                    b.Property<string>("update_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("修改人名称");
+
+                    b.Property<DateTime?>("update_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("修改时间");
+
+                    b.Property<decimal?>("use_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("库存占用数量");
+
+                    b.Property<string>("version")
+                        .HasMaxLength(80)
+                        .HasColumnType("varchar(80)")
+                        .HasComment("版本");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("b_bom_child_examine", (string)null);
+
+                    b.HasComment("Bom明细检查结果");
+                });
+
+            modelBuilder.Entity("Bussiness.Model.Bang.b_examine_result", b =>
+                {
+                    b.Property<long>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("bigint");
+
+                    b.Property<bool>("IsDeleted")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("tinyint(1)")
+                        .HasDefaultValue(false)
+                        .HasColumnName("IsDeleted")
+                        .HasComment("删除标识");
+
+                    b.Property<string>("bill_no")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("订单编号");
+
+                    b.Property<string>("bom_number")
+                        .HasMaxLength(20)
+                        .HasColumnType("varchar(20)")
+                        .HasComment("BOM编码");
+
+                    b.Property<long?>("create_by")
+                        .HasColumnType("bigint")
+                        .HasComment("创建人id");
+
+                    b.Property<string>("create_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("创建人名称");
+
+                    b.Property<DateTime?>("create_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("创建时间");
+
+                    b.Property<DateTime?>("earliest_times")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("最早开工时间");
+
+                    b.Property<int?>("entry_seq")
+                        .HasColumnType("int")
+                        .HasComment("行号");
+
+                    b.Property<long?>("factory_id")
+                        .HasColumnType("bigint")
+                        .HasComment("工厂ID");
+
+                    b.Property<DateTime?>("kitting_times")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("物料齐套时间");
+
+                    b.Property<DateTime?>("latest_times")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("最晚开工时间");
+
+                    b.Property<long?>("morder_id")
+                        .HasColumnType("bigint")
+                        .HasComment("工单id");
+
+                    b.Property<string>("morder_no")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("工单号");
+
+                    b.Property<decimal?>("need_qty")
+                        .HasPrecision(20, 8)
+                        .HasColumnType("decimal(20,8)")
+                        .HasComment("需要数量");
+
+                    b.Property<DateTime?>("order_statr_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("工单开工时间");
+
+                    b.Property<long?>("org_id")
+                        .HasColumnType("bigint")
+                        .HasComment("组织ID");
+
+                    b.Property<long?>("sentry_id")
+                        .HasColumnType("bigint")
+                        .HasComment("订单行id");
+
+                    b.Property<long?>("sorderid")
+                        .HasColumnType("bigint")
+                        .HasComment("订单id");
+
+                    b.Property<long>("tenant_id")
+                        .HasColumnType("bigint")
+                        .HasComment("企业ID");
+
+                    b.Property<long?>("update_by")
+                        .HasColumnType("bigint")
+                        .HasComment("修改人");
+
+                    b.Property<string>("update_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("修改人名称");
+
+                    b.Property<DateTime?>("update_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("修改时间");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("b_examine_result", (string)null);
+
+                    b.HasComment("资源检查");
+                });
+
+            modelBuilder.Entity("Bussiness.Model.Bang.b_mo_occupy", b =>
+                {
+                    b.Property<long>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("bigint");
+
+                    b.Property<bool>("IsDeleted")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("tinyint(1)")
+                        .HasDefaultValue(false)
+                        .HasColumnName("IsDeleted")
+                        .HasComment("删除标识");
+
+                    b.Property<long?>("bom_child_examine_id")
+                        .HasColumnType("bigint")
+                        .HasComment("物料检查明细ID");
+
+                    b.Property<long?>("create_by")
+                        .HasColumnType("bigint")
+                        .HasComment("创建人id");
+
+                    b.Property<string>("create_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("创建人名称");
+
+                    b.Property<DateTime?>("create_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("创建时间");
+
+                    b.Property<long?>("factory_id")
+                        .HasColumnType("bigint")
+                        .HasComment("工厂ID");
+
+                    b.Property<DateTime?>("moo_etime")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("结束时间");
+
+                    b.Property<string>("moo_mo")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("工单号");
+
+                    b.Property<decimal?>("moo_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("占用量");
+
+                    b.Property<DateTime?>("moo_stime")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("开始时间");
+
+                    b.Property<long?>("org_id")
+                        .HasColumnType("bigint")
+                        .HasComment("组织ID");
+
+                    b.Property<long>("tenant_id")
+                        .HasColumnType("bigint")
+                        .HasComment("企业ID");
+
+                    b.Property<long?>("update_by")
+                        .HasColumnType("bigint")
+                        .HasComment("修改人");
+
+                    b.Property<string>("update_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("修改人名称");
+
+                    b.Property<DateTime?>("update_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("修改时间");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("b_mo_occupy", (string)null);
+
+                    b.HasComment("在制占用明细");
+                });
+
+            modelBuilder.Entity("Bussiness.Model.Bang.b_mo_order", b =>
+                {
+                    b.Property<long>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("bigint");
+
+                    b.Property<bool>("IsDeleted")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("tinyint(1)")
+                        .HasDefaultValue(false)
+                        .HasColumnName("IsDeleted")
+                        .HasComment("删除标识");
+
+                    b.Property<long?>("bom_child_examine_id")
+                        .HasColumnType("bigint")
+                        .HasComment("物料检查明细ID");
+
+                    b.Property<long?>("create_by")
+                        .HasColumnType("bigint")
+                        .HasComment("创建人id");
+
+                    b.Property<string>("create_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("创建人名称");
+
+                    b.Property<DateTime?>("create_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("创建时间");
+
+                    b.Property<long?>("factory_id")
+                        .HasColumnType("bigint")
+                        .HasComment("工厂ID");
+
+                    b.Property<DateTime?>("moentry_etime")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("生产工单结束日期");
+
+                    b.Property<string>("moentry_prdname")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("生产组织名称");
+
+                    b.Property<DateTime?>("moentry_stime")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("生产工单开始日期");
+
+                    b.Property<DateTime?>("moentry_sys_etime")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("系统建议完工时间");
+
+                    b.Property<DateTime?>("moentry_sys_stime")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("系统建议开工时间");
+
+                    b.Property<string>("moentry_wrkcname")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("工作中心名称");
+
+                    b.Property<decimal?>("morder_need_time")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("工单所需工时");
+
+                    b.Property<string>("morder_no")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("生产工单编号");
+
+                    b.Property<decimal?>("morder_production_number")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("工单生产数量");
+
+                    b.Property<decimal?>("need_number")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("需求数量");
+
+                    b.Property<long?>("org_id")
+                        .HasColumnType("bigint")
+                        .HasComment("组织ID");
+
+                    b.Property<DateTime?>("reality_end_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("实际结束时间");
+
+                    b.Property<DateTime?>("reality_start_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("实际开始时间");
+
+                    b.Property<long>("tenant_id")
+                        .HasColumnType("bigint")
+                        .HasComment("企业ID");
+
+                    b.Property<long?>("update_by")
+                        .HasColumnType("bigint")
+                        .HasComment("修改人");
+
+                    b.Property<string>("update_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("修改人名称");
+
+                    b.Property<DateTime?>("update_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("修改时间");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("b_mo_order", (string)null);
+
+                    b.HasComment("生产工单明细");
+                });
+
+            modelBuilder.Entity("Bussiness.Model.Bang.b_ooder", b =>
+                {
+                    b.Property<long>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("bigint");
+
+                    b.Property<bool>("IsDeleted")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("tinyint(1)")
+                        .HasDefaultValue(false)
+                        .HasColumnName("IsDeleted")
+                        .HasComment("删除标识");
+
+                    b.Property<long?>("bom_child_examine_id")
+                        .HasColumnType("bigint")
+                        .HasComment("物料检查明细ID");
+
+                    b.Property<long?>("create_by")
+                        .HasColumnType("bigint")
+                        .HasComment("创建人id");
+
+                    b.Property<string>("create_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("创建人名称");
+
+                    b.Property<DateTime?>("create_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("创建时间");
+
+                    b.Property<long?>("factory_id")
+                        .HasColumnType("bigint")
+                        .HasComment("工厂ID");
+
+                    b.Property<decimal?>("morder_production_number")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("工单生产数量");
+
+                    b.Property<DateTime?>("ooentry_etime")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("计划完工日期");
+
+                    b.Property<string>("ooentry_prdname")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("生产组织名称");
+
+                    b.Property<DateTime?>("ooentry_stime")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("计划开工日期");
+
+                    b.Property<DateTime?>("oorder_date")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("委外订单日期");
+
+                    b.Property<string>("oorder_no")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("工单编号");
+
+                    b.Property<long?>("org_id")
+                        .HasColumnType("bigint")
+                        .HasComment("组织ID");
+
+                    b.Property<string>("production_unit")
+                        .HasMaxLength(100)
+                        .HasColumnType("varchar(100)")
+                        .HasComment("加工单位");
+
+                    b.Property<string>("production_unit_code")
+                        .HasMaxLength(20)
+                        .HasColumnType("varchar(20)")
+                        .HasComment("加工单位编码");
+
+                    b.Property<long>("tenant_id")
+                        .HasColumnType("bigint")
+                        .HasComment("企业ID");
+
+                    b.Property<long?>("update_by")
+                        .HasColumnType("bigint")
+                        .HasComment("修改人");
+
+                    b.Property<string>("update_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("修改人名称");
+
+                    b.Property<DateTime?>("update_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("修改时间");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("b_ooder", (string)null);
+
+                    b.HasComment("采购占用明细");
+                });
+
+            modelBuilder.Entity("Bussiness.Model.Bang.b_order_detail", b =>
+                {
+                    b.Property<long>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("bigint");
+
+                    b.Property<bool>("IsDeleted")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("tinyint(1)")
+                        .HasDefaultValue(false)
+                        .HasColumnName("IsDeleted")
+                        .HasComment("删除标识");
+
+                    b.Property<string>("bom_number")
+                        .HasColumnType("longtext")
+                        .HasComment("bom编号");
+
+                    b.Property<long?>("create_by")
+                        .HasColumnType("bigint")
+                        .HasComment("创建人id");
+
+                    b.Property<string>("create_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("创建人名称");
+
+                    b.Property<DateTime?>("create_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("创建时间");
+
+                    b.Property<long?>("factory_id")
+                        .HasColumnType("bigint")
+                        .HasComment("工厂ID");
+
+                    b.Property<bool?>("is_use")
+                        .HasColumnType("tinyint(1)")
+                        .HasComment("是否使用此物料");
+
+                    b.Property<long?>("item_id")
+                        .HasColumnType("bigint")
+                        .HasComment("物料id");
+
+                    b.Property<string>("item_name")
+                        .HasColumnType("longtext")
+                        .HasComment("物料名称");
+
+                    b.Property<string>("item_number")
+                        .HasColumnType("longtext")
+                        .HasComment("物料编号");
+
+                    b.Property<DateTime?>("kitting_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("齐套时间");
+
+                    b.Property<decimal?>("make_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("自制数量");
+
+                    b.Property<decimal?>("mo_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("在制占用数量");
+
+                    b.Property<long?>("order_examine_id")
+                        .HasColumnType("bigint")
+                        .HasComment("工单齐套检查id");
+
+                    b.Property<long?>("org_id")
+                        .HasColumnType("bigint")
+                        .HasComment("组织ID");
+
+                    b.Property<decimal?>("purchase_occupy_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("采购明细占用数量");
+
+                    b.Property<decimal?>("purchase_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("采购数量");
+
+                    b.Property<decimal?>("qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("用量");
+
+                    b.Property<decimal?>("self_lack_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("本级缺料数量");
+
+                    b.Property<decimal?>("sqty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("库存数量");
+
+                    b.Property<decimal?>("subcontracting_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("委外数量");
+
+                    b.Property<string>("substitute_code")
+                        .HasColumnType("longtext")
+                        .HasComment("群组代码");
+
+                    b.Property<int?>("substitute_mode")
+                        .HasColumnType("int")
+                        .HasComment("替代方式");
+
+                    b.Property<int?>("substitute_strategy")
+                        .HasColumnType("int")
+                        .HasComment("替代策略");
+
+                    b.Property<long>("tenant_id")
+                        .HasColumnType("bigint")
+                        .HasComment("企业ID");
+
+                    b.Property<long?>("update_by")
+                        .HasColumnType("bigint")
+                        .HasComment("修改人");
+
+                    b.Property<string>("update_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("修改人名称");
+
+                    b.Property<DateTime?>("update_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("修改时间");
+
+                    b.Property<decimal?>("use_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("库存占用数量");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("b_order_detail", (string)null);
+
+                    b.HasComment("物料齐套明细");
+                });
+
+            modelBuilder.Entity("Bussiness.Model.Bang.b_order_examine_result", b =>
+                {
+                    b.Property<long>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("bigint");
+
+                    b.Property<bool>("IsDeleted")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("tinyint(1)")
+                        .HasDefaultValue(false)
+                        .HasColumnName("IsDeleted")
+                        .HasComment("删除标识");
+
+                    b.Property<string>("bom_number")
+                        .HasColumnType("longtext")
+                        .HasComment("BOM编码");
+
+                    b.Property<long?>("create_by")
+                        .HasColumnType("bigint")
+                        .HasComment("创建人id");
+
+                    b.Property<string>("create_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("创建人名称");
+
+                    b.Property<DateTime?>("create_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("创建时间");
+
+                    b.Property<long?>("factory_id")
+                        .HasColumnType("bigint")
+                        .HasComment("工厂ID");
+
+                    b.Property<DateTime?>("ketting_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("齐套日期");
+
+                    b.Property<decimal?>("need_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("需要数量");
+
+                    b.Property<string>("order_no")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("生产工单编号");
+
+                    b.Property<long?>("orderid")
+                        .HasColumnType("bigint")
+                        .HasComment("工单id");
+
+                    b.Property<long?>("org_id")
+                        .HasColumnType("bigint")
+                        .HasComment("组织ID");
+
+                    b.Property<long>("tenant_id")
+                        .HasColumnType("bigint")
+                        .HasComment("企业ID");
+
+                    b.Property<DateTime?>("time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("开工日期");
+
+                    b.Property<long?>("update_by")
+                        .HasColumnType("bigint")
+                        .HasComment("修改人");
+
+                    b.Property<string>("update_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("修改人名称");
+
+                    b.Property<DateTime?>("update_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("修改时间");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("b_order_examine_result", (string)null);
+
+                    b.HasComment("工单齐套检查");
+                });
+
+            modelBuilder.Entity("Bussiness.Model.Bang.b_purchase", b =>
+                {
+                    b.Property<long>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("bigint");
+
+                    b.Property<bool>("IsDeleted")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("tinyint(1)")
+                        .HasDefaultValue(false)
+                        .HasColumnName("IsDeleted")
+                        .HasComment("删除标识");
+
+                    b.Property<long?>("bom_child_examine_id")
+                        .HasColumnType("bigint")
+                        .HasComment("物料检查明细ID");
+
+                    b.Property<long?>("create_by")
+                        .HasColumnType("bigint")
+                        .HasComment("创建人id");
+
+                    b.Property<string>("create_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("创建人名称");
+
+                    b.Property<DateTime?>("create_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("创建时间");
+
+                    b.Property<long?>("factory_id")
+                        .HasColumnType("bigint")
+                        .HasComment("工厂ID");
+
+                    b.Property<bool>("isbestoptions")
+                        .HasColumnType("tinyint(1)")
+                        .HasComment("最优解");
+
+                    b.Property<long?>("org_id")
+                        .HasColumnType("bigint")
+                        .HasComment("组织ID");
+
+                    b.Property<decimal?>("pr_aqty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("申请数量");
+
+                    b.Property<string>("pr_billno")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("pr单号");
+
+                    b.Property<decimal?>("pr_orderprice")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("订单价格(含税)");
+
+                    b.Property<DateTime?>("pr_parrive_date")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("计划到达日期");
+
+                    b.Property<decimal?>("pr_price")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("采购净价(不含税)");
+
+                    b.Property<DateTime?>("pr_pur_affirm_date")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("采购确认到货日期");
+
+                    b.Property<string>("pr_purchasename")
+                        .HasMaxLength(80)
+                        .HasColumnType("varchar(80)")
+                        .HasComment("供应商名称");
+
+                    b.Property<string>("pr_purchasenumber")
+                        .HasMaxLength(80)
+                        .HasColumnType("varchar(80)")
+                        .HasComment("供应商编码");
+
+                    b.Property<DateTime?>("pr_rarrive_date")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("需求到货日期");
+
+                    b.Property<decimal?>("pr_rate")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("税率");
+
+                    b.Property<decimal?>("pr_rqty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("需求数量");
+
+                    b.Property<decimal?>("pr_sqty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("建议数量");
+
+                    b.Property<decimal?>("pr_sysprice")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("系统价格(含税)");
+
+                    b.Property<long>("tenant_id")
+                        .HasColumnType("bigint")
+                        .HasComment("企业ID");
+
+                    b.Property<long?>("update_by")
+                        .HasColumnType("bigint")
+                        .HasComment("修改人");
+
+                    b.Property<string>("update_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("修改人名称");
+
+                    b.Property<DateTime?>("update_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("修改时间");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("b_purchase", (string)null);
+
+                    b.HasComment("采购明细信息");
+                });
+
+            modelBuilder.Entity("Bussiness.Model.Bang.b_purchase_occupy", b =>
+                {
+                    b.Property<long>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("bigint");
+
+                    b.Property<bool>("IsDeleted")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("tinyint(1)")
+                        .HasDefaultValue(false)
+                        .HasColumnName("IsDeleted")
+                        .HasComment("删除标识");
+
+                    b.Property<long?>("bom_child_examine_id")
+                        .HasColumnType("bigint")
+                        .HasComment("物料检查明细ID");
+
+                    b.Property<long?>("create_by")
+                        .HasColumnType("bigint")
+                        .HasComment("创建人id");
+
+                    b.Property<string>("create_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("创建人名称");
+
+                    b.Property<DateTime?>("create_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("创建时间");
+
+                    b.Property<DateTime?>("etime")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("结束时间");
+
+                    b.Property<long?>("factory_id")
+                        .HasColumnType("bigint")
+                        .HasComment("工厂ID");
+
+                    b.Property<long?>("org_id")
+                        .HasColumnType("bigint")
+                        .HasComment("组织ID");
+
+                    b.Property<string>("po_billno")
+                        .HasMaxLength(80)
+                        .HasColumnType("varchar(80)")
+                        .HasComment("采购订单单号");
+
+                    b.Property<decimal?>("qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("占用量");
+
+                    b.Property<DateTime?>("stime")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("开始时间");
+
+                    b.Property<long>("tenant_id")
+                        .HasColumnType("bigint")
+                        .HasComment("企业ID");
+
+                    b.Property<string>("type")
+                        .HasMaxLength(80)
+                        .HasColumnType("varchar(80)")
+                        .HasComment("类型");
+
+                    b.Property<long?>("update_by")
+                        .HasColumnType("bigint")
+                        .HasComment("修改人");
+
+                    b.Property<string>("update_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("修改人名称");
+
+                    b.Property<DateTime?>("update_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("修改时间");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("b_purchase_occupy", (string)null);
+
+                    b.HasComment("采购占用明细");
+                });
+#pragma warning restore 612, 618
+        }
+    }
+}

+ 121 - 0
MicroServices/Business/Business.Host/Migrations/BusinessBangMigrationDb/20230327073906_AddTables.cs

@@ -0,0 +1,121 @@
+using System;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace Business.Migrations.BusinessBangMigrationDb
+{
+    public partial class AddTables : Migration
+    {
+        protected override void Up(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.CreateTable(
+                name: "b_order_detail",
+                columns: table => new
+                {
+                    Id = table.Column<long>(type: "bigint", nullable: false)
+                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
+                    order_examine_id = table.Column<long>(type: "bigint", nullable: true, comment: "工单齐套检查id"),
+                    item_id = table.Column<long>(type: "bigint", nullable: true, comment: "物料id"),
+                    bom_number = table.Column<string>(type: "longtext", nullable: true, comment: "bom编号")
+                        .Annotation("MySql:CharSet", "utf8mb4"),
+                    item_number = table.Column<string>(type: "longtext", nullable: true, comment: "物料编号")
+                        .Annotation("MySql:CharSet", "utf8mb4"),
+                    item_name = table.Column<string>(type: "longtext", nullable: true, comment: "物料名称")
+                        .Annotation("MySql:CharSet", "utf8mb4"),
+                    qty = table.Column<decimal>(type: "decimal(65,30)", nullable: true, comment: "用量"),
+                    self_lack_qty = table.Column<decimal>(type: "decimal(65,30)", nullable: true, comment: "本级缺料数量"),
+                    sqty = table.Column<decimal>(type: "decimal(65,30)", nullable: true, comment: "库存数量"),
+                    use_qty = table.Column<decimal>(type: "decimal(65,30)", nullable: true, comment: "库存占用数量"),
+                    mo_qty = table.Column<decimal>(type: "decimal(65,30)", nullable: true, comment: "在制占用数量"),
+                    make_qty = table.Column<decimal>(type: "decimal(65,30)", nullable: true, comment: "自制数量"),
+                    purchase_qty = table.Column<decimal>(type: "decimal(65,30)", nullable: true, comment: "采购数量"),
+                    purchase_occupy_qty = table.Column<decimal>(type: "decimal(65,30)", nullable: true, comment: "采购明细占用数量"),
+                    subcontracting_qty = table.Column<decimal>(type: "decimal(65,30)", nullable: true, comment: "委外数量"),
+                    kitting_time = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "齐套时间"),
+                    substitute_code = table.Column<string>(type: "longtext", nullable: true, comment: "群组代码")
+                        .Annotation("MySql:CharSet", "utf8mb4"),
+                    substitute_strategy = table.Column<int>(type: "int", nullable: true, comment: "替代策略"),
+                    substitute_mode = table.Column<int>(type: "int", nullable: true, comment: "替代方式"),
+                    is_use = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "是否使用此物料"),
+                    create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
+                    create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
+                        .Annotation("MySql:CharSet", "utf8mb4"),
+                    create_time = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "创建时间"),
+                    update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
+                    update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
+                        .Annotation("MySql:CharSet", "utf8mb4"),
+                    update_time = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "修改时间"),
+                    tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
+                    factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
+                    org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
+                    IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_b_order_detail", x => x.Id);
+                },
+                comment: "物料齐套明细")
+                .Annotation("MySql:CharSet", "utf8mb4");
+
+            migrationBuilder.CreateTable(
+                name: "b_order_examine_result",
+                columns: table => new
+                {
+                    Id = table.Column<long>(type: "bigint", nullable: false)
+                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
+                    orderid = table.Column<long>(type: "bigint", nullable: true, comment: "工单id"),
+                    order_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "生产工单编号")
+                        .Annotation("MySql:CharSet", "utf8mb4"),
+                    time = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "开工日期"),
+                    ketting_time = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "齐套日期"),
+                    bom_number = table.Column<string>(type: "longtext", nullable: true, comment: "BOM编码")
+                        .Annotation("MySql:CharSet", "utf8mb4"),
+                    need_qty = table.Column<decimal>(type: "decimal(65,30)", nullable: true, comment: "需要数量"),
+                    create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
+                    create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
+                        .Annotation("MySql:CharSet", "utf8mb4"),
+                    create_time = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "创建时间"),
+                    update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
+                    update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
+                        .Annotation("MySql:CharSet", "utf8mb4"),
+                    update_time = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "修改时间"),
+                    tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
+                    factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
+                    org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
+                    IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_b_order_examine_result", x => x.Id);
+                },
+                comment: "工单齐套检查")
+                .Annotation("MySql:CharSet", "utf8mb4");
+        }
+
+        protected override void Down(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.DropTable(
+                name: "b_order_detail");
+
+            migrationBuilder.DropTable(
+                name: "b_order_examine_result");
+
+            migrationBuilder.AlterColumn<decimal>(
+                name: "need_qty",
+                table: "b_examine_result",
+                type: "decimal(20,8)",
+                precision: 20,
+                scale: 8,
+                nullable: true,
+                comment: "需要数量",
+                oldClrType: typeof(decimal),
+                oldType: "decimal(20,8)",
+                oldPrecision: 20,
+                oldScale: 8,
+                oldNullable: true,
+                oldComment: "需要数量");
+        }
+    }
+}

+ 222 - 1
MicroServices/Business/Business.Host/Migrations/BusinessBangMigrationDb/BusinessBangMigrationDbContextModelSnapshot.cs

@@ -316,7 +316,7 @@ namespace Business.Migrations.BusinessBangMigrationDb
                     b.Property<decimal?>("need_qty")
                         .HasPrecision(20, 8)
                         .HasColumnType("decimal(20,8)")
-                        .HasComment("BOM编码");
+                        .HasComment("需要数量");
 
                     b.Property<DateTime?>("order_statr_time")
                         .HasColumnType("datetime(6)")
@@ -648,6 +648,223 @@ namespace Business.Migrations.BusinessBangMigrationDb
                     b.HasComment("采购占用明细");
                 });
 
+            modelBuilder.Entity("Bussiness.Model.Bang.b_order_detail", b =>
+                {
+                    b.Property<long>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("bigint");
+
+                    b.Property<bool>("IsDeleted")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("tinyint(1)")
+                        .HasDefaultValue(false)
+                        .HasColumnName("IsDeleted")
+                        .HasComment("删除标识");
+
+                    b.Property<string>("bom_number")
+                        .HasColumnType("longtext")
+                        .HasComment("bom编号");
+
+                    b.Property<long?>("create_by")
+                        .HasColumnType("bigint")
+                        .HasComment("创建人id");
+
+                    b.Property<string>("create_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("创建人名称");
+
+                    b.Property<DateTime?>("create_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("创建时间");
+
+                    b.Property<long?>("factory_id")
+                        .HasColumnType("bigint")
+                        .HasComment("工厂ID");
+
+                    b.Property<bool?>("is_use")
+                        .HasColumnType("tinyint(1)")
+                        .HasComment("是否使用此物料");
+
+                    b.Property<long?>("item_id")
+                        .HasColumnType("bigint")
+                        .HasComment("物料id");
+
+                    b.Property<string>("item_name")
+                        .HasColumnType("longtext")
+                        .HasComment("物料名称");
+
+                    b.Property<string>("item_number")
+                        .HasColumnType("longtext")
+                        .HasComment("物料编号");
+
+                    b.Property<DateTime?>("kitting_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("齐套时间");
+
+                    b.Property<decimal?>("make_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("自制数量");
+
+                    b.Property<decimal?>("mo_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("在制占用数量");
+
+                    b.Property<long?>("order_examine_id")
+                        .HasColumnType("bigint")
+                        .HasComment("工单齐套检查id");
+
+                    b.Property<long?>("org_id")
+                        .HasColumnType("bigint")
+                        .HasComment("组织ID");
+
+                    b.Property<decimal?>("purchase_occupy_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("采购明细占用数量");
+
+                    b.Property<decimal?>("purchase_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("采购数量");
+
+                    b.Property<decimal?>("qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("用量");
+
+                    b.Property<decimal?>("self_lack_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("本级缺料数量");
+
+                    b.Property<decimal?>("sqty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("库存数量");
+
+                    b.Property<decimal?>("subcontracting_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("委外数量");
+
+                    b.Property<string>("substitute_code")
+                        .HasColumnType("longtext")
+                        .HasComment("群组代码");
+
+                    b.Property<int?>("substitute_mode")
+                        .HasColumnType("int")
+                        .HasComment("替代方式");
+
+                    b.Property<int?>("substitute_strategy")
+                        .HasColumnType("int")
+                        .HasComment("替代策略");
+
+                    b.Property<long>("tenant_id")
+                        .HasColumnType("bigint")
+                        .HasComment("企业ID");
+
+                    b.Property<long?>("update_by")
+                        .HasColumnType("bigint")
+                        .HasComment("修改人");
+
+                    b.Property<string>("update_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("修改人名称");
+
+                    b.Property<DateTime?>("update_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("修改时间");
+
+                    b.Property<decimal?>("use_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("库存占用数量");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("b_order_detail", (string)null);
+
+                    b.HasComment("物料齐套明细");
+                });
+
+            modelBuilder.Entity("Bussiness.Model.Bang.b_order_examine_result", b =>
+                {
+                    b.Property<long>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("bigint");
+
+                    b.Property<bool>("IsDeleted")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("tinyint(1)")
+                        .HasDefaultValue(false)
+                        .HasColumnName("IsDeleted")
+                        .HasComment("删除标识");
+
+                    b.Property<string>("bom_number")
+                        .HasColumnType("longtext")
+                        .HasComment("BOM编码");
+
+                    b.Property<long?>("create_by")
+                        .HasColumnType("bigint")
+                        .HasComment("创建人id");
+
+                    b.Property<string>("create_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("创建人名称");
+
+                    b.Property<DateTime?>("create_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("创建时间");
+
+                    b.Property<long?>("factory_id")
+                        .HasColumnType("bigint")
+                        .HasComment("工厂ID");
+
+                    b.Property<DateTime?>("ketting_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("齐套日期");
+
+                    b.Property<decimal?>("need_qty")
+                        .HasColumnType("decimal(65,30)")
+                        .HasComment("需要数量");
+
+                    b.Property<string>("order_no")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("生产工单编号");
+
+                    b.Property<long?>("orderid")
+                        .HasColumnType("bigint")
+                        .HasComment("工单id");
+
+                    b.Property<long?>("org_id")
+                        .HasColumnType("bigint")
+                        .HasComment("组织ID");
+
+                    b.Property<long>("tenant_id")
+                        .HasColumnType("bigint")
+                        .HasComment("企业ID");
+
+                    b.Property<DateTime?>("time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("开工日期");
+
+                    b.Property<long?>("update_by")
+                        .HasColumnType("bigint")
+                        .HasComment("修改人");
+
+                    b.Property<string>("update_by_name")
+                        .HasMaxLength(50)
+                        .HasColumnType("varchar(50)")
+                        .HasComment("修改人名称");
+
+                    b.Property<DateTime?>("update_time")
+                        .HasColumnType("datetime(6)")
+                        .HasComment("修改时间");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("b_order_examine_result", (string)null);
+
+                    b.HasComment("工单齐套检查");
+                });
+
             modelBuilder.Entity("Bussiness.Model.Bang.b_purchase", b =>
                 {
                     b.Property<long>("Id")
@@ -682,6 +899,10 @@ namespace Business.Migrations.BusinessBangMigrationDb
                         .HasColumnType("bigint")
                         .HasComment("工厂ID");
 
+                    b.Property<bool>("isbestoptions")
+                        .HasColumnType("tinyint(1)")
+                        .HasComment("最优解");
+
                     b.Property<long?>("org_id")
                         .HasColumnType("bigint")
                         .HasComment("组织ID");