|
@@ -126,9 +126,8 @@ func (this *ReportController) ListReport() {
|
|
|
switch filterReportType {
|
|
|
// 筛选报告类型,1:公共研报,2:共享研报,3:我的研报
|
|
|
case 1:
|
|
|
- condition += ` AND a.is_public_publish = ? `
|
|
|
- // TODO 临时使用,提测上线前得打开注释
|
|
|
- //condition += ` AND a.state in (2,6) `
|
|
|
+ //condition += ` AND a.is_public_publish = ? `
|
|
|
+ condition += ` AND a.state in (2,6) `
|
|
|
pars = append(pars, 1)
|
|
|
case 3:
|
|
|
condition += ` AND a.admin_id = ? `
|
|
@@ -1116,8 +1115,6 @@ func (this *ReportController) EditLayoutImg() {
|
|
|
br.Data = resp
|
|
|
}
|
|
|
|
|
|
-// TODO 修复历史报告的ES数据
|
|
|
-
|
|
|
// init
|
|
|
// @Description: 修复历史报告数据
|
|
|
// @author: Roc
|
|
@@ -1125,6 +1122,7 @@ func (this *ReportController) EditLayoutImg() {
|
|
|
func init() {
|
|
|
//fixApproveRecord()
|
|
|
//fixChapterPermission()
|
|
|
+ //fixReportEs()
|
|
|
}
|
|
|
|
|
|
// 修复研报审批数据
|
|
@@ -1164,8 +1162,6 @@ func fixApproveRecord() {
|
|
|
fmt.Println("审批数据修复完成")
|
|
|
}
|
|
|
|
|
|
-// TODO 审批列表,分类三级展示
|
|
|
-
|
|
|
// fixChapterPermission
|
|
|
// @Description: 修复章节关联的品种权限
|
|
|
// @author: Roc
|
|
@@ -1229,3 +1225,54 @@ func fixChapterPermission() {
|
|
|
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+// fixReportEs
|
|
|
+// @Description: 修复报告es数据
|
|
|
+// @author: Roc
|
|
|
+// @datetime 2024-06-20 18:08:34
|
|
|
+func fixReportEs() {
|
|
|
+
|
|
|
+ //reportInfo, err := models.GetReportByReportId(3941)
|
|
|
+ //if err != nil {
|
|
|
+ // fmt.Println("查询信息失败,", err)
|
|
|
+ // return
|
|
|
+ //}
|
|
|
+ //content := utils.TrimHtml(html.UnescapeString(reportInfo.Content))
|
|
|
+ //fmt.Println(content)
|
|
|
+ //
|
|
|
+ //fmt.Println("=========================")
|
|
|
+ //
|
|
|
+ //chapterInfo, err := models.GetReportChapterInfoById(9637)
|
|
|
+ //if err != nil {
|
|
|
+ // fmt.Println("查询信息失败2,", err)
|
|
|
+ // return
|
|
|
+ //}
|
|
|
+ //
|
|
|
+ //content = utils.TrimHtml(html.UnescapeString(chapterInfo.Content))
|
|
|
+ //fmt.Println(content)
|
|
|
+ //
|
|
|
+ //services.UpdateReportChapterEs(9637)
|
|
|
+ //return
|
|
|
+
|
|
|
+ var condition string
|
|
|
+ var pars []interface{}
|
|
|
+
|
|
|
+ condition += " AND state in (2,6) "
|
|
|
+ list, err := models.GetReportListV1(condition, pars, 0, 100000)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println("查询信息失败,", err)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ num := len(list)
|
|
|
+ fmt.Println(num, "条待修复报告es数据")
|
|
|
+
|
|
|
+ for k, v := range list {
|
|
|
+ fmt.Println("剩余", num-k, "条")
|
|
|
+ services.UpdateReportEs(v.Id, 2)
|
|
|
+ }
|
|
|
+
|
|
|
+ fmt.Println("报告ES数据修复完成")
|
|
|
+
|
|
|
+ return
|
|
|
+}
|