|
@@ -432,10 +432,48 @@ func GetChapterListByReportChapterIdList(classifyNameFirst string, reportId int,
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+func GetReportChapterPermissionMappingItemListByReportId(reportId int, classifyNameFirst string) (content string) {
|
|
|
+ var err error
|
|
|
+ defer func() {
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println(err)
|
|
|
+ go utils.SendAlarmMsg(fmt.Sprint("根据ID获取FICC研报章节内容详情失败 ,GetReportChapterPermissionMappingItemListByReportId err:", err.Error()), 2)
|
|
|
+ }
|
|
|
+ }()
|
|
|
+ chapterList, e := ficc_report.GetListByReportId(reportId, classifyNameFirst)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("GetListByReportId, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for _, v := range chapterList {
|
|
|
+ bodyText, _ := GetReportContentTextSubNew(v.Content)
|
|
|
+ content += bodyText
|
|
|
+ }
|
|
|
+ fmt.Println(content)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
func GetFiccRreportToCygxArticle(cont context.Context) (err error) {
|
|
|
|
|
@@ -501,7 +539,12 @@ func GetFiccRreportToCygxArticle(cont context.Context) (err error) {
|
|
|
item.Title = "FICC/周期品晨会纪要"
|
|
|
}
|
|
|
item.CategoryName = utils.ZHOU_QI_NAME
|
|
|
- item.Body = v.Content
|
|
|
+
|
|
|
+ if v.Content == "" {
|
|
|
+ item.Body = GetReportChapterPermissionMappingItemListByReportId(v.Id, v.ClassifyNameFirst)
|
|
|
+ } else {
|
|
|
+ item.Body = v.Content
|
|
|
+ }
|
|
|
item.Abstract = v.Abstract
|
|
|
item.FieldName = v.ClassifyNameSecond
|
|
|
item.CreateDate = time.Now().Format(utils.FormatDate)
|