|
@@ -8,10 +8,11 @@ import (
|
|
|
"eta/eta_api/services"
|
|
|
"eta/eta_api/utils"
|
|
|
"fmt"
|
|
|
- "github.com/rdlucklib/rdluck_tools/paging"
|
|
|
"strings"
|
|
|
"sync"
|
|
|
"time"
|
|
|
+
|
|
|
+ "github.com/rdlucklib/rdluck_tools/paging"
|
|
|
)
|
|
|
|
|
|
|
|
@@ -141,16 +142,35 @@ func (this *ReportApproveFlowController) List() {
|
|
|
for _, v := range list {
|
|
|
t := report_approve.FormatReportApproveFlow2Item(v)
|
|
|
if v.ReportType == report_approve.FlowReportTypeEnglish {
|
|
|
- t.ReportClassify = fmt.Sprintf("%s/%s/%s/%s", report_approve.FlowReportTypeMap[v.ReportType], enClassifyIdName[enRootIdMap[v.ClassifySecondId]], enClassifyIdName[v.ClassifyFirstId], enClassifyIdName[v.ClassifySecondId])
|
|
|
+ var classifyPath []string
|
|
|
+ if v.ReportType > 0 {
|
|
|
+ classifyPath = append(classifyPath, report_approve.FlowReportTypeMap[v.ReportType])
|
|
|
+ }
|
|
|
+ if v.ClassifyFirstId > 0 {
|
|
|
+ classifyPath = append(classifyPath, enClassifyIdName[v.ClassifyFirstId])
|
|
|
+ }
|
|
|
+ if v.ClassifySecondId > 0 {
|
|
|
+ classifyPath = append(classifyPath, enClassifyIdName[v.ClassifySecondId])
|
|
|
+ }
|
|
|
+ if v.ClassifyThirdId > 0 {
|
|
|
+ classifyPath = append(classifyPath, enClassifyIdName[v.ClassifyThirdId])
|
|
|
+ }
|
|
|
+ t.ReportClassify = strings.Join(classifyPath, "/")
|
|
|
} else {
|
|
|
- reportClassify := fmt.Sprintf("%s/%s", report_approve.FlowReportTypeMap[v.ReportType], cnClassifyIdName[v.ClassifyFirstId])
|
|
|
+ var classifyPath []string
|
|
|
+ if v.ReportType > 0 {
|
|
|
+ classifyPath = append(classifyPath, report_approve.FlowReportTypeMap[v.ReportType])
|
|
|
+ }
|
|
|
+ if v.ClassifyFirstId > 0 {
|
|
|
+ classifyPath = append(classifyPath, cnClassifyIdName[v.ClassifyFirstId])
|
|
|
+ }
|
|
|
if v.ClassifySecondId > 0 {
|
|
|
- reportClassify = fmt.Sprintf("%s/%s", reportClassify, cnClassifyIdName[v.ClassifySecondId])
|
|
|
+ classifyPath = append(classifyPath, cnClassifyIdName[v.ClassifySecondId])
|
|
|
}
|
|
|
if v.ClassifyThirdId > 0 {
|
|
|
- reportClassify = fmt.Sprintf("%s/%s", reportClassify, cnClassifyIdName[v.ClassifyThirdId])
|
|
|
+ classifyPath = append(classifyPath, cnClassifyIdName[v.ClassifyThirdId])
|
|
|
}
|
|
|
- t.ReportClassify = reportClassify
|
|
|
+ t.ReportClassify = strings.Join(classifyPath, "/")
|
|
|
}
|
|
|
resp.List = append(resp.List, t)
|
|
|
}
|