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
8e4760bf
authored
Dec 04, 2024
by
lujunyi
Browse files
Options
Browse Files
Download
Plain Diff
合并代码,解决冲突
parents
2cfc1903
b3878737
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
12 deletions
+21
-12
app/Admin/Controllers/PharmacyDrugController.php
+1
-0
app/Api/Controllers/PatientController.php
+12
-10
app/Api/Controllers/PrescriptionController.php
+1
-1
app/Console/Commands/TestCommand.php
+7
-1
No files found.
app/Admin/Controllers/PharmacyDrugController.php
View file @
8e4760bf
...
...
@@ -62,6 +62,7 @@ protected function grid()
$filter
->
like
(
'drug.name'
,
'药品名称'
)
->
width
(
3
);
$filter
->
like
(
'drug.code'
,
'药品简码'
)
->
width
(
3
);
$filter
->
like
(
'drug.factory'
,
'生产厂家'
)
->
width
(
3
);
$filter
->
in
(
'drug.drug_type'
)
->
checkbox
(
DrugModel
::
DRUG_TYPE_MAP
)
->
width
(
3
);
});
// 行按钮控制
...
...
app/Api/Controllers/PatientController.php
View file @
8e4760bf
...
...
@@ -80,12 +80,14 @@ public function add(Request $request)
}
$mobile
=
$data
[
'mobile'
];
$verificationCode
=
cache
()
->
get
(
"sms_verification_code_
{
$mobile
}
"
);
$code
=
$data
[
'code'
];
if
(
$verificationCode
!=
$code
)
{
return
$this
->
failed
(
'验证码错误'
);
}
// $verificationCode = cache()->get("sms_verification_code_{$mobile}");
// $code = $data['code'];
// if ($verificationCode != $code) {
// return $this->failed('验证码错误');
// }
// $idCardInfo = Util::getIdCardInfo($data['id_card']);
$patient
->
name
=
$data
[
'name'
];
$patient
->
id_card
=
$data
[
'id_card'
];
$patient
->
mobile
=
$mobile
;
...
...
@@ -130,11 +132,11 @@ public function update(Request $request)
return
$this
->
failed
(
'该问诊人不存在'
);
}
$mobile
=
$request
->
input
(
'mobile'
);
$verificationCode
=
cache
()
->
get
(
"sms_verification_code_
{
$mobile
}
"
);
$code
=
$request
->
input
(
'code'
);
if
(
$verificationCode
!=
$code
)
{
return
$this
->
failed
(
'验证码错误'
);
}
//
$verificationCode = cache()->get("sms_verification_code_{$mobile}");
//
$code = $request->input('code');
//
if ($verificationCode != $code) {
//
return $this->failed('验证码错误');
//
}
$data
->
name
=
$request
->
input
(
'name'
);
$data
->
id_card
=
$id_card
;
...
...
app/Api/Controllers/PrescriptionController.php
View file @
8e4760bf
...
...
@@ -454,7 +454,7 @@ public function enter(Request $request)
'unit'
=>
$pharmacyDrugQueryInfo
->
unit
,
// 'dosage_id' => 0, // $pharmacyDrugQueryInfo->dosage_id,
// 'dosage_desc' => '等待药师录入', // $pharmacyDrugQueryInfo->dosage->dosage_desc,
'num'
=>
$drug
[
'num'
]
,
// 中药为药师录入数量
'num'
=>
''
,
// 中药为药师录入数量
];
}
$prescription
->
doses
=
$request
->
input
(
'doses'
);
// 剂量
...
...
app/Console/Commands/TestCommand.php
View file @
8e4760bf
...
...
@@ -40,12 +40,18 @@ public function handle()
// }
// 刷新存量问诊人年龄
$patients
=
PatientModel
::
query
()
->
whereNotNull
(
'id_card'
)
->
where
(
'age'
,
0
)
->
get
();
$query
=
PatientModel
::
query
()
->
whereNotNull
(
'id_card'
)
->
where
(
'age'
,
'<='
,
0
)
->
withTrashed
();
$sql
=
$query
->
toSql
();
var_dump
(
$sql
);
$patients
=
$query
->
get
();
if
(
$patients
->
count
()
>
0
)
{
foreach
(
$patients
as
$patient
)
{
$patient
->
age
=
getAgeByIdCard
(
$patient
->
id_card
);
$patient
->
save
();
}
}
else
{
echo
'没有需要更新的数据'
;
}
}
}
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