Merge branch 'master' into features/UserManger
This commit is contained in:
@@ -626,6 +626,11 @@
|
||||
房屋详细信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Ewide.Application.Service.HouseSafety.HouseQuery.HouseQueryService">
|
||||
<summary>
|
||||
住宅查询
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Ewide.Application.Service.HouseMemberService.QueryMemberPageList(Ewide.Core.Service.UserInput)">
|
||||
<summary>
|
||||
分页查询用户
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
using Ewide.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ewide.Application
|
||||
{
|
||||
public class HouseQueryInput: PageInputBase
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ewide.Application
|
||||
{
|
||||
public class HouseQueryOutput
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
using Dapper;
|
||||
using Ewide.Core.Extension;
|
||||
using Furion.DatabaseAccessor;
|
||||
using Furion.DependencyInjection;
|
||||
using Furion.DynamicApiController;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ewide.Application.Service.HouseSafety.HouseQuery
|
||||
{
|
||||
/// <summary>
|
||||
/// 住宅查询
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Name = "HouseQuery", Order = 210)]
|
||||
public class HouseQueryService : IHouseQueryService, IDynamicApiController, ITransient
|
||||
{
|
||||
private readonly IRepository<BsHouseCode> _houseCodeRep;
|
||||
private readonly IRepository<BsHouseInfo> _houseInfoRep;
|
||||
private readonly IRepository<BsHouseTask> _houseTaskRep;
|
||||
private readonly IDapperRepository _dapperRepository;
|
||||
|
||||
public HouseQueryService(IRepository<BsHouseCode> HouseCodeRep, IRepository<BsHouseInfo> HouseInfoRep, IRepository<BsHouseTask> HouseTaskRep, IDapperRepository dapperRepository)
|
||||
{
|
||||
_houseCodeRep = HouseCodeRep;
|
||||
_houseInfoRep = HouseInfoRep;
|
||||
_houseTaskRep = HouseTaskRep;
|
||||
_dapperRepository = dapperRepository;
|
||||
}
|
||||
|
||||
[HttpPost("/houseQuery/page")]
|
||||
public async Task<dynamic> QueryPage([FromBody] HouseQueryInput input)
|
||||
{
|
||||
var sql = @"SELECT
|
||||
HC.ID,
|
||||
HC.HouseCode,
|
||||
AA.Name AreaName,
|
||||
RA.Name RoadName,
|
||||
CA.Name CommName,
|
||||
Proj.AreaCode,
|
||||
Proj.Note,
|
||||
Proj.Name,
|
||||
CONCAT(Proj.Name,'(',Proj.Note,')') FullProjName,
|
||||
HC.Address,
|
||||
IFNULL(HI.BuildingName,'') BuildingName,
|
||||
IFNULL(HI.TotalFloor,0) TotalFloor,
|
||||
IFNULL(HI.TotalArea,0) TotalArea,
|
||||
HI.LandAttribute,
|
||||
IFNULL(HI.HouseGrade,0) HouseGrade,
|
||||
HC.Type,
|
||||
HC.No,
|
||||
HI.State,
|
||||
HI.CompletedDate,
|
||||
HI.CreatedTime
|
||||
FROM bs_house_code HC
|
||||
LEFT JOIN bs_house_info HI ON HI.HouseCodeId = HC.Id
|
||||
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 RA ON RA.AdCode = SUBSTR(CA.AdCode,1,9)
|
||||
LEFT JOIN sys_area_code AA ON AA.AdCode = SUBSTR(CA.AdCode,1,6)
|
||||
WHERE 1=1";
|
||||
|
||||
return await _dapperRepository.QueryPageDataDynamic(sql, input, filterFields: new string[] {
|
||||
"HouseCode",
|
||||
"Address",
|
||||
"BuildingName",
|
||||
"State",
|
||||
"AreaCode",
|
||||
"LandAttribute",
|
||||
"HouseGrade",
|
||||
"CompletedDate",
|
||||
"CreatedTime",
|
||||
"TotalArea",
|
||||
"TotalFloor"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ewide.Application.Service.HouseSafety.HouseQuery
|
||||
{
|
||||
public interface IHouseQueryService
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ namespace Ewide.Application.Service
|
||||
[HttpPost("/houseTask/page")]
|
||||
public async Task<dynamic> QueryPage([FromBody] QueryHouseTaskInput input)
|
||||
{
|
||||
var sql = @"SELECT T.Id,AA.Name AreaName,RA.Name RoadName,CA.Name CommName,Proj.AreaCode,Proj.Note,Proj.Name,CONCAT(Proj.Name,'(',Proj.Note,')') FullProjName,HC.HouseCode,HC.Address,T.EndTime,HC.Type,HC.Industry,HC.No FROM `bs_house_task` T
|
||||
var sql = @"SELECT T.Id,AA.Name AreaName,RA.Name RoadName,CA.Name CommName,Proj.AreaCode,Proj.Note,Proj.Name,CONCAT(Proj.Name,'(',Proj.Note,')') FullProjName,HC.HouseCode,HC.Address,T.EndTime,HC.Type,HC.Industry,HC.No,T.Status,IFNULL(HI.State,0) State FROM `bs_house_task` T
|
||||
LEFT JOIN bs_house_code HC ON T.HouseCodeId = HC.Id
|
||||
LEFT JOIN bs_house_info HI ON HI.HouseCodeId = T.HouseCodeId
|
||||
LEFT JOIN bs_house_projectinfo Proj ON Proj.Id=HC.ProjectId
|
||||
@@ -56,7 +56,7 @@ WHERE {0}";
|
||||
var param = new DynamicParameters();
|
||||
if (userRoles.Where(r => r.Code == Enum.GetName(HouseManagerRole.HouseSecurityManager).ToUnderScoreCase()).Count() > 0)
|
||||
{
|
||||
sql = String.Format(sql, " (T.Status !=3) AND T.UserID=@UserID ");
|
||||
sql = String.Format(sql, " T.UserID=@UserID ");
|
||||
param.Add("UserID", user.Id);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ WHERE {0}";
|
||||
param.Add("ZoneId", userOrg.Id);
|
||||
}
|
||||
|
||||
return await _dapperRepository.QueryPageDataDynamic(sql, input, param, filterFields: new string[] { "Type", "Address", "HouseCode" });
|
||||
return await _dapperRepository.QueryPageDataDynamic(sql, input, param, filterFields: new string[] { "Type", "Address", "HouseCode", "Status","State" });
|
||||
}
|
||||
|
||||
[HttpPost("/houseTask/submit")]
|
||||
|
||||
@@ -5148,6 +5148,16 @@
|
||||
关联显示父级
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Ewide.Core.Service.MenuTreeOutput.Permission">
|
||||
<summary>
|
||||
权限标识
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Ewide.Core.Service.MenuTreeOutput.Remark">
|
||||
<summary>
|
||||
备注
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Ewide.Core.Service.MenuTreeOutput.Sort">
|
||||
<summary>
|
||||
排序,越小优先级越高
|
||||
|
||||
@@ -38,6 +38,16 @@ namespace Ewide.Core.Service
|
||||
/// </summary>
|
||||
public bool VisibleParent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 权限标识
|
||||
/// </summary>
|
||||
public string Permission { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序,越小优先级越高
|
||||
/// </summary>
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace Ewide.Core.Service
|
||||
var roleIdList = await _sysUserRoleService.GetUserRoleIdList(userId);
|
||||
var menuIdList = await _sysRoleMenuService.GetRoleMenuIdList(roleIdList);
|
||||
return await _sysMenuRep.DetachedEntities
|
||||
.Where(u => u.VisibleParent)
|
||||
.Where(u => (u.Type == 2 && u.VisibleParent) || u.Type < 2)
|
||||
.Where(u => menuIdList.Contains(u.Id))
|
||||
.Where(u => u.Status == (int)CommonStatus.ENABLE)
|
||||
.Select(u => u.Application).ToListAsync();
|
||||
@@ -460,6 +460,8 @@ namespace Ewide.Core.Service
|
||||
Title = u.Name,
|
||||
Type = u.Type,
|
||||
VisibleParent = u.VisibleParent,
|
||||
Permission = u.Permission,
|
||||
Remark = u.Remark,
|
||||
Sort = u.Sort
|
||||
}).ToListAsync();
|
||||
return new TreeBuildUtil<MenuTreeOutput>().DoTreeBuild(menus);
|
||||
|
||||
@@ -330,7 +330,7 @@ namespace Ewide.Core.Service
|
||||
// 如果是范围类型是全部数据,则获取当前所有的组织架构Id
|
||||
if (dataScopeType == (int)DataScopeType.ALL)
|
||||
{
|
||||
orgIdList = await _sysOrgRep.DetachedEntities.Where(u => u.Status != (int)CommonStatus.ENABLE).Select(u => u.Id).ToListAsync();
|
||||
orgIdList = await _sysOrgRep.DetachedEntities.Where(u => u.Status == (int)CommonStatus.ENABLE).Select(u => u.Id).ToListAsync();
|
||||
}
|
||||
// 如果范围类型是本部门及以下部门,则查询本节点和子节点集合,包含本节点
|
||||
else if (dataScopeType == (int)DataScopeType.DEPT_WITH_CHILD)
|
||||
|
||||
@@ -238,7 +238,7 @@ namespace Ewide.Core.Util
|
||||
var Message = "邮箱验证码为:" + code.ToString();
|
||||
mailMessage.Body = Message;
|
||||
smtpClient.Send(mailMessage);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
|
||||
7191
Api/Ewide.Database.Migrations/Migrations/20210430030837_init.Designer.cs
generated
Normal file
7191
Api/Ewide.Database.Migrations/Migrations/20210430030837_init.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
1442
Api/Ewide.Database.Migrations/Migrations/20210430030837_init.cs
Normal file
1442
Api/Ewide.Database.Migrations/Migrations/20210430030837_init.cs
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ConnectionStrings": {
|
||||
"DefaultConnection": "Data Source=118.178.224.202;Port=3306;Database=ewide;User ID=root;Password=root;pooling=true;sslmode=none;CharSet=utf8;"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user