Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵增煜
/
tzt-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4d0e725a
authored
Dec 19, 2024
by
赵增煜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix-1219' into develop
parents
21d2b28c
09f831f8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
32 deletions
+32
-32
app/Api/Controllers/PrescriptionController.php
+32
-32
No files found.
app/Api/Controllers/PrescriptionController.php
View file @
4d0e725a
...
...
@@ -334,22 +334,22 @@ public function create(Request $request)
// $doctorLog->log_info = $randomDoctor->name.'在'.$prescription_at.'为'.$patient->name.'('.$patient->mobile.')开具处方单(处方单编号:'.$prescription_number.')';
// $doctorLog->save();
}
elseif
(
$randomDoctor
->
is_auto
==
0
)
{
// 手动开方发送医师通知短信
if
(
env
(
'SMS_CHANNEL'
)
==
'chengliye'
)
{
$templateName
=
'doctor_notification'
;
$templateData
=
[];
$smsService
=
new
SmsService
();
$response
=
$smsService
->
sendSms
(
$randomDoctor
->
mobile
,
$templateName
,
$templateData
);
Log
::
info
(
json_encode
(
$response
));
}
elseif
(
env
(
'SMS_CHANNEL'
)
==
'qcloud'
)
{
// 腾讯短信
$easySms
=
new
EasySms
(
config
(
'easysms'
));
$response
=
$easySms
->
send
(
$randomDoctor
->
mobile
,
[
'content'
=>
'您有一条处方需要开方。'
,
'template'
=>
'2316306'
,
'data'
=>
[],
]);
Log
::
info
(
json_encode
(
$response
));
}
// 手动开方发送医师通知短信
1219发送短信注销
//
if (env('SMS_CHANNEL') == 'chengliye') {
//
$templateName = 'doctor_notification';
//
$templateData = [];
//
$smsService = new SmsService();
//
$response = $smsService->sendSms($randomDoctor->mobile, $templateName, $templateData);
//
Log::info(json_encode($response));
//
} elseif (env('SMS_CHANNEL') == 'qcloud') { // 腾讯短信
//
$easySms = new EasySms(config('easysms'));
//
$response = $easySms->send($randomDoctor->mobile, [
//
'content' => '您有一条处方需要开方。',
//
'template' => '2316306',
//
'data' => [],
//
]);
//
Log::info(json_encode($response));
//
}
}
// 药店自动审方(必须处方单待审方)
...
...
@@ -364,22 +364,22 @@ public function create(Request $request)
// $pharmacistLog->log_info = $pharmacist->name.'在'.$review_at.'为'.$patient->name.'('.$patient->mobile.')审方(处方单编号:'.$prescription_number.')';
// $pharmacistLog->save();
}
elseif
(
$pharmacy
->
is_auto
==
0
)
{
// 手动审方发送药店通知短信
if
(
env
(
'SMS_CHANNEL'
)
==
'chengliye'
)
{
$templateName
=
'pharmacist_notification'
;
$templateData
=
[];
$smsService
=
new
SmsService
();
$response
=
$smsService
->
sendSms
(
$pharmacy
->
mobile
,
$templateName
,
$templateData
);
Log
::
info
(
json_encode
(
$response
));
}
elseif
(
env
(
'SMS_CHANNEL'
)
==
'qcloud'
)
{
// 腾讯短信
$easySms
=
new
EasySms
(
config
(
'easysms'
));
$response
=
$easySms
->
send
(
$pharmacy
->
mobile
,
[
'content'
=>
'您有一条处方需要审方。'
,
'template'
=>
'2316307'
,
'data'
=>
[],
]);
Log
::
info
(
json_encode
(
$response
));
}
// 手动审方发送药店通知短信
1219发送短信注销
//
if (env('SMS_CHANNEL') == 'chengliye') {
//
$templateName = 'pharmacist_notification';
//
$templateData = [];
//
$smsService = new SmsService();
//
$response = $smsService->sendSms($pharmacy->mobile, $templateName, $templateData);
//
Log::info(json_encode($response));
//
} elseif (env('SMS_CHANNEL') == 'qcloud') { // 腾讯短信
//
$easySms = new EasySms(config('easysms'));
//
$response = $easySms->send($pharmacy->mobile, [
//
'content' => '您有一条处方需要审方。',
//
'template' => '2316307',
//
'data' => [],
//
]);
//
Log::info(json_encode($response));
//
}
}
return
$this
->
success
(
$prescription_number
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment