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
daa4c44c
Commit
daa4c44c
authored
Aug 16, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口测试修正
parent
4964e3de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
7 deletions
+25
-7
VoiceRecordFileController.java
.../module/tzs/biz/controller/VoiceRecordFileController.java
+25
-7
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/VoiceRecordFileController.java
View file @
daa4c44c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.VoiceRecordFileDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.VoiceRecordFile
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.AlertCalledServiceImpl
;
import
com.yeejoin.amos.boot.module.tzs.biz.service.impl.VoiceRecordFileServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
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
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
;
import
java
x.servlet.http.HttpServletRequest
;
import
java
.util.Calendar
;
import
java.util.List
;
/**
...
...
@@ -40,6 +40,9 @@ public class VoiceRecordFileController extends BaseController {
@Autowired
VoiceRecordFileServiceImpl
voiceRecordFileServiceImpl
;
@Autowired
AlertCalledServiceImpl
iAlertCalledService
;
/**
* 新增通话记录附件
*
...
...
@@ -49,8 +52,23 @@ public class VoiceRecordFileController extends BaseController {
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增通话记录附件"
,
notes
=
"新增通话记录附件"
)
public
ResponseModel
<
VoiceRecordFileDto
>
save
(
@RequestBody
VoiceRecordFileDto
model
)
{
model
=
voiceRecordFileServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
if
(
ValidationUtil
.
isEmpty
(
model
.
getAlertId
())
||
ValidationUtil
.
isEmpty
(
model
.
getTel
())){
throw
new
BadRequest
(
"参数校验失败."
);
}
Calendar
startTime
=
Calendar
.
getInstance
();
Calendar
endTime
=
Calendar
.
getInstance
();
endTime
.
add
(
Calendar
.
MINUTE
,
6
);
model
.
setTelStartTime
(
startTime
.
getTime
());
model
.
setTelEndTime
(
endTime
.
getTime
());
AlertCalledFormDto
alertDto
=
iAlertCalledService
.
selectAlertCalledByIdNoCache
(
model
.
getAlertId
());
if
(
alertDto
==
null
||
alertDto
.
getAlertCalledDto
()
==
null
)
{
throw
new
BadRequest
(
"未找到相关警情"
);
}
model
.
setAlertStage
(
alertDto
.
getAlertCalledDto
().
getAlertStage
());
model
.
setAlertStageCode
(
alertDto
.
getAlertCalledDto
().
getAlertStageCode
());
model
=
voiceRecordFileServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
/**
...
...
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