This commit is contained in:
zpc 2025-08-21 17:31:43 +08:00
parent e1968e9e2d
commit 60f0e2e1eb
2 changed files with 17 additions and 2 deletions

View File

@ -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);
} }
@ -353,7 +362,7 @@ namespace ZR.Admin.WebApi.Controllers.Business
PortNumber = port + 1, PortNumber = port + 1,
OpticalAttenuation = "", OpticalAttenuation = "",
HistoryRemarks = "", HistoryRemarks = "",
OpticalCableOffRemarks ="", OpticalCableOffRemarks = "",
Remarks = "", Remarks = "",
Status = parm.DefaultStatus, Status = parm.DefaultStatus,
UpdatedAt = DateTime.Now, UpdatedAt = DateTime.Now,

View File

@ -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 = 3PgSql = 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 = 3PgSql = 4 "DbType": 1, // MySql = 0, SqlServer = 1, Oracle = 3PgSql = 4
"ConfigId": "0", // "ConfigId": "0", //
"IsAutoCloseConnection": true "IsAutoCloseConnection": true