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
3478af19
Commit
3478af19
authored
Aug 09, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加acm 信息查询接口
parent
0f0285dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
7 deletions
+43
-7
AircraftController.java
...os/boot/module/jcs/biz/controller/AircraftController.java
+43
-7
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AircraftController.java
View file @
3478af19
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
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.common.api.dto.ExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FormValue
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.common.api.feign.IotFeignClient
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AircraftListTreeDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.KeyValueLabel
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AircraftServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertCalledServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormValueServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.DataSourcesImpl
;
import
io.swagger.annotations.Api
;
...
...
@@ -28,10 +34,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
...
...
@@ -51,6 +54,9 @@ public class AircraftController extends BaseController {
DataSourcesImpl
dataSourcesImpl
;
@Autowired
IotFeignClient
iotFeignClient
;
@Autowired
private
AlertFormValueServiceImpl
iAlertFormValueService
;
/**
* 新增航空器信息
*
...
...
@@ -195,7 +201,37 @@ public class AircraftController extends BaseController {
}
}
return
ResponseHelper
.
buildResponse
(
map1
);
}
}
/**
*
* 通过航班号,查询最新的航班信息
*
* **/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getAircraftDetailsByAlertId/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据灾情id 查询最新的航班信息"
,
notes
=
"根据灾情id 查询最新的航班信息"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getAircraftDetailsByAlertId
(
@PathVariable
Long
id
)
{
QueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"alert_called_id"
,
id
);
// 警情动态表单数据
List
<
KeyValueLabel
>
listdate
=
new
ArrayList
<>();
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
String
num
=
null
;
if
(
list
!=
null
&&
list
.
size
()>
0
)
{
for
(
AlertFormValue
alertFormValue
:
list
)
{
if
(
"flightNumber"
.
equals
(
alertFormValue
.
getFieldCode
())){
num
=
alertFormValue
.
getFieldValue
();
}
}
}
Map
<
String
,
Object
>
map
=
new
HashedMap
();
ResponseModel
<
Map
<
String
,
Object
>>
dataModel
=
iotFeignClient
.
getDynamicFlightInfo
(
num
);
if
(
dataModel
!=
null
)
{
map
=
dataModel
.
getResult
();
}
return
ResponseHelper
.
buildResponse
(
map
);
}
}
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