作者 tangxvhui

机会模板编辑修改

@@ -701,6 +701,7 @@ func TemplateGet(uid, companyId int64, request *protocol.TemplateGetRequest) (rs @@ -701,6 +701,7 @@ func TemplateGet(uid, companyId int64, request *protocol.TemplateGetRequest) (rs
701 if len(template.Videos) > 0 { 701 if len(template.Videos) > 0 {
702 _ = json.Unmarshal([]byte(template.Videos), &rsp.Videos) 702 _ = json.Unmarshal([]byte(template.Videos), &rsp.Videos)
703 } 703 }
  704 + //兼容就数据
704 705
705 if auditForm, err = models.GetAuditFormByTemplateId(int(template.Id)); err != nil { 706 if auditForm, err = models.GetAuditFormByTemplateId(int(template.Id)); err != nil {
706 log.Error("id:%v msg:%v", template.Id, err.Error()) 707 log.Error("id:%v msg:%v", template.Id, err.Error())
@@ -739,6 +740,11 @@ func TemplateGet(uid, companyId int64, request *protocol.TemplateGetRequest) (rs @@ -739,6 +740,11 @@ func TemplateGet(uid, companyId int64, request *protocol.TemplateGetRequest) (rs
739 rsp.AuditFlowConfig = protocol.AuditFlowConfig{ 740 rsp.AuditFlowConfig = protocol.AuditFlowConfig{
740 NoApprover: int(template.NoApprover), 741 NoApprover: int(template.NoApprover),
741 ProcessConfig: make([]protocol.ProcessConfig, 0), 742 ProcessConfig: make([]protocol.ProcessConfig, 0),
  743 + SelfCheckNeed: template.SelfCheckNeed,
  744 + }
  745 + //兼容旧数据
  746 + if template.SelfCheckNeed == 0 {
  747 + rsp.AuditFlowConfig.SelfCheckNeed = models.AuditSelfCheckNeedYes
742 } 748 }
743 for i := range configs { 749 for i := range configs {
744 config := configs[i] 750 config := configs[i]