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
cbf85bd1
Commit
cbf85bd1
authored
Nov 21, 2021
by
rongkailun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】医疗管理功能
parent
bae28f80
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
12 deletions
+22
-12
MedicalController.java
...o/office/modules/manage/controller/MedicalController.java
+7
-8
MedicalEntity.java
...n/java/io/office/modules/manage/entity/MedicalEntity.java
+5
-1
MedicalServiceImpl.java
...ffice/modules/manage/service/impl/MedicalServiceImpl.java
+9
-2
PolicyDao.xml
src/main/resources/mapper/manage/PolicyDao.xml
+1
-1
No files found.
src/main/java/io/office/modules/manage/controller/MedicalController.java
View file @
cbf85bd1
...
...
@@ -4,6 +4,8 @@ import java.util.*;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.service.MedicalService
;
import
io.office.modules.manage.utils.IdKeysConstant
;
import
io.office.modules.manage.utils.IdWorkerUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -33,7 +35,6 @@ public class MedicalController {
// @RequiresPermissions("manage:medical:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
PageUtils
page
=
medicalService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
}
...
...
@@ -55,9 +56,9 @@ public class MedicalController {
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:medical:save")
public
R
save
(
@RequestBody
MedicalEntity
medical
){
medical
.
setId
(
UUID
.
randomUUID
().
toString
(
));
medical
.
setId
(
IdWorkerUtils
.
getSEQByKey
(
IdKeysConstant
.
ID_SEQ_KEY
));
medical
.
setInputDate
(
new
Date
());
// medicalService.insertMedical
(medical);
medicalService
.
save
(
medical
);
return
R
.
ok
(
"新增成功!"
);
}
...
...
@@ -68,8 +69,7 @@ public class MedicalController {
// @RequiresPermissions("manage:medical:update")
public
R
update
(
@RequestBody
MedicalEntity
medical
){
medicalService
.
updateById
(
medical
);
return
R
.
ok
();
return
R
.
ok
(
"修改成功!"
);
}
/**
...
...
@@ -77,10 +77,9 @@ public class MedicalController {
*/
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:medical:delete")
public
R
delete
(
@RequestBody
Integer
[]
ids
){
public
R
delete
(
@RequestBody
String
[]
ids
){
medicalService
.
removeByIds
(
Arrays
.
asList
(
ids
));
return
R
.
ok
();
return
R
.
ok
(
"删除成功!"
);
}
@GetMapping
(
"/getMedicalTypeList"
)
...
...
src/main/java/io/office/modules/manage/entity/MedicalEntity.java
View file @
cbf85bd1
package
io
.
office
.
modules
.
manage
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
...
...
@@ -8,6 +10,7 @@ import java.util.Date;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
org.springframework.data.annotation.Id
;
/**
* ${comments}
...
...
@@ -24,7 +27,7 @@ public class MedicalEntity implements Serializable {
/**
* $column.comments
*/
@TableId
@TableId
(
type
=
IdType
.
INPUT
)
private
String
id
;
/**
* $column.comments
...
...
@@ -73,6 +76,7 @@ public class MedicalEntity implements Serializable {
*/
private
String
content
;
@TableField
(
"inputDate"
)
private
Date
inputDate
;
}
src/main/java/io/office/modules/manage/service/impl/MedicalServiceImpl.java
View file @
cbf85bd1
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
io.netty.util.internal.StringUtil
;
import
io.office.modules.manage.dao.MedicalDao
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.service.MedicalService
;
...
...
@@ -24,11 +25,17 @@ public class MedicalServiceImpl extends ServiceImpl<MedicalDao, MedicalEntity> i
MedicalDao
medicalDao
;
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
QueryWrapper
<
MedicalEntity
>
medicalEntityQueryWrapper
=
new
QueryWrapper
<>();
if
(!
StringUtil
.
isNullOrEmpty
(
String
.
valueOf
(
params
.
get
(
"title"
)))){
medicalEntityQueryWrapper
.
eq
(
"title"
,
params
.
get
(
"title"
));
}
if
(!
StringUtil
.
isNullOrEmpty
(
String
.
valueOf
(
params
.
get
(
"type"
)))){
medicalEntityQueryWrapper
.
eq
(
"type"
,
params
.
get
(
"type"
));
}
IPage
<
MedicalEntity
>
page
=
this
.
page
(
new
Query
<
MedicalEntity
>().
getPage
(
params
),
new
QueryWrapper
<
MedicalEntity
>()
medicalEntityQueryWrapper
);
return
new
PageUtils
(
page
);
}
...
...
src/main/resources/mapper/manage/PolicyDao.xml
View file @
cbf85bd1
...
...
@@ -27,7 +27,7 @@
<result
property=
"auditor"
column=
"auditor"
/>
</resultMap>
<select
id=
"selectPolicyList"
resultMap=
"policyMap"
parameterType=
"io.office.modules.manage.entity.dto.PolicyParams"
>
select class,title,editor,lasteditor,releasedate,updatedate,auditor,status from Policy
select
id,
class,title,editor,lasteditor,releasedate,updatedate,auditor,status from Policy
where 1=1
<if
test=
"newsParams.updateTimeStart !=null and newsParams.updateTimeEnd !=null"
>
and updatedate BETWEEN #{newsParams.updateTimeStart} AND #{newsParams.updateTimeEnd}
...
...
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