|
@@ -96,6 +96,13 @@ public class OrganizationServiceImpl extends SuperService implements Organizatio
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
public ResultContent<Organization> addOrganization(OrganizationAddParam param) {
|
|
public ResultContent<Organization> addOrganization(OrganizationAddParam param) {
|
|
|
|
|
+ if(StringUtils.isNotEmpty(param.getPassword())) {
|
|
|
|
|
+ // 验证密码是否符合格式
|
|
|
|
|
+ ValidateResult validateResult = ValidateUtils.validatePassWord(param.getPassword());
|
|
|
|
|
+ if (!validateResult.isSuccess()) {
|
|
|
|
|
+ return ResultContent.buildFail(validateResult.getMsg());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
param.setId(null);
|
|
param.setId(null);
|
|
|
// 验证数据
|
|
// 验证数据
|
|
|
Organization temp = organizationDao.findTopByName(param.getName());
|
|
Organization temp = organizationDao.findTopByName(param.getName());
|
|
@@ -174,11 +181,6 @@ public class OrganizationServiceImpl extends SuperService implements Organizatio
|
|
|
if (ObjectUtils.isEmpty(organization)) {
|
|
if (ObjectUtils.isEmpty(organization)) {
|
|
|
return ResultContent.buildSuccess(String.format("项目不存在:%s", projectId));
|
|
return ResultContent.buildSuccess(String.format("项目不存在:%s", projectId));
|
|
|
}
|
|
}
|
|
|
- // 验证密码是否符合格式
|
|
|
|
|
- ValidateResult validateResult = ValidateUtils.validatePassWord(param.getPassword());
|
|
|
|
|
- if (!validateResult.isSuccess()) {
|
|
|
|
|
- return ResultContent.buildFail(validateResult.getMsg());
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
OrganizationAddParam addParam = new SchoolAddParam();
|
|
OrganizationAddParam addParam = new SchoolAddParam();
|
|
|
BeanUtils.copyProperties(param, addParam);
|
|
BeanUtils.copyProperties(param, addParam);
|
|
@@ -296,6 +298,11 @@ public class OrganizationServiceImpl extends SuperService implements Organizatio
|
|
|
return ResultContent.buildSuccess();
|
|
return ResultContent.buildSuccess();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 查询结构详情
|
|
|
|
|
+ * @param oid
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
public ResultContent<OrganizationModel> getDetail(String oid) {
|
|
public ResultContent<OrganizationModel> getDetail(String oid) {
|
|
|
Organization organization = organizationDao.findTopByOid(oid);
|
|
Organization organization = organizationDao.findTopByOid(oid);
|
|
|
if (ObjectUtils.isEmpty(organization)) {
|
|
if (ObjectUtils.isEmpty(organization)) {
|
|
@@ -603,6 +610,19 @@ public class OrganizationServiceImpl extends SuperService implements Organizatio
|
|
|
model.setProjectModel(toSimpleModel(organization.getRelOrganization()));
|
|
model.setProjectModel(toSimpleModel(organization.getRelOrganization()));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 区域信息
|
|
|
|
|
+ String adminDivisionItemCode = entity.getAdminDivisionItemCode();
|
|
|
|
|
+ if(StringUtils.isEmpty(adminDivisionItemCode)) {
|
|
|
|
|
+ List<String> codes = List.of(adminDivisionItemCode.split(","));
|
|
|
|
|
+ List<Region> regions = regionDao.findByCodeIn(codes);
|
|
|
|
|
+ List<RegionModel> regionList = regions.stream().map(it->{
|
|
|
|
|
+ RegionModel regionModel = new RegionModel();
|
|
|
|
|
+ BeanUtils.copyProperties(it, regionModel);
|
|
|
|
|
+ return regionModel;
|
|
|
|
|
+ }).collect(Collectors.toList());
|
|
|
|
|
+ model.setRegionList(regionList);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
return model;
|
|
return model;
|
|
|
}
|
|
}
|