main
gaoshuguang 1 year ago
parent affb553847
commit 9b6a687a66

@ -598,9 +598,9 @@ public class ManualIssueServiceImpl implements ManualIssueService {
sqlStr = cmsParameter.getOraStr(); sqlStr = cmsParameter.getOraStr();
} }
Date now2 = new Date(); Date now2 = new Date();
FileUtil.delFile(new File(DownloadPath + File.separator + fileName)); //FileUtil.delFile(new File(DownloadPath + File.separator + fileName));
//version = DateTimeUtil.getFormateString(now2, Constant.MMDDHHMMSSSSS); version = DateTimeUtil.getFormateString(now2, Constant.MMDDHHMMSSSSS);
version = staNo + DateTimeUtil.getFormateString(now2, Constant.YYMMDD); //version = staNo + DateTimeUtil.getFormateString(now2, Constant.YYMMDD);
newName = fileName.replace(Constant.STR_DBF, Constant.STR_) + version + Constant.STR_ZLIB; newName = fileName.replace(Constant.STR_DBF, Constant.STR_) + version + Constant.STR_ZLIB;
String newFileName = fileName.replace(Constant.STR_DBF, Constant.STR_) + version + Constant.STR_DBF; String newFileName = fileName.replace(Constant.STR_DBF, Constant.STR_) + version + Constant.STR_DBF;
sqlStr = sqlStr.replace("%ROADNO%", String.valueOf(roadNo)).replace("%STANO%", String.valueOf(staNo)); sqlStr = sqlStr.replace("%ROADNO%", String.valueOf(roadNo)).replace("%STANO%", String.valueOf(staNo));
@ -612,7 +612,7 @@ public class ManualIssueServiceImpl implements ManualIssueService {
String zlibName = newName.replace(Constant.STR_ZLIB, Constant.STR_ + md5 + Constant.STR_ZLIB); String zlibName = newName.replace(Constant.STR_ZLIB, Constant.STR_ + md5 + Constant.STR_ZLIB);
String oldPath = DownloadPath + File.separator + newName; String oldPath = DownloadPath + File.separator + newName;
String newPath = DownloadPath + File.separator + zlibName; String newPath = DownloadPath + File.separator + zlibName;
FileUtil.moveFileReName(oldPath, newPath); FileUtil.copyFile(oldPath, newPath);
//if (new File(oldPath).renameTo(new File(newPath))) { //if (new File(oldPath).renameTo(new File(newPath))) {
// //
//} //}

Loading…
Cancel
Save