wf日志提交完整
This commit is contained in:
parent
9d721c51b7
commit
99e49c6eb3
|
@ -27,7 +27,7 @@ class ProcessYieldView(CreateAPIView):
|
||||||
"""
|
"""
|
||||||
工序成品率统计
|
工序成品率统计
|
||||||
"""
|
"""
|
||||||
perms_map = {'get':'*'}
|
perms_map = {'post':'*'}
|
||||||
serializer_class = ProcessYieldSerializer
|
serializer_class = ProcessYieldSerializer
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -348,6 +348,11 @@ class WfService(object):
|
||||||
# 如果目标状态是脚本则执行
|
# 如果目标状态是脚本则执行
|
||||||
if destination_state.participant_type == State.PARTICIPANT_TYPE_ROBOT:
|
if destination_state.participant_type == State.PARTICIPANT_TYPE_ROBOT:
|
||||||
getattr(HandleScripts, destination_state.participant)(ticket)
|
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
|
return ticket
|
||||||
|
|
||||||
|
|
|
@ -752,6 +752,8 @@ class OperationViewSet(ListModelMixin, RetrieveModelMixin, CreateModelMixin, Upd
|
||||||
oms_w = omos.filter(subproduction_progress__is_main=True)
|
oms_w = omos.filter(subproduction_progress__is_main=True)
|
||||||
if len(oms_w) == 1:
|
if len(oms_w) == 1:
|
||||||
oms_w = oms_w[0]
|
oms_w = oms_w[0]
|
||||||
|
if oms_w.count!=1:
|
||||||
|
raise exceptions.APIException('产出数量应为1')
|
||||||
# 校验单片数量是否正确, 暂时未写
|
# 校验单片数量是否正确, 暂时未写
|
||||||
newstep, needTest = WpmService.get_next_step(
|
newstep, needTest = WpmService.get_next_step(
|
||||||
oms_w.subproduction_plan, step)
|
oms_w.subproduction_plan, step)
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 6.9 KiB |
Loading…
Reference in New Issue