提交
This commit is contained in:
1 parent
7541a167c0
commit
b0eb80a2d4
37 files changed
+6279
-4732
No files matched your search
@@ -40,6 +40,7 @@ from app.schemas.production_task import (
|
||||
TaskStepAdd,
|
||||
TaskStepUpdate,
|
||||
TaskStepMaterialItem,
|
||||
TaskStepOutputItem,
|
||||
TaskStepDataCollectionItem,
|
||||
TaskInputItem,
|
||||
TaskOutputItem,
|
||||
@@ -1544,6 +1545,23 @@ async def replace_task_step_data_collections(
|
||||
return error_response(400, str(e))
|
||||
|
||||
|
||||
@router.put("/production-tasks/{task_id}/steps/{step_id}/outputs")
|
||||
async def replace_task_step_outputs(
|
||||
task_id: str,
|
||||
step_id: str,
|
||||
body: List[TaskStepOutputItem],
|
||||
user: dict = Depends(require_admin_or_super_admin),
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
try:
|
||||
tenant_no = _get_tenant_no(db, user)
|
||||
items_data = [it.model_dump(by_alias=False) for it in body]
|
||||
production_task_svc.replace_step_outputs(db, step_id, tenant_no, user.get("user_id"), items_data)
|
||||
return success_response(None, message="更新成功")
|
||||
except ValueError as e:
|
||||
return error_response(400, str(e))
|
||||
|
||||
|
||||
@router.post("/production-tasks/{task_id}/inputs")
|
||||
async def set_production_task_inputs(
|
||||
task_id: str,
|
||||
|
||||
Reference in new issue
Block a user