|
@@ -99,7 +99,7 @@ class RepairOrderViewSet(CustomModelViewSet):
|
|
|
with transaction.atomic():
|
|
|
instance = RepairOrder.get_instance_by_id(pk, user.employee.tenant)
|
|
|
if not instance.status == settings.CHECKED:
|
|
|
- return response_ok('当前报修工单状态非待派单状态,不能进行派单!')
|
|
|
+ return response_error('当前报修工单状态非待派单状态,不能进行派单!')
|
|
|
instance.dispatch_repair_order(user, user_ids)
|
|
|
if user.id != user_ids:
|
|
|
user = User.objects.filter(id=user_ids).first()
|
|
@@ -124,7 +124,7 @@ class RepairOrderViewSet(CustomModelViewSet):
|
|
|
with transaction.atomic():
|
|
|
instance = RepairOrder.get_instance_by_id(pk, user.employee.tenant)
|
|
|
if not instance.status == settings.DISPATCH:
|
|
|
- return response_ok('当前报修单状态还未派单,不能进行转单!')
|
|
|
+ return response_error('当前报修单状态还未派单,不能进行转单!')
|
|
|
instance.repair_users_id = user_ids
|
|
|
instance.save()
|
|
|
# 记录操作
|