正在显示
1 个修改的文件
包含
1 行增加
和
1 行删除
| @@ -151,7 +151,7 @@ class ComController extends BaseController | @@ -151,7 +151,7 @@ class ComController extends BaseController | ||
| 151 | $currentDateTime = Carbon::now(); | 151 | $currentDateTime = Carbon::now(); |
| 152 | $startTime = $currentDateTime->subMonth()->startOfMonth()->toDateString(); | 152 | $startTime = $currentDateTime->subMonth()->startOfMonth()->toDateString(); |
| 153 | // 获取上个月的结束时间 | 153 | // 获取上个月的结束时间 |
| 154 | - $endTime = $currentDateTime->subMonth()->endOfMonth()->toDateString(); | 154 | + $endTime = $startTime->copy()->endOfMonth()->toDateString(); |
| 155 | $pv = DB::table('gl_count') | 155 | $pv = DB::table('gl_count') |
| 156 | ->where(['project_id'=>1]) | 156 | ->where(['project_id'=>1]) |
| 157 | ->where('date','>=',$startTime.' 00:00:00') | 157 | ->where('date','>=',$startTime.' 00:00:00') |
-
请 注册 或 登录 后发表评论