Bläddra i källkod

修改库存平台接口

zhengly 2 år sedan
förälder
incheckning
4cefd851e7

+ 9 - 9
MicroServices/Business/Business.Application/DOP/SyncDOPAppService.cs

@@ -21,11 +21,11 @@ namespace Business.DOP
         /// <summary>
         /// 平台规格型号对照表
         /// </summary>
-        private readonly IRepository<PlatformSpecificationComparison, long> _PlatformSpecificationComparison;
+        private readonly IRepository<WMS_PlatformSpecificationComparison, long> _PlatformSpecificationComparison;
         /// <summary>
         /// 平台库存表
         /// </summary>
-        private readonly IRepository<PlatformInventory, long> _PlatformInventory;
+        private readonly IRepository<WMS_PlatformInventory, long> _PlatformInventory;
         /// <summary>
         ///  雪花算法
         /// </summary>
@@ -40,8 +40,8 @@ namespace Business.DOP
         /// 构造函数
         /// </summary>
         public SyncDOPAppService(
-            IRepository<PlatformSpecificationComparison, long> PlatformSpecificationComparison,
-            IRepository<PlatformInventory, long> PlatformInventory,
+            IRepository<WMS_PlatformSpecificationComparison, long> PlatformSpecificationComparison,
+            IRepository<WMS_PlatformInventory, long> PlatformInventory,
              IUnitOfWorkManager unitOfWorkManager,
         ICurrentTenant currentTenant
             )
@@ -82,8 +82,8 @@ namespace Business.DOP
             {
                 return JsonConvert.SerializeObject("成品库存为空!");
             }
-            List<PlatformInventory> platformInventoryInsert = new List<PlatformInventory>();
-            List<PlatformInventory> platformInventoryDel;
+            List<WMS_PlatformInventory> platformInventoryInsert = new List<WMS_PlatformInventory>();
+            List<WMS_PlatformInventory> platformInventoryDel;
             if (type == 1)
             {
                 platformInventoryDel = _PlatformInventory.GetListAsync(x => x.Code == "HW0001").Result;
@@ -94,13 +94,13 @@ namespace Business.DOP
             }
             foreach (var item in platformInventoryDtoList)
             {
-                PlatformInventory platformInventory = new PlatformInventory();
+                WMS_PlatformInventory platformInventory = new WMS_PlatformInventory();
                 platformInventory.GenerateNewId(snowFlake.NextId());
                 platformInventory.Location = item.Location;
                 platformInventory.SpecificationModel = item.SpecificationModel;
                 platformInventory.BatchNumber = item.BatchNumber;
-                platformInventory.InventoryQuantity = item.InventoryQuantity;
-                platformInventory.PeriodOfValidity = item.PeriodOfValidity;
+                platformInventory.InventoryQuantity = item.InventoryQuantity.GetValueOrDefault();
+                platformInventory.PeriodOfValidity = item.PeriodOfValidity.GetValueOrDefault();
                 if (type == 1)
                 {
                     platformInventory.Code = "HW0001";

+ 8 - 7
MicroServices/Business/Business.Domain/StructuredDB/WMS/PlatformInventory.cs → MicroServices/Business/Business.Domain/StructuredDB/WMS/WMS_PlatformInventory.cs

@@ -2,6 +2,7 @@
 using Microsoft.EntityFrameworkCore;
 using System;
 using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations.Schema;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -12,37 +13,37 @@ namespace Business.StructuredDB.WMS
     /// 平台规格库存对照
     /// </summary>
     [Comment("平台规格库存对照")]
-    public class PlatformInventory : BaseEntity
+    public class WMS_PlatformInventory : BaseEntity
     {
         /// <summary>
         /// 仓库
         /// </summary>
         [Comment("仓库")]
-        public string? Location { get; set; }
+        public string Location { get; set; }
         /// <summary>
         /// 规格或货品编码
         /// </summary>
         [Comment("规格或货品编码")]
-        public string? SpecificationModel { get; set; }
+        public string SpecificationModel { get; set; }
         /// <summary>
         /// 批号
         /// </summary>
         [Comment("批号")]
-        public string? BatchNumber { get; set; }
+        public string BatchNumber { get; set; }
         /// <summary>
         /// 数量
         /// </summary>
         [Comment("数量")]
-        public decimal? InventoryQuantity { get; set; }
+        public decimal InventoryQuantity { get; set; }
         /// <summary>
         /// 有效期
         /// </summary>
         [Comment("有效期")]
-        public DateTime? PeriodOfValidity { get; set; }
+        public DateTime PeriodOfValidity { get; set; }
         /// <summary>
         /// 编码
         /// </summary>
         [Comment("编码")]
-        public string? Code { get; set; }
+        public string Code { get; set; }
     }
 }

+ 8 - 6
MicroServices/Business/Business.Domain/StructuredDB/WMS/PlatformSpecificationComparison.cs → MicroServices/Business/Business.Domain/StructuredDB/WMS/WMS_PlatformSpecificationComparison.cs

@@ -2,6 +2,7 @@
 using Microsoft.EntityFrameworkCore;
 using System;
 using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations.Schema;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -11,34 +12,35 @@ namespace Business.StructuredDB.WMS
     /// <summary>
     /// 平台规格库存对照
     /// </summary>
+    [Table("WMS_PlatformSpecificationComparison")]
     [Comment("平台规格库存对照")]
-    public class PlatformSpecificationComparison : BaseEntity
+    public class WMS_PlatformSpecificationComparison : BaseEntity
     {
         /// <summary>
         /// 主键
         /// </summary>
         /// <param name="Id"></param>
-        public PlatformSpecificationComparison(long Id) : base(Id)
+        public WMS_PlatformSpecificationComparison(long Id) : base(Id)
         {
         }
         /// <summary>
         /// 标准规格型号
         /// </summary>
         [Comment("标准规格型号")]
-        public string? StandardSpecifications { get; set; }
+        public string StandardSpecifications { get; set; }
         /// <summary>
         /// 海王规格型号
         /// </summary>
         [Comment("海王规格型号")]
-        public string? HWSpecificationModel { get; set; }
+        public string HWSpecificationModel { get; set; }
         /// <summary>
         /// 国科规格型号
         /// </summary>
         [Comment("国科规格型号")]
-        public string? GKSpecificationModel { get; set; }
+        public string GKSpecificationModel { get; set; }
         /// <summary>
         /// 库存型号
         /// </summary>
-        public string? Type { get; set; }
+        public string Type { get; set; }
     }
 }