|
@@ -317,6 +317,26 @@ func (this *ReportApproveController) List() {
|
|
|
ormList = list
|
|
|
}
|
|
|
|
|
|
+ cnReportIdList := make([]int, 0)
|
|
|
+ for _, v := range ormList {
|
|
|
+ if v.ReportType == report_approve.FlowReportTypeChinese {
|
|
|
+ cnReportIdList = append(cnReportIdList, v.ReportId)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ reportLayoutMap := make(map[int]int8)
|
|
|
+ if len(cnReportIdList) > 0 {
|
|
|
+ layoutList, e := models.GetReportLayoutByReportIdList(cnReportIdList)
|
|
|
+ if e != nil {
|
|
|
+ br.Msg = "获取失败"
|
|
|
+ br.ErrMsg = "GetReportLayoutByReportIdList err: " + e.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for _, v := range layoutList {
|
|
|
+ reportLayoutMap[v.Id] = v.ReportLayout
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 格式化列表
|
|
|
for _, v := range ormList {
|
|
|
t := report_approve.FormatReportApproveOrm2Item(v)
|
|
@@ -333,6 +353,17 @@ func (this *ReportApproveController) List() {
|
|
|
}
|
|
|
t.ReportClassify = reportClassify
|
|
|
}
|
|
|
+
|
|
|
+ // 布局方式
|
|
|
+ {
|
|
|
+ t.ReportLayout = 1
|
|
|
+ if v.ReportType == report_approve.FlowReportTypeChinese {
|
|
|
+ if layout, ok := reportLayoutMap[v.ReportId]; ok {
|
|
|
+ t.ReportLayout = layout
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
respList = append(respList, t)
|
|
|
}
|
|
|
|