|
@@ -1423,8 +1423,8 @@ func (this *ReportController) ResearchDetail() {
|
|
|
// @Description 获取上周纪要汇总内容详情接口
|
|
|
// @Param ArticleId query int true "报告ID"
|
|
|
// @Success 200 {object} models.MinutesSummaryLetailResp
|
|
|
-// @router /minutesSummary/detail [get]
|
|
|
-func (this *ReportController) MinutesDetail() {
|
|
|
+// @router /minutesSummary/detailv4 [get]
|
|
|
+func (this *ReportController) MinutesDetailV4() {
|
|
|
br := new(models.BaseResponse).Init()
|
|
|
defer func() {
|
|
|
this.Data["json"] = br
|
|
@@ -1443,7 +1443,7 @@ func (this *ReportController) MinutesDetail() {
|
|
|
br.ErrMsg = "参数错误"
|
|
|
return
|
|
|
}
|
|
|
- resp := new(models.MinutesSummaryLetailResp)
|
|
|
+ resp := new(models.MinutesSummaryLetailRespV4)
|
|
|
//判断用户权限
|
|
|
hasPermission, err := services.GetUserhasPermission(user)
|
|
|
if err != nil {
|
|
@@ -1466,7 +1466,7 @@ func (this *ReportController) MinutesDetail() {
|
|
|
}
|
|
|
detail.PublishDate = utils.StrTimeToTime(detail.PublishDate).Format(utils.FormatDate)
|
|
|
detail.VideoPlaySeconds = utils.Mp3Time(detail.VideoPlaySeconds)
|
|
|
- listFirst, err := models.GetMinutesSummarylogListAll(articleId)
|
|
|
+ listFirst, err := models.GetMinutesSummarylogListAllV4(articleId)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取失败"
|
|
|
br.ErrMsg = "获取子类信息失败,Err:" + err.Error()
|
|
@@ -1531,6 +1531,93 @@ func (this *ReportController) MinutesDetail() {
|
|
|
br.Data = resp
|
|
|
}
|
|
|
|
|
|
+// @Title 上周纪要汇总内容详情
|
|
|
+// @Description 获取上周纪要汇总内容详情接口
|
|
|
+// @Param ArticleId query int true "报告ID"
|
|
|
+// @Success 200 {object} models.MinutesSummaryLetailResp
|
|
|
+// @router /minutesSummary/detail [get]
|
|
|
+func (this *ReportController) MinutesDetail() {
|
|
|
+ br := new(models.BaseResponse).Init()
|
|
|
+ defer func() {
|
|
|
+ this.Data["json"] = br
|
|
|
+ this.ServeJSON()
|
|
|
+ }()
|
|
|
+ user := this.User
|
|
|
+ if user == nil {
|
|
|
+ br.Msg = "请重新登录"
|
|
|
+ br.Ret = 408
|
|
|
+ return
|
|
|
+ }
|
|
|
+ uid := user.UserId
|
|
|
+ articleId, _ := this.GetInt("ArticleId")
|
|
|
+ if articleId < 0 {
|
|
|
+ br.Msg = "参数错误"
|
|
|
+ br.ErrMsg = "参数错误"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ resp := new(models.MinutesSummaryLetailResp)
|
|
|
+ //判断用户权限
|
|
|
+ hasPermission, err := services.GetUserhasPermission(user)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "获取用户权限信息失败,Err:" + err.Error()
|
|
|
+ }
|
|
|
+ resp.HasPermission = hasPermission
|
|
|
+ if hasPermission != 1 {
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+ br.Msg = "获取成功"
|
|
|
+ br.Data = resp
|
|
|
+ return
|
|
|
+ }
|
|
|
+ detail, err := models.GetCygxMinutesSummaryInfoById(articleId)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "报告不存在,Err:" + err.Error() + "articleId:" + strconv.Itoa(articleId)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ detail.PublishDate = utils.StrTimeToTime(detail.PublishDate).Format("2006-01-02")
|
|
|
+ detail.VideoPlaySeconds = utils.Mp3Time(detail.VideoPlaySeconds)
|
|
|
+ listLog, err := models.GetMinutesSummarylogListAll(articleId)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取失败"
|
|
|
+ br.ErrMsg = "获取子类信息失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for k, v := range listLog {
|
|
|
+ listSonLog, err := models.GetMinutesSummarylogSonListAll(articleId, v.ChartPermissionId)
|
|
|
+ if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ br.Msg = "获取信息失败"
|
|
|
+ br.ErrMsg = "获取信息失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if len(listSonLog) > 0 {
|
|
|
+ listLog[k].List = listSonLog
|
|
|
+ for k2, v2 := range listSonLog {
|
|
|
+ if v2.ReportLink == "0" {
|
|
|
+ listSonLog[k2].ReportLink = ""
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ historyRecord := new(models.CygxReportHistoryRecord)
|
|
|
+ historyRecord.UserId = uid
|
|
|
+ historyRecord.ArticleId = articleId
|
|
|
+ historyRecord.CreateTime = time.Now()
|
|
|
+ historyRecord.Mobile = user.Mobile
|
|
|
+ historyRecord.Email = user.Email
|
|
|
+ historyRecord.CompanyId = user.CompanyId
|
|
|
+ historyRecord.CompanyName = user.CompanyName
|
|
|
+ historyRecord.ReportType = "szjyhz"
|
|
|
+ go models.AddCygxReportHistoryRecord(historyRecord)
|
|
|
+ resp.List = listLog
|
|
|
+ resp.Detail = detail
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+ br.Msg = "获取成功"
|
|
|
+ br.Data = resp
|
|
|
+}
|
|
|
+
|
|
|
// @Title 获取路演精华详情
|
|
|
// @Description 获取路演精华详情接口
|
|
|
// @Param ArticleId query int true "报告ID"
|