diff --git a/SGGL/BLL/API/CQMS/APIQuantityManagementService.cs b/SGGL/BLL/API/CQMS/APIQuantityManagementService.cs index 3ebe106..9676a94 100644 --- a/SGGL/BLL/API/CQMS/APIQuantityManagementService.cs +++ b/SGGL/BLL/API/CQMS/APIQuantityManagementService.cs @@ -31,10 +31,10 @@ namespace BLL q = q.Where(x => x.ProjectContent.Contains(projectContent)); } List dayInputItems = new List(); - var list = q.OrderByDescending(x => x.Date).ToList(); - if (list.Count > 0) + q = q.OrderByDescending(x => x.Date); + if (q.Count() > 0) { - foreach (var x in list) + foreach (var x in q) { DayInputItem dayInputItem = new DayInputItem(); dayInputItem.DayInputId = x.DayInputId; diff --git a/SGGL/WebAPI/Filter/TestPermissionAttribute.cs b/SGGL/WebAPI/Filter/TestPermissionAttribute.cs index 86bd99e..d824ed9 100644 --- a/SGGL/WebAPI/Filter/TestPermissionAttribute.cs +++ b/SGGL/WebAPI/Filter/TestPermissionAttribute.cs @@ -178,7 +178,7 @@ namespace WebAPI.Filter "AwardStandards*getAwardStandardsListById", "Rectify*getRectifyList", "ImageRecognition*getImageContent", - + "QuantityManagement*dayInputList", }; ///