| | |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import com.ycl.common.base.Result; |
| | | import com.ycl.system.domain.base.BaseSelect; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.ycl.common.annotation.DataScope; |
| | |
| | | { |
| | | return getChildList(list, t).size() > 0; |
| | | } |
| | | |
| | | /** |
| | | * 部门下拉列表 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result all(SysDept dept) { |
| | | List<BaseSelect> vos = deptMapper.selectDeptList(dept).stream().map(sysDept -> { |
| | | BaseSelect baseSelect = new BaseSelect(); |
| | | baseSelect.setId(Integer.parseInt(sysDept.getDeptId() + "")); |
| | | baseSelect.setValue(sysDept.getDeptName()); |
| | | return baseSelect; |
| | | } |
| | | ).collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |
| | | } |
| | | } |