diff --git a/hb_server/apps/srm/views.py b/hb_server/apps/srm/views.py index 8e010b8..ead2e2e 100644 --- a/hb_server/apps/srm/views.py +++ b/hb_server/apps/srm/views.py @@ -27,7 +27,7 @@ class ProcessYieldView(CreateAPIView): """ 工序成品率统计 """ - perms_map = {'get':'*'} + perms_map = {'post':'*'} serializer_class = ProcessYieldSerializer diff --git a/hb_server/apps/wf/services.py b/hb_server/apps/wf/services.py index fa32197..ca733f1 100644 --- a/hb_server/apps/wf/services.py +++ b/hb_server/apps/wf/services.py @@ -348,6 +348,11 @@ class WfService(object): # 如果目标状态是脚本则执行 if destination_state.participant_type == State.PARTICIPANT_TYPE_ROBOT: getattr(HandleScripts, destination_state.participant)(ticket) + + if destination_state.type == State.STATE_TYPE_END: + TicketFlow.objects.create(ticket=ticket, state=destination_state, + participant_type=0, intervene_type=0, + participant=None) return ticket diff --git a/hb_server/apps/wpm/views.py b/hb_server/apps/wpm/views.py index ea2ec42..430dc78 100644 --- a/hb_server/apps/wpm/views.py +++ b/hb_server/apps/wpm/views.py @@ -752,6 +752,8 @@ class OperationViewSet(ListModelMixin, RetrieveModelMixin, CreateModelMixin, Upd oms_w = omos.filter(subproduction_progress__is_main=True) if len(oms_w) == 1: oms_w = oms_w[0] + if oms_w.count!=1: + raise exceptions.APIException('产出数量应为1') # 校验单片数量是否正确, 暂时未写 newstep, needTest = WpmService.get_next_step( oms_w.subproduction_plan, step) diff --git a/hb_server/media/default/avatar.png b/hb_server/media/default/avatar.png index 98d206e..07e8078 100644 Binary files a/hb_server/media/default/avatar.png and b/hb_server/media/default/avatar.png differ