|
@@ -4,6 +4,7 @@ import (
|
|
|
"archive/zip"
|
|
|
"errors"
|
|
|
"eta/eta_api/models"
|
|
|
+ "eta/eta_api/models/company"
|
|
|
"eta/eta_api/models/report"
|
|
|
"eta/eta_api/models/report_approve"
|
|
|
"eta/eta_api/models/system"
|
|
@@ -1413,6 +1414,17 @@ func UpdateReportVideo(reportInfo *models.Report) {
|
|
|
if reportInfo.VideoUrl != "" && reportInfo.VideoName != "" && reportInfo.VideoSize != "" && reportInfo.VideoPlaySeconds != "" {
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ weekClassifyId, err := company.GetReportClassifyIdByConfigKey("report_week_classify_id")
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ msg := "获取周报ID配置失败:" + err.Error()
|
|
|
+ utils.FileLog.Info(msg)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if reportInfo.ClassifyIdFirst == weekClassifyId {
|
|
|
+ return
|
|
|
+ }
|
|
|
videoUrl, videoName, videoSize, videoPlaySeconds, e := CreateReportVideo(reportInfo.Title, html.UnescapeString(reportContent), time.Now().Format(utils.FormatDateTime))
|
|
|
if e != nil {
|
|
|
err = e
|