|
|
|
@ -86,8 +86,8 @@ public class ClientCommonService : IClientCommonService
|
|
|
|
|
var data = await db.Queryable<SysUser>()
|
|
|
|
|
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && ids.Contains(a.Id))
|
|
|
|
|
.Select<UserSelectRes>()
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.Take(20)
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.ToListAsync();
|
|
|
|
|
return await Task.FromResult(DataResult<List<UserSelectRes>>.Success(data));
|
|
|
|
|
}
|
|
|
|
@ -115,8 +115,9 @@ public class ClientCommonService : IClientCommonService
|
|
|
|
|
Label = a.PinYinCode,
|
|
|
|
|
Value = a.Id,
|
|
|
|
|
})
|
|
|
|
|
.Take(20)
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.Take(20).ToListAsync();
|
|
|
|
|
.ToListAsync();
|
|
|
|
|
return DataResult<List<ApiSelectViewModel>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
@ -984,8 +985,8 @@ public class ClientCommonService : IClientCommonService
|
|
|
|
|
var list = db.Queryable<SysUser>().Where(x => x.Status == StatusEnum.Enable.ToEnumInt() && x.IsSale == true)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(queryKey), a => a.UserCode.Contains(queryKey) || a.UserName.Contains(queryKey))
|
|
|
|
|
.Select<SaleSelectListRes>()
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.Take(20)
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.ToList();
|
|
|
|
|
if (list.Count > 0)
|
|
|
|
|
{
|
|
|
|
@ -1629,8 +1630,8 @@ public class ClientCommonService : IClientCommonService
|
|
|
|
|
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsOperator == true)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(queryKey), a => a.UserCode.Contains(queryKey) || a.UserName.Contains(queryKey))
|
|
|
|
|
.Select<UserSelectRes>()
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.Take(20)
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.ToList();
|
|
|
|
|
return DataResult<List<UserSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
|
|
|
|
|
}
|
|
|
|
@ -1645,8 +1646,8 @@ public class ClientCommonService : IClientCommonService
|
|
|
|
|
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsVouchingClerk == true)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(queryKey), a => a.UserCode.Contains(queryKey) || a.UserName.Contains(queryKey))
|
|
|
|
|
.Select<UserSelectRes>()
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.Take(20)
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.ToList();
|
|
|
|
|
return DataResult<List<UserSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
|
|
|
|
|
}
|
|
|
|
@ -1660,8 +1661,8 @@ public class ClientCommonService : IClientCommonService
|
|
|
|
|
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsSale == true)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(queryKey), a => a.UserCode.Contains(queryKey) || a.UserName.Contains(queryKey))
|
|
|
|
|
.Select<UserSelectRes>()
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.Take(20)
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.ToList();
|
|
|
|
|
return DataResult<List<UserSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
|
|
|
|
|
}
|
|
|
|
@ -1676,8 +1677,8 @@ public class ClientCommonService : IClientCommonService
|
|
|
|
|
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsCustom == true)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(queryKey), a => a.UserCode.Contains(queryKey) || a.UserName.Contains(queryKey))
|
|
|
|
|
.Select<UserSelectRes>()
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.Take(20)
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.ToList();
|
|
|
|
|
return DataResult<List<UserSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
|
|
|
|
|
}
|
|
|
|
@ -1692,8 +1693,8 @@ public class ClientCommonService : IClientCommonService
|
|
|
|
|
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsFinancialStaff == true)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(queryKey), a => a.UserCode.Contains(queryKey) || a.UserName.Contains(queryKey))
|
|
|
|
|
.Select<UserSelectRes>()
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.Take(20)
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.ToList();
|
|
|
|
|
return DataResult<List<UserSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
|
|
|
|
|
}
|
|
|
|
@ -1708,8 +1709,8 @@ public class ClientCommonService : IClientCommonService
|
|
|
|
|
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsCustomerService == true)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(queryKey), a => a.UserCode.Contains(queryKey) || a.UserName.Contains(queryKey))
|
|
|
|
|
.Select<UserSelectRes>()
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.Take(20)
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.ToList();
|
|
|
|
|
return DataResult<List<UserSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
|
|
|
|
|
}
|
|
|
|
@ -1724,8 +1725,8 @@ public class ClientCommonService : IClientCommonService
|
|
|
|
|
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsDriver == true)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(queryKey), a => a.UserCode.Contains(queryKey) || a.UserName.Contains(queryKey))
|
|
|
|
|
.Select<UserSelectRes>()
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.Take(20)
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.ToList();
|
|
|
|
|
return DataResult<List<UserSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
|
|
|
|
|
}
|
|
|
|
@ -1739,8 +1740,8 @@ public class ClientCommonService : IClientCommonService
|
|
|
|
|
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsDispatcher == true)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(queryKey), a => a.UserCode.Contains(queryKey) || a.UserName.Contains(queryKey))
|
|
|
|
|
.Select<UserSelectRes>()
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.Take(20)
|
|
|
|
|
.WithCache(SqlSugarCacheConst.User)
|
|
|
|
|
.ToList();
|
|
|
|
|
return DataResult<List<UserSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
|
|
|
|
|
}
|
|
|
|
|