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
ab8777d2
authored
Dec 01, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
刷新问诊问题
parent
b567b75b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
app/Console/Commands/TestCommand.php
+41
-0
No files found.
app/Console/Commands/TestCommand.php
0 → 100644
View file @
ab8777d2
<?php
namespace
App\Console\Commands
;
use
App\Models\InquiryModel
;
use
App\Models\PrescriptionModel
;
use
Illuminate\Console\Command
;
class
TestCommand
extends
Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected
$signature
=
'mohe:test'
;
/**
* The console command description.
*
* @var string
*/
protected
$description
=
'测试命令'
;
/**
* Execute the console command.
*/
public
function
handle
()
{
// 刷新问诊问题
$prescriptions
=
PrescriptionModel
::
all
();
foreach
(
$prescriptions
as
$prescription
)
{
$inquiry_info
=
$prescription
->
inquiry_info
;
foreach
(
$inquiry_info
as
&
$v
)
{
$v
[
'question'
]
=
InquiryModel
::
find
(
$v
[
'inquiry_id'
])
->
question
;
}
$prescription
->
inquiry_info
=
$inquiry_info
;
$prescription
->
save
();
}
}
}
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