作者 tangxvhui

bug 修复

@@ -478,7 +478,9 @@ func checkSelfCheckData(data []protocol.TemplateSelfCheck) error { @@ -478,7 +478,9 @@ func checkSelfCheckData(data []protocol.TemplateSelfCheck) error {
478 478
479 func auditFlowMustActionTypeOr(auditflow protocol.AuditFlowConfig) error { 479 func auditFlowMustActionTypeOr(auditflow protocol.AuditFlowConfig) error {
480 for _, v := range auditflow.ProcessConfig { 480 for _, v := range auditflow.ProcessConfig {
481 - 481 + if v.ApproveType == models.AuditByUser && len(v.ToUser) == 1 {
  482 + continue
  483 + }
482 if v.AcitonType != models.ActionTypeOr { 484 if v.AcitonType != models.ActionTypeOr {
483 return protocol.NewErrWithMessage("10129") 485 return protocol.NewErrWithMessage("10129")
484 } 486 }
@@ -254,7 +254,8 @@ func editSelfCheckData(templateId int64, data []protocol.TemplateSelfCheck, om o @@ -254,7 +254,8 @@ func editSelfCheckData(templateId int64, data []protocol.TemplateSelfCheck, om o
254 if m.Id == 0 { 254 if m.Id == 0 {
255 m.Id = idworker.NextId() 255 m.Id = idworker.NextId()
256 newSelfCheckData = append(newSelfCheckData, m) 256 newSelfCheckData = append(newSelfCheckData, m)
257 - } else if _, ok := oldSelfCheckMap[m.Id]; ok { 257 + }
  258 + if _, ok := oldSelfCheckMap[m.Id]; ok {
258 updateSelfCheck = append(updateSelfCheck, m) 259 updateSelfCheck = append(updateSelfCheck, m)
259 delete(oldSelfCheckMap, m.Id) 260 delete(oldSelfCheckMap, m.Id)
260 } 261 }
@@ -271,7 +272,8 @@ func editSelfCheckData(templateId int64, data []protocol.TemplateSelfCheck, om o @@ -271,7 +272,8 @@ func editSelfCheckData(templateId int64, data []protocol.TemplateSelfCheck, om o
271 if mm.Id == 0 { 272 if mm.Id == 0 {
272 mm.Id = idworker.NextId() 273 mm.Id = idworker.NextId()
273 newSelfCheckData = append(newSelfCheckData, mm) 274 newSelfCheckData = append(newSelfCheckData, mm)
274 - } else if _, ok := oldSelfCheckMap[m.Id]; ok { 275 + }
  276 + if _, ok := oldSelfCheckMap[m.Id]; ok {
275 updateSelfCheck = append(updateSelfCheck, mm) 277 updateSelfCheck = append(updateSelfCheck, mm)
276 delete(oldSelfCheckMap, mm.Id) 278 delete(oldSelfCheckMap, mm.Id)
277 } 279 }