|
|
|
@ -124,7 +124,28 @@ class QuestionnairesLogsController extends Controller
|
|
|
|
|
|
|
|
|
|
|
|
public function item_count($items, $check_items)
|
|
|
|
public function item_count($items, $check_items)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$ic = count($items) + count($check_items['items']) + count($check_items['combo_items']);
|
|
|
|
if (count($items)) {
|
|
|
|
|
|
|
|
$items_count = DB::table('items')->whereIn('item_id', $items)
|
|
|
|
|
|
|
|
->where('keshi_name', '!=', '材料费')->where('status', 1)->count();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$items_count = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (count($check_items['items'])) {
|
|
|
|
|
|
|
|
$check_sum_count = DB::table('items')
|
|
|
|
|
|
|
|
->whereIn('item_id', $check_items['items'])
|
|
|
|
|
|
|
|
->where('keshi_name', '!=', '材料费')->where('status', 1)->count();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$check_sum_count = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (count($check_items['combo_items'])) {
|
|
|
|
|
|
|
|
$combo_count = DB::table('items')
|
|
|
|
|
|
|
|
->whereIn('item_id', $check_items['combo_items'])
|
|
|
|
|
|
|
|
->where('keshi_name', '!=', '材料费')->where('status', 1)->count();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$combo_count = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$ic = $items_count + $check_sum_count + $combo_count;
|
|
|
|
return $ic;
|
|
|
|
return $ic;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|