|
|
@@ -445,6 +445,11 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
|
|
|
|
|
|
@Override
|
|
|
public OrgTreeResp getOrgTreeReq(OrgTreeReq req) {
|
|
|
+ /**
|
|
|
+ * 逻辑: 下穿时:查询机构为父机构,那么返回父机构到当前所在机构之前的机构id,以及当前机构的path
|
|
|
+ * 查询机构为子机构时,仅返回下级机构的path
|
|
|
+ * 不下穿时:仅查询当前所选机构id
|
|
|
+ */
|
|
|
OrgTreeResp resp = new OrgTreeResp();
|
|
|
Long curOrgId = SecurityUtils.getLoginUser().getOrgId();
|
|
|
Long queryOrgId = req.getOrgId();
|
|
|
@@ -466,12 +471,12 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
|
|
|
return resp;
|
|
|
}
|
|
|
//不下穿查询:
|
|
|
- if (curOrgPath.startsWith(queryOrgPath)){
|
|
|
+ /*if (curOrgPath.startsWith(queryOrgPath)){
|
|
|
//查询父机构: 返回当前机构至查询机构之间的所有机构id
|
|
|
List<Long> list = Arrays.stream(queryOrgPath.split("-")).map(Long::valueOf).collect(Collectors.toList());
|
|
|
resp.setOrgIdList(list);
|
|
|
return resp;
|
|
|
- }
|
|
|
+ }*/
|
|
|
//查询的是下级机构,返回下级机构id
|
|
|
resp.setOrgId(queryOrgId);
|
|
|
return resp;
|