LEIYI 7 月之前
父节点
当前提交
6291fb3853

+ 5 - 3
OASystem/OASystem.Domain/Dtos/PersonnelModule/GoodsDTO.cs

@@ -219,6 +219,11 @@ namespace OASystem.Domain.Dtos.PersonnelModule
         /// </summary>
         /// </summary>
         public string EndDt { get; set; }
         public string EndDt { get; set; }
 
 
+        /// <summary>
+        /// 团组Ids
+        /// </summary>
+        public string? GroupLabel { get; set; }
+
         /// <summary>
         /// <summary>
         /// 类型Ids
         /// 类型Ids
         /// </summary>
         /// </summary>
@@ -325,7 +330,4 @@ namespace OASystem.Domain.Dtos.PersonnelModule
     }
     }
     #endregion
     #endregion
 
 
-
-
-
 }
 }

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

@@ -518,9 +518,10 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
         public async Task<JsonView> GoodsReceiveList(GoodsReceiveListDTO dto)
         public async Task<JsonView> GoodsReceiveList(GoodsReceiveListDTO dto)
         {
         {
             //参数处理
             //参数处理
-            int[] typeLabel = new int[] { },
-                  userLabel = new int[] { },
-                  auditLabel = new int[] { };
+            int[] typeLabel = Array.Empty<int>(),
+                  userLabel = Array.Empty<int>(),
+                  auditLabel = Array.Empty<int>(),
+                  groupLabel = Array.Empty<int>();
             if (!string.IsNullOrEmpty(dto.TypeLabel))
             if (!string.IsNullOrEmpty(dto.TypeLabel))
             {
             {
                 typeLabel = dto.TypeLabel
                 typeLabel = dto.TypeLabel
@@ -554,6 +555,17 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
                     })
                     })
                     .ToArray();
                     .ToArray();
             }
             }
+            if (!string.IsNullOrEmpty(dto.GroupLabel))
+            {
+                groupLabel = dto.GroupLabel
+                    .Split(',')
+                    .Select(x =>
+                    {
+                        if (int.TryParse(x, out var id)) return id;
+                        return id;
+                    })
+                    .ToArray();
+            }
 
 
             //物品ID和物品名称只能传一个
             //物品ID和物品名称只能传一个
             if (dto.GoodsId > 0) dto.GoodsName = string.Empty;
             if (dto.GoodsId > 0) dto.GoodsName = string.Empty;
@@ -574,6 +586,7 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
                                       .WhereIF(auditLabel.Length > 0, (gr, gi, sd, u1, u2) => auditLabel.Contains((int)gr.AuditStatus))
                                       .WhereIF(auditLabel.Length > 0, (gr, gi, sd, u1, u2) => auditLabel.Contains((int)gr.AuditStatus))
                                       .WhereIF(typeLabel.Length > 0, (gr, gi, sd, u1, u2) => typeLabel.Contains(gi.Type))
                                       .WhereIF(typeLabel.Length > 0, (gr, gi, sd, u1, u2) => typeLabel.Contains(gi.Type))
                                       .WhereIF(userLabel.Length > 0, (gr, gi, sd, u1, u2) => userLabel.Contains(gr.CreateUserId))
                                       .WhereIF(userLabel.Length > 0, (gr, gi, sd, u1, u2) => userLabel.Contains(gr.CreateUserId))
+                                      .WhereIF(groupLabel.Length > 0, (gr, gi, sd, u1, u2) => groupLabel.Contains(gr.GroupId))
                                       .WhereIF(beginBool && endBool, (gr, gi, sd, u1, u2) => gr.CreateTime >= begin && gr.CreateTime <= end)
                                       .WhereIF(beginBool && endBool, (gr, gi, sd, u1, u2) => gr.CreateTime >= begin && gr.CreateTime <= end)
                                       .Select((gr, gi, sd, u1, u2) => new GoodsReceiveListView
                                       .Select((gr, gi, sd, u1, u2) => new GoodsReceiveListView
                                       {
                                       {