From be5dc58009d2844c2fc01f36ed9216086158241a Mon Sep 17 00:00:00 2001 From: panliang <1163816051@qq.com> Date: Mon, 25 Sep 2023 11:52:37 +0800 Subject: [PATCH] build --- .../Controllers/PatientRecordController.php | 4 ++-- app/Console/Commands/PatientRecordNotify.php | 14 +++++++++++--- public/h5/index.html | 2 +- public/h5/static/js/528.b2fe1a13.js | 3 --- public/h5/static/js/995.7cb326b5.js | 3 +++ public/h5/static/js/index.ae006a63.js | 1 - public/h5/static/js/index.b9d0d66a.js | 1 + .../h5/static/js/pages-index-index.6d599915.js | 1 + .../h5/static/js/pages-index-index.dbf0b2d4.js | 1 - ...a3b56.js => pages-patient-detail.ccd9d256.js} | 2 +- .../h5/static/js/pages-patient-form.8ed30ca9.js | 1 - .../h5/static/js/pages-patient-form.eda0fa44.js | 1 + .../h5/static/js/pages-record-detail.002395c7.js | 1 + .../h5/static/js/pages-record-detail.36f0b935.js | 1 - .../h5/static/js/pages-record-form.699ce52d.js | 1 - .../h5/static/js/pages-record-form.8026abc6.js | 1 + .../h5/static/js/pages-record-index.6da357ae.js | 1 - .../h5/static/js/pages-record-index.8c8ae3c5.js | 3 +++ public/h5/static/treat_head.png | Bin 3938 -> 0 bytes public/h5/static/treat_normal.png | Bin 5563 -> 0 bytes 20 files changed, 26 insertions(+), 16 deletions(-) delete mode 100644 public/h5/static/js/528.b2fe1a13.js create mode 100644 public/h5/static/js/995.7cb326b5.js delete mode 100644 public/h5/static/js/index.ae006a63.js create mode 100644 public/h5/static/js/index.b9d0d66a.js create mode 100644 public/h5/static/js/pages-index-index.6d599915.js delete mode 100644 public/h5/static/js/pages-index-index.dbf0b2d4.js rename public/h5/static/js/{pages-patient-detail.e1ea3b56.js => pages-patient-detail.ccd9d256.js} (63%) delete mode 100644 public/h5/static/js/pages-patient-form.8ed30ca9.js create mode 100644 public/h5/static/js/pages-patient-form.eda0fa44.js create mode 100644 public/h5/static/js/pages-record-detail.002395c7.js delete mode 100644 public/h5/static/js/pages-record-detail.36f0b935.js delete mode 100644 public/h5/static/js/pages-record-form.699ce52d.js create mode 100644 public/h5/static/js/pages-record-form.8026abc6.js delete mode 100644 public/h5/static/js/pages-record-index.6da357ae.js create mode 100644 public/h5/static/js/pages-record-index.8c8ae3c5.js delete mode 100644 public/h5/static/treat_head.png delete mode 100644 public/h5/static/treat_normal.png diff --git a/app/Admin/Controllers/PatientRecordController.php b/app/Admin/Controllers/PatientRecordController.php index be294d8..96ea55c 100644 --- a/app/Admin/Controllers/PatientRecordController.php +++ b/app/Admin/Controllers/PatientRecordController.php @@ -93,7 +93,7 @@ class PatientRecordController extends AdminController amisMake()->DateTimeControl()->name('next_treat_at')->label(__('patient-record.next_treat_at')), amisMake()->SelectControl()->options($this->getAdminUserOptions())->searchable()->name('notify_user_id')->label(__('patient-record.notify_user_id')), amisMake()->DateControl()->name('notify_at')->label(__('patient-record.notify_at')), - amisMake()->TextControl()->name('notify_remarks')->label(__('patient-record.notify_remarks')), + // amisMake()->TextControl()->name('notify_remarks')->label(__('patient-record.notify_remarks')), amisMake()->TextControl()->label(__('patient-record.creator_id'))->value($this->user()->name)->readonly(), ]); } @@ -114,7 +114,7 @@ class PatientRecordController extends AdminController amisMake()->DateTimeControl()->name('next_treat_at')->label(__('patient-record.next_treat_at'))->static(), amisMake()->TextControl()->name('notify_user.name')->label(__('patient-record.notify_user_id'))->static(), amisMake()->DateControl()->name('notify_at')->label(__('patient-record.notify_at'))->static(), - amisMake()->TextControl()->name('notify_remarks')->label(__('patient-record.notify_remarks'))->static(), + // amisMake()->TextControl()->name('notify_remarks')->label(__('patient-record.notify_remarks'))->static(), amisMake()->SelectControl()->options($this->getAdminUserOptions())->name('creator_id')->label(__('patient-record.creator_id'))->static(), amisMake()->DateTimeControl()->name('created_at')->label(__('patient.created_at'))->static(), ]); diff --git a/app/Console/Commands/PatientRecordNotify.php b/app/Console/Commands/PatientRecordNotify.php index 55845bc..019d5d5 100644 --- a/app/Console/Commands/PatientRecordNotify.php +++ b/app/Console/Commands/PatientRecordNotify.php @@ -30,8 +30,9 @@ class PatientRecordNotify extends Command public function handle() { $now = now(); - $list = PatientRecord::where('is_notified', 0) + $list = PatientRecord::with(['patient'])->where('is_notified', 0) ->whereNotNull('notify_user_id') + ->whereNotNull('next_treat_at') ->whereBetween('notify_at', [$now->copy()->startOfDay(), $now->copy()->endOfDay()]) ->get(); $app = EasyWeChat::officialAccount(); @@ -50,9 +51,16 @@ class PatientRecordNotify extends Command if ($user) { $response = $api->postJson('/cgi-bin/message/template/send', [ 'touser' => $user->openid, - 'template_id' => '', + 'template_id' => 'zdkOoIk7bfyzpW9Tuu-pxmrVkSviFvpp1yjXBUT8nEY', 'url' => url('/h5/pages/record/detail?id=' . $item->id), - 'data' => [] + 'data' => [ + 'thing1' => [ + 'value' => data_get($item->patient, 'name') .'-'. data_get($item->patient, 'phone') + ], + 'time3' => [ + 'value' => $item->next_treat_at->format('Y年m月d日 H:i:s') + ], + ] ]); if ($response->isFailed()) { logger('病历记录: 通知, 模板消息发送, 失败', $response->toArray(false)); diff --git a/public/h5/index.html b/public/h5/index.html index 4a465f8..9070fdf 100644 --- a/public/h5/index.html +++ b/public/h5/index.html @@ -1,2 +1,2 @@