Jelajahi Sumber

部分表增加唯一索引和物料编码

Murphy 2 tahun lalu
induk
melakukan
fa29b07a49
23 mengubah file dengan 125 tambahan dan 167 penghapusan
  1. 0 3
      MicroServices/Business/Business.Application/Quartz/ExtJobService.cs
  2. 0 8
      MicroServices/Business/Business.EntityFrameworkCore/EntityFrameworkCore/BusinessDbContextModelCreatingExtensions.cs
  3. 0 1
      MicroServices/Business/Business.EntityFrameworkCore/EntityFrameworkCore/DOP/BusinessDbContext.cs
  4. 8 8
      MicroServices/Business/Business.Host/appsettings.json
  5. 1 9
      MicroServices/Business/Bussiness.Model/MES/IC/ic_bom.cs
  6. 1 4
      MicroServices/Business/Bussiness.Model/MES/IC/ic_bom_child.cs
  7. 1 2
      MicroServices/Business/Bussiness.Model/MES/IC/ic_item.cs
  8. 0 100
      MicroServices/Business/Bussiness.Model/MES/IC/ic_item_inventory.cs
  9. 20 9
      MicroServices/Business/Bussiness.Model/MES/IC/ic_item_stock.cs
  10. 18 9
      MicroServices/Business/Bussiness.Model/MES/IC/ic_item_stockoccupy.cs
  11. 6 0
      MicroServices/Business/Bussiness.Model/MES/IC/ic_substitute_group_detail.cs
  12. 1 0
      MicroServices/Business/Bussiness.Model/SRM/srm_po_list.cs
  13. 1 0
      MicroServices/Business/Bussiness.Model/SRM/srm_po_main.cs
  14. 1 2
      MicroServices/Business/Bussiness.Model/SRM/srm_pr_main.cs
  15. 9 2
      MicroServices/Business/Bussiness.Model/SRM/srm_purchase.cs
  16. 1 0
      MicroServices/Business/Bussiness.Model/SRM/srm_supplier.cs
  17. 1 2
      MicroServices/Business/Bussiness.Model/Sale/crm_customer.cs
  18. 1 1
      MicroServices/Business/Bussiness.Model/Sale/crm_seorder.cs
  19. 1 1
      MicroServices/Business/Bussiness.Model/Sale/crm_seorderentry.cs
  20. 17 6
      MicroServices/Business/Bussiness.MongoModel/MES/IC/mo_ic_item_stock.cs
  21. 14 0
      MicroServices/Business/Bussiness.MongoModel/MES/IC/mo_ic_item_stockoccupy.cs
  22. 15 0
      MicroServices/Business/Bussiness.MongoModel/MES/IC/mo_ic_substitute_group_detail.cs
  23. 8 0
      MicroServices/Business/Bussiness.MongoModel/SRM/mo_srm_purchase.cs

+ 0 - 3
MicroServices/Business/Business.Application/Quartz/ExtJobService.cs

@@ -19,7 +19,6 @@ namespace Business.Quartz
         SnowFlake help = new SnowFlake();
         private IRepository<in_kd_material, long> _kd_material;
         private IRepository<ic_item, long> _ic_item;
-        private IRepository<ic_item_inventory, long> _ic_item_inventory;
         private IRepository<srm_purchase, long> _srm_purchase;
         private IRepository<ic_item_stock, long> _ic_item_stock;
 
@@ -40,7 +39,6 @@ namespace Business.Quartz
         public ExtJobService(
          IRepository<in_kd_material, long> kd_material,
          IRepository<ic_item, long> ic_item,
-         IRepository<ic_item_inventory, long> ic_item_inventory,
          IRepository<srm_purchase, long> srm_purchase,
          IRepository<ic_item_stock, long> ic_item_stock,
          IRepository<in_kd_bom, long> kd_bom,
@@ -56,7 +54,6 @@ namespace Business.Quartz
         {
             _kd_material= kd_material;
             _ic_item= ic_item;
-            _ic_item_inventory = ic_item_inventory;
             _srm_purchase = srm_purchase;
             _ic_item_stock = ic_item_stock;
             _kd_bom = kd_bom;

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

@@ -41,14 +41,6 @@ namespace Business.EntityFrameworkCore
                 b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
             });
 
-            builder.Entity<ic_item_inventory>(b =>
-            {
-                b.ToTable("ic_item_inventory");
-                b.HasIndex(b => new { b.stock_id, b.stock_place_id, b.tenant_id, b.factory_id });
-                b.ConfigureByConvention();
-                b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
-            });
-
             builder.Entity<ic_item_stock>(b =>
             {
                 b.ToTable("ic_item_stock");

+ 0 - 1
MicroServices/Business/Business.EntityFrameworkCore/EntityFrameworkCore/DOP/BusinessDbContext.cs

@@ -20,7 +20,6 @@ namespace Business.EntityFrameworkCore
         public DbSet<ic_bom> ic_bom { get; set; }
         public DbSet<ic_bom_child> ic_bom_child { get; set; }
         public DbSet<ic_item> ic_item { get; set; }
-        public DbSet<ic_item_inventory> ic_item_inventory { get; set; }
         public DbSet<ic_item_stock> ic_item_stock { get; set; }
         public DbSet<ic_item_stockoccupy> ic_item_stockoccupy { get; set; }
         public DbSet<ic_substitute> ic_substitute { get; set; }

+ 8 - 8
MicroServices/Business/Business.Host/appsettings.json

@@ -8,15 +8,15 @@
     //"DOPBang": "Server=123.60.180.165;Database=dopbang;Uid=root; Pwd=5heng=uN;Allow User Variables=true",
     //"DOPExt": "Server=123.60.180.165;Database=dopext;Uid=root; Pwd=5heng=uN;Allow User Variables=true",
 
-    //"Default": "Server=123.60.180.165;Database=dopdesign;uid=sa;pwd=5heng)uN;Trusted_Connection=false;TrustServerCertificate=True",
-    //"DOPLog": "Server=123.60.180.165;Database=dopdesign;uid=sa;pwd=5heng)uN;Trusted_Connection=false;TrustServerCertificate=True",
-    //"DOPBang": "Server=123.60.180.165;Database=dopdesign;uid=sa;pwd=5heng)uN;Trusted_Connection=false;TrustServerCertificate=True",
-    //"DOPExt": "Server=123.60.180.165;Database=dopdesign;uid=sa;pwd=5heng)uN;Trusted_Connection=false;TrustServerCertificate=True",
+    //"Default": "Server=123.60.180.165;Database=dopdesign;uid=sa;pwd=5h3n9)uN;Trusted_Connection=false;TrustServerCertificate=True",
+    //"DOPLog": "Server=123.60.180.165;Database=dopdesign;uid=sa;pwd=5h3n9)uN;Trusted_Connection=false;TrustServerCertificate=True",
+    //"DOPBang": "Server=123.60.180.165;Database=dopdesign;uid=sa;pwd=5h3n9)uN;Trusted_Connection=false;TrustServerCertificate=True",
+    //"DOPExt": "Server=123.60.180.165;Database=dopdesign;uid=sa;pwd=5h3n9)uN;Trusted_Connection=false;TrustServerCertificate=True",
 
-    "Default": "Server=123.60.181.157;Database=dopbiz;uid=sa;pwd=5heng)uN;Trusted_Connection=false;TrustServerCertificate=True",
-    "DOPLog": "Server=123.60.181.157;Database=dopbiz;uid=sa;pwd=5heng)uN;Trusted_Connection=false;TrustServerCertificate=True",
-    "DOPBang": "Server=123.60.181.157;Database=dopbiz;uid=sa;pwd=5heng)uN;Trusted_Connection=false;TrustServerCertificate=True",
-    "DOPExt": "Server=123.60.181.157;Database=dopbiz;uid=sa;pwd=5heng)uN;Trusted_Connection=false;TrustServerCertificate=True",
+    "Default": "Server=123.60.181.157;Database=dopbiz;uid=sa;pwd=5h3n9)uN;Trusted_Connection=false;TrustServerCertificate=True",
+    "DOPLog": "Server=123.60.181.157;Database=dopbiz;uid=sa;pwd=5h3n9)uN;Trusted_Connection=false;TrustServerCertificate=True",
+    "DOPBang": "Server=123.60.181.157;Database=dopbiz;uid=sa;pwd=5h3n9)uN;Trusted_Connection=false;TrustServerCertificate=True",
+    "DOPExt": "Server=123.60.181.157;Database=dopbiz;uid=sa;pwd=5h3n9)uN;Trusted_Connection=false;TrustServerCertificate=True",
 
     "MongoDB": "mongodb://zzydop:h1Q$us3r@123.60.181.157/",
     "DBName": "dopbase"

+ 1 - 9
MicroServices/Business/Bussiness.Model/MES/IC/ic_bom.cs

@@ -1,15 +1,6 @@
 using Business.Core.Attributes;
-using Business.Model;
 using Microsoft.EntityFrameworkCore;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Volo.Abp;
 
 namespace Business.Model.MES.IC
 {
@@ -18,6 +9,7 @@ namespace Business.Model.MES.IC
     /// </summary>
     [CollectionName("dopbase", "ic_bom")]
     [Comment("物料BOM")]
+    [Index(nameof(bom_number), nameof(item_number), nameof(version), nameof(tenant_id),IsUnique =true)]
     public class ic_bom : BaseEntity
     {
         public ic_bom(long Id) : base(Id)

+ 1 - 4
MicroServices/Business/Bussiness.Model/MES/IC/ic_bom_child.cs

@@ -1,10 +1,6 @@
 using Business.Core.Attributes;
-using Business.Model;
 using Microsoft.EntityFrameworkCore;
-using MongoDB.Bson.Serialization.Attributes;
-using System.ComponentModel;
 using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
 
 namespace Business.Model.MES.IC
 {
@@ -13,6 +9,7 @@ namespace Business.Model.MES.IC
     /// </summary>
     [CollectionName("dopbase", "ic_bom_child")]
     [Comment("物料BOM明细")]
+    [Index(nameof(bom_number),nameof(item_number), nameof(version), nameof(tenant_id), IsUnique = true)]
     public class ic_bom_child : BaseEntity
     {
         public ic_bom_child(long Id) : base(Id)

+ 1 - 2
MicroServices/Business/Bussiness.Model/MES/IC/ic_item.cs

@@ -1,9 +1,7 @@
 using Business.Core.Attributes;
-using Business.Model;
 using Microsoft.EntityFrameworkCore;
 using System.ComponentModel;
 using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
 
 namespace Business.Model.MES.IC
 {
@@ -12,6 +10,7 @@ namespace Business.Model.MES.IC
     /// </summary>
     [CollectionName("dopbase", "ic_item")]
     [Comment("物料详情")]
+    [Index(nameof(number), nameof(fversion),nameof(tenant_id), IsUnique = true)]
     public class ic_item : BaseEntity
     {
         public ic_item(long Id) : base(Id)

+ 0 - 100
MicroServices/Business/Bussiness.Model/MES/IC/ic_item_inventory.cs

@@ -1,100 +0,0 @@
-using Business.Core.Attributes;
-using Business.Model;
-using Microsoft.EntityFrameworkCore;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-
-namespace Business.Model.MES.IC
-{
-    /// <summary>
-    /// 物料库存明细表
-    /// </summary>
-    [CollectionName("dopbase", "ic_item_inventory")]
-    [Comment("物料库存明细表")]
-    public class ic_item_inventory:BaseEntity
-    {
-        /// <summary>
-        /// 物料库存主键
-        /// </summary>
-        [Required]
-        [Comment("物料库存主键")]
-        public long icitem_stock_id { get; set; }
-        /// <summary>
-        /// 仓库id
-        /// </summary>
-        [Required]
-        [Comment("仓库id")]
-        public long stock_id { get; set; }
-        /// <summary>
-        /// 仓库名称
-        /// </summary>
-        [StringLength(80)]
-        [Comment("仓库名称")]
-        public string? stock_name { get; set; }
-        /// <summary>
-        /// 库位id
-        /// </summary>
-        [Required]
-        [Comment("库位id")]
-        public long stock_place_id { get; set; }
-        /// <summary>
-        /// 库位编码
-        /// </summary>
-        [StringLength(80)]
-        [Comment("库位编码")]
-        public string? stock_place_code { get; set; }
-        /// <summary>
-        /// 批次号
-        /// </summary>
-        [StringLength(80)]
-        [Comment("批次号")]
-        public string? batch_no { get; set; }
-        /// <summary>
-        /// 数量
-        /// </summary>
-        [Precision(23, 10)]
-        [Comment("数量")]
-        public decimal? qty { get; set; }
-        /// <summary>
-        /// 金额
-        /// </summary>
-        [Precision(23, 10)]
-        [Comment("金额")]
-        public decimal? bal { get; set; }
-        /// <summary>
-        /// 保质期时长
-        /// </summary>
-        [Precision(23, 10)]
-        [Comment("保质期时长")]
-        public decimal? kf_period { get; set; }
-        /// <summary>
-        /// 保质期时间
-        /// </summary>
-        [Comment("保质期时间")]
-        public DateTime? kf_date { get; set; }
-        /// <summary>
-        /// 锁定库存
-        /// </summary>
-        [Precision(23, 10)]
-        [Comment("锁定库存")]
-        public decimal? qty_lock { get; set; }
-        /// <summary>
-        /// 安全库存
-        /// </summary>
-        [Precision(23, 10)]
-        [Comment("安全库存")]
-        public decimal? sec_qty { get; set; }
-        /// <summary>
-        /// 单位
-        /// </summary>
-        [StringLength(80)]
-        [Comment("单位")]
-        public string? unit { get; set; }
-        /// <summary>
-        /// 日期
-        /// </summary>
-        [Comment("日期")]
-        public DateTime? rq { get; set; }
-
-    }
-}

+ 20 - 9
MicroServices/Business/Bussiness.Model/MES/IC/ic_item_stock.cs

@@ -1,8 +1,5 @@
 using Business.Core.Attributes;
-using Business.Model;
 using Microsoft.EntityFrameworkCore;
-using MongoDB.Bson.Serialization.Attributes;
-using System.ComponentModel;
 using System.ComponentModel.DataAnnotations;
 using System.ComponentModel.DataAnnotations.Schema;
 
@@ -13,6 +10,7 @@ namespace Business.Model.MES.IC
     /// </summary>
     [CollectionName("dopbase", "ic_item_stock")]
     [Comment("物料库存表")]
+    [Index(nameof(icitem_number), nameof(fversion), nameof(tenant_id), IsUnique = true)]
     public class ic_item_stock : BaseEntity
     {
         /// <summary>
@@ -21,12 +19,31 @@ namespace Business.Model.MES.IC
         [Required]
         [Comment("物料id")]
         public long icitem_id { get; set; }
+
+
+        /// <summary>
+        /// 物料编码
+        /// </summary>
+        [StringLength(80)]
+        [Comment("物料编码")]
+        public string? icitem_number { get; set; }
+
+
         /// <summary>
         /// 物料名称
         /// </summary>
         [StringLength(80)]
         [Comment("物料名称")]
         public string? icitem_name { get; set; }
+
+        /// <summary>
+        /// 版本号
+        /// </summary>
+        [StringLength(80)]
+        [Comment("版本号")]
+        public string? fversion { get; set; }
+
+
         /// <summary>
         /// 物料库存量
         /// </summary>
@@ -39,12 +56,6 @@ namespace Business.Model.MES.IC
         [Precision(23, 10)]
         [Comment("调拨在途数量")]
         public decimal? quantity_in_transit { get; set; }
-        /// <summary>
-        /// 工厂编码
-        /// </summary>
-        [StringLength(80)]
-        [Comment("工厂编码")]
-        public string? factory_fode { get; set; }
 
         /// <summary>
         /// 计算id

+ 18 - 9
MicroServices/Business/Bussiness.Model/MES/IC/ic_item_stockoccupy.cs

@@ -1,13 +1,6 @@
-using Business.Model;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Business.Core.Attributes;
+using Business.Core.Attributes;
 using Microsoft.EntityFrameworkCore;
+using System.ComponentModel.DataAnnotations;
 using System.ComponentModel.DataAnnotations.Schema;
 
 namespace Business.Model.MES.IC
@@ -17,6 +10,7 @@ namespace Business.Model.MES.IC
     /// </summary>
     [CollectionName("dopbase", "ic_item_stockoccupy")]
     [Comment("资源检查物料占用明细表")]
+    [Index(nameof(orderentry_id),nameof(icitem_number), nameof(fversion), nameof(tenant_id), IsUnique = true)]
     public class ic_item_stockoccupy:BaseEntity
     {
         /// <summary>
@@ -44,6 +38,21 @@ namespace Business.Model.MES.IC
         [Comment("物料id")]
         public long icitem_id { get; set; }
 
+
+        /// <summary>
+        /// 物料编码
+        /// </summary>
+        [StringLength(80)]
+        [Comment("物料编码")]
+        public string? icitem_number { get; set; }
+
+        /// <summary>
+        /// 版本号
+        /// </summary>
+        [StringLength(80)]
+        [Comment("版本号")]
+        public string? fversion { get; set; }
+
         /// <summary>
         /// 占用数量
         /// </summary>

+ 6 - 0
MicroServices/Business/Bussiness.Model/MES/IC/ic_substitute_group_detail.cs

@@ -46,6 +46,12 @@ namespace Business.Model.MES.IC
         [Comment("物料编码")]
         public string? icitem_number { get; set; }
 
+        /// <summary>
+        /// 版本号
+        /// </summary>
+        [StringLength(80)]
+        [Comment("版本号")]
+        public string? fversion { get; set; }
 
         /// <summary>
         /// 主/替

+ 1 - 0
MicroServices/Business/Bussiness.Model/SRM/srm_po_list.cs

@@ -10,6 +10,7 @@ namespace Business.Model.SRM
     /// </summary>
     [CollectionName("dopbase", "srm_po_list")]
     [Comment("采购订单明细详情")]
+    [Index(nameof(po_billno),nameof(polist_row), nameof(tenant_id), IsUnique = true)]
     public class srm_po_list : BaseEntity
     {
         /// <summary>

+ 1 - 0
MicroServices/Business/Bussiness.Model/SRM/srm_po_main.cs

@@ -10,6 +10,7 @@ namespace Business.Model.SRM
     /// </summary>
     [CollectionName("dopbase", "srm_po_main")]
     [Comment("采购订单")]
+    [Index(nameof(po_billno), nameof(tenant_id), IsUnique = true)]
     public class srm_po_main : BaseEntity
     {
         /// <summary>

+ 1 - 2
MicroServices/Business/Bussiness.Model/SRM/srm_pr_main.cs

@@ -1,7 +1,5 @@
 using Business.Core.Attributes;
-using Business.Model;
 using Microsoft.EntityFrameworkCore;
-using System.ComponentModel;
 using System.ComponentModel.DataAnnotations;
 using System.ComponentModel.DataAnnotations.Schema;
 
@@ -12,6 +10,7 @@ namespace Business.Model.SRM
     /// </summary>
     [CollectionName("dopbase", "srm_pr_main")]
     [Comment("采购申请单")]
+    [Index(nameof(pr_billno),nameof(tenant_id), IsUnique = true)]
     public class srm_pr_main : BaseEntity
     {
         /// <summary>

+ 9 - 2
MicroServices/Business/Bussiness.Model/SRM/srm_purchase.cs

@@ -1,7 +1,5 @@
 using Business.Core.Attributes;
-using Business.Model;
 using Microsoft.EntityFrameworkCore;
-using System.ComponentModel;
 using System.ComponentModel.DataAnnotations;
 using System.ComponentModel.DataAnnotations.Schema;
 
@@ -12,6 +10,7 @@ namespace Business.Model.SRM
     /// </summary>
     [CollectionName("dopbase", "srm_purchase")]
     [Comment("物料采购报价单")]
+    [Index(nameof(sourcelist_number),nameof(icitem_number), nameof(tenant_id), IsUnique = true)]
     public class srm_purchase : BaseEntity
     {
 
@@ -24,6 +23,14 @@ namespace Business.Model.SRM
         [Required]
         [Comment("物料id")]
         public long icitem_id { get; set; }
+
+        /// <summary>
+        /// 物料编码
+        /// </summary>]
+        [StringLength(20)]
+        [Comment("物料编码")]
+        public string? icitem_number { get; set; }
+
         /// <summary>
         /// 物料名称
         /// </summary>

+ 1 - 0
MicroServices/Business/Bussiness.Model/SRM/srm_supplier.cs

@@ -11,6 +11,7 @@ namespace Business.Model.SRM
     /// </summary>
     [Comment("供应商")]
     [CollectionName("dopbase", "srm_supplier")]
+    [Index(nameof(supplier_no), nameof(tenant_id), IsUnique = true)]
     public class srm_supplier : BaseEntity
     {
         ///// <summary>

+ 1 - 2
MicroServices/Business/Bussiness.Model/Sale/crm_customer.cs

@@ -1,7 +1,5 @@
 using Business.Core.Attributes;
-using Business.Model;
 using Microsoft.EntityFrameworkCore;
-using System.ComponentModel;
 using System.ComponentModel.DataAnnotations;
 
 namespace Business.Model.Sale
@@ -11,6 +9,7 @@ namespace Business.Model.Sale
     /// </summary>
     [Comment("客户")]
     [CollectionName("dopbase", "crm_customer")]
+    [Index(nameof(customer_no), nameof(tenant_id), IsUnique = true)]
     public class crm_customer : BaseEntity
     {
         ///// <summary>

+ 1 - 1
MicroServices/Business/Bussiness.Model/Sale/crm_seorder.cs

@@ -1,5 +1,4 @@
 using Business.Core.Attributes;
-using Business.Model;
 using Microsoft.EntityFrameworkCore;
 using System.ComponentModel;
 using System.ComponentModel.DataAnnotations;
@@ -12,6 +11,7 @@ namespace Business.Model.Sale
     /// </summary>
     [Comment("销售订单表")]
     [CollectionName("dopbase", "crm_seorder")]
+    [Index(nameof(bill_no),nameof(tenant_id), IsUnique = true)]
     public class crm_seorder : BaseEntity
     {
         ///// <summary>

+ 1 - 1
MicroServices/Business/Bussiness.Model/Sale/crm_seorderentry.cs

@@ -1,5 +1,4 @@
 using Business.Core.Attributes;
-using Business.Model;
 using Microsoft.EntityFrameworkCore;
 using System.ComponentModel;
 using System.ComponentModel.DataAnnotations;
@@ -12,6 +11,7 @@ namespace Business.Model.Sale
     /// </summary>
     [Comment("销售订单明细表")]
     [CollectionName("dopbase", "crm_seorderentry")]
+    [Index(nameof(bill_no),nameof(entry_seq), nameof(tenant_id), IsUnique = true)]
     public class crm_seorderentry : BaseEntity
     {
         ///// <summary>

+ 17 - 6
MicroServices/Business/Bussiness.MongoModel/MES/IC/mo_ic_item_stock.cs

@@ -21,12 +21,29 @@ namespace Business.MongoModel.MES.IC
         [Required]
         [Comment("物料id")]
         public long icitem_id { get; set; }
+
+        /// <summary>
+        /// 物料编码
+        /// </summary>
+        [StringLength(80)]
+        [Comment("物料编码")]
+        public string? icitem_number { get; set; }
+
         /// <summary>
         /// 物料名称
         /// </summary>
         [StringLength(80)]
         [Comment("物料名称")]
         public string? icitem_name { get; set; }
+
+
+        /// <summary>
+        /// 版本号
+        /// </summary>
+        [StringLength(80)]
+        [Comment("版本号")]
+        public string? fversion { get; set; }
+
         /// <summary>
         /// 物料库存量
         /// </summary>
@@ -39,12 +56,6 @@ namespace Business.MongoModel.MES.IC
         [Precision(23, 10)]
         [Comment("调拨在途数量")]
         public decimal? quantity_in_transit { get; set; }
-        /// <summary>
-        /// 工厂编码
-        /// </summary>
-        [StringLength(80)]
-        [Comment("工厂编码")]
-        public string? factory_fode { get; set; }
 
         /// <summary>
         /// 计算id

+ 14 - 0
MicroServices/Business/Bussiness.MongoModel/MES/IC/mo_ic_item_stockoccupy.cs

@@ -44,6 +44,20 @@ namespace Business.MongoModel.MES.IC
         [Comment("物料id")]
         public long icitem_id { get; set; }
 
+        /// <summary>
+        /// 物料编码
+        /// </summary>
+        [StringLength(80)]
+        [Comment("物料编码")]
+        public string? icitem_number { get; set; }
+
+        /// <summary>
+        /// 版本号
+        /// </summary>
+        [StringLength(80)]
+        [Comment("版本号")]
+        public string? fversion { get; set; }
+
         /// <summary>
         /// 占用数量
         /// </summary>

+ 15 - 0
MicroServices/Business/Bussiness.MongoModel/MES/IC/mo_ic_substitute_group_detail.cs

@@ -38,6 +38,21 @@ namespace Business.MongoModel.MES.IC
         [Required]
         [Comment("物料主键")]
         public long icitem_id { get; set; }
+
+        /// <summary>
+        /// 物料编码
+        /// </summary>]
+        [StringLength(20)]
+        [Comment("物料编码")]
+        public string? icitem_number { get; set; }
+
+        /// <summary>
+        /// 版本号
+        /// </summary>
+        [StringLength(80)]
+        [Comment("版本号")]
+        public string? fversion { get; set; }
+
         /// <summary>
         /// 主/替
         /// </summary>

+ 8 - 0
MicroServices/Business/Bussiness.MongoModel/SRM/mo_srm_purchase.cs

@@ -20,6 +20,14 @@ namespace Business.Model.SRM
         [Required]
         [Comment("物料id")]
         public long icitem_id { get; set; }
+
+        /// <summary>
+        /// 物料编码
+        /// </summary>]
+        [StringLength(20)]
+        [Comment("物料编码")]
+        public string? icitem_number { get; set; }
+
         /// <summary>
         /// 物料名称
         /// </summary>