diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java index 18f9e5f7..34454acb 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java @@ -84,9 +84,9 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl count = new HashMap<>(); count.put("name", "总计"); + if (!cloud) { + countMap.put("yzy", 0); + countMap.put("ysp", 0); + } count.putAll(countMap); resultList.add(count); return resultList; diff --git a/renren-admin/src/main/java/io/renren/modules/sys/controller/SysDeptController.java b/renren-admin/src/main/java/io/renren/modules/sys/controller/SysDeptController.java index b152dc3e..9ed66f01 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/controller/SysDeptController.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/controller/SysDeptController.java @@ -28,6 +28,7 @@ import org.springframework.web.bind.annotation.*; import springfox.documentation.annotations.ApiIgnore; import java.util.*; +import java.util.stream.Collectors; /** * 部门管理 @@ -108,6 +109,14 @@ public class SysDeptController { } } } + List> list_metting = jdbcTemplate.queryForList("SELECT DISTINCT dept from t_meetingroom_book WHERE dept IS NOT NULL;"); + List temp = list.stream().map(index -> index.get("name")).filter(index -> index != null).map(index -> index.toString()).collect(Collectors.toList()); + List> list_ = list_metting.stream().map(index -> index.get("dept")).filter(index -> index != null).collect(Collectors.toList()) + .stream().filter(index -> !temp.contains(index.toString())).map(index -> new LinkedHashMap() {{ + put("id", null); + put("name", index.toString()); + }}).collect(Collectors.toList()); + list.addAll(list_); // 获取会客厅申请部门 return new Result>>().ok(list); }