liugc 9 месяцев назад
Родитель
Сommit
e0923dae10

+ 4 - 4
app/adminapi/logic/master_worker/EngineerSettlementPermanentlyLogic.php

@@ -270,7 +270,7 @@ class EngineerSettlementPermanentlyLogic extends BaseLogic
     {
         try {
             // 限制每周一才能结算上周
-            //if(date("w") != 1) return false;
+            if(date("w") != 1) return false;
 
             // 兼职工程师-每周 period_type = 2
             self::partTimeMaster($masterWorker_id,2);
@@ -295,7 +295,7 @@ class EngineerSettlementPermanentlyLogic extends BaseLogic
 
         try {
             // 限制每月一才能结算上月
-            //if((int)date("d") != 1) return false;
+            if((int)date("d") != 1) return false;
 
             // 保单工程师 period_type = 3
             self::longTermMaster($masterWorker_id,3);
@@ -512,7 +512,7 @@ class EngineerSettlementPermanentlyLogic extends BaseLogic
         $last_week_sunday->modify('+6 days');
         $last_week_start = $last_week_monday->getTimestamp(); // 上周一零点时间戳
         $last_week_end = $last_week_sunday->getTimestamp()+86399;   // 上周日零点时间戳
-        return [$last_week_start + 7*86400,$last_week_end + 7*86400];
+        return [$last_week_start,$last_week_end];
         /*return [
             'startTime' => $last_week_start,
             'endTime' => $last_week_end
@@ -530,7 +530,7 @@ class EngineerSettlementPermanentlyLogic extends BaseLogic
         $firstDayOfLastMonth->modify('-1 month')->setTime(0, 0, 0); // 上个月的第一天
         $last_manth_start = $firstDayOfLastMonth->getTimestamp();
         $last_manth_end = $lastDayOfLastMonth->getTimestamp();
-        return [$last_manth_start + 30*86400,$last_manth_end + 30*86400];
+        return [$last_manth_start,$last_manth_end];
         /*return [
             'startTime' => $last_manth_start,
             'endTime' => $last_manth_end