调整细节,修改bug, 趋势分析列表接口,趋势数据未完成

wenjuan
yanzai 1 year ago
parent f20e8dc0ed
commit 3d992994b3

@ -59,6 +59,10 @@ class ApiMapController extends Controller
'ComboCompare' => $base_url . '/api/H5/ComboCompare',//套餐对比 'ComboCompare' => $base_url . '/api/H5/ComboCompare',//套餐对比
'GetOrderDetail' => $base_url . '/api/H5/GetOrderDetail',//获取订单详情 'GetOrderDetail' => $base_url . '/api/H5/GetOrderDetail',//获取订单详情
'ReportContrast' => $base_url . '/api/H5/ReportContrast',//报告对比 'ReportContrast' => $base_url . '/api/H5/ReportContrast',//报告对比
'QuestionGetList' => $base_url . '/api/H5/QuestionGetList',//获取问卷
'QuestionSubmitAnswer' => $base_url . '/api/H5/QuestionSubmitAnswer',//提交问卷回答
'AnalysisTypeGetList' => $base_url . '/api/H5/AnalysisTypeGetList',//趋势分析项目列表
'FenzhenAbandon' => $base_url . '/api/H5/Fenzhen/abandon',// 分诊弃检 'FenzhenAbandon' => $base_url . '/api/H5/Fenzhen/abandon',// 分诊弃检
'FenzhenList' => $base_url . '/api/H5/Fenzhen/list',// 分诊时间线 'FenzhenList' => $base_url . '/api/H5/Fenzhen/list',// 分诊时间线
'FenzhenInfo' => $base_url . '/api/H5/Fenzhen/info',// 分诊项目详情 'FenzhenInfo' => $base_url . '/api/H5/Fenzhen/info',// 分诊项目详情

@ -0,0 +1,31 @@
<?php
namespace App\Http\Controllers\API\H5;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class AnalysisTypeController extends Controller
{
public function GetList(Request $request)
{
$analysis_type_list = DB::table('analysis_types')->where('status', 1)->get();
$analysis_list = [[
'title' => '临床生化',
'list' => [],
], [
'title' => '临床免疫',
'list' => [],
], [
'title' => '常规',
'list' => [],
]];
foreach ($analysis_type_list as $item) {
$analysis_list[$item->type - 1]['list'][] = $item;
}
return \Yz::return(true,"查询完成",['list' => $analysis_list]);
}
}

@ -53,6 +53,7 @@ class ComboController extends Controller
//用户绑定就诊人数量 //用户绑定就诊人数量
$personCount = DB::table('web_user_person')->where(['user_id' => $user->id, 'is_del' => 0])->count(); $personCount = DB::table('web_user_person')->where(['user_id' => $user->id, 'is_del' => 0])->count();
$canshu = []; $canshu = [];
$canshu[]=$person->sex;
$sql = ''; $sql = '';
if (isset($combo_price)) { if (isset($combo_price)) {
$price_list = [ $price_list = [
@ -62,9 +63,11 @@ class ComboController extends Controller
"4" => [1500, 2999], "4" => [1500, 2999],
"5" => [3000, 999999], "5" => [3000, 999999],
]; ];
$sql = " and (a.price>=? and a.price<=?) "; $sql = " and (a.price>=? and a.price<=?) ";
$canshu[] = $price_list[$combo_price][0]; $canshu[] = $price_list[$combo_price][0];
$canshu[] = $price_list[$combo_price][1]; $canshu[] = $price_list[$combo_price][1];
} }
if (isset($combo_type)) { if (isset($combo_type)) {
$sql = $sql . " and a.type_id=? "; $sql = $sql . " and a.type_id=? ";
@ -89,7 +92,7 @@ class ComboController extends Controller
} }
} }
$canshu[]=$person->sex;
$combos = DB::select("select * from combos as a LEFT JOIN ( $combos = DB::select("select * from combos as a LEFT JOIN (
select combo_id as c_id,count(*) as count from orders where status in(2,4) group by combo_id select combo_id as c_id,count(*) as count from orders where status in(2,4) group by combo_id

@ -366,4 +366,30 @@ class ReportController extends Controller
return self::myUsort($res, ['order_time'], [0]); return self::myUsort($res, ['order_time'], [0]);
} }
//趋势分析
public function Analysis(Request $request)
{
$id = $request->post('id');
$id_number = $request->post('id_number');
$date = $request->post('date');
$hospital = $request->post('hospital');
$analysis_type = DB::table('analysis_types')->where('id', $id)->get();
$mark = $analysis_type->mark;
$value = 0;
$unit = '';
$info['title'] = $analysis_type->name;
$info['content'] = $analysis_type->content;
$range_data = json_decode($analysis_type->range, true);
$range = $range_data['r'];
$label = $range_data['l'];
$step = $range_data['s'];
$color = ['#357e24', '#a7ea9b', '#95cde8', '#f0a93f', '#f0a93f', '#ec572c'];
$time = 0;
$range_str = '';
$data_arr = [];
$res_done_arr = [];
//查询数据库
$reports=DB::table('')
}
} }

@ -65,6 +65,7 @@ Route::group(['prefix' => 'api/H5'], function () {
Route::post('/Refund', 'App\Http\Controllers\API\H5\PayController@Refund');//退款 Route::post('/Refund', 'App\Http\Controllers\API\H5\PayController@Refund');//退款
Route::post('/GetOrderDetail', 'App\Http\Controllers\API\H5\OrderController@GetDetail');//获取订单详情 Route::post('/GetOrderDetail', 'App\Http\Controllers\API\H5\OrderController@GetDetail');//获取订单详情
Route::post('/ReportContrast', 'App\Http\Controllers\API\H5\ReportController@contrast');//报告对比 Route::post('/ReportContrast', 'App\Http\Controllers\API\H5\ReportController@contrast');//报告对比
Route::post('/AnalysisTypeGetList', 'App\Http\Controllers\API\H5\AnalysisTypeController@GetList');//趋势分析项目列表

Loading…
Cancel
Save