feat: add daily manual price review workflow
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user