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
0456bb14
Commit
0456bb14
authored
Dec 07, 2021
by
rongkailun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】医疗、物流添加审核功能
parent
191c6eb7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
95 additions
and
12 deletions
+95
-12
LogisticsController.java
...office/modules/manage/controller/LogisticsController.java
+38
-9
MedicalController.java
...o/office/modules/manage/controller/MedicalController.java
+35
-3
LogisticsEntity.java
...java/io/office/modules/manage/entity/LogisticsEntity.java
+14
-0
MedicalEntity.java
...n/java/io/office/modules/manage/entity/MedicalEntity.java
+8
-0
No files found.
src/main/java/io/office/modules/manage/controller/LogisticsController.java
View file @
0456bb14
...
@@ -2,17 +2,17 @@ package io.office.modules.manage.controller;
...
@@ -2,17 +2,17 @@ package io.office.modules.manage.controller;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.utils.IdKeysConstant
;
import
io.office.modules.manage.utils.IdKeysConstant
;
import
io.office.modules.manage.utils.IdWorkerUtils
;
import
io.office.modules.manage.utils.IdWorkerUtils
;
import
io.office.modules.sys.controller.AbstractController
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.office.modules.manage.entity.LogisticsEntity
;
import
io.office.modules.manage.entity.LogisticsEntity
;
import
io.office.modules.manage.service.LogisticsService
;
import
io.office.modules.manage.service.LogisticsService
;
...
@@ -20,7 +20,6 @@ import io.office.common.utils.PageUtils;
...
@@ -20,7 +20,6 @@ import io.office.common.utils.PageUtils;
import
io.office.common.utils.R
;
import
io.office.common.utils.R
;
/**
/**
* ${comments}
* ${comments}
*
*
...
@@ -30,7 +29,7 @@ import io.office.common.utils.R;
...
@@ -30,7 +29,7 @@ import io.office.common.utils.R;
*/
*/
@RestController
@RestController
@RequestMapping
(
"/logistics"
)
@RequestMapping
(
"/logistics"
)
public
class
LogisticsController
{
public
class
LogisticsController
extends
AbstractController
{
@Autowired
@Autowired
private
LogisticsService
logisticsService
;
private
LogisticsService
logisticsService
;
...
@@ -64,6 +63,9 @@ public class LogisticsController {
...
@@ -64,6 +63,9 @@ public class LogisticsController {
public
R
save
(
@RequestBody
LogisticsEntity
logistics
){
public
R
save
(
@RequestBody
LogisticsEntity
logistics
){
logistics
.
setId
(
IdWorkerUtils
.
getSEQByKey
(
IdKeysConstant
.
ID_SEQ_KEY
));
logistics
.
setId
(
IdWorkerUtils
.
getSEQByKey
(
IdKeysConstant
.
ID_SEQ_KEY
));
logistics
.
setInputdate
(
new
Date
());
logistics
.
setInputdate
(
new
Date
());
String
username
=
getUser
().
getUsername
();
logistics
.
setEditor
(
username
);
logistics
.
setLasteditor
(
username
);
logisticsService
.
save
(
logistics
);
logisticsService
.
save
(
logistics
);
return
R
.
ok
(
"新增成功!"
);
return
R
.
ok
(
"新增成功!"
);
}
}
...
@@ -74,6 +76,10 @@ public class LogisticsController {
...
@@ -74,6 +76,10 @@ public class LogisticsController {
@RequestMapping
(
"/update"
)
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:logistics:update")
// @RequiresPermissions("manage:logistics:update")
public
R
update
(
@RequestBody
LogisticsEntity
logistics
){
public
R
update
(
@RequestBody
LogisticsEntity
logistics
){
String
username
=
getUser
().
getUsername
();
logistics
.
setEditor
(
username
);
logistics
.
setLasteditor
(
username
);
logistics
.
setUpdatetime
(
new
Date
());
logisticsService
.
updateById
(
logistics
);
logisticsService
.
updateById
(
logistics
);
return
R
.
ok
(
"修改成功!"
);
return
R
.
ok
(
"修改成功!"
);
}
}
...
@@ -83,9 +89,32 @@ public class LogisticsController {
...
@@ -83,9 +89,32 @@ public class LogisticsController {
*/
*/
@RequestMapping
(
"/delete"
)
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:logistics:delete")
// @RequiresPermissions("manage:logistics:delete")
public
R
delete
(
@RequestBody
String
[]
ids
){
public
R
delete
(
@RequestBody
List
<
String
>
ids
){
logisticsService
.
removeByIds
(
Arrays
.
asList
(
ids
));
LogisticsEntity
logistics
=
new
LogisticsEntity
();
String
username
=
getUser
().
getUsername
();
logistics
.
setEditor
(
username
);
logistics
.
setLasteditor
(
username
);
logistics
.
setUpdatetime
(
new
Date
());
logistics
.
setLevel
(
0
);
QueryWrapper
<
LogisticsEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
in
(
"id"
,
ids
);
logisticsService
.
update
(
logistics
,
queryWrapper
);
return
R
.
ok
(
"删除成功!"
);
return
R
.
ok
(
"删除成功!"
);
}
}
@PostMapping
(
"/verifyLogistics"
)
public
R
verifyMedical
(
@RequestBody
LogisticsEntity
logistics
){
String
username
=
getUser
().
getUsername
();
logistics
.
setEditor
(
username
);
logistics
.
setLasteditor
(
username
);
logistics
.
setUpdatetime
(
new
Date
());
logistics
.
setCheckname
(
username
);
logistics
.
setChecktime
(
new
Date
());
QueryWrapper
<
LogisticsEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"id"
,
logistics
.
getId
());
logisticsService
.
update
(
logistics
,
queryWrapper
);
return
R
.
ok
(
"审核成功!"
);
}
}
}
src/main/java/io/office/modules/manage/controller/MedicalController.java
View file @
0456bb14
...
@@ -2,10 +2,12 @@ package io.office.modules.manage.controller;
...
@@ -2,10 +2,12 @@ package io.office.modules.manage.controller;
import
java.util.*
;
import
java.util.*
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.service.MedicalService
;
import
io.office.modules.manage.service.MedicalService
;
import
io.office.modules.manage.utils.IdKeysConstant
;
import
io.office.modules.manage.utils.IdKeysConstant
;
import
io.office.modules.manage.utils.IdWorkerUtils
;
import
io.office.modules.manage.utils.IdWorkerUtils
;
import
io.office.modules.sys.controller.AbstractController
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -24,7 +26,7 @@ import io.office.common.utils.R;
...
@@ -24,7 +26,7 @@ import io.office.common.utils.R;
*/
*/
@RestController
@RestController
@RequestMapping
(
"/medical"
)
@RequestMapping
(
"/medical"
)
public
class
MedicalController
{
public
class
MedicalController
extends
AbstractController
{
@Autowired
@Autowired
private
MedicalService
medicalService
;
private
MedicalService
medicalService
;
...
@@ -57,7 +59,10 @@ public class MedicalController {
...
@@ -57,7 +59,10 @@ public class MedicalController {
// @RequiresPermissions("manage:medical: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
));
medical
.
setId
(
IdWorkerUtils
.
getSEQByKey
(
IdKeysConstant
.
ID_SEQ_KEY
));
String
username
=
getUser
().
getUsername
();
medical
.
setInputDate
(
new
Date
());
medical
.
setInputDate
(
new
Date
());
medical
.
setEditor
(
username
);
medical
.
setLasteditor
(
username
);
medicalService
.
save
(
medical
);
medicalService
.
save
(
medical
);
return
R
.
ok
(
"新增成功!"
);
return
R
.
ok
(
"新增成功!"
);
}
}
...
@@ -68,6 +73,10 @@ public class MedicalController {
...
@@ -68,6 +73,10 @@ public class MedicalController {
@RequestMapping
(
"/update"
)
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:medical: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
);
medical
.
setUpdatetime
(
new
Date
());
medicalService
.
updateById
(
medical
);
medicalService
.
updateById
(
medical
);
return
R
.
ok
(
"修改成功!"
);
return
R
.
ok
(
"修改成功!"
);
}
}
...
@@ -77,8 +86,16 @@ public class MedicalController {
...
@@ -77,8 +86,16 @@ public class MedicalController {
*/
*/
@RequestMapping
(
"/delete"
)
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:medical:delete")
// @RequiresPermissions("manage:medical:delete")
public
R
delete
(
@RequestBody
String
[]
ids
){
public
R
delete
(
@RequestBody
List
<
String
>
ids
){
medicalService
.
removeByIds
(
Arrays
.
asList
(
ids
));
MedicalEntity
medical
=
new
MedicalEntity
();
String
username
=
getUser
().
getUsername
();
medical
.
setEditor
(
username
);
medical
.
setLasteditor
(
username
);
medical
.
setUpdatetime
(
new
Date
());
medical
.
setLevel
(
0
);
QueryWrapper
<
MedicalEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
in
(
"id"
,
ids
);
medicalService
.
update
(
medical
,
queryWrapper
);
return
R
.
ok
(
"删除成功!"
);
return
R
.
ok
(
"删除成功!"
);
}
}
...
@@ -88,4 +105,19 @@ public class MedicalController {
...
@@ -88,4 +105,19 @@ public class MedicalController {
return
R
.
ok
().
put
(
"list"
,
list
);
return
R
.
ok
().
put
(
"list"
,
list
);
}
}
@PostMapping
(
"/verifyMedical"
)
public
R
verifyMedical
(
@RequestBody
MedicalEntity
medical
){
String
username
=
getUser
().
getUsername
();
medical
.
setEditor
(
username
);
medical
.
setLasteditor
(
username
);
medical
.
setUpdatetime
(
new
Date
());
medical
.
setCheckname
(
username
);
medical
.
setChecktime
(
new
Date
());
QueryWrapper
<
MedicalEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"id"
,
medical
.
getId
());
medicalService
.
update
(
medical
,
queryWrapper
);
return
R
.
ok
(
"审核成功!"
);
}
}
}
src/main/java/io/office/modules/manage/entity/LogisticsEntity.java
View file @
0456bb14
package
io
.
office
.
modules
.
manage
.
entity
;
package
io
.
office
.
modules
.
manage
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
...
@@ -81,4 +82,17 @@ public class LogisticsEntity implements Serializable {
...
@@ -81,4 +82,17 @@ public class LogisticsEntity implements Serializable {
@TableId
(
"inputdate"
)
@TableId
(
"inputdate"
)
private
Date
inputdate
;
private
Date
inputdate
;
private
String
status
;
private
String
checkname
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
checktime
;
private
String
editor
;
private
String
lasteditor
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updatetime
;
@TableField
(
"oldtitle"
)
private
String
titleOld
;
}
}
src/main/java/io/office/modules/manage/entity/MedicalEntity.java
View file @
0456bb14
...
@@ -86,4 +86,12 @@ public class MedicalEntity implements Serializable {
...
@@ -86,4 +86,12 @@ public class MedicalEntity implements Serializable {
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
checktime
;
private
Date
checktime
;
private
String
editor
;
private
String
lasteditor
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updatetime
;
@TableField
(
"oldtitle"
)
private
String
titleOld
;
}
}
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