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
f6125df1
Commit
f6125df1
authored
Aug 16, 2023
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
统计接口更新
parent
252b2196
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
14 deletions
+29
-14
FireResourceSupervisionController.java
...pmanage/controller/FireResourceSupervisionController.java
+8
-3
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+13
-8
FireResourceSupervisionController.java
...jcs/biz/controller/FireResourceSupervisionController.java
+8
-3
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FireResourceSupervisionController.java
View file @
f6125df1
...
...
@@ -6,11 +6,14 @@ import com.yeejoin.equipmanage.common.entity.dto.FireResourceStatsDTO;
import
com.yeejoin.equipmanage.service.IFireResourceSupervisionService
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
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.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -29,9 +32,11 @@ public class FireResourceSupervisionController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消防系统、监测部件、消防车辆统计信息查询"
,
notes
=
"聚合接口: 消防系统、监测部件、消防车辆统计信息查询"
)
@RequestMapping
(
value
=
"/stats"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
<
Object
>
stats
()
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
bizOrgCode
=
reginParams
.
getPersonIdentity
().
getCompanyBizOrgCode
();
public
ResponseModel
<
Object
>
stats
(
@RequestParam
(
value
=
"bizOrgCode"
,
required
=
false
)
String
bizOrgCode
)
{
if
(
StringUtils
.
isBlank
(
bizOrgCode
))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
bizOrgCode
=
!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())
&&
StringUtils
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
;
}
FireResourceStatsDTO
fireSystemStats
=
iFireResourceSupervisionService
.
getFireSystemStats
(
bizOrgCode
);
FireResourceStatsDTO
monitorComponentStats
=
iFireResourceSupervisionService
.
getMonitorComponentStats
(
bizOrgCode
);
FireResourceStatsDTO
fireCarStats
=
iFireResourceSupervisionService
.
getFireCarStats
(
bizOrgCode
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
f6125df1
...
...
@@ -56,6 +56,7 @@ import java.io.File;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.net.Inet4Address
;
import
java.net.InetAddress
;
import
java.net.NetworkInterface
;
...
...
@@ -139,10 +140,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Autowired
private
JCSRemoteService
jcsRemoteService
;
@Autowired
private
EquipmentSpecificMapper
equipmentSpecificMapper
;
@Autowired
private
VideoMapper
videoMapper
;
...
...
@@ -2397,7 +2398,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
return
fireFightingSystemMapper
.
getStationStatusStatistics
();
}
@Override
public
void
resetMorphic
()
{
try
{
...
...
@@ -2440,15 +2441,15 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
videoInScene
=
""
.
equals
(
videoInScene
)
?
action
.
getSequenceNbr
().
toString
()
:
videoInScene
+
","
+
action
.
getSequenceNbr
();
}
}
parse
.
setChildren
(
newPointList
);
System
.
out
.
println
(
"parse="
+
JSONObject
.
toJSONString
(
parse
));
resourceDTO
.
setContent
(
JSONObject
.
toJSONString
(
parse
));
System
.
out
.
println
(
"resourceDTO="
+
JSONObject
.
toJSONString
(
resourceDTO
));
FeignUtil
.
remoteCall
(()
->
Morphic
.
morphicSubjectClient
.
update
(
resourceDTO
));
sourceScene
.
setPointInScene
(
pointInScene
);
sourceScene
.
setVideoInScene
(
videoInScene
);
System
.
out
.
println
(
"sourceScene="
+
JSONObject
.
toJSONString
(
sourceScene
));
...
...
@@ -2474,8 +2475,12 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
BigDecimal
redNum
=
new
BigDecimal
(
String
.
valueOf
(
resultMap
.
get
(
"redCode"
)));
BigDecimal
yellowNum
=
new
BigDecimal
(
String
.
valueOf
(
resultMap
.
get
(
"yellowCode"
)));
BigDecimal
errorNum
=
redNum
.
add
(
yellowNum
);
BigDecimal
ratePercent
=
errorNum
.
divide
(
total
,
2
,
BigDecimal
.
ROUND_HALF_UP
);
map
.
put
(
"ratePercent"
,
ratePercent
+
"%"
);
if
(
total
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
map
.
put
(
"ratePercent"
,
"0%"
);
}
else
{
BigDecimal
ratePercent
=
errorNum
.
divide
(
total
,
2
,
RoundingMode
.
HALF_UP
);
map
.
put
(
"ratePercent"
,
ratePercent
.
multiply
(
new
BigDecimal
(
100
))
+
"%"
);
}
return
map
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FireResourceSupervisionController.java
View file @
f6125df1
...
...
@@ -5,11 +5,14 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
com.yeejoin.amos.boot.module.jcs.api.service.IFireResourceSupervisionService
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
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.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -26,9 +29,11 @@ public class FireResourceSupervisionController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"驻站消防员、运维人员统计信息查询"
,
notes
=
"驻站消防员、运维人员统计信息查询"
)
@RequestMapping
(
value
=
"/stats"
,
method
=
RequestMethod
.
GET
)
public
ResponseModel
<
Object
>
stats
()
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
bizOrgCode
=
reginParams
.
getPersonIdentity
().
getCompanyBizOrgCode
();
public
ResponseModel
<
Object
>
stats
(
@RequestParam
(
value
=
"bizOrgCode"
,
required
=
false
)
String
bizOrgCode
)
{
if
(
StringUtils
.
isBlank
(
bizOrgCode
))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
bizOrgCode
=
!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())
&&
StringUtils
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
;
}
Map
<
String
,
Map
<
String
,
Number
>>
personnelStats
=
iFireResourceSupervisionService
.
getPersonnelStats
(
bizOrgCode
);
return
ResponseHelper
.
buildResponse
(
personnelStats
);
}
...
...
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