|
@@ -432,10 +432,48 @@ func GetChapterListByReportChapterIdList(classifyNameFirst string, reportId int,
|
|
|
}
|
|
|
|
|
|
//func init() {
|
|
|
-// GetFiccRreportToCygxArticle()
|
|
|
+// var condition string
|
|
|
+// var pars []interface{}
|
|
|
+// condition += ` AND report_id > 0 AND body = '' `
|
|
|
+// articleList, e := models.GetCygxCygxArticleList(condition, pars, 0, 99)
|
|
|
+// if e != nil {
|
|
|
+// fmt.Println(e)
|
|
|
+// return
|
|
|
+// }
|
|
|
+// for k, v := range articleList {
|
|
|
+// fmt.Println("kkk", k)
|
|
|
+// content := GetReportChapterPermissionMappingItemListByReportId(v.ReportId, "晨会纪要")
|
|
|
+// e = models.ModifyArticleFiccBodyByreport_id(v.ReportId, content)
|
|
|
+// if e != nil {
|
|
|
+// fmt.Println(e)
|
|
|
+// return
|
|
|
+// }
|
|
|
+// }
|
|
|
// //UpdateFICCReportResourceData(5542)
|
|
|
//}
|
|
|
|
|
|
+// 根据ID获取FICC研报章节内容详情
|
|
|
+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
|
|
|
+}
|
|
|
+
|
|
|
// 获取FICC研报到查研观向数据库中
|
|
|
func GetFiccRreportToCygxArticle(cont context.Context) (err error) {
|
|
|
//func GetFiccRreportToCygxArticle() (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)
|