개정판 a0341bef
플러그인 테스트 추가
컨버터 수정
Change-Id: Ied5c8a92c9e47e067795118b7b6a400cb232ba83
ConvertService/ServiceBase/PemssDocumentInfo/DocumentInfoProcess.cs | ||
---|---|---|
5 | 5 |
using System.Text; |
6 | 6 |
using System.Threading.Tasks; |
7 | 7 |
using Markus.Service.Convert.Plugin; |
8 |
using Markus.Service.Extensions; |
|
8 | 9 |
|
9 | 10 |
namespace PemssDocumentInfo |
10 | 11 |
{ |
... | ... | |
58 | 59 |
|
59 | 60 |
var documentInfo = pemssServiceClient.GetDocumentInfo(pID,dID); |
60 | 61 |
|
61 |
var docItems = entities.DOCUMENT_ITEM.Where(x => x.PROJECT_NO == pID && x.DOCUMENT_ID == dID); |
|
62 |
|
|
63 |
if (docItems.Count() > 0) |
|
62 |
if (documentInfo != null) |
|
64 | 63 |
{ |
65 |
var docitem = docItems.First(); |
|
64 |
var docItems = entities.DOCUMENT_ITEM.Where(x => x.PROJECT_NO == pID && x.DOCUMENT_ID == dID); |
|
65 |
|
|
66 |
if (docItems.Count() > 0) |
|
67 |
{ |
|
68 |
var docitem = docItems.First(); |
|
66 | 69 |
|
67 |
docitem.DOCUMENT_NAME = documentInfo.docName; |
|
68 |
docitem.REVISION = documentInfo.revision; |
|
69 |
docitem.DOCUMENT_NO = documentInfo.slipNo; |
|
70 |
docitem.ORIGINAL_FILE = convertItem.DOCUMENT_URL; |
|
70 |
docitem.DOCUMENT_NAME = documentInfo.docName;
|
|
71 |
docitem.REVISION = documentInfo.revision;
|
|
72 |
docitem.DOCUMENT_NO = documentInfo.slipNo;
|
|
73 |
docitem.ORIGINAL_FILE = convertItem.DOCUMENT_URL;
|
|
71 | 74 |
|
75 |
} |
|
76 |
else |
|
77 |
{ |
|
78 |
entities.DOCUMENT_ITEM.Add(new Markus.EntityModel.DOCUMENT_ITEM |
|
79 |
{ |
|
80 |
ID = new Guid().CreateUniqueGuid().ToString(), |
|
81 |
DOCUMENT_NO = documentInfo.slipNo, |
|
82 |
REVISION = documentInfo.revision, |
|
83 |
DOCUMENT_NAME = documentInfo.docName, |
|
84 |
GROUP_NO = documentInfo.slipNo, |
|
85 |
ORIGINAL_FILE = convertItem.DOCUMENT_URL, |
|
86 |
DOCUMENT_ID = dID, |
|
87 |
PROJECT_NO = pID |
|
88 |
}); |
|
89 |
} |
|
90 |
|
|
91 |
entities.SaveChanges(); |
|
92 |
result = true; |
|
72 | 93 |
} |
73 | 94 |
else |
74 | 95 |
{ |
75 |
entities.DOCUMENT_ITEM.Add(new Markus.EntityModel.DOCUMENT_ITEM |
|
76 |
{ |
|
77 |
DOCUMENT_NAME = documentInfo.docName, |
|
78 |
REVISION = documentInfo.revision, |
|
79 |
DOCUMENT_NO = documentInfo.slipNo, |
|
80 |
ORIGINAL_FILE = convertItem.DOCUMENT_URL |
|
81 |
}); |
|
96 |
this.Exception = $"PEMSS API GetDocumentInfo null pID : {pID} dID : {dID}"; |
|
82 | 97 |
} |
83 |
|
|
84 |
entities.SaveChanges(); |
|
85 | 98 |
} |
86 | 99 |
else |
87 | 100 |
{ |
... | ... | |
97 | 110 |
else |
98 | 111 |
{ |
99 | 112 |
this.Exception = "PEMSS_SERVICE SECTION Not Found"; |
100 |
return false; |
|
101 | 113 |
} |
102 | 114 |
} |
103 | 115 |
|
내보내기 Unified diff