|
@@ -103,7 +103,7 @@ public class InstitutionServiceImpl implements InstitutionService {
|
|
|
saveInstitutionVO.getAdminList().forEach(item->{
|
|
|
UserEntity institutionUserEntity = new UserEntity(institutionNo,institutionName, item.get("loginName").toString(),
|
|
|
item.get("loginName").toString(), DigestUtils.md5DigestAsHex(item.get("password").toString().getBytes()),
|
|
|
- LocalDate.now().toString(),Constant.DEFAULT_VALUE_ZERO, UserStatus.PASS.getType(), UserRole.SUPERADMIN.getType());
|
|
|
+ LocalDate.now().toString(),Constant.DEFAULT_VALUE_ZERO, UserStatus.PASS.getType(), UserRole.ADMIN.getType());
|
|
|
institutionUserEntity.setCreateTime(DateUtil.now());
|
|
|
institutionUserEntity.setStructureNo(institutionNo);
|
|
|
userService.save(institutionUserEntity);
|
|
@@ -131,6 +131,11 @@ public class InstitutionServiceImpl implements InstitutionService {
|
|
|
return String.valueOf(checkNumber(number));
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<InstitutionEntity> findAll() {
|
|
|
+ return institutionRepository.findAll();
|
|
|
+ }
|
|
|
+
|
|
|
private int checkNumber(int number){
|
|
|
//根据编号获取到机构
|
|
|
InstitutionEntity entity = institutionRepository.findByInstitutionNo(String.valueOf(number));
|
|
@@ -140,4 +145,8 @@ public class InstitutionServiceImpl implements InstitutionService {
|
|
|
return checkNumber(number+1);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|