|
@@ -321,6 +321,17 @@ func (this *ReportController) PublishReport() {
|
|
|
// 更新报告Es
|
|
|
_ = services.UpdateReportEs(report.Id, 2)
|
|
|
}()
|
|
|
+ recordItem := &models.ReportStateRecord{
|
|
|
+ ReportId: vint,
|
|
|
+ ReportType: 1,
|
|
|
+ State: 2,
|
|
|
+ AdminId: this.SysUser.AdminId,
|
|
|
+ AdminName: this.SysUser.AdminName,
|
|
|
+ CreateTime: time.Now(),
|
|
|
+ }
|
|
|
+ go func() {
|
|
|
+ _, _ = models.AddReportStateRecord(recordItem)
|
|
|
+ }()
|
|
|
}
|
|
|
}
|
|
|
// 发布晨周报部分章节未发布的提示
|
|
@@ -386,11 +397,23 @@ func (this *ReportController) PublishCancleReport() {
|
|
|
br.ErrMsg = "获取审批流配置失败, Err: " + e.Error()
|
|
|
return
|
|
|
}
|
|
|
- if confTmp.ConfigValue == "1" || confTmp.ConfigValue == "2" || confTmp.ConfigValue == "3"{
|
|
|
+ if confTmp.ConfigValue == "1" || confTmp.ConfigValue == "2" || confTmp.ConfigValue == "3" {
|
|
|
br.Msg = "撤销成功"
|
|
|
} else {
|
|
|
br.Msg = "取消发布成功"
|
|
|
}
|
|
|
+
|
|
|
+ recordItem := &models.ReportStateRecord{
|
|
|
+ ReportId: req.ReportIds,
|
|
|
+ ReportType: 1,
|
|
|
+ State: 1,
|
|
|
+ AdminId: this.SysUser.AdminId,
|
|
|
+ AdminName: this.SysUser.AdminName,
|
|
|
+ CreateTime: time.Now(),
|
|
|
+ }
|
|
|
+ go func() {
|
|
|
+ _, _ = models.AddReportStateRecord(recordItem)
|
|
|
+ }()
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|
|
|
}
|
|
@@ -529,6 +552,18 @@ func (this *ReportController) Add() {
|
|
|
}()
|
|
|
}
|
|
|
|
|
|
+ recordItem := &models.ReportStateRecord{
|
|
|
+ ReportId: int(newReportId),
|
|
|
+ ReportType: 1,
|
|
|
+ State: 1,
|
|
|
+ AdminId: this.SysUser.AdminId,
|
|
|
+ AdminName: this.SysUser.AdminName,
|
|
|
+ CreateTime: time.Now(),
|
|
|
+ }
|
|
|
+ go func() {
|
|
|
+ _, _ = models.AddReportStateRecord(recordItem)
|
|
|
+ }()
|
|
|
+
|
|
|
resp := new(models.AddResp)
|
|
|
resp.ReportId = newReportId
|
|
|
resp.ReportCode = reportCode
|
|
@@ -614,6 +649,19 @@ func (this *ReportController) Edit() {
|
|
|
br.ErrMsg = "该报告已发布,不允许编辑"
|
|
|
return
|
|
|
}
|
|
|
+ if req.State != report.State {
|
|
|
+ recordItem := &models.ReportStateRecord{
|
|
|
+ ReportId: int(req.ReportId),
|
|
|
+ ReportType: 1,
|
|
|
+ State: req.State,
|
|
|
+ AdminId: this.SysUser.AdminId,
|
|
|
+ AdminName: this.SysUser.AdminName,
|
|
|
+ CreateTime: time.Now(),
|
|
|
+ }
|
|
|
+ go func() {
|
|
|
+ _, _ = models.AddReportStateRecord(recordItem)
|
|
|
+ }()
|
|
|
+ }
|
|
|
|
|
|
item := new(models.Report)
|
|
|
item.ClassifyIdFirst = req.ClassifyIdFirst
|