|
@@ -68,8 +68,9 @@ public class StudentServiceImpl implements StudentService {
|
|
String orgCode = studentInfo.getOrgCode();
|
|
String orgCode = studentInfo.getOrgCode();
|
|
String orgName = studentInfo.getOrgName();
|
|
String orgName = studentInfo.getOrgName();
|
|
|
|
|
|
|
|
+ OrgEntity org = null;
|
|
if (null != orgId) {
|
|
if (null != orgId) {
|
|
- OrgEntity org = orgRepo.findOne(orgId);
|
|
|
|
|
|
+ org = orgRepo.findOne(orgId);
|
|
if (null == org) {
|
|
if (null == org) {
|
|
throw new StatusException("B-160050", "orgId is wrong");
|
|
throw new StatusException("B-160050", "orgId is wrong");
|
|
}
|
|
}
|
|
@@ -83,7 +84,7 @@ public class StudentServiceImpl implements StudentService {
|
|
throw new StatusException("B-160053", "orgId is wrong");
|
|
throw new StatusException("B-160053", "orgId is wrong");
|
|
}
|
|
}
|
|
} else if (StringUtils.isNotBlank(orgCode)) {
|
|
} else if (StringUtils.isNotBlank(orgCode)) {
|
|
- OrgEntity org = orgRepo.findByRootIdAndCode(rootOrgId, orgCode);
|
|
|
|
|
|
+ org = orgRepo.findByRootIdAndCode(rootOrgId, orgCode);
|
|
if (null == org) {
|
|
if (null == org) {
|
|
if (StringUtils.isBlank(orgName)) {
|
|
if (StringUtils.isBlank(orgName)) {
|
|
throw new StatusException("B-160003", "orgName is blank");
|
|
throw new StatusException("B-160003", "orgName is blank");
|
|
@@ -94,8 +95,8 @@ public class StudentServiceImpl implements StudentService {
|
|
org.setName(orgName);
|
|
org.setName(orgName);
|
|
org.setEnable(true);
|
|
org.setEnable(true);
|
|
org.setRootId(rootOrgId);
|
|
org.setRootId(rootOrgId);
|
|
- OrgEntity saved = orgRepo.save(org);
|
|
|
|
- orgId = saved.getId();
|
|
|
|
|
|
+ org = orgRepo.save(org);
|
|
|
|
+ orgId = org.getId();
|
|
} else {
|
|
} else {
|
|
orgId = org.getId();
|
|
orgId = org.getId();
|
|
}
|
|
}
|
|
@@ -174,7 +175,17 @@ public class StudentServiceImpl implements StudentService {
|
|
req.setId(saved.getId());
|
|
req.setId(saved.getId());
|
|
req.setIdentityNumber(saved.getIdentityNumber());
|
|
req.setIdentityNumber(saved.getIdentityNumber());
|
|
req.setName(saved.getName());
|
|
req.setName(saved.getName());
|
|
|
|
+ req.setOrgCode(org.getCode());
|
|
|
|
+ req.setOrgId(org.getId());
|
|
|
|
+ req.setOrgName(org.getName());
|
|
|
|
+ req.setPhoneNumber(saved.getPhoneNumber());
|
|
|
|
+ req.setPhotoPath(saved.getPhotoPath());
|
|
|
|
+ req.setRootOrgId(saved.getRootOrgId());
|
|
|
|
+ req.setSecurityPhone(saved.getSecurityPhone());
|
|
|
|
+ req.setStudentCode(saved.getStudentCode());
|
|
|
|
+
|
|
req.setSyncType("update");
|
|
req.setSyncType("update");
|
|
|
|
+
|
|
dataSyncCloudService.syncStudent(req);
|
|
dataSyncCloudService.syncStudent(req);
|
|
}
|
|
}
|
|
|
|
|