wf日志提交完整

This commit is contained in:
caoqianming 2022-03-02 09:35:41 +08:00
parent 9d721c51b7
commit 99e49c6eb3
4 changed files with 8 additions and 1 deletions

View File

@ -27,7 +27,7 @@ class ProcessYieldView(CreateAPIView):
"""
工序成品率统计
"""
perms_map = {'get':'*'}
perms_map = {'post':'*'}
serializer_class = ProcessYieldSerializer

View File

@ -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

View File

@ -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)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB