liyinglin 2 years ago
parent 1225c3e753
commit 1de201de2c

@ -428,7 +428,7 @@ class StatisticsController extends CommonController
public function getLies($bedIds, $productItem, $factor) public function getLies($bedIds, $productItem, $factor)
{ {
$list = []; $list = [];
DB::enableQueryLog(); // DB::enableQueryLog();
foreach ($productItem as $item) { foreach ($productItem as $item) {
foreach ($factor as $factor_item) { foreach ($factor as $factor_item) {
$total = OrderItems::where('product_item_id', $item->id) $total = OrderItems::where('product_item_id', $item->id)
@ -436,7 +436,6 @@ class StatisticsController extends CommonController
//->whereRaw("factors like '%\"factor_item_id\": $factor_item->id%'") //->whereRaw("factors like '%\"factor_item_id\": $factor_item->id%'")
->sum('total'); ->sum('total');
//dd(DB::getQueryLog()); //dd(DB::getQueryLog());
$list [] = [ $list [] = [
'name' => $item->price + $factor_item->price . '元/天', 'name' => $item->price + $factor_item->price . '元/天',
'total_price' => $item->price + $factor_item->price, 'total_price' => $item->price + $factor_item->price,
@ -444,22 +443,9 @@ class StatisticsController extends CommonController
'factor_item_id' => $factor_item->id, 'factor_item_id' => $factor_item->id,
'total' => $total 'total' => $total
]; ];
} }
} }
return $list; return $list;
} }
/**
* 根据产品子项id和因素子项id算出收入
*/
public function lieToMoney($product_item_id, $factor_item_id, $orderIds)
{
$total = OrderItems::where('product_item_id', $product_item_id)
# ->whereRaw("factors like '%\"factor_item_id\": $factor_item_id%'")
# ->whereIn('order_id', $orderIds)
->sum('total');
return $total;
}
} }

@ -22,6 +22,7 @@
{{$modelName}} {{$modelName}}
</th> </th>
<th>所属项目/医院</th> <th>所属项目/医院</th>
<th>护工等级</th>
<th>操作</th> <th>操作</th>
</tr> </tr>
</thead> </thead>
@ -33,6 +34,9 @@
</td> </td>
<td>{{ $row->project->name }}</td> <td>{{ $row->project->name }}</td>
<td> <td>
{{ $row->paramedic_level_id }}
</td>
<td>
{{-- <a target="_blank" href="{{url("{$urlPrefix}/get-qrcode/{$row['id']}")}}" class="btn btn-sm btn-secondary">专属二维码</a>--}} {{-- <a target="_blank" href="{{url("{$urlPrefix}/get-qrcode/{$row['id']}")}}" class="btn btn-sm btn-secondary">专属二维码</a>--}}
<a class="btn btn-sm btn-primary" <a class="btn btn-sm btn-primary"
href="{{url("{$urlPrefix}/edit?id={$row['id']}")}}">@lang("icons.action_edit") 查看</a> href="{{url("{$urlPrefix}/edit?id={$row['id']}")}}">@lang("icons.action_edit") 查看</a>

Loading…
Cancel
Save