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
9ab93653
Commit
9ab93653
authored
Oct 26, 2021
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
15e08926
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
3 deletions
+37
-3
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+37
-3
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-command-biz/src/main/java/com/yeejoin/amos/boot/module/command/biz/controller/CommandController.java
View file @
9ab93653
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.command.biz.controller;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.command.biz.controller;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.OrderItem
;
import
com.baomidou.mybatisplus.core.metadata.OrderItem
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -17,6 +18,7 @@ import com.yeejoin.amos.boot.module.command.api.dto.CarTaskDto;
...
@@ -17,6 +18,7 @@ import com.yeejoin.amos.boot.module.command.api.dto.CarTaskDto;
import
com.yeejoin.amos.boot.module.command.api.dto.SeismometeorologyDto
;
import
com.yeejoin.amos.boot.module.command.api.dto.SeismometeorologyDto
;
import
com.yeejoin.amos.boot.module.command.biz.service.impl.RemoteSecurityService
;
import
com.yeejoin.amos.boot.module.command.biz.service.impl.RemoteSecurityService
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireBrigadeResourceDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireTeam
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireTeam
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.feign.IotFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.feign.IotFeignClient
;
...
@@ -39,10 +41,14 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
...
@@ -39,10 +41,14 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import
com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompanyResources
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompanyResources
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.UserCar
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.UserCar
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.FireCarStatusEnum
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.PowerTransferCompanyResourcesMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.PowerTransferMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.*
;
import
com.yeejoin.amos.boot.module.jcs.api.service.*
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -50,7 +56,9 @@ import org.springframework.web.bind.annotation.*;
...
@@ -50,7 +56,9 @@ import org.springframework.web.bind.annotation.*;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
import
org.typroject.tyboot.core.foundation.exception.BaseException
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.DateUtil
;
import
org.typroject.tyboot.core.foundation.utils.DateUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -65,6 +73,7 @@ import java.util.ArrayList;
...
@@ -65,6 +73,7 @@ import java.util.ArrayList;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
/**
* *指挥资源Api
* *指挥资源Api
...
@@ -120,18 +129,24 @@ public class CommandController extends BaseController {
...
@@ -120,18 +129,24 @@ public class CommandController extends BaseController {
private
String
readUrl
;
private
String
readUrl
;
@Autowired
@Autowired
EquipFeignClient
equipFeignClient
;
EquipFeignClient
equipFeignClient
;
@Autowired
PowerTransferMapper
powerTransferMapper
;
@Autowired
@Autowired
VideoFeignClient
videoFeignClient
;
VideoFeignClient
videoFeignClient
;
@Autowired
@Autowired
IKeySiteService
keySiteService
;
IKeySiteService
keySiteService
;
@Autowired
@Autowired
EquipFeignClient
equipFeignService
;
@Autowired
IPowerTransferCompanyService
powerTransferCompanyService
;
IPowerTransferCompanyService
powerTransferCompanyService
;
@Autowired
@Autowired
IPowerTransferCompanyResourcesService
powerTransferCompanyResourcesService
;
IPowerTransferCompanyResourcesService
powerTransferCompanyResourcesService
;
@Autowired
@Autowired
PowerTransferCompanyResourcesMapper
powerTransferCompanyResourcesMapper
;
@Autowired
ISourceFileService
sourceFileService
;
ISourceFileService
sourceFileService
;
@Value
(
"${video.url}"
)
@Value
(
"${video.url}"
)
...
@@ -1031,9 +1046,28 @@ public class CommandController extends BaseController {
...
@@ -1031,9 +1046,28 @@ public class CommandController extends BaseController {
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"fireCar/list"
)
@GetMapping
(
value
=
"fireCar/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆资源"
,
notes
=
"车辆资源"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车辆资源"
,
notes
=
"车辆资源"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getTeamCarList
(
RequestData
par
)
{
public
ResponseModel
<
Object
>
getTeamCarList
(
RequestData
par
)
{
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
date
=
equipFeignClient
.
getTeamCarList
(
par
.
getLongitude
(),
par
.
getLatitude
());
/*bug 2583 地图屏,消防车辆类型时,左侧车辆状态显示错误 陈召 开始 */
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
date
=
equipFeignClient
.
getTeamCarList
(
par
.
getLongitude
(),
par
.
getLatitude
());
List
<
Map
<
String
,
Object
>>
result
=
date
.
getResult
();
QueryWrapper
<
PowerTransferCompanyResources
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"status"
,
FireCarStatusEnum
.
执行中
.
getCode
()
);
List
<
PowerTransferCompanyResources
>
alertFormValue
=
powerTransferCompanyResourcesMapper
.
selectList
(
queryWrapper
);
result
.
stream
().
forEach
(
e
->{
if
(
e
.
get
(
"carState"
).
equals
(
"在位"
)){
e
.
put
(
"carState"
,
FireCarStatusEnum
.
执勤
.
getName
());
}
String
sequenceNbr
=
e
.
get
(
"sequenceNbr"
).
toString
();
//同步力量调派车辆任务状态
alertFormValue
.
stream
().
forEach
(
v
->{
if
(
v
.
getResourcesId
().
equals
(
sequenceNbr
))
{
String
carStatus
=
v
.
getCarStatus
();
e
.
put
(
"carState"
,
carStatus
!=
null
?
FireCarStatusEnum
.
getEnum
(
carStatus
).
getName
():
null
);
}
});
});
return
ResponseHelper
.
buildResponse
(
date
!=
null
?
date
.
getResult
():
null
);
return
ResponseHelper
.
buildResponse
(
date
!=
null
?
date
.
getResult
():
null
);
/*bug 2583 地图屏,消防车辆类型时,左侧车辆状态显示错误 2021-10-26 陈召 结束 */
}
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
...
...
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