|
|
@@ -218,6 +218,7 @@ public class OrganizationServiceImpl extends SuperService implements Organizatio
|
|
|
organizationRelation.setMainName(main.getName());
|
|
|
organizationRelation.setRelOrganization(organization);
|
|
|
organizationRelation.setRelName(organization.getName());
|
|
|
+ organizationRelation.setRelationType(OrganizationRelationType.SchoolToProject);
|
|
|
organizationRelationDao.save(organizationRelation);
|
|
|
} else {
|
|
|
return ResultContent.buildFail(resultContent.getMsg());
|
|
|
@@ -382,6 +383,11 @@ public class OrganizationServiceImpl extends SuperService implements Organizatio
|
|
|
return it.getOid();
|
|
|
}).collect(Collectors.toList());
|
|
|
param.setOids(oids);
|
|
|
+ } else {
|
|
|
+ // 如果项目没关联学校,那就查不出来
|
|
|
+ List<String> oids = new ArrayList<>();
|
|
|
+ oids.add("UnKnow");
|
|
|
+ param.setOids(oids);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -682,6 +688,7 @@ public class OrganizationServiceImpl extends SuperService implements Organizatio
|
|
|
OrganizationModel model = new OrganizationModel();
|
|
|
if (ObjectUtils.isNotEmpty(entity)) {
|
|
|
BeanUtils.copyProperties(entity, model);
|
|
|
+
|
|
|
// 判断不同的类型
|
|
|
if (entity.getAuthType() == AuthType.School) {
|
|
|
// 学校:查询出关联的项目信息
|
|
|
@@ -695,7 +702,7 @@ public class OrganizationServiceImpl extends SuperService implements Organizatio
|
|
|
String adminDivisionItemCode = entity.getAdminDivisionItemCode();
|
|
|
if (StringUtils.isNotEmpty(adminDivisionItemCode)) {
|
|
|
List<String> codes = List.of(adminDivisionItemCode.split(","));
|
|
|
- List<Region> regions = regionDao.findByCodeIn(codes);
|
|
|
+ List<Region> regions = regionDao.findByCodeInOrderByIndexAsc(codes);
|
|
|
List<RegionModel> regionList = regions.stream().map(it -> {
|
|
|
RegionModel regionModel = new RegionModel();
|
|
|
BeanUtils.copyProperties(it, regionModel);
|