LEIYI 6 months ago
parent
commit
9f03c09e7f

+ 3 - 1
OASystem/OASystem.Api/Controllers/PersonnelModuleController.cs

@@ -36,6 +36,8 @@ namespace OASystem.API.Controllers
         private readonly IHubContext<ChatHub, IChatClient> _hubContext;
         private readonly GoodsRepository _goodsRep;
 
+        private string url, path;
+
         /// <summary>
         /// 初始化
         /// </summary>
@@ -1981,7 +1983,7 @@ namespace OASystem.API.Controllers
                 return Ok(JsonView(false, sb.ToString()));
             }
 
-            return Ok(await _goodsRep.GoodsReceiveOP(dto, _currUserInfo.UserId));
+            return Ok(await _goodsRep.GoodsReceiveOp(dto, _currUserInfo.UserId));
         }
 
         /// <summary>

+ 5 - 5
OASystem/OASystem.Api/Program.cs

@@ -93,11 +93,11 @@ builder.Services.Configure<KestrelServerOptions>(options =>
 #endregion
 
 #region 接口分组
-//var groups = new List<Tuple<string, string>>
-//{
-//    //new Tuple<string, string>("Group1","分组一"),
-//    //new Tuple<string, string>("Group2","分组二")
-//};
+var groups = new List<Tuple<string, string>>
+{
+    //new Tuple<string, string>("Group1","分组一"),
+    //new Tuple<string, string>("Group2","分组二")
+};
 #endregion
 
 #region 注入数据库

+ 1 - 1
OASystem/OASystem.Domain/AutoMappers/_baseMappingProfile.cs

@@ -278,7 +278,7 @@ namespace OASystem.Domain.AutoMappers
             CreateMap<TaskAllocationAddOrEditDto, Pm_TaskAllocation>();
 
             #region 进销存
-            CreateMap<GoodsStorageOPDTO, Pm_GoodsStorage>();
+            CreateMap<GoodsStorageOpDto, Pm_GoodsStorage>();
             CreateMap<GoodsReceiveOPDTO, Pm_GoodsReceive>();
             #endregion
             #endregion

+ 7 - 1
OASystem/OASystem.Domain/Entities/PersonnelModule/Pm_GoodsStorage.cs

@@ -22,9 +22,15 @@ namespace OASystem.Domain.Entities.PersonnelModule
         /// <summary>
         /// 批次号
         /// </summary>
-        [SugarColumn(ColumnDescription = "此次供应商名称", IsNullable = true, ColumnDataType = "varchar(50)")]
+        [SugarColumn(ColumnDescription = "批次号", IsNullable = true, ColumnDataType = "varchar(50)")]
         public string? BatchNo { get; set; }
 
+        /// <summary>
+        /// 此批次领用数量
+        /// </summary>
+        [SugarColumn(ColumnDescription = "此批次领用数量", IsNullable = true, ColumnDataType = "decimal(10,2)")]
+        public decimal ReceiveQuantity { get; set; }
+
         /// <summary>
         /// 此次入库数量
         /// </summary>

+ 3 - 2
OASystem/OASystem.Infrastructure/Repositories/PersonnelModule/GoodsRepository.cs

@@ -360,7 +360,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
         {
             var info = _mapper.Map<Pm_GoodsStorage>(dto);
             info.CreateUserId = currUserId;
-            info.BatchNo = Guid.NewGuid().ToString("N");
+            info.BatchNo = DateTime.Now.ToString("yyyyMMddHHmmss");
 
             decimal editAgoQuantity = 0.00M,
                     editAgoTotalPrice = 0.00M;
@@ -591,7 +591,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
         /// <param name="dto"></param>
         /// <param name="currUserId"></param>
         /// <returns></returns>
-        public async Task<JsonView> GoodsReceiveOP(GoodsReceiveOPDTO dto, int currUserId)
+        public async Task<JsonView> GoodsReceiveOp(GoodsReceiveOPDTO dto, int currUserId)
         {
             var info = _mapper.Map<Pm_GoodsReceive>(dto);
             info.CreateUserId = currUserId;
@@ -619,6 +619,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
                     _jv.Msg = $"该条数据已通过审核,不可更改!";
                     return _jv;
                 }
+
                 //物品数量验证
                 decimal editAfterQuantity = waitAuditQuantity - selectInfo.Quantity + info.Quantity;
                 if (editAfterQuantity > stockQuantity)