|
@@ -13,7 +13,7 @@ import uuid
|
|
|
from utils import *
|
|
|
from common.security import valid_access_token
|
|
|
import traceback
|
|
|
-from sqlalchemy import text, exists
|
|
|
+from sqlalchemy import text, exists,desc
|
|
|
router = APIRouter()
|
|
|
|
|
|
def get_next_yjbh_id(db: Session):
|
|
@@ -153,6 +153,7 @@ async def select_files(
|
|
|
if standard_type:
|
|
|
data_query = data_query.filter(HazardStandardsFile.standard_type == standard_type)
|
|
|
|
|
|
+ data_query = data_query.order_by(desc(HazardStandardsFile.create_time))
|
|
|
# # 应用排序条件
|
|
|
# if sortBy:
|
|
|
# if hasattr(HazardStandardsFile, sortBy):
|