1.运行管理追加分页;
2.新增终端在线率统计接口; 3.移植运行状态接口
This commit is contained in:
@@ -277,7 +277,7 @@ public class DeptController extends BaseController {
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||
@GetMapping("/getDeptById")
|
||||
@ApiOperation("获取所有单位")
|
||||
@ApiOperation("根据部门Id获取部门信息")
|
||||
public HttpResult<Dept> getDeptById(@RequestParam("deptId")String deptId) {
|
||||
String methodDescribe = getMethodDescribe("getDeptById");
|
||||
Dept result = deptService.getDeptById(deptId);
|
||||
|
||||
@@ -58,6 +58,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
|
||||
|
||||
private final UserMapper userMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public Page<DeptVO> listDept(DeptParam.QueryParam queryParam) {
|
||||
QueryWrapper<DeptVO> queryWrapper = new QueryWrapper<>();
|
||||
@@ -87,6 +88,9 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
|
||||
checkDicDataCode(deptParam, false);
|
||||
Dept dept = new Dept();
|
||||
BeanUtil.copyProperties(deptParam, dept);
|
||||
//进行先解绑,再新增
|
||||
Integer httpResult=deptLineFeignClient.removeBind(deptParam.getPid());
|
||||
System.out.println(httpResult);
|
||||
if (deptParam.getPid().equals("-1")) {
|
||||
//上层节点
|
||||
dept.setPids("0");
|
||||
@@ -118,7 +122,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
|
||||
List<String> allIds = new ArrayList<>();
|
||||
for (String id : ids) {
|
||||
for (Dept dept : deptList) {
|
||||
if (dept.getId().equalsIgnoreCase(id) || dept.getPids().indexOf(id) > 0){
|
||||
if (dept.getId().equalsIgnoreCase(id) || dept.getPids().indexOf(id) > 0) {
|
||||
allIds.add(dept.getId());
|
||||
}
|
||||
}
|
||||
@@ -145,7 +149,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
|
||||
.peek(deptFirst -> {
|
||||
deptFirst.setChildren(getChildren(deptFirst, deptList));
|
||||
if (deptFirst.getType() == 0) {
|
||||
deptFirst.setName(deptFirst.getAreaName());
|
||||
deptFirst.setName(deptFirst.getName());
|
||||
}
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
@@ -206,7 +210,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
|
||||
*/
|
||||
List<User> userList = userMapper.selectDeptsId(ids, DataStateEnum.ENABLE.getCode());
|
||||
|
||||
if (dept.size() > 0 || deptLineVOHttpResult.getData() || userList.size() > 0) {
|
||||
if (dept.size() > 0 || deptLineVOHttpResult.getData() != null || userList.size() > 0) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -248,21 +252,20 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
|
||||
|
||||
@Override
|
||||
public String getTopDeptId() {
|
||||
return this.lambdaQuery().eq(Dept::getPid,"0").one().getId();
|
||||
return this.lambdaQuery().eq(Dept::getPid, "0").one().getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PvTerminalTreeVO> allDeptList(){
|
||||
public List<PvTerminalTreeVO> allDeptList() {
|
||||
return this.baseMapper.allDeptList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dept getDeptById(String id){
|
||||
public Dept getDeptById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 校验参数,检查是否存在相同编码的部门
|
||||
*/
|
||||
@@ -312,7 +315,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
|
||||
* 根据部门id获取部门详情
|
||||
*/
|
||||
@Override
|
||||
public List<String> getDepSonIdtByDeptId(String id){
|
||||
return this.baseMapper.getDeptSonIds(id);
|
||||
public List<String> getDepSonIdtByDeptId(String id) {
|
||||
return this.baseMapper.getDeptSonIds(id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user