Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1-office-web-sit
Commits
50dedd90
Commit
50dedd90
authored
Dec 11, 2021
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】医疗接口
parent
ec2a8369
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
14 deletions
+38
-14
MedicalController.java
...o/office/modules/manage/controller/MedicalController.java
+38
-14
No files found.
src/main/java/io/office/modules/manage/controller/MedicalController.java
View file @
50dedd90
...
...
@@ -8,6 +8,7 @@ import io.office.modules.manage.service.MedicalService;
import
io.office.modules.manage.utils.IdKeysConstant
;
import
io.office.modules.manage.utils.IdWorkerUtils
;
import
io.office.modules.sys.controller.AbstractController
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -16,7 +17,6 @@ import io.office.common.utils.PageUtils;
import
io.office.common.utils.R
;
/**
* ${comments}
*
...
...
@@ -35,7 +35,7 @@ public class MedicalController extends AbstractController {
*/
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:medical:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
PageUtils
page
=
medicalService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
}
...
...
@@ -46,7 +46,7 @@ public class MedicalController extends AbstractController {
*/
@RequestMapping
(
"/info/{id}"
)
// @RequiresPermissions("manage:medical:info")
public
R
info
(
@PathVariable
(
"id"
)
String
id
){
public
R
info
(
@PathVariable
(
"id"
)
String
id
)
{
MedicalEntity
medical
=
medicalService
.
getById
(
id
);
return
R
.
ok
().
put
(
"medical"
,
medical
);
...
...
@@ -57,7 +57,7 @@ public class MedicalController extends AbstractController {
*/
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:medical:save")
public
R
save
(
@RequestBody
MedicalEntity
medical
){
public
R
save
(
@RequestBody
MedicalEntity
medical
)
{
medical
.
setId
(
IdWorkerUtils
.
getSEQByKey
(
IdKeysConstant
.
ID_SEQ_KEY
));
String
username
=
getUser
().
getUsername
();
medical
.
setInputDate
(
new
Date
());
...
...
@@ -72,7 +72,7 @@ public class MedicalController extends AbstractController {
*/
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:medical:update")
public
R
update
(
@RequestBody
MedicalEntity
medical
){
public
R
update
(
@RequestBody
MedicalEntity
medical
)
{
String
username
=
getUser
().
getUsername
();
medical
.
setEditor
(
username
);
medical
.
setLasteditor
(
username
);
...
...
@@ -86,7 +86,7 @@ public class MedicalController extends AbstractController {
*/
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:medical:delete")
public
R
delete
(
@RequestBody
List
<
String
>
ids
){
public
R
delete
(
@RequestBody
List
<
String
>
ids
)
{
MedicalEntity
medical
=
new
MedicalEntity
();
String
username
=
getUser
().
getUsername
();
medical
.
setEditor
(
username
);
...
...
@@ -94,20 +94,20 @@ public class MedicalController extends AbstractController {
medical
.
setUpdatetime
(
new
Date
());
medical
.
setLevel
(
0
);
QueryWrapper
<
MedicalEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
in
(
"id"
,
ids
);
medicalService
.
update
(
medical
,
queryWrapper
);
queryWrapper
.
in
(
"id"
,
ids
);
medicalService
.
update
(
medical
,
queryWrapper
);
return
R
.
ok
(
"删除成功!"
);
}
@GetMapping
(
"/getMedicalTypeList"
)
public
R
getMedicalTypeList
()
{
List
<
Map
<
String
,
Object
>>
list
=
medicalService
.
getMedicalTypeList
();
return
R
.
ok
().
put
(
"list"
,
list
);
public
R
getMedicalTypeList
()
{
List
<
Map
<
String
,
Object
>>
list
=
medicalService
.
getMedicalTypeList
();
return
R
.
ok
().
put
(
"list"
,
list
);
}
@PostMapping
(
"/verifyMedical"
)
public
R
verifyMedical
(
@RequestBody
MedicalEntity
medical
)
{
public
R
verifyMedical
(
@RequestBody
MedicalEntity
medical
)
{
String
username
=
getUser
().
getUsername
();
medical
.
setEditor
(
username
);
medical
.
setLasteditor
(
username
);
...
...
@@ -115,9 +115,33 @@ public class MedicalController extends AbstractController {
medical
.
setCheckname
(
username
);
medical
.
setChecktime
(
new
Date
());
QueryWrapper
<
MedicalEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"id"
,
medical
.
getId
());
medicalService
.
update
(
medical
,
queryWrapper
);
queryWrapper
.
eq
(
"id"
,
medical
.
getId
());
medicalService
.
update
(
medical
,
queryWrapper
);
return
R
.
ok
(
"审核成功!"
);
}
@PostMapping
(
"/api/getList10ByType"
)
public
R
getList10ByType
(
@RequestBody
MedicalEntity
medical
)
{
QueryWrapper
<
MedicalEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
select
(
"top 10 id,title "
);
queryWrapper
.
gt
(
"level"
,
"0"
);
if
(
StringUtils
.
isBlank
(
medical
.
getType
()))
{
return
R
.
error
(
"请输入分类"
);
}
queryWrapper
.
eq
(
"type"
,
medical
.
getType
());
queryWrapper
.
orderByDesc
(
"releaseTime"
);
return
R
.
ok
().
put
(
"data"
,
medicalService
.
list
(
queryWrapper
));
}
@PostMapping
(
"/api/getDetailById"
)
public
R
getDetailById
(
@RequestBody
MedicalEntity
medical
)
{
return
R
.
ok
().
put
(
"data"
,
medicalService
.
getById
(
medical
.
getId
()));
}
}
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