Browse Source

项目列表接口开发

dev
李鹏飞 6 years ago
parent
commit
f08a9e87cb
  1. 24
      esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java

24
esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java

@ -257,19 +257,19 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
parentAndAllDeptDTO.setGrid(StringUtils.isNotEmpty(completeDept.getGrid()) ? completeDept.getGrid() : "");
parentAndAllDeptDTO.setGridId(completeDept.getGridId()!=null && completeDept.getGridId()!= 0 ? completeDept.getGridId() : null);
// 父所有部门(包含街道、社区)
String deptNames = (StringUtils.isNotEmpty(completeDept.getDistrict()) ? completeDept.getDistrict() : "");
deptNames += (StringUtils.isNotEmpty(completeDept.getStreet()) ? "-"+completeDept.getStreet() : "");
deptNames += (StringUtils.isNotEmpty(completeDept.getCommunity()) ? "-"+completeDept.getCommunity() : "");
String deptIds = (completeDept.getDistrictId()!=null && completeDept.getDistrictId()!= 0 ? completeDept.getDistrictId().toString() : "");
deptIds += (completeDept.getStreetId()!=null && completeDept.getStreetId()!= 0 ? ","+ completeDept.getStreetId().toString() : "");
deptIds += (completeDept.getCommunityId()!=null && completeDept.getCommunityId()!= 0 ? ","+ completeDept.getCommunityId().toString() : "");
parentAndAllDeptDTO.setParentDeptIds(deptIds);
parentAndAllDeptDTO.setParentDeptNames(deptNames);
String deptNames = (StringUtils.isNotEmpty(completeDept.getDistrict()) ? completeDept.getDistrict() +"-" : "");
deptNames += (StringUtils.isNotEmpty(completeDept.getStreet()) ? completeDept.getStreet() +"-": "");
deptNames += (StringUtils.isNotEmpty(completeDept.getCommunity()) ? "-"+completeDept.getCommunity() +"-": "");
String deptIds = (completeDept.getDistrictId()!=null && completeDept.getDistrictId()!= 0 ? completeDept.getDistrictId().toString() +"," : "");
deptIds += (completeDept.getStreetId()!=null && completeDept.getStreetId()!= 0 ? ","+ completeDept.getStreetId().toString() +",": "");
deptIds += (completeDept.getCommunityId()!=null && completeDept.getCommunityId()!= 0 ? ","+ completeDept.getCommunityId().toString() +"," : "");
parentAndAllDeptDTO.setParentDeptIds(!"".equals(deptIds)? deptIds.substring(0,deptIds.length()-1):"");
parentAndAllDeptDTO.setParentDeptNames(!"".equals(deptNames)? deptNames.substring(0,deptNames.length()-1):"");
// 所有部门(包含街道、社区、网格)
deptNames += (StringUtils.isNotEmpty(completeDept.getGrid()) ? "-"+completeDept.getGrid() : "");
deptIds += (completeDept.getGridId()!=null && completeDept.getGridId()!= 0 ? ","+completeDept.getGridId().toString() : "");
parentAndAllDeptDTO.setAllDeptIds(deptIds);
parentAndAllDeptDTO.setAllDeptNames(deptNames);
deptNames += (StringUtils.isNotEmpty(completeDept.getGrid()) ? completeDept.getGrid()+ "-" : "");
deptIds += (completeDept.getGridId()!=null && completeDept.getGridId()!= 0 ? completeDept.getGridId().toString() + "," : "");
parentAndAllDeptDTO.setAllDeptIds(!"".equals(deptIds)? deptIds.substring(0,deptIds.length()-1):"");
parentAndAllDeptDTO.setAllDeptNames(!"".equals(deptNames)? deptNames.substring(0,deptNames.length()-1):"");
} else {
return new Result().error("部门Id错误");
}

Loading…
Cancel
Save