|
|
|
@ -665,7 +665,7 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit |
|
|
|
* @Date 2020/1/31 11:39 |
|
|
|
**/ |
|
|
|
private void packgeAllDeptOptionForEpiDemic() { |
|
|
|
List<DeptTreeDTO> deptList = baseDao.selectListDeptTree(); |
|
|
|
List<DeptTreeDTO> deptList = baseDao.selectListDeptTreeForEpiDemic(); |
|
|
|
JSONObject node; |
|
|
|
JSONArray headNodes = new JSONArray(); |
|
|
|
for (DeptTreeDTO deptItemDto : deptList) { |
|
|
|
@ -693,26 +693,12 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit |
|
|
|
children = new JSONArray(); |
|
|
|
for (DeptTreeDTO categoryTreeDto : others) { |
|
|
|
if (categoryTreeDto.getPid().equals(node.get("value"))) { |
|
|
|
SysDeptEntity parentDeptInfo = baseDao.getById(categoryTreeDto.getPid()); |
|
|
|
//二级只要街道党工委
|
|
|
|
if (parentDeptInfo.getPid().longValue() == NumConstant.ZERO_L) { |
|
|
|
logger.info("二级目录:" + categoryTreeDto.getName()); |
|
|
|
SysDeptEntity currentDeptInfo = baseDao.getById(categoryTreeDto.getId()); |
|
|
|
if (OrganizationTypeConstant.ORG_TYPE_STREET_PARTY.equals(currentDeptInfo.getTypeKey())) { |
|
|
|
childNode = new JSONObject(); |
|
|
|
childNode.put("value", categoryTreeDto.getId()); |
|
|
|
childNode.put("label", categoryTreeDto.getName()); |
|
|
|
children.add(childNode); |
|
|
|
allChildren.add(childNode); |
|
|
|
} |
|
|
|
} else { |
|
|
|
childNode = new JSONObject(); |
|
|
|
childNode.put("value", categoryTreeDto.getId()); |
|
|
|
childNode.put("label", categoryTreeDto.getName()); |
|
|
|
children.add(childNode); |
|
|
|
allChildren.add(childNode); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!children.isEmpty()) { |
|
|
|
node.put("children", children); |
|
|
|
|