cody 2 years ago
parent fe1f444fb7
commit 674924260a

@ -14,6 +14,7 @@ use App\Models\ProductItems;
use App\Models\Project;
use App\Models\Refund;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
use Spatie\Permission\Models\Role;
@ -66,7 +67,10 @@ class HomeController extends CommonController
$productItem = ProductItems::where('product_id', $product->id)->get();
$factor = FactorItems::where('factor_id', $product->statistic_factor_id)->get();
$order_total = OrderItems::whereIn('product_item_id', $productItem->pluck('id'))->sum('total');
$lies = $this->getLies($productItem, $factor, $order_total);
$lies = Cache::remember('lies', 24 * 60 * 60, function () use ($productItem,$factor,$order_total) {
return $this->getLies($productItem, $factor, $order_total);
});
$allMontn = [
date("Y") . '-01',

@ -191,7 +191,7 @@
<div class="static1">
<div class="static1__item">
<div class="static1__item--label">今日应收(元)</div>
<div class="static1__item--value">{$counts['bill_today']}</div>
<div class="static1__item--value">{{$counts['bill_today']}}</div>
</div>
<div class="static1__item">
<div class="static1__item--label">今日应收(元)</div>

Loading…
Cancel
Save