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
d1151752
Commit
d1151752
authored
Dec 10, 2024
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
巡检列表按照时间和特高压排序
parent
d8275d42
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
4 deletions
+55
-4
SignMapper.java
...m/yeejoin/amos/boot/module/jcs/api/mapper/SignMapper.java
+2
-0
SignMapper.xml
...t-module-jcs-api/src/main/resources/mapper/SignMapper.xml
+11
-0
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+2
-0
BigScreenController.java
...s/boot/module/jcs/biz/controller/BigScreenController.java
+17
-0
JcsFeignClient.java
...om/yeejoin/amos/patrol/business/feign/JcsFeignClient.java
+3
-0
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+20
-4
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/SignMapper.java
View file @
d1151752
...
...
@@ -49,4 +49,6 @@ public interface SignMapper extends BaseMapper<Sign> {
@Param
(
"sortField"
)
String
sortField
,
@Param
(
"sortOrder"
)
String
sortOrder
);
List
<
Map
<
String
,
String
>>
getStationTypeList
();
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/SignMapper.xml
View file @
d1151752
...
...
@@ -237,4 +237,15 @@
signNum DESC
</if>
</select>
<select
id=
"getStationTypeList"
resultType=
"java.util.Map"
>
SELECT
`name`,
`code`,
`id`,
`station_type` AS stationType,
`biz_org_code` as bizOrgCode
FROM
idx_biz_station_info
</select>
</mapper>
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
d1151752
...
...
@@ -1624,6 +1624,8 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
BizMessage
bizMessage
=
new
BizMessage
();
bizMessage
.
setIndexKey
(
indexKey
);
bizMessage
.
setIndexValue
(
String
.
valueOf
(
divide
));
String
message
=
"当前值为%s,%s报警阈值≥10%"
;
// String.format(message, nowValue, );
RiskBizInfoVo
riskBizInfoVo
=
fetchData
(
equipmentSpecificIndex
,
extra
,
source
,
"当前值低于或高于报警阈值≥10%"
);
riskBizInfoVo
.
setWarningObjectCode
(
businessId
);
riskBizInfoVo
.
getDynamicDetails
().
get
(
0
).
setTabContent
(
tableContentVos
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/BigScreenController.java
View file @
d1151752
...
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.amos.boot.module.common.api.core.framework.PersonIdentify
;
import
com.yeejoin.amos.boot.module.common.api.service.IFirefightersService
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.SignMapper
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
...
...
@@ -36,6 +37,9 @@ public class BigScreenController extends BaseController {
private
IFirefightersService
iFirefightersService
;
@Autowired
SignMapper
signMapper
;
@Autowired
private
RedisUtils
redisUtils
;
@GetMapping
(
value
=
"/getFireForceInfoByCode"
)
...
...
@@ -89,4 +93,17 @@ public class BigScreenController extends BaseController {
}
return
CommonResponseUtil
.
success
(
iFirefightersService
.
signPersonPageList
(
current
,
size
,
bizOrgCode
));
}
/**
* 今日打卡驻站消防队员列表清单--分页【运维概览 页面用】
*
* @return ResponseModel
*/
@PersonIdentify
@GetMapping
(
value
=
"/getStationTypeList"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取换流站信息 - 特高压和常规"
,
notes
=
"获取换流站信息 - 特高压和常规"
)
public
ResponseModel
getStationTypeList
()
{
return
CommonResponseUtil
.
success
(
signMapper
.
getStationTypeList
());
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/feign/JcsFeignClient.java
View file @
d1151752
...
...
@@ -74,5 +74,8 @@ public interface JcsFeignClient {
@GetMapping
(
value
=
"/org-person/listCompany/{bizOrgCode}"
)
Object
listCompany
(
@PathVariable
(
value
=
"bizOrgCode"
)
String
bizOrgCode
)
;
@GetMapping
(
value
=
"/bigScreen/getStationTypeList"
)
FeignClientResult
<
List
<
Map
<
String
,
String
>>>
getStationTypeList
();
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanTaskServiceImpl.java
View file @
d1151752
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.patrol.business.service.impl;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
...
...
@@ -2194,9 +2195,6 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
@Override
public
Page
<
HashMap
<
String
,
Object
>>
getPatrolRecordPage
(
Integer
pageNumber
,
Integer
pageSize
,
String
bizOrgCode
,
String
patrolStatus
,
String
missStatus
,
String
date
,
String
sorter
)
{
if
(
StrUtil
.
isEmpty
(
sorter
))
{
sorter
=
"patrolStatus@ascend"
;
}
if
(
StringUtils
.
isEmpty
(
date
))
{
date
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
new
Date
());
}
...
...
@@ -2204,6 +2202,20 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
if
(
response
.
getStatus
()
!=
200
)
{
throw
new
RuntimeException
(
"获取idx服务异常"
);
}
if
(
StringUtils
.
isEmpty
(
date
))
{
date
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
new
Date
());
}
FeignClientResult
<
List
<
Map
<
String
,
String
>>>
jcsResponse
=
jcsFeignClient
.
getStationTypeList
();
if
(
jcsResponse
.
getStatus
()
!=
200
)
{
throw
new
RuntimeException
(
"获取jcs服务异常"
);
}
List
<
Map
<
String
,
String
>>
jcsStations
=
jcsResponse
.
getResult
();
Map
<
String
,
String
>
stationTypeMap
=
new
HashMap
<>();
if
(
CollUtil
.
isNotEmpty
(
jcsStations
))
{
stationTypeMap
=
jcsStations
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
t
.
get
(
"bizOrgCode"
),
t
->
t
.
get
(
"stationType"
)));
}
List
<
Map
<
String
,
Object
>>
stations
=
response
.
getResult
();
List
<
HashMap
<
String
,
Object
>>
records
=
new
ArrayList
<>();
...
...
@@ -2233,12 +2245,14 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
String
realEndTime
=
queryMap
.
getOrDefault
(
"realEndTime"
,
cn
.
hutool
.
core
.
date
.
DateUtil
.
now
()).
toString
();
long
minutesBetween
=
this
.
getMinutesBetween
(
realStartTime
,
realEndTime
);
queryMap
.
put
(
"totalTime"
,
minutesBetween
);
queryMap
.
put
(
"stationType"
,
ObjectUtil
.
isNotEmpty
(
stationTypeMap
)
?
stationTypeMap
.
getOrDefault
(
queryMap
.
get
(
"bizOrgCode"
).
toString
(),
"常规"
)
:
"常规"
);
records
.
add
(
queryMap
);
}
}
else
{
HashMap
<
String
,
Object
>
record
=
new
HashMap
<>();
record
.
put
(
"bizOrgCode"
,
station
.
get
(
"bizOrgCode"
));
record
.
put
(
"bizOrgName"
,
station
.
get
(
"bizOrgName"
));
record
.
put
(
"stationType"
,
ObjectUtil
.
isNotEmpty
(
stationTypeMap
)
?
stationTypeMap
.
getOrDefault
(
station
.
get
(
"bizOrgCode"
).
toString
(),
"常规"
)
:
"常规"
);
record
.
put
(
"time"
,
date
);
record
.
put
(
"beginTime"
,
'-'
);
record
.
put
(
"endTime"
,
'-'
);
...
...
@@ -2278,7 +2292,9 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
records
.
sort
(
Comparator
.
comparing
(
o
->
((
Map
)
o
).
get
(
sortField
).
toString
()).
reversed
());
}
}
else
{
records
.
sort
(
Comparator
.
comparing
(
o
->
((
Map
)
o
).
get
(
"time"
).
toString
()).
reversed
());
records
.
sort
(
Comparator
.
comparing
(
o
->
((
Map
)
o
).
get
(
"beginTime"
).
toString
())
.
thenComparing
(
o
->
((
Map
)
o
).
get
(
"stationType"
).
toString
()).
reversed
());
}
int
startIndex
=
(
pageNumber
-
1
)
*
pageSize
;
int
size
=
Math
.
min
(
pageSize
,
records
.
size
());
...
...
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