|
@@ -518,9 +518,10 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
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))
|
|
|
{
|
|
|
typeLabel = dto.TypeLabel
|
|
@@ -554,6 +555,17 @@ namespace OASystem.Infrastructure.Repositories.PersonnelModule
|
|
|
})
|
|
|
.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和物品名称只能传一个
|
|
|
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(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(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)
|
|
|
.Select((gr, gi, sd, u1, u2) => new GoodsReceiveListView
|
|
|
{
|