Skip to content

Commit

Permalink
fix: 工单没有自动结束的bug。
Browse files Browse the repository at this point in the history
  • Loading branch information
lanyulei committed Nov 25, 2020
1 parent 5aceaca commit 3a329e6
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions pkg/service/handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,6 @@ func (h *Handle) Countersign(c *gin.Context) (err error) {
if err != nil {
return
}

// 如果是跳转到结束节点,则需要修改节点状态
if h.targetStateValue["clazz"] == "end" {
err = h.tx.Model(&process.WorkOrderInfo{}).
Where("id = ?", h.workOrderId).
Update("is_end", 1).Error
if err != nil {
h.tx.Rollback()
return
}
}
}
return
}
Expand Down Expand Up @@ -221,6 +210,18 @@ func (h *Handle) circulation() (err error) {
h.tx.Rollback()
return
}

// 如果是跳转到结束节点,则需要修改节点状态
if h.targetStateValue["clazz"] == "end" {
err = h.tx.Model(&process.WorkOrderInfo{}).
Where("id = ?", h.workOrderId).
Update("is_end", 1).Error
if err != nil {
h.tx.Rollback()
return
}
}

return
}

Expand Down

0 comments on commit 3a329e6

Please sign in to comment.