新增体检结构参数管理,h5预览pdf,调整查询预约详情接口返回值
parent
3c5007dc49
commit
a9f188f613
@ -0,0 +1,103 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\API\Admin\YeWu;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
class InstitutionController extends Controller
|
||||||
|
{
|
||||||
|
//获取体检机构总列表
|
||||||
|
public function GetList()
|
||||||
|
{
|
||||||
|
$page = request('page');
|
||||||
|
$pagesize = request('pageSize');
|
||||||
|
$searchInfo = request('searchInfo');
|
||||||
|
$list = DB::table('medical_institution as a');
|
||||||
|
$list = $list->leftJoin('users as b', 'a.link_user_id', '=', 'b.id');
|
||||||
|
$count = $list->count();
|
||||||
|
$list = $list->select('a.*', 'b.username');
|
||||||
|
$list=$list->orderBy('id', 'desc')->skip(($page-1)*$pagesize)->take($pagesize)->get();
|
||||||
|
|
||||||
|
return \Yz::Return(true, '', ['list' => $list, 'count' => $count]);
|
||||||
|
}
|
||||||
|
//保存机构设置
|
||||||
|
public function SavdSeting()
|
||||||
|
{
|
||||||
|
$SetingInfo= request('SetingInfo');
|
||||||
|
if(isset($SetingInfo['institution_id'])){
|
||||||
|
//更新机构表预约状态
|
||||||
|
DB::table('medical_institution')->where(['id'=>$SetingInfo['institution_id']])->update([
|
||||||
|
'enable_yuyue'=> $SetingInfo['enable_yuyue'],
|
||||||
|
'enable_laonianren_mf'=> $SetingInfo['enable_laonianren_mf'],
|
||||||
|
'enable_jiankangzheng_mf'=> $SetingInfo['enable_jiankangzheng_mf'],
|
||||||
|
]);
|
||||||
|
DB::beginTransaction();
|
||||||
|
$saveStatus=false;
|
||||||
|
try {
|
||||||
|
//查询是否有此机构的设置信息,如果有,先删除再添加(因为设置项有可能会变,所以直接删除再添加)
|
||||||
|
$cha=DB::table('institution_seting')->where(['institution_id'=>$SetingInfo['institution_id']])->first();
|
||||||
|
if(!!$cha){
|
||||||
|
DB::table('institution_seting')->where(['institution_id'=>$SetingInfo['institution_id']])->delete();
|
||||||
|
}
|
||||||
|
$i1_count=0;
|
||||||
|
$i2_count=0;
|
||||||
|
//添加设置
|
||||||
|
foreach ($SetingInfo['laonianren_mf']['fenlei'] as $key=>$item){
|
||||||
|
$i1= DB::table('institution_seting')->insert([
|
||||||
|
'institution_id'=>$SetingInfo['institution_id'],
|
||||||
|
'big_check_type'=>"老年人免费体检",
|
||||||
|
'small_check_type'=>$item['name'],
|
||||||
|
'bind_check_type'=>$item['bind_check_type'],
|
||||||
|
'bind_unit_id'=>$item['bind_unit_id'],
|
||||||
|
'bind_group_id'=>$item['bind_group_id'],
|
||||||
|
'bind_batch_id'=>$item['bind_batch_id'],
|
||||||
|
'enable_yuyue'=>$item['enable_yuyue'],
|
||||||
|
]);
|
||||||
|
if($i1) $i1_count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($SetingInfo['jiankangzheng_mf']['fenlei'] as $key=>$item){
|
||||||
|
$i2= DB::table('institution_seting')->insert([
|
||||||
|
'institution_id'=>$SetingInfo['institution_id'],
|
||||||
|
'big_check_type'=>"健康证免费体检",
|
||||||
|
'small_check_type'=>$item['name'],
|
||||||
|
'bind_check_type'=>$item['bind_check_type'],
|
||||||
|
'bind_unit_id'=>$item['bind_unit_id'],
|
||||||
|
'bind_group_id'=>$item['bind_group_id'],
|
||||||
|
'bind_batch_id'=>$item['bind_batch_id'],
|
||||||
|
'enable_yuyue'=>$item['enable_yuyue'],
|
||||||
|
]);
|
||||||
|
if($i2) $i2_count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(count($SetingInfo['laonianren_mf']['fenlei'])== $i1_count and count($SetingInfo['jiankangzheng_mf']['fenlei'])== $i2_count){
|
||||||
|
DB::commit();
|
||||||
|
return \Yz::Return(true,'操作完成',[]);
|
||||||
|
}else{
|
||||||
|
DB::rollback();
|
||||||
|
return \Yz::Return(false,'操作失败');
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
|
||||||
|
DB::rollback();
|
||||||
|
return \Yz::Return(false,'操作异常'.$e);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}else{
|
||||||
|
return \Yz::echoError1('参数缺失');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public function GetSetingDetail()
|
||||||
|
{
|
||||||
|
$institution_id= request('institution_id');
|
||||||
|
$seting=DB::table('institution_seting')->where(['institution_id'=>$institution_id])->get();
|
||||||
|
$info=DB::table('medical_institution')->where(['id'=>$institution_id])->get();
|
||||||
|
|
||||||
|
return \Yz::Return(true,'查询成功',['info'=>$info,'seting'=>$seting]);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@ -1,5 +1,5 @@
|
|||||||
ENV = 'production'
|
ENV = 'production'
|
||||||
VITE_APP_API = 'http://223.71.106.251:33581/common/la/public/api/'
|
VITE_APP_API = 'http://223.71.106.251:82/common/la/public/api/'
|
||||||
VITE_APP_WXCODE_URL = 'http://223.71.106.251:33581/common/la/public/wxLogin/production'
|
VITE_APP_WXCODE_URL = 'http://223.71.106.251:82/common/la/public/wxLogin/production'
|
||||||
VITE_APP_FILE_URL= 'http://223.71.106.251:33581/common/la/public/'
|
VITE_APP_FILE_URL= 'http://223.71.106.251:82/common/la/public/'
|
||||||
VITE_APPID = "wx526430047d34c85c"
|
VITE_APPID = "wx526430047d34c85c"
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue