개정판 b2948d06
issue #00000 FinalPDF Result Link 업데이트 API 추가
Change-Id: I61608d9477c1e2e086bcb858fc8d8b1128a11e1e
KCOM_API/MarkusService.svc.cs | ||
---|---|---|
145 | 145 |
} |
146 | 146 |
|
147 | 147 |
|
148 |
[WebGet(UriTemplate = "SetFinalPDFUrl?prj_No={prj_No}&document_Id={document_Id}&document_Url={document_Url}", BodyStyle = WebMessageBodyStyle.Wrapped, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)] |
|
149 |
[OperationContract] |
|
150 |
public string SetFinalPDFUrl(string prj_No, string document_Id, string document_Url) |
|
151 |
{ |
|
152 |
string _result = null; |
|
153 |
try |
|
154 |
{ |
|
155 |
logger.Info($"SetFinalPDFUrl call prj_No : {prj_No} document_Id : {document_Id} document_Url : {document_Url}"); |
|
156 |
|
|
157 |
string sCIConnString = ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString; |
|
158 |
using (CIEntities _kcomEntity = new CIEntities(sCIConnString)) |
|
159 |
{ |
|
160 |
var doc = _kcomEntity.DOCUMENT_ITEM.Where(d => d.PROJECT_NO == prj_No && d.ID == document_Id).FirstOrDefault(); |
|
161 |
if (doc != null) |
|
162 |
{ |
|
163 |
doc.RESULT = document_Url; |
|
164 |
_kcomEntity.SaveChanges(); |
|
165 |
_result = true.ToString(); |
|
166 |
} |
|
167 |
else |
|
168 |
{ |
|
169 |
_result = $"prj_No : {prj_No} document_Id : {document_Id} document_Url : {document_Url} Not Found"; |
|
170 |
} |
|
171 |
} |
|
172 |
} |
|
173 |
catch (Exception ex) |
|
174 |
{ |
|
175 |
logger.Error($"SetFinalPDFUrl call prj_No : {prj_No} document_Id : {document_Id} document_Url : {document_Url}",ex); |
|
176 |
_result = "Error"; |
|
177 |
} |
|
178 |
return _result; |
|
179 |
} |
|
180 |
|
|
148 | 181 |
private string SendKcom(string rev_No, string document_No, string document_Name, string group_No, string prj_No, string document_Id, string document_Url) |
149 | 182 |
{ |
150 | 183 |
string result = false.ToString(); |
내보내기 Unified diff