diff --git a/apis/process/workOrder.go b/apis/process/workOrder.go index ee97670..22a615d 100644 --- a/apis/process/workOrder.go +++ b/apis/process/workOrder.go @@ -148,7 +148,7 @@ func ProcessWorkOrder(c *gin.Context) { params.Tpls, // 工单数据更新 ) if err != nil { - app.Error(c, -1, nil, fmt.Sprintf("处理工单失败,%v", err.Error())) + app.Error(c, -1, err, fmt.Sprintf("处理工单失败,%v", err.Error())) return } diff --git a/pkg/service/handle.go b/pkg/service/handle.go index 3000148..4702a42 100644 --- a/pkg/service/handle.go +++ b/pkg/service/handle.go @@ -876,7 +876,7 @@ func (h *Handle) HandleWorkOrder( h.tx.Commit() // 提交事务 // 发送通知 - if len(noticeList) > 0 { + if len(noticeList) > 0 && h.updateValue["state"] != nil { stateList := make([]interface{}, 0) for _, v := range h.updateValue["state"].([]map[string]interface{}) { stateList = append(stateList, v)