瀏覽代碼

Merge branch 'BI_Dashboard' into dm

zwxi 6 月之前
父節點
當前提交
a92720234b
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 1 1
      models/bi_approve/bi_approve.go
  2. 3 3
      services/bi_approve/bi_approve.go

+ 1 - 1
models/bi_approve/bi_approve.go

@@ -164,7 +164,7 @@ func GetApprovedBiApprovePageList(cond string, pars []interface{}, orderRule str
 
 // GetApplyBiApproveCount 获取我发起的审批分页列表总数
 func GetApplyBiApproveCount(cond string, pars []interface{}) (count int, err error) {
-	base := fmt.Sprintf(`SELECT a.* FROM Bi_approve AS a WHERE 1 = 1 %s`, cond)
+	base := fmt.Sprintf(`SELECT a.* FROM bi_approve AS a WHERE 1 = 1 %s`, cond)
 	sql := fmt.Sprintf(`SELECT COUNT(1) FROM (%s) t`, base)
 	err = global.DmSQL["rddp"].Raw(sql, pars...).Scan(&count).Error
 	return

+ 3 - 3
services/bi_approve/bi_approve.go

@@ -593,9 +593,9 @@ func MyApplyBiApproves(adminId, classifyId, timeType, sortField, sortRule, appro
 			err = e
 			return
 		}
-		tmpEndTime = tmpEndTime.AddDate(0, 0, 1)
-		cond += fmt.Sprintf(` AND (%s BETWEEN ? AND ?)`, timeField[timeType])
-		pars = append(pars, startTime, tmpEndTime)
+		tmpEndTimeStr := tmpEndTime.AddDate(0, 0, 1).Format(utils.FormatDate)
+		cond += fmt.Sprintf(` AND (%s BETWEEN ? AND ?)`, myTimeField[timeType])
+		pars = append(pars, startTime, tmpEndTimeStr)
 	}
 	keyword = strings.TrimSpace(keyword)
 	if keyword != "" {