|
@@ -713,20 +713,15 @@ func (this *ReportController) GetDayWeekChapter() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- chapterInfo, err := models.GetReportChapterInfoById(reportChapterId)
|
|
|
+ chapterItem, err := models.GetReportChapterItemById(reportChapterId)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取章节信息失败"
|
|
|
br.ErrMsg = "获取章节信息失败, Err: " + err.Error()
|
|
|
return
|
|
|
}
|
|
|
- if chapterInfo != nil {
|
|
|
- chapterInfo.Content = html.UnescapeString(chapterInfo.Content)
|
|
|
- chapterInfo.ContentSub = html.UnescapeString(chapterInfo.ContentSub)
|
|
|
- chapterInfo.ContentStruct = html.UnescapeString(chapterInfo.ContentStruct)
|
|
|
- }
|
|
|
|
|
|
// 获取报告详情
|
|
|
- reportInfo, err := models.GetReportById(chapterInfo.ReportId)
|
|
|
+ reportInfo, err := models.GetReportById(chapterItem.ReportId)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取报告信息失败"
|
|
|
br.ErrMsg = "获取报告信息失败, Err: " + err.Error()
|
|
@@ -746,9 +741,9 @@ func (this *ReportController) GetDayWeekChapter() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- chapterInfo.Content = html.UnescapeString(chapterInfo.Content)
|
|
|
- chapterInfo.ContentSub = html.UnescapeString(chapterInfo.ContentSub)
|
|
|
- chapterInfo.ContentStruct = html.UnescapeString(chapterInfo.ContentStruct)
|
|
|
+ chapterItem.Content = html.UnescapeString(chapterItem.Content)
|
|
|
+ chapterItem.ContentSub = html.UnescapeString(chapterItem.ContentSub)
|
|
|
+ chapterItem.ContentStruct = html.UnescapeString(chapterItem.ContentStruct)
|
|
|
|
|
|
// 授权用户列表map
|
|
|
chapterGrantIdList := make([]int, 0)
|
|
@@ -757,7 +752,7 @@ func (this *ReportController) GetDayWeekChapter() {
|
|
|
// 处理章节id授权用户列表
|
|
|
{
|
|
|
chapterGrantObj := report.ReportChapterGrant{}
|
|
|
- chapterGrantList, tmpErr := chapterGrantObj.GetGrantListById(chapterInfo.ReportChapterId)
|
|
|
+ chapterGrantList, tmpErr := chapterGrantObj.GetGrantListById(chapterItem.ReportChapterId)
|
|
|
if tmpErr != nil {
|
|
|
br.Msg = "获取章节id授权用户列表失败"
|
|
|
br.ErrMsg = "获取章节id授权用户列表失败, Err: " + tmpErr.Error()
|
|
@@ -772,7 +767,7 @@ func (this *ReportController) GetDayWeekChapter() {
|
|
|
// 处理章节id关联品种id列表
|
|
|
{
|
|
|
obj := report.ReportChapterPermissionMapping{}
|
|
|
- chapterPermissionList, tmpErr := obj.GetPermissionListById(chapterInfo.ReportChapterId)
|
|
|
+ chapterPermissionList, tmpErr := obj.GetPermissionListById(chapterItem.ReportChapterId)
|
|
|
if tmpErr != nil {
|
|
|
br.Msg = "获取章节id关联品种列表失败"
|
|
|
br.ErrMsg = "获取章节id关联品种列表失败, Err: " + tmpErr.Error()
|
|
@@ -784,15 +779,15 @@ func (this *ReportController) GetDayWeekChapter() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- resp := models.ReportChapterItem{
|
|
|
- ReportChapter: *chapterInfo,
|
|
|
- GrandAdminIdList: chapterGrantIdList,
|
|
|
- PermissionIdList: chapterPermissionIdList,
|
|
|
+ resp := models.ReportChapterItemResp{
|
|
|
+ ReportChapterItem: *chapterItem,
|
|
|
+ GrandAdminIdList: chapterGrantIdList,
|
|
|
+ PermissionIdList: chapterPermissionIdList,
|
|
|
}
|
|
|
|
|
|
// 获取当前编辑状态
|
|
|
{
|
|
|
- markStatus, err := services.UpdateReportEditMark(chapterInfo.ReportId, chapterInfo.ReportChapterId, this.SysUser.AdminId, 2, this.SysUser.RealName, this.Lang)
|
|
|
+ markStatus, err := services.UpdateReportEditMark(chapterItem.ReportId, chapterItem.ReportChapterId, this.SysUser.AdminId, 2, this.SysUser.RealName, this.Lang)
|
|
|
if err != nil {
|
|
|
br.Msg = "查询标记状态失败"
|
|
|
br.ErrMsg = "查询标记状态失败,Err:" + err.Error()
|