|
@@ -48,8 +48,6 @@ public class StudentServiceImpl implements StudentService {
|
|
@Autowired
|
|
@Autowired
|
|
OrgService orgService;
|
|
OrgService orgService;
|
|
|
|
|
|
- private static final String JPG = ".jpg";
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 获取所有学生(分页)
|
|
* 获取所有学生(分页)
|
|
*
|
|
*
|
|
@@ -103,17 +101,17 @@ public class StudentServiceImpl implements StudentService {
|
|
if (null != orgId) {
|
|
if (null != orgId) {
|
|
Org org = orgRepo.findOne(orgId);
|
|
Org org = orgRepo.findOne(orgId);
|
|
if (!org.getParentId().equals(rootOrgId)) {
|
|
if (!org.getParentId().equals(rootOrgId)) {
|
|
- throw new StatusException("B-160002", "机构错误");
|
|
|
|
|
|
+ throw new StatusException("B-160002", "orgId is wrong");
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- if (StringUtils.isBlank(orgName)) {
|
|
|
|
- throw new StatusException("B-160003", "orgName is blank");
|
|
|
|
- }
|
|
|
|
if (StringUtils.isBlank(orgCode)) {
|
|
if (StringUtils.isBlank(orgCode)) {
|
|
throw new StatusException("B-160004", "orgCode is blank");
|
|
throw new StatusException("B-160004", "orgCode is blank");
|
|
}
|
|
}
|
|
Org org = orgRepo.findByRootIdAndCode(rootOrgId, orgCode);
|
|
Org org = orgRepo.findByRootIdAndCode(rootOrgId, orgCode);
|
|
if (null == org) {
|
|
if (null == org) {
|
|
|
|
+ if (StringUtils.isBlank(orgName)) {
|
|
|
|
+ throw new StatusException("B-160003", "orgName is blank");
|
|
|
|
+ }
|
|
org = new Org();
|
|
org = new Org();
|
|
org.setParentId(rootOrgId);
|
|
org.setParentId(rootOrgId);
|
|
org.setCode(orgCode);
|
|
org.setCode(orgCode);
|