update 任务列表增加人员人元userid过滤条件
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
using Dapper;
|
using Dapper;
|
||||||
|
using Ewide.Core;
|
||||||
using Ewide.Core.Extension;
|
using Ewide.Core.Extension;
|
||||||
using Furion.DatabaseAccessor;
|
using Furion.DatabaseAccessor;
|
||||||
using Furion.DependencyInjection;
|
using Furion.DependencyInjection;
|
||||||
using Furion.DynamicApiController;
|
using Furion.DynamicApiController;
|
||||||
|
using Furion.FriendlyException;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -21,11 +23,13 @@ namespace Ewide.Application.Service
|
|||||||
{
|
{
|
||||||
private readonly IRepository<BsHouseTask> _houseTaskRep;
|
private readonly IRepository<BsHouseTask> _houseTaskRep;
|
||||||
private readonly IDapperRepository _dapperRepository;
|
private readonly IDapperRepository _dapperRepository;
|
||||||
|
private readonly IUserManager _userManager;
|
||||||
|
|
||||||
public HouseTaskService(IRepository<BsHouseTask> HouseTaskRep, IDapperRepository dapperRepository)
|
public HouseTaskService(IRepository<BsHouseTask> HouseTaskRep, IDapperRepository dapperRepository, IUserManager userManager)
|
||||||
{
|
{
|
||||||
_houseTaskRep = HouseTaskRep;
|
_houseTaskRep = HouseTaskRep;
|
||||||
_dapperRepository = dapperRepository;
|
_dapperRepository = dapperRepository;
|
||||||
|
_userManager = userManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost("/houseTask/page")]
|
[HttpPost("/houseTask/page")]
|
||||||
@@ -37,10 +41,14 @@ LEFT JOIN bs_house_info HI ON HI.HouseCodeId = T.HouseCodeId
|
|||||||
LEFT JOIN bs_house_projectinfo Proj ON Proj.Id=HC.ProjectId
|
LEFT JOIN bs_house_projectinfo Proj ON Proj.Id=HC.ProjectId
|
||||||
LEFT JOIN sys_area_code CA ON CA.Code = Proj.AreaCode
|
LEFT JOIN sys_area_code CA ON CA.Code = Proj.AreaCode
|
||||||
LEFT JOIN sys_area_code RA ON RA.AdCode = SUBSTR(CA.AdCode,1,9)
|
LEFT JOIN sys_area_code RA ON RA.AdCode = SUBSTR(CA.AdCode,1,9)
|
||||||
LEFT JOIN sys_area_code AA ON AA.AdCode = SUBSTR(CA.AdCode,1,6)";
|
LEFT JOIN sys_area_code AA ON AA.AdCode = SUBSTR(CA.AdCode,1,6)
|
||||||
return await _dapperRepository.QueryPageDataDynamic(sql, input, filterFields: new string[] { "Type", "Address", "HouseCode" });
|
WHERE T.UserID=@UserID";
|
||||||
|
var user = await _userManager.CheckUserAsync();
|
||||||
|
if (user == null) throw Oops.Oh("登录信息丢失");
|
||||||
|
var param = new DynamicParameters();
|
||||||
|
param.Add("UserID", user.Id);
|
||||||
|
return await _dapperRepository.QueryPageDataDynamic(sql, input, param, filterFields: new string[] { "Type", "Address", "HouseCode" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user