调整套餐项目数量显示

main
yanzai 1 year ago
parent 8492e0a01e
commit aeefb560ac

@ -315,13 +315,18 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
$combo_items = json_decode($combo->items, true);
$combo_items=array_merge($combo_items,$Nx1_arrInfo); //合并多选一
$groupedData = [];
$comboItemCount=0;
foreach ($combo_items as $item) {
$keshiName = $item['keshi_name'];
if($keshiName<>'材料费'){
$comboItemCount++;
}
if (!isset($groupedData[$keshiName])) {
$groupedData[$keshiName] = [];
}
$groupedData[$keshiName][] = $item;
}
foreach ($groupedData as $keshiName => $children) {
$combo_info['items'][] = [
'keshi_name' => $keshiName,
@ -330,7 +335,7 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
}
$pay_item_count += $combo->item_count;
$true_price += $combo_info['price'];
$combo_info['tags'][0]['text']=$comboItemCount. '个项目';
//如果有影像科则存储在nmr_list
$comboItem=DB::table('combo_items')->where(['combo_id' => $combo_id, 'status' => 1,'keshi_name'=>'影像科'])->get();
if(count($comboItem)>0){

@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Http\Controllers\API\AspNetZhuanController;
use App\Http\Controllers\API\PEISApiController;
use App\Http\Controllers\API\XCXApiController;
use App\Services\OrderService;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
@ -12,9 +13,19 @@ class TestController extends Controller
{
public function DBtest(){
// echo DB::table('users')->count();
$order= new OrderService();
dd($order->DepartmentItemCount(173));
// $order= new OrderService();
// dd($order->DepartmentItemCount(173));
$data = [
'orderid' => '20241102173349589IKvqRo',
'refund_order_id' => 'T' . '20241102173349589IKvqRo',
'refund_amount' => 200,
'refund_reason' => "体检H5订单退款",
];
$XCX = new XCXApiController();
$res = $XCX::Post('订单退款', $data);
if ($res['data']['refund_state'] != 'SUCCESS') {
return \Yz::echoError1("退款失败" . $res['data']['refund_state']);
}
$aspnet=new AspNetZhuanController();
// $temp_list=[];
@ -30,14 +41,14 @@ class TestController extends Controller
// $peis = new PEISApiController();
// dd($peis::Get($peis::Api('报告时间计算',"2403020020"),"111111","报告时间计算"));
$data=[
'action'=>4,
'ghzid'=>'5a798c097bc64bd79c22050175e6236a',
'dzjid'=>'994924890348203254993',
'hxbz'=>"H5撤销核销",
'yyid'=>6
];
$aspnet::YouHuiQuan($data);
// $data=[
// 'action'=>4,
// 'ghzid'=>'5a798c097bc64bd79c22050175e6236a',
// 'dzjid'=>'994924890348203254993',
// 'hxbz'=>"H5撤销核销",
// 'yyid'=>6
// ];
// $aspnet::YouHuiQuan($data);
}

Loading…
Cancel
Save