|
@@ -22,14 +22,14 @@ class ProjectQuotaStore:
|
|
|
return self._current_user
|
|
|
|
|
|
def get_quotas_paginated(
|
|
|
- self,
|
|
|
- budget_id: int,
|
|
|
- project_id: str,
|
|
|
- item_code: str,
|
|
|
- page: int = 1,
|
|
|
- page_size: int = 10,
|
|
|
- keyword: Optional[str] = None,
|
|
|
- send_status: Optional[int] = None,
|
|
|
+ self,
|
|
|
+ budget_id: int,
|
|
|
+ project_id: str,
|
|
|
+ item_code: str,
|
|
|
+ page: int = 1,
|
|
|
+ page_size: int = 10,
|
|
|
+ keyword: Optional[str] = None,
|
|
|
+ send_status: Optional[int] = None,
|
|
|
):
|
|
|
"""分页查询定额列表
|
|
|
|
|
@@ -81,15 +81,15 @@ class ProjectQuotaStore:
|
|
|
return {"total": total_count, "data": quotas}
|
|
|
|
|
|
def get_quotas_by_task_paginated(
|
|
|
- self,
|
|
|
- task_id: int,
|
|
|
- budget_id,
|
|
|
- project_id,
|
|
|
- item_code,
|
|
|
- page: int = 1,
|
|
|
- page_size: int = 10,
|
|
|
- keyword: Optional[str] = None,
|
|
|
- send_status: Optional[int] = None,
|
|
|
+ self,
|
|
|
+ task_id: int,
|
|
|
+ budget_id,
|
|
|
+ project_id,
|
|
|
+ item_code,
|
|
|
+ page: int = 1,
|
|
|
+ page_size: int = 10,
|
|
|
+ keyword: Optional[str] = None,
|
|
|
+ send_status: Optional[int] = None,
|
|
|
):
|
|
|
with db_helper.sqlserver_query_session(self._database) as db_session:
|
|
|
query = db_session.query(ProjectQuotaModel).filter(
|
|
@@ -176,7 +176,7 @@ class ProjectQuotaStore:
|
|
|
return ProjectQuotaDto.from_model(quota) if quota else None
|
|
|
|
|
|
def get_quota_by_quota_input(
|
|
|
- self, project_id: str, budget_id: int, quota_input_id: int
|
|
|
+ self, project_id: str, budget_id: int, quota_input_id: int
|
|
|
):
|
|
|
with db_helper.sqlserver_query_session(self._database) as db_session:
|
|
|
quota = (
|
|
@@ -286,7 +286,7 @@ class ProjectQuotaStore:
|
|
|
return ProjectQuotaDto.from_model(quota)
|
|
|
|
|
|
def update_quota_chapter(
|
|
|
- self, quota_id: int, item_id: int, item_code: str
|
|
|
+ self, quota_id: int, item_id: int, item_code: str
|
|
|
) -> Optional[ProjectQuotaDto]:
|
|
|
quota = self.get_quota(quota_id)
|
|
|
if not quota:
|