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
b3ec308c
Commit
b3ec308c
authored
Dec 29, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交装备分类树和车辆分类树
parent
8aa6feb7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
10 deletions
+75
-10
FireFightingSystemController.java
.../equipmanage/controller/FireFightingSystemController.java
+28
-2
IFireFightingSystemService.java
...ejoin/equipmanage/service/IFireFightingSystemService.java
+14
-0
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+33
-8
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FireFightingSystemController.java
View file @
b3ec308c
...
...
@@ -76,8 +76,10 @@ public class FireFightingSystemController extends AbstractBaseController {
@Autowired
EquipmentSpecificIndexMapper
equipmentSpecificIndexMapper
;
@Autowired
ICarService
carService
;
@RequestMapping
(
value
=
"/getEquiplistBySystemId"
,
method
=
RequestMethod
.
GET
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
"根据系统id查询设备列表"
)
...
...
@@ -656,4 +658,28 @@ public class FireFightingSystemController extends AbstractBaseController {
public
List
<
PointTreeVo
>
getPointTree
(
@RequestParam
(
required
=
false
)
String
systemId
,
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
return
fireFightingSystemService
.
getPointTree
(
systemId
,
bizOrgCode
);
}
/**
* 获取装备类型和统计值
* @throws Exception
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取装备类型和统计值"
,
notes
=
"获取装备类型和统计值"
)
@GetMapping
(
value
=
"/getEquipmentTypeAndCount/tree"
)
public
Object
getEquipmentTypeAndCount
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
throws
Exception
{
equipmentSpecificSerivce
.
refreshStaData
();
return
fireFightingSystemService
.
getEquipmentTypeAndCount
(
bizOrgCode
);
}
/**
* 获取车辆类型和统计值
* @throws Exception
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取车辆类型和统计值"
,
notes
=
"获取车辆类型和统计值"
)
@GetMapping
(
value
=
"/getCarTypeAndCount/tree"
)
public
Object
getCarTypeAndCount
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
throws
Exception
{
carService
.
refreshStaData
();
return
fireFightingSystemService
.
getCarTypeAndCount
(
bizOrgCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IFireFightingSystemService.java
View file @
b3ec308c
...
...
@@ -207,4 +207,18 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
* @return
*/
List
<
FireFightingSystemEntity
>
systemListByBziOrgCode
(
String
bizOrgCode
);
/**
*装备分类的类型和总数
* @param bizOrgCode
* @return
* @throws Exception
*/
Object
getEquipmentTypeAndCount
(
String
bizOrgCode
)
throws
Exception
;
/***
* 车辆类型和统计值
* @param bizOrgCode
* @return
* @throws Exception
*/
Object
getCarTypeAndCount
(
String
bizOrgCode
)
throws
Exception
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
b3ec308c
...
...
@@ -64,6 +64,7 @@ import com.yeejoin.equipmanage.common.entity.vo.EquipmentAlarmBySystemIdOrSource
import
com.yeejoin.equipmanage.common.entity.vo.PointTreeVo
;
import
com.yeejoin.equipmanage.common.enums.EquipmentRiskTypeEnum
;
import
com.yeejoin.equipmanage.common.enums.EquipmentSpeIndexEnum
;
import
com.yeejoin.equipmanage.common.enums.SourceTypeEnum
;
import
com.yeejoin.equipmanage.common.enums.SystemTypeEnum
;
import
com.yeejoin.equipmanage.common.enums.TrueOrFalseEnum
;
import
com.yeejoin.equipmanage.common.utils.StringUtil
;
...
...
@@ -89,6 +90,7 @@ import com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce;
import
com.yeejoin.equipmanage.service.IFireFightingSystemService
;
import
com.yeejoin.equipmanage.service.IRiskSourceSceneService
;
import
com.yeejoin.equipmanage.service.ISourceSceneService
;
import
com.yeejoin.equipmanage.service.ISourceStatistics
;
import
com.yeejoin.equipmanage.service.ISyncDataService
;
import
com.yeejoin.equipmanage.service.MqttSendGateway
;
...
...
@@ -167,6 +169,9 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Autowired
IEquipmentCategoryService
iEquipmentCategoryService
;
@Autowired
ISourceStatistics
sourceStatistics
;
@Override
public
List
<
EquipCountBySystemVO
>
getEquipCountBySystemId
(
Long
systemId
)
{
return
this
.
baseMapper
.
getEquipCountBySystemId
(
systemId
);
...
...
@@ -987,30 +992,50 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
public
Object
get
waterResourceType
(
)
throws
Exception
{
public
Object
get
EquipmentTypeAndCount
(
String
bizOrgCode
)
throws
Exception
{
List
<
EquipmentCategory
>
responseList
=
this
.
typeList
();
if
(
responseList
==
null
||
responseList
.
size
()<
1
)
{
return
null
;
}
List
<
EquipmentCategory
>
equipmentTypeList
=
responseList
.
stream
().
filter
(
i
->
"2"
.
equals
(
i
.
getIndustryCode
())).
collect
(
Collectors
.
toList
());
getCountToChildren
(
equipmentTypeList
);
return
responseList
;
getCountToChildren
(
equipmentTypeList
,
bizOrgCode
);
return
equipmentTypeList
;
}
public
Object
getCountToChildren
(
List
<
EquipmentCategory
>
children
)
throws
Exception
{
public
Object
getCountToChildren
(
List
<
EquipmentCategory
>
children
,
String
bizOrgCode
)
throws
Exception
{
for
(
EquipmentCategory
equipmentCategory
:
children
)
{
equipmentCategory
.
getCode
(
);
int
num
=
sourceStatistics
.
equipCategoryStatistics
(
bizOrgCode
,
SourceTypeEnum
.
EQUIPMENT
,
equipmentCategory
.
getCode
()
);
equipmentCategory
.
setCount
(
Double
.
parseDouble
(
num
+
""
));
List
<
EquipmentCategory
>
childrenList
=
equipmentCategory
.
getChildren
();
if
(
childrenList
!=
null
&&
childrenList
.
size
()>
0
)
{
getCountToChildren
(
childrenList
);
getCountToChildren
(
childrenList
,
bizOrgCode
);
}
}
return
children
;
}
public
Object
getCarTypeAndCount
(
String
bizOrgCode
)
throws
Exception
{
List
<
EquipmentCategory
>
responseList
=
this
.
typeList
();
if
(
responseList
==
null
||
responseList
.
size
()<
1
)
{
return
null
;
}
List
<
EquipmentCategory
>
equipmentTypeList
=
responseList
.
stream
().
filter
(
i
->
"20000000"
.
equals
(
i
.
getCode
())
&&
"2"
.
equals
(
i
.
getIndustryCode
())).
collect
(
Collectors
.
toList
());
getCountToChildren
(
equipmentTypeList
,
bizOrgCode
);
return
equipmentTypeList
;
}
public
Object
getCarCountToChildren
(
List
<
EquipmentCategory
>
children
,
String
bizOrgCode
)
throws
Exception
{
for
(
EquipmentCategory
equipmentCategory
:
children
)
{
int
num
=
sourceStatistics
.
equipCategoryStatistics
(
bizOrgCode
,
SourceTypeEnum
.
CAR
,
equipmentCategory
.
getCode
());
equipmentCategory
.
setCount
(
Double
.
parseDouble
(
num
+
""
));
List
<
EquipmentCategory
>
childrenList
=
equipmentCategory
.
getChildren
();
if
(
childrenList
!=
null
&&
childrenList
.
size
()>
0
)
{
getCountToChildren
(
childrenList
,
bizOrgCode
);
}
}
return
children
;
}
...
...
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