|
@@ -701,19 +701,51 @@ func (this *ReportController) IndustryListByDepartment() {
|
|
|
subjectNamesNew = strings.TrimRight(subjectNamesNew, "/")
|
|
|
artList[k2].SubjectName = subjectNamesNew
|
|
|
artList[k2].DepartmentId = v.DepartmentId
|
|
|
- artList[k2].IndustryName = industryName + "-" + subjectNamesNew
|
|
|
+ if subjectNamesNew == "" {
|
|
|
+ artList[k2].IndustryName = industryName
|
|
|
+ } else {
|
|
|
+ artList[k2].IndustryName = industryName + "-" + subjectNamesNew
|
|
|
+ }
|
|
|
+ if artList[k2].IsReport == "1" {
|
|
|
+ artList[k2].IndustryName = "【观点】" + artList[k2].IndustryName
|
|
|
+ } else {
|
|
|
+ artList[k2].IndustryName = "【纪要】" + artList[k2].IndustryName
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
list[k].List = artList
|
|
|
if v.FollowNum > 0 {
|
|
|
list[k].IsMyFollow = true
|
|
|
}
|
|
|
}
|
|
|
- resp.ListnNew, err = models.GetIndustrialSubjectByDepartmentNew()
|
|
|
+ listnNew, err := models.GetIndustrialSubjectByDepartmentNew()
|
|
|
if err != nil {
|
|
|
br.Msg = "获取信息失败"
|
|
|
br.ErrMsg = "获取品种信息失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ if len(listnNew) > 0 {
|
|
|
+ for _, v := range listnNew {
|
|
|
+ Management := new(models.IndustrialManagementIdInt)
|
|
|
+ //fmt.Println(v)
|
|
|
+ if v.SubjectNames != "" {
|
|
|
+ var subjectNamesNew string
|
|
|
+ slice := strings.Split(v.SubjectNames, ",")
|
|
|
+ for k1, v1 := range slice {
|
|
|
+ if k1 < 4 && k1 < len(slice)-1 {
|
|
|
+ subjectNamesNew += v1 + "/"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ subjectNamesNew = strings.TrimRight(subjectNamesNew, "/")
|
|
|
+ Management.IndustryName = subjectNamesNew
|
|
|
+ } else {
|
|
|
+ Management.IndustryName = v.IndustryName
|
|
|
+ }
|
|
|
+ Management.IndustrialManagementId = v.IndustrialManagementId
|
|
|
+ resp.ListnNew = append(resp.ListnNew, Management)
|
|
|
+ }
|
|
|
+ }
|
|
|
resp.List = list
|
|
|
resp.Paging = page
|
|
|
br.Ret = 200
|
|
@@ -903,7 +935,7 @@ func (this *ReportController) ReportList() {
|
|
|
return
|
|
|
}
|
|
|
page = paging.GetPaging(currentIndex, pageSize, total)
|
|
|
- condition += ` AND art.is_report =1 GROUP BY art.article_id ORDER BY art.publish_date DESC`
|
|
|
+ condition += ` GROUP BY art.article_id ORDER BY art.publish_date DESC`
|
|
|
list, err := models.IndustrialToArticleWhichDepartment(condition, pars, uid, startSize, pageSize)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取失败"
|