|
@@ -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
|