|
@@ -91,11 +91,27 @@ namespace OASystem.Infrastructure.Repositories.Resource
|
|
|
|
|
|
if (!_portIds.Contains(dto.PortType)) { result.Msg = MsgTips.Port; return result; }
|
|
|
|
|
|
+
|
|
|
+ var typeLabel = new List<int>();
|
|
|
+ if (!string.IsNullOrEmpty(dto.TypeLabel))
|
|
|
+ {
|
|
|
+ typeLabel = dto.TypeLabel.Split(',')
|
|
|
+ .Select(s =>
|
|
|
+ {
|
|
|
+ int value = 0;
|
|
|
+ if (int.TryParse(s, out value)) return value;
|
|
|
+ return value;
|
|
|
+ })
|
|
|
+ .Where(i => i != 0)
|
|
|
+ .ToList();
|
|
|
+ }
|
|
|
+
|
|
|
var search = dto.Search;
|
|
|
RefAsync<int> total = 0;
|
|
|
var infos = await _sqlSugar.Queryable<Res_MediaSuppliers>()
|
|
|
.LeftJoin<Sys_Users>((ms, u) => ms.CreateUserId == u.Id)
|
|
|
.Where((ms, u) => ms.IsDel == 0)
|
|
|
+ .WhereIF(typeLabel.Count > 0 ,x=> typeLabel.Contains(x.TypeId))
|
|
|
.WhereIF(!string.IsNullOrEmpty(search), (ms, u) => ms.UnitName.Contains(search) || ms.Contact.Contains(search) || ms.Tel.Contains(search))
|
|
|
.OrderByDescending((ms, u) => ms.CreateTime)
|
|
|
.Select((ms, u) => new
|