Просмотр исходного кода

Merge branch 'master' into feature/dev-frontend-ui

kevin_zhangl 3 лет назад
Родитель
Сommit
dd80fb64db
100 измененных файлов с 663 добавлено и 504 удалено
  1. 22 7
      backendApi/modules/v1/controllers/CalcController.php
  2. 0 0
      backendApi/modules/v1/models/exportForms/BaShopExportForm.php
  3. 0 0
      backendApi/modules/v1/models/exportForms/BaUserExportForm.php
  4. 0 0
      backendApi/modules/v1/models/lists/shop/BaOrderList.php
  5. 0 0
      backendApi/modules/v1/models/lists/shop/BaUserList.php
  6. 0 0
      backendApi/modules/v1/models/lists/shop/FlowRemainPvList.php
  7. 0 0
      backendApi/modules/v1/models/lists/shop/RemainPvList.php
  8. 0 0
      backendApi/modules/v1/models/lists/user/BaUserList.php
  9. 0 0
      backendEle/src/views/article/detail.vue
  10. 0 0
      backendEle/src/views/bonus/perf-adjustment.vue
  11. 34 31
      backendEle/src/views/bonus/period.vue
  12. 0 0
      backendEle/src/views/shop/ba-dec-order-list.vue
  13. 0 0
      backendEle/src/views/shop/ba-order-list.vue
  14. 0 0
      backendEle/src/views/shop/flow-remain-pv.vue
  15. 0 0
      backendEle/src/views/shop/remain-pv.vue
  16. 0 0
      backendEle/src/views/user/ba-user-list.vue
  17. 4 2
      common/components/SwooleAsyncTimer.php
  18. 0 0
      common/helpers/DingTalk.php
  19. 9 0
      common/helpers/bonus/Calc/BaseBusiness.php
  20. 0 0
      common/helpers/bonus/Calc/BasePerfBusiness.php
  21. 77 15
      common/helpers/bonus/Calc/CalcConsole.php
  22. 27 25
      common/helpers/bonus/Calc/GeneratePerfOrder.php
  23. 83 3
      common/helpers/bonus/Calc/PullCalcBonusData.php
  24. 2 1
      common/helpers/bonus/Calc/PullPerfDataFromCalc.php
  25. 56 49
      common/helpers/bonus/Calc/PushBaseDataToCalc.php
  26. 0 0
      common/libs/export/module/BaShopExport.php
  27. 0 0
      common/libs/export/module/BaUserExport.php
  28. 0 0
      common/models/ApproachDecOrder.php
  29. 0 0
      common/models/ApproachOrderCall.php
  30. 0 0
      common/models/BaApproachDecOrder.php
  31. 0 0
      common/models/BaApproachOrder.php
  32. 0 0
      common/models/BaApproachOrderGoods.php
  33. 0 0
      common/models/BaDecOrder.php
  34. 0 0
      common/models/BaOrder.php
  35. 0 0
      common/models/BaOrderGoods.php
  36. 0 0
      common/models/BaReceiveAddress.php
  37. 0 0
      common/models/BaUser.php
  38. 0 0
      common/models/BaUserInfo.php
  39. 0 0
      common/models/CalcBonusQuarter.php
  40. 0 0
      common/models/CalcBonusVilla.php
  41. 0 0
      common/models/CalcRecord.php
  42. 0 0
      common/models/FlowRemainPv.php
  43. 0 0
      common/models/FlowVillaPoints.php
  44. 1 1
      common/models/Order.php
  45. 41 2
      common/models/Period.php
  46. 0 0
      common/models/RemainPv.php
  47. 0 0
      common/models/forms/ApproachDeclarationForm.php
  48. 0 0
      common/models/forms/ApproachDeclarationLoopForm.php
  49. 0 0
      common/models/forms/ApproachDeclarationUpgradeForm.php
  50. 0 0
      common/models/forms/BaApproachDeclarationForm.php
  51. 0 0
      common/models/forms/BaApproachDeclarationLoopForm.php
  52. 0 0
      common/models/forms/BaApproachOrderForm.php
  53. 0 0
      common/models/forms/BaDeclarationForm.php
  54. 0 0
      common/models/forms/BaDeclarationLoopForm.php
  55. 0 0
      common/models/forms/BaReceiveAddressForm.php
  56. 0 0
      common/models/forms/BaUserBasicForm.php
  57. 0 0
      common/models/forms/BaUserForm.php
  58. 0 0
      common/models/forms/PerfAdjustmentForm.php
  59. 35 0
      common/models/forms/PeriodForm.php
  60. 0 0
      common/models/forms/UserBonusForm.php
  61. 0 0
      common/traits/ResponseTrait.php
  62. 2 2
      composer.json
  63. 254 363
      composer.lock
  64. 16 3
      console/controllers/CalcController.php
  65. 0 0
      frontendApi/config/menuBA.php
  66. 0 0
      frontendApi/modules/v1/components/BrandAuth.php
  67. 0 0
      frontendApi/modules/v1/controllers/BaController.php
  68. 0 0
      frontendApi/modules/v1/models/brand/User.php
  69. 0 0
      frontendEle/src/static/img/ngds-logo.jpg
  70. 0 0
      frontendEle/src/utils/config_trial.js
  71. 0 0
      frontendEle/src/views/atlas/brand-ambassador-list.vue
  72. 0 0
      frontendEle/src/views/atlas/relation.vue
  73. 0 0
      frontendEle/src/views/bonus/historical-cumulative-bonus.vue
  74. 0 0
      frontendEle/src/views/bonus/teams.vue
  75. 0 0
      frontendEle/src/views/config/ba-receive-address-edit.vue
  76. 0 0
      frontendEle/src/views/config/ba-receive-address-list.vue
  77. 0 0
      frontendEle/src/views/dashboard/ba-index.vue
  78. 0 0
      frontendEle/src/views/shop/ba-dec-order-list.vue
  79. 0 0
      frontendEle/src/views/shop/ba-order-list.vue
  80. 0 0
      frontendEle/src/views/shop/ba-product-list.vue
  81. 0 0
      frontendEle/src/views/shop/ba-shopping-cart.vue
  82. 0 0
      frontendEle/src/views/user/ba-dec.vue
  83. 0 0
      frontendEle/src/views/user/ba-info.vue
  84. 0 0
      frontendEle/src/views/user/ba-password.vue
  85. 0 0
      sql/StoredProcedure-NG.sql
  86. 0 0
      sql/coco_milk_0524_fc.sql
  87. 0 0
      sql/upgrade/1350.sql
  88. 0 0
      sql/upgrade/1462.sql
  89. 0 0
      sql/upgrade/1540.sql
  90. 0 0
      sql/upgrade/1684.sql
  91. 0 0
      sql/upgrade/1729.sql
  92. 0 0
      sql/upgrade/1736.sql
  93. 0 0
      sql/upgrade/1741.sql
  94. 0 0
      sql/upgrade/1748.sql
  95. 0 0
      sql/upgrade/1770.sql
  96. 0 0
      sql/upgrade/1962.sql
  97. 0 0
      sql/upgrade/1988.sql
  98. 0 0
      sql/upgrade/2022_08_05_1866.sql
  99. 0 0
      sql/upgrade/2022_08_12_crown.sql
  100. 0 0
      sql/upgrade/2022_09_05_1969.sql

+ 22 - 7
backendApi/modules/v1/controllers/CalcController.php

@@ -17,6 +17,10 @@ use common\models\forms\PeriodForm;
 use common\models\Period;
 use Yii;
 
+/**
+ * 业务系统关于计算服务的控制器
+ */
+
 class CalcController extends BaseController
 {
     public $modelClass = FlowBonus::class;
@@ -32,11 +36,9 @@ class CalcController extends BaseController
         if (!$periodNum) {
             return static::notice('期数不存在', 400);
         }
-        if (Period::isProcessing($periodNum)) {
-            return static::notice('有操作正在进行中请稍后', 400);
+        if (Period::isPreparing($periodNum)) {
+            return static::notice('预计算正在进行中请稍后', 400);
         }
-        //设置计算进行中标识
-        Period::updatePeriodIsProcessing($periodNum, Period::IS_PROCESSING);
         //设置自动计算标识
         Period::updatePeriodIsAutoExec($periodNum, Period::MANUAL_EXEC_CALC);
         //记录开始计算的时间
@@ -46,12 +48,18 @@ class CalcController extends BaseController
         $formModel->scenario = 'autoPerf';
 
         if ($formModel->load(Yii::$app->request->get(), '') && $formModel->autoPerf()) {
-            return static::notice('自动计算已开始,请等待');
+            //设置预计算进行中标识
+            Period::updatePeriodIsPreparing($periodNum, Period::IS_PREPARING);
+            return static::notice('预计算已开始,请等待');
         } else {
             return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
         }
     }
 
+    /**自动计算 对应界面按钮
+     * @return mixed
+     * @throws \yii\web\HttpException
+     */
     public function actionAutoCalc()
     {
         $periodNum = \Yii::$app->request->get('periodNum');
@@ -251,6 +259,10 @@ class CalcController extends BaseController
         }
     }
 
+    /**拉取奖金
+     * @return mixed
+     * @throws \yii\web\HttpException
+     */
     public function actionPullBonus()
     {
         $periodNum = \Yii::$app->request->get('periodNum');
@@ -291,7 +303,10 @@ class CalcController extends BaseController
 
     }
 
-
+    /**操作记录列表
+     * @return mixed
+     * @throws \yii\web\HttpException
+     */
     public function actionRecordList()
     {
         $filter    = $this->filterCondition([
@@ -320,4 +335,4 @@ class CalcController extends BaseController
     }
 
 
-}
+}

+ 0 - 0
backendApi/modules/v1/models/exportForms/BaShopExportForm.php


+ 0 - 0
backendApi/modules/v1/models/exportForms/BaUserExportForm.php


+ 0 - 0
backendApi/modules/v1/models/lists/shop/BaOrderList.php


+ 0 - 0
backendApi/modules/v1/models/lists/shop/BaUserList.php


+ 0 - 0
backendApi/modules/v1/models/lists/shop/FlowRemainPvList.php


+ 0 - 0
backendApi/modules/v1/models/lists/shop/RemainPvList.php


+ 0 - 0
backendApi/modules/v1/models/lists/user/BaUserList.php


+ 0 - 0
backendEle/src/views/article/detail.vue


+ 0 - 0
backendEle/src/views/bonus/perf-adjustment.vue


+ 34 - 31
backendEle/src/views/bonus/period.vue

@@ -67,7 +67,10 @@
         </el-table-column>
         <el-table-column fixed="right" label="Action" width="180"><!-- 操作 -->
           <template slot-scope="scope">
-            <el-button class="button" type="primary" @click.native="autoPerfHandle(scope.row.PERIOD_NUM)" >预计算</el-button>
+            <el-button v-if="scope.row.IS_CAN_CLOSE && permission.hasPermission(`bonus/close-period`)" class="button" type="primary"
+                       @click.native="autoPerfHandle(scope.row.PERIOD_NUM)" >
+              预计算
+            </el-button>
             <el-button v-if="scope.row.IS_CAN_CLOSE && permission.hasPermission(`bonus/close-period`)" type="primary" class="button"
                        @click.native="closeHandle(scope.row)">
               Closure period<!-- 封期 -->
@@ -111,36 +114,36 @@
             </el-dialog>
 
 <!--            <el-dropdown size="small" trigger="click" v-if=false>-->
-            <el-dropdown size="small" trigger="click" v-if="scope.row.BUTTON_IS_CAN">
-              <el-button type="primary" size="small" @click.stop="">
-                <!-- 操作该数据 -->Action<i class="el-icon-arrow-down el-icon--right"></i>
-              </el-button>
-              <el-dropdown-menu slot="dropdown">
-                <el-dropdown-item @click.native="closeHandle(scope.row)"
-                                  v-if="scope.row.IS_CAN_CLOSE && permission.hasPermission(`bonus/close-period`)">Closure period<!-- 封期 -->
-                </el-dropdown-item>
-                <el-dropdown-item @click.native="perfHandle(scope.row)"
-                                  v-if="scope.row.IS_PERFING === '0' && scope.row.IS_CAN_PERF && permission.hasPermission(`bonus/perf-period`)">
-                  <!-- 生成业绩单 -->Generate performance sheet
-                </el-dropdown-item>
-                <el-dropdown-item @click.native="perfHandle(scope.row)"
-                                  v-if="scope.row.IS_PERFING === '1' && scope.row.IS_CAN_PERF && permission.hasPermission(`bonus/perf-period`)">
-                  <!-- 强制生成业绩单 -->Forced generation of performance sheet
-                </el-dropdown-item>
-                <el-dropdown-item @click.native="calcHandle(scope.row)"
-                                  v-if="scope.row.IS_CALCING === '0' && scope.row.IS_CAN_CALC && permission.hasPermission(`bonus/calc-period`)">
-                  <!-- 结算 -->settlement
-                </el-dropdown-item>
-                <el-dropdown-item @click.native="calcHandle(scope.row)"
-                                  v-if="scope.row.IS_CALCING === '1' && scope.row.IS_CAN_CALC && permission.hasPermission(`bonus/calc-period`)">
-                  <!-- 强制结算 -->Forced settlement
-                </el-dropdown-item>
-                <el-dropdown-item @click.native="sentHandle(scope.row)"
-                                  v-if="scope.row.IS_CAN_SENT && permission.hasPermission(`bonus/send-period`)">
-                  <!-- 挂网 -->spread a net
-                </el-dropdown-item>
-              </el-dropdown-menu>
-            </el-dropdown>
+<!--            <el-dropdown size="small" trigger="click" v-if="scope.row.BUTTON_IS_CAN">-->
+<!--              <el-button type="primary" size="small" @click.stop="">-->
+<!--                &lt;!&ndash; 操作该数据 &ndash;&gt;Action<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
+<!--              </el-button>-->
+<!--              <el-dropdown-menu slot="dropdown">-->
+<!--                <el-dropdown-item @click.native="closeHandle(scope.row)"-->
+<!--                                  v-if="scope.row.IS_CAN_CLOSE && permission.hasPermission(`bonus/close-period`)">Closure period&lt;!&ndash; 封期 &ndash;&gt;-->
+<!--                </el-dropdown-item>-->
+<!--                <el-dropdown-item @click.native="perfHandle(scope.row)"-->
+<!--                                  v-if="scope.row.IS_PERFING === '0' && scope.row.IS_CAN_PERF && permission.hasPermission(`bonus/perf-period`)">-->
+<!--                  &lt;!&ndash; 生成业绩单 &ndash;&gt;Generate performance sheet-->
+<!--                </el-dropdown-item>-->
+<!--                <el-dropdown-item @click.native="perfHandle(scope.row)"-->
+<!--                                  v-if="scope.row.IS_PERFING === '1' && scope.row.IS_CAN_PERF && permission.hasPermission(`bonus/perf-period`)">-->
+<!--                  &lt;!&ndash; 强制生成业绩单 &ndash;&gt;Forced generation of performance sheet-->
+<!--                </el-dropdown-item>-->
+<!--                <el-dropdown-item @click.native="calcHandle(scope.row)"-->
+<!--                                  v-if="scope.row.IS_CALCING === '0' && scope.row.IS_CAN_CALC && permission.hasPermission(`bonus/calc-period`)">-->
+<!--                  &lt;!&ndash; 结算 &ndash;&gt;settlement-->
+<!--                </el-dropdown-item>-->
+<!--                <el-dropdown-item @click.native="calcHandle(scope.row)"-->
+<!--                                  v-if="scope.row.IS_CALCING === '1' && scope.row.IS_CAN_CALC && permission.hasPermission(`bonus/calc-period`)">-->
+<!--                  &lt;!&ndash; 强制结算 &ndash;&gt;Forced settlement-->
+<!--                </el-dropdown-item>-->
+<!--                <el-dropdown-item @click.native="sentHandle(scope.row)"-->
+<!--                                  v-if="scope.row.IS_CAN_SENT && permission.hasPermission(`bonus/send-period`)">-->
+<!--                  &lt;!&ndash; 挂网 &ndash;&gt;spread a net-->
+<!--                </el-dropdown-item>-->
+<!--              </el-dropdown-menu>-->
+<!--            </el-dropdown>-->
           </template>
         </el-table-column>
       </el-table>

+ 0 - 0
backendEle/src/views/shop/ba-dec-order-list.vue


+ 0 - 0
backendEle/src/views/shop/ba-order-list.vue


+ 0 - 0
backendEle/src/views/shop/flow-remain-pv.vue


+ 0 - 0
backendEle/src/views/shop/remain-pv.vue


+ 0 - 0
backendEle/src/views/user/ba-user-list.vue


+ 4 - 2
common/components/SwooleAsyncTimer.php

@@ -52,8 +52,10 @@ class SwooleAsyncTimer extends SwooleAsyncTimerComponent implements SocketInterf
         // 自动执行任务队列中的任务
         Queue::instance()->consumeTask();
         // 实时监听计算系统修改的period表字段
-//        CalcConsole::listenCalcPeriod();
-//        CalcConsole::listenAutoPerfPeriod();
+        CalcConsole::listenCalcPeriod();
+        //业务系统预计算相关启动逻辑
+        CalcConsole::autoPrePerf();
+        CalcConsole::listenAutoPerfPeriod();
         return true;
     }
 

+ 0 - 0
common/helpers/DingTalk.php


+ 9 - 0
common/helpers/bonus/Calc/BaseBusiness.php

@@ -77,4 +77,13 @@ class BaseBusiness
         $calcMonth2 = date('Ym', strtotime('+' . ($this->_calcMonth - 2) . ' month', $startTime));
         return [$calcMonth1, $calcMonth2];
     }
+
+    public function getMonthsByPeriodNum($periodNum) {
+        $currentPeriod = Period::getInfoByPeriodNum($periodNum);
+        $currentYear = $currentPeriod['CALC_YEAR'];
+        $currentMonth = $currentPeriod['CALC_MONTH'];
+        $calcMonth1 = $currentYear . str_pad($currentMonth - 2,2,"0",STR_PAD_LEFT);
+        $calcMonth2 = $currentYear . str_pad($currentMonth - 1,2,"0",STR_PAD_LEFT);
+        return [$calcMonth1, $calcMonth2];
+    }
 }

+ 0 - 0
common/helpers/bonus/Calc/BasePerfBusiness.php


+ 77 - 15
common/helpers/bonus/Calc/CalcConsole.php

@@ -3,13 +3,24 @@
 namespace common\helpers\bonus\Calc;
 
 
+use common\helpers\Form;
 use common\models\CalcRecord;
+use common\models\forms\PeriodForm;
 use common\models\Period;
+use Yii;
 
+/**
+ * 业务端计算服务监听脚本
+ */
 class CalcConsole extends BaseBusiness
 {
     const  CALC_DB_NAME = 'dbCalcServer';
 
+    /**监听计算服务
+     * @return array|bool
+     * @throws \yii\base\InvalidConfigException
+     * @throws \yii\db\Exception
+     */
     public static function listenCalcPeriod()
     {
         $db        = self::CALC_DB_NAME;
@@ -24,9 +35,14 @@ class CalcConsole extends BaseBusiness
         if (empty($period)) {
             return true;
         }
+
         $businessPeriod = Period::find()->where(['PERIOD_NUM' => $period['PERIOD_NUM']])
             ->asArray()->one();
 
+        if (empty($businessPeriod)) {
+            return true;
+        }
+
         if ($businessPeriod['SEND_STARTED_AT'] > 0 || $businessPeriod['IS_SENT'] > 0) {
             //开始挂网 或者 已挂网 则直接返回
             return true;
@@ -36,6 +52,7 @@ class CalcConsole extends BaseBusiness
         $autoExec             = $businessPeriod['AUTO_EXEC'] > Period::MANUAL_EXEC_CALC;
         $businessIsCalculated = $businessPeriod['IS_CALCULATED'] == Period::CALCULATE_FINISH;
         $startExecTime        = $businessPeriod['START_EXEC_TIME'] ?? 0;
+        $businessIsProcessing = $businessPeriod['IS_PROCESSING'] ?? 0;
 
         echo $businessPeriod['IS_CALCING'];
         //同步计算进度日志到业务系统
@@ -44,7 +61,7 @@ class CalcConsole extends BaseBusiness
             \Yii::$app->db->createCommand()->update('AR_PERIOD', ['IS_CALCING' => 0], 'PERIOD_NUM=' . $period['PERIOD_NUM'])->execute();
         }
 
-        if (2 == $period['IS_PREPARE'] && 1 == $period['IS_PERFED'] && $autoExec) {
+        if (2 == $period['IS_PREPARE'] && 1 == $period['IS_PERFED'] && $autoExec && !$businessIsProcessing) {
             //拉取期业绩
             CalcRecord::record($period['PERIOD_NUM'], '第' . $period['PERIOD_NUM'] . '期的业绩数据已生成');
             CalcRecord::record($period['PERIOD_NUM'], '开始获取第' . $period['PERIOD_NUM'] . '期的期业绩数据');
@@ -68,7 +85,7 @@ class CalcConsole extends BaseBusiness
             return \Yii::$app->$db->createCommand()->update('AR_PERIOD', ['IS_PREPARE' => 3], 'PERIOD_NUM=:PERIOD_NUM', ['PERIOD_NUM' => $period['PERIOD_NUM']])->execute();
         }
 
-        if (4 == $period['IS_PREPARE'] && 1 == $period['IS_CALCULATED'] && $autoExec && !$businessIsCalculated) {
+        if (4 == $period['IS_PREPARE'] && 1 == $period['IS_CALCULATED'] && $autoExec && !$businessIsProcessing && !$businessIsCalculated) {
             CalcRecord::record($period['PERIOD_NUM'], '第' . $period['PERIOD_NUM'] . '期的奖金已计算完成');
             CalcRecord::record($period['PERIOD_NUM'], '开始拉取第' . $period['PERIOD_NUM'] . '期的奖金数据');
 
@@ -100,7 +117,46 @@ class CalcConsole extends BaseBusiness
         return true;
     }
 
-    public static function listenAutoPerfPeriod()
+    public static function autoPrePerf(){ // 自动预结算
+        $nowTs = time();
+        $currentPeriod = Period::find()->where('START_TIME< :NOW_TIME',['NOW_TIME'=>$nowTs])->where('END_TIME>= :NOW_TIME',['NOW_TIME'=>$nowTs-6])->asArray()->one();
+        $periodNum = $currentPeriod['PERIOD_NUM'];
+        if (
+            Period::isPreparing($periodNum)
+            || $currentPeriod['IS_MONTH'] == 0
+        ) {
+            return;
+        }
+        if($nowTs+86400>$currentPeriod['END_TIME'] ){
+            $nowMin = date("i", $nowTs);
+            $nowSec = date("s", $nowTs);
+            if(($nowMin!=0 || $nowSec >= 5 ) || Period::isPreparing($periodNum)){ // 当不是整点小时,当计算中,不计算
+                return;
+            }
+            print_r($periodNum."该预结算".$nowMin.PHP_EOL.$nowSec);
+            //设置计算进行中标识
+            Period::updatePeriodIsPreparing($periodNum, Period::IS_PREPARING);
+            //设置自动计算标识
+            Period::updatePeriodIsAutoExec($periodNum, Period::MANUAL_EXEC_CALC);
+            //记录开始计算的时间
+            Period::updateAll(['START_EXEC_TIME' => time()], ['PERIOD_NUM' => $periodNum]);
+            $formModel = new PeriodForm();
+            $formModel->scenario = 'autoPerf';
+
+            if($formModel->load(['periodNum'=>$periodNum], '') && $formModel->autoPrePerf()) {
+                echo('自动计算已开始,请等待'.PHP_EOL);
+                CalcRecord::record($periodNum, '第' . $periodNum . '期,定时计算开始');
+            } else {
+                echo('自动计算未开始'.PHP_EOL);
+                CalcRecord::record($periodNum, '第' . $periodNum  . '期,定时计算未开始');
+            }
+            return;
+        }else{
+            return;
+        }
+    }
+
+    public static function listenAutoPerfPeriod() // 拉取预结算的结果
     {
         $db        = self::CALC_DB_NAME;
         $allPeriod = \Yii::$app->$db->createCommand("SELECT * FROM AR_PERIOD order by PERIOD_NUM desc")->queryAll();
@@ -114,29 +170,35 @@ class CalcConsole extends BaseBusiness
         if (empty($period)) {
             return true;
         }
-
-        $businessPeriod = Period::find()->where(['PERIOD_NUM' => $period['PERIOD_NUM']])
-            ->asArray()->one();
-
-        if ($businessPeriod['SEND_STARTED_AT'] > 0 || $businessPeriod['IS_SENT'] > 0) {
-            //开始挂网 或者 已挂网 则直接返回
-            return true;
+        $businessPeriod = Period::find()->where(['PERIOD_NUM' => $period['PERIOD_NUM']])->asArray()->one();
+        if (
+            $businessPeriod['SEND_STARTED_AT'] > 0 || $businessPeriod['IS_SENT'] > 0 // 已挂网
+            || 1 != $businessPeriod['IS_PREPARING'] // 未在预计算中
+            || $period['PERFED_AT'] < $businessPeriod['START_EXEC_TIME'] // 计算服务中的计算时间,早于业务系统开始计算时间,说明是旧的,不拉取
+        ){
+            return false;
         }
-
-        if (2 == $period['IS_PREPARE'] && 1 == $period['IS_PERFED']) {
+        if (
+            2 == $period['IS_PREPARE']
+            && 1 == $period['IS_PERFED']
+        ) {
             //拉取期业绩
             CalcRecord::record($period['PERIOD_NUM'], '第' . $period['PERIOD_NUM'] . '期的预计算业绩数据已生成');
             CalcRecord::record($period['PERIOD_NUM'], '开始获取第' . $period['PERIOD_NUM'] . '期的预计算期业绩数据');
 
-            Period::updatePeriodIsProcessing($period['PERIOD_NUM'], Period::IS_PROCESSING);
+            Period::updatePeriodIsPreparing($period['PERIOD_NUM'], Period::IS_PREPARING);
             $res = (new PullPerfDataFromCalc($period['PERIOD_NUM']))->start();
             if (200 == $res['code']) {
-                Period::updatePeriodIsProcessing($period['PERIOD_NUM'], Period::NOT_PROCESSING);
+//                Period::updatePeriodIsProcessing($period['PERIOD_NUM'], Period::NOT_PROCESSING);
+                //设置预计算标识
+                Period::updatePeriodIsPreparing($period['PERIOD_NUM'], Period::NOT_PREPARING);
                 CalcRecord::record($period['PERIOD_NUM'], '第' . $period['PERIOD_NUM'] . '期的预计算期业绩数据已获取');
                 return $res;
             } else {
                 //结束计算状态
-                Period::updatePeriodIsProcessing($period['PERIOD_NUM'], Period::NOT_PROCESSING);
+//                Period::updatePeriodIsProcessing($period['PERIOD_NUM'], Period::NOT_PROCESSING);
+                //设置预计算标识
+                Period::updatePeriodIsPreparing($period['PERIOD_NUM'], Period::NOT_PREPARING);
                 CalcRecord::record($period['PERIOD_NUM'], '第' . $period['PERIOD_NUM'] . '期的预计算期业绩数据获取失败,原因:' . $res['msg']);
                 return $res;
             }

+ 27 - 25
common/helpers/bonus/Calc/GeneratePerfOrder.php

@@ -16,7 +16,9 @@ use common\models\PerfOrder;
 use common\models\Period;
 use common\models\RemainPv;
 
-
+/**
+ * 生成业绩单相关表的数据 4张表写入1张业绩单表
+ */
 class GeneratePerfOrder extends BasePerfBusiness
 {
 
@@ -140,17 +142,17 @@ class GeneratePerfOrder extends BasePerfBusiness
                     'LAST_REC_REAL_NAME' => $data['recName']['recRealName']['REAL_NAME'] ?? '',
                     'LAST_DEC_LV'        => $data['userByToUserId']['LAST_DEC_LV'] ?? '', //CalcCache 810
                     'LAST_EMP_LV'        => $data['userByToUserId']['EMP_LV'] ?? '',
-                    'LAST_STATUS'        => $data['userByToUserId']['STATUS'] ?? '',
+                    'LAST_STATUS'        => $data['userByToUserId']['STATUS'] ?? 0,
                     'LAST_SUB_COM_ID'    => $data['userByToUserId']['SUB_COM_ID'] ?? '',
-                    'LAST_PROVINCE'      => $data['userByToUserId']['PROVINCE'] ?? '',
-                    'LAST_CITY'          => $data['userByToUserId']['CITY'] ?? '',
-                    'LAST_COUNTY'        => $data['userByToUserId']['COUNTY'] ?? '',
+                    'LAST_PROVINCE'      => $data['userByToUserId']['PROVINCE'] ?? 0,
+                    'LAST_CITY'          => $data['userByToUserId']['CITY'] ?? 0,
+                    'LAST_COUNTY'        => $data['userByToUserId']['COUNTY'] ?? 0,
 
                     'LAST_DEC_DEC_LV'     => $data['userByUserId']['LAST_DEC_LV'] ?? '',
-                    'LAST_DEC_SUB_COM_ID' => $data['userByUserId']['SUB_COM_ID'] ?? '',
-                    'LAST_DEC_PROVINCE'   => $data['userByUserId']['PROVINCE'] ?? '',
-                    'LAST_DEC_CITY'       => $data['userByUserId']['CITY'] ?? '',
-                    'LAST_DEC_COUNTY'     => $data['userByUserId']['COUNTY'] ?? '',
+                    'LAST_DEC_SUB_COM_ID' => $data['userByUserId']['SUB_COM_ID'] ?? 0,
+                    'LAST_DEC_PROVINCE'   => $data['userByUserId']['PROVINCE'] ?? 0,
+                    'LAST_DEC_CITY'       => $data['userByUserId']['CITY'] ?? 0,
+                    'LAST_DEC_COUNTY'     => $data['userByUserId']['COUNTY'] ?? 0,
 
                     'PAY_TYPE'         => $data['PAID_WALLET'],
                     'FROM_TABLES'      => 'dec_order',
@@ -217,17 +219,17 @@ class GeneratePerfOrder extends BasePerfBusiness
                     'LAST_REC_REAL_NAME' => $data['recName']['recRealName']['REAL_NAME'] ?? '',
                     'LAST_DEC_LV'        => $data['userByUserId']['LAST_DEC_LV'] ?? '', //CalcCache 810
                     'LAST_EMP_LV'        => $data['userByUserId']['EMP_LV'] ?? '',
-                    'LAST_STATUS'        => $data['userByUserId']['STATUS'] ?? '',
+                    'LAST_STATUS'        => $data['userByUserId']['STATUS'] ?? 0,
                     'LAST_SUB_COM_ID'    => $data['userByUserId']['SUB_COM_ID'] ?? '',
-                    'LAST_PROVINCE'      => $data['userByUserId']['PROVINCE'] ?? '',
-                    'LAST_CITY'          => $data['userByUserId']['CITY'] ?? '',
-                    'LAST_COUNTY'        => $data['userByUserId']['COUNTY'] ?? '',
+                    'LAST_PROVINCE'      => $data['userByUserId']['PROVINCE'] ?? 0,
+                    'LAST_CITY'          => $data['userByUserId']['CITY'] ?? 0,
+                    'LAST_COUNTY'        => $data['userByUserId']['COUNTY'] ?? 0,
 
                     'LAST_DEC_DEC_LV'     => $data['userByUserId']['LAST_DEC_LV'] ?? '',
-                    'LAST_DEC_SUB_COM_ID' => $data['userByUserId']['SUB_COM_ID'] ?? '',
-                    'LAST_DEC_PROVINCE'   => $data['userByUserId']['PROVINCE'] ?? '',
-                    'LAST_DEC_CITY'       => $data['userByUserId']['CITY'] ?? '',
-                    'LAST_DEC_COUNTY'     => $data['userByUserId']['COUNTY'] ?? '',
+                    'LAST_DEC_SUB_COM_ID' => $data['userByUserId']['SUB_COM_ID'] ?? 0,
+                    'LAST_DEC_PROVINCE'   => $data['userByUserId']['PROVINCE'] ?? 0,
+                    'LAST_DEC_CITY'       => $data['userByUserId']['CITY'] ?? 0,
+                    'LAST_DEC_COUNTY'     => $data['userByUserId']['COUNTY'] ?? 0,
                     'DEC_USER_ID'         => $data['userByUserId']['DEC_ID'],
 
                     'PAY_TYPE'         => $data['PAY_TYPE'],
@@ -303,17 +305,17 @@ class GeneratePerfOrder extends BasePerfBusiness
                     'LAST_REC_REAL_NAME' => $data['recName']['recRealName']['REAL_NAME'] ?? '',
                     'LAST_DEC_LV'        => $data['userByUserId']['LAST_DEC_LV'] ?? '', //CalcCache 810
                     'LAST_EMP_LV'        => $data['userByUserId']['EMP_LV'] ?? '',
-                    'LAST_STATUS'        => $data['userByUserId']['STATUS'] ?? '',
+                    'LAST_STATUS'        => $data['userByUserId']['STATUS'] ?? 0,
                     'LAST_SUB_COM_ID'    => $data['userByUserId']['SUB_COM_ID'] ?? '',
-                    'LAST_PROVINCE'      => $data['userByUserId']['PROVINCE'] ?? '',
-                    'LAST_CITY'          => $data['userByUserId']['CITY'] ?? '',
-                    'LAST_COUNTY'        => $data['userByUserId']['COUNTY'] ?? '',
+                    'LAST_PROVINCE'      => $data['userByUserId']['PROVINCE'] ?? 0,
+                    'LAST_CITY'          => $data['userByUserId']['CITY'] ?? 0,
+                    'LAST_COUNTY'        => $data['userByUserId']['COUNTY'] ?? 0,
 
                     'LAST_DEC_DEC_LV'     => $data['userByUserId']['LAST_DEC_LV'] ?? '',
-                    'LAST_DEC_SUB_COM_ID' => $data['userByUserId']['SUB_COM_ID'] ?? '',
-                    'LAST_DEC_PROVINCE'   => $data['userByUserId']['PROVINCE'] ?? '',
-                    'LAST_DEC_CITY'       => $data['userByUserId']['CITY'] ?? '',
-                    'LAST_DEC_COUNTY'     => $data['userByUserId']['COUNTY'] ?? '',
+                    'LAST_DEC_SUB_COM_ID' => $data['userByUserId']['SUB_COM_ID'] ?? 0,
+                    'LAST_DEC_PROVINCE'   => $data['userByUserId']['PROVINCE'] ?? 0,
+                    'LAST_DEC_CITY'       => $data['userByUserId']['CITY'] ?? 0,
+                    'LAST_DEC_COUNTY'     => $data['userByUserId']['COUNTY'] ?? 0,
                     'DEC_USER_ID'         => $data['USER_ID'],
 
                     'PAY_TYPE'         => $data['PAY_TYPE'],

+ 83 - 3
common/helpers/bonus/Calc/PullCalcBonusData.php

@@ -2,6 +2,7 @@
 
 namespace common\helpers\bonus\Calc;
 
+use common\components\ActiveRecord;
 use common\helpers\Date;
 use common\models\CalcBonus;
 use common\models\CalcBonusBD;
@@ -24,6 +25,9 @@ use common\models\User;
 use common\models\UserBonus;
 use common\models\UserInfo;
 
+/**
+ * 拉取计算完成的奖金数据
+ */
 class PullCalcBonusData extends BaseBusiness
 {
     const BASE_INFO_METHODS = [
@@ -33,12 +37,30 @@ class PullCalcBonusData extends BaseBusiness
         'calcBonusQuarter' => ['type' => 'same', 'table' => 'AR_CALC_BONUS_QUARTER'],
         'calcBonusTourism' => ['type' => 'same', 'table' => 'AR_CALC_BONUS_TOURISM'],
 
+        'AR_BS_BONUS_103_CALC_1'        => ['type' => 'same', 'general_clear' => true, 'table' => 'AR_BS_BONUS_103_CALC_1', 'condition_type' => 'id', 'condition_field' => 'CALC_PERIOD_ID', 'param_name' => '_periodNum'],
+        'AR_BS_BONUS_103_CALC_EVENT'    => ['type' => 'same', 'general_clear' => true, 'table' => 'AR_BS_BONUS_103_CALC_EVENT', 'condition_type' => 'id', 'condition_field' => 'CALC_PERIOD_ID', 'param_name' => '_periodNum'],
+        'AR_BS_BONUS_103_CALC_NET'      => ['type' => 'same', 'general_clear' => true, 'table' => 'AR_BS_BONUS_103_CALC_NET', 'condition_type' => 'id', 'condition_field' => 'CALC_PERIOD_ID', 'param_name' => '_periodNum'],
+        'AR_BS_BONUS_103_CALC_NET_1'    => ['type' => 'same', 'general_clear' => true, 'table' => 'AR_BS_BONUS_103_CALC_NET_1', 'condition_type' => 'id', 'condition_field' => 'CALC_PERIOD_ID', 'param_name' => '_periodNum'],
+        'AR_BS_BONUS_103_TEST'          => ['type' => 'same', 'general_clear' => true, 'table' => 'AR_BS_BONUS_103_TEST', 'condition_type' => 'id', 'condition_field' => 'CALC_PERIOD_ID', 'param_name' => '_periodNum'],
+        'AR_BS_BONUS_103_TEST_NET'      => ['type' => 'same', 'general_clear' => true, 'table' => 'AR_BS_BONUS_103_TEST_NET', 'condition_type' => 'id', 'condition_field' => 'CALC_PERIOD_ID', 'param_name' => '_periodNum'],
+        'AR_CALC_BONUS_BS_CALC'         => ['type' => 'same', 'general_clear' => true, 'table' => 'AR_CALC_BONUS_BS_CALC'],
+        'AR_CALC_BONUS_BS_CHECKING'     => ['type' => 'same', 'general_clear' => true, 'table' => 'AR_CALC_BONUS_BS_CHECKING'],
+        'AR_CALC_BONUS_BS_DETAIL'       => ['type' => 'same', 'general_clear' => true, 'table' => 'AR_CALC_BONUS_BS_DETAIL'],
+        'AR_CALC_BONUS_BS_DETAIL_BONUS' => ['type' => 'same', 'general_clear' => true, 'table' => 'AR_CALC_BONUS_BS_DETAIL_BONUS'],
+        'AR_CALC_BONUS_BS_DETAIL_CALC'  => ['type' => 'same', 'general_clear' => true, 'table' => 'AR_CALC_BONUS_BS_DETAIL_CALC'],
+        'AR_CALC_BONUS_BS_DETAIL_GPV'   => ['type' => 'same', 'general_clear' => true, 'table' => 'AR_CALC_BONUS_BS_DETAIL_GPV'],
+        'AR_CALC_BONUS_BS_STAT'         => ['type' => 'same', 'general_clear' => true, 'table' => 'AR_CALC_BONUS_BS_STAT'],
+
+        'AR_QTR_CALC_RECORD' => ['type' => 'same', 'general_clear' => true, 'table' => 'AR_QTR_CALC_RECORD', 'condition_type' => 'id', 'condition_field' => 'CALC_PERIOD_ID', 'param_name' => '_periodNum'],
+        'AR_QTR_CALC_SCORE'  => ['type' => 'same', 'general_clear' => true, 'table' => 'AR_QTR_CALC_SCORE', 'condition_type' => 'custom', 'condition' => 'group'],//2个 where
+        'AR_QTR_CALC_USER'   => ['type' => 'same', 'general_clear' => true, 'table' => 'AR_QTR_CALC_USER'],
+        'AR_QTR_CALC_WEIGHT' => ['type' => 'same', 'general_clear' => true, 'table' => 'AR_QTR_CALC_WEIGHT'],
+
         'calcBonusBd'     => ['type' => 'calc_month', 'table' => 'AR_CALC_BONUS_BD'],
         'calcBonusQy'     => ['type' => 'calc_month', 'table' => 'AR_CALC_BONUS_QY'],
         'calcBonusTg'     => ['type' => 'calc_month', 'table' => 'AR_CALC_BONUS_TG'],
         'calcBonusVilla'  => ['type' => 'calc_month', 'table' => 'AR_CALC_BONUS_VILLA'],
         'calcBonusGarage' => ['type' => 'calc_month', 'table' => 'AR_CALC_BONUS_GARAGE'],
-
     ];
 
     public function __construct($periodNum)
@@ -61,7 +83,14 @@ class PullCalcBonusData extends BaseBusiness
                     $_offset = 0;
                     sameBonus:
                     $offset = $_offset * $this->_limit;
-                    $data   = \Yii::$app->$db->createCommand("SELECT * from $table where PERIOD_NUM = $this->_periodNum limit $this->_limit offset $offset;")->queryAll();
+                    if (isset($info['condition_type']) && $info['condition_type'] == 'id' && isset($info['param_name'])) {
+                        $param = $info['param_name'];
+                        $data = \Yii::$app->$db->createCommand("SELECT * from $table  where " . $info['condition_field'] . '=' . $this->$param . " limit $this->_limit offset $offset;")->queryAll();
+                    } elseif (isset($info['condition_type']) && $info['condition_type'] == 'custom' && $info['condition'] == 'group') {
+                        $data = \Yii::$app->$db->createCommand("SELECT * from $table where CALC_MONTH = $this->_calcMonth and CALC_YEAR=$this->_calcYear limit $this->_limit offset $offset;")->queryAll();
+                    } else {
+                        $data = \Yii::$app->$db->createCommand("SELECT * from $table where PERIOD_NUM = $this->_periodNum limit $this->_limit offset $offset;")->queryAll();
+                    }
                     if (!empty($data)) {
                         $fieldArray = array_keys($data[0]);
                         $_offset    += 1;
@@ -270,6 +299,29 @@ class PullCalcBonusData extends BaseBusiness
 //        CalcBonusYJ::pageDeleteAll('PERIOD_NUM=' . $this->_periodNum);
 //        CalcBonusGX::pageDeleteAll('PERIOD_NUM=' . $this->_periodNum);
 //        CalcBonusGL::pageDeleteAll('PERIOD_NUM=' . $this->_periodNum);
+
+        //AR_BS_BONUS_103_CALC_EVENT 因每期的主键id相同,故需每次拉取前清理
+        \Yii::$app->db->createCommand("TRUNCATE TABLE AR_BS_BONUS_103_CALC_EVENT")->execute();
+        //AR_QTR_CALC_RECORD 因每期的主键id相同,故需每次拉取前清理
+        \Yii::$app->db->createCommand("TRUNCATE TABLE AR_QTR_CALC_RECORD")->execute();
+
+        foreach (self::BASE_INFO_METHODS as $info) {
+            if ('same' == $info['type'] && isset($info['general_clear']) && $info['general_clear']) {
+                if (isset($info['condition_type']) && $info['condition_type'] == 'id' && isset($info['param_name'])) {
+                    $param = $info['param_name'];
+                    $res   = self::pageDeleteAll($info['table'], $info['condition_field'] . '=' . $this->$param);
+                } else if (isset($info['condition_type']) && $info['condition_type'] == 'custom' && $info['condition'] == 'group') {
+                    $res = self::pageDeleteAll($info['table'], "CALC_MONTH = $this->_calcMonth and CALC_YEAR=$this->_calcYear");
+                } else {
+                    $res = self::pageDeleteAll($info['table'], 'PERIOD_NUM=' . $this->_periodNum);
+                }
+
+                if (!$res) {
+                    CalcRecord::record($this->_periodNum, '第' . $this->_periodNum . '期的' . $info['table'] . '表清理失败');
+                }
+            }
+        }
+
         // 月结时要清空的数据
         if ($this->_isCalcMonth) {
 //            CalcBonusYC::pageDeleteAll('PERIOD_NUM=' . $this->_periodNum);
@@ -282,4 +334,32 @@ class PullCalcBonusData extends BaseBusiness
         }
     }
 
-}
+
+    /**
+     * @param $table
+     * @param $where
+     * @return bool
+     * @see ActiveRecord::pageDeleteAll()
+     */
+    public static function pageDeleteAll($table = null, $where = '')
+    {
+        if (empty($table)) {
+            return false;
+        }
+        $limit = 10000;
+        $sql   = sprintf('DELETE FROM %s WHERE %s LIMIT %d', $table, $where, $limit);
+        try {
+            $affectRow = \Yii::$app->db->createCommand($sql)->execute();
+        } catch (\Exception $e) {
+            return false;
+        }
+        if ($affectRow == $limit) {
+            unset($limit, $sql, $affectRow);
+            return self::pageDeleteAll($table, $where);
+        }
+
+        unset($limit, $sql, $affectRow);
+        return true;
+    }
+
+}

+ 2 - 1
common/helpers/bonus/Calc/PullPerfDataFromCalc.php

@@ -52,6 +52,7 @@ class PullPerfDataFromCalc extends BasePerfBusiness
 //            2 == $data['IS_PREPARE'] //计算业绩阶段
 //            &&
             1 == $data['IS_PERFED']  //1表示累计业绩已完成
+            || 3 == $data['IS_PERFED']
         ) {
             return true;
         }
@@ -130,4 +131,4 @@ class PullPerfDataFromCalc extends BasePerfBusiness
     }
 
 
-}
+}

+ 56 - 49
common/helpers/bonus/Calc/PushBaseDataToCalc.php

@@ -20,6 +20,9 @@ use common\models\PerfPeriod;
 use common\models\PerfStandard;
 use common\models\Period;
 
+/**
+ * 推送基础数据供计算服务使用
+ */
 class PushBaseDataToCalc extends BaseBusiness
 {
     const BASE_INFO_METHODS = [
@@ -421,54 +424,54 @@ class PushBaseDataToCalc extends BaseBusiness
         return true;
     }
 
-    public function user($table, $fieldArray, $db)
-    {
-        $field        = '`' . implode('`, `', $fieldArray) . '`,null as LAST_EMP_LV';
-        $fieldArray[] = 'LAST_EMP_LV';
-        $_offset      = 0;
-
-        $forwardMonthPeriod = Period::find()
-            ->where('IS_MONTH=1 AND PERIOD_NUM<:PERIOD_NUM', [':PERIOD_NUM' => $this->_periodNum])
-            ->orderBy('PERIOD_NUM DESC')->asArray()->one();
-
-        $forwardPeriodNum = $forwardMonthPeriod['PERIOD_NUM'];
-
-//        $employeeLevelIds = CalcBonusBS::findAllAsArray(
+//    public function user($table, $fieldArray, $db)
+//    {
+//        $field        = '`' . implode('`, `', $fieldArray) . '`,null as LAST_EMP_LV';
+//        $fieldArray[] = 'LAST_EMP_LV';
+//        $_offset      = 0;
+//
+//        $forwardMonthPeriod = Period::find()
+//            ->where('IS_MONTH=1 AND PERIOD_NUM<:PERIOD_NUM', [':PERIOD_NUM' => $this->_periodNum])
+//            ->orderBy('PERIOD_NUM DESC')->asArray()->one();
+//
+//        $forwardPeriodNum = $forwardMonthPeriod['PERIOD_NUM'];
+//
+////        $employeeLevelIds = CalcBonusBS::findAllAsArray(
+////            'PERIOD_NUM=:PERIOD_NUM ', [':PERIOD_NUM' => $forwardPeriodNum]
+////        );
+//
+//        $employeeLevelIds = CalcBonusBS::find()->where(
 //            'PERIOD_NUM=:PERIOD_NUM ', [':PERIOD_NUM' => $forwardPeriodNum]
-//        );
-
-        $employeeLevelIds = CalcBonusBS::find()->where(
-            'PERIOD_NUM=:PERIOD_NUM ', [':PERIOD_NUM' => $forwardPeriodNum]
-        )->select('USER_ID,LEVEL_ID')->asArray()->all();
-
-        if (!empty($employeeLevelIds)) {
-            $employeeLevelIds = array_column($employeeLevelIds, null, 'USER_ID'); // 当前蓝星奖计算(即管理奖) 的等级
-        }
-
-        $noLevelId = EmployLevel::NO_LEVEL_ID;
-
-        user:
-        $offset = $_offset * $this->_limit;
-        $data   = ActiveRecord::findBySql("SELECT $field from AR_USER limit $this->_limit offset $offset;")->asArray()->all();
-
-        if (!empty($data)) {
-            foreach ($data as $k => $v) {
-                $data[$k]['LAST_EMP_LV'] = $noLevelId;
-                if (isset($employeeLevelIds[$v['ID']])) {
-                    $data[$k]['LAST_EMP_LV'] = $employeeLevelIds[$v['ID']]['LEVEL_ID'] ?? 0;
-                }
-            }
-            $_offset += 1;
-            \Yii::$app->$db->createCommand()->batchInsert($table, $fieldArray, $data)->execute();
-
-            $data = null;
-            goto user;
-        }
-        $data             = null;
-        $employeeLevelIds = null;
-
-        return true;
-    }
+//        )->select('USER_ID,LEVEL_ID')->asArray()->all();
+//
+//        if (!empty($employeeLevelIds)) {
+//            $employeeLevelIds = array_column($employeeLevelIds, null, 'USER_ID'); // 当前蓝星奖计算(即管理奖) 的等级
+//        }
+//
+//        $noLevelId = EmployLevel::NO_LEVEL_ID;
+//
+//        user:
+//        $offset = $_offset * $this->_limit;
+//        $data   = ActiveRecord::findBySql("SELECT $field from AR_USER limit $this->_limit offset $offset;")->asArray()->all();
+//
+//        if (!empty($data)) {
+//            foreach ($data as $k => $v) {
+//                $data[$k]['LAST_EMP_LV'] = $noLevelId;
+//                if (isset($employeeLevelIds[$v['ID']])) {
+//                    $data[$k]['LAST_EMP_LV'] = $employeeLevelIds[$v['ID']]['LEVEL_ID'] ?? 0;
+//                }
+//            }
+//            $_offset += 1;
+//            \Yii::$app->$db->createCommand()->batchInsert($table, $fieldArray, $data)->execute();
+//
+//            $data = null;
+//            goto user;
+//        }
+//        $data             = null;
+//        $employeeLevelIds = null;
+//
+//        return true;
+//    }
 
     public function calcBonusQy($table, $fieldArray, $db): bool
     {
@@ -479,7 +482,11 @@ class PushBaseDataToCalc extends BaseBusiness
         $currentPeriod = Period::getInfoByPeriodNum($periodNum);
         //判断是否月节点
         if ($currentPeriod['IS_MONTH']) {
-            $periodNum = Period::getCurrentMonthPeriodByPeriodNum($periodNum);
+            if (in_array($currentPeriod['CALC_MONTH'], [3,6,9,12])){ // 如果是季度尾
+                $periodNum = Period::getCurrentQuarterPeriodByPeriodNum($periodNum);
+            }else{
+                $periodNum = Period::getCurrentMonthPeriodByPeriodNum($periodNum);
+            }
         }
         $field = implode(',', $fieldArray);
         $data  = CalcBonusQY::find()->select($field)->where(['PERIOD_NUM' => $periodNum])->asArray()->all();
@@ -638,7 +645,7 @@ class PushBaseDataToCalc extends BaseBusiness
         $_offset = 0;
         $field   = implode(',', $fieldArray);
 
-        $months = $this->getMonthsForQuarterly();
+        $months = $this->getMonthsByPeriodNum($this->_periodNum);
 
         //结算月
         perfMonth:

+ 0 - 0
common/libs/export/module/BaShopExport.php


+ 0 - 0
common/libs/export/module/BaUserExport.php


+ 0 - 0
common/models/ApproachDecOrder.php


+ 0 - 0
common/models/ApproachOrderCall.php


+ 0 - 0
common/models/BaApproachDecOrder.php


+ 0 - 0
common/models/BaApproachOrder.php


+ 0 - 0
common/models/BaApproachOrderGoods.php


+ 0 - 0
common/models/BaDecOrder.php


+ 0 - 0
common/models/BaOrder.php


+ 0 - 0
common/models/BaOrderGoods.php


+ 0 - 0
common/models/BaReceiveAddress.php


+ 0 - 0
common/models/BaUser.php


+ 0 - 0
common/models/BaUserInfo.php


+ 0 - 0
common/models/CalcBonusQuarter.php


+ 0 - 0
common/models/CalcBonusVilla.php


+ 0 - 0
common/models/CalcRecord.php


+ 0 - 0
common/models/FlowRemainPv.php


+ 0 - 0
common/models/FlowVillaPoints.php


+ 1 - 1
common/models/Order.php

@@ -154,7 +154,6 @@ class Order extends \common\components\ActiveRecord
         $orders = Order::find()->where("USER_ID = :USER_ID AND PERIOD_NUM IN ($periodsStr)", [':USER_ID' => $userId]);
         return $orders;
     }
-
     /*
      * 通过 期数和用户ID
      * 查询当期订单
@@ -163,6 +162,7 @@ class Order extends \common\components\ActiveRecord
         $orders = Order::find()->where("USER_ID = :USER_ID AND PERIOD_NUM = :PERIOD_NUM", [':USER_ID' => $userId,':PERIOD_NUM' => $periodNum]);
         return $orders;
     }
+
     public function getRecName()
     {
         return $this->hasOne(UserInfo::class, ['USER_ID' => 'USER_ID']);

+ 41 - 2
common/models/Period.php

@@ -60,6 +60,8 @@ class Period extends \common\components\ActiveRecord
     const MANUAL_EXEC_CALC = 0;
     const IS_PROCESSING = 1;
     const NOT_PROCESSING = 0;
+    const IS_PREPARING = 1;
+    const NOT_PREPARING = 0;
 
     public $nowPeriodArr = null;
     public $periodNum = null;
@@ -854,6 +856,22 @@ class Period extends \common\components\ActiveRecord
         return $periods;
     }
 
+    public static function getCurrentQuarterPeriodByPeriodNum($periodNum){
+        $currentPeriod = self::getInfoByPeriodNum($periodNum);
+        $currentYear = $currentPeriod['CALC_YEAR'];
+        $currentMonth = $currentPeriod['CALC_MONTH'];
+        $periodsArray = self::find()->select("*")
+            ->where(['CALC_YEAR'=>$currentYear])
+            ->andWhere(['in', 'CALC_MONTH', [$currentMonth-2, $currentMonth-1, $currentMonth]])
+            ->asArray()->all();
+        $periods = [];
+        foreach ($periodsArray as $p){
+            $periods[] = $p['PERIOD_NUM'];
+        }
+
+        return $periods;
+    }
+
     public static function updatePeriodIsAutoExec($periodNum, $isAutoExec = 0): int
     {
         return Period::updateAll(['AUTO_EXEC' => $isAutoExec], ['PERIOD_NUM' => $periodNum]);
@@ -864,6 +882,11 @@ class Period extends \common\components\ActiveRecord
         return Period::updateAll(['IS_PROCESSING' => $isProcessing], ['PERIOD_NUM' => $periodNum]);
     }
 
+    public static function updatePeriodIsPreparing($periodNum, $isPreparing = 1): int
+    {
+        return Period::updateAll(['IS_PREPARING' => $isPreparing], ['PERIOD_NUM' => $periodNum]);
+    }
+
     /**
      * 是否计算操作中
      * @param $periodNum
@@ -872,12 +895,28 @@ class Period extends \common\components\ActiveRecord
     public static function isProcessing($periodNum = null): bool
     {
         $period = static::findOneAsArray(['PERIOD_NUM' => $periodNum]);
-        //挂网则拒绝操作
-        if ($period['IS_SENT'] == self::SEND_FINISH) return false;
+        //挂网则拒绝操作,返回true则拒绝操作
+        if ($period['IS_SENT'] == self::SEND_FINISH) return true;
         if ($period['IS_PROCESSING'] == self::IS_PROCESSING) return true;
         return false;
     }
 
+    /**
+     * 是否预计算操作中
+     * @param $periodNum
+     * @return bool
+     */
+    public static function isPreparing($periodNum = null): bool
+    {
+        $period = static::findOneAsArray(['PERIOD_NUM' => $periodNum]);
+        //挂网则拒绝操作,返回true则拒绝操作
+        if ($period['IS_SENT'] == self::SEND_FINISH) return true;
+        if ($period['IS_PREPARING'] == self::IS_PREPARING) return true;
+        $nowTs = time();
+        if ($nowTs-6 > $period['END_TIME']) return true;
+        return false;
+    }
+
     public static function checkPerf($periodNum){
         $result = static::find()
             ->where(

+ 0 - 0
common/models/RemainPv.php


+ 0 - 0
common/models/forms/ApproachDeclarationForm.php


+ 0 - 0
common/models/forms/ApproachDeclarationLoopForm.php


+ 0 - 0
common/models/forms/ApproachDeclarationUpgradeForm.php


+ 0 - 0
common/models/forms/BaApproachDeclarationForm.php


+ 0 - 0
common/models/forms/BaApproachDeclarationLoopForm.php


+ 0 - 0
common/models/forms/BaApproachOrderForm.php


+ 0 - 0
common/models/forms/BaDeclarationForm.php


+ 0 - 0
common/models/forms/BaDeclarationLoopForm.php


+ 0 - 0
common/models/forms/BaReceiveAddressForm.php


+ 0 - 0
common/models/forms/BaUserBasicForm.php


+ 0 - 0
common/models/forms/BaUserForm.php


+ 0 - 0
common/models/forms/PerfAdjustmentForm.php


+ 35 - 0
common/models/forms/PeriodForm.php

@@ -7,6 +7,7 @@ use common\helpers\bonus\PerfCalc;
 use common\helpers\Cache;
 use common\helpers\Date;
 use common\components\Model;
+use common\components\SwooleAsyncTimer;
 use common\helpers\Form;
 use common\models\Period;
 use common\models\UserWallet;
@@ -14,6 +15,8 @@ use common\models\User;
 use common\models\UserStatusAudit;
 use common\models\Withdraw;
 use yii\base\Exception;
+use Yii;
+use yii\helpers\Json;
 
 /**
  * Login form
@@ -425,6 +428,38 @@ class PeriodForm extends Model
         return $model;
     }
 
+    /**
+     * 页面请求异步处理 自动计算
+     * @return string | null
+     */
+    public function autoPrePerf()
+    {
+        $settings      = \Yii::$app->params['swooleAsyncTimer'];
+        $bonusSettings = \Yii::$app->params['swooleBonusConfig'];
+        $settings      = array_merge($settings, $bonusSettings);
+
+        $params['handleUserId'] = null;
+        $params['handleUserName'] = null;
+        $params['periodNum'] = $this->periodNum;
+        $taskKey = Cache::setAsyncParams($params);
+        echo($taskKey.PHP_EOL);
+        $data = [
+            'data' => [
+                [
+                    'a' => 'calc/auto-perf',
+                    'p' => [$taskKey],
+                ]
+            ],
+        ];
+        try {
+            (new SwooleAsyncTimer())->async(Json::encode($data), $settings);
+        }catch (\Exception $e){
+            echo($e);
+            return null;
+        }
+        return true;
+    }
+
     /**
      * 页面请求异步处理 生成业绩单
      * @return string | null

+ 0 - 0
common/models/forms/UserBonusForm.php


+ 0 - 0
common/traits/ResponseTrait.php


+ 2 - 2
composer.json

@@ -26,7 +26,7 @@
         "yiisoft/yii2-redis": "^2.0",
         "ext-pdo": "*",
         "ext-json": "*",
-        "monolog/monolog": "^2.8",
+        "monolog/monolog": "*",
         "tecnickcom/tcpdf": "^6.4",
         "ext-curl": "*",
         "smladeoye/yii2-paystack": "^1.0"
@@ -55,7 +55,7 @@
     "repositories": {
         "packagist": {
             "type": "composer",
-            "url": "https://mirrors.aliyun.com/composer/"
+            "url": "https://mirrors.cloud.tencent.com/composer/"
         }
     }
 }

+ 254 - 363
composer.lock

@@ -4,27 +4,16 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "6d5d83536a6e6b2d6416554a3a4753ba",
+    "content-hash": "ec64ee2fcd2a8326aa547b68fa4c57d4",
     "packages": [
         {
             "name": "anlity/yii2-swoole-async-timer",
             "version": "0.9.2",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/anlityli/yii2-swoole-async-timer.git",
-                "reference": "60bb70e0e34951d5aa46b89fa224f471f68e666d"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/anlityli/yii2-swoole-async-timer/zipball/60bb70e0e34951d5aa46b89fa224f471f68e666d",
                 "reference": "60bb70e0e34951d5aa46b89fa224f471f68e666d",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "yiisoft/yii2": "~2.0.0"
@@ -153,22 +142,11 @@
         {
             "name": "cebe/markdown",
             "version": "1.2.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/cebe/markdown.git",
-                "reference": "9bac5e971dd391e2802dca5400bbeacbaea9eb86"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/cebe/markdown/zipball/9bac5e971dd391e2802dca5400bbeacbaea9eb86",
                 "reference": "9bac5e971dd391e2802dca5400bbeacbaea9eb86",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "lib-pcre": "*",
@@ -219,22 +197,11 @@
         {
             "name": "doctrine/lexer",
             "version": "1.2.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/doctrine/lexer.git",
-                "reference": "e864bbf5904cb8f5bb334f99209b48018522f042"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042",
                 "reference": "e864bbf5904cb8f5bb334f99209b48018522f042",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "php": "^7.2 || ^8.0"
@@ -301,22 +268,11 @@
         {
             "name": "egulias/email-validator",
             "version": "3.1.2",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/egulias/EmailValidator.git",
-                "reference": "ee0db30118f661fb166bcffbf5d82032df484697"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ee0db30118f661fb166bcffbf5d82032df484697",
                 "reference": "ee0db30118f661fb166bcffbf5d82032df484697",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "doctrine/lexer": "^1.2",
@@ -371,22 +327,11 @@
         {
             "name": "ezyang/htmlpurifier",
             "version": "v4.13.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/ezyang/htmlpurifier.git",
-                "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/08e27c97e4c6ed02f37c5b2b20488046c8d90d75",
                 "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "php": ">=5.2"
@@ -427,22 +372,11 @@
         {
             "name": "godruoyi/php-snowflake",
             "version": "1.1.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/godruoyi/php-snowflake.git",
-                "reference": "d8cbe72ed375b45033b7042e3d03340ce4fa479f"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/godruoyi/php-snowflake/zipball/d8cbe72ed375b45033b7042e3d03340ce4fa479f",
                 "reference": "d8cbe72ed375b45033b7042e3d03340ce4fa479f",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require-dev": {
                 "phpunit/phpunit": "~7"
@@ -489,22 +423,11 @@
         {
             "name": "maennchen/zipstream-php",
             "version": "2.1.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/maennchen/ZipStream-PHP.git",
-                "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/c4c5803cc1f93df3d2448478ef79394a5981cc58",
                 "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "myclabs/php-enum": "^1.5",
@@ -562,22 +485,11 @@
         {
             "name": "markbaker/complex",
             "version": "3.0.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/MarkBaker/PHPComplex.git",
-                "reference": "ab8bc271e404909db09ff2d5ffa1e538085c0f22"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/ab8bc271e404909db09ff2d5ffa1e538085c0f22",
                 "reference": "ab8bc271e404909db09ff2d5ffa1e538085c0f22",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "php": "^7.2 || ^8.0"
@@ -615,22 +527,11 @@
         {
             "name": "markbaker/matrix",
             "version": "3.0.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/MarkBaker/PHPMatrix.git",
-                "reference": "c66aefcafb4f6c269510e9ac46b82619a904c576"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/c66aefcafb4f6c269510e9ac46b82619a904c576",
                 "reference": "c66aefcafb4f6c269510e9ac46b82619a904c576",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "php": "^7.1 || ^8.0"
@@ -670,25 +571,96 @@
             ],
             "time": "2021-07-01T19:01:15+00:00"
         },
+        {
+            "name": "monolog/monolog",
+            "version": "2.8.0",
+            "dist": {
+                "type": "zip",
+                "url": "https://mirrors.cloud.tencent.com/repository/composer/monolog/monolog/2.8.0/monolog-monolog-2.8.0.zip",
+                "reference": "720488632c590286b88b80e62aa3d3d551ad4a50",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2",
+                "psr/log": "^1.0.1 || ^2.0 || ^3.0"
+            },
+            "provide": {
+                "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0"
+            },
+            "require-dev": {
+                "aws/aws-sdk-php": "^2.4.9 || ^3.0",
+                "doctrine/couchdb": "~1.0@dev",
+                "elasticsearch/elasticsearch": "^7 || ^8",
+                "ext-json": "*",
+                "graylog2/gelf-php": "^1.4.2",
+                "guzzlehttp/guzzle": "^7.4",
+                "guzzlehttp/psr7": "^2.2",
+                "mongodb/mongodb": "^1.8",
+                "php-amqplib/php-amqplib": "~2.4 || ^3",
+                "phpspec/prophecy": "^1.15",
+                "phpstan/phpstan": "^0.12.91",
+                "phpunit/phpunit": "^8.5.14",
+                "predis/predis": "^1.1 || ^2.0",
+                "rollbar/rollbar": "^1.3 || ^2 || ^3",
+                "ruflin/elastica": "^7",
+                "swiftmailer/swiftmailer": "^5.3|^6.0",
+                "symfony/mailer": "^5.4 || ^6",
+                "symfony/mime": "^5.4 || ^6"
+            },
+            "suggest": {
+                "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
+                "doctrine/couchdb": "Allow sending log messages to a CouchDB server",
+                "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
+                "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
+                "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler",
+                "ext-mbstring": "Allow to work properly with unicode symbols",
+                "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
+                "ext-openssl": "Required to send log messages using SSL",
+                "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)",
+                "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
+                "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
+                "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
+                "rollbar/rollbar": "Allow sending log messages to Rollbar",
+                "ruflin/elastica": "Allow sending log messages to an Elastic Search server"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-main": "2.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Monolog\\": "src/Monolog"
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Jordi Boggiano",
+                    "email": "j.boggiano@seld.be",
+                    "homepage": "https://seld.be"
+                }
+            ],
+            "description": "Sends your logs to files, sockets, inboxes, databases and various web services",
+            "homepage": "https://github.com/Seldaek/monolog",
+            "keywords": [
+                "log",
+                "logging",
+                "psr-3"
+            ],
+            "time": "2022-07-24T11:55:47+00:00"
+        },
         {
             "name": "myclabs/php-enum",
             "version": "1.8.3",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/myclabs/php-enum.git",
-                "reference": "b942d263c641ddb5190929ff840c68f78713e937"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/myclabs/php-enum/zipball/b942d263c641ddb5190929ff840c68f78713e937",
                 "reference": "b942d263c641ddb5190929ff840c68f78713e937",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "ext-json": "*",
@@ -735,22 +707,11 @@
         {
             "name": "paragonie/random_compat",
             "version": "v9.99.100",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/paragonie/random_compat.git",
-                "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a",
                 "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "php": ">= 7"
@@ -786,22 +747,11 @@
         {
             "name": "phpoffice/phpspreadsheet",
             "version": "1.20.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
-                "reference": "44436f270bb134b4a94670f3d020a85dfa0a3c02"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/44436f270bb134b4a94670f3d020a85dfa0a3c02",
                 "reference": "44436f270bb134b4a94670f3d020a85dfa0a3c02",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "ext-ctype": "*",
@@ -892,22 +842,11 @@
         {
             "name": "psr/http-client",
             "version": "1.0.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/php-fig/http-client.git",
-                "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
                 "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "php": "^7.0 || ^8.0",
@@ -947,22 +886,11 @@
         {
             "name": "psr/http-factory",
             "version": "1.0.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/php-fig/http-factory.git",
-                "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
                 "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "php": ">=7.0.0",
@@ -1005,22 +933,11 @@
         {
             "name": "psr/http-message",
             "version": "1.0.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/php-fig/http-message.git",
-                "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
                 "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "php": ">=5.3.0"
@@ -1058,25 +975,55 @@
             ],
             "time": "2016-08-06T14:39:51+00:00"
         },
+        {
+            "name": "psr/log",
+            "version": "1.1.4",
+            "dist": {
+                "type": "zip",
+                "url": "https://mirrors.cloud.tencent.com/repository/composer/psr/log/1.1.4/psr-log-1.1.4.zip",
+                "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.1.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Log\\": "Psr/Log/"
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "https://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interface for logging libraries",
+            "homepage": "https://github.com/php-fig/log",
+            "keywords": [
+                "log",
+                "psr",
+                "psr-3"
+            ],
+            "time": "2021-05-03T11:20:27+00:00"
+        },
         {
             "name": "psr/simple-cache",
             "version": "1.0.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/php-fig/simple-cache.git",
-                "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
                 "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "php": ">=5.3.0"
@@ -1112,25 +1059,54 @@
             ],
             "time": "2017-10-23T01:57:42+00:00"
         },
+        {
+            "name": "smladeoye/yii2-paystack",
+            "version": "v1.0.0",
+            "dist": {
+                "type": "zip",
+                "url": "https://mirrors.cloud.tencent.com/repository/composer/smladeoye/yii2-paystack/v1.0.0/smladeoye-yii2-paystack-v1.0.0.zip",
+                "reference": "93b4bb340fcfa783fd722fdbb36277f84c7acf61",
+                "shasum": ""
+            },
+            "require": {
+                "yiisoft/yii2": ">2.0.1"
+            },
+            "type": "yii2-extension",
+            "autoload": {
+                "psr-4": {
+                    "smladeoye\\": ""
+                }
+            },
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "smladeoye",
+                    "email": "smladeoye@gmail.com"
+                }
+            ],
+            "description": "Yii 2 Paystack Payment extension (Component and widget)",
+            "keywords": [
+                "Yii2 Extension",
+                "component",
+                "payment",
+                "paystack",
+                "paystack widget",
+                "smladeoye",
+                "widget",
+                "yii2"
+            ],
+            "time": "2017-02-28T15:11:38+00:00"
+        },
         {
             "name": "sunmoon/yii2-phpspreadsheet",
             "version": "1.2.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/arieslee/yii2-phpspreadsheet.git",
-                "reference": "51fc4d0183eb81e654b3360ac18e631fc4b89c09"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/arieslee/yii2-phpspreadsheet/zipball/51fc4d0183eb81e654b3360ac18e631fc4b89c09",
                 "reference": "51fc4d0183eb81e654b3360ac18e631fc4b89c09",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "phpoffice/phpspreadsheet": "*",
@@ -1161,22 +1137,11 @@
         {
             "name": "swiftmailer/swiftmailer",
             "version": "v6.3.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/swiftmailer/swiftmailer.git",
-                "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8a5d5072dca8f48460fce2f4131fcc495eec654c",
                 "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "egulias/email-validator": "^2.0|^3.1",
@@ -1233,28 +1198,16 @@
                     "type": "tidelift"
                 }
             ],
-            "abandoned": "symfony/mailer",
             "time": "2021-10-18T15:26:12+00:00"
         },
         {
             "name": "symfony/polyfill-iconv",
             "version": "v1.23.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/polyfill-iconv.git",
-                "reference": "63b5bb7db83e5673936d6e3b8b3e022ff6474933"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/63b5bb7db83e5673936d6e3b8b3e022ff6474933",
                 "reference": "63b5bb7db83e5673936d6e3b8b3e022ff6474933",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "php": ">=7.1"
@@ -1322,22 +1275,11 @@
         {
             "name": "symfony/polyfill-intl-idn",
             "version": "v1.23.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/polyfill-intl-idn.git",
-                "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65",
                 "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "php": ">=7.1",
@@ -1412,22 +1354,11 @@
         {
             "name": "symfony/polyfill-intl-normalizer",
             "version": "v1.23.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
-                "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8",
                 "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "php": ">=7.1"
@@ -1499,22 +1430,11 @@
         {
             "name": "symfony/polyfill-mbstring",
             "version": "v1.23.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/polyfill-mbstring.git",
-                "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
                 "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "php": ">=7.1"
@@ -1582,22 +1502,11 @@
         {
             "name": "symfony/polyfill-php72",
             "version": "v1.23.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/polyfill-php72.git",
-                "reference": "9a142215a36a3888e30d0a9eeea9766764e96976"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976",
                 "reference": "9a142215a36a3888e30d0a9eeea9766764e96976",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "php": ">=7.1"
@@ -1658,25 +1567,70 @@
             ],
             "time": "2021-05-27T09:17:38+00:00"
         },
+        {
+            "name": "tecnickcom/tcpdf",
+            "version": "6.6.2",
+            "dist": {
+                "type": "zip",
+                "url": "https://mirrors.cloud.tencent.com/repository/composer/tecnickcom/tcpdf/6.6.2/tecnickcom-tcpdf-6.6.2.zip",
+                "reference": "e3cffc9bcbc76e89e167e9eb0bbda0cab7518459",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "config",
+                    "include",
+                    "tcpdf.php",
+                    "tcpdf_parser.php",
+                    "tcpdf_import.php",
+                    "tcpdf_barcodes_1d.php",
+                    "tcpdf_barcodes_2d.php",
+                    "include/tcpdf_colors.php",
+                    "include/tcpdf_filters.php",
+                    "include/tcpdf_font_data.php",
+                    "include/tcpdf_fonts.php",
+                    "include/tcpdf_images.php",
+                    "include/tcpdf_static.php",
+                    "include/barcodes/datamatrix.php",
+                    "include/barcodes/pdf417.php",
+                    "include/barcodes/qrcode.php"
+                ]
+            },
+            "license": [
+                "LGPL-3.0-only"
+            ],
+            "authors": [
+                {
+                    "name": "Nicola Asuni",
+                    "email": "info@tecnick.com",
+                    "role": "lead"
+                }
+            ],
+            "description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
+            "homepage": "http://www.tcpdf.org/",
+            "keywords": [
+                "PDFD32000-2008",
+                "TCPDF",
+                "barcodes",
+                "datamatrix",
+                "pdf",
+                "pdf417",
+                "qrcode"
+            ],
+            "time": "2022-12-17T10:28:59+00:00"
+        },
         {
             "name": "yiisoft/yii2",
             "version": "2.0.43",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/yiisoft/yii2-framework.git",
-                "reference": "f370955faa3067d9b27879aaf14b0978a805cd59"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/f370955faa3067d9b27879aaf14b0978a805cd59",
                 "reference": "f370955faa3067d9b27879aaf14b0978a805cd59",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "bower-asset/inputmask": "~3.2.2 | ~3.3.5",
@@ -1782,22 +1736,11 @@
         {
             "name": "yiisoft/yii2-bootstrap",
             "version": "2.0.11",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/yiisoft/yii2-bootstrap.git",
-                "reference": "83d144f4089adaa7064ad60dc4c1436daa2eb30e"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/83d144f4089adaa7064ad60dc4c1436daa2eb30e",
                 "reference": "83d144f4089adaa7064ad60dc4c1436daa2eb30e",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "bower-asset/bootstrap": "3.4.* | 3.3.* | 3.2.* | 3.1.*",
@@ -1875,22 +1818,11 @@
         {
             "name": "yiisoft/yii2-composer",
             "version": "2.0.10",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/yiisoft/yii2-composer.git",
-                "reference": "94bb3f66e779e2774f8776d6e1bdeab402940510"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/94bb3f66e779e2774f8776d6e1bdeab402940510",
                 "reference": "94bb3f66e779e2774f8776d6e1bdeab402940510",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "composer-plugin-api": "^1.0 | ^2.0"
@@ -1950,22 +1882,11 @@
         {
             "name": "yiisoft/yii2-httpclient",
             "version": "2.0.14",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/yiisoft/yii2-httpclient.git",
-                "reference": "50d670d2e1a30a354c27aeebf806a2db16954836"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/yiisoft/yii2-httpclient/zipball/50d670d2e1a30a354c27aeebf806a2db16954836",
                 "reference": "50d670d2e1a30a354c27aeebf806a2db16954836",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "paragonie/random_compat": ">=1",
@@ -2032,22 +1953,11 @@
         {
             "name": "yiisoft/yii2-mongodb",
             "version": "2.1.12",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/yiisoft/yii2-mongodb.git",
-                "reference": "4a74369a2b233f2def02579766e1eceadb8964be"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/yiisoft/yii2-mongodb/zipball/4a74369a2b233f2def02579766e1eceadb8964be",
                 "reference": "4a74369a2b233f2def02579766e1eceadb8964be",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "ext-mongodb": ">=1.0.0",
@@ -2105,22 +2015,11 @@
         {
             "name": "yiisoft/yii2-redis",
             "version": "2.0.16",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/yiisoft/yii2-redis.git",
-                "reference": "1b9efe97d8add594256b51089fbf7a56f31e3c9c"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/yiisoft/yii2-redis/zipball/1b9efe97d8add594256b51089fbf7a56f31e3c9c",
                 "reference": "1b9efe97d8add594256b51089fbf7a56f31e3c9c",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "ext-openssl": "*",
@@ -2178,22 +2077,11 @@
         {
             "name": "yiisoft/yii2-swiftmailer",
             "version": "2.1.2",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/yiisoft/yii2-swiftmailer.git",
-                "reference": "09659a55959f9e64b8178d842b64a9ffae42b994"
-            },
             "dist": {
                 "type": "zip",
                 "url": "https://api.github.com/repos/yiisoft/yii2-swiftmailer/zipball/09659a55959f9e64b8178d842b64a9ffae42b994",
                 "reference": "09659a55959f9e64b8178d842b64a9ffae42b994",
-                "shasum": "",
-                "mirrors": [
-                    {
-                        "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
-                        "preferred": true
-                    }
-                ]
+                "shasum": ""
             },
             "require": {
                 "swiftmailer/swiftmailer": "~6.0",
@@ -5752,7 +5640,10 @@
     "prefer-stable": false,
     "prefer-lowest": false,
     "platform": {
-        "php": ">=7.2.0"
+        "php": ">=7.2.0",
+        "ext-pdo": "*",
+        "ext-json": "*",
+        "ext-curl": "*"
     },
     "platform-dev": [],
     "plugin-api-version": "1.1.0"

+ 16 - 3
console/controllers/CalcController.php

@@ -68,6 +68,7 @@ class CalcController extends BaseController
         CalcRecord::record($periodNum, '开始推送基础数据');
         $res = (new PushBaseDataToCalc($periodNum))->start();
         if (200 == $res['code']) {
+            Period::updatePeriodIsProcessing($periodNum, Period::NOT_PROCESSING);
             CalcRecord::record($periodNum, '基础数据完成推送');
         } else {
             Period::updatePeriodIsProcessing($periodNum, Period::NOT_PROCESSING);
@@ -108,7 +109,7 @@ class CalcController extends BaseController
         if (200 == $res['code']) {
             CalcRecord::record($periodNum, '业绩单已生成');
         } else {
-            Period::updatePeriodIsProcessing($periodNum, Period::NOT_PROCESSING);
+            Period::updatePeriodIsPreparing($periodNum, Period::NOT_PREPARING);
             CalcRecord::record($periodNum, '第' . $periodNum . '期业绩单生成失败,原因:' . substr($res['msg'],0,100));
             return false;
         }
@@ -119,7 +120,7 @@ class CalcController extends BaseController
         if (200 == $res['code']) {
             CalcRecord::record($periodNum, '基础数据完成推送');
         } else {
-            Period::updatePeriodIsProcessing($periodNum, Period::NOT_PROCESSING);
+            Period::updatePeriodIsPreparing($periodNum, Period::NOT_PREPARING);
             CalcRecord::record($periodNum, '第' . $periodNum . '期基础数据推送失败,原因:' . $res['msg']);
             return false;
         }
@@ -147,6 +148,10 @@ class CalcController extends BaseController
         return true;
     }
 
+    /**推送基础数据
+     * @param $taskKey
+     * @return bool
+     */
     public function actionPushData($taskKey): bool
     {
         $params    = Cache::getAsyncParams($taskKey);
@@ -163,6 +168,10 @@ class CalcController extends BaseController
         }
     }
 
+    /**拉取期业绩
+     * @param $taskKey
+     * @return bool
+     */
     public function actionPullPeriod($taskKey): bool
     {
         $params    = Cache::getAsyncParams($taskKey);
@@ -179,6 +188,10 @@ class CalcController extends BaseController
         }
     }
 
+    /**拉取奖金数据
+     * @param $taskKey
+     * @return bool
+     */
     public function actionPullBonus($taskKey): bool
     {
         $params    = Cache::getAsyncParams($taskKey);
@@ -195,4 +208,4 @@ class CalcController extends BaseController
         }
     }
 
-}
+}

+ 0 - 0
frontendApi/config/menuBA.php


+ 0 - 0
frontendApi/modules/v1/components/BrandAuth.php


+ 0 - 0
frontendApi/modules/v1/controllers/BaController.php


+ 0 - 0
frontendApi/modules/v1/models/brand/User.php


+ 0 - 0
frontendEle/src/static/img/ngds-logo.jpg


+ 0 - 0
frontendEle/src/utils/config_trial.js


+ 0 - 0
frontendEle/src/views/atlas/brand-ambassador-list.vue


+ 0 - 0
frontendEle/src/views/atlas/relation.vue


+ 0 - 0
frontendEle/src/views/bonus/historical-cumulative-bonus.vue


+ 0 - 0
frontendEle/src/views/bonus/teams.vue


+ 0 - 0
frontendEle/src/views/config/ba-receive-address-edit.vue


+ 0 - 0
frontendEle/src/views/config/ba-receive-address-list.vue


+ 0 - 0
frontendEle/src/views/dashboard/ba-index.vue


+ 0 - 0
frontendEle/src/views/shop/ba-dec-order-list.vue


+ 0 - 0
frontendEle/src/views/shop/ba-order-list.vue


+ 0 - 0
frontendEle/src/views/shop/ba-product-list.vue


+ 0 - 0
frontendEle/src/views/shop/ba-shopping-cart.vue


+ 0 - 0
frontendEle/src/views/user/ba-dec.vue


+ 0 - 0
frontendEle/src/views/user/ba-info.vue


+ 0 - 0
frontendEle/src/views/user/ba-password.vue


+ 0 - 0
sql/StoredProcedure-NG.sql


+ 0 - 0
sql/coco_milk_0524_fc.sql


+ 0 - 0
sql/upgrade/1350.sql


+ 0 - 0
sql/upgrade/1462.sql


+ 0 - 0
sql/upgrade/1540.sql


+ 0 - 0
sql/upgrade/1684.sql


+ 0 - 0
sql/upgrade/1729.sql


+ 0 - 0
sql/upgrade/1736.sql


+ 0 - 0
sql/upgrade/1741.sql


+ 0 - 0
sql/upgrade/1748.sql


+ 0 - 0
sql/upgrade/1770.sql


+ 0 - 0
sql/upgrade/1962.sql


+ 0 - 0
sql/upgrade/1988.sql


+ 0 - 0
sql/upgrade/2022_08_05_1866.sql


+ 0 - 0
sql/upgrade/2022_08_12_crown.sql


+ 0 - 0
sql/upgrade/2022_09_05_1969.sql


Некоторые файлы не были показаны из-за большого количества измененных файлов