|
@@ -102,6 +102,7 @@ func (this *ReportApproveController) List() {
|
|
|
respTotal := 0
|
|
|
respList := make([]*report_approve.ReportApproveItem, 0)
|
|
|
timeField := map[int]string{1: fmt.Sprintf("a.%s", report_approve.ReportApproveCols.CreateTime), 2: fmt.Sprintf("b.%s", report_approve.ReportApproveRecordCols.ApproveTime), 3: fmt.Sprintf("b.%s", report_approve.ReportApproveCols.ApproveTime)}
|
|
|
+ mineTimeField := map[int]string{1: fmt.Sprintf("%s", report_approve.ReportApproveCols.CreateTime), 3: fmt.Sprintf("%s", report_approve.ReportApproveCols.ApproveTime)}
|
|
|
orderRules := map[int]string{1: "ASC", 2: "DESC"}
|
|
|
ormList := make([]*report_approve.ReportApproveItemOrm, 0)
|
|
|
|
|
@@ -263,7 +264,12 @@ func (this *ReportApproveController) List() {
|
|
|
}
|
|
|
st := fmt.Sprintf("%s %s", params.StartTime, "00:00:00")
|
|
|
ed := fmt.Sprintf("%s %s", params.EndTime, "23:59:59")
|
|
|
- cond += fmt.Sprintf(` AND (%s BETWEEN ? AND ?)`, timeField[params.TimeType])
|
|
|
+ field := mineTimeField[params.TimeType]
|
|
|
+ if field == "" {
|
|
|
+ br.Msg = "筛选时间有误"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ cond += fmt.Sprintf(` AND (%s BETWEEN ? AND ?)`, field)
|
|
|
pars = append(pars, st, ed)
|
|
|
}
|
|
|
params.Keyword = strings.TrimSpace(params.Keyword)
|