|
@@ -11,6 +11,8 @@ using ZhonTai.Admin.Core.Attributes;
|
|
|
using ZhonTai.Admin.Core.Configs;
|
|
|
using ZhonTai.Admin.Core.Consts;
|
|
|
using ZhonTai.Admin.Core.Dto;
|
|
|
+using ZhonTai.Admin.Domain.KuaKe;
|
|
|
+using ZhonTai.Admin.Domain.Project;
|
|
|
using ZhonTai.Admin.Domain.User;
|
|
|
using ZhonTai.Admin.Repositories.KuaKe;
|
|
|
using ZhonTai.Admin.Repositories.Project;
|
|
@@ -107,7 +109,10 @@ namespace ZhonTai.Admin.Services.DiTuiAPI
|
|
|
var listProject = new List<MyProject>();
|
|
|
if (listProjectId.Count() > 0)
|
|
|
{
|
|
|
- listProject = await _projectRepository.Select.DisableGlobalFilter(FilterNames.Tenant).Where(m => listProjectId.Contains(m.Id)).ToListAsync(m => new MyProject(
|
|
|
+ listProject = await _projectRepository.Select.DisableGlobalFilter(FilterNames.Tenant)
|
|
|
+ .Where(m => listProjectId.Contains(m.Id))
|
|
|
+ .Where(m => m.Status == 2 || m.Status == 4 || m.Status == 5)
|
|
|
+ .ToListAsync(m => new MyProject(
|
|
|
m.Id,
|
|
|
m.Name,
|
|
|
m.Logo,
|
|
@@ -367,12 +372,38 @@ namespace ZhonTai.Admin.Services.DiTuiAPI
|
|
|
{
|
|
|
string kuaKeStatus = null;
|
|
|
kuaKeStatus = input.Filter?.KuaKeStatus == "0"? null : input.Filter?.KuaKeStatus;
|
|
|
+ Expression<Func<KuaKeEntity, bool>> where = null;
|
|
|
+ //where = where.Or(input.Mobile.NotNull(), a => a.Mobile == input.Mobile)
|
|
|
+ // .Or(input.Email.NotNull(), a => a.Email == input.Email);
|
|
|
+
|
|
|
+ //switch (kuaKeStatus)
|
|
|
+ //{
|
|
|
+ // case "2":
|
|
|
+ // where = (a => a.Status == 2 || a.Status == 1);
|
|
|
+ // break;
|
|
|
+
|
|
|
+ //}
|
|
|
+
|
|
|
+ if (kuaKeStatus == "0" || string.IsNullOrEmpty(kuaKeStatus))
|
|
|
+ {
|
|
|
+ where = null;
|
|
|
+ }
|
|
|
+ else if (kuaKeStatus == "2")
|
|
|
+ {
|
|
|
+ where = (a => a.Status == 1 || a.Status == 2);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ where = (a => a.Status == Convert.ToInt16(kuaKeStatus));
|
|
|
+ }
|
|
|
+
|
|
|
list = _kuaKeRepository.Select.DisableGlobalFilter(FilterNames.Tenant)
|
|
|
//list = _ProjectLinkRepository.Select.DisableGlobalFilter(FilterNames.Tenant)
|
|
|
.WhereIf(ProjectId.HasValue && ProjectId.Value > 0, a => a.ProjectId == ProjectId)
|
|
|
.WhereIf(Salesman.NotNull(), a => a.Name.Contains(Salesman))
|
|
|
.WhereIf(SalesmanPhone.NotNull(), a => a.Phone.Contains(SalesmanPhone))
|
|
|
- .WhereIf(kuaKeStatus.NotNull(), a => a.Status.ToString().Contains(kuaKeStatus))
|
|
|
+ //.WhereIf(kuaKeStatus.NotNull(), a => a.Status.ToString().Contains(kuaKeStatus))
|
|
|
+ .Where(where)
|
|
|
.Where(a => a.TenantId == User.TenantId)
|
|
|
.OrderByDescending(a => a.CreatedTime)
|
|
|
.Count(out total)
|