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
a48e07e1
authored
Apr 16, 2025
by
赵增煜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增字段是否为医保处方
parent
b5e974c2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
2 deletions
+33
-2
app/Admin/Controllers/ExternalCmPrescriptionController.php
+9
-0
app/Admin/Controllers/ExternalWmPrescriptionController.php
+9
-0
app/Console/Commands/CmPrescription.php
+6
-0
app/Console/Commands/WmPrescription.php
+5
-0
app/Services/ExternalService.php
+2
-2
database/migrations/2025_04_09_174213_create_external_wm_prescription_table.php
+1
-0
database/migrations/2025_04_09_180357_create_external_cm_prescription_table.php
+1
-0
No files found.
app/Admin/Controllers/ExternalCmPrescriptionController.php
View file @
a48e07e1
...
...
@@ -20,6 +20,15 @@ protected function grid()
return
Grid
::
make
(
new
ExternalCmPrescription
(),
function
(
Grid
$grid
)
{
$grid
->
model
()
->
orderBy
(
'id'
,
'desc'
);
$grid
->
column
(
'id'
)
->
sortable
();
$grid
->
column
(
'medicalInsurance'
,
'是否医保处方'
)
->
display
(
function
(
$medicalInsurance
){
if
(
$medicalInsurance
==
"1"
){
return
'是'
;
}
else
if
(
$medicalInsurance
==
"0"
){
return
'否'
;
}
else
{
return
'未知'
;
}
});
$grid
->
column
(
'idcardTypeCode'
)
->
display
(
function
(
$idcardTypeCode
){
if
(
$idcardTypeCode
==
"01"
){
return
'身份证'
;
...
...
app/Admin/Controllers/ExternalWmPrescriptionController.php
View file @
a48e07e1
...
...
@@ -20,6 +20,15 @@ protected function grid()
return
Grid
::
make
(
new
ExternalWmPrescription
(),
function
(
Grid
$grid
)
{
$grid
->
model
()
->
orderBy
(
'id'
,
'desc'
);
$grid
->
column
(
'id'
)
->
sortable
();
$grid
->
column
(
'medicalInsurance'
,
'是否医保处方'
)
->
display
(
function
(
$medicalInsurance
){
if
(
$medicalInsurance
==
"1"
){
return
'是'
;
}
else
if
(
$medicalInsurance
==
"0"
){
return
'否'
;
}
else
{
return
'未知'
;
}
});
$grid
->
column
(
'idcardTypeCode'
)
->
display
(
function
(
$idcardTypeCode
){
if
(
$idcardTypeCode
==
"01"
){
return
'身份证'
;
...
...
app/Console/Commands/CmPrescription.php
View file @
a48e07e1
...
...
@@ -42,6 +42,7 @@ public function handle()
"pageSize"
=>
20
,
];
$eHospitalApi
=
new
ExternalService
(
env
(
'580_APP_KEY'
),
env
(
'580_APP_SECRET'
),
env
(
'580_DOMAIN'
));
print_r
(
env
(
'580_APP_KEY'
)
.
'----'
.
env
(
'580_APP_SECRET'
)
.
"----"
.
env
(
'580_DOMAIN'
)
.
"
\n
"
);
while
(
$pageNum
<=
$maxPage
)
{
// 设置当前页码参数
$params
=
array_merge
(
$baseParams
,
[
...
...
@@ -119,6 +120,9 @@ public function handle()
if
(
isset
(
$item
[
'addAmountItems'
]))
{
$prescription
->
addAmountItems
=
json_encode
(
$item
[
'addAmountItems'
],
JSON_UNESCAPED_UNICODE
);
// 处方附加服务费用明细
}
// 是否医保处方
$prescription
->
medicalInsurance
=
$item
[
'medicalInsurance'
]
??
null
;
$prescription
->
updated_at
=
Carbon
::
now
();
// 保存数据
$prescription
->
save
();
...
...
@@ -180,6 +184,8 @@ public function handle()
if
(
isset
(
$item
[
'addAmountItems'
]))
{
$prescription
->
addAmountItems
=
json_encode
(
$item
[
'addAmountItems'
],
JSON_UNESCAPED_UNICODE
);
// 处方附加服务费用明细
}
// 是否医保处方
$prescription
->
medicalInsurance
=
$item
[
'medicalInsurance'
]
??
null
;
// 保存数据
$prescription
->
save
();
...
...
app/Console/Commands/WmPrescription.php
View file @
a48e07e1
...
...
@@ -107,6 +107,9 @@ public function handle()
if
(
isset
(
$item
[
'addAmountItems'
]))
{
$prescription
->
addAmountItems
=
json_encode
(
$item
[
'addAmountItems'
],
JSON_UNESCAPED_UNICODE
);
// 处方附加服务费用明细
}
// 是否医保处方
$prescription
->
medicalInsurance
=
$item
[
'medicalInsurance'
]
??
null
;
$prescription
->
updated_at
=
Carbon
::
now
();
// 保存数据
$prescription
->
save
();
...
...
@@ -159,6 +162,8 @@ public function handle()
if
(
isset
(
$item
[
'addAmountItems'
]))
{
$prescription
->
addAmountItems
=
json_encode
(
$item
[
'addAmountItems'
],
JSON_UNESCAPED_UNICODE
);
// 处方附加服务费用明细
}
// 是否医保处方
$prescription
->
medicalInsurance
=
$item
[
'medicalInsurance'
]
??
null
;
// 保存数据
$prescription
->
save
();
}
...
...
app/Services/ExternalService.php
View file @
a48e07e1
...
...
@@ -31,7 +31,7 @@ private function sendRequest($endpoint, $data) {
$url
=
$this
->
baseUrl
.
$endpoint
;
print_r
(
$url
.
"
\n
"
);
$data_string
=
json_encode
(
$data
);
print_r
(
$data_string
.
"
\n
"
);
$ch
=
curl_init
();
curl_setopt
(
$ch
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
true
);
...
...
@@ -46,7 +46,7 @@ private function sendRequest($endpoint, $data) {
);
$result
=
curl_exec
(
$ch
);
curl_close
(
$ch
);
print_r
(
$data_string
.
"
\n
"
);
//
print_r($data_string . "\n");
// print_r($result . "\n");
return
json_decode
(
$result
,
true
);
}
...
...
database/migrations/2025_04_09_174213_create_external_wm_prescription_table.php
View file @
a48e07e1
...
...
@@ -40,6 +40,7 @@ public function up()
$table
->
string
(
'rotateTypeCode'
)
->
default
(
''
)
->
comment
(
'处方流向类型'
);
$table
->
longText
(
'items'
)
->
comment
(
'处方明细'
);
$table
->
longText
(
'addAmountItems'
)
->
comment
(
'处方附加服务费用明细'
);
$table
->
string
(
'medicalInsurance'
)
->
default
(
''
)
->
comment
(
'是否医保处方(0:不是,1:是)'
);
$table
->
timestamps
();
});
}
...
...
database/migrations/2025_04_09_180357_create_external_cm_prescription_table.php
View file @
a48e07e1
...
...
@@ -49,6 +49,7 @@ public function up()
$table
->
string
(
'rotateTypeCode'
)
->
default
(
''
)
->
comment
(
'处方流向类型'
);
$table
->
longText
(
'items'
)
->
comment
(
'处方明细'
);
$table
->
longText
(
'addAmountItems'
)
->
comment
(
'处方附加服务费用明细'
);
$table
->
string
(
'medicalInsurance'
)
->
default
(
''
)
->
comment
(
'是否医保处方(0:不是,1:是)'
);
$table
->
timestamps
();
});
}
...
...
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