|
|
@@ -496,8 +496,12 @@ class FinanceRepository extends BaseRepository
|
|
496
|
496
|
$nextMonday = new \DateTime();
|
|
497
|
497
|
$nextMonday->setISODate($year, $week + 1, 1);
|
|
498
|
498
|
|
|
|
499
|
+ // 上周一:周数减1
|
|
|
500
|
+ $lastMonday = new \DateTime();
|
|
|
501
|
+ $lastMonday->setISODate($year, $week - 1, 1);
|
|
|
502
|
+
|
|
499
|
503
|
//上周时间条件
|
|
500
|
|
- $sWeekWhere .= " and DATE(create_time) >= '" . $startDate . "' and DATE(create_time) <= '" . $endDate . "'";
|
|
|
504
|
+ $sWeekWhere .= " and DATE(create_time) >= '" . $lastMonday->format('Y-m-d') . "' and DATE(create_time) <= '" . $thisMonday->format('Y-m-d') . "'";
|
|
501
|
505
|
//周时间条件
|
|
502
|
506
|
$weekWhere .= " and DATE(create_time) >= '" . $thisMonday->format('Y-m-d') . "' and DATE(create_time) <= '" . $nextMonday->format('Y-m-d') . "'";
|
|
503
|
507
|
//今日时间条件
|