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
215fb303
Commit
215fb303
authored
Sep 10, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG 2807 删除逻辑缺陷,现在前端后端传入 删除月份 2021-09-10 by kongfm
parent
ca86ba05
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
13 deletions
+30
-13
IDutyCommonService.java
...os/boot/module/common/api/service/IDutyCommonService.java
+1
-1
DutyCarController.java
.../boot/module/common/biz/controller/DutyCarController.java
+12
-2
DutyPersonController.java
...ot/module/common/biz/controller/DutyPersonController.java
+13
-3
DutyCommonServiceImpl.java
...module/common/biz/service/impl/DutyCommonServiceImpl.java
+4
-7
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/IDutyCommonService.java
View file @
215fb303
...
...
@@ -61,7 +61,7 @@ public interface IDutyCommonService {
* @param instanceId 实例id
* @return Boolean
*/
Boolean
deleteDutyData
(
Long
instanceId
);
Boolean
deleteDutyData
(
Long
instanceId
,
String
startTime
,
String
endTime
);
/**
* 查询指定条件的值班人信息
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/DutyCarController.java
View file @
215fb303
...
...
@@ -11,7 +11,9 @@ import io.swagger.annotations.ApiParam;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -127,13 +129,21 @@ public class DutyCarController extends BaseController {
* 值班数据删除
*
* @param instanceId 实例id
* @param startTime 开始时间
* @param endTime 结束时间
* @return ResponseModel
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
"/{instanceId}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"值班数据删除"
,
notes
=
"值班数据删除"
)
public
ResponseModel
deleteDutyData
(
@PathVariable
Long
instanceId
)
{
return
ResponseHelper
.
buildResponse
(
iDutyCarService
.
deleteDutyData
(
instanceId
));
public
ResponseModel
deleteDutyData
(
@PathVariable
Long
instanceId
,
@PathVariable
String
startTime
,
@PathVariable
String
endTime
)
{
if
(
ValidationUtil
.
isEmpty
(
instanceId
)
||
ValidationUtil
.
isEmpty
(
startTime
)
||
ValidationUtil
.
isEmpty
(
endTime
)){
throw
new
BadRequest
(
"参数校验失败."
);
}
// BUG 2807 删除逻辑缺陷,现在前端后端传入 删除月份 2021-09-10 by kongfm
return
ResponseHelper
.
buildResponse
(
iDutyCarService
.
deleteDutyData
(
instanceId
,
startTime
,
endTime
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/DutyPersonController.java
View file @
215fb303
...
...
@@ -11,7 +11,9 @@ import io.swagger.annotations.ApiParam;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -116,13 +118,21 @@ public class DutyPersonController extends BaseController {
* 值班数据删除
*
* @param instanceId 实例id
* @param startTime 开始时间
* @param endTime 结束时间
* @return ResponseModel
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
"/{instanceId}"
)
@DeleteMapping
(
"/{instanceId}
/{startTime}/{endTime}
"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"值班数据删除"
,
notes
=
"值班数据删除"
)
public
ResponseModel
deleteDutyData
(
@PathVariable
Long
instanceId
)
{
return
ResponseHelper
.
buildResponse
(
iDutyPersonService
.
deleteDutyData
(
instanceId
));
public
ResponseModel
deleteDutyData
(
@PathVariable
Long
instanceId
,
@PathVariable
String
startTime
,
@PathVariable
String
endTime
)
{
if
(
ValidationUtil
.
isEmpty
(
instanceId
)
||
ValidationUtil
.
isEmpty
(
startTime
)
||
ValidationUtil
.
isEmpty
(
endTime
)){
throw
new
BadRequest
(
"参数校验失败."
);
}
// BUG 2807 删除逻辑缺陷,现在前端后端传入 删除月份 2021-09-10 by kongfm
return
ResponseHelper
.
buildResponse
(
iDutyPersonService
.
deleteDutyData
(
instanceId
,
startTime
,
endTime
));
}
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyCommonServiceImpl.java
View file @
215fb303
...
...
@@ -326,14 +326,11 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
}
@Override
public
Boolean
deleteDutyData
(
Long
instanceId
)
{
// 一个人共用一个 instanceId
dynamicFormInstanceService
.
remove
(
new
LambdaQueryWrapper
<
DynamicFormInstance
>().
eq
(
DynamicFormInstance:
:
getInstanceId
,
instanceId
));
public
Boolean
deleteDutyData
(
Long
instanceId
,
String
startTime
,
String
endTime
)
{
// BUG 2807 删除逻辑缺陷,现在前端后端传入 删除月份 2021-09-10 by kongfm
//dynamicFormInstanceService.remove(new LambdaQueryWrapper<DynamicFormInstance>().eq(DynamicFormInstance::getInstanceId, instanceId));
dutyPersonShiftService
.
remove
(
new
LambdaQueryWrapper
<
DutyPersonShift
>().
eq
(
DutyPersonShift:
:
getInstanceId
,
instanceId
));
.
remove
(
new
LambdaQueryWrapper
<
DutyPersonShift
>().
ge
(
DutyPersonShift:
:
getDutyDate
,
startTime
).
le
(
DutyPersonShift:
:
getDutyDate
,
endTime
).
eq
(
DutyPersonShift:
:
getInstanceId
,
instanceId
));
return
true
;
}
...
...
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