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
0513130d
Commit
0513130d
authored
Dec 15, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小数位保留、飞书文档bug修改
parent
1c51f231
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
40 additions
and
22 deletions
+40
-22
IdxBizFanHealthIndexController.java
.../jxiop/biz/controller/IdxBizFanHealthIndexController.java
+5
-3
IdxBizPvHealthIndexController.java
...e/jxiop/biz/controller/IdxBizPvHealthIndexController.java
+5
-3
KafkaAnalyseController.java
...t/module/jxiop/biz/controller/KafkaAnalyseController.java
+4
-2
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+1
-1
IdxBizFanHealthIndexServiceImpl.java
...iop/biz/service/impl/IdxBizFanHealthIndexServiceImpl.java
+4
-2
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+6
-5
PersonBasicMapper.xml
...jxiop-api/src/main/resources/mapper/PersonBasicMapper.xml
+5
-2
SjglZsjZsbtzMapper.xml
.../src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
+10
-4
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizFanHealthIndexController.java
View file @
0513130d
...
...
@@ -68,6 +68,8 @@ public class IdxBizFanHealthIndexController extends BaseController {
@Autowired
FanWaringRecordMapper
fanWarningRecord
;
public
final
DecimalFormat
df
=
new
DecimalFormat
(
"#.0"
);
public
final
DecimalFormat
dfSS
=
new
DecimalFormat
(
"#.00"
);
/**
* 新增
*
...
...
@@ -763,7 +765,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
if
(
type
.
equals
(
"0"
)){
seriesData
.
add
(
Double
.
parseDouble
(
df
.
format
(
obj
.
getHealthIndex
())));
}
else
{
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
obj
.
getAnomaly
(
));
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
dfSS
.
format
(
obj
.
getAnomaly
()
));
}
axisData
.
add
(
obj
.
getAnalysisTime
());
}
...
...
@@ -784,7 +786,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
if
(
type
.
equals
(
"0"
)){
seriesData
.
add
(
Double
.
parseDouble
(
df
.
format
(
obj
.
getHealthIndex
())));
}
else
{
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
obj
.
getAnomaly
(
));
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
dfSS
.
format
(
obj
.
getAnomaly
()
));
}
axisData
.
add
(
obj
.
getAnalysisTime
());
}
...
...
@@ -806,7 +808,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
if
(
type
.
equals
(
"0"
)){
seriesData
.
add
(
Double
.
parseDouble
(
df
.
format
(
obj
.
getHealthIndex
())));
}
else
{
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
obj
.
getAnomaly
(
));
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
dfSS
.
format
(
obj
.
getAnomaly
()
));
}
axisData
.
add
(
obj
.
getAnalysisTime
());
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizPvHealthIndexController.java
View file @
0513130d
...
...
@@ -57,6 +57,8 @@ public class IdxBizPvHealthIndexController extends BaseController {
IdxBizPvPointProcessVariableClassificationMapper
idxBizPvPointProcessVariableClassificationMapper
;
public
final
DecimalFormat
df
=
new
DecimalFormat
(
"0.0"
);
public
final
DecimalFormat
dfSS
=
new
DecimalFormat
(
"0.00"
);
/**
* 新增
*
...
...
@@ -430,7 +432,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
if
(
type
.
equals
(
"0"
)){
seriesData
.
add
(
Double
.
parseDouble
(
df
.
format
(
obj
.
getHealthIndex
())));
}
else
{
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
obj
.
getAnomaly
(
));
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
dfSS
.
format
(
obj
.
getAnomaly
()
));
}
axisData
.
add
(
obj
.
getAnalysisTime
());
}
...
...
@@ -451,7 +453,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
if
(
type
.
equals
(
"0"
)){
seriesData
.
add
(
Double
.
parseDouble
(
df
.
format
(
obj
.
getHealthIndex
())));
}
else
{
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
obj
.
getAnomaly
(
));
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
dfSS
.
format
(
obj
.
getAnomaly
()
));
}
axisData
.
add
(
obj
.
getAnalysisTime
());
}
...
...
@@ -476,7 +478,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
if
(
type
.
equals
(
"0"
)){
seriesData
.
add
(
Double
.
parseDouble
(
df
.
format
(
obj
.
getHealthIndex
())));
}
else
{
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
obj
.
getAnomaly
(
));
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
dfSS
.
format
(
obj
.
getAnomaly
()
));
}
Date
format
=
null
;
try
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/KafkaAnalyseController.java
View file @
0513130d
...
...
@@ -23,6 +23,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.text.DecimalFormat
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -155,6 +156,7 @@ public class KafkaAnalyseController {
return
ResponseHelper
.
buildResponse
(
indicatorData
);
}
public
final
DecimalFormat
df
=
new
DecimalFormat
(
"0.0"
);
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"全景诊断回溯"
)
...
...
@@ -192,7 +194,7 @@ public class KafkaAnalyseController {
int
subSystemInt
=
1
;
Double
healthScoreInfo
=
idxBizFanHealthIndexMapper
.
getHealthScoreInfoByParam
(
null
,
null
,
analysisType
).
doubleValue
();
healthScoreInfo
=
Double
.
parseDouble
(
df
.
format
(
healthScoreInfo
));
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
query
.
isNull
(
IdxBizFanHealthLevel:
:
getStatus
);
query
.
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"全域"
);
...
...
@@ -216,7 +218,7 @@ public class KafkaAnalyseController {
Double
areaHighScore
=
null
;
Double
areaHealthScoreInfo
=
idxBizFanHealthIndexMapper
.
getHealthScoreInfoByParam
(
areaMap
.
getKey
(),
null
,
analysisType
).
doubleValue
();
areaHealthScoreInfo
=
Double
.
parseDouble
(
df
.
format
(
areaHealthScoreInfo
));
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>
areaQuery
=
new
LambdaQueryWrapper
<>();
areaQuery
.
isNull
(
IdxBizFanHealthLevel:
:
getStatus
);
areaQuery
.
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"片区"
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
View file @
0513130d
...
...
@@ -161,7 +161,7 @@ public class CommonServiceImpl {
@Autowired
private
TdengineTimeServiceImpl
tdengineTimeService
;
public
final
DecimalFormat
df
=
new
DecimalFormat
(
"#.0"
);
public
final
DecimalFormat
df
=
new
DecimalFormat
(
"#.0
0
"
);
/**
* @return
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/IdxBizFanHealthIndexServiceImpl.java
View file @
0513130d
...
...
@@ -13,6 +13,8 @@ import com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.text.DecimalFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
...
...
@@ -69,7 +71,7 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
}
public
final
DecimalFormat
dfSS
=
new
DecimalFormat
(
"0.00"
);
public
Object
getqyt
(
String
type
,
String
address
,
String
statioName
,
String
equipmentName
,
String
arae
,
String
startTime
,
String
endTime
){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
...
@@ -120,7 +122,7 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
List
<
String
>
axisData
=
new
ArrayList
<>();
List
<
String
>
activePowers
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
indicatorDataListActivePowers
.
size
();
i
++)
{
activePowers
.
add
(
indicatorDataListActivePowers
.
get
(
i
).
getValue
(
));
activePowers
.
add
(
dfSS
.
format
(
indicatorDataListActivePowers
.
get
(
i
).
getValue
()
));
axisData
.
add
(
DateUtil
.
format
(
indicatorDataListActivePowers
.
get
(
i
).
getCreatedTime
(),
"yyyy-MM-dd HH:mm:ss"
));
}
// List<Map<String, Object>> seriesData = new ArrayList<>();
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
0513130d
...
...
@@ -51,7 +51,7 @@
</select>
<select
id=
"getHealthScoreInfoByParam"
resultType=
"java.math.BigDecimal"
>
SELECT
CEILING(avg( a.avgHealthIndex )
) AS healthIndex
avg( a.avgHealthIndex
) AS healthIndex
FROM
(
SELECT
...
...
@@ -1302,7 +1302,7 @@
</select>
<select
id=
"getStationIndexInfoByParam"
resultType=
"java.util.Map"
>
SELECT a.STATION AS station,
ROUND(avg(a.avgHealthIndex),
2
) AS healthIndex
ROUND(avg(a.avgHealthIndex),
1
) AS healthIndex
FROM (
SELECT IFNULL(AVG(HEALTH_INDEX), 100) AS avgHealthIndex,
STATION AS STATION
...
...
@@ -1350,7 +1350,7 @@
</select>
<select
id=
"getEquipmentIndexInfoByParam"
resultType=
"java.util.Map"
>
SELECT a.equipmentName AS equipmentName,
ROUND(avg(a.avgHealthIndex),
2
) AS healthIndex
ROUND(avg(a.avgHealthIndex),
1
) AS healthIndex
FROM (
SELECT IFNULL(AVG(HEALTH_INDEX), 100) AS avgHealthIndex,
EQUIPMENT_NAME AS equipmentName
...
...
@@ -1401,7 +1401,7 @@
</select>
<select
id=
"getSubSystemIndexInfoByParam"
resultType=
"java.util.Map"
>
SELECT a.subSystem AS subSystem,
ROUND(avg(a.avgHealthIndex),
2
) AS healthIndex
ROUND(avg(a.avgHealthIndex),
1
) AS healthIndex
FROM (
SELECT IFNULL(AVG(HEALTH_INDEX), 100) AS avgHealthIndex,
SUB_SYSTEM AS subSystem
...
...
@@ -1451,7 +1451,8 @@
a.subSystem
</select>
<select
id=
"getPointNameIndexInfoByParam"
resultType=
"java.util.Map"
>
SELECT IFNULL(HEALTH_INDEX, 100) AS healthIndex,
SELECT
ROUND(IFNULL(HEALTH_INDEX, 100), 1) AS healthIndex,
concat(STATION, '_', INDEX_ADDRESS) as gatewayIndexAddress
FROM fan_health_index_latest_data
<where>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/resources/mapper/PersonBasicMapper.xml
View file @
0513130d
...
...
@@ -217,7 +217,10 @@
ifnull(c.station_name, '') AS stationName,
ifnull(a.rec_date, '') as recDate,
a.sequence_nbr as objectId,
b.project_name as unitName
b.project_name as unitName,
case when a.qrcode_color = 'red' then 1
when a.qrcode_color = 'yellow' then 2
else 3 end as sort
FROM
person_basic a
INNER JOIN station_basic c ON a.project_org_code = c.project_org_code
...
...
@@ -237,7 +240,7 @@
AND a.qrcode_color != #{ne}
</if>
</where>
ORDER BY a.rec_date DESC
ORDER BY
sort asc,
a.rec_date DESC
limit #{current},#{size}
</select>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
View file @
0513130d
...
...
@@ -102,7 +102,10 @@
ifnull(a.QRCODE_COLOR, '') AS qrCodeColor,
ifnull(b.COMPANY_NAME, '') AS stationName,
ifnull(a.UPDATE_STAMP, '') as recDate,
a.SBBM as objectId
a.SBBM as objectId,
(case when a.QRCODE_COLOR = 'red' then 1
when a.QRCODE_COLOR = 'yellow' then 2
else 3 end) as sort
FROM
sjgl_zsj_zsbtz a
INNER JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
...
...
@@ -120,7 +123,7 @@
AND a.QRCODE_COLOR != #{ne}
</if>
</where>
ORDER BY a.UPDATE_STAMP DESC
ORDER BY
sort asc,
a.UPDATE_STAMP DESC
limit #{current},#{size}
</select>
...
...
@@ -153,7 +156,10 @@
ifnull(b.COMPANY_NAME, '') AS stationName,
ifnull(a.CREATE_TIME, '') as recDate,
a.DBID AS objectId,
c.SBBM as jobId
c.SBBM as jobId,
case when a.QRCODE_COLOR = 'red' then 1
when a.QRCODE_COLOR = 'yellow' then 2
else 3 end as sort
FROM
fdgl_job_main a
INNER JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
...
...
@@ -172,7 +178,7 @@
AND a.QRCODE_COLOR != #{ne}
</if>
</where>
ORDER BY a.CREATE_TIME DESC
ORDER BY
sort asc,
a.CREATE_TIME DESC
limit #{current},#{size}
</select>
...
...
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