|
|
@@ -464,6 +464,18 @@ class FinanceRepository extends BaseRepository
|
|
464
|
464
|
$sWeekWhere = " 1=1";
|
|
465
|
465
|
$weekWhere = " 1=1";
|
|
466
|
466
|
$dayWhere = " 1=1";
|
|
|
467
|
+
|
|
|
468
|
+ // 需要过滤掉的用户
|
|
|
469
|
+ /** @var UserRepository $userRepository */
|
|
|
470
|
+ $userRepository = app()->make(UserRepository::class);
|
|
|
471
|
+ $invalidUidList = $userRepository->getInvalidUidList();
|
|
|
472
|
+ if (!empty($invalidUidList)) {
|
|
|
473
|
+ $invalidSqlStr = ' AND uid NOT IN (' . implode(',', $invalidUidList) . ')';
|
|
|
474
|
+ $where .= $invalidSqlStr;
|
|
|
475
|
+ $sWeekWhere .= $invalidSqlStr;
|
|
|
476
|
+ $weekWhere .= $invalidSqlStr;
|
|
|
477
|
+ $dayWhere .= $invalidSqlStr;
|
|
|
478
|
+ }
|
|
467
|
479
|
|
|
468
|
480
|
$currentDate = date('Y-m-d');
|
|
469
|
481
|
// 上周的开始日期(周一)
|
|
|
@@ -517,7 +529,19 @@ class FinanceRepository extends BaseRepository
|
|
517
|
529
|
$sWeekWhere = " 1=1";
|
|
518
|
530
|
$weekWhere = " 1=1";
|
|
519
|
531
|
$dayWhere = " 1=1";
|
|
520
|
|
-
|
|
|
532
|
+
|
|
|
533
|
+ // 需要过滤掉的用户
|
|
|
534
|
+ /** @var UserRepository $userRepository */
|
|
|
535
|
+ $userRepository = app()->make(UserRepository::class);
|
|
|
536
|
+ $invalidUidList = $userRepository->getInvalidUidList();
|
|
|
537
|
+ if (!empty($invalidUidList)) {
|
|
|
538
|
+ $invalidSqlStr = ' AND uid NOT IN (' . implode(',', $invalidUidList) . ')';
|
|
|
539
|
+ $where .= $invalidSqlStr;
|
|
|
540
|
+ $sWeekWhere .= $invalidSqlStr;
|
|
|
541
|
+ $weekWhere .= $invalidSqlStr;
|
|
|
542
|
+ $dayWhere .= $invalidSqlStr;
|
|
|
543
|
+ }
|
|
|
544
|
+
|
|
521
|
545
|
$currentDate = date('Y-m-d');
|
|
522
|
546
|
// 上周的开始日期(周一)
|
|
523
|
547
|
$startDate = date('Y-m-d', strtotime('last Monday', strtotime($currentDate)));
|
|
|
@@ -574,6 +598,18 @@ class FinanceRepository extends BaseRepository
|
|
574
|
598
|
$sWeekWhere = " 1=1";
|
|
575
|
599
|
$weekWhere = " 1=1";
|
|
576
|
600
|
$dayWhere = " 1=1";
|
|
|
601
|
+
|
|
|
602
|
+ // 需要过滤掉的用户
|
|
|
603
|
+ /** @var UserRepository $userRepository */
|
|
|
604
|
+ $userRepository = app()->make(UserRepository::class);
|
|
|
605
|
+ $invalidUidList = $userRepository->getInvalidUidList();
|
|
|
606
|
+ if (!empty($invalidUidList)) {
|
|
|
607
|
+ $invalidSqlStr = ' AND uid NOT IN (' . implode(',', $invalidUidList) . ')';
|
|
|
608
|
+ $where .= $invalidSqlStr;
|
|
|
609
|
+ $sWeekWhere .= $invalidSqlStr;
|
|
|
610
|
+ $weekWhere .= $invalidSqlStr;
|
|
|
611
|
+ $dayWhere .= $invalidSqlStr;
|
|
|
612
|
+ }
|
|
577
|
613
|
|
|
578
|
614
|
$currentDate = date('Y-m-d');
|
|
579
|
615
|
// 上周的开始日期(周一)
|
|
|
@@ -633,6 +669,18 @@ class FinanceRepository extends BaseRepository
|
|
633
|
669
|
$bill_where = "commission_type !=5 and source=0 ";
|
|
634
|
670
|
$yanglao_where = " commission_type =5 and source=0 ";
|
|
635
|
671
|
}
|
|
|
672
|
+ // 需要过滤掉的用户
|
|
|
673
|
+ /** @var UserRepository $userRepository */
|
|
|
674
|
+ $userRepository = app()->make(UserRepository::class);
|
|
|
675
|
+ $invalidUidList = $userRepository->getInvalidUidList();
|
|
|
676
|
+ if (!empty($invalidUidList)) {
|
|
|
677
|
+ $invalidSqlStr = ' AND uid NOT IN (' . implode(',', $invalidUidList) . ')';
|
|
|
678
|
+ $where .= $invalidSqlStr;
|
|
|
679
|
+ $where_order .= $invalidSqlStr;
|
|
|
680
|
+ $bill_where .= $invalidSqlStr;
|
|
|
681
|
+ $yanglao_where .= $invalidSqlStr;
|
|
|
682
|
+ }
|
|
|
683
|
+
|
|
636
|
684
|
if ($type == 1 and $day != '') {
|
|
637
|
685
|
$lastDay = date('Y-m-d', strtotime($day));
|
|
638
|
686
|
$day = $lastDay;
|