|
|
@@ -149,11 +149,13 @@ public class SmartAuthorGroupServiceImpl extends ServiceImpl<SmartAuthorGroupMap
|
|
|
queryWrapper1.in("id", Arrays.asList(manageId));
|
|
|
List<SmartDepartment> list1 = smartDepartmentMapper.selectList(queryWrapper1);
|
|
|
List<JSONObject> departmentManageJson = new ArrayList<>();
|
|
|
- for (int j = 0; j < list1.size(); j++) {
|
|
|
- JSONObject jsonObject1 = new JSONObject();
|
|
|
- jsonObject1.put("id", list1.get(i).getId());
|
|
|
- jsonObject1.put("name", list1.get(i).getName());
|
|
|
- departmentManageJson.add(jsonObject1);
|
|
|
+ if (list1.size()>0){
|
|
|
+ for (int j = 0; j < list1.size(); j++) {
|
|
|
+ JSONObject jsonObject1 = new JSONObject();
|
|
|
+ jsonObject1.put("id", list1.get(i).getId());
|
|
|
+ jsonObject1.put("name", list1.get(i).getName());
|
|
|
+ departmentManageJson.add(jsonObject1);
|
|
|
+ }
|
|
|
}
|
|
|
list.get(i).setDepartmentManageJson(departmentManageJson);
|
|
|
}
|
|
|
@@ -164,11 +166,13 @@ public class SmartAuthorGroupServiceImpl extends ServiceImpl<SmartAuthorGroupMap
|
|
|
queryWrapper1.in("id", Arrays.asList(viewId));
|
|
|
List<SmartDepartment> list1 = smartDepartmentMapper.selectList(queryWrapper1);
|
|
|
List<JSONObject> departmentViewJson = new ArrayList<>();
|
|
|
- for (int j = 0; j < list1.size(); j++) {
|
|
|
- JSONObject jsonObject1 = new JSONObject();
|
|
|
- jsonObject1.put("id", list1.get(i).getId());
|
|
|
- jsonObject1.put("name", list1.get(i).getName());
|
|
|
- departmentViewJson.add(jsonObject1);
|
|
|
+ if (list1.size()>0){
|
|
|
+ for (int j = 0; j < list1.size(); j++) {
|
|
|
+ JSONObject jsonObject1 = new JSONObject();
|
|
|
+ jsonObject1.put("id", list1.get(i).getId());
|
|
|
+ jsonObject1.put("name", list1.get(i).getName());
|
|
|
+ departmentViewJson.add(jsonObject1);
|
|
|
+ }
|
|
|
}
|
|
|
list.get(i).setDepartmentViewJson(departmentViewJson);
|
|
|
}
|