|
@@ -162,7 +162,7 @@ public class SapOrgService extends BaseService {
|
|
|
@SuppressWarnings("unchecked")
|
|
|
public List<SapOrg> selectListByParentId(String parentId) throws Exception {
|
|
|
SapOrg org = SapOrg.builder().parentId(parentId).build();
|
|
|
- return (List<SapOrg>) findList("SapOrgMapper.selectListByParentId", org);
|
|
|
+ return toInfoDetails((List<SapOrg>) findList("SapOrgMapper.selectListByParentId", org));
|
|
|
}
|
|
|
|
|
|
public void updateWxDepartId(SapOrg org) throws Exception {
|
|
@@ -171,14 +171,19 @@ public class SapOrgService extends BaseService {
|
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
public List<SapOrg> selectListByName(String name) throws Exception {
|
|
|
- return (List<SapOrg>) findList("SapOrgMapper.selectListByName", name);
|
|
|
+ return toInfoDetails((List<SapOrg>) findList("SapOrgMapper.selectListByName", name));
|
|
|
}
|
|
|
|
|
|
- public SapOrg toInfoDetail(SapOrg sapOrg) {
|
|
|
+ public SapOrg selectById(String id) throws Exception {
|
|
|
+ return (SapOrg) findObject("SapOrgMapper.selectById", id);
|
|
|
+ }
|
|
|
+
|
|
|
+ public SapOrg toInfoDetail(SapOrg sapOrg) throws Exception {
|
|
|
+ sapOrg.setParentOrg(selectById(sapOrg.getParentId()));
|
|
|
return sapOrg;
|
|
|
}
|
|
|
|
|
|
- public List<SapOrg> toInfoDetails(List<SapOrg> sapOrgs) {
|
|
|
+ public List<SapOrg> toInfoDetails(List<SapOrg> sapOrgs) throws Exception {
|
|
|
for (SapOrg sapOrg : sapOrgs) {
|
|
|
toInfoDetail(sapOrg);
|
|
|
}
|