333
This commit is contained in:
parent
e1968e9e2d
commit
60f0e2e1eb
|
|
@ -217,6 +217,11 @@ namespace ZR.Admin.WebApi.Controllers.Business
|
||||||
var list = sysDeptService.AsQueryable().Where(it => it.ParentId == dept.DeptId).Select(it => new { it.DeptId, it.DeptName }).ToList();
|
var list = sysDeptService.AsQueryable().Where(it => it.ParentId == dept.DeptId).Select(it => new { it.DeptId, it.DeptName }).ToList();
|
||||||
return SUCCESS(list);
|
return SUCCESS(list);
|
||||||
}
|
}
|
||||||
|
if (dept == null)
|
||||||
|
{
|
||||||
|
var list = sysDeptService.AsQueryable().Where(it => it.ParentId == 1).Select(it => new { it.DeptId, it.DeptName }).ToList();
|
||||||
|
return SUCCESS(list);
|
||||||
|
}
|
||||||
return SUCCESS(new List<object>());
|
return SUCCESS(new List<object>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -233,6 +238,10 @@ namespace ZR.Admin.WebApi.Controllers.Business
|
||||||
public IActionResult GetRegion([FromQuery] int deptId)
|
public IActionResult GetRegion([FromQuery] int deptId)
|
||||||
{
|
{
|
||||||
var list = sysDeptService.AsQueryable().Where(it => it.ParentId == deptId).Select(it => new { it.DeptId, it.DeptName }).ToList();
|
var list = sysDeptService.AsQueryable().Where(it => it.ParentId == deptId).Select(it => new { it.DeptId, it.DeptName }).ToList();
|
||||||
|
if (list == null)
|
||||||
|
{
|
||||||
|
list = sysDeptService.AsQueryable().Where(it => it.DeptId == deptId).Select(it => new { it.DeptId, it.DeptName }).ToList();
|
||||||
|
}
|
||||||
return SUCCESS(list);
|
return SUCCESS(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dbConfigs": [
|
"dbConfigs": [
|
||||||
|
//{
|
||||||
|
// "Conn": "Data Source=192.168.195.8;User ID=sa;Password=Dbt@com@123;Initial Catalog=OdtAdmin;Encrypt=True;TrustServerCertificate=True;",
|
||||||
|
// "DbType": 1, //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3,PgSql = 4
|
||||||
|
// "ConfigId": "0", //多租户唯一标识
|
||||||
|
// "IsAutoCloseConnection": true
|
||||||
|
//}
|
||||||
{
|
{
|
||||||
"Conn": "Data Source=192.168.195.8;User ID=sa;Password=Dbt@com@123;Initial Catalog=OdtAdmin;Encrypt=True;TrustServerCertificate=True;",
|
"Conn": "Data Source=49.233.115.141;User ID=sa;Password=Dbt@com@123;Initial Catalog=OdtAdmin;Encrypt=True;TrustServerCertificate=True;",
|
||||||
"DbType": 1, //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3,PgSql = 4
|
"DbType": 1, //数据库类型 MySql = 0, SqlServer = 1, Oracle = 3,PgSql = 4
|
||||||
"ConfigId": "0", //多租户唯一标识
|
"ConfigId": "0", //多租户唯一标识
|
||||||
"IsAutoCloseConnection": true
|
"IsAutoCloseConnection": true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user