소스 검색

Merge branch 'master' of ssh://git.9026.com:2212/swdz-WangHaijun/BaoMa

zilong 4 년 전
부모
커밋
3c7efc4af8

+ 2 - 2
app/Admin/routes.php

xqd
@@ -12,8 +12,8 @@ Route::group([
 ], function (Router $router) {
     $router->get('/', 'HomeController@index')->name('home');
     $router->get('/home', 'HomeController@index')->name('home');
-    $router->get('admin/api/getCity', 'ApiController@getCity');
-    $router->get('admin/api/getArea', 'ApiController@getArea');
+    $router->get('/api/getCity', 'ApiController@getCity');
+    $router->get('/api/getArea', 'ApiController@getArea');
     $router->post('/img_upload', 'Api\ApiController@upload');
     $router->resource('/cdms_user', CdmsController::class);
     $router->resource('/organizations', OrganizationController::class);

+ 2 - 2
app/Community/Controllers/ApiController.php

xqd
@@ -1052,11 +1052,11 @@ class ApiController extends Controller
 
                 if ($v['status'] == true) { //设置
                     $num_date = intval(date('Ymd', strtotime($today)));
-                    $sche_data = ['docter_id' => intval($docter_id), 'schedule_type' => $sType, 'schedule_date' => $today, 'schedule_day' => $num_date];
+                    $sche_data = ['docter_id' => intval($docter_id), 'schedule_type' => $sType, 'schedule_date' => $today,'schedule_day' => $num_date];
+                    if ($sType != 1) $sche_data['organization_id'] = intval($org_id);
                     //判断是否有排班信息
                     $s_id = Schedule::where($sche_data)->value('id');
                     if (!$s_id) {
-                        if ($sType != 1) $scheduleData['organization_id'] = $org_id;
                         $s_id = Schedule::insertGetId($sche_data);
                     }
                     //获取时间段

+ 6 - 5
app/Community/Controllers/OrderNurseController.php

xqd
@@ -43,11 +43,12 @@ class OrderNurseController extends AdminController
         if(!$is_admin){
             $org_id = $user->org_id;
             $docter_id = $user->docter_id;
-            if($docter_id){
-                $where['docter_id'] = $docter_id;
-            } else {
-                $where['organization_id']=$org_id;
-            }
+            $where['organization_id']=$org_id;
+//            if($docter_id){
+//                $where['docter_id'] = $docter_id;
+//            } else {
+//                $where['organization_id']=$org_id;
+//            }
         }
         $grid->model()->where($where);
 

+ 3 - 3
app/Community/Controllers/OrderVaccinesController.php

xqd
@@ -42,9 +42,9 @@ class OrderVaccinesController extends AdminController
         if(!$is_admin){
             $org_id = $user->org_id;
             $where = ['product_type'=>4,'organization_id'=>$org_id];
-            if($is_docter) {
-                $where['docter_id'] = Docter::where(['id'=>$user->docter_id])->value('id');
-            }
+//            if($is_docter) {
+//                $where['docter_id'] = Docter::where(['id'=>$user->docter_id])->value('id');
+//            }
             $grid->model()->where($where);
         }
 

+ 7 - 12
app/Http/Controllers/Api/V2/CommonController.php

xqd xqd
@@ -1077,17 +1077,16 @@ class CommonController extends Controller
         $req = request()->post();
         try {
             $data = json_decode($req['content'],true);
-            $ImList = ImMessage::get();
-            $newList=[];
-            if ($ImList){
-                foreach ($ImList as $k=>$v){
-                    $newList[$k] = $v['messageId'];
-                }
-            }
             $reminderController = new PatientController();
-
             $list = [];
             if($data){
+                $ImList = ImMessage::select('messageId')->groupBy('messageId')->get();
+                $newList=[];
+                if ($ImList){
+                    foreach ($ImList as $k=>$v){
+                        $newList[$k] = $v['messageId'];
+                    }
+                }
                 foreach ($data as $k=>$v){
                     if(!in_array($v['messageId'],$newList)){
                         $list[$k]['messageId'] = $v['messageId'];
@@ -1125,10 +1124,6 @@ class CommonController extends Controller
                     }
                 }
                 ImMessage::insert($list);
-            }else{
-                $list['text'] = $req['content'];
-                ImMessage::create($list);
-
             }
             return json_encode(['code'=>200,'content'=>'success']);
         }catch (\Exception $e){

+ 3 - 3
app/Http/Controllers/Api/V2/PatientController.php

xqd
@@ -948,15 +948,15 @@ class PatientController extends AuthController
      * @throws \GuzzleHttp\Exception\GuzzleException
      */
     public function ReplyReminder($docter_id,$user_id){
-        $list = DocterOrganization::with(['docter','organization'])->where(['docter_id'=>$docter_id,'is_open'=>2])->first();
+        $list = Docter::with(['DocterOrganization','organization'])->where(['id'=>$docter_id,'is_open'=>2])->first();
         $user = User::where('id',$user_id)->first();
         if ($list){
             if ($user['openid']){
                 $send = send_wechatSubscription_message('reply_reminder',[
                     $user['openid'],
                     "pages/index/index",
-                    $list['organization']['name'],
-                    $list['docter']['name'],
+                    $list['organization'][0]['name'],
+                    $list['name'],
                     $user['nickname'],
                 ],'wechat_small_program');
             }

+ 55 - 0
app/Http/Controllers/AppiontController.php

xqd
@@ -0,0 +1,55 @@
+<?php
+
+
+namespace App\Http\Controllers;
+
+
+use App\Models\OrderPatient;
+use App\Models\Patient;
+use App\Models\User;
+
+class AppiontController extends Controller
+{
+   public function getAppiontInfo()
+   {
+       $data = request()->all();
+       $defaulRes = [
+           'server_handle_result'=>0,
+           'reserve_check_result'=>0,
+           'allow_get_ticket'=>0,
+           'allow_get_ticket'=>0,
+           'tip_msg'=>'',
+           'reserve_service_no'=>0,
+           'reserve_date'=>'',
+           'reserve_start_time'=>'',
+           'reserve_end_time'=>'',
+           'allow_post_ticket'=>0,
+       ];
+       if(empty($data['telphone'])){
+           $defaulRes['tip_msg'] = '请输入手机号';
+           exit(json_encode($defaulRes));
+       }
+       if(empty($data['sig'])){
+           $defaulRes['tip_msg'] = '请输入sig签名';
+           exit(json_encode($defaulRes));
+       }
+       if(empty($data['SecretKey']) || $data['SecretKey'] != 2018){
+           $defaulRes['tip_msg'] = 'SecretKey秘钥错误';
+           exit(json_encode($defaulRes));
+       }
+
+       if(empty($data['st']) ){
+           $defaulRes['tip_msg'] = '请输入时间信息';
+           exit(json_encode($defaulRes));
+       }
+
+       $sign = mdt($data['id'].$data['telphone'].$data['barcode'].$data['st'].$data['st'].$data['area'].$data['st'].$data['st'].$data['SecretKey']);
+       if($data['sig'] != $sign){
+           $defaulRes['sig'] = '签名验证失败';
+           exit(json_encode($defaulRes));
+       }
+       $user_id = User::where('phone',$data['phone'])->user_id;
+       $patient_id = Patient::where('user_id',$user_id)->pluck('id')->toArray();
+       $order_list = OrderPatient::whereIn('patient_id',$patient_id)->where('patient_id',$patient_id)->where('appiont_start_time',$data['st'])->get();
+   }
+}

+ 1 - 1
config/admin.php

xqd
@@ -95,7 +95,7 @@ return [
     | If your page is going to be accessed via https, set it to `true`.
     |
     */
-    'https' => env('ADMIN_HTTPS', true),
+    'https' => env('ADMIN_HTTPS', false),
 
     /*
     |--------------------------------------------------------------------------

+ 2 - 1
config/app.php

xqd
@@ -30,7 +30,8 @@ return [
 
     //迭代版本
     'version'=>env('APP_VERSION',1.0),
-    'power_by'=>env('APP_POWERBY','宝妈'),
+
+    'power_by'=>env('APP_POWERBY','熙宝HMO'),
 
     /*
     |--------------------------------------------------------------------------