Merge branch 'master' into docker_package
This commit is contained in:
commit
eb3bf1d96d
|
@ -2195,8 +2195,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
return resultList;
|
||||
} else {
|
||||
List<Map<String, Object>> typeCountListByApplyDept = resourceDao.selectApplyDeptDetailTypeCountList(params);
|
||||
List<HashMap<String, Object>> resultList = getDeptTemp1();
|
||||
List<HashMap<String, Object>> resultList = new ArrayList<>();
|
||||
resultList.addAll(getDeptTemp2());
|
||||
resultList.addAll(getDeptTemp1());
|
||||
resultList.addAll(getDeptTemp4());
|
||||
Map<String, Integer> countMap = new HashMap<>();
|
||||
|
||||
|
@ -2381,9 +2382,10 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
List<Map<String, Object>> typeCountListByDept = resourceDao.selectDeptDetailTypeCountList(params);
|
||||
Map<String, List<Map<String, Object>>> typeCountListMap = // 市级部门
|
||||
typeCountListByDept.stream().filter(index -> index.get("deptType").toString().equals("2")).collect(Collectors.groupingBy(m -> m.get("dept_id").toString()));
|
||||
List<HashMap<String, Object>> resultList = getDeptTemp1();
|
||||
resultList.addAll(getDeptTemp2());
|
||||
resultList.addAll(getDeptTemp4());
|
||||
List<HashMap<String, Object>> resultList = new ArrayList<>();
|
||||
resultList.addAll(getDeptTemp2()); // 区级区域
|
||||
resultList.addAll(getDeptTemp1()); // 市级部门
|
||||
resultList.addAll(getDeptTemp4()); // 企业
|
||||
Map<String, Integer> countMap = new HashMap<>();
|
||||
resultList = resultList.stream().map(index -> {
|
||||
if (typeCountListMap.keySet().contains(index.get("dept_id").toString())) { // 该部门存在上架信息
|
||||
|
|
|
@ -94,12 +94,18 @@ public class SysDeptController {
|
|||
}
|
||||
} else { // 区域管理员
|
||||
SysDeptDTO sysDeptDTO = sysDeptService.get(user.getDeptId());
|
||||
if (sysDeptDTO.getDistrict() != null) {
|
||||
if (sysDeptDTO != null && sysDeptDTO.getDistrict() != null) {
|
||||
if (StringUtils.isNotEmpty(name)) {
|
||||
list = jdbcTemplate.queryForList(String.format("SELECT id,`name` FROM sys_dept WHERE `name` LIKE '%s' AND WHERE district = %d;", "%" + name + "%", sysDeptDTO.getDistrict()));
|
||||
} else {
|
||||
list = jdbcTemplate.queryForList(String.format("SELECT id,`name` FROM sys_dept WHERE district = %d;", sysDeptDTO.getDistrict()));
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.isNotEmpty(name)) {
|
||||
list = jdbcTemplate.queryForList(String.format("SELECT id,`name` FROM sys_dept WHERE `name` LIKE '%s';", "%" + name + "%"));
|
||||
} else {
|
||||
list = jdbcTemplate.queryForList("SELECT id,`name` FROM sys_dept;");
|
||||
}
|
||||
}
|
||||
}
|
||||
return new Result<List<Map<String, Object>>>().ok(list);
|
||||
|
|
Loading…
Reference in New Issue