From 2c26571b2ec6dd7c4e3c8018d919ccf70e8b12a6 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Sat, 18 Nov 2023 17:33:09 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E5=BA=94=E7=94=A8=E8=BD=AF=E4=BB=B6?= =?UTF-8?q?=E6=8E=A8=E5=B9=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/adminapi/controller/approve/ApproveController.php | 4 ++-- app/common/logic/task/TaskLogic.php | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/adminapi/controller/approve/ApproveController.php b/app/adminapi/controller/approve/ApproveController.php index e04b9135f..e19838a3a 100644 --- a/app/adminapi/controller/approve/ApproveController.php +++ b/app/adminapi/controller/approve/ApproveController.php @@ -36,7 +36,7 @@ class ApproveController extends BaseAdminController public function audit() { try { - $params = $this->request->param(); // id check_status remark + $params = $this->request->param(); // id check_status remark amount $approve = Approve::find($params['id']); if (!$approve) { $this->fail('数据不存在'); @@ -57,7 +57,7 @@ class ApproveController extends BaseAdminController $this->fail('该任务提前完成条件:销售总额必须达到30万元及以上'); } else { // 提前完成标识 - $extend = json_decode($taskTemplate['extend'], true); + $extend = $taskTemplate['extend']; $extend['early_finish'] = 1; $taskTemplate->extend = json_encode($extend); $taskTemplate->save(); diff --git a/app/common/logic/task/TaskLogic.php b/app/common/logic/task/TaskLogic.php index 78a0b7d84..b196bdf02 100644 --- a/app/common/logic/task/TaskLogic.php +++ b/app/common/logic/task/TaskLogic.php @@ -2974,12 +2974,11 @@ class TaskLogic extends BaseLogic Log::info(['镇农科公司定时任务结算执行-'.$taskSchedulePlan['template_info']['title']]); $taskTemplateInfo = $taskSchedulePlan['template_info']; $dayCount = $taskTemplateInfo['day_count']; - $target = $taskTemplateInfo['extend']['target']; $stageDayOne = $taskTemplateInfo['stage_day_one']; $stageDayTwoCount = bcadd($taskTemplateInfo['stage_day_one'], $taskTemplateInfo['stage_day_two']); $stageDayThreeCount = bcadd($stageDayTwoCount, $taskTemplateInfo['stage_day_three']); $villageCompany = Company::where(['id' => $taskTemplateInfo['company_id']])->find(); - $task = Task::where('id', $taskSchedulePlan['task_id'])->find(); + // 任务累计天数 < stage1 关闭任务 if ($dayCount < $stageDayOne) { @@ -3045,9 +3044,11 @@ class TaskLogic extends BaseLogic $param = [ 'start_time' => $startTime, 'end_time' => $endTime, - 'village' => $villageCompany['village'] + 'village' => $villageCompany['village'], + ]; $result = ShopRequestLogic::getPlantingAndBreedingMerchantTradeAmount($param); // todo 商城接口那边需要确定种养殖基地是何种类型的商户 + dd($result); $tradeAmount = $result['data']['procure_amount']; // 交易池 $transactionPool = $taskSchedulePlan['template_info']['transaction_pool'];