개정판 e77fc685
finalservice 코드 정리 및 오류 수정
Change-Id: I4165d5e2bc070a961a565fa6fbdaf477efde41d4
FinalService/KCOM_FinalService/MarkupToPDF/MarkupToPDF.cs | ||
---|---|---|
22 | 22 |
{ |
23 | 23 |
public class MarkupToPDF : IDisposable |
24 | 24 |
{ |
25 |
|
|
25 | 26 |
#region 초기 데이터 |
26 | 27 |
private static iTextSharp.text.Rectangle mediaBox; |
27 | 28 |
private FileInfo PdfFilePath = null; |
... | ... | |
462 | 463 |
{ |
463 | 464 |
EndFinal(this, new EndFinalEventArgs |
464 | 465 |
{ |
466 |
FinalPDFRemotePath = _FinalPDFStorgeRemote + @"\" + FinalPDFPath.Name, |
|
465 | 467 |
OriginPDFName = OriginFileName, |
466 | 468 |
FinalPDFPath = FinalPDFPath.FullName, |
467 | 469 |
Error = "", |
... | ... | |
1219 | 1221 |
|
1220 | 1222 |
if (File.Exists(pdfFilePath)) |
1221 | 1223 |
{ |
1224 |
string destfilepath = null; |
|
1222 | 1225 |
try |
1223 | 1226 |
{ |
1224 | 1227 |
FinalPDFPath = new FileInfo(pdfFilePath); |
1225 | 1228 |
|
1226 |
string pdfmovepath = CommonLib.Common.GetConfigString("PDFMovePath", "URL", ""); |
|
1227 |
string destfilepath = Path.Combine(pdfmovepath,FinalPDFPath.Name.Replace(".tmp", ".pdf")); |
|
1229 |
// string pdfmovepath = CommonLib.Common.GetConfigString("PDFMovePath", "URL", ""); |
|
1230 |
destfilepath = Path.Combine(_FinalPDFStorgeLocal, FinalPDFPath.Name.Replace(".tmp", ".pdf")); |
|
1231 |
|
|
1228 | 1232 |
if (File.Exists(destfilepath)) |
1229 | 1233 |
File.Delete(destfilepath); |
1234 |
|
|
1230 | 1235 |
File.Move(FinalPDFPath.FullName, destfilepath); |
1231 | 1236 |
FinalPDFPath = new FileInfo(destfilepath); |
1232 | 1237 |
File.Delete(pdfFilePath); |
1233 | 1238 |
} |
1234 | 1239 |
catch (Exception ex) |
1235 | 1240 |
{ |
1236 |
SetNotice(finaldata.ID, "File move error: " + ex.ToString());
|
|
1241 |
SetNotice(finaldata.ID, $"File move error - Source File : {FinalPDFPath.FullName} dest File : {destfilepath}" + ex.ToString());
|
|
1237 | 1242 |
} |
1238 | 1243 |
|
1239 | 1244 |
return true; |
내보내기 Unified diff