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
c1a51051
Commit
c1a51051
authored
Jul 01, 2021
by
taabe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
警情初报修改
parent
ef7d400a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
85 additions
and
39 deletions
+85
-39
AircraftController.java
...os/boot/module/jcs/biz/controller/AircraftController.java
+2
-3
DataDictionaryController.java
...t/module/jcs/biz/controller/DataDictionaryController.java
+32
-6
AlertCalledAction.java
...os/boot/module/jcs/biz/rule/action/AlertCalledAction.java
+1
-1
AircraftServiceImpl.java
...boot/module/jcs/biz/service/impl/AircraftServiceImpl.java
+4
-2
AlertSubmittedServiceImpl.java
...odule/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
+14
-0
PowerTransferServiceImpl.java
...module/jcs/biz/service/impl/PowerTransferServiceImpl.java
+32
-27
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 @
c1a51051
...
@@ -74,10 +74,9 @@ public class AircraftController extends BaseController {
...
@@ -74,10 +74,9 @@ public class AircraftController extends BaseController {
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/
{ids}
"
)
@DeleteMapping
(
value
=
"/
batch
"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据物理主键批量删除航空器信息"
,
notes
=
"根据物理主键批量删除航空器信息"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据物理主键批量删除航空器信息"
,
notes
=
"根据物理主键批量删除航空器信息"
)
public
ResponseModel
<
List
<
Long
>>
deleteBySequenceNbr
(
HttpServletRequest
request
,
public
ResponseModel
<
List
<
Long
>>
deleteBySequenceNbr
(
@RequestParam
(
value
=
"ids"
)
String
ids
)
throws
Exception
{
@PathVariable
(
value
=
"ids"
)
String
ids
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
aircraftServiceImpl
.
multDeleteAircraft
(
RequestContext
.
getAgencyCode
(),
ids
));
return
ResponseHelper
.
buildResponse
(
aircraftServiceImpl
.
multDeleteAircraft
(
RequestContext
.
getAgencyCode
(),
ids
));
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/DataDictionaryController.java
View file @
c1a51051
...
@@ -5,25 +5,31 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -5,25 +5,31 @@ 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.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.*
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.MenuFrom
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.DataDictionary
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.DataDictionary
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.AlertFormVo
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.DataDictionaryServiceImpl
;
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.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecCVCDSA
;
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
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
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.enumeration.UserType
;
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
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -167,6 +173,26 @@ public class DataDictionaryController extends BaseController {
...
@@ -167,6 +173,26 @@ public class DataDictionaryController extends BaseController {
return
ResponseHelper
.
buildResponse
(
menus
);
return
ResponseHelper
.
buildResponse
(
menus
);
}
}
}
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/dataDictionary"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据字典类型查询字典2"
,
notes
=
"根据字典类型查询字典2"
)
public
ResponseModel
<
Object
>
getDictionary
(
@RequestParam
String
type
)
throws
Exception
{
QueryWrapper
<
DataDictionary
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"type"
,
type
);
queryWrapper
.
orderByAsc
(
"sort_num"
);
if
(
redisUtils
.
hasKey
(
RedisKey
.
DATA_DICTIONARY_CODE
+
type
))
{
Object
obj
=
redisUtils
.
get
(
RedisKey
.
DATA_DICTIONARY_CODE
+
type
);
return
ResponseHelper
.
buildResponse
(
obj
);
}
else
{
Collection
<
DataDictionary
>
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
null
,
list
,
DataDictionary
.
class
.
getName
(),
"getCode"
,
0
,
"getName"
,
"getParent"
);
redisUtils
.
set
(
RedisKey
.
DATA_DICTIONARY_CODE
+
type
,
JSON
.
toJSON
(
menus
),
time
);
return
ResponseHelper
.
buildResponse
(
menus
);
}
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/gwmcDataDictionary/FireChemical/{type}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/gwmcDataDictionary/FireChemical/{type}"
,
method
=
RequestMethod
.
GET
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/rule/action/AlertCalledAction.java
View file @
c1a51051
...
@@ -83,7 +83,7 @@ public class AlertCalledAction {
...
@@ -83,7 +83,7 @@ public class AlertCalledAction {
for
(
String
mobile
:
mobiles
)
{
for
(
String
mobile
:
mobiles
)
{
smsParams
.
put
(
"mobile"
,
mobile
);
smsParams
.
put
(
"mobile"
,
mobile
);
//发送短信
//发送短信
Systemctl
.
smsClient
.
sendCommonSms
(
smsParams
);
//
Systemctl.smsClient.sendCommonSms(smsParams);
}
}
}
}
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AircraftServiceImpl.java
View file @
c1a51051
...
@@ -15,13 +15,14 @@ import org.typroject.tyboot.core.foundation.exception.BaseException;
...
@@ -15,13 +15,14 @@ import org.typroject.tyboot.core.foundation.exception.BaseException;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.StringUtil
;
import
org.typroject.tyboot.core.foundation.utils.StringUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.DataNotFound
;
import
org.typroject.tyboot.core.restful.exception.instance.DataNotFound
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
/**
/**
* 航空器信息服务实现类
* 航空器信息服务实现类
...
@@ -131,7 +132,8 @@ public class AircraftServiceImpl extends BaseService<AircraftDto, Aircraft, Airc
...
@@ -131,7 +132,8 @@ public class AircraftServiceImpl extends BaseService<AircraftDto, Aircraft, Airc
* @param page
* @param page
* @return
* @return
*/
*/
public
Page
<
AircraftDto
>
queryForAircraftPage
(
Page
<
AircraftDto
>
page
,
String
aircraftModel
,
public
Page
<
AircraftDto
>
queryForAircraftPage
(
Page
<
AircraftDto
>
page
,
@Condition
(
Operator
.
like
)
String
aircraftModel
,
String
engineType
,
String
fuelType
)
{
String
engineType
,
String
fuelType
)
{
return
this
.
queryForPage
(
page
,
null
,
false
,
aircraftModel
,
engineType
,
fuelType
);
return
this
.
queryForPage
(
page
,
null
,
false
,
aircraftModel
,
engineType
,
fuelType
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
View file @
c1a51051
...
@@ -31,12 +31,16 @@ import com.yeejoin.amos.boot.module.jcs.api.vo.PowerTransferCompanyVo;
...
@@ -31,12 +31,16 @@ import com.yeejoin.amos.boot.module.jcs.api.vo.PowerTransferCompanyVo;
import
com.yeejoin.amos.boot.module.jcs.api.vo.SchedulingReportingVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.SchedulingReportingVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.TemplateVo
;
import
com.yeejoin.amos.boot.module.jcs.api.vo.TemplateVo
;
import
com.yeejoin.amos.boot.module.jcs.biz.rule.action.AlertCalledAction
;
import
com.yeejoin.amos.boot.module.jcs.biz.rule.action.AlertCalledAction
;
import
com.yeejoin.amos.component.rule.config.ClazzUtils
;
import
com.yeejoin.amos.component.rule.config.RuleConfig
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.StringUtil
;
import
org.typroject.tyboot.core.foundation.utils.StringUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
@@ -82,6 +86,12 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -82,6 +86,12 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
@Autowired
@Autowired
private
RedisUtils
redisUtils
;
private
RedisUtils
redisUtils
;
@Autowired
private
EmqKeeper
emqKeeper
;
@Value
(
"${mqtt.topic.alert.reporting}"
)
private
String
topic
;
@Override
@Override
public
SchedulingReportingVo
listSchedulingByParam
(
AlertSubmittedDto
queryParam
)
{
public
SchedulingReportingVo
listSchedulingByParam
(
AlertSubmittedDto
queryParam
)
{
SchedulingReportingVo
schedulingReportingVo
=
new
SchedulingReportingVo
();
SchedulingReportingVo
schedulingReportingVo
=
new
SchedulingReportingVo
();
...
@@ -153,11 +163,13 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -153,11 +163,13 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
Set
<
String
>
mobiles
=
new
HashSet
<>();
Set
<
String
>
mobiles
=
new
HashSet
<>();
HashMap
<
String
,
String
>
smsParams
=
new
HashMap
<>();
HashMap
<
String
,
String
>
smsParams
=
new
HashMap
<>();
String
alertCalledId
=
null
;
// 根据id列表查询所有人员信息
// 根据id列表查询所有人员信息
List
<
Long
>
ids
=
StringUtil
.
String2LongList
(
sendIds
);
List
<
Long
>
ids
=
StringUtil
.
String2LongList
(
sendIds
);
if
(
object
instanceof
AlertCalledRo
)
{
if
(
object
instanceof
AlertCalledRo
)
{
AlertCalledRo
calledRo
=
(
AlertCalledRo
)
object
;
AlertCalledRo
calledRo
=
(
AlertCalledRo
)
object
;
String
alertSubmittedId
=
calledRo
.
getAlertSubmittedId
();
String
alertSubmittedId
=
calledRo
.
getAlertSubmittedId
();
alertCalledId
=
calledRo
.
getSequenceNbr
();
// 警情初报
// 警情初报
if
(
alertSubmittedId
==
null
)
{
if
(
alertSubmittedId
==
null
)
{
...
@@ -223,6 +235,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -223,6 +235,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
// 组织短信内容
// 组织短信内容
// 调用短信发送接口
// 调用短信发送接口
alertCalledAction
.
sendAlertCalleCmd
(
smsCode
,
mobiles
,
smsParams
);
alertCalledAction
.
sendAlertCalleCmd
(
smsCode
,
mobiles
,
smsParams
);
emqKeeper
.
getMqttClient
().
publish
(
topic
,
alertCalledId
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
}
}
/**
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/PowerTransferServiceImpl.java
View file @
c1a51051
...
@@ -29,6 +29,7 @@ import org.springframework.stereotype.Service;
...
@@ -29,6 +29,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -121,17 +122,19 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
...
@@ -121,17 +122,19 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
ResponseModel
<
Object
>
result
=
equipFeignService
.
getFireCarListAll
();
ResponseModel
<
Object
>
result
=
equipFeignService
.
getFireCarListAll
();
if
(!
ObjectUtils
.
isEmpty
(
result
))
{
if
(!
ObjectUtils
.
isEmpty
(
result
))
{
List
<
Map
<
String
,
Object
>>
fireCarListMapList
=
(
List
<
Map
<
String
,
Object
>>)
result
.
getResult
();
List
<
Map
<
String
,
Object
>>
fireCarListMapList
=
(
List
<
Map
<
String
,
Object
>>)
result
.
getResult
();
fireCarListMapList
.
stream
().
filter
(
car
->
ObjectUtils
.
isNotEmpty
(
car
.
get
(
"teamId"
))).
forEach
(
car
->
{
if
(!
ValidationUtil
.
isEmpty
(
fireCarListMapList
))
{
FireBrigadeResourceDto
fireCarDto
=
(
FireBrigadeResourceDto
)
Bean
.
mapToBean
(
car
,
FireBrigadeResourceDto
.
class
);
fireCarListMapList
.
stream
().
filter
(
car
->
ObjectUtils
.
isNotEmpty
(
car
.
get
(
"teamId"
))).
forEach
(
car
->
{
// TODO 后期根据车物联状态来返回,现在为"在位=执勤","其他=出动"
FireBrigadeResourceDto
fireCarDto
=
(
FireBrigadeResourceDto
)
Bean
.
mapToBean
(
car
,
FireBrigadeResourceDto
.
class
);
if
(
FireCarStatusEnum
.
onDuty
.
getCode
().
equals
(
fireCarDto
.
getCarState
()))
{
// TODO 后期根据车物联状态来返回,现在为"在位=执勤","其他=出动"
fireCarDto
.
setCarStateDesc
(
FireCarStatusEnum
.
onDuty
.
getName
());
if
(
FireCarStatusEnum
.
onDuty
.
getCode
().
equals
(
fireCarDto
.
getCarState
()))
{
}
else
{
fireCarDto
.
setCarStateDesc
(
FireCarStatusEnum
.
onDuty
.
getName
());
fireCarDto
.
setCarState
(
FireCarStatusEnum
.
out
.
getCode
());
}
else
{
fireCarDto
.
setCarStateDesc
(
FireCarStatusEnum
.
out
.
getName
());
fireCarDto
.
setCarState
(
FireCarStatusEnum
.
out
.
getCode
());
}
fireCarDto
.
setCarStateDesc
(
FireCarStatusEnum
.
out
.
getName
());
fireCarDtoList
.
add
(
fireCarDto
);
}
});
fireCarDtoList
.
add
(
fireCarDto
);
});
}
}
}
// 2.查询消防队伍列表
// 2.查询消防队伍列表
...
@@ -140,22 +143,24 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
...
@@ -140,22 +143,24 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
if
(!
CollectionUtils
.
isEmpty
(
fullTimeFireBrigadeList
))
{
if
(!
CollectionUtils
.
isEmpty
(
fullTimeFireBrigadeList
))
{
Map
<
String
,
List
<
FireBrigadeResourceDto
>>
resultMap
=
Map
<
String
,
List
<
FireBrigadeResourceDto
>>
resultMap
=
fireCarDtoList
.
stream
().
collect
(
Collectors
.
groupingBy
(
FireBrigadeResourceDto:
:
getTeamId
));
fireCarDtoList
.
stream
().
collect
(
Collectors
.
groupingBy
(
FireBrigadeResourceDto:
:
getTeamId
));
fullTimeFireBrigadeList
.
forEach
(
brigade
->
{
if
(!
ValidationUtil
.
isEmpty
(
fullTimeFireBrigadeList
))
{
if
(!
CollectionUtils
.
isEmpty
(
resultMap
.
get
(
brigade
.
getSequenceNbr
().
toString
())))
{
fullTimeFireBrigadeList
.
forEach
(
brigade
->
{
FireBrigadeResourceDto
fireCarResourceDto
=
new
FireBrigadeResourceDto
();
if
(!
CollectionUtils
.
isEmpty
(
resultMap
.
get
(
brigade
.
getSequenceNbr
().
toString
())))
{
List
<
FireBrigadeResourceDto
>
fireBrigadeResourceDtoList
=
FireBrigadeResourceDto
fireCarResourceDto
=
new
FireBrigadeResourceDto
();
resultMap
.
get
(
brigade
.
getSequenceNbr
().
toString
());
List
<
FireBrigadeResourceDto
>
fireBrigadeResourceDtoList
=
long
onDutyCarCount
=
fireBrigadeResourceDtoList
.
stream
().
filter
(
car
->
FireCarStatusEnum
.
onDuty
.
getCode
().
equals
(
car
.
getCarState
())).
count
();
resultMap
.
get
(
brigade
.
getSequenceNbr
().
toString
());
long
outCarCount
=
fireBrigadeResourceDtoList
.
size
()
-
onDutyCarCount
;
long
onDutyCarCount
=
fireBrigadeResourceDtoList
.
stream
().
filter
(
car
->
FireCarStatusEnum
.
onDuty
.
getCode
().
equals
(
car
.
getCarState
())).
count
();
fireCarResourceDto
.
setId
(
brigade
.
getSequenceNbr
().
toString
());
long
outCarCount
=
fireBrigadeResourceDtoList
.
size
()
-
onDutyCarCount
;
fireCarResourceDto
.
setType
(
FireBrigadeTypeEnum
.
专职消防队
.
getKey
());
fireCarResourceDto
.
setId
(
brigade
.
getSequenceNbr
().
toString
());
fireCarResourceDto
.
setName
(
brigade
.
getName
());
fireCarResourceDto
.
setType
(
FireBrigadeTypeEnum
.
专职消防队
.
getKey
());
fireCarResourceDto
.
getChildren
().
addAll
(
fireBrigadeResourceDtoList
);
fireCarResourceDto
.
setName
(
brigade
.
getName
());
fireCarResourceDto
.
setOutCount
((
int
)
outCarCount
);
fireCarResourceDto
.
getChildren
().
addAll
(
fireBrigadeResourceDtoList
);
fireCarResourceDto
.
setOnDutyCount
((
int
)
onDutyCarCount
);
fireCarResourceDto
.
setOutCount
((
int
)
outCarCount
);
fireBrigadeResourceList
.
add
(
fireCarResourceDto
);
fireCarResourceDto
.
setOnDutyCount
((
int
)
onDutyCarCount
);
}
fireBrigadeResourceList
.
add
(
fireCarResourceDto
);
});
}
});
}
}
}
// 3.消防队伍-监控大队
// 3.消防队伍-监控大队
...
...
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