Переглянути джерело

Merge branch 'bzq/knowledge_add_viewpoint' of eta_gn_server/eta_api into debug

baoziqiang 3 тижнів тому
батько
коміт
c36982ec56
1 змінених файлів з 11 додано та 9 видалено
  1. 11 9
      services/report_v2.go

+ 11 - 9
services/report_v2.go

@@ -185,18 +185,20 @@ func EditReport(reportInfo *models.Report, req models.EditReq, sysUser *system.A
 	reportInfo.LastModifyAdminId = sysUser.AdminId
 	reportInfo.LastModifyAdminName = sysUser.RealName
 	reportInfo.ModifyTime = time.Now()
-
-	state, e := CheckReportCurrState(report_approve.FlowReportTypeChinese, reportInfo.ClassifyIdFirst, reportInfo.ClassifyIdSecond, reportInfo.ClassifyIdThird, models.ReportOperateEdit)
-	if e != nil {
-		//errMsg = "操作失败"
-		err = errors.New("校验报告当前状态失败, Err: " + e.Error())
-		return
+	updateCols := []string{"Title", "Abstract", "Author", "Frequency", "CreateTime", "IsPublicPublish", "LastModifyAdminId", "LastModifyAdminName", "ModifyTime"}
+	if reportInfo.ReportSource != utils.ReportSourceOuter {
+		state, e := CheckReportCurrState(report_approve.FlowReportTypeChinese, reportInfo.ClassifyIdFirst, reportInfo.ClassifyIdSecond, reportInfo.ClassifyIdThird, models.ReportOperateEdit)
+		if e != nil {
+			//errMsg = "操作失败"
+			err = errors.New("校验报告当前状态失败, Err: " + e.Error())
+			return
+		}
+		// 报告状态
+		reportInfo.State = state
+		updateCols = append(updateCols, "State")
 	}
-	// 报告状态
-	reportInfo.State = state
 
 	//updateCols := []string{"ClassifyIdFirst", "ClassifyNameFirst", "ClassifyIdSecond", "ClassifyNameSecond", "ClassifyIdThird", "ClassifyNameThird", "Title", "Abstract", "Author", "Frequency", "Stage", "CreateTime", "IsPublicPublish", "LastModifyAdminId", "LastModifyAdminName", "ModifyTime"}
-	updateCols := []string{"Title", "Abstract", "Author", "Frequency", "CreateTime", "IsPublicPublish", "LastModifyAdminId", "LastModifyAdminName", "ModifyTime", "State"}
 
 	if req.HeadResourceId > 0 {
 		reportInfo.HeadResourceId = req.HeadResourceId