개정판 fdfa126d
issue #00000 finalPDFService DL
Change-Id: I43e48d3a13bf1732d9b384cea97623f0e8c700be
KCOM_API/MarkusService.svc.cs | ||
---|---|---|
117 | 117 |
//_result = ConnectStringBuilder.DeepViewConnectionString().ToString(); |
118 | 118 |
//var _RunProjects = deepViewEntity.RUN_PROJECTS.Where(r => r.PROJECT_NO == projNumber && DateTime.Parse(r.RUN_DATETIME)<= DateTime.Now); |
119 | 119 |
//var _RunProjects = deepViewEntity.RUN_PROJECTS.Where(r => r.PROJECT_NO == projNumber); |
120 |
var _RunProjects = deepViewEntity.RUN_PROJECTS.Where(r => r.PROJECT_NO != null);
|
|
120 |
var _RunProjects = deepViewEntity.RUN_PROJECTS.Where(r => r.PROJECT_NO == prj_No).ToList();
|
|
121 | 121 |
|
122 |
if (_RunProjects.Count() > 0)
|
|
122 |
if (_RunProjects.Count() == 0)
|
|
123 | 123 |
{ |
124 |
_result = SendKcom(rev_No, document_No, document_Name, group_No, prj_No, document_Id, document_Url); |
|
125 |
} |
|
126 |
else |
|
127 |
{ |
|
128 |
_result = false.ToString(); |
|
124 |
deepViewEntity.RUN_PROJECTS.AddObject(new RUN_PROJECTS { PROJECT_NO = prj_No, IS_ACTIVITY = 1, PROJECT_NAME = "", RUN_DATETIME = DateTime.Today }); |
|
125 |
|
|
126 |
var items = deepViewEntity.PROPERTIES.Where(x => x.PROPERTY == "SAMPLEPRJ"); |
|
127 |
|
|
128 |
foreach (var item in items) |
|
129 |
{ |
|
130 |
deepViewEntity.PROPERTIES.AddObject(new PROPERTIES { TYPE = item.TYPE, PROPERTY = prj_No, VALUE = item.VALUE }); |
|
131 |
} |
|
132 |
|
|
133 |
deepViewEntity.SaveChanges(); |
|
129 | 134 |
} |
130 | 135 |
} |
136 |
|
|
137 |
_result = SendKcom(rev_No, document_No, document_Name, group_No, prj_No, document_Id, document_Url); |
|
131 | 138 |
} |
132 | 139 |
catch (Exception ex) |
133 | 140 |
{ |
134 | 141 |
logger.Error($"Conversion Web Service ConvertRun Error rev_No :{rev_No} document_No : {document_No} document_Name : {document_Name} group_No : {group_No} prj_No : {prj_No} document_Id : {document_Id} document_Url : {document_Url}", ex); |
135 |
_result = ex.Message.ToString();
|
|
142 |
_result = "Error";
|
|
136 | 143 |
} |
137 | 144 |
return _result; |
138 | 145 |
} |
... | ... | |
144 | 151 |
|
145 | 152 |
//string _id = GetGuid(0, GuidGenerator.GetUniqueGuid()).ToString(); |
146 | 153 |
string _id = shortGuid(); |
147 |
string _doc_id = ((UInt32)document_Id.GetHashCode()).ToString(); |
|
154 |
string _doc_id = document_Id;// ((UInt32)document_Id.GetHashCode()).ToString();
|
|
148 | 155 |
|
149 | 156 |
string sCIConnString = ConfigurationManager.ConnectionStrings["CIConnectionString"].ConnectionString; |
150 | 157 |
using (CIEntities _kcomEntity = new CIEntities(sCIConnString)) |
... | ... | |
153 | 160 |
{ |
154 | 161 |
group_No = "0"; |
155 | 162 |
} |
156 |
if (!document_Url.Contains("http%3a%2f%2f"))
|
|
157 |
{ |
|
158 |
document_Url = Base64Decode(document_Url); |
|
159 |
document_Url = System.Net.WebUtility.UrlEncode(document_Url); |
|
160 |
} |
|
161 |
document_Name = Base64DecodeFromStr(document_Name); |
|
163 |
//if (!document_Url.ToLower().Contains("http%3a%2f%2f"))
|
|
164 |
//{
|
|
165 |
// document_Url = Base64Decode(document_Url);
|
|
166 |
// document_Url = System.Net.WebUtility.UrlEncode(document_Url);
|
|
167 |
//}
|
|
168 |
//document_Name = Base64DecodeFromStr(document_Name);
|
|
162 | 169 |
|
163 | 170 |
var doc = _kcomEntity.DOCUMENT_ITEM.Where(d => d.PROJECT_NO == prj_No && d.ID == document_Id).FirstOrDefault(); |
164 | 171 |
if (doc != null) |
... | ... | |
187 | 194 |
|
188 | 195 |
_kcomEntity.SaveChanges(); |
189 | 196 |
|
190 |
string sConnString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; |
|
191 |
using (KCOMEntities _entity = new KCOMEntities(sConnString)) |
|
192 |
{ |
|
193 |
_entity.AddToCONVERTER_DOC(new CONVERTER_DOC |
|
194 |
{ |
|
195 |
ID = _id, |
|
196 |
CREATE_DATETIME = DateTime.Now, |
|
197 |
DOCUMENT_URL = document_Url, |
|
198 |
PROJECT_NO = prj_No, |
|
199 |
DOCUMENT_ID = _doc_id, |
|
200 |
}); |
|
201 |
|
|
202 |
_entity.SaveChanges(); |
|
203 |
} |
|
204 | 197 |
} |
205 | 198 |
|
199 |
string sConnString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; |
|
200 |
using (KCOMEntities _entity = new KCOMEntities(sConnString)) |
|
201 |
{ |
|
202 |
_entity.AddToCONVERTER_DOC(new CONVERTER_DOC |
|
203 |
{ |
|
204 |
ID = _id, |
|
205 |
CREATE_DATETIME = DateTime.Now, |
|
206 |
DOCUMENT_URL = document_Url, |
|
207 |
PROJECT_NO = prj_No, |
|
208 |
DOCUMENT_ID = _doc_id, |
|
209 |
}); |
|
210 |
|
|
211 |
_entity.SaveChanges(); |
|
212 |
} |
|
206 | 213 |
|
207 | 214 |
try |
208 | 215 |
{ |
... | ... | |
215 | 222 |
catch (Exception ex) |
216 | 223 |
{ |
217 | 224 |
logger.Error("Conversion Web Service SendKcom Error", ex); |
218 |
result = $"Markus V3 Connect Error {ex.Message}";
|
|
225 |
result = $"Markus V3 Connect Error {ex.ToString()}";
|
|
219 | 226 |
} |
220 | 227 |
|
221 | 228 |
|
내보내기 Unified diff