개정판 b92f142f
convert service 수정
Controller 수정
Change-Id: I38994fcc4d4452d638ea74b27cc8638f4157e17a
ConvertService/ServiceBase/Markus.Service.DataBase/ConvertDatabase.cs | ||
---|---|---|
237 | 237 |
{ |
238 | 238 |
var convertWaitingItems = entities.CONVERTER_DOC.OrderBy(x => x.CREATE_DATETIME).Where( |
239 | 239 |
x => |
240 |
projectList.Contains(x.PROJECT_NO) && x.RECONVERTER < 2 && |
|
240 |
//projectList.Contains(x.PROJECT_NO) && x.RECONVERTER < 2 && |
|
241 |
x.RECONVERTER < 2 && |
|
241 | 242 |
(x.STATUS == (int)StatusCodeType.None || x.STATUS == (int)StatusCodeType.FileError && x.STATUS == (int)StatusCodeType.Error)) |
242 | 243 |
.GroupBy(x=>x.DOCUMENT_ID).Select(x => x.FirstOrDefault()) |
243 | 244 |
.Take(TakeCount); |
... | ... | |
333 | 334 |
} |
334 | 335 |
|
335 | 336 |
/// <summary> |
337 |
/// 전체 컨버터를 가져온다. 비동기로 변경하여야 한다. |
|
338 |
/// </summary> |
|
339 |
/// <returns></returns> |
|
340 |
public List<Interface.ConvertItem> GetConvertItems(StatusCodeType statusCodeType,Func<CONVERTER_DOC, bool> @where,int takeCount = 100) |
|
341 |
{ |
|
342 |
List<Interface.ConvertItem> convertItems = new List<Interface.ConvertItem>(); |
|
343 |
|
|
344 |
var items = entities.CONVERTER_DOC.Where(x => x.STATUS == (int)statusCodeType && where(x)).Take(takeCount).ToList(); //.Where(x => x.PROJECT_NO == gProjectNo); |
|
345 |
|
|
346 |
if (items.Count() > 0) |
|
347 |
{ |
|
348 |
foreach (var item in items) |
|
349 |
{ |
|
350 |
var convertitem = new Interface.ConvertItem(item.DOCUMENT_ID, item.PROJECT_NO, item.ID, item.DOCUMENT_URL) |
|
351 |
{ |
|
352 |
ReConverter = item.RECONVERTER, |
|
353 |
ServiceID = item.SERVICE_ID, |
|
354 |
ConvertState = ((StatusCodeType)item.STATUS).ToString(), |
|
355 |
CreateTime = item.CREATE_DATETIME, |
|
356 |
TotalPage = item.TOTAL_PAGE, |
|
357 |
CurrentPageNo = item.CURRENT_PAGE, |
|
358 |
|
|
359 |
ConvertPath = GetConvertPath(item.PROJECT_NO, item.DOCUMENT_ID) |
|
360 |
}; |
|
361 |
|
|
362 |
|
|
363 |
convertItems.Add(convertitem); |
|
364 |
} |
|
365 |
} |
|
366 |
return convertItems; |
|
367 |
} |
|
368 |
|
|
369 |
|
|
370 |
/// <summary> |
|
336 | 371 |
/// 현재 서비스에서 컨버터중인 아이템. |
337 | 372 |
/// </summary> |
338 | 373 |
/// <returns></returns> |
내보내기 Unified diff