connect('127.0.0.1', 6379); } public function AdmenAmont(): \think\response\Json { $list = Db::table("charge_order_longshuizhen")->whereBetweenTime("start_time", "2023-06-01", "2023-07-01")->select()->toArray(); // return json($list); $jj = []; foreach ($list as $l) { if (round($l['SeviceMoney'] + $l['ElecMoney'], 2) != round($l["TotalMoney"], 2)) { $jj[] = $l['StartChargeSeq']; } } // foreach ($jj as $j) { // $order = new ChargeOrder(); // $order->AmendmentAccount('charge_order_longshuizhen', $j); // } $list = Db::table("charge_order_longshuizhen")->whereBetweenTime("start_time", "2023-06-01", "2023-07-01")->select()->toArray(); return json($jj); } }