프로젝트

일반

사용자정보

개정판 1305c420

ID1305c42004d7598340bf61fb7995c730bc5d2f50
상위 bae83c92
하위 cf1cc862

김태성이(가) 3년 이상 전에 추가함

license 추가

Change-Id: I8e7a4286cba7bd95a3475917a96e7b3560c67cb0

차이점 보기:

FinalService/KCOM_FinalService/MarkupToPDF/MarkupToPDF.cs
255 255
        }
256 256

  
257 257
        #region 생성자 & 소멸자
258
        public void MakeFinalPDF(object _FinalPDF)
258
        public EndFinalResult MakeFinalPDF(object _FinalPDF)
259 259
        {
260
            EndFinalResult result = new EndFinalResult();
261

  
260 262
            DOCUMENT_ITEM documentItem;
261 263
            FINAL_PDF FinalPDF = (FINAL_PDF)_FinalPDF;
262 264
            FinalItem = FinalPDF;
......
276 278
                    {
277 279
                        if (_properties.Where(t => t.TYPE == PropertiesType.Const_TileSorcePath).Count() == 0)
278 280
                        {
279
                            SetNotice(FinalPDF.ID, $"Project {FinalPDF.PROJECT_NO} : TileSourcePath Not Found.");
280
                            return;
281
                            result.Error = " TileSourcePath Not Found.";
281 282
                        }
282 283
                        else
283 284
                        { 
......
286 287

  
287 288
                        if (_properties.Where(t => t.TYPE == PropertiesType.Const_FinalPDFStorgeLocal).Count() == 0)
288 289
                        {
289
                            SetNotice(FinalPDF.ID, $"Project {FinalPDF.PROJECT_NO} : FinalPDFStorgeLocal Not Found.");
290
                            return;
290
                            result.Error = " FinalPDFStorgeLocal Not Found.";
291 291
                        }
292 292
                        else
293 293
                        {
......
297 297

  
298 298
                        if (_properties.Where(t => t.TYPE == PropertiesType.Const_FinalPDFStorgeRemote).Count() == 0)
299 299
                        {
300
                            SetNotice(FinalPDF.ID, $"Project {FinalPDF.PROJECT_NO} : FinalPDFStorgeRemote Not Found.");
301
                            return;
300
                            result.Error = " FinalPDFStorgeRemote Not Found.";
302 301
                        }
303 302
                        else
304 303
                        {
......
307 306
                    }
308 307
                    else
309 308
                    {
310
                        SetNotice(FinalPDF.ID, $"Project {FinalPDF.PROJECT_NO} : Final PDF Properties Not Found.");
311
                        return;
309
                        result.Error = " Final PDF Properties Not Found.";
312 310
                    }
313 311

  
314 312
                    var finalList = _entity.FINAL_PDF.Where(final => final.ID == FinalPDF.ID);
......
324 322
            }
325 323
            catch (Exception ex)
326 324
            {
327
                SetNotice(FinalPDF.ID, "프로퍼티 에러: " + ex.ToString());
328
                return;
325
                result.Error = " 프로퍼티 에러." + ex.ToString();
326
            }
327

  
328
            if(result.Error != null)
329
            {
330
                return result;
329 331
            }
332

  
330 333
            #endregion
331 334

  
332 335
            #region 문서 복사
......
434 437
            }
435 438
            catch (Exception ex)
436 439
            {
437
                if (ex.Message == "사용 가능한" || ex.Message == "작업을 완료했습니다")
438
                {
439
                    SetNotice(FinalPDF.ID, "Desktop 내 힙메모리 부족으로 서비스 진행이 되지 않아 재시작 합니다");
440
                    System.Diagnostics.Process process = new System.Diagnostics.Process();
441
                    process.StartInfo.FileName = "cmd";
442
                    process.StartInfo.Arguments = "/c net stop \"FinalService\" & net start \"FinalService\"";
443
                    process.Start();
444
                }
445
                else
446
                {
447
                    SetNotice(FinalPDF.ID, "PDF를 Stamp 중 에러 : " + ex.Message);
448
                }
440
                result.Error = "PDF를 Stamp 중 에러 : " + ex.Message;
441
                //if (ex.Message == "사용 가능한" || ex.Message == "작업을 완료했습니다")
442
                //{
443
                //    //SetNotice(FinalPDF.ID, "Desktop 내 힙메모리 부족으로 서비스 진행이 되지 않아 재시작 합니다");
444
                //    //System.Diagnostics.Process process = new System.Diagnostics.Process();
445
                //    //process.StartInfo.FileName = "cmd";
446
                //    //process.StartInfo.Arguments = "/c net stop \"FinalService\" & net start \"FinalService\"";
447
                //    //process.Start();
448
                //}
449
                //else
450
                //{
451
                    
452
                //}
453
            }
454

  
455

  
456
            if (result.Error != null)
457
            {
458
                return result;
449 459
            }
460

  
450 461
            #endregion
451 462

  
452 463
            try
......
461 472
                        //TestFile = SetFlattingPDF(TestFile);
462 473
                        //StatusChange($"SetFlattingPDF : {TestFile}", 0);
463 474

  
464
                        SetStampInPDF(FinalItem, TestFile, MarkupInfoItem);
475
                       if(SetStampInPDF(FinalItem, TestFile, MarkupInfoItem))
476
                        {
477
                            StatusChange($"finish : {TestFile}", 0);
478
                        }
479
                        else
480
                        {
481
                            StatusChange($"stamp Error", 0);
482
                        }
465 483

  
466
                        StatusChange($"SetStampInPDF : {TestFile}", 0);
467 484
                    }
468 485
                }
469
                if (EndFinal != null)
470
                {
471
                    EndFinal(this, new EndFinalEventArgs
472
                    {
473
                        FinalPDFRemotePath = _FinalPDFStorgeRemote + @"\" + FinalPDFPath.Name,
474
                        OriginPDFName = OriginFileName,
475
                        FinalPDFPath = FinalPDFPath.FullName,
476
                        Error = "",
477
                        Message = "",
478
                        FinalPDF = FinalPDF,
479
                    });
480
                }
486

  
487
                result.FinalPDFRemotePath = _FinalPDFStorgeRemote + @"\" + FinalPDFPath.Name;
488
                result.OriginPDFName = OriginFileName;
489
                result.FinalPDFPath = FinalPDFPath.FullName;
490
                result.Error = "";
491
                result.Message = "";
481 492
            }
482 493
            catch (Exception ex)
483 494
            {
484 495
                SetNotice(FinalPDF.ID, "MarkFinalPDF Error : " + ex.Message);
485 496
            }
497

  
498
            return result;
486 499
        }
487 500
        #endregion
488 501

  

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)