ziwen 1 rok temu
rodzic
commit
4504c8efeb
1 zmienionych plików z 14 dodań i 1 usunięć
  1. 14 1
      controllers/report.go

+ 14 - 1
controllers/report.go

@@ -3,6 +3,7 @@ package controllers
 import (
 	"encoding/json"
 	"eta/eta_api/models"
+	"eta/eta_api/models/company"
 	"eta/eta_api/services"
 	"eta/eta_api/services/alarm_msg"
 	"eta/eta_api/utils"
@@ -377,9 +378,21 @@ func (this *ReportController) PublishCancleReport() {
 		go services.UpdateReportEs(req.ReportIds, 1)
 	}
 
+	// 获取审批流设置
+	confKey := "approval_flow"
+	confTmp, e := company.GetConfigDetailByCode(confKey)
+	if e != nil {
+		br.Msg = "获取审批流配置失败"
+		br.ErrMsg = "获取审批流配置失败, Err: " + e.Error()
+		return
+	}
+	if confTmp.ConfigValue == "1" || confTmp.ConfigValue == "2" || confTmp.ConfigValue == "3"{
+		br.Msg = "撤销成功"
+	} else {
+		br.Msg = "取消发布成功"
+	}
 	br.Ret = 200
 	br.Success = true
-	br.Msg = "取消发布成功"
 }
 
 // Delete