|
@@ -388,32 +388,33 @@ public class TsaPlanService {
|
|
|
}
|
|
}
|
|
|
newFile.renameTo(uniqueFile);
|
|
newFile.renameTo(uniqueFile);
|
|
|
param.setMainPimg("/planning/" + yearMonth + "/" + newFilename);
|
|
param.setMainPimg("/planning/" + yearMonth + "/" + newFilename);
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- if(param.getMainMimg() != null && !"".equals(param.getMainMimg())){
|
|
|
|
|
- String imgInd = String.valueOf(ind);
|
|
|
|
|
- if (ind < 10) {
|
|
|
|
|
- imgInd = "0" + imgInd;
|
|
|
|
|
- }
|
|
|
|
|
- if(!param.getMainMimg().contains("planning")) {
|
|
|
|
|
- String planUploadPath = env.getProperty("upload.default.target.path");
|
|
|
|
|
- String yearMonth = GagaDateUtil.getToday().substring(0, 6);
|
|
|
|
|
- planUploadPath = GagaFileUtil.getConcatenationPath(planUploadPath, "/planning");
|
|
|
|
|
- File newFile = new File(GagaFileUtil.getConcatenationPath(planUploadPath, param.getMainMimg()));
|
|
|
|
|
- planUploadPath = GagaFileUtil.getConcatenationPath(planUploadPath, yearMonth);
|
|
|
|
|
- String newFilename = "PLANNING_" + GagaDateUtil.getTodayDateTime() + "_" + imgInd + "." + StringUtils.getFilenameExtension(param.getMainMimg());
|
|
|
|
|
- File uniqueFile = GagaFileUtil.getUniqueFile(new File(GagaFileUtil.getConcatenationPath(planUploadPath, newFilename)));
|
|
|
|
|
- // Rename a file
|
|
|
|
|
- File path = new File(planUploadPath);
|
|
|
|
|
- if (!path.exists()) {
|
|
|
|
|
- path.mkdir();
|
|
|
|
|
- }
|
|
|
|
|
- newFile.renameTo(uniqueFile);
|
|
|
|
|
param.setMainMimg("/planning/" + yearMonth + "/" + newFilename);
|
|
param.setMainMimg("/planning/" + yearMonth + "/" + newFilename);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+// if(param.getMainMimg() != null && !"".equals(param.getMainMimg())){
|
|
|
|
|
+// String imgInd = String.valueOf(ind);
|
|
|
|
|
+// if (ind < 10) {
|
|
|
|
|
+// imgInd = "0" + imgInd;
|
|
|
|
|
+// }
|
|
|
|
|
+// if(!param.getMainMimg().contains("planning")) {
|
|
|
|
|
+// String planUploadPath = env.getProperty("upload.default.target.path");
|
|
|
|
|
+// String yearMonth = GagaDateUtil.getToday().substring(0, 6);
|
|
|
|
|
+// planUploadPath = GagaFileUtil.getConcatenationPath(planUploadPath, "/planning");
|
|
|
|
|
+// File newFile = new File(GagaFileUtil.getConcatenationPath(planUploadPath, param.getMainMimg()));
|
|
|
|
|
+// planUploadPath = GagaFileUtil.getConcatenationPath(planUploadPath, yearMonth);
|
|
|
|
|
+// String newFilename = "PLANNING_" + GagaDateUtil.getTodayDateTime() + "_" + imgInd + "." + StringUtils.getFilenameExtension(param.getMainMimg());
|
|
|
|
|
+// File uniqueFile = GagaFileUtil.getUniqueFile(new File(GagaFileUtil.getConcatenationPath(planUploadPath, newFilename)));
|
|
|
|
|
+// // Rename a file
|
|
|
|
|
+// File path = new File(planUploadPath);
|
|
|
|
|
+// if (!path.exists()) {
|
|
|
|
|
+// path.mkdir();
|
|
|
|
|
+// }
|
|
|
|
|
+// newFile.renameTo(uniqueFile);
|
|
|
|
|
+// param.setMainMimg("/planning/" + yearMonth + "/" + newFilename);
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
// 이벤트 출석체크
|
|
// 이벤트 출석체크
|
|
|
planDao.deletePlanAttendBenefitList(param);
|
|
planDao.deletePlanAttendBenefitList(param);
|
|
|
|
|
|