Merge branch 'master' into docker_package

This commit is contained in:
wangliwen 2022-07-11 11:27:45 +08:00
commit 92ab97f795
2 changed files with 8 additions and 3 deletions

View File

@ -14,7 +14,6 @@ import io.renren.common.constant.Constant;
import io.renren.common.domain.Tsingtao_xhaProperties;
import io.renren.common.page.PageData;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.utils.ConvertUtils;
import io.renren.common.utils.DateUtils;
import io.renren.modules.monitor.dto.CameraChannelDto1;
import io.renren.modules.monitor.entity.CameraChannel;
@ -859,6 +858,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
public Object capabilitySharePartyCapabilitySet() {
HashMap<String, Object> resultMap = new HashMap<>();
List<Long> deptIds = resourceDao.selectMaxDeptIds();
if (deptIds.isEmpty()) {
return resultMap;
}
List<Map> resourceList = resourceDao.selectByDeptId(deptIds.get(0));
HashMap<String, Object> maxdeptMap = new HashMap<>();
maxdeptMap.put("resourceList", resourceList);
@ -879,6 +881,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
public Object competencyApplicantCompetencySet() {
HashMap<String, Object> resultMap = new HashMap<>();
List<Long> deptIds = resourceDao.selectMaxApplyDeptIds();
if (deptIds.isEmpty()) {
return resultMap;
}
List<Map> resourceList = resourceDao.selectByApplyDeptId(deptIds.get(0));
HashMap<String, Object> maxdeptMap = new HashMap<>();
maxdeptMap.put("resourceList", resourceList);
@ -1617,7 +1622,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
limit = Integer.parseInt((String) params.get(Constant.LIMIT));
}
List<SysUserDTO> sysUserList = sysUserService.list(new HashMap());
List<ResourceDTO> result=resourceDao.selectUsersApplyAndCount(sysUserList.stream().map(dto->dto.getId()).collect(Collectors.toList()));
List<ResourceDTO> result = resourceDao.selectUsersApplyAndCount(sysUserList.stream().map(dto -> dto.getId()).collect(Collectors.toList()));
int j = Math.min(curPage * limit, result.size());
ArrayList<ResourceDTO> recordLists = new ArrayList<>();
for (int i = (curPage - 1) * limit; i < j; i++) {

View File

@ -48,7 +48,7 @@ public class SysDeptController {
public Result<List<Map<String, Object>>> all(String name) {
List<Map<String, Object>> list = new ArrayList<>();
if (StringUtils.isNotEmpty(name)) {
list = jdbcTemplate.queryForList(String.format("SELECT id,`name` FROM sys_dept WHERE `name` LIKE '%s';", 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;");
}