|
@@ -77,6 +77,12 @@ public class CugOuterServiceProvider extends ControllerSupport implements CugOut
|
|
Long rootOrgId = req.getRootOrgId();
|
|
Long rootOrgId = req.getRootOrgId();
|
|
String identityNumber = req.getIdentityNumber();
|
|
String identityNumber = req.getIdentityNumber();
|
|
|
|
|
|
|
|
+ String courseGroupName = req.getCourseGroupName();
|
|
|
|
+ String examName = req.getExamName();
|
|
|
|
+ String specialtyName = req.getSpecialtyName();
|
|
|
|
+
|
|
|
|
+ List<Course> courseList = courseGroupService.getCourseList(rootOrgId, courseGroupName);
|
|
|
|
+
|
|
SaveStudentReq request = new SaveStudentReq();
|
|
SaveStudentReq request = new SaveStudentReq();
|
|
request.setIdentityNumber(identityNumber);
|
|
request.setIdentityNumber(identityNumber);
|
|
request.setName(req.getName());
|
|
request.setName(req.getName());
|
|
@@ -93,18 +99,21 @@ public class CugOuterServiceProvider extends ControllerSupport implements CugOut
|
|
|
|
|
|
String photoUrl = req.getPhotoUrl();
|
|
String photoUrl = req.getPhotoUrl();
|
|
if (StringUtils.isNotBlank(photoUrl)) {
|
|
if (StringUtils.isNotBlank(photoUrl)) {
|
|
- byte[] bs = HttpClientUtil.get(photoUrl);
|
|
|
|
|
|
+ byte[] bs;
|
|
|
|
+ try {
|
|
|
|
+ bs = HttpClientUtil.get(photoUrl);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ throw new StatusException("EX-100002", "photoUrl is wrong");
|
|
|
|
+ }
|
|
|
|
|
|
int lastIndexOf = photoUrl.lastIndexOf(".");
|
|
int lastIndexOf = photoUrl.lastIndexOf(".");
|
|
if (0 > lastIndexOf) {
|
|
if (0 > lastIndexOf) {
|
|
- throw new StatusException("EX-100002",
|
|
|
|
- "photoPath is not end with photo file suffix.");
|
|
|
|
|
|
+ throw new StatusException("EX-100002", "photoPath is not end with photo file suffix.");
|
|
}
|
|
}
|
|
String fileSuffix = photoUrl.substring(lastIndexOf);
|
|
String fileSuffix = photoUrl.substring(lastIndexOf);
|
|
|
|
|
|
String fileName = identityNumber + fileSuffix;
|
|
String fileName = identityNumber + fileSuffix;
|
|
- File temp = new File(
|
|
|
|
- tempDir + File.separator + "student_photo" + File.separator + fileName);
|
|
|
|
|
|
+ File temp = new File(tempDir + File.separator + "student_photo" + File.separator + fileName);
|
|
|
|
|
|
try {
|
|
try {
|
|
FileUtils.writeByteArrayToFile(temp, bs);
|
|
FileUtils.writeByteArrayToFile(temp, bs);
|
|
@@ -115,12 +124,6 @@ public class CugOuterServiceProvider extends ControllerSupport implements CugOut
|
|
faceService.processFace(rootOrgId, fileName, temp, req.getOperator());
|
|
faceService.processFace(rootOrgId, fileName, temp, req.getOperator());
|
|
}
|
|
}
|
|
|
|
|
|
- String courseGroupName = req.getCourseGroupName();
|
|
|
|
- String examName = req.getExamName();
|
|
|
|
- String specialtyName = req.getSpecialtyName();
|
|
|
|
-
|
|
|
|
- List<Course> courseList = courseGroupService.getCourseList(rootOrgId, courseGroupName);
|
|
|
|
-
|
|
|
|
GetExamReq getExamReq = new GetExamReq();
|
|
GetExamReq getExamReq = new GetExamReq();
|
|
getExamReq.setName(examName);
|
|
getExamReq.setName(examName);
|
|
getExamReq.setRootOrgId(rootOrgId);
|
|
getExamReq.setRootOrgId(rootOrgId);
|