markus / ConvertService / ServiceBase / Markus.Service.DataBase / ConvertDatabase.cs @ f333dcc2
이력 | 보기 | 이력해설 | 다운로드 (52.1 KB)
1 | ff4b1e6e | taeseongkim | using Markus.EntityModel; |
---|---|---|---|
2 | using Markus.Message; |
||
3 | 53c9637d | taeseongkim | using Markus.Service.Extensions; |
4 | using System; |
||
5 | using System.Collections.Generic; |
||
6 | using System.IO; |
||
7 | using System.Linq; |
||
8 | 2decfbdf | alzkakdixm | using System.Windows; |
9 | using System.Linq.Expressions; |
||
10 | using Markus.Service.Interface; |
||
11 | 05fd750b | alzkakdixm | using Markus.Service.DataBase.Data; |
12 | using Markus.Service.DataBase.Extensions; |
||
13 | |||
14 | 53c9637d | taeseongkim | |
15 | namespace Markus.Service.DataBase |
||
16 | { |
||
17 | public class ConvertDatabase : IDisposable |
||
18 | { |
||
19 | e6281033 | alzkakdixm | #region Constructor |
20 | /// <summary> |
||
21 | ///해당 프로젝트의 데이터베이스 연결 |
||
22 | /// </summary> |
||
23 | |||
24 | ff4b1e6e | taeseongkim | Markus.EntityModel.MarkusModel entities; |
25 | 53c9637d | taeseongkim | |
26 | public ConvertDatabase(string ConnectionString) |
||
27 | { |
||
28 | try |
||
29 | { |
||
30 | ff4b1e6e | taeseongkim | entities = new Markus.EntityModel.MarkusModel(ConnectionString); |
31 | 53c9637d | taeseongkim | } |
32 | catch (Exception ex) |
||
33 | { |
||
34 | System.Diagnostics.Debug.WriteLine(ex.ToString()); |
||
35 | 06f13e11 | taeseongkim | throw ex; |
36 | 53c9637d | taeseongkim | } |
37 | } |
||
38 | |||
39 | public void Dispose() |
||
40 | { |
||
41 | entities.Dispose(); |
||
42 | } |
||
43 | |||
44 | e6281033 | alzkakdixm | #endregion |
45 | |||
46 | #region DataBaseItemsModel Function |
||
47 | |||
48 | #region Get WaitConvertItems |
||
49 | |||
50 | 53c9637d | taeseongkim | /// <summary> |
51 | e6281033 | alzkakdixm | /// service에서 대기중이거나 오류인 아이템을 가져가서 컨버터 프로세스를 호출한다. |
52 | /// 컨버터 상태가 에러이거나 2보다 작은 경우 |
||
53 | /// UniqueKey는 각 데이터베이스의 문서 정보에서 유일한 키이며 컨버터저장에서 같은 폴더로의 저장을 방지 한다. |
||
54 | /// |
||
55 | 53c9637d | taeseongkim | /// </summary> |
56 | e6281033 | alzkakdixm | /// <param name="aliveItems"></param> |
57 | /// <param name="TakeCount"></param> |
||
58 | 53c9637d | taeseongkim | /// <returns></returns> |
59 | e6281033 | alzkakdixm | public IEnumerable<CONVERTER_DOC> GetWaitConvertItems(List<string> projectList, int TakeCount) |
60 | 53c9637d | taeseongkim | { |
61 | e6281033 | alzkakdixm | var convertWaitingItems = entities.CONVERTER_DOC.OrderBy(x => x.CREATE_DATETIME).Where( |
62 | x => |
||
63 | //projectList.Contains(x.PROJECT_NO) && x.RECONVERTER < 2 && |
||
64 | 1d79913e | taeseongkim | (x.RECONVERTER < 2 && (x.STATUS == (int)StatusCodeType.None || x.STATUS > (int)StatusCodeType.Completed)) |
65 | || (x.RECONVERTER == 2 && (x.STATUS == (int)StatusCodeType.None))) |
||
66 | e6281033 | alzkakdixm | .GroupBy(x => x.DOCUMENT_ID).Select(x => x.FirstOrDefault()) |
67 | .Take(TakeCount); |
||
68 | 53c9637d | taeseongkim | |
69 | e6281033 | alzkakdixm | return convertWaitingItems; |
70 | } |
||
71 | 53c9637d | taeseongkim | |
72 | e6281033 | alzkakdixm | #endregion |
73 | 53c9637d | taeseongkim | |
74 | e6281033 | alzkakdixm | #region Get FilterConvertItems |
75 | 53c9637d | taeseongkim | |
76 | e6281033 | alzkakdixm | /// <summary> |
77 | /// 상단 그리드 선택된 Status에 따라 DB에서 값 가져온다. |
||
78 | /// </summary> |
||
79 | 3bde451b | semi | public IEnumerable<Interface.ConvertItem> GetConvertProjects(int status,string ProjectNumberFilter, string UniqueKeyFilter, string Document_NameFilter, string Service_IDFilter, string Docuemnt_NOFilter, int? ReconverterFilter |
80 | b63dcfbb | semi | , string RevisionFilter) |
81 | { |
||
82 | List<Interface.ConvertItem> convertItems = new List<Interface.ConvertItem>(); |
||
83 | var query = from items in entities.CONVERTER_DOC |
||
84 | join documents in entities.DOCUMENT_ITEM on items.DOCUMENT_ID equals documents.DOCUMENT_ID into GroupItems |
||
85 | from subpet in GroupItems.DefaultIfEmpty() |
||
86 | where items.STATUS == status && |
||
87 | // |
||
88 | ( |
||
89 | items.PROJECT_NO.Contains(ProjectNumberFilter) |
||
90 | 3bde451b | semi | || subpet.DOCUMENT_NAME.Contains(Document_NameFilter) |
91 | b63dcfbb | semi | || items.SERVICE_ID.Contains(Service_IDFilter) |
92 | || subpet.ID.Contains(UniqueKeyFilter) |
||
93 | || subpet.DOCUMENT_NO.Contains(Docuemnt_NOFilter) |
||
94 | || items.RECONVERTER == ReconverterFilter |
||
95 | || subpet.REVISION.Contains(RevisionFilter) |
||
96 | ) |
||
97 | // |
||
98 | orderby items.CREATE_DATETIME descending |
||
99 | select new |
||
100 | { |
||
101 | ID = items.ID, |
||
102 | DOCUMENT_URL = items.DOCUMENT_URL, |
||
103 | RECONVERTER = items.RECONVERTER, |
||
104 | SERVICE_ID = items.SERVICE_ID, |
||
105 | STATUS = items.STATUS, |
||
106 | CREATE_DATETIME = items.CREATE_DATETIME, |
||
107 | START_DATETIME = items.START_DATETIME, |
||
108 | END_DATETIME = items.END_DATETIME, |
||
109 | TOTAL_PAGE = items.TOTAL_PAGE, |
||
110 | CURRENT_PAGE = items.CURRENT_PAGE, |
||
111 | EXCEPTION = items.EXCEPTION, |
||
112 | PROJECT_NO = items.PROJECT_NO, |
||
113 | DOCUMENT_ID = items.DOCUMENT_ID, |
||
114 | REVISION = subpet.REVISION, |
||
115 | DOCUMENT_NO = subpet.DOCUMENT_NO, |
||
116 | DOCUMENT_NAME = subpet.DOCUMENT_NAME, |
||
117 | GROUP_NO = subpet.GROUP_NO, |
||
118 | }; |
||
119 | |||
120 | 43e1d368 | taeseongkim | if (query.Count() > 0) |
121 | b63dcfbb | semi | { |
122 | foreach (var item in query) |
||
123 | { |
||
124 | Interface.ConvertItem convertitem = new Interface.ConvertItem(item.DOCUMENT_ID, item.PROJECT_NO, item.ID, item.DOCUMENT_URL) |
||
125 | { |
||
126 | |||
127 | ReConverter = item.RECONVERTER, |
||
128 | ServiceID = item.SERVICE_ID, |
||
129 | ConvertState = (StatusCodeType)item.STATUS, |
||
130 | CreateTime = item.CREATE_DATETIME, |
||
131 | 8c128693 | semi | // StartTime = (DateTime)item.START_DATETIME, |
132 | //EndTime = (DateTime)item.END_DATETIME, |
||
133 | b63dcfbb | semi | TotalPage = item.TOTAL_PAGE, |
134 | CurrentPageNo = item.CURRENT_PAGE, |
||
135 | Exception = item.EXCEPTION, |
||
136 | ConvertPath = GetConvertPath(item.PROJECT_NO, item.DOCUMENT_ID), |
||
137 | |||
138 | Revision = item.REVISION, |
||
139 | af0f18ee | taeseongkim | DocumentNo = item.DOCUMENT_NO, |
140 | DocumentName = item.DOCUMENT_NAME, |
||
141 | b63dcfbb | semi | GroupNo = item.GROUP_NO, |
142 | DocumentID = item.DOCUMENT_ID, |
||
143 | |||
144 | MarkusLink = "kcom://" + Markus.Service.DataBase.Extensions.MarkusAPI.CreateMarkusParam(item.PROJECT_NO, item.DOCUMENT_ID, "doftech") |
||
145 | }; |
||
146 | 8c128693 | semi | if(item.START_DATETIME == null) |
147 | { |
||
148 | convertitem.StartTime = null; |
||
149 | } |
||
150 | else |
||
151 | { |
||
152 | convertitem.StartTime = (DateTime)item.START_DATETIME; |
||
153 | } |
||
154 | if (item.END_DATETIME == null) |
||
155 | { |
||
156 | convertitem.EndTime = null; |
||
157 | } |
||
158 | else |
||
159 | { |
||
160 | convertitem.EndTime = (DateTime)item.END_DATETIME; |
||
161 | } |
||
162 | b63dcfbb | semi | convertItems.Add(convertitem); |
163 | } |
||
164 | } |
||
165 | return convertItems; |
||
166 | |||
167 | } |
||
168 | |||
169 | 3bde451b | semi | /// <summary>Final PDF |
170 | /// 상단 그리드 선택된 Status에 따라 DB에서 값 가져온다. |
||
171 | /// </summary> |
||
172 | public IEnumerable<Interface.ConvertItem> GetFinalPDFProjects(int status, string ProjectNumberFilter, string DocumentIDFIlter, string MarkupInfo_IDFilter, string DOCINFO_IDFilter, string Document_NameFilter, |
||
173 | string Docuemnt_NOFilter, string CreateUser_IDFilter) |
||
174 | { |
||
175 | var MarkupInfo_IDFilter_Int = 0; |
||
176 | if (MarkupInfo_IDFilter != null) |
||
177 | { |
||
178 | MarkupInfo_IDFilter_Int = int.Parse(MarkupInfo_IDFilter); |
||
179 | } |
||
180 | |||
181 | List<Interface.ConvertItem> convertItems = new List<Interface.ConvertItem>(); |
||
182 | var query = from items in entities.FINAL_PDF |
||
183 | join documents in entities.DOCUMENT_ITEM on items.DOCUMENT_ID equals documents.DOCUMENT_ID into GroupItems |
||
184 | from subpet in GroupItems.DefaultIfEmpty() |
||
185 | where items.STATUS == status && |
||
186 | // |
||
187 | ( |
||
188 | items.PROJECT_NO.Contains(ProjectNumberFilter) |
||
189 | || subpet.DOCUMENT_ID.Contains(DocumentIDFIlter) |
||
190 | || items.MARKUPINFO_ID == MarkupInfo_IDFilter_Int |
||
191 | || items.DOCINFO_ID.Contains(DOCINFO_IDFilter) |
||
192 | || subpet.DOCUMENT_NAME.Contains(Document_NameFilter) |
||
193 | || subpet.DOCUMENT_NO.Contains(Docuemnt_NOFilter) |
||
194 | || items.CREATE_USER_ID.Contains(CreateUser_IDFilter) |
||
195 | ) |
||
196 | // |
||
197 | orderby items.CREATE_DATETIME descending |
||
198 | select new |
||
199 | { |
||
200 | ID = items.ID, |
||
201 | PROJECT_NO = items.PROJECT_NO, |
||
202 | DOCINFO_ID = items.DOCINFO_ID, |
||
203 | MARKUPINFO_ID = items.MARKUPINFO_ID, |
||
204 | CREATE_USER_ID = items.CREATE_USER_ID, |
||
205 | CREATE_DATETIME = items.CREATE_DATETIME, |
||
206 | STATUS = items.STATUS, |
||
207 | TOTAL_PAGE = items.TOTAL_PAGE, |
||
208 | CURRENT_PAGE = items.CURRENT_PAGE, |
||
209 | EXCEPTION = items.EXCEPTION, |
||
210 | END_DATETIME = items.END_DATETIME, |
||
211 | START_DATETIME = items.START_DATETIME, |
||
212 | DOCUMENT_ID = items.DOCUMENT_ID, |
||
213 | DOCUMENT_URL = subpet.ORIGINAL_FILE, |
||
214 | |||
215 | REVISION = subpet.REVISION, |
||
216 | GROUP_NO = subpet.GROUP_NO, |
||
217 | RESULT_FILE = subpet.RESULT_FILE, |
||
218 | RESULT = subpet.RESULT, |
||
219 | |||
220 | |||
221 | DOCUMENT_NO = subpet.DOCUMENT_NO, |
||
222 | DOCUMENT_NAME = subpet.DOCUMENT_NAME |
||
223 | }; |
||
224 | |||
225 | if (query.Count() > 0)//세미 |
||
226 | { |
||
227 | foreach (var item in query) |
||
228 | { |
||
229 | Interface.ConvertItem convertitem = new Interface.ConvertItem(item.DOCUMENT_ID, item.PROJECT_NO, item.ID, item.DOCUMENT_URL) |
||
230 | { |
||
231 | ConvertID = item.ID, |
||
232 | DocInfo_ID = item.DOCINFO_ID, |
||
233 | MarkupInfo_ID = item.MARKUPINFO_ID.ToString(), |
||
234 | Create_User_ID = item.CREATE_USER_ID, |
||
235 | CreateTime = item.CREATE_DATETIME, |
||
236 | ConvertState = (StatusCodeType)item.STATUS, |
||
237 | TotalPage = item.TOTAL_PAGE, |
||
238 | CurrentPageNo = item.CURRENT_PAGE, |
||
239 | Exception = item.EXCEPTION, |
||
240 | EndTime = (DateTime)item.END_DATETIME, |
||
241 | StartTime = (DateTime)item.START_DATETIME, |
||
242 | af0f18ee | taeseongkim | DocumentNo = item.DOCUMENT_NO, |
243 | DocumentName = item.DOCUMENT_NAME, |
||
244 | 3bde451b | semi | GroupNo = item.GROUP_NO, |
245 | Revision = item.REVISION, |
||
246 | |||
247 | ConvertPath = GetConvertPath(item.PROJECT_NO, item.DOCUMENT_ID), |
||
248 | MarkusLink = "kcom://" + Markus.Service.DataBase.Extensions.MarkusAPI.CreateMarkusParam(item.PROJECT_NO, item.DOCUMENT_ID, "doftech") |
||
249 | }; |
||
250 | |||
251 | convertItems.Add(convertitem); |
||
252 | } |
||
253 | } |
||
254 | return convertItems; |
||
255 | |||
256 | } |
||
257 | |||
258 | |||
259 | e6281033 | alzkakdixm | public IEnumerable<Interface.ConvertItem> GetConvertProjects(int status) |
260 | { |
||
261 | List<Interface.ConvertItem> convertItems = new List<Interface.ConvertItem>(); |
||
262 | var query = from items in entities.CONVERTER_DOC |
||
263 | join documents in entities.DOCUMENT_ITEM on items.DOCUMENT_ID equals documents.DOCUMENT_ID into GroupItems |
||
264 | from subpet in GroupItems.DefaultIfEmpty() |
||
265 | where items.STATUS == status |
||
266 | b63dcfbb | semi | orderby items.CREATE_DATETIME descending |
267 | 5a954acc | semi | select new |
268 | { |
||
269 | ID = items.ID, |
||
270 | DOCUMENT_URL = items.DOCUMENT_URL, |
||
271 | RECONVERTER = items.RECONVERTER, |
||
272 | SERVICE_ID = items.SERVICE_ID, |
||
273 | STATUS = items.STATUS, |
||
274 | CREATE_DATETIME = items.CREATE_DATETIME, |
||
275 | START_DATETIME = items.START_DATETIME, |
||
276 | END_DATETIME = items.END_DATETIME, |
||
277 | TOTAL_PAGE = items.TOTAL_PAGE, |
||
278 | CURRENT_PAGE = items.CURRENT_PAGE, |
||
279 | EXCEPTION = items.EXCEPTION, |
||
280 | PROJECT_NO = items.PROJECT_NO, |
||
281 | DOCUMENT_ID = items.DOCUMENT_ID, |
||
282 | REVISION = subpet.REVISION, |
||
283 | DOCUMENT_NO = subpet.DOCUMENT_NO, |
||
284 | DOCUMENT_NAME = subpet.DOCUMENT_NAME, |
||
285 | 3bde451b | semi | GROUP_NO = subpet.GROUP_NO |
286 | 5a954acc | semi | }; |
287 | 53c9637d | taeseongkim | |
288 | e6281033 | alzkakdixm | if (query.Count() > 0)//세미 |
289 | 53c9637d | taeseongkim | { |
290 | e6281033 | alzkakdixm | foreach (var item in query) |
291 | 53c9637d | taeseongkim | { |
292 | e6281033 | alzkakdixm | Interface.ConvertItem convertitem = new Interface.ConvertItem(item.DOCUMENT_ID, item.PROJECT_NO, item.ID, item.DOCUMENT_URL) |
293 | 53c9637d | taeseongkim | { |
294 | |||
295 | e6281033 | alzkakdixm | ReConverter = item.RECONVERTER, |
296 | ServiceID = item.SERVICE_ID, |
||
297 | ConvertState = (StatusCodeType)item.STATUS, |
||
298 | CreateTime = item.CREATE_DATETIME, |
||
299 | 344ac7ed | alzkakdixm | StartTime = (DateTime)item.START_DATETIME, |
300 | EndTime = (DateTime)item.END_DATETIME, |
||
301 | e6281033 | alzkakdixm | TotalPage = item.TOTAL_PAGE, |
302 | CurrentPageNo = item.CURRENT_PAGE, |
||
303 | Exception = item.EXCEPTION, |
||
304 | e78f0871 | alzkakdixm | ConvertPath = GetConvertPath(item.PROJECT_NO, item.DOCUMENT_ID), |
305 | 53c9637d | taeseongkim | |
306 | e6281033 | alzkakdixm | Revision = item.REVISION, |
307 | af0f18ee | taeseongkim | DocumentNo = item.DOCUMENT_NO, |
308 | DocumentName = item.DOCUMENT_NAME, |
||
309 | e6281033 | alzkakdixm | GroupNo = item.GROUP_NO, |
310 | 05fd750b | alzkakdixm | DocumentID = item.DOCUMENT_ID, |
311 | |||
312 | 3bde451b | semi | |
313 | e78f0871 | alzkakdixm | MarkusLink = "kcom://" + Markus.Service.DataBase.Extensions.MarkusAPI.CreateMarkusParam(item.PROJECT_NO, item.DOCUMENT_ID, "doftech") |
314 | e6281033 | alzkakdixm | }; |
315 | convertItems.Add(convertitem); |
||
316 | 53c9637d | taeseongkim | } |
317 | } |
||
318 | e6281033 | alzkakdixm | return convertItems; |
319 | 53c9637d | taeseongkim | |
320 | e6281033 | alzkakdixm | } |
321 | 53c9637d | taeseongkim | |
322 | 218e5002 | semi | public string[] GetSearchConvertPathAndMarkus(string PROJECT_NO, string DOCUMENT_ID) |
323 | { |
||
324 | string[] ConvertPath = new string[2]; |
||
325 | ConvertPath[0] = GetConvertPath(PROJECT_NO, DOCUMENT_ID); |
||
326 | ConvertPath[1] = "kcom://" + Markus.Service.DataBase.Extensions.MarkusAPI.CreateMarkusParam(PROJECT_NO, DOCUMENT_ID, "doftech"); |
||
327 | |||
328 | return ConvertPath; |
||
329 | } |
||
330 | |||
331 | e6281033 | alzkakdixm | #endregion |
332 | 53c9637d | taeseongkim | |
333 | e6281033 | alzkakdixm | #region Update RealDataSelect |
334 | 53c9637d | taeseongkim | |
335 | /// <summary> |
||
336 | e6281033 | alzkakdixm | /// 상단 그리드에서 선택된 RealDataSelect |
337 | /// 용도: 중앙그리드 Items Update |
||
338 | 53c9637d | taeseongkim | /// </summary> |
339 | 3bde451b | semi | |
340 | |||
341 | public IEnumerable<Interface.ConvertItem> GetConvertFinalPDFProjects(System.Collections.ObjectModel.ObservableCollection<Interface.ConvertItem> selectedConvert) |
||
342 | { |
||
343 | List<Interface.ConvertItem> StatusKeep = new List<Interface.ConvertItem>(); |
||
344 | |||
345 | List<Interface.ConvertItem> convertItems = new List<Interface.ConvertItem>(); |
||
346 | |||
347 | foreach (var selectedConvertItem in selectedConvert) |
||
348 | { |
||
349 | var query = from items in entities.FINAL_PDF //세미 |
||
350 | join documents in entities.DOCUMENT_ITEM on items.DOCUMENT_ID equals documents.DOCUMENT_ID into GroupItems |
||
351 | from subpet in GroupItems.DefaultIfEmpty() |
||
352 | where items.PROJECT_NO == selectedConvertItem.ProjectNumber && items.ID == selectedConvertItem.ConvertID |
||
353 | select new |
||
354 | { |
||
355 | ID = items.ID, |
||
356 | PROJECT_NO = items.PROJECT_NO, |
||
357 | DOCINFO_ID = items.DOCINFO_ID, |
||
358 | MARKUPINFO_ID = items.MARKUPINFO_ID, |
||
359 | CREATE_USER_ID = items.CREATE_USER_ID, |
||
360 | CREATE_DATETIME = items.CREATE_DATETIME, |
||
361 | STATUS = items.STATUS, |
||
362 | TOTAL_PAGE = items.TOTAL_PAGE, |
||
363 | CURRENT_PAGE = items.CURRENT_PAGE, |
||
364 | EXCEPTION = items.EXCEPTION, |
||
365 | END_DATETIME = items.END_DATETIME, |
||
366 | START_DATETIME = items.START_DATETIME, |
||
367 | DOCUMENT_ID = items.DOCUMENT_ID, |
||
368 | |||
369 | DOCUMENT_URL = subpet.ORIGINAL_FILE, |
||
370 | DOCUMENT_NO = subpet.DOCUMENT_NO, |
||
371 | DOCUMENT_NAME = subpet.DOCUMENT_NAME |
||
372 | }; |
||
373 | |||
374 | |||
375 | if (query.Count() > 0)//세미 |
||
376 | { |
||
377 | foreach (var item in query) |
||
378 | { |
||
379 | Interface.ConvertItem convertitem = new Interface.ConvertItem(item.DOCUMENT_ID, item.PROJECT_NO, item.ID, item.DOCUMENT_URL) |
||
380 | { |
||
381 | |||
382 | DocInfo_ID = item.DOCINFO_ID, |
||
383 | MarkupInfo_ID = item.MARKUPINFO_ID.ToString(), |
||
384 | Create_User_ID = item.CREATE_USER_ID, |
||
385 | CreateTime = item.CREATE_DATETIME, |
||
386 | ConvertState = (StatusCodeType)item.STATUS, |
||
387 | TotalPage = item.TOTAL_PAGE, |
||
388 | CurrentPageNo = item.CURRENT_PAGE, |
||
389 | Exception = item.EXCEPTION, |
||
390 | EndTime = (DateTime)item.END_DATETIME, |
||
391 | StartTime = (DateTime)item.START_DATETIME, |
||
392 | af0f18ee | taeseongkim | DocumentNo = item.DOCUMENT_NO, |
393 | DocumentName = item.DOCUMENT_NAME, |
||
394 | 3bde451b | semi | |
395 | ConvertPath = GetConvertPath(item.PROJECT_NO, item.DOCUMENT_ID), |
||
396 | MarkusLink = "kcom://" + Markus.Service.DataBase.Extensions.MarkusAPI.CreateMarkusParam(item.PROJECT_NO, item.DOCUMENT_ID, "doftech") |
||
397 | }; |
||
398 | |||
399 | StatusKeep.Add(convertitem); |
||
400 | |||
401 | } |
||
402 | } |
||
403 | } |
||
404 | return StatusKeep; |
||
405 | } |
||
406 | |||
407 | |||
408 | e6281033 | alzkakdixm | public IEnumerable<Interface.ConvertItem> GetConvertProjects(System.Collections.ObjectModel.ObservableCollection<Interface.ConvertItem> selectedConvert) |
409 | 53c9637d | taeseongkim | { |
410 | e6281033 | alzkakdixm | List<Interface.ConvertItem> StatusKeep = new List<Interface.ConvertItem>(); |
411 | 53c9637d | taeseongkim | |
412 | e6281033 | alzkakdixm | List<Interface.ConvertItem> convertItems = new List<Interface.ConvertItem>(); |
413 | 53c9637d | taeseongkim | |
414 | e6281033 | alzkakdixm | foreach (var selectedConvertItem in selectedConvert) |
415 | 53c9637d | taeseongkim | { |
416 | e6281033 | alzkakdixm | var query = from items in entities.CONVERTER_DOC //세미 |
417 | join documents in entities.DOCUMENT_ITEM on items.DOCUMENT_ID equals documents.DOCUMENT_ID into GroupItems |
||
418 | from subpet in GroupItems.DefaultIfEmpty() |
||
419 | where items.PROJECT_NO == selectedConvertItem.ProjectNumber && items.ID == selectedConvertItem.ConvertID |
||
420 | select new |
||
421 | { |
||
422 | ID = items.ID, |
||
423 | DOCUMENT_URL = items.DOCUMENT_URL, |
||
424 | RECONVERTER = items.RECONVERTER, |
||
425 | SERVICE_ID = items.SERVICE_ID, |
||
426 | STATUS = items.STATUS, |
||
427 | CREATE_DATETIME = items.CREATE_DATETIME, |
||
428 | 344ac7ed | alzkakdixm | START_DATETIME = items.START_DATETIME, |
429 | END_DATETIME = items.END_DATETIME, |
||
430 | e6281033 | alzkakdixm | TOTAL_PAGE = items.TOTAL_PAGE, |
431 | CURRENT_PAGE = items.CURRENT_PAGE, |
||
432 | EXCEPTION = items.EXCEPTION, |
||
433 | PROJECT_NO = items.PROJECT_NO, |
||
434 | DOCUMENT_ID = items.DOCUMENT_ID, |
||
435 | REVISION = subpet.REVISION, |
||
436 | DOCUMENT_NO = subpet.DOCUMENT_NO, |
||
437 | DOCUMENT_NAME = subpet.DOCUMENT_NAME, |
||
438 | GROUP_NO = subpet.GROUP_NO |
||
439 | }; |
||
440 | 53c9637d | taeseongkim | |
441 | 41fa3d98 | djkim | |
442 | e6281033 | alzkakdixm | if (query.Count() > 0)//세미 |
443 | 53c9637d | taeseongkim | { |
444 | e6281033 | alzkakdixm | foreach (var item in query) |
445 | 41fa3d98 | djkim | { |
446 | e6281033 | alzkakdixm | Interface.ConvertItem convertitem = new Interface.ConvertItem(item.DOCUMENT_ID, item.PROJECT_NO, item.ID, item.DOCUMENT_URL) |
447 | { |
||
448 | 53c9637d | taeseongkim | |
449 | e6281033 | alzkakdixm | ReConverter = item.RECONVERTER, |
450 | ServiceID = item.SERVICE_ID, |
||
451 | ConvertState = (StatusCodeType)item.STATUS, |
||
452 | CreateTime = item.CREATE_DATETIME, |
||
453 | 344ac7ed | alzkakdixm | StartTime = item.START_DATETIME, |
454 | EndTime = item.END_DATETIME, |
||
455 | e6281033 | alzkakdixm | TotalPage = item.TOTAL_PAGE, |
456 | CurrentPageNo = item.CURRENT_PAGE, |
||
457 | Exception = item.EXCEPTION, |
||
458 | ConvertPath = GetConvertPath(item.PROJECT_NO, item.DOCUMENT_ID), |
||
459 | 53c9637d | taeseongkim | |
460 | e6281033 | alzkakdixm | Revision = item.REVISION, |
461 | af0f18ee | taeseongkim | DocumentNo = item.DOCUMENT_NO, |
462 | DocumentName = item.DOCUMENT_NAME, |
||
463 | 05fd750b | alzkakdixm | GroupNo = item.GROUP_NO, |
464 | |||
465 | e78f0871 | alzkakdixm | MarkusLink = "kcom://" + MarkusAPI.CreateMarkusParam(item.PROJECT_NO, item.DOCUMENT_ID, "doftech") |
466 | e6281033 | alzkakdixm | }; |
467 | 53c9637d | taeseongkim | |
468 | e6281033 | alzkakdixm | StatusKeep.Add(convertitem); |
469 | 53c9637d | taeseongkim | |
470 | e6281033 | alzkakdixm | } |
471 | } |
||
472 | } |
||
473 | return StatusKeep; |
||
474 | 0157b158 | taeseongkim | } |
475 | 53c9637d | taeseongkim | |
476 | e6281033 | alzkakdixm | #endregion |
477 | 53c9637d | taeseongkim | |
478 | e6281033 | alzkakdixm | #region Data Convert |
479 | 53c9637d | taeseongkim | |
480 | e6281033 | alzkakdixm | /// <summary> |
481 | /// 상단 그리드에서 선택된 Convert 버튼 |
||
482 | /// 용도: 중앙 그리드로 Convert된 row 값 저장 하기 위해서 입니다. |
||
483 | /// </summary> |
||
484 | 3bde451b | semi | |
485 | public IEnumerable<Interface.ConvertItem> GetConvertFinalPDFProjects(Markus.Service.Interface.ConvertItem selectedConvert) |
||
486 | { |
||
487 | List<Interface.ConvertItem> StatusKeep = new List<Interface.ConvertItem>(); |
||
488 | |||
489 | |||
490 | System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); |
||
491 | |||
492 | stopwatch.Start(); |
||
493 | |||
494 | |||
495 | List<Interface.ConvertItem> convertItems = new List<Interface.ConvertItem>();//디비 다 조인 후 조건 비교 후 그리드 출력 |
||
496 | var query = from items in entities.FINAL_PDF //세미 |
||
497 | join documents in entities.DOCUMENT_ITEM on items.DOCUMENT_ID equals documents.DOCUMENT_ID into GroupItems |
||
498 | from subpet in GroupItems.DefaultIfEmpty() |
||
499 | where items.PROJECT_NO == selectedConvert.ProjectNumber && items.DOCUMENT_ID == selectedConvert.DocumentID |
||
500 | orderby items.CREATE_DATETIME descending |
||
501 | select new |
||
502 | { |
||
503 | ID = items.ID, |
||
504 | PROJECT_NO = items.PROJECT_NO, |
||
505 | DOCINFO_ID = items.DOCINFO_ID, |
||
506 | MARKUPINFO_ID = items.MARKUPINFO_ID, |
||
507 | CREATE_USER_ID = items.CREATE_USER_ID, |
||
508 | CREATE_DATETIME = items.CREATE_DATETIME, |
||
509 | STATUS = items.STATUS, |
||
510 | TOTAL_PAGE = items.TOTAL_PAGE, |
||
511 | CURRENT_PAGE = items.CURRENT_PAGE, |
||
512 | EXCEPTION = items.EXCEPTION, |
||
513 | END_DATETIME = items.END_DATETIME, |
||
514 | START_DATETIME = items.START_DATETIME, |
||
515 | DOCUMENT_ID = items.DOCUMENT_ID, |
||
516 | |||
517 | DOCUMENT_URL = subpet.ORIGINAL_FILE, |
||
518 | DOCUMENT_NO = subpet.DOCUMENT_NO, |
||
519 | DOCUMENT_NAME = subpet.DOCUMENT_NAME |
||
520 | }; |
||
521 | |||
522 | if (query.Count() > 0)//세미 |
||
523 | { |
||
524 | foreach (var item in query) |
||
525 | { |
||
526 | Interface.ConvertItem convertitem = new Interface.ConvertItem(item.DOCUMENT_ID, item.PROJECT_NO, item.ID, item.DOCUMENT_URL) |
||
527 | { |
||
528 | |||
529 | DocInfo_ID = item.DOCINFO_ID, |
||
530 | MarkupInfo_ID = item.MARKUPINFO_ID.ToString(), |
||
531 | Create_User_ID = item.CREATE_USER_ID, |
||
532 | CreateTime = item.CREATE_DATETIME, |
||
533 | ConvertState = (StatusCodeType)item.STATUS, |
||
534 | TotalPage = item.TOTAL_PAGE, |
||
535 | CurrentPageNo = item.CURRENT_PAGE, |
||
536 | Exception = item.EXCEPTION, |
||
537 | EndTime = (DateTime)item.END_DATETIME, |
||
538 | StartTime = (DateTime)item.START_DATETIME, |
||
539 | af0f18ee | taeseongkim | DocumentNo = item.DOCUMENT_NO, |
540 | DocumentName = item.DOCUMENT_NAME, |
||
541 | 3bde451b | semi | |
542 | ConvertPath = GetConvertPath(item.PROJECT_NO, item.DOCUMENT_ID), |
||
543 | MarkusLink = "kcom://" + Markus.Service.DataBase.Extensions.MarkusAPI.CreateMarkusParam(item.PROJECT_NO, item.DOCUMENT_ID, "doftech") |
||
544 | }; |
||
545 | StatusKeep.Add(convertitem); |
||
546 | } |
||
547 | } |
||
548 | System.Diagnostics.Debug.WriteLine(new TimeSpan(stopwatch.ElapsedTicks).ToString()); |
||
549 | return StatusKeep; |
||
550 | |||
551 | } |
||
552 | |||
553 | e6281033 | alzkakdixm | public IEnumerable<Interface.ConvertItem> GetConvertProjects(Markus.Service.Interface.ConvertItem selectedConvert) |
554 | 53c9637d | taeseongkim | { |
555 | e6281033 | alzkakdixm | List<Interface.ConvertItem> StatusKeep = new List<Interface.ConvertItem>(); |
556 | |||
557 | |||
558 | System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); |
||
559 | |||
560 | stopwatch.Start(); |
||
561 | |||
562 | |||
563 | List<Interface.ConvertItem> convertItems = new List<Interface.ConvertItem>();//디비 다 조인 후 조건 비교 후 그리드 출력 |
||
564 | var query = from items in entities.CONVERTER_DOC //세미 |
||
565 | join documents in entities.DOCUMENT_ITEM on items.DOCUMENT_ID equals documents.DOCUMENT_ID into GroupItems |
||
566 | from subpet in GroupItems.DefaultIfEmpty() |
||
567 | where items.PROJECT_NO == selectedConvert.ProjectNumber && items.DOCUMENT_ID == selectedConvert.DocumentID |
||
568 | orderby items.CREATE_DATETIME descending |
||
569 | select new |
||
570 | { |
||
571 | ID = items.ID, |
||
572 | DOCUMENT_URL = items.DOCUMENT_URL, |
||
573 | RECONVERTER = items.RECONVERTER, |
||
574 | SERVICE_ID = items.SERVICE_ID, |
||
575 | STATUS = items.STATUS, |
||
576 | CREATE_DATETIME = items.CREATE_DATETIME, |
||
577 | 344ac7ed | alzkakdixm | START_DATETIME = items.START_DATETIME, |
578 | END_DATETIME = items.END_DATETIME, |
||
579 | e6281033 | alzkakdixm | TOTAL_PAGE = items.TOTAL_PAGE, |
580 | CURRENT_PAGE = items.CURRENT_PAGE, |
||
581 | EXCEPTION = items.EXCEPTION, |
||
582 | PROJECT_NO = items.PROJECT_NO, |
||
583 | DOCUMENT_ID = items.DOCUMENT_ID, |
||
584 | REVISION = subpet.REVISION, |
||
585 | DOCUMENT_NO = subpet.DOCUMENT_NO, |
||
586 | DOCUMENT_NAME = subpet.DOCUMENT_NAME, |
||
587 | GROUP_NO = subpet.GROUP_NO |
||
588 | }; |
||
589 | |||
590 | if (query.Count() > 0)//세미 |
||
591 | 53c9637d | taeseongkim | { |
592 | e6281033 | alzkakdixm | foreach (var item in query) |
593 | { |
||
594 | Interface.ConvertItem convertitem = new Interface.ConvertItem(item.DOCUMENT_ID, item.PROJECT_NO, item.ID, item.DOCUMENT_URL) |
||
595 | { |
||
596 | |||
597 | ReConverter = item.RECONVERTER, |
||
598 | ServiceID = item.SERVICE_ID, |
||
599 | ConvertState = (StatusCodeType)item.STATUS, |
||
600 | CreateTime = item.CREATE_DATETIME, |
||
601 | 344ac7ed | alzkakdixm | StartTime = item.START_DATETIME, |
602 | EndTime = item.END_DATETIME, |
||
603 | e6281033 | alzkakdixm | TotalPage = item.TOTAL_PAGE, |
604 | CurrentPageNo = item.CURRENT_PAGE, |
||
605 | Exception = item.EXCEPTION, |
||
606 | ConvertPath = GetConvertPath(item.PROJECT_NO, item.DOCUMENT_ID), |
||
607 | Revision = item.REVISION, |
||
608 | af0f18ee | taeseongkim | DocumentNo = item.DOCUMENT_NO, |
609 | DocumentName = item.DOCUMENT_NAME, |
||
610 | 05fd750b | alzkakdixm | GroupNo = item.GROUP_NO, |
611 | |||
612 | e78f0871 | alzkakdixm | MarkusLink = "kcom://" + Markus.Service.DataBase.Extensions.MarkusAPI.CreateMarkusParam(item.PROJECT_NO, item.DOCUMENT_ID, "doftech") |
613 | e6281033 | alzkakdixm | }; |
614 | StatusKeep.Add(convertitem); |
||
615 | } |
||
616 | 53c9637d | taeseongkim | } |
617 | e6281033 | alzkakdixm | System.Diagnostics.Debug.WriteLine(new TimeSpan(stopwatch.ElapsedTicks).ToString()); |
618 | return StatusKeep; |
||
619 | 53c9637d | taeseongkim | |
620 | } |
||
621 | |||
622 | 3bde451b | semi | |
623 | e6281033 | alzkakdixm | #endregion |
624 | 53c9637d | taeseongkim | |
625 | e6281033 | alzkakdixm | #region SetCleanUpItem |
626 | 53c9637d | taeseongkim | /// <summary> |
627 | /// 오류나 wait으로 남아 있는 데이터베이스의 Item을 StatusCodeType.None으로 복구 |
||
628 | /// </summary> |
||
629 | 2bbea412 | taeseongkim | /// <param name="convertID">StatusCodeType을 변경하고자 하는 ConvertItem의 ID</param> |
630 | /// <param name="ReConvert">ReConvert가 2이면 다시 Convert를 시도 안하기 때문에 기존 값으로 유지 하고 계속 시도 할수 있도록 0을 주는 경우가 있다.</param> |
||
631 | 53c9637d | taeseongkim | /// <returns></returns> |
632 | 2decfbdf | alzkakdixm | /// |
633 | 3bde451b | semi | public int SetCleanUpFinalPDFItem(ConvertItem _ConvertItem) |
634 | 53c9637d | taeseongkim | { |
635 | int result = 0; |
||
636 | |||
637 | 3bde451b | semi | var items = entities.FINAL_PDF.Where(x => x.ID == _ConvertItem.ConvertID); |
638 | 53c9637d | taeseongkim | |
639 | result = items.Count(); |
||
640 | |||
641 | if (items.Count() > 0) |
||
642 | { |
||
643 | 0157b158 | taeseongkim | var item = items.First(); |
644 | |||
645 | 3bde451b | semi | //item.RECONVERTER = item.RECONVERTER - _ConvertItem.ReConverter; |
646 | 508debb1 | taeseongkim | |
647 | e6281033 | alzkakdixm | item.CREATE_DATETIME = DateTime.Now; |
648 | item.STATUS = (int)StatusCodeType.None; |
||
649 | 508debb1 | taeseongkim | item.END_DATETIME = null; |
650 | 53c9637d | taeseongkim | |
651 | 43e1d368 | taeseongkim | |
652 | var waiter = entities.SaveChangesAsync().GetAwaiter(); |
||
653 | result = waiter.GetResult(); |
||
654 | 53c9637d | taeseongkim | } |
655 | |||
656 | return result; |
||
657 | } |
||
658 | 2decfbdf | alzkakdixm | |
659 | 3bde451b | semi | //public int SetCleanUpItem(ConvertItem _ConvertItem) |
660 | //{ |
||
661 | // int result = 0; |
||
662 | |||
663 | // var items = entities.CONVERTER_DOC.Where(x => x.ID == _ConvertItem.ConvertID); |
||
664 | |||
665 | // result = items.Count(); |
||
666 | |||
667 | // if (items.Count() > 0) |
||
668 | // { |
||
669 | // var item = items.First(); |
||
670 | |||
671 | // item.RECONVERTER = item.RECONVERTER - _ConvertItem.ReConverter; |
||
672 | |||
673 | // item.CREATE_DATETIME = DateTime.Now; |
||
674 | // item.STATUS = (int)StatusCodeType.None; |
||
675 | // item.END_DATETIME = null; |
||
676 | |||
677 | // result = entities.SaveChanges(); |
||
678 | // } |
||
679 | |||
680 | // return result; |
||
681 | //} |
||
682 | |||
683 | 508debb1 | taeseongkim | public int SetCleanUpItem(string convertID, int ReConvert) |
684 | { |
||
685 | int result = 0; |
||
686 | |||
687 | var items = entities.CONVERTER_DOC.Where(x => x.ID == convertID); |
||
688 | |||
689 | result = items.Count(); |
||
690 | |||
691 | if (items.Count() > 0) |
||
692 | { |
||
693 | var item = items.First(); |
||
694 | |||
695 | item.RECONVERTER = item.RECONVERTER + ReConvert; |
||
696 | item.CREATE_DATETIME = DateTime.Now; |
||
697 | //item.START_DATETIME = null; |
||
698 | item.END_DATETIME = null; |
||
699 | item.STATUS = (int)StatusCodeType.None; |
||
700 | |||
701 | 43e1d368 | taeseongkim | var waiter = entities.SaveChangesAsync().GetAwaiter(); |
702 | result = waiter.GetResult(); |
||
703 | 508debb1 | taeseongkim | } |
704 | |||
705 | return result; |
||
706 | } |
||
707 | e6281033 | alzkakdixm | #endregion |
708 | |||
709 | #region Convert Path |
||
710 | |||
711 | private string GetConvertPath(string ProjectNo, string DocumentID) |
||
712 | { |
||
713 | try |
||
714 | { |
||
715 | 1d79913e | taeseongkim | #if XI_C_AND_A |
716 | 43e1d368 | taeseongkim | return Path.Combine(BaseStorage(ProjectNo), ProjectNo + "_Tile",DocumentID.Substring(0, 5).ToString(), DocumentID); |
717 | 1d79913e | taeseongkim | #else |
718 | return Path.Combine(BaseStorage(ProjectNo), ProjectNo + "_Tile", (System.Convert.ToInt64(DocumentID) / 100).ToString(), DocumentID); |
||
719 | b4a1c7ff | taeseongkim | #endif |
720 | e6281033 | alzkakdixm | } |
721 | catch (Exception) |
||
722 | { |
||
723 | throw new Exception("GetConvertPath Error"); |
||
724 | } |
||
725 | 2decfbdf | alzkakdixm | |
726 | e6281033 | alzkakdixm | } |
727 | 2decfbdf | alzkakdixm | |
728 | e6281033 | alzkakdixm | private string BaseStorage(string ProjectNo) |
729 | { |
||
730 | string result = ""; |
||
731 | 2decfbdf | alzkakdixm | |
732 | e6281033 | alzkakdixm | var properties = entities.PROPERTIES.Where(f => f.PROPERTY == ProjectNo && f.TYPE == PROPERTIES_DEFINE.TILE_SOURCE_STORAGE); |
733 | 2decfbdf | alzkakdixm | |
734 | e6281033 | alzkakdixm | if (properties.Count() > 0) |
735 | { |
||
736 | result = properties.First().VALUE; |
||
737 | } |
||
738 | else |
||
739 | { |
||
740 | throw new Exception($"Project {ProjectNo} BaseStorage Not Setting."); |
||
741 | } |
||
742 | 2decfbdf | alzkakdixm | |
743 | e6281033 | alzkakdixm | return result; |
744 | } |
||
745 | 2decfbdf | alzkakdixm | |
746 | e6281033 | alzkakdixm | #endregion |
747 | 53c9637d | taeseongkim | |
748 | e6281033 | alzkakdixm | #region Remove |
749 | 5d863c06 | taeseongkim | |
750 | /// <summary> |
||
751 | /// Item 삭제 |
||
752 | /// </summary> |
||
753 | /// <returns></returns> |
||
754 | 3bde451b | semi | /// |
755 | |||
756 | public int RemoveFinalPDFItem(string convertID) |
||
757 | { |
||
758 | int result = 0; |
||
759 | |||
760 | var items = entities.FINAL_PDF.Where(x => x.ID == convertID); |
||
761 | |||
762 | if (items.Count() > 0) |
||
763 | { |
||
764 | FINAL_PDF item = items.First(); |
||
765 | entities.FINAL_PDF.Remove(item); |
||
766 | |||
767 | 43e1d368 | taeseongkim | |
768 | var waiter = entities.SaveChangesAsync().GetAwaiter(); |
||
769 | result = waiter.GetResult(); |
||
770 | 3bde451b | semi | } |
771 | |||
772 | return result; |
||
773 | } |
||
774 | |||
775 | 5d863c06 | taeseongkim | public int RemoveItem(string convertID) |
776 | { |
||
777 | int result = 0; |
||
778 | |||
779 | var items = entities.CONVERTER_DOC.Where(x => x.ID == convertID); |
||
780 | |||
781 | if (items.Count() > 0) |
||
782 | { |
||
783 | CONVERTER_DOC item = items.First(); |
||
784 | entities.CONVERTER_DOC.Remove(item); |
||
785 | |||
786 | 43e1d368 | taeseongkim | |
787 | var waiter = entities.SaveChangesAsync().GetAwaiter(); |
||
788 | result = waiter.GetResult(); |
||
789 | 5d863c06 | taeseongkim | } |
790 | |||
791 | return result; |
||
792 | } |
||
793 | |||
794 | e6281033 | alzkakdixm | |
795 | #endregion |
||
796 | |||
797 | 05fd750b | alzkakdixm | #region MarkusLink |
798 | |||
799 | |||
800 | ////// userID는 관리자 계정인 doftech |
||
801 | ////string markusLink = "kcom://" + MarkusAPI.CreateMarkusParam(projectNo, documentID, userID); |
||
802 | //public static string CreateMarkusParam(string projectNo, string documentID, string userID) |
||
803 | //{ |
||
804 | // ViewInfo viewInfo = new ViewInfo(); |
||
805 | |||
806 | // viewInfo.DocumentItemID = documentID; |
||
807 | // viewInfo.ProjectNO = projectNo; |
||
808 | // viewInfo.UserID = userID; |
||
809 | |||
810 | // return ParamEncoding(JsonConvert.SerializeObject(viewInfo)); |
||
811 | |||
812 | //} |
||
813 | |||
814 | //public static string ParamEncoding(string EncodingText, System.Text.Encoding oEncoding = null) |
||
815 | //{ |
||
816 | |||
817 | // if (oEncoding == null) |
||
818 | // oEncoding = System.Text.Encoding.UTF8; |
||
819 | |||
820 | // return Convert.ToBase64String(oEncoding.GetBytes(EncodingText)); |
||
821 | |||
822 | //} |
||
823 | |||
824 | |||
825 | #endregion |
||
826 | |||
827 | e6281033 | alzkakdixm | #endregion |
828 | |||
829 | #region DataBaseByStatusViewModel Function |
||
830 | 53c9637d | taeseongkim | /// <summary> |
831 | /// 전체 컨버터를 가져온다. 비동기로 변경하여야 한다. |
||
832 | /// </summary> |
||
833 | /// <returns></returns> |
||
834 | e6281033 | alzkakdixm | public List<Interface.ConvertItem> GetConvertItems(StatusCodeType statusCodeType, Func<CONVERTER_DOC, bool> @where, int takeCount = 100) |
835 | 53c9637d | taeseongkim | { |
836 | List<Interface.ConvertItem> convertItems = new List<Interface.ConvertItem>(); |
||
837 | |||
838 | e6281033 | alzkakdixm | |
839 | 1d79913e | taeseongkim | var items = entities.CONVERTER_DOC.Where(x => x.STATUS == (int)statusCodeType).Where(@where).Take(takeCount).ToList(); |
840 | 53c9637d | taeseongkim | |
841 | if (items.Count() > 0) |
||
842 | { |
||
843 | foreach (var item in items) |
||
844 | { |
||
845 | 06f13e11 | taeseongkim | var convertitem = new Interface.ConvertItem(item.DOCUMENT_ID, item.PROJECT_NO, item.ID, item.DOCUMENT_URL) |
846 | { |
||
847 | ReConverter = item.RECONVERTER, |
||
848 | ServiceID = item.SERVICE_ID, |
||
849 | 2decfbdf | alzkakdixm | ConvertState = ((StatusCodeType)item.STATUS), |
850 | 06f13e11 | taeseongkim | CreateTime = item.CREATE_DATETIME, |
851 | TotalPage = item.TOTAL_PAGE, |
||
852 | CurrentPageNo = item.CURRENT_PAGE, |
||
853 | |||
854 | ConvertPath = GetConvertPath(item.PROJECT_NO, item.DOCUMENT_ID) |
||
855 | }; |
||
856 | |||
857 | 53c9637d | taeseongkim | convertItems.Add(convertitem); |
858 | } |
||
859 | } |
||
860 | return convertItems; |
||
861 | } |
||
862 | e6281033 | alzkakdixm | #endregion |
863 | |||
864 | #region No 참조 |
||
865 | 53c9637d | taeseongkim | |
866 | 0157b158 | taeseongkim | /// <summary> |
867 | e6281033 | alzkakdixm | /// 컨버터서비스를 이용하는 문서 정보 저장 |
868 | /// UniqueID |
||
869 | /// using Markus.Service.Extensions; new Guid().CreateUniqueGuid().ToString(); |
||
870 | b92f142f | taeseongkim | /// </summary> |
871 | e6281033 | alzkakdixm | /// <param name="ProjectNo">프로젝트</param> |
872 | /// <param name="UniqueID">컨버터 서비스의 아이템 ID</param> |
||
873 | /// <param name="originfilePath"></param> |
||
874 | /// <param name="DocumentID"></param> |
||
875 | b92f142f | taeseongkim | /// <returns></returns> |
876 | e6281033 | alzkakdixm | public bool SetConvertDoc(string ProjectNo, string UniqueID, string originfilePath, string DocumentID) |
877 | b92f142f | taeseongkim | { |
878 | e6281033 | alzkakdixm | bool result = false; |
879 | b92f142f | taeseongkim | |
880 | e6281033 | alzkakdixm | if (ProjectNo.IsNullOrEmpty()) |
881 | { |
||
882 | throw new Exception("ProjectNo is Null"); |
||
883 | } |
||
884 | 60723dc9 | taeseongkim | |
885 | e6281033 | alzkakdixm | if (UniqueID.IsNullOrEmpty()) |
886 | { |
||
887 | throw new Exception("UniqueID is Null"); |
||
888 | } |
||
889 | b92f142f | taeseongkim | |
890 | e6281033 | alzkakdixm | if (originfilePath.IsNullOrEmpty()) |
891 | b92f142f | taeseongkim | { |
892 | e6281033 | alzkakdixm | throw new Exception("originfilePath is Null"); |
893 | } |
||
894 | |||
895 | if (DocumentID.IsNullOrEmpty()) |
||
896 | { |
||
897 | throw new Exception("DocumentID is Null"); |
||
898 | } |
||
899 | |||
900 | if (DocumentID.IsNullOrEmpty()) |
||
901 | { |
||
902 | long _lastDocId = 0; |
||
903 | |||
904 | if (entities.CONVERTER_DOC.Count() > 0) |
||
905 | b92f142f | taeseongkim | { |
906 | e6281033 | alzkakdixm | try |
907 | b92f142f | taeseongkim | { |
908 | e6281033 | alzkakdixm | string qry = @"SELECT * FROM CONVERTER_DOC order by CAST(DOCUMENT_ID as int) desc"; |
909 | var _item = entities.CONVERTER_DOC.SqlQuery(qry).FirstOrDefault(); |
||
910 | b92f142f | taeseongkim | |
911 | e6281033 | alzkakdixm | if (_item != null) |
912 | { |
||
913 | _lastDocId = Convert.ToInt64(_item.DOCUMENT_ID) + 1; |
||
914 | } |
||
915 | } |
||
916 | catch (Exception) |
||
917 | { |
||
918 | b92f142f | taeseongkim | |
919 | e6281033 | alzkakdixm | throw; |
920 | } |
||
921 | b92f142f | taeseongkim | } |
922 | e6281033 | alzkakdixm | |
923 | DocumentID = _lastDocId.ToString(); |
||
924 | b92f142f | taeseongkim | } |
925 | |||
926 | e6281033 | alzkakdixm | CONVERTER_DOC convert_doc = new CONVERTER_DOC |
927 | { |
||
928 | ID = UniqueID, |
||
929 | PROJECT_NO = ProjectNo, |
||
930 | DOCUMENT_URL = originfilePath, |
||
931 | DOCUMENT_ID = DocumentID, |
||
932 | CREATE_DATETIME = DateTime.Now, |
||
933 | STATUS = 0, |
||
934 | TOTAL_PAGE = 0, |
||
935 | CURRENT_PAGE = 0, |
||
936 | RECONVERTER = 0 |
||
937 | }; |
||
938 | |||
939 | |||
940 | entities.CONVERTER_DOC.Add(convert_doc); |
||
941 | a6e5055d | alzkakdixm | |
942 | 43e1d368 | taeseongkim | |
943 | var waiter = entities.SaveChangesAsync().GetAwaiter(); |
||
944 | |||
945 | if (waiter.GetResult() == 1) |
||
946 | e6281033 | alzkakdixm | { |
947 | result = true; |
||
948 | } |
||
949 | |||
950 | return result; |
||
951 | } |
||
952 | |||
953 | /// <summary> |
||
954 | /// 컨버터서비스를 이용하는 문서 정보 저장 |
||
955 | /// UniqueID |
||
956 | /// using Markus.Service.Extensions; new Guid().CreateUniqueGuid().ToString(); |
||
957 | /// </summary> |
||
958 | /// <param name="ProjectNo">프로젝트</param> |
||
959 | /// <param name="UniqueID">컨버터 서비스의 아이템 ID</param> |
||
960 | /// <param name="originfilePath"></param> |
||
961 | /// <param name="DocumentID"></param> |
||
962 | /// <returns></returns> |
||
963 | public bool SetDocumentInfo(string ConvertID, int totalPage, List<DOCPAGE> pageinfo) |
||
964 | 2decfbdf | alzkakdixm | { |
965 | e6281033 | alzkakdixm | bool result = false; |
966 | 2decfbdf | alzkakdixm | |
967 | e6281033 | alzkakdixm | var convertDocItems = entities.CONVERTER_DOC.Where(f => f.ID == ConvertID); |
968 | |||
969 | if (convertDocItems.Count() > 0) |
||
970 | a6e5055d | alzkakdixm | { |
971 | e6281033 | alzkakdixm | var convertDoc = convertDocItems.First(); |
972 | |||
973 | string docId = new Guid().CreateUniqueGuid().ToString(); |
||
974 | |||
975 | var docinfo = entities.DOCINFO.FirstOrDefault(x => x.PROJECT_NO == convertDoc.PROJECT_NO && x.DOCUMENT_ID == convertDoc.DOCUMENT_ID); |
||
976 | |||
977 | if (docinfo != null) |
||
978 | { |
||
979 | // 기존 Docpage 삭제. |
||
980 | entities.DOCPAGE.RemoveRange(docinfo.DOCPAGE); |
||
981 | |||
982 | // 기존 코멘트 유지를 위한 Docinfo update |
||
983 | docinfo.PROJECT_NO = convertDoc.PROJECT_NO; |
||
984 | docinfo.ORIGINAL_FILE = convertDoc.DOCUMENT_URL; |
||
985 | docinfo.PAGE_COUNT = totalPage; |
||
986 | 43e1d368 | taeseongkim | docinfo.DOCPAGE = pageinfo; |
987 | var waiter = entities.SaveChangesAsync().GetAwaiter(); |
||
988 | |||
989 | if(waiter.GetResult() > 0) |
||
990 | { |
||
991 | result = true; |
||
992 | } |
||
993 | e6281033 | alzkakdixm | } |
994 | else |
||
995 | a6e5055d | alzkakdixm | { |
996 | e6281033 | alzkakdixm | DOCINFO instace = new DOCINFO |
997 | a6e5055d | alzkakdixm | { |
998 | e6281033 | alzkakdixm | ID = docId, |
999 | PROJECT_NO = convertDoc.PROJECT_NO, |
||
1000 | ORIGINAL_FILE = convertDoc.DOCUMENT_URL, |
||
1001 | DOCUMENT_ID = convertDoc.DOCUMENT_ID, |
||
1002 | PAGE_COUNT = totalPage, |
||
1003 | DOCPAGE = pageinfo |
||
1004 | a6e5055d | alzkakdixm | }; |
1005 | |||
1006 | e6281033 | alzkakdixm | entities.DOCINFO.Add(instace); |
1007 | 43e1d368 | taeseongkim | var waiter = entities.SaveChangesAsync().GetAwaiter(); |
1008 | |||
1009 | var save = waiter.GetResult(); |
||
1010 | e6281033 | alzkakdixm | |
1011 | if (save == pageinfo.Count() + 1) |
||
1012 | { |
||
1013 | result = true; |
||
1014 | } |
||
1015 | a6e5055d | alzkakdixm | } |
1016 | 2decfbdf | alzkakdixm | |
1017 | e6281033 | alzkakdixm | |
1018 | |||
1019 | } |
||
1020 | d91efe5c | taeseongkim | else |
1021 | { |
||
1022 | throw new Exception($"SetDocumentInfo :{ConvertID} CONVERTER_DOC not found "); |
||
1023 | } |
||
1024 | a6e5055d | alzkakdixm | |
1025 | e6281033 | alzkakdixm | return result; |
1026 | 2decfbdf | alzkakdixm | } |
1027 | e6281033 | alzkakdixm | |
1028 | public Interface.ConvertItem GetConvertItem(string ProjectNo, string UniqueID) |
||
1029 | a6e5055d | alzkakdixm | { |
1030 | e6281033 | alzkakdixm | Interface.ConvertItem result = null; |
1031 | a6e5055d | alzkakdixm | |
1032 | e6281033 | alzkakdixm | //var items = entities.CONVERTER_DOC.Where(f => f.PROJECT_NO == gProjectNo && f.ID == UniqueID); |
1033 | var items = entities.CONVERTER_DOC.Where(f => f.PROJECT_NO == ProjectNo && f.ID == UniqueID); |
||
1034 | |||
1035 | if (items.Count() > 0) |
||
1036 | 2decfbdf | alzkakdixm | { |
1037 | e6281033 | alzkakdixm | var convertItem = items.First(); |
1038 | 2decfbdf | alzkakdixm | |
1039 | 43e1d368 | taeseongkim | #if XI_C_AND_A |
1040 | string convertPath = GetConvertPath(convertItem.PROJECT_NO, convertItem.DOCUMENT_ID); |
||
1041 | #else |
||
1042 | 2decfbdf | alzkakdixm | |
1043 | 43e1d368 | taeseongkim | string convertPath = Path.Combine(BaseStorage(convertItem.PROJECT_NO), convertItem.PROJECT_NO + "_Tile", (System.Convert.ToInt64(convertItem.DOCUMENT_ID) / 100).ToString(), convertItem.DOCUMENT_ID); |
1044 | #endif |
||
1045 | e6281033 | alzkakdixm | result = new Interface.ConvertItem(convertItem.DOCUMENT_ID, convertItem.PROJECT_NO, convertItem.ID, convertItem.DOCUMENT_URL, convertPath); |
1046 | } |
||
1047 | a6e5055d | alzkakdixm | |
1048 | e6281033 | alzkakdixm | return result; |
1049 | } |
||
1050 | 2decfbdf | alzkakdixm | |
1051 | a6e5055d | alzkakdixm | |
1052 | e6281033 | alzkakdixm | public Interface.ConvertItem GetConvertItembyDocumentID(string ProjectNo, string DocumentID) |
1053 | { |
||
1054 | Interface.ConvertItem result = null; |
||
1055 | |||
1056 | //var items = entities.CONVERTER_DOC.Where(f => f.PROJECT_NO == gProjectNo && f.ID == UniqueID); |
||
1057 | var items = entities.CONVERTER_DOC.Where(f => f.PROJECT_NO == ProjectNo && f.DOCUMENT_ID == DocumentID); |
||
1058 | |||
1059 | if (items.Count() > 0) |
||
1060 | { |
||
1061 | var convertItem = items.First(); |
||
1062 | |||
1063 | 43e1d368 | taeseongkim | #if XI_C_AND_A |
1064 | string convertPath = GetConvertPath(convertItem.PROJECT_NO, convertItem.DOCUMENT_ID); |
||
1065 | #else |
||
1066 | string convertPath = Path.Combine(BaseStorage(convertItem.PROJECT_NO), convertItem.PROJECT_NO + "_Tile", (System.Convert.ToInt64(convertItem.DOCUMENT_ID) / 100).ToString(), convertItem.DOCUMENT_ID); |
||
1067 | #endif |
||
1068 | e6281033 | alzkakdixm | if (convertItem.STATUS == (int)StatusCodeType.Completed) |
1069 | { |
||
1070 | result = new Interface.ConvertItem(convertItem.DOCUMENT_ID, convertItem.PROJECT_NO, convertItem.ID, convertItem.DOCUMENT_URL, convertPath, |
||
1071 | (StatusCodeType)convertItem.STATUS, convertItem.CURRENT_PAGE, convertItem.TOTAL_PAGE, convertItem.EXCEPTION); |
||
1072 | } |
||
1073 | else |
||
1074 | { |
||
1075 | result = new Interface.ConvertItem(convertItem.DOCUMENT_ID, convertItem.PROJECT_NO, convertItem.ID, convertItem.DOCUMENT_URL, convertPath); |
||
1076 | 2decfbdf | alzkakdixm | } |
1077 | } |
||
1078 | |||
1079 | e6281033 | alzkakdixm | return result; |
1080 | } |
||
1081 | |||
1082 | public List<CONVERTER_DOC> GetConvertingItems(List<string> projectList) |
||
1083 | { |
||
1084 | var convertWaitingItems = entities.CONVERTER_DOC.OrderBy(x => x.CREATE_DATETIME).Where( |
||
1085 | x => |
||
1086 | projectList.Contains(x.PROJECT_NO) && |
||
1087 | 1d79913e | taeseongkim | ((x.STATUS > (int)StatusCodeType.None && x.STATUS < (int)StatusCodeType.Completed) && x.RECONVERTER < 2)); |
1088 | 2decfbdf | alzkakdixm | |
1089 | e6281033 | alzkakdixm | return convertWaitingItems.ToList(); |
1090 | 2decfbdf | alzkakdixm | } |
1091 | e6281033 | alzkakdixm | |
1092 | /// <summary> |
||
1093 | /// 전체 컨버터를 가져온다. 비동기로 변경하여야 한다. |
||
1094 | /// </summary> |
||
1095 | /// <returns></returns> |
||
1096 | public List<Interface.ConvertItem> GetConvertItems(StatusCodeType statusCodeType) |
||
1097 | 2decfbdf | alzkakdixm | { |
1098 | e6281033 | alzkakdixm | List<Interface.ConvertItem> convertItems = new List<Interface.ConvertItem>(); |
1099 | 2decfbdf | alzkakdixm | |
1100 | e6281033 | alzkakdixm | var items = entities.CONVERTER_DOC.Where(x => x.STATUS == (int)statusCodeType).ToList(); //.Where(x => x.PROJECT_NO == gProjectNo); |
1101 | |||
1102 | if (items.Count() > 0) |
||
1103 | a6e5055d | alzkakdixm | { |
1104 | e6281033 | alzkakdixm | foreach (var item in items) |
1105 | a6e5055d | alzkakdixm | { |
1106 | e6281033 | alzkakdixm | var convertitem = new Interface.ConvertItem(item.DOCUMENT_ID, item.PROJECT_NO, item.ID, item.DOCUMENT_URL) |
1107 | a6e5055d | alzkakdixm | { |
1108 | ReConverter = item.RECONVERTER, |
||
1109 | ServiceID = item.SERVICE_ID, |
||
1110 | e6281033 | alzkakdixm | ConvertState = ((StatusCodeType)item.STATUS), |
1111 | a6e5055d | alzkakdixm | CreateTime = item.CREATE_DATETIME, |
1112 | TotalPage = item.TOTAL_PAGE, |
||
1113 | CurrentPageNo = item.CURRENT_PAGE, |
||
1114 | |||
1115 | e6281033 | alzkakdixm | ConvertPath = GetConvertPath(item.PROJECT_NO, item.DOCUMENT_ID) |
1116 | 2decfbdf | alzkakdixm | }; |
1117 | e6281033 | alzkakdixm | |
1118 | |||
1119 | convertItems.Add(convertitem); |
||
1120 | a6e5055d | alzkakdixm | } |
1121 | } |
||
1122 | e6281033 | alzkakdixm | return convertItems; |
1123 | a6e5055d | alzkakdixm | } |
1124 | |||
1125 | public List<Interface.ConvertItem> GetConvertProjectsStatus(Func<CONVERTER_DOC, bool> @where) |
||
1126 | { |
||
1127 | List<Interface.ConvertItem> convertItems = new List<Interface.ConvertItem>(); |
||
1128 | |||
1129 | |||
1130 | //var items = entities.CONVERTER_DOC.Where(x => x.STATUS == (int)statusCodeType).Take(takeCount).ToList(); //.Where(x => x.PROJECT_NO == gProjectNo); |
||
1131 | e6281033 | alzkakdixm | var items = entities.CONVERTER_DOC.Where(x => x.STATUS <= 4); |
1132 | a6e5055d | alzkakdixm | |
1133 | if (items.Count() > 0) |
||
1134 | { |
||
1135 | foreach (var item in items) |
||
1136 | { |
||
1137 | var convertitem = new Interface.ConvertItem(item.DOCUMENT_ID, item.PROJECT_NO, item.ID, item.DOCUMENT_URL) |
||
1138 | { |
||
1139 | ReConverter = item.RECONVERTER, |
||
1140 | ServiceID = item.SERVICE_ID, |
||
1141 | //ConvertState = ((StatusCodeType)item.STATUS).ToString(), |
||
1142 | 2decfbdf | alzkakdixm | //ConvertState = (item.STATUS).ToString(), |
1143 | ConvertState = (StatusCodeType)item.STATUS, |
||
1144 | a6e5055d | alzkakdixm | CreateTime = item.CREATE_DATETIME, |
1145 | TotalPage = item.TOTAL_PAGE, |
||
1146 | CurrentPageNo = item.CURRENT_PAGE, |
||
1147 | Exception = item.EXCEPTION, |
||
1148 | ConvertPath = GetConvertPath(item.PROJECT_NO, item.DOCUMENT_ID) |
||
1149 | }; |
||
1150 | |||
1151 | |||
1152 | convertItems.Add(convertitem); |
||
1153 | } |
||
1154 | } |
||
1155 | |||
1156 | return convertItems; |
||
1157 | } |
||
1158 | |||
1159 | b92f142f | taeseongkim | |
1160 | e6281033 | alzkakdixm | public bool SetConvertState(string ServiceID, string UniqueID, int State, int CurrentPage, int TotalPage, string Error) |
1161 | 53c9637d | taeseongkim | { |
1162 | bool result = false; |
||
1163 | |||
1164 | try |
||
1165 | { |
||
1166 | var items = entities.CONVERTER_DOC.SingleOrDefault(f => f.ID == UniqueID); |
||
1167 | //var items = entities.CONVERTER_DOC.SingleOrDefault(f => f.PROJECT_NO == gProjectNo && f.ID == UniqueID); |
||
1168 | |||
1169 | if (items != null) |
||
1170 | { |
||
1171 | 0157b158 | taeseongkim | items.SERVICE_ID = ServiceID; |
1172 | 53c9637d | taeseongkim | items.STATUS = State; |
1173 | items.CURRENT_PAGE = CurrentPage; |
||
1174 | items.TOTAL_PAGE = TotalPage; |
||
1175 | |||
1176 | StatusCodeType statusCode = (StatusCodeType)State; |
||
1177 | |||
1178 | 65fbe3cb | taeseongkim | if (items.START_DATETIME == null) |
1179 | a8f1a865 | taeseongkim | { |
1180 | items.START_DATETIME = DateTime.Now; |
||
1181 | } |
||
1182 | |||
1183 | 53c9637d | taeseongkim | switch (statusCode) |
1184 | { |
||
1185 | case StatusCodeType.None: |
||
1186 | break; |
||
1187 | case StatusCodeType.Wait: |
||
1188 | items.START_DATETIME = DateTime.Now; |
||
1189 | break; |
||
1190 | case StatusCodeType.PageLoading: |
||
1191 | break; |
||
1192 | case StatusCodeType.Saving: |
||
1193 | break; |
||
1194 | case StatusCodeType.Completed: |
||
1195 | a0341bef | taeseongkim | items.CURRENT_PAGE = items.TOTAL_PAGE; |
1196 | e6281033 | alzkakdixm | items.END_DATETIME = DateTime.Now; |
1197 | 53c9637d | taeseongkim | break; |
1198 | case StatusCodeType.FileError: |
||
1199 | Error = $" file Error :" + Error; |
||
1200 | items.END_DATETIME = DateTime.Now; |
||
1201 | break; |
||
1202 | case StatusCodeType.PageError: |
||
1203 | Error = $" Page No {CurrentPage} Error :" + Error; |
||
1204 | break; |
||
1205 | case StatusCodeType.NeedsPassword: |
||
1206 | break; |
||
1207 | case StatusCodeType.Error: |
||
1208 | Error = $" Error :" + Error; |
||
1209 | items.END_DATETIME = DateTime.Now; |
||
1210 | break; |
||
1211 | default: |
||
1212 | break; |
||
1213 | } |
||
1214 | |||
1215 | e6281033 | alzkakdixm | if (items.EXCEPTION == null) |
1216 | 53c9637d | taeseongkim | { |
1217 | items.EXCEPTION = ""; |
||
1218 | } |
||
1219 | |||
1220 | if (items.EXCEPTION.Length < 255) |
||
1221 | { |
||
1222 | 43e1d368 | taeseongkim | if (items.EXCEPTION.Length > 0 && Error?.Length > 0) |
1223 | { |
||
1224 | items.EXCEPTION = items.EXCEPTION + ";" + Environment.NewLine; |
||
1225 | } |
||
1226 | |||
1227 | 53c9637d | taeseongkim | items.EXCEPTION = items.EXCEPTION + Error; |
1228 | } |
||
1229 | |||
1230 | 43e1d368 | taeseongkim | var waiter = entities.SaveChangesAsync().GetAwaiter(); |
1231 | var save = waiter.GetResult(); |
||
1232 | 53c9637d | taeseongkim | result = true; |
1233 | } |
||
1234 | } |
||
1235 | catch (Exception ex) |
||
1236 | { |
||
1237 | e6281033 | alzkakdixm | throw new Exception("SetConvertState", ex); |
1238 | 53c9637d | taeseongkim | } |
1239 | |||
1240 | return result; |
||
1241 | } |
||
1242 | |||
1243 | e6281033 | alzkakdixm | public SERVICE_PROPERTIES GetServiceProperties(string ServiceID) |
1244 | 53c9637d | taeseongkim | { |
1245 | e6281033 | alzkakdixm | SERVICE_PROPERTIES result = null; |
1246 | 53c9637d | taeseongkim | |
1247 | e6281033 | alzkakdixm | var items = entities.SERVICE_PROPERTIES.Where(x => x.ID == ServiceID); |
1248 | 53c9637d | taeseongkim | |
1249 | e6281033 | alzkakdixm | if (items.Count() > 0) |
1250 | 53c9637d | taeseongkim | { |
1251 | e6281033 | alzkakdixm | result = items.First(); |
1252 | 53c9637d | taeseongkim | } |
1253 | |||
1254 | return result; |
||
1255 | } |
||
1256 | |||
1257 | e6281033 | alzkakdixm | |
1258 | /// <summary> |
||
1259 | /// 현재 서비스에서 컨버터중인 아이템. |
||
1260 | /// </summary> |
||
1261 | /// <returns></returns> |
||
1262 | public List<Interface.ConvertItem> GetServiceAliveItems(string ServiceID) |
||
1263 | { |
||
1264 | List<Interface.ConvertItem> convertItems = new List<Interface.ConvertItem>(); |
||
1265 | |||
1266 | var items = entities.CONVERTER_DOC.Where(x => x.SERVICE_ID == ServiceID && x.STATUS > (int)StatusCodeType.None && x.STATUS < (int)StatusCodeType.Completed).ToList(); //.Where(x => x.PROJECT_NO == gProjectNo); |
||
1267 | |||
1268 | if (items.Count() > 0) |
||
1269 | { |
||
1270 | foreach (var item in items) |
||
1271 | { |
||
1272 | var convertitem = new Interface.ConvertItem(item.DOCUMENT_ID, item.PROJECT_NO, item.ID, item.DOCUMENT_URL); |
||
1273 | convertItems.Add(convertitem); |
||
1274 | } |
||
1275 | } |
||
1276 | return convertItems; |
||
1277 | } |
||
1278 | |||
1279 | 43e1d368 | taeseongkim | #endregion |
1280 | e6281033 | alzkakdixm | |
1281 | 53c9637d | taeseongkim | } |
1282 | } |