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
7af83d62
Commit
7af83d62
authored
Jul 08, 2021
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.增加删除接口
parent
03e17f3c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
1 deletion
+43
-1
DutyCarController.java
.../boot/module/common/biz/controller/DutyCarController.java
+12
-0
DutyPersonController.java
...ot/module/common/biz/controller/DutyPersonController.java
+12
-0
IDutyCommonService.java
...os/boot/module/common/biz/service/IDutyCommonService.java
+8
-1
DutyCommonServiceImpl.java
...module/common/biz/service/impl/DutyCommonServiceImpl.java
+11
-0
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/DutyCarController.java
View file @
7af83d62
...
...
@@ -107,4 +107,16 @@ public class DutyCarController extends BaseController {
@RequestBody
DutyCarDto
dutyCarDto
)
{
return
ResponseHelper
.
buildResponse
(
iDutyCarService
.
update
(
instanceId
,
dutyCarDto
));
}
/**
* 值班数据删除
* @param instanceId 实例id
* @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
));
}
}
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 @
7af83d62
...
...
@@ -108,4 +108,16 @@ public class DutyPersonController extends BaseController {
@RequestBody
DutyPersonDto
dutyPersonDto
)
{
return
ResponseHelper
.
buildResponse
(
iDutyPersonService
.
update
(
instanceId
,
dutyPersonDto
));
}
/**
* 值班数据删除
* @param instanceId 实例id
* @return ResponseModel
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
"/{instanceId}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"值班数据删除"
,
notes
=
"值班数据删除"
)
public
ResponseModel
deleteDutyData
(
@PathVariable
Long
instanceId
)
{
return
ResponseHelper
.
buildResponse
(
iDutyPersonService
.
deleteDutyData
(
instanceId
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/IDutyCommonService.java
View file @
7af83d62
...
...
@@ -50,7 +50,14 @@ public interface IDutyCommonService {
/**
* 值班数据入库
*
* @param dataList
* @param dataList
数据
*/
void
saveImportData
(
List
<
Map
<
String
,
Object
>>
dataList
);
/**
* 删除值班数据
* @param instanceId 实例id
* @return Boolean
*/
Boolean
deleteDutyData
(
Long
instanceId
);
}
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 @
7af83d62
...
...
@@ -10,9 +10,12 @@ import com.yeejoin.amos.boot.module.common.api.entity.DutyPersonShift;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance
;
import
com.yeejoin.amos.boot.module.common.api.enums.DutyViewTypeEnum
;
import
com.yeejoin.amos.boot.module.common.api.service.IDutyPersonShiftService
;
import
com.yeejoin.amos.boot.module.common.biz.service.IDutyCommonService
;
import
com.yeejoin.amos.boot.module.common.biz.service.IDutyPersonService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
...
...
@@ -242,4 +245,12 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
formInstance
.
setFormColumnId
(
column
.
getSequenceNbr
());
formInstance
.
setFieldValue
(
map
.
get
(
column
.
getFieldCode
())
!=
null
?
map
.
get
(
column
.
getFieldCode
()).
toString
()
:
""
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
Boolean
deleteDutyData
(
Long
instanceId
){
dynamicFormInstanceService
.
remove
(
new
LambdaQueryWrapper
<
DynamicFormInstance
>().
eq
(
DynamicFormInstance:
:
getInstanceId
,
instanceId
));
dutyPersonShiftService
.
remove
(
new
LambdaQueryWrapper
<
DutyPersonShift
>().
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