|
@ -505,7 +505,7 @@ public class AgencyServiceImpl implements AgencyService { |
|
|
//todo 暂不处理 有时间再说
|
|
|
//todo 暂不处理 有时间再说
|
|
|
}else { |
|
|
}else { |
|
|
ScreenCustomerAgencyDTO parentAgencyDTO = null; |
|
|
ScreenCustomerAgencyDTO parentAgencyDTO = null; |
|
|
String subAgencyAreaCode = staffAgencyDTO.getParentAreaCode(); |
|
|
String parentAreaCode = staffAgencyDTO.getParentAreaCode(); |
|
|
List<OrgTreeNode> nodeList = new ArrayList<>(); |
|
|
List<OrgTreeNode> nodeList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
/*ScreenCustomerAgencyDTO currentAgency = new ScreenCustomerAgencyDTO(); |
|
|
/*ScreenCustomerAgencyDTO currentAgency = new ScreenCustomerAgencyDTO(); |
|
@ -521,7 +521,7 @@ public class AgencyServiceImpl implements AgencyService { |
|
|
convertOrgTreeNode(nodeList, currentAgency);*/ |
|
|
convertOrgTreeNode(nodeList, currentAgency);*/ |
|
|
//多客户 获取所有直线上级
|
|
|
//多客户 获取所有直线上级
|
|
|
do { |
|
|
do { |
|
|
parentAgencyDTO = screenCustomerAgencyDao.selectByAreaCode(subAgencyAreaCode); |
|
|
parentAgencyDTO = screenCustomerAgencyDao.selectByAreaCode(parentAreaCode); |
|
|
if (parentAgencyDTO == null){ |
|
|
if (parentAgencyDTO == null){ |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
@ -529,8 +529,9 @@ public class AgencyServiceImpl implements AgencyService { |
|
|
if (parentAgencyDTO.getPid() == null || NumConstant.ZERO_STR.equals(parentAgencyDTO.getPid())){ |
|
|
if (parentAgencyDTO.getPid() == null || NumConstant.ZERO_STR.equals(parentAgencyDTO.getPid())){ |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
subAgencyAreaCode = parentAgencyDTO.getAreaCode(); |
|
|
parentAreaCode = parentAgencyDTO.getAreaCode(); |
|
|
} while (true); |
|
|
} while (true); |
|
|
|
|
|
log.debug("查询所有上级为:{}",JSON.toJSONString(nodeList)); |
|
|
//多客户 获取所有下级
|
|
|
//多客户 获取所有下级
|
|
|
List<ScreenCustomerAgencyDTO> agencyNodeDTOS = screenCustomerAgencyDao.selectAllSubAgencyList(null,staffAgencyDTO.getAreaCode()); |
|
|
List<ScreenCustomerAgencyDTO> agencyNodeDTOS = screenCustomerAgencyDao.selectAllSubAgencyList(null,staffAgencyDTO.getAreaCode()); |
|
|
//孔村降级处理 且移除掉 党总支级别
|
|
|
//孔村降级处理 且移除掉 党总支级别
|
|
@ -550,6 +551,7 @@ public class AgencyServiceImpl implements AgencyService { |
|
|
} |
|
|
} |
|
|
nodes = TreeUtils.buildTreeByAreaCode(nodeList); |
|
|
nodes = TreeUtils.buildTreeByAreaCode(nodeList); |
|
|
} |
|
|
} |
|
|
|
|
|
log.debug("查询所有上级树结构为:{}",JSON.toJSONString(nodes)); |
|
|
//只有一个根节点的树 所以返回一个
|
|
|
//只有一个根节点的树 所以返回一个
|
|
|
return nodes.get(0); |
|
|
return nodes.get(0); |
|
|
} |
|
|
} |
|
|