Kaynağa Gözat

修改会员业绩功能提测

kevin_zhangl 3 yıl önce
ebeveyn
işleme
668403f3f0

+ 1 - 0
backendApi/config/menu.php

@@ -284,6 +284,7 @@ return [
 //            ['name'=>'Score-month', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'score-month', 'routePath'=>'bonus/score-month', 'show'=>1,],//月积分
             ['name'=>'月积分导出', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'score-month-export', 'routePath'=>'bonus/score-month-export', 'show'=>0,],
             ['name'=>'自动提现', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'auto-withdraw', 'routePath'=>'bonus/auto-withdraw', 'show'=>0,],
+            ['name'=>'Adjustment Performance', 'class'=>'', 'icon'=>'', 'controller'=>'bonus', 'action'=>'perf-adjustment', 'routePath'=>'bonus/perf-adjustment', 'show'=>1,],//调整业绩
         ]
     ],
     /*'report'=>[

+ 2 - 1
backendApi/config/urlManagerRules.php

@@ -416,7 +416,8 @@ return [
             'GET yc-perf' => 'yc-perf',
             'GET period-perf' => 'period-perf',
             'GET period-perf-export' => 'period-perf-export',
-            'GET,POST auto-withdraw' => 'auto-withdraw'
+            'GET,POST auto-withdraw' => 'auto-withdraw',
+            'GET,POST perf-adjustment' => 'perf-adjustment',
         ],
     ],
     [

+ 141 - 97
backendApi/modules/v1/controllers/BonusController.php

@@ -47,6 +47,7 @@ use common\helpers\user\Info;
 use common\helpers\user\Perf;
 use common\models\CalcBonus;
 use common\models\CFLXAudit;
+use common\models\forms\PerfAdjustmentForm;
 use common\models\forms\ResendQYForm;
 use common\models\forms\SendCFAndLXForm;
 use common\models\PerfMonth;
@@ -56,6 +57,8 @@ use common\models\ResendQYAudit;
 use common\models\User;
 use common\models\UserInfo;
 use common\models\UserNetwork;
+use common\models\UserPerf;
+use common\models\UserPerfAdjustment;
 use Yii;
 use common\helpers\Form;
 use common\models\Config;
@@ -65,6 +68,7 @@ use common\models\forms\PeriodForm;
 use common\models\forms\UserBonusForm;
 use common\models\Period;
 use Exception;
+use yii\web\HttpException;
 
 class BonusController extends BaseController {
     public $modelClass = FlowBonus::class;
@@ -80,7 +84,7 @@ class BonusController extends BaseController {
      * @return mixed
      * @throws \yii\base\InvalidConfigException
      * @throws \yii\httpclient\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionPeriod() {
         $filter = $this->filterCondition([
@@ -123,7 +127,7 @@ class BonusController extends BaseController {
      * 封期
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionClosePeriod() {
         $periodNum = \Yii::$app->request->get('periodNum');
@@ -142,7 +146,7 @@ class BonusController extends BaseController {
     /**
      * 计算业绩并生成业绩单
      * @return mixed
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionPerfPeriod() {
         $periodNum = \Yii::$app->request->get('periodNum');
@@ -162,7 +166,7 @@ class BonusController extends BaseController {
     /**
      * 结算封期
      * @return mixed
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionCalcPeriod() {
         $periodNum = \Yii::$app->request->get('periodNum');
@@ -182,7 +186,7 @@ class BonusController extends BaseController {
     /**
      * 挂网
      * @return mixed
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionSendPeriod() {
         $periodNum = \Yii::$app->request->get('periodNum');
@@ -202,7 +206,7 @@ class BonusController extends BaseController {
     /**
      * 查看业绩
      * @return mixed
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionPerf() {
         // 获取当前年月
@@ -230,7 +234,7 @@ class BonusController extends BaseController {
      * 奖金流水
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionFlowBonus() {
         $filter = $this->filterCondition([
@@ -262,7 +266,7 @@ class BonusController extends BaseController {
      * 奖金流水
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionFlowBonusExport() {
         $filter = $this->filterCondition([
@@ -295,7 +299,7 @@ class BonusController extends BaseController {
      * 复消积分流水
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionFlowRp() {
         $filter = $this->filterCondition([
@@ -322,7 +326,7 @@ class BonusController extends BaseController {
      * 复消积分流水导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionFlowRpExport() {
         $filter = $this->filterCondition([
@@ -351,7 +355,7 @@ class BonusController extends BaseController {
      * 会员余额流水 
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionFlowBalance() {
         $filter = $this->filterCondition([
@@ -376,7 +380,7 @@ class BonusController extends BaseController {
      * 会员余额流水导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionFlowBalanceExport() {
         $filter = $this->filterCondition([
@@ -403,7 +407,7 @@ class BonusController extends BaseController {
      * 兑换积分流水
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionFlowExchange() {
         $filter = $this->filterCondition([
@@ -430,7 +434,7 @@ class BonusController extends BaseController {
      * 兑换积分流水导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionFlowExchangeExport() {
         $filter = $this->filterCondition([
@@ -458,7 +462,7 @@ class BonusController extends BaseController {
      * 现金钱包流水
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionFlowWallet() {
         $filter = $this->filterCondition([
@@ -485,7 +489,7 @@ class BonusController extends BaseController {
      * 现金钱包流水导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionFlowWalletExport() {
         $filter = $this->filterCondition([
@@ -513,7 +517,7 @@ class BonusController extends BaseController {
      * 车房流水
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionFlowCf() {
         $filter = $this->filterCondition([
@@ -541,7 +545,7 @@ class BonusController extends BaseController {
      * 车房养老奖流水导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionFlowCfExport() {
         $filter = $this->filterCondition([
@@ -570,7 +574,7 @@ class BonusController extends BaseController {
      * 领袖分红流水
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionFlowLx() {
         $filter = $this->filterCondition([
@@ -598,7 +602,7 @@ class BonusController extends BaseController {
      * 导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionFlowLxExport() {
         $filter = $this->filterCondition([
@@ -627,7 +631,7 @@ class BonusController extends BaseController {
      * 车房养老奖和领袖分红年度发放审核列表
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionCfLxAuditList() {
         $filter = $this->filterCondition([
@@ -652,7 +656,7 @@ class BonusController extends BaseController {
      * 车房养老奖和领袖分红年度发放审核导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionCfLxAuditExport() {
         $filter = $this->filterCondition([
@@ -678,7 +682,7 @@ class BonusController extends BaseController {
      * 申请发放车房养老奖和领袖分红
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionCfLxApply() {
         if (Yii::$app->request->isPost) {
@@ -701,7 +705,7 @@ class BonusController extends BaseController {
      * 审核车房养老奖和领袖分红
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionCfLxAudit() {
         $formModel = new SendCFAndLXForm();
@@ -716,7 +720,7 @@ class BonusController extends BaseController {
      * 删除车房领袖审核信息
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionCfLxAuditDelete() {
         $sendCFAndLXForm = new SendCFAndLXForm();
@@ -734,7 +738,7 @@ class BonusController extends BaseController {
      * 查看所传期数的各项奖金
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionPeriodDetail() {
         $periodNum = \Yii::$app->request->get('periodNum');
@@ -769,7 +773,7 @@ class BonusController extends BaseController {
      * @return mixed
      * @throws \yii\base\Exception
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionNewPeriodBonus() {
         $periodNum = Period::calculatedMaxPeriodNum();
@@ -781,7 +785,7 @@ class BonusController extends BaseController {
      * 最新一期奖金导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionNewPeriodBonusExport() {
         $filter = $this->filterCondition([
@@ -831,7 +835,7 @@ class BonusController extends BaseController {
      * 获取往期已结算的奖金
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionOtherPeriodBonus() {
         $periodNumRequest = \Yii::$app->request->get('periodNum');
@@ -853,7 +857,7 @@ class BonusController extends BaseController {
      * 往期奖金导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionOtherPeriodBonusExport() {
         $filter = $this->filterCondition([
@@ -912,7 +916,7 @@ class BonusController extends BaseController {
     /**
      * 获取筛选类型
      * @return mixed
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionOtherPeriodBonusFilterTypes(){
         $listObj = new PeriodBonusList();
@@ -988,7 +992,7 @@ class BonusController extends BaseController {
      * @return mixed
      * @throws \yii\base\Exception
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceDownQy() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1040,7 +1044,7 @@ class BonusController extends BaseController {
      * 团队奖向下追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceDownQyExport() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1071,7 +1075,7 @@ class BonusController extends BaseController {
      * 团队奖向上追溯
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceUpQy() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1091,7 +1095,7 @@ class BonusController extends BaseController {
      * 团队奖向上追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceUpQyExport() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1115,7 +1119,7 @@ class BonusController extends BaseController {
      * @return mixed
      * @throws \yii\base\Exception
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceDownYc() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1140,7 +1144,7 @@ class BonusController extends BaseController {
      * 荣衔奖向下追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceDownYcExport() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1165,7 +1169,7 @@ class BonusController extends BaseController {
      * @return mixed
      * @throws \yii\base\Exception
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceDownBd() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1190,7 +1194,7 @@ class BonusController extends BaseController {
      * 服务奖向下追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceDownBdExport() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1216,7 +1220,7 @@ class BonusController extends BaseController {
      * @return mixed
      * @throws \yii\base\Exception
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceDownTg() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1241,7 +1245,7 @@ class BonusController extends BaseController {
      * 推广奖向下追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceDownTgExport() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1266,7 +1270,7 @@ class BonusController extends BaseController {
      * @return mixed
      * @throws \yii\base\Exception
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceDownXf() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1291,7 +1295,7 @@ class BonusController extends BaseController {
      * 消费奖向下追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceDownXfExport() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1316,7 +1320,7 @@ class BonusController extends BaseController {
      * @return mixed
      * @throws \yii\base\Exception
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceDownYj() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1341,7 +1345,7 @@ class BonusController extends BaseController {
      * 业绩奖向下追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceDownYjExport() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1366,7 +1370,7 @@ class BonusController extends BaseController {
      * @return mixed
      * @throws \yii\base\Exception
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceDownGx() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1391,7 +1395,7 @@ class BonusController extends BaseController {
      * 共享奖向下追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceDownGxExport() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1416,7 +1420,7 @@ class BonusController extends BaseController {
      * @return mixed
      * @throws \yii\base\Exception
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceDownGl() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1441,7 +1445,7 @@ class BonusController extends BaseController {
      * 管理奖向下追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceDownGlExport() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1466,7 +1470,7 @@ class BonusController extends BaseController {
      * @return mixed
      * @throws \yii\base\Exception
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceUpYc() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1491,7 +1495,7 @@ class BonusController extends BaseController {
      * 荣衔奖向上追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceUpYcExport() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1517,7 +1521,7 @@ class BonusController extends BaseController {
      * @return mixed
      * @throws \yii\base\Exception
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceUpBd() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1542,7 +1546,7 @@ class BonusController extends BaseController {
      * 服务奖向上追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceUpBdExport() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1567,7 +1571,7 @@ class BonusController extends BaseController {
      * @return mixed
      * @throws \yii\base\Exception
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceUpTg() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1592,7 +1596,7 @@ class BonusController extends BaseController {
      * 推广奖向上追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceUpTgExport() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1617,7 +1621,7 @@ class BonusController extends BaseController {
      * @return mixed
      * @throws \yii\base\Exception
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceUpXf() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1642,7 +1646,7 @@ class BonusController extends BaseController {
      * 推广奖向上追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceUpXfExport() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1667,7 +1671,7 @@ class BonusController extends BaseController {
      * @return mixed
      * @throws \yii\base\Exception
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceUpYj() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1692,7 +1696,7 @@ class BonusController extends BaseController {
      * 业绩奖向上追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceUpYjExport() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1717,7 +1721,7 @@ class BonusController extends BaseController {
      * @return mixed
      * @throws \yii\base\Exception
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceUpGx() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1742,7 +1746,7 @@ class BonusController extends BaseController {
      * 共享奖向上追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceUpGxExport() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1767,7 +1771,7 @@ class BonusController extends BaseController {
      * @return mixed
      * @throws \yii\base\Exception
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceUpGl() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1792,7 +1796,7 @@ class BonusController extends BaseController {
      * 管理奖向上追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceUpGlExport() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1818,7 +1822,7 @@ class BonusController extends BaseController {
      * @return mixed
      * @throws \yii\base\Exception
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceDownFx() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1843,7 +1847,7 @@ class BonusController extends BaseController {
      * 复销奖向下追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceDownFxExport() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1868,7 +1872,7 @@ class BonusController extends BaseController {
      * @return mixed
      * @throws \yii\base\Exception
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceUpFx() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1893,7 +1897,7 @@ class BonusController extends BaseController {
      * 复销奖向上追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceUpFxExport() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1917,7 +1921,7 @@ class BonusController extends BaseController {
      * 核算会员区域津贴
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionCalcQy() {
         $periodNum = Yii::$app->request->get('periodNum');
@@ -1945,7 +1949,7 @@ class BonusController extends BaseController {
      * 补发区域津贴列表
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionResendQyList() {
         $filter = $this->filterCondition([
@@ -1987,7 +1991,7 @@ class BonusController extends BaseController {
      * 区域津贴补发列表导出 
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionResendQyListExport() {
         $filter = $this->filterCondition([
@@ -2030,7 +2034,7 @@ class BonusController extends BaseController {
      * 补发区域津贴
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionResendQy() {
         if (Yii::$app->request->isPost) {
@@ -2057,7 +2061,7 @@ class BonusController extends BaseController {
      * 补发审核表
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionResendQyAuditList() {
         $filter = $this->filterCondition([
@@ -2082,7 +2086,7 @@ class BonusController extends BaseController {
      * 补发审核表导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionResendQyAuditListExport() {
         $filter = $this->filterCondition([
@@ -2108,7 +2112,7 @@ class BonusController extends BaseController {
      * 审核补发区域津贴
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionResendQyAudit() {
         $formModel = new ResendQYForm();
@@ -2127,7 +2131,7 @@ class BonusController extends BaseController {
      * 删除补发区域津贴审核信息
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionResendQyAuditDelete() {
         $resendQYForm = new ResendQYForm();
@@ -2145,7 +2149,7 @@ class BonusController extends BaseController {
      * 余额列表
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionBalanceList() {
         $filter = $this->filterCondition([
@@ -2175,7 +2179,7 @@ class BonusController extends BaseController {
      * 会员奖金余额导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionBalanceExport() {
         $filter = $this->filterCondition([
@@ -2202,7 +2206,7 @@ class BonusController extends BaseController {
      * 报单中心店补/补贴追溯
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceBt() {
         $startPeriodNum = Yii::$app->request->get('startPeriodNum');
@@ -2236,7 +2240,7 @@ class BonusController extends BaseController {
      * 报单中心补贴追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceBtExport() {
         $startPeriodNum = Yii::$app->request->get('startPeriodNum');
@@ -2272,7 +2276,7 @@ class BonusController extends BaseController {
      * 报单中心货补追溯
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceFl() {
         $startPeriodNum = Yii::$app->request->get('startPeriodNum');
@@ -2301,7 +2305,7 @@ class BonusController extends BaseController {
      * 报单中心货补追溯导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceFlExport() {
         $startPeriodNum = Yii::$app->request->get('startPeriodNum');
@@ -2332,7 +2336,7 @@ class BonusController extends BaseController {
      * 区域业绩提成追溯
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceFw() {
         $startPeriodNum = Yii::$app->request->get('startPeriodNum');
@@ -2361,7 +2365,7 @@ class BonusController extends BaseController {
      * 区域业绩提成导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionTraceFwExport() {
         $startPeriodNum = Yii::$app->request->get('startPeriodNum');
@@ -2392,7 +2396,7 @@ class BonusController extends BaseController {
      * 业绩单
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionPerfOrder(){
         $filter = $this->filterCondition([
@@ -2422,7 +2426,7 @@ class BonusController extends BaseController {
      * 业绩单导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionPerfOrderExport() {
         $filter = $this->filterCondition([
@@ -2466,7 +2470,7 @@ class BonusController extends BaseController {
      * 月积分
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionScoreMonth(){
         $filter = $this->filterCondition([
@@ -2487,7 +2491,7 @@ class BonusController extends BaseController {
      * 月积分导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionScoreMonthExport() {
         $filter = $this->filterCondition([
@@ -2510,7 +2514,7 @@ class BonusController extends BaseController {
      * 月业绩
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionPerfMonth(){
         $filter = $this->filterCondition([
@@ -2532,7 +2536,7 @@ class BonusController extends BaseController {
      * 月业绩导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionPerfMonthExport() {
         $filter = $this->filterCondition([
@@ -2556,7 +2560,7 @@ class BonusController extends BaseController {
      * 期业绩
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionPerfPeriodList(){
         $filter = $this->filterCondition([
@@ -2577,7 +2581,7 @@ class BonusController extends BaseController {
      * 期业绩导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionPerfPeriodListExport() {
         $filter = $this->filterCondition([
@@ -2601,7 +2605,7 @@ class BonusController extends BaseController {
      * 达标业绩
      * @return mixed
      * @throws \yii\base\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionPerfStandard(){
         $filter = $this->filterCondition([
@@ -2623,7 +2627,7 @@ class BonusController extends BaseController {
      * 达标业绩导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionPerfStandardExport() {
         $filter = $this->filterCondition([
@@ -2647,7 +2651,7 @@ class BonusController extends BaseController {
     /**
      * 会员实时业绩
      * @return mixed
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionRealTimePerf() {
         $userName = Yii::$app->request->get('userName');
@@ -2676,7 +2680,7 @@ class BonusController extends BaseController {
     /**
      * 荣衔业绩
      * @return mixed
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionYcPerf() {
         $userName = Yii::$app->request->get('userName');
@@ -2738,7 +2742,7 @@ class BonusController extends BaseController {
     /**
      * 用户业绩
      * @return mixed
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionUserPerf() {
         $filter = $this->filterCondition([
@@ -2756,7 +2760,7 @@ class BonusController extends BaseController {
      * 月业绩导出
      * @return mixed
      * @throws \yii\db\Exception
-     * @throws \yii\web\HttpException
+     * @throws HttpException
      */
     public function actionUserPerfExport() {
         $filter = $this->filterCondition([
@@ -2791,4 +2795,44 @@ class BonusController extends BaseController {
         }
     }
 
+    /**
+     * 查询安置网下级会员和业绩、修改业绩
+     * @return mixed|void
+     * @throws HttpException
+     * @throws \yii\base\Exception
+     */
+    public function actionPerfAdjustment()
+    {
+        // 查询业绩
+        if (\Yii::$app->request->isGet) {
+            $memberCode = Yii::$app->request->get('memberCode');
+            $userId = Info::getUserIdByUserName(trim($memberCode));
+
+            $perfList = [];
+            // 查询传入会员的安置网下级
+            $memberList = UserNetwork::getFirstFloorChildren($userId);
+            if ($memberList) {
+                foreach ($memberList as $member) {
+                    // 查询会员的业绩
+                    $perfMarket = UserPerf::getPerfMarket($member['USER_ID']);
+                    // 查询会员名
+                    $perfMarket['USER_NAME'] = Info::getUserNameByUserId($member['USER_ID']);
+                    $perfList[] = $perfMarket;
+                }
+            }
+
+            return static::notice(['allData' => $perfList]);
+        } else if (\Yii::$app->request->isPost) {
+            $formModel = new PerfAdjustmentForm();
+            $formModel->scenario = 'perfAdjustment';
+            $post = \Yii::$app->request->post();
+            if ($formModel->load($post, '') && $formModel->perfAdjustment()) {
+                return static::notice('Successful');
+            } else {
+                return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
+            }
+        } else {
+            return static::notice('Illegal request', 400); // 非法请求
+        }
+    }
 }

+ 12 - 0
backendEle/src/router/index.js

@@ -1170,6 +1170,18 @@ export const constantRouterMap = [
           ],
         },
       },
+      {
+        path: '/bonus/perf-adjustment',
+        component: _import('bonus/perf-adjustment'),
+        name: 'bonus-perf-adjustment',
+        meta: {
+          title: 'Adjustment Performance', // 业绩调整
+          breadcrumb: [
+            {title: 'Dashboard', path: '/dashboard/index'}, // Dashboard
+            {title: 'Bonus Management', path: '/bonus/period'}, // 奖金管理
+          ],
+        },
+      },
       {
         path: '/bonus/perf-standard',
         component: _import('bonus/perf-standard'),

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

@@ -0,0 +1,202 @@
+<template>
+  <div v-loading="loading">
+    <div class="white-box">
+      <div class="filter-user" @keyup.enter="getData()">
+        <el-input v-model="memberCode" size="small" style="width:400px;">
+          <template slot="prepend">Member Code</template>
+        </el-input>
+        <el-button type="primary" icon="el-icon-search" size="small" @click="getData()">Confirm<!-- 确定 --></el-button>
+      </div>
+
+      <div style="margin-top: 45px;">
+        <el-row>
+          <el-col :span="11">
+            <div class="grid-content bg-purple" v-show="leftPerfFormShow" style="width: 100%">
+              <el-card class="box-card" shadow="hover">
+                <el-form :model="leftPerfForm" status-icon ref="leftPerfForm" label-width="120px" width="100%" class="demo-ruleForm">
+                  <el-form-item label="Member Code" prop="USER_NAME">
+                    <el-input type="text" size="small" v-model="leftPerfForm.USER_ID" v-show="false" width="100%"></el-input>
+                    <el-input type="text" size="small" v-model="leftPerfForm.USER_NAME" readonly disabled></el-input>
+                  </el-form-item>
+
+                  <el-divider content-position="left">L. Market Balance Performance</el-divider>
+                  <el-form-item label="Balance" prop="SURPLUS_1L"><!--综合结余业绩-->
+                    <el-input type="text" size="small" v-model="leftPerfForm.SURPLUS_1L" autocomplete="off"></el-input>
+                  </el-form-item>
+                  <el-form-item label="Entry" prop="SURPLUS_1L_ZC"><!--首单结余业绩-->
+                    <el-input type="text" size="small" v-model="leftPerfForm.SURPLUS_1L_ZC" autocomplete="off"></el-input>
+                  </el-form-item>
+                  <el-form-item label="Reconditioning" prop="SURPLUS_1L_FX"><!--复消结余业绩-->
+                    <el-input type="text" size="small" v-model="leftPerfForm.SURPLUS_1L_FX" autocomplete="off"></el-input>
+                  </el-form-item>
+
+                  <el-divider content-position="left">R. Market Balance Performance</el-divider>
+                  <el-form-item label="Balance" prop="SURPLUS_2L"><!--综合结余业绩-->
+                    <el-input type="text" size="small" v-model="leftPerfForm.SURPLUS_2L" autocomplete="off"></el-input>
+                  </el-form-item>
+                  <el-form-item label="Entry Balance" prop="SURPLUS_2L_ZC">
+                    <el-input type="text" size="small" v-model="leftPerfForm.SURPLUS_2L_ZC" autocomplete="off"></el-input>
+                  </el-form-item>
+                  <el-form-item label="Reconditioning" prop="SURPLUS_2L_FX"><!--复消结余业绩-->
+                    <el-input type="text" size="small" v-model="leftPerfForm.SURPLUS_2L_FX" autocomplete="off"></el-input>
+                  </el-form-item>
+
+                  <el-form-item>
+                    <el-button type="primary" size="small" @click="handlePerfAdjustment('leftPerfForm')">Save</el-button>
+                  </el-form-item>
+                </el-form>
+              </el-card>
+            </div>
+          </el-col>
+
+          <el-col :span="2" v-show="rightPerfFormShow">
+            <div class="grid-content bg-purple" v-show="rightPerfFormShow" style="width: 100%; height: 100px;"></div>
+          </el-col>
+
+          <el-col :span="11">
+            <div class="grid-content bg-purple" v-show="rightPerfFormShow" style="width: 100%; ">
+              <el-card class="box-card" shadow="hover">
+                <el-form :model="rightPerfForm" status-icon ref="rightPerfForm" label-width="120px" width="100%" class="demo-ruleForm">
+                  <el-form-item label="Member Code" prop="USER_NAME">
+                    <el-input type="text" size="small" v-model="rightPerfForm.USER_ID" v-show="false"></el-input>
+                    <el-input type="text" size="small" v-model="rightPerfForm.USER_NAME" readonly disabled></el-input>
+                  </el-form-item>
+
+                  <el-divider content-position="left" >L. Market Balance Performance</el-divider>
+                  <el-form-item label="Balance" prop="SURPLUS_1L"><!--综合结余业绩-->
+                    <el-input type="text" size="small" v-model="rightPerfForm.SURPLUS_1L" autocomplete="off"></el-input>
+                  </el-form-item>
+                  <el-form-item label="Entry" prop="SURPLUS_1L_ZC"><!--首单结余业绩-->
+                    <el-input type="text" size="small" v-model="rightPerfForm.SURPLUS_1L_ZC" autocomplete="off" ></el-input>
+                  </el-form-item>
+                  <el-form-item label="Reconditioning" prop="SURPLUS_1L_FX"><!--复消结余业绩-->
+                    <el-input type="text" size="small" v-model="rightPerfForm.SURPLUS_1L_FX" autocomplete="off"></el-input>
+                  </el-form-item>
+
+                  <el-divider content-position="left">R. Market Balance Performance</el-divider>
+                  <el-form-item label="Balance" prop="SURPLUS_2L"><!--综合结余业绩-->
+                    <el-input type="text" size="small" v-model="rightPerfForm.SURPLUS_2L" autocomplete="off"></el-input>
+                  </el-form-item>
+                  <el-form-item label="Entry" prop="SURPLUS_2L_ZC"><!--首单结余业绩-->
+                    <el-input type="text" size="small" v-model="rightPerfForm.SURPLUS_2L_ZC" autocomplete="off"></el-input>
+                  </el-form-item>
+                  <el-form-item label="Reconditioning" prop="SURPLUS_2L_FX"><!--复消结余业绩-->
+                    <el-input type="text" size="small" v-model="rightPerfForm.SURPLUS_2L_FX" autocomplete="off"></el-input>
+                  </el-form-item>
+
+                  <el-form-item>
+                    <el-button type="primary" size="small" @click="handlePerfAdjustment('rightPerfForm')">Save</el-button>
+                  </el-form-item>
+                </el-form>
+              </el-card>
+            </div>
+          </el-col>
+        </el-row>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import network from '@/utils/network'
+
+export default {
+  name: 'bonus-perf-adjustment',
+  data() {
+    return {
+      loading: false,
+      memberCode: '',
+      tableList: [],
+      leftPerfFormShow: false,
+      rightPerfFormShow: false,
+      leftPerfForm: {
+        USER_ID: '',
+        USER_NAME: '',
+        SURPLUS_1L: '',
+        SURPLUS_1L_ZC: '',
+        SURPLUS_1L_FX: '',
+        SURPLUS_2L: '',
+        SURPLUS_2L_ZC: '',
+        SURPLUS_2L_FX: '',
+      },
+      rightPerfForm: {
+        USER_ID: '',
+        USER_NAME: '',
+        SURPLUS_1L: '',
+        SURPLUS_1L_ZC: '',
+        SURPLUS_1L_FX: '',
+        SURPLUS_2L: '',
+        SURPLUS_2L_ZC: '',
+        SURPLUS_2L_FX: '',
+      },
+    }
+  },
+  methods: {
+    // 查询安置网的下级会员和业绩
+    getData() {
+      if (!this.memberCode.length) {
+        this.$message({
+          message: 'Please enter member code',
+          type: 'info'
+        });
+        return false;
+      }
+
+      return network.getData(`bonus/perf-adjustment`, { memberCode : this.memberCode }).then(response => {
+        this.tableList = response.allData;
+
+        this.leftPerfFormShow = this.tableList.length >= 1;
+        this.rightPerfFormShow = this.tableList.length === 2;
+
+        if (this.leftPerfFormShow) {
+          this.leftPerfForm = this.tableList[0];
+        }
+        if (this.rightPerfFormShow) {
+          this.rightPerfForm = this.tableList[1];
+        }
+
+        this.loading = false;
+      }).catch(error => {
+        this.$message({
+          message: error,
+          type: 'error'
+        });
+
+        this.loading = false;
+      })
+    },
+    // 修改会员业绩
+    handlePerfAdjustment(formName) {
+      this.$confirm('Confirm and revise member performance?', 'Hits', { // 确认修改会员业绩
+        confirmButtonText: 'Confirm',
+        cancelButtonText: 'Cancel',
+        type: 'warning'
+      }).then(() => {
+        this.loading = true;
+        const formData = formName === 'leftPerfForm' ? this.leftPerfForm : this.rightPerfForm;
+        return network.postData(`bonus/perf-adjustment`, formData).then(response => {
+          this.$message({
+            message: response,
+            type: 'success'
+          });
+          this.loading = false;
+
+          // 刷新数据
+          this.getData();
+        }).catch(error => {
+          this.$message({
+            message: error,
+            type: 'warning'
+          });
+          this.loading = false;
+        });
+      })
+    },
+  }
+}
+</script>
+
+<style>
+  .filter-user { font-size: 14px; margin-bottom: 20px; }
+  .filter-user:after { content: ''; display: table;  clear: both; }
+</style>

+ 10 - 0
common/models/UserInfo.php

@@ -248,4 +248,14 @@ class UserInfo extends \common\components\ActiveRecord
             ],
         ];
     }
+
+    /**
+     * 查询安置网的会员
+     * @param $userId
+     * @return array|null
+     */
+    public static function getPlacementChildren($userId): ?array
+    {
+        return static::findAllAsArray('REC_UID=:REC_UID', [':REC_UID' => $userId], 'USER_ID,USER_NAME');
+    }
 }

+ 16 - 0
common/models/UserPerf.php

@@ -171,6 +171,12 @@ class UserPerf extends \common\components\ActiveRecord
             'PV_4L' => '四市场累计业绩',
             'PV_5L' => '五市场累计业绩',
             'PV_PSS' => '推荐团队累计业绩',
+            'SURPLUS_1L'    => '一市场综合结余业绩',
+            'SURPLUS_1L_ZC' => '一市场综合报单业绩',
+            'SURPLUS_1L_FX' => '一市场复消结余业绩',
+            'SURPLUS_2L'    => '二市场综合结余业绩',
+            'SURPLUS_2L_ZC' => '二市场综合报单业绩',
+            'SURPLUS_2L_FX' => '二市场复消结余业绩',
         ];
     }
 
@@ -217,4 +223,14 @@ class UserPerf extends \common\components\ActiveRecord
 
         return $result;
     }
+
+    /**
+     * 查询会员结余业绩
+     * @param $userId
+     * @return array|null
+     */
+    public static function getPerfMarket($userId): ?array
+    {
+        return self::findOneAsArray('USER_ID=:USER_ID', [':USER_ID' => $userId], 'USER_ID,SURPLUS_1L,SURPLUS_1L_ZC,SURPLUS_1L_FX,SURPLUS_2L,SURPLUS_2L_ZC,SURPLUS_2L_FX');
+    }
 }

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

@@ -0,0 +1,126 @@
+<?php
+namespace common\models\forms;
+
+use common\components\Model;
+use common\helpers\Form;
+use common\libs\logging\operate\AdminOperate;
+use common\models\Period;
+use common\models\UserPerf;
+use yii\base\Exception;
+
+class PerfAdjustmentForm extends Model
+{
+    public $USER_ID;
+    public $USER_NAME;
+
+    public $SURPLUS_1L;
+    public $SURPLUS_1L_ZC;
+    public $SURPLUS_1L_FX;
+
+    public $SURPLUS_2L;
+    public $SURPLUS_2L_ZC;
+    public $SURPLUS_2L_FX;
+
+    public function init()
+    {
+        parent::init();
+        $this->adminOperateLogger = new AdminOperate([
+            'fetchClass' => UserPerf::class,
+        ]);
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function rules()
+    {
+        return [
+            [['USER_ID', 'SURPLUS_1L', 'SURPLUS_1L_ZC', 'SURPLUS_1L_FX', 'SURPLUS_2L', 'SURPLUS_2L_ZC', 'SURPLUS_2L_FX'], 'required'],
+        ];
+    }
+
+    /**
+     * 指定场景
+     * @return array
+     */
+    public function scenarios() {
+        $parentScenarios = parent::scenarios();
+        $customScenarios = [
+            'perfAdjustment' => ['USER_ID', 'USER_NAME', 'SURPLUS_1L', 'SURPLUS_1L_ZC', 'SURPLUS_1L_FX', 'SURPLUS_2L', 'SURPLUS_2L_ZC', 'SURPLUS_2L_FX']
+        ];
+        return array_merge($parentScenarios, $customScenarios);
+    }
+
+    /**
+     * @inheritdoc
+     */
+    public function attributeLabels()
+    {
+        return [
+            'USER_ID'       => '会员ID',
+            'SURPLUS_1L'    => '一市场综合结余业绩',
+            'SURPLUS_1L_ZC' => '一市场综合报单业绩',
+            'SURPLUS_1L_FX' => '一市场复消结余业绩',
+            'SURPLUS_2L'    => '二市场综合结余业绩',
+            'SURPLUS_2L_ZC' => '二市场综合报单业绩',
+            'SURPLUS_2L_FX' => '二市场复消结余业绩',
+        ];
+    }
+
+    /**
+     * 调整会员业绩
+     * @return bool|null
+     */
+    public function perfAdjustment(): ?bool
+    {
+        if (!$this->validate()) {
+            return false;
+        }
+
+        $transaction = \Yii::$app->db->beginTransaction();
+        try {
+            // 修改前业绩
+            $userPerf = UserPerf::find()
+                ->where('USER_ID=:USER_ID', [':USER_ID' => $this->USER_ID])
+                ->select('USER_ID,SURPLUS_1L,SURPLUS_1L_ZC,SURPLUS_1L_FX,SURPLUS_2L,SURPLUS_2L_ZC,SURPLUS_2L_FX')
+                ->one();
+            if (!$userPerf->toArray()) {
+                throw new Exception('Member performance does not exist'); // 会员业绩不存在
+            }
+
+            $this->adminOperateLogger->beforeUpdate($userPerf);
+
+            $modernPerf = [
+                'SURPLUS_1L'    => $this->SURPLUS_1L,
+                'SURPLUS_1L_ZC' => $this->SURPLUS_1L_ZC,
+                'SURPLUS_1L_FX' => $this->SURPLUS_1L_FX,
+                'SURPLUS_2L'    => $this->SURPLUS_2L,
+                'SURPLUS_2L_ZC' => $this->SURPLUS_2L_ZC,
+                'SURPLUS_2L_FX' => $this->SURPLUS_2L_FX,
+            ];
+            if (!UserPerf::updateAll($modernPerf, 'USER_ID=:USER_ID', [':USER_ID' => $this->USER_ID])) {
+                throw new Exception(Form::formatErrorsForApi($userPerf->getErrors()));
+            }
+
+            $transaction->commit();
+
+            $afterUpdate = UserPerf::find()
+                ->where('USER_ID=:USER_ID', [':USER_ID' => $this->USER_ID])
+                ->select('USER_ID,SURPLUS_1L,SURPLUS_1L_ZC,SURPLUS_1L_FX,SURPLUS_2L,SURPLUS_2L_ZC,SURPLUS_2L_FX')
+                ->one();
+            $this->adminOperateLogger->afterUpdate($afterUpdate)->clean()->save([
+                'optType' => 'perf adjustment', // 调整业绩
+                'userId' => $this->USER_ID,
+                'userName' => $this->USER_NAME,
+                'periodNum' => Period::instance()->getNowPeriodNum(),
+            ]);
+        } catch (Exception $e) {
+            $transaction->rollBack();
+            $this->addError('perfAdjustment', $e->getMessage());
+            return false;
+        }
+
+        return true;
+    }
+
+}