feat: add daily manual price review workflow

This commit is contained in:
Wyndham ARR
2026-08-06 22:40:18 +08:00
parent aae3d8e1db
commit ca3e8e18fa
77 changed files with 7750 additions and 602 deletions

View File

@@ -16,6 +16,40 @@ class UploadCoordinator(Protocol):
...
class DailyPriceReviewCoordinator(Protocol):
def get_price_review(self, job_id: str, limit: int, offset: int) -> Dict[str, Any]:
...
def update_price_review_item(
self,
job_id: str,
item_id: int,
case_id: str,
revision: int,
real_price: str,
actor_username: str,
) -> Dict[str, Any]:
...
def finalize_price_review(
self,
job_id: str,
case_id: str,
revision: int,
actor_username: str,
) -> Dict[str, Any]:
...
def cancel_price_review(
self,
job_id: str,
case_id: str,
revision: int,
actor_username: str,
) -> Dict[str, Any]:
...
class MonthlyCoordinator(Protocol):
def generate(self, month_key: str, as_of_date: date) -> Dict[str, Any]:
...
@@ -30,6 +64,30 @@ class UnavailableUploadCoordinator:
)
class UnavailableDailyPriceReviewCoordinator:
@staticmethod
def _raise() -> None:
raise PortalError("PROCESSING_GATEWAY_UNAVAILABLE", "人工价格复核服务暂不可用", 503)
def get_price_review(self, job_id: str, limit: int, offset: int) -> Dict[str, Any]:
self._raise()
def update_price_review_item(
self, job_id: str, item_id: int, case_id: str, revision: int, real_price: str, actor_username: str
) -> Dict[str, Any]:
self._raise()
def finalize_price_review(
self, job_id: str, case_id: str, revision: int, actor_username: str
) -> Dict[str, Any]:
self._raise()
def cancel_price_review(
self, job_id: str, case_id: str, revision: int, actor_username: str
) -> Dict[str, Any]:
self._raise()
class UnavailableMonthlyCoordinator:
def generate(self, month_key: str, as_of_date: date) -> Dict[str, Any]:
raise PortalError(