From 91e77b712c4cda70f0507c8a4192aac296e2c302 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Sat, 2 Dec 2023 19:53:38 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=8F=90=E4=BE=9B=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=B8=89=E8=BD=AE=E8=BD=A6=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/IndexController.php | 30 +++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/app/api/controller/IndexController.php b/app/api/controller/IndexController.php index ecd7ea1c5..74c897d8d 100755 --- a/app/api/controller/IndexController.php +++ b/app/api/controller/IndexController.php @@ -38,7 +38,7 @@ use think\response\Json; */ class IndexController extends BaseApiController { - public array $notNeedLogin = ['index', 'config', 'policy', 'decorate', 'notifyUrl', 'notifyProperty', 'notifyAuthentication', 'notifyVehicleContractUpdate','townCarRent','systemCarRent', 'selfCarRent', 'cancelRent', 'buyCar']; + public array $notNeedLogin = ['index', 'config', 'policy', 'decorate', 'notifyUrl', 'notifyProperty', 'notifyAuthentication', 'notifyVehicleContractUpdate','townCarRent','systemCarRent', 'selfCarRent', 'cancelRent', 'buyCar', 'vehicleCarList']; /** * @notes 首页数据 @@ -820,4 +820,32 @@ class IndexController extends BaseApiController Db::name('company_authentication_fail_log')->insert(['company_id'=>$parmas['id'], 'log_type'=>3, 'fail_reason'=>$data['msg'], 'create_time'=>time()]); } } + + + public function vehicleCarList() + { + $param = $this->request->param(); + // 镇区域码为空,查区县的公司 + if (empty($param['streetCode'])) { + $companyList = Company::where('area', $param['areaCode'])->select()->toArray(); + } else { + $companyList = Company::where('street', $param['streetCode'])->select()->toArray(); + } + $companyIds = array_column($companyList, 'id'); + $carList = []; + // 查镇车辆列表 + $vehicleList = VehicleRent::whereIn('company_id', $companyIds)->where('status','in','0,1,2')->field('car_id as id,car_license as license')->select()->toArray(); + + // 查小组车辆列表 +// $buyCarRent = VehicleBuyRecord::whereIn('company_id', $companyIds)->where('status','<>',4)->findOrEmpty(); +// if($buyCarRent->isEmpty()){ +// $data = VehicleContract::whereIn('company_b_id', $companyIds)->where('type','<>',2)->order('id desc')->findOrEmpty(); +// }else { +// $data = $buyCarRent; +// } +// $list = $data->toArray(); +// $carsInfo = json_decode($list['cars_info'], true); +// $result = array_merge($vehicleList,$carsInfo); + return $this->success('获取成功', $vehicleList); + } } From 066e8c4382b3db080900701ae528754d370bad03 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Mon, 4 Dec 2023 13:42:17 +0800 Subject: [PATCH 2/5] fixed --- app/adminapi/lists/user/UserLists.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/adminapi/lists/user/UserLists.php b/app/adminapi/lists/user/UserLists.php index ee2036448..4bb29f8f7 100755 --- a/app/adminapi/lists/user/UserLists.php +++ b/app/adminapi/lists/user/UserLists.php @@ -39,6 +39,10 @@ class UserLists extends BaseAdminDataLists implements ListsExcelInterface public function setSearch(): array { $allowSearch = ['keyword', 'channel', 'create_time_start', 'create_time_end', 'company_id']; + if (empty($this->params['company_id'])) { + unset($allowSearch['company_id']); + unset($this->params['company_id']); + } return array_intersect(array_keys($this->params), $allowSearch); } @@ -68,13 +72,15 @@ class UserLists extends BaseAdminDataLists implements ListsExcelInterface } } + $field = "id,id contract,sn,nickname,sex,avatar,account,mobile,channel,create_time,admin_id,company_id,street,street as street_name,is_contract"; + $lists = User::withSearch($this->setSearch(), $this->params) - ->field($field) - ->where($where) ->with(['company']) - ->order('id desc') + ->where($where) ->limit($this->limitOffset, $this->limitLength) + ->field($field) + ->order('id desc') ->select() ->toArray(); From 9b534e6c324d8bed598674b319fae4dc4d4302a9 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Mon, 4 Dec 2023 15:41:22 +0800 Subject: [PATCH 3/5] fixed --- app/api/controller/IndexController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/controller/IndexController.php b/app/api/controller/IndexController.php index 74c897d8d..9014ef7d1 100755 --- a/app/api/controller/IndexController.php +++ b/app/api/controller/IndexController.php @@ -834,7 +834,7 @@ class IndexController extends BaseApiController $companyIds = array_column($companyList, 'id'); $carList = []; // 查镇车辆列表 - $vehicleList = VehicleRent::whereIn('company_id', $companyIds)->where('status','in','0,1,2')->field('car_id as id,car_license as license')->select()->toArray(); + $vehicleList = Db::name('vehicle_rent')->whereIn('company_id', $companyIds)->where('status','in','0,1,2')->field('car_id as id,car_license as license')->group('company_id')->select()->toArray(); // 查小组车辆列表 // $buyCarRent = VehicleBuyRecord::whereIn('company_id', $companyIds)->where('status','<>',4)->findOrEmpty(); From 5aca95ef795ed92dcf91f02c8bd1f2673c52a4da Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Mon, 4 Dec 2023 15:54:45 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=88=A0=E9=99=A4=20=E6=8F=90=E4=BE=9B?= =?UTF-8?q?=E5=95=86=E5=9F=8E=E6=9F=A5=E8=AF=A2=E4=B8=89=E8=BD=AE=E8=BD=A6?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/IndexController.php | 28 -------------------------- 1 file changed, 28 deletions(-) diff --git a/app/api/controller/IndexController.php b/app/api/controller/IndexController.php index 9014ef7d1..302d8930d 100755 --- a/app/api/controller/IndexController.php +++ b/app/api/controller/IndexController.php @@ -820,32 +820,4 @@ class IndexController extends BaseApiController Db::name('company_authentication_fail_log')->insert(['company_id'=>$parmas['id'], 'log_type'=>3, 'fail_reason'=>$data['msg'], 'create_time'=>time()]); } } - - - public function vehicleCarList() - { - $param = $this->request->param(); - // 镇区域码为空,查区县的公司 - if (empty($param['streetCode'])) { - $companyList = Company::where('area', $param['areaCode'])->select()->toArray(); - } else { - $companyList = Company::where('street', $param['streetCode'])->select()->toArray(); - } - $companyIds = array_column($companyList, 'id'); - $carList = []; - // 查镇车辆列表 - $vehicleList = Db::name('vehicle_rent')->whereIn('company_id', $companyIds)->where('status','in','0,1,2')->field('car_id as id,car_license as license')->group('company_id')->select()->toArray(); - - // 查小组车辆列表 -// $buyCarRent = VehicleBuyRecord::whereIn('company_id', $companyIds)->where('status','<>',4)->findOrEmpty(); -// if($buyCarRent->isEmpty()){ -// $data = VehicleContract::whereIn('company_b_id', $companyIds)->where('type','<>',2)->order('id desc')->findOrEmpty(); -// }else { -// $data = $buyCarRent; -// } -// $list = $data->toArray(); -// $carsInfo = json_decode($list['cars_info'], true); -// $result = array_merge($vehicleList,$carsInfo); - return $this->success('获取成功', $vehicleList); - } } From ebdfc81b166b70f71cb651b1e321ad88e31b138f Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Tue, 5 Dec 2023 10:20:27 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fixed=20=E6=9D=91=E8=81=94=E7=BB=9C?= =?UTF-8?q?=E5=91=98=E4=BB=BB=E5=8A=A1-=E7=A7=8D=E5=85=BB=E6=AE=96?= =?UTF-8?q?=E5=9F=BA=E5=9C=B0=E8=AE=A2=E5=8D=95=E5=8C=B9=E9=85=8D=20=20?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=AF=8F=E6=97=A5=E7=BB=93=E7=AE=97=E3=80=82?= =?UTF-8?q?=E6=96=B0=E5=A2=9Elog=EF=BC=8C=E8=AE=B0=E5=BD=95=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=95=86=E5=9F=8E=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=83=85=E5=86=B5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/logic/task/TaskLogic.php | 103 ++++++++++++++-------------- 1 file changed, 53 insertions(+), 50 deletions(-) diff --git a/app/common/logic/task/TaskLogic.php b/app/common/logic/task/TaskLogic.php index 5cb34a7de..9263b5976 100644 --- a/app/common/logic/task/TaskLogic.php +++ b/app/common/logic/task/TaskLogic.php @@ -927,6 +927,7 @@ class TaskLogic extends BaseLogic } if(isset($result['status']) && $result['status']== 200) { $tradeAmount = $result['data']['trade_amount']; + Log::info(['4.负责人-信息收集与促销-查询商城返回-交易额', $tradeAmount]); } $totalAmount = bcadd($tradeAmount, $townTransactionPool, 2); // 总的交易金额 = 当日交易额 + 累计交易池 @@ -972,7 +973,7 @@ class TaskLogic extends BaseLogic $result = ShopRequestLogic::getTownTradeAmount($param); $tradeAmount = $result['data']['trade_amount']; - + Log::info(['4.负责人-督促种养殖商户和供应链商户交易-查询商城返回-销售额', $tradeAmount]); // 总交易额 交易池金额+商城交易额 $totalAmount = bcadd($townTransactionPool, $tradeAmount, 2); @@ -1275,11 +1276,13 @@ class TaskLogic extends BaseLogic $result = ShopRequestLogic::getSupplyChainMerchantCount($param); + if ($result['status'] != 200) { Log::error('查询供应链商户统计接口失败'.ShopRequestLogic::getError()); $count = 0; } else { $count = $result['data']['count']; + Log::info(['招驻供应链商户-查询供应链商户统计接口-统计值', $result]); } @@ -1339,6 +1342,7 @@ class TaskLogic extends BaseLogic $count = 0; } else { $count = $result['data']['count']; + Log::info(['市场部长-供应链商户完成商品上架任务-查询商城接口-返回', json_encode($result)]); } // 达到目标数 完成则结算 @@ -1366,10 +1370,11 @@ class TaskLogic extends BaseLogic $result1 = ShopRequestLogic::getStockUpdate($param); if ($result1['status'] != 200) { - Log::info(['4.市场部长-供应链商户完成库存更新任务-查询商城接口结果', json_encode($result)]); + Log::info(['4.市场部长-供应链商户完成库存更新任务-查询商城接口结果', json_encode($result1)]); $count = 0; } else { $count = $result1['data']['count']; + Log::info(['市场部长-供应链商户完成库存更新任务-查询商城接口-返回', json_encode($result1)]); } if ($count >= 1){ @@ -1472,6 +1477,7 @@ class TaskLogic extends BaseLogic Log::info(['4.市场部长-协助供应链商户采购任务-查询商城接口失败', json_encode($result1)]); $result1['data']['procure_amount'] = 0; } + Log::info(['4.市场部长-协助供应链商户采购任务-查询商城接口-返回', $result1['data']['procure_amount']]); if ($result1['data']['procure_amount'] > 0) { $procureAmount = $result1['data']['procure_amount']; // 采购金额 实际完成率 @@ -1625,6 +1631,7 @@ class TaskLogic extends BaseLogic $result1 = ShopRequestLogic::getTradeAmount($param); if ($result1['status'] == 200) { $tradeAmount = $result1['data']['procure_amount']; + Log::info(['4.市场部长-协助供应链商户销售任务-查询商城返回-交易额', $tradeAmount]); } else { Log::info(['4.市场部长-协助供应链商户销售任务-查询商城接口失败', json_encode($result1)]); $tradeAmount = 0; @@ -1738,6 +1745,7 @@ class TaskLogic extends BaseLogic $result = ShopRequestLogic::getGeneralMerchantCount($param); if ($result['status'] == 200) { $count = $result['data']['count']; + Log::info(['4.市场部长-招驻一般商户-查询商城返回-户数', $count]); } else { $count = 0; } @@ -1761,6 +1769,7 @@ class TaskLogic extends BaseLogic $result = ShopRequestLogic::getGeneralMerchantCount($param); Log::error('查询供应链商户统计接口失败'.ShopRequestLogic::getError()); $count = $result['data']['count']; + Log::info(['4.市场部长-招驻一般商户-查询商城返回-户数', $count]); if ($count >= $target) { $taskMoney = bcmul($totalMoney, 0.9, 2); return $taskMoney; @@ -1780,6 +1789,7 @@ class TaskLogic extends BaseLogic $result = ShopRequestLogic::getGeneralMerchantCount($param); Log::error('查询供应链商户统计接口失败'.ShopRequestLogic::getError()); $count = $result['data']['count']; + Log::info(['4.市场部长-招驻一般商户-查询商城返回-户数', $count]); if ($count >= $target) { $taskMoney = bcmul($totalMoney, 0.8, 2); return $taskMoney; @@ -1908,7 +1918,7 @@ class TaskLogic extends BaseLogic ]; $result = ShopRequestLogic::getGeneralMerchantProductListing($param); - Log::info(['4.市场部长-一般商户完成商品上架任务-查询商城接口结果失败', json_encode($result)]); + Log::info(['4.市场部长-一般商户完成商品上架任务-查询商城接口结果', json_encode($result)]); $count = $result['data']['count']; // 任一商户未完成,判定为未完成 if ($count < 200) { @@ -1982,7 +1992,7 @@ class TaskLogic extends BaseLogic ]; $result = ShopRequestLogic::getGeneralMerchantPurchaseAmount($param); $procureAmount = $result['data']['procure_amount']; - + Log::info(['4.市场部长-督促一般商户完成采购-查询商城返回-采购额', $procureAmount]); $step = bcdiv(bcsub($dayCount, $stageDayOne), 30); $target = $templateInfo['extend']['target']; $rate = self::countRate1($procureAmount, $target, $step); // 实际完成率 @@ -2017,6 +2027,7 @@ class TaskLogic extends BaseLogic ]; $result = ShopRequestLogic::getGeneralMerchantPurchaseAmount($param); $procureAmount = $result['data']['procure_amount']; + Log::info(['4.市场部长-督促一般商户完成采购-查询商城返回-采购额', $procureAmount]); $rate = bcdiv($procureAmount, $targetProcureAmount, 1); if (bccomp($rate, 0.5, 1) == -1) { return 0; @@ -2115,7 +2126,7 @@ class TaskLogic extends BaseLogic ]; $result = ShopRequestLogic::getGeneralMerchantPurchaseAmount($param); $procureAmount = $result['data']['procure_amount']; - + Log::info(['4.市场部长-督促一般商户完成采购-查询商城返回-采购额', $procureAmount]); $step = bcdiv(bcsub($dayCount, $stageDayOne), 30); $target = $templateInfo['extend']['target']; $rate = self::countRate1($procureAmount, $target, $step); // 实际完成率 @@ -2150,6 +2161,7 @@ class TaskLogic extends BaseLogic ]; $result = ShopRequestLogic::getGeneralMerchantTradeAmount($param); $tradeAmount = $result['data']['procure_amount']; + Log::info(['4.市场部长-督促一般商户完成销售-查询商城返回-销售额', $tradeAmount]); $rate = bcdiv($tradeAmount, $targetProcureAmount, 1); if (bccomp($rate, 0.5, 1) == -1) { return 0; @@ -2753,7 +2765,7 @@ class TaskLogic extends BaseLogic public static function villageTaskSettlement($taskSchedulePlan) { try { - Log::info(['存管理公司定时任务结算执行-任务计划', $taskSchedulePlan]); + Log::info(['村管理公司定时任务结算执行-任务计划', $taskSchedulePlan]); $taskTemplateInfo = $taskSchedulePlan['template_info']; // 任务类型用的数据字典主键id,将id和value作映射,避免测试和正式环境数据字典数据不一致时出问题 $villageTaskTypeList = DictData::where(['type_value' => 'village_task_type', 'status' => 1])->column('value', 'id'); @@ -3061,15 +3073,12 @@ class TaskLogic extends BaseLogic /** * @param $taskSchedulePlan - * 种养殖基地订单匹配 - * 任务累计天数 < stage1 关闭任务 - * 任务累计天数 = stage1 从商城查询种养殖商户的交易额,判定是否完成任务,完成则结算 - * 任务累计天数 < stage1+stage2 关闭任务,不结算 - * 任务累计天数 = stage1+stage2 从商城查询种养殖商户的交易额,判定是否完成任务,完成则结算 - * 任务累计天数 < stage1 + stage2 + stage3 关闭任务,不结算 - * 任务累计天数 = stage1 + stage2 + stage3 从商城查询种养殖商户的交易额,判定是否完成任务,完成 - * 任务累计天数 - (stage1 + stage2 + stage3) 不能整除30 关闭任务 - * 任务累计天数 - (stage1 + stage2 + stage3) 整除30 从商城查询种养殖商户的交易额,判定是否完成任务,完成 + * 种养殖基地订单匹配 每日结算,阶段不同,目标金额不同,任务金额不同 + * 第一考核周期每日目标金额 434,第二考核周期每日目标金额 567. + * 任务累计天数 <= stage1 从商城查询种养殖商户的交易额,判定是否完成第一考核周期的每日目标金额,完成则结算第一阶段的任务金额 + * stage1 < 任务累计天数 <= stage1+stage2 从商城查询种养殖商户的交易额,判定是否完成第二考核周期的每日目标金额,完成则结算第二阶段的任务金额 + * stage1+stage2 < 任务累计天数 <= stage1 + stage2 + stage3 从商城查询种养殖商户的交易额,判定是否完成第二考核周期的每日目标金额,完成则结算第三阶段的任务金额 + * 任务累计天数 > (stage1 + stage2 + stage3) 从商城查询种养殖商户的交易额,从商城查询种养殖商户的交易额,判定是否完成第二考核周期的每日目标金额,完成则结算长期阶段的任务金额 */ private static function dealVillageTask7($taskSchedulePlan) { @@ -3081,53 +3090,46 @@ class TaskLogic extends BaseLogic $stageDayThreeCount = bcadd($stageDayTwoCount, $taskTemplateInfo['stage_day_three']); $villageCompany = Company::where(['id' => $taskTemplateInfo['company_id']])->find(); - + $startTime = strtotime(date('Y-m-d',time())); // 当天00:00:00 + $endTime = $startTime + 86399; // 任务累计天数 < stage1 关闭任务 - if ($dayCount < $stageDayOne) { - (new Task())->closeTask($taskSchedulePlan['task_id']); - } +// if ($dayCount < $stageDayOne) { +// (new Task())->closeTask($taskSchedulePlan['task_id']); +// } - // 任务累计天数 = stage1 从商城查询种养殖商户的交易额,判定是否完成任务,完成则结算 - if ($dayCount == $stageDayOne) { - $startTime = strtotime(date('Y-m-d',strtotime($taskTemplateInfo['create_time'])))+86400; // 创建任务的第二天00:00:00开始 - $endTime = strtotime('+30 day', $startTime); - self::finishVillageTask7($startTime, $endTime, 13000, $taskTemplateInfo['stage_day_one'], $taskTemplateInfo['money'], $villageCompany, $taskSchedulePlan); + // 任务累计天数 <= stage1 从商城查询种养殖商户的交易额,判定是否完成第一阶段的每日目标金额,完成则结算第一阶段的任务金额 + if ($dayCount <= $stageDayOne) { + self::finishVillageTask7($startTime, $endTime, 434, $taskTemplateInfo['stage_day_one'], $taskTemplateInfo['money'], $villageCompany, $taskSchedulePlan); } // 任务累计天数 < stage1+stage2 关闭任务,不结算 - if ($dayCount < $stageDayTwoCount) { - (new Task())->closeTask($taskSchedulePlan['task_id']); - } +// if ($dayCount < $stageDayTwoCount) { +// (new Task())->closeTask($taskSchedulePlan['task_id']); +// } - // 任务累计天数 = stage1+stage2 从商城查询种养殖商户的交易额,判定是否完成任务,完成则结算 - if ($dayCount == $stageDayTwoCount) { - $startTime = strtotime('-30 day', $endTime); - $endTime = strtotime(date('Y-m-d', time())); - self::finishVillageTask7($startTime, $endTime, 17000, $taskTemplateInfo['stage_day_two'], $taskTemplateInfo['money_two'], $villageCompany, $taskSchedulePlan); + // stage1 < 任务累计天数 <= stage1+stage2 从商城查询种养殖商户的交易额,判定是否完成第二考核周期的每日目标金额,完成则结算第二阶段的任务金额 + if ($stageDayOne < $dayCount && $dayCount <= $stageDayTwoCount) { + self::finishVillageTask7($startTime, $endTime, 567, $taskTemplateInfo['stage_day_two'], $taskTemplateInfo['money_two'], $villageCompany, $taskSchedulePlan); } // 任务累计天数 < stage1 + stage2 + stage3 关闭任务,不结算 - if ($dayCount < $stageDayThreeCount) { - (new Task())->closeTask($taskSchedulePlan['task_id']); - } +// if ($dayCount < $stageDayThreeCount) { +// (new Task())->closeTask($taskSchedulePlan['task_id']); +// } - // 任务累计天数 = stage1 + stage2 + stage3 从商城查询种养殖商户的交易额,判定是否完成任务,完成 - if ($dayCount == $stageDayThreeCount) { - $startTime = strtotime('-30 day', $endTime); - $endTime = strtotime(date('Y-m-d', time())); - self::finishVillageTask7($startTime, $endTime, 17000, $taskTemplateInfo['stage_day_three'], $taskTemplateInfo['new_money_three'], $villageCompany, $taskSchedulePlan); + // stage1+stage2 < 任务累计天数 <= stage1 + stage2 + stage3 从商城查询种养殖商户的交易额,判定是否完成第二考核周期的每日目标金额,完成则结算第三阶段的任务金额 + if ($stageDayTwoCount < $dayCount && $dayCount <= $stageDayThreeCount) { + self::finishVillageTask7($startTime, $endTime, 567, $taskTemplateInfo['stage_day_three'], $taskTemplateInfo['new_money_three'], $villageCompany, $taskSchedulePlan); } // 任务累计天数 - (stage1 + stage2 + stage3) 不能整除30 关闭任务 - if ($dayCount > $stageDayThreeCount && $dayCount % 30 != 0) { - (new Task())->closeTask($taskSchedulePlan['task_id']); - } +// if ($dayCount > $stageDayThreeCount && $dayCount % 30 != 0) { +// (new Task())->closeTask($taskSchedulePlan['task_id']); +// } - // 任务累计天数 - (stage1 + stage2 + stage3) 整除30 从商城查询种养殖商户的交易额,,判定是否完成任务,完成 - if ($dayCount > $stageDayThreeCount && $dayCount % 30 == 0) { - $startTime = strtotime('-30 day', $endTime); - $endTime = strtotime(date('Y-m-d', time())); - self::finishVillageTask7($startTime, $endTime, 17000, 30, $taskTemplateInfo['money_three'], $villageCompany, $taskSchedulePlan); + // 任务累计天数 > (stage1 + stage2 + stage3) 从商城查询种养殖商户的交易额,从商城查询种养殖商户的交易额,判定是否完成第二考核周期的每日目标金额,完成则结算长期阶段的任务金额 + if ($dayCount > $stageDayThreeCount) { + self::finishVillageTask7($startTime, $endTime, 567, 30, $taskTemplateInfo['money_three'], $villageCompany, $taskSchedulePlan); } } @@ -3149,14 +3151,15 @@ class TaskLogic extends BaseLogic 'village' => $villageCompany['village'], ]; - $result = ShopRequestLogic::getPlantingAndBreedingMerchantTradeAmount($param); // todo 商城接口那边需要确定种养殖基地是何种类型的商户 + $result = ShopRequestLogic::getPlantingAndBreedingMerchantTradeAmount($param); $tradeAmount = $result['data']['trade_amount']; + Log::info(['村管理公司定时任务结算执行-种养殖基地订单匹配-交易额', $tradeAmount]); // 交易池 $transactionPool = $taskSchedulePlan['template_info']['transaction_pool']; $totalTradeAmount = bcadd($transactionPool, $tradeAmount, 2); if ($totalTradeAmount >= $targetAmount) { - $task['money'] = bcmul($dayNum, $perMoney, 2); + $task['money'] = $perMoney; $leftTransactionPool = bcsub($totalTradeAmount, $targetAmount, 2); (new VillageShareProfit())->dealVillageTaskSettlement7($task, $villageCompany, $taskSchedulePlan, $leftTransactionPool); }