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
b5f5d2fe
Commit
b5f5d2fe
authored
Aug 04, 2021
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接航班号
parent
e4010526
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
8 deletions
+43
-8
IotFeignClient.java
...oin/amos/boot/module/common/api/feign/IotFeignClient.java
+28
-0
AircraftController.java
...os/boot/module/jcs/biz/controller/AircraftController.java
+15
-8
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/feign/IotFeignClient.java
0 → 100644
View file @
b5f5d2fe
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
feign
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.Map
;
/**
* iot feign
*
* @author Dell
*/
@FeignClient
(
name
=
"AMOS-API-IOT-PLATFORM"
,
path
=
"iot"
,
configuration
=
{
MultipartSupportConfig
.
class
})
public
interface
IotFeignClient
{
/**
* 根据航班号查询航班信息
**/
@RequestMapping
(
value
=
"/v1/iot/DynamicFlightInfo/{flightNo}"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Map
<
String
,
Object
>>
getDynamicFlightInfo
(
@PathVariable
String
flightNo
);
}
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 @
b5f5d2fe
...
...
@@ -4,6 +4,7 @@ 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.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.entity.Aircraft
;
...
...
@@ -48,7 +49,8 @@ public class AircraftController extends BaseController {
private
AircraftServiceImpl
aircraftServiceImpl
;
@Autowired
DataSourcesImpl
dataSourcesImpl
;
@Autowired
IotFeignClient
iotFeignClient
;
/**
* 新增航空器信息
*
...
...
@@ -159,8 +161,6 @@ public class AircraftController extends BaseController {
@GetMapping
(
value
=
"/getAircraftNum"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取24小时内的航班号"
,
notes
=
"获取24小时内的航班号"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getAircraftNum
()
{
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
Map
<
String
,
Object
>
map
=
new
HashedMap
();
Map
<
String
,
Object
>
map1
=
new
HashedMap
();
...
...
@@ -181,12 +181,19 @@ public class AircraftController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过航班号,查询最新的航班信息"
,
notes
=
"通过航班号,查询最新的航班信息"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getAircraftDetails
(
@PathVariable
String
num
)
{
Map
<
String
,
Object
>
map1
=
new
HashedMap
();
map1
.
put
(
"aircraftModel"
,
"型号1"
);
map1
.
put
(
"landingTime"
,
new
Date
());
map1
.
put
(
"fuelQuantity"
,
"12"
);
map1
.
put
(
"passengerCapacity"
,
"测试2"
);
ResponseModel
<
Map
<
String
,
Object
>>
dataModel
=
iotFeignClient
.
getDynamicFlightInfo
(
num
);
if
(
dataModel
!=
null
)
{
Map
<
String
,
Object
>
map
=
dataModel
.
getResult
();
if
(
map
!=
null
)
{
map1
.
put
(
"aircraftModel"
,
map
.
get
(
"aircraftType"
));
map1
.
put
(
"landingTime"
,
map
.
get
(
"sta"
));
// map1.put("fuelQuantity", map.get(""));
map1
.
put
(
"passengerCapacity"
,
map
.
get
(
"psgNumTotal"
));
}
}
return
ResponseHelper
.
buildResponse
(
map1
);
}
...
...
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