|
|
@@ -432,6 +432,26 @@ public class OrganizationServiceImpl extends SuperService implements Organizatio
|
|
|
return ResultContent.buildSuccess(model);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 得到学校所在的项目信息
|
|
|
+ *
|
|
|
+ * @param schoolOid 学校oid
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public ResultContent<ProjectOrgModel> getSchoolProjectDetail(String schoolOid) {
|
|
|
+ Organization schoolOrg = organizationDao.findTopByOid(schoolOid);
|
|
|
+ if (ObjectUtils.isEmpty(schoolOrg)) {
|
|
|
+ return ResultContent.buildFail(String.format(ResultMessage.DATA_NOT_EXIST, schoolOid));
|
|
|
+ }
|
|
|
+ ProjectOrgModel model = null;
|
|
|
+ OrganizationRelation relation = organizationRelationDao.findTopByMainOrganizationAndRelationType(schoolOrg, OrganizationRelationType.SchoolToProject);
|
|
|
+ if (ObjectUtils.isNotEmpty(relation)) {
|
|
|
+ model = toProjectModel(relation.getRelOrganization());
|
|
|
+ }
|
|
|
+ return ResultContent.buildSuccess(model);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 分页数据
|
|
|
*
|