fix(#13):修复历史电费核算时未选择园区时显示园区中的数据,选中某一园区时显示不同园区的数据

This commit is contained in:
2023-08-10 14:54:12 +08:00
parent a34aa6ad07
commit 6289257ac1
3 changed files with 4 additions and 7 deletions

View File

@@ -630,7 +630,7 @@ func (rr _ReportRepository) ComprehensiveReportSearch(uid, pid *string, page uin
countQuery = countQuery.Where(goqu.I("ud.id").Eq(*uid))
}
if pid != nil && len(*pid) > 0 {
if pid != nil && *pid != "" {
reportQuery = reportQuery.Where(goqu.I("p.id").Eq(*pid))
countQuery = countQuery.Where(goqu.I("p.id").Eq(*pid))
}
@@ -681,8 +681,6 @@ func (rr _ReportRepository) ComprehensiveReportSearch(uid, pid *string, page uin
rr.log.Error("对指定核算报表进行综合检索总数量时出现错误", zap.Error(err))
return reports, 0, err
}
log.Println(">>>>>>>>>>>>>>>>>>>>>>>>>>", querySql, "1111111111111111111111", countSql, "????????????", count)
return reports, count, nil
}