Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
37925ddc
Commit
37925ddc
authored
Jul 07, 2021
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
班次删除
parent
601734d0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
DutyPersonShiftController.java
...dule/common/biz/controller/DutyPersonShiftController.java
+17
-2
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/DutyPersonShiftController.java
View file @
37925ddc
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.module.common.api.entity.DutyPersonShift
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.List
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.DutyPersonShiftServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -64,7 +69,17 @@ public class DutyPersonShiftController extends BaseController {
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除值班人员日期关联关系表"
,
notes
=
"根据sequenceNbr删除值班人员日期关联关系表"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
dutyPersonShiftServiceImpl
.
removeById
(
sequenceNbr
));
DutyPersonShift
shift
=
dutyPersonShiftServiceImpl
.
getById
(
sequenceNbr
);
Long
instanceId
=
shift
.
getInstanceId
();
Long
dateTime
=
shift
.
getDutyDate
().
getTime
();
List
<
Long
>
shifts
=
new
ArrayList
<>();
List
<
DutyPersonShift
>
list
=
dutyPersonShiftServiceImpl
.
list
(
new
QueryWrapper
<
DutyPersonShift
>().
eq
(
"instance_id"
,
instanceId
));
list
.
forEach
(
x
->
{
if
(
dateTime
>=
x
.
getDutyDate
().
getTime
())
{
shifts
.
add
(
x
.
getSequenceNbr
());
}
});
return
ResponseHelper
.
buildResponse
(
dutyPersonShiftServiceImpl
.
removeByIds
(
shifts
));
}
/**
* 根据sequenceNbr查询
...
...
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