|
@@ -210,15 +210,12 @@ public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStude
|
|
|
|
|
|
ImageTrajectoryUtil.createImage(fileSource, fileTarget, markTagJsonArray);
|
|
|
fileTargetList.add(fileTarget);
|
|
|
- JSONObject trialObject = new JSONObject();
|
|
|
if (oss) {
|
|
|
- trialObject.put(SystemConstant.TYPE, SystemConstant.OSS);
|
|
|
fileStoreUtil.ossUpload(dirTargetJpgName.toString(), fileTarget, DigestUtils.md5Hex(new FileInputStream(fileTarget)), UploadFileEnum.FILE.getFssType());
|
|
|
if (imageTrajectoryEnum == ImageTrajectoryEnum.PREVIEW) {
|
|
|
trailUrlsList.add(fileStoreUtil.getPrivateUrl(dirTargetJpgName.toString(), UploadFileEnum.FILE.getFssType()));
|
|
|
}
|
|
|
} else {
|
|
|
- trialObject.put(SystemConstant.TYPE, SystemConstant.LOCAL);
|
|
|
if (imageTrajectoryEnum == ImageTrajectoryEnum.PREVIEW) {
|
|
|
String filePath = fileTarget.getPath();
|
|
|
String trailUrl;
|
|
@@ -230,8 +227,7 @@ public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStude
|
|
|
trailUrlsList.add(trailUrl);
|
|
|
}
|
|
|
}
|
|
|
- trialObject.put(SystemConstant.PATH, (stringJoiner.toString() + dirTargetJpgName.toString()).replaceAll("\\\\", "/"));
|
|
|
- jsonImageTrajectoryPathArray.add(trialObject);
|
|
|
+ jsonImageTrajectoryPathArray.add((stringJoiner.toString() + dirTargetJpgName.toString()).replaceAll("\\\\", "/"));
|
|
|
}
|
|
|
if(!jsonImageSourcePathArray.isEmpty()){
|
|
|
tSyncExamStudentScore.setLocalSheetUrls(jsonImageSourcePathArray.toJSONString());
|
|
@@ -259,14 +255,13 @@ public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStude
|
|
|
for (int i = 0; i < jsonArray.size(); i++) {
|
|
|
String url = (String) jsonArray.get(i);
|
|
|
if (imageTrajectoryEnum == ImageTrajectoryEnum.DOWNLOAD) {
|
|
|
- fileTargetList.add(new File(stringJoiner.toString() + url));
|
|
|
+ fileTargetList.add(new File(url));
|
|
|
} else {
|
|
|
String trailUrl;
|
|
|
- String filePath = stringJoiner + url;
|
|
|
- if (filePath.startsWith("/")) {
|
|
|
- trailUrl = hostUrl + filePath;
|
|
|
+ if (url.startsWith("/")) {
|
|
|
+ trailUrl = hostUrl + url;
|
|
|
} else {
|
|
|
- trailUrl = hostUrl + File.separator + filePath;
|
|
|
+ trailUrl = hostUrl + File.separator + url;
|
|
|
}
|
|
|
trailUrlsList.add(trailUrl);
|
|
|
}
|