|
|
@ -691,4 +691,27 @@ public class SysOrganizationService extends MybatisBaseService<SysOrganizationMa |
|
|
|
} |
|
|
|
return rb.success().setData(orgPath); |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean<List<SysOrganizationListVo>> selectOrgList2(SysOrganizationListQuery query) { |
|
|
|
ResultBean<List<SysOrganizationListVo>> rb = ResultBean.fireFail(); |
|
|
|
String orgSid = ""; |
|
|
|
String orgDeptSid = ""; |
|
|
|
if (StringUtils.isNotBlank(query.getOrgPath())) { |
|
|
|
orgSid = sysStaffOrgService.getOrgSidByPath(query.getOrgPath()).getData(); |
|
|
|
} else { |
|
|
|
orgDeptSid = sysStaffOrgService.selectByUserSid(query.getUserSid()); |
|
|
|
orgSid = getOrgSid(orgDeptSid); |
|
|
|
} |
|
|
|
//根据分公司名称查询销售部门的部门
|
|
|
|
List<SysOrganizationListVo> sysOrganizationListVos = baseMapper.selectOrgList(orgSid); |
|
|
|
sysOrganizationListVos.removeAll(Collections.singleton(null)); |
|
|
|
if (!sysOrganizationListVos.isEmpty()) { |
|
|
|
for (SysOrganizationListVo vo : sysOrganizationListVos) { |
|
|
|
orgDeptSid = vo.getOrgDeptSid(); |
|
|
|
List<SysOrgStaffVo> sysOrgStaffVoList = baseMapper.selectByOrgDeptSid2(orgDeptSid); |
|
|
|
vo.setStaffinfoVoList(sysOrgStaffVoList); |
|
|
|
} |
|
|
|
} |
|
|
|
return rb.success().setData(sysOrganizationListVos); |
|
|
|
} |
|
|
|
} |