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
3a74db0a
Commit
3a74db0a
authored
Sep 01, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
parents
a727eb9a
f3b5ff79
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
136 additions
and
88 deletions
+136
-88
PersonBasicMapper.java
.../amos/boot/module/jxiop/api/mapper/PersonBasicMapper.java
+4
-2
PersonBasicMapper.xml
...jxiop-api/src/main/resources/mapper/PersonBasicMapper.xml
+8
-2
PersonQrCodeController.java
...t/module/jxiop/biz/controller/PersonQrCodeController.java
+56
-50
SjglZsjZsbtzMapper.java
...mos/boot/module/jxiop/biz/mapper2/SjglZsjZsbtzMapper.java
+8
-4
PersonBasicServiceImpl.java
...module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
+12
-3
SjglZsjZsbtzMapper.xml
.../src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
+16
-4
PersonBasicServiceImpl.java
...module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
+20
-19
MonitorFanIdxController.java
.../module/jxiop/biz/controller/MonitorFanIdxController.java
+2
-0
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+8
-3
InfluxDButils.java
...ejoin/amos/boot/module/jxiop/biz/utils/InfluxDButils.java
+2
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/mapper/PersonBasicMapper.java
View file @
3a74db0a
...
...
@@ -55,11 +55,13 @@ public interface PersonBasicMapper extends BaseMapper<PersonBasic> {
@Param
(
"size"
)
Integer
size
,
@Param
(
"parentCode"
)
String
parentCode
,
@Param
(
"date"
)
String
date
,
@Param
(
"qrCodeColor"
)
String
qrCodeColor
);
@Param
(
"qrCodeColor"
)
String
qrCodeColor
,
@Param
(
"ne"
)
String
ne
);
Integer
getPersonYardByPageCount
(
@Param
(
"parentCode"
)
String
parentCode
,
@Param
(
"date"
)
String
date
,
@Param
(
"qrCodeColor"
)
String
qrCodeColor
);
@Param
(
"qrCodeColor"
)
String
qrCodeColor
,
@Param
(
"ne"
)
String
ne
);
List
<
StationQrCodeStatistics
>
getPersonStatistics
();
}
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/resources/mapper/PersonBasicMapper.xml
View file @
3a74db0a
...
...
@@ -226,7 +226,10 @@
AND a.rec_date like concat(#{date},'%')
</if>
<if
test=
"qrCodeColor != null and qrCodeColor != ''"
>
AND a.qrcode_color like concat(#{qrCodeColor},'%')
AND a.qrcode_color = #{qrCodeColor}
</if>
<if
test=
"ne != null and ne != ''"
>
AND a.qrcode_color != #{ne}
</if>
</where>
ORDER BY a.rec_date DESC
...
...
@@ -248,7 +251,10 @@
AND a.rec_date like concat(#{date},'%')
</if>
<if
test=
"qrCodeColor != null and qrCodeColor != ''"
>
AND a.qrcode_color like concat(#{qrCodeColor},'%')
AND a.qrcode_color = #{qrCodeColor}
</if>
<if
test=
"ne != null and ne != ''"
>
AND a.qrcode_color != #{ne}
</if>
</where>
</select>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/PersonQrCodeController.java
View file @
3a74db0a
...
...
@@ -107,10 +107,10 @@ public class PersonQrCodeController extends BaseController {
Page
<
Map
<
String
,
Object
>>
resultList
=
new
Page
<>();
if
(
"person"
.
equals
(
dataType
))
{
resultList
=
personBasicServiceImpl
.
getPersonYardByPage
(
parentCode
,
current
,
size
,
date
,
qrCodeColor
);
resultList
=
personBasicServiceImpl
.
getPersonYardByPage
(
parentCode
,
current
,
size
,
date
,
qrCodeColor
,
null
,
null
);
}
else
if
(
"equip"
.
equals
(
dataType
))
{
List
<
Map
<
String
,
Object
>>
equipYardByPage
=
sjglZsjZsbtzMapper
.
getEquipYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
,
date
,
qrCodeColor
);
Integer
equipYardByPageCount
=
sjglZsjZsbtzMapper
.
getEquipYardByPageCount
(
parentCode
,
date
,
qrCodeColor
);
List
<
Map
<
String
,
Object
>>
equipYardByPage
=
sjglZsjZsbtzMapper
.
getEquipYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
,
date
,
qrCodeColor
,
null
);
Integer
equipYardByPageCount
=
sjglZsjZsbtzMapper
.
getEquipYardByPageCount
(
parentCode
,
date
,
qrCodeColor
,
null
);
equipYardByPage
.
forEach
(
item
->
{
String
name
=
QrcodeColorEnum
.
getName
(
String
.
valueOf
(
item
.
get
(
"qrCodeColor"
)));
item
.
put
(
"name"
,
name
);
...
...
@@ -120,8 +120,8 @@ public class PersonQrCodeController extends BaseController {
resultList
.
setSize
(
size
);
resultList
.
setTotal
(
equipYardByPageCount
);
}
else
if
(
"job"
.
equals
(
dataType
))
{
List
<
Map
<
String
,
Object
>>
jobYardByPage
=
sjglZsjZsbtzMapper
.
getJobYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
,
date
,
qrCodeColor
);
Integer
jobYardByPageCount
=
sjglZsjZsbtzMapper
.
getJobYardByPageCount
(
parentCode
,
date
,
qrCodeColor
);
List
<
Map
<
String
,
Object
>>
jobYardByPage
=
sjglZsjZsbtzMapper
.
getJobYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
,
date
,
qrCodeColor
,
null
);
Integer
jobYardByPageCount
=
sjglZsjZsbtzMapper
.
getJobYardByPageCount
(
parentCode
,
date
,
qrCodeColor
,
null
);
jobYardByPage
.
forEach
(
item
->
{
String
name
=
QrcodeColorEnum
.
getName
(
String
.
valueOf
(
item
.
get
(
"qrCodeColor"
)));
item
.
put
(
"name"
,
name
);
...
...
@@ -159,11 +159,11 @@ public class PersonQrCodeController extends BaseController {
String
yellowToGreen
=
result
.
get
(
"yellowToGreen"
).
toString
();
Integer
countAll
=
0
;
if
(
"RYFM"
.
equals
(
dataType
)
||
"person"
.
equals
(
dataType
))
{
countAll
=
personBasicMapper
.
getPersonYardByPageCount
(
parentCode
,
null
,
null
);
countAll
=
personBasicMapper
.
getPersonYardByPageCount
(
parentCode
,
null
,
null
,
null
);
}
else
if
(
"equip"
.
equals
(
dataType
))
{
countAll
=
sjglZsjZsbtzMapper
.
getEquipYardByPageCount
(
parentCode
,
null
,
null
);
countAll
=
sjglZsjZsbtzMapper
.
getEquipYardByPageCount
(
parentCode
,
null
,
null
,
null
);
}
else
if
(
"job"
.
equals
(
dataType
))
{
countAll
=
sjglZsjZsbtzMapper
.
getJobYardByPageCount
(
parentCode
,
null
,
null
);
countAll
=
sjglZsjZsbtzMapper
.
getJobYardByPageCount
(
parentCode
,
null
,
null
,
null
);
}
result
.
put
(
"redToGreenPercent"
,
getPercent
(
new
BigDecimal
(
red
),
new
BigDecimal
(
countAll
)));
result
.
put
(
"redPercent"
,
getPercent
(
new
BigDecimal
(
redToGreen
),
new
BigDecimal
(
countAll
)));
...
...
@@ -263,48 +263,54 @@ public class PersonQrCodeController extends BaseController {
return
ResponseHelper
.
buildResponse
(
map
);
}
//
// @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
// @GetMapping(value = "/getStationDetailInfo")
// @ApiOperation(httpMethod = "GET", value = "评估大屏 - 场站信息查询", notes = "评估大屏 - 场站信息查询")
// public ResponseModel<Map<String, Object>> getStationEquipInfo(@RequestParam(required = true, value = "parentCode") String parentCode,
// @RequestParam(required = false, value = "column") String column) {
// FeignClientResult<Map<String, Object>> sevenEntity = null;
// try {
// sevenEntity = idxFeign.healthIndexData(parentCode, null);
// } catch (Exception e) {
// e.printStackTrace();
// }
// FeignClientResult<Integer> sevenEntityMcb = null;
// try {
// sevenEntityMcb = mcbWarningFeign.getWarningInfoCountByObjectId(parentCode);
// } catch (Exception e) {
// e.printStackTrace();
// }
// String score = "100";
// String gradeColor = "green";
// Integer warningCount = 0;
// if (sevenEntity != null && 200 == sevenEntity.getStatus()) {
// Map<String, Object> result = sevenEntity.getResult();
// score = result.get("score").toString();
// gradeColor = result.get("gradeColor").toString();
// }
// if (sevenEntityMcb != null && 200 == sevenEntityMcb.getStatus()) {
// warningCount = sevenEntityMcb.getResult();
// }
// HashMap<String, Object> map = new HashMap<>();
// map.put("score", score);
// map.put("gradeColor", gradeColor);
// map.put("warningCount", warningCount);
// LambdaQueryWrapper<StationBasic> stationBasicLambdaQueryWrapper = new LambdaQueryWrapper<>();
// stationBasicLambdaQueryWrapper.eq(StationBasic::getProjectOrgCode, parentCode);
// stationBasicLambdaQueryWrapper.last("limit 1");
// StationBasic stationBasic = stationBasicMapper.selectOne(stationBasicLambdaQueryWrapper);
// map.put("stationMasterName", stationBasic.getStationMasterName());
// map.put("mobilePhone", stationBasic.getMobilePhone());
// map.put("recDate", stationBasic.getRecDate());
// return ResponseHelper.buildResponse(map);
// }
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/getStationEquipInfo"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"评估大屏 - 场站二级弹窗API"
,
notes
=
"评估大屏 - 场站二级弹窗API"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getStationEquipInfo
(
@RequestParam
(
value
=
"parentCode"
)
String
parentCode
,
@RequestParam
(
required
=
false
,
value
=
"column"
)
String
column
,
@RequestParam
(
required
=
false
,
value
=
"score"
)
BigDecimal
score
,
@RequestParam
(
value
=
"current"
)
Integer
current
,
@RequestParam
(
value
=
"size"
)
Integer
size
,
@RequestParam
(
required
=
false
,
value
=
"date"
)
String
date
)
{
Page
<
Map
<
String
,
Object
>>
resultList
=
new
Page
<>();
if
(
"V1"
.
equals
(
column
))
{
resultList
=
personBasicServiceImpl
.
getPersonYardByPage
(
parentCode
,
current
,
size
,
date
,
null
,
"green"
,
score
);
}
else
if
(
"S1"
.
equals
(
column
))
{
List
<
Map
<
String
,
Object
>>
equipYardByPage
=
sjglZsjZsbtzMapper
.
getEquipYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
,
date
,
null
,
"green"
);
Integer
equipYardByPageCount
=
sjglZsjZsbtzMapper
.
getEquipYardByPageCount
(
parentCode
,
date
,
null
,
"green"
);
equipYardByPage
.
forEach
(
item
->
{
String
name
=
QrcodeColorEnum
.
getName
(
String
.
valueOf
(
item
.
get
(
"qrCodeColor"
)));
item
.
put
(
"name"
,
name
);
item
.
put
(
"faultInfo"
,
"该存在缺陷或者告警"
);
item
.
put
(
"faultLevel"
,
"严重"
);
if
(!
Objects
.
isNull
(
score
))
{
item
.
put
(
"mark"
,
new
BigDecimal
(
100
).
subtract
(
score
));
}
});
resultList
.
setRecords
(
equipYardByPage
);
resultList
.
setCurrent
(
current
);
resultList
.
setSize
(
size
);
resultList
.
setTotal
(
equipYardByPageCount
);
}
else
if
(
"P1"
.
equals
(
column
))
{
List
<
Map
<
String
,
Object
>>
jobYardByPage
=
sjglZsjZsbtzMapper
.
getJobYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
,
date
,
null
,
"green"
);
Integer
jobYardByPageCount
=
sjglZsjZsbtzMapper
.
getJobYardByPageCount
(
parentCode
,
date
,
null
,
"green"
);
jobYardByPage
.
forEach
(
item
->
{
String
name
=
QrcodeColorEnum
.
getName
(
String
.
valueOf
(
item
.
get
(
"qrCodeColor"
)));
item
.
put
(
"name"
,
name
);
item
.
put
(
"faultInfo"
,
"该任务超时"
);
item
.
put
(
"faultLevel"
,
"严重"
);
if
(!
Objects
.
isNull
(
score
))
{
item
.
put
(
"mark"
,
new
BigDecimal
(
100
).
subtract
(
score
));
}
});
resultList
.
setRecords
(
jobYardByPage
);
resultList
.
setCurrent
(
current
);
resultList
.
setSize
(
size
);
resultList
.
setTotal
(
jobYardByPageCount
);
}
return
ResponseHelper
.
buildResponse
(
resultList
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/SjglZsjZsbtzMapper.java
View file @
3a74db0a
...
...
@@ -56,14 +56,16 @@ public interface SjglZsjZsbtzMapper extends BaseMapper<SjglZsjZsbtz> {
@Param
(
"size"
)
Integer
size
,
@Param
(
"parentCode"
)
String
parentCode
,
@Param
(
"date"
)
String
date
,
@Param
(
"qrCodeColor"
)
String
qrCodeColor
);
@Param
(
"qrCodeColor"
)
String
qrCodeColor
,
@Param
(
"ne"
)
String
ne
);
/**
* 设备赋码列表
*/
Integer
getEquipYardByPageCount
(
@Param
(
"parentCode"
)
String
parentCode
,
@Param
(
"date"
)
String
date
,
@Param
(
"qrCodeColor"
)
String
qrCodeColor
);
@Param
(
"qrCodeColor"
)
String
qrCodeColor
,
@Param
(
"ne"
)
String
ne
);
...
...
@@ -75,12 +77,14 @@ public interface SjglZsjZsbtzMapper extends BaseMapper<SjglZsjZsbtz> {
@Param
(
"size"
)
Integer
size
,
@Param
(
"parentCode"
)
String
parentCode
,
@Param
(
"date"
)
String
date
,
@Param
(
"qrCodeColor"
)
String
qrCodeColor
);
@Param
(
"qrCodeColor"
)
String
qrCodeColor
,
@Param
(
"ne"
)
String
ne
);
/**
* 任务赋码列表数量统计
*/
Integer
getJobYardByPageCount
(
@Param
(
"parentCode"
)
String
parentCode
,
@Param
(
"date"
)
String
date
,
@Param
(
"qrCodeColor"
)
String
qrCodeColor
);
@Param
(
"qrCodeColor"
)
String
qrCodeColor
,
@Param
(
"ne"
)
String
ne
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
View file @
3a74db0a
...
...
@@ -22,9 +22,11 @@ import org.springframework.stereotype.Service;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -115,13 +117,20 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
Integer
current
,
Integer
size
,
String
date
,
String
qrCodeColor
)
{
List
<
Map
<
String
,
Object
>>
resultList
=
personBasicMapper
.
getPersonYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
,
date
,
qrCodeColor
);
Integer
count
=
personBasicMapper
.
getPersonYardByPageCount
(
parentCode
,
date
,
qrCodeColor
);
String
qrCodeColor
,
String
ne
,
BigDecimal
score
)
{
List
<
Map
<
String
,
Object
>>
resultList
=
personBasicMapper
.
getPersonYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
,
date
,
qrCodeColor
,
ne
);
Integer
count
=
personBasicMapper
.
getPersonYardByPageCount
(
parentCode
,
date
,
qrCodeColor
,
ne
);
resultList
.
forEach
(
item
->
{
String
name
=
QrcodeColorEnum
.
getName
(
String
.
valueOf
(
item
.
get
(
"qrCodeColor"
)));
item
.
put
(
"name"
,
name
);
item
.
put
(
"faultInfo"
,
"证书不全或临期"
);
item
.
put
(
"faultLevel"
,
"严重"
);
if
(!
Objects
.
isNull
(
score
))
{
item
.
put
(
"mark"
,
new
BigDecimal
(
100
).
subtract
(
score
));
}
});
Page
<
Map
<
String
,
Object
>>
mapPage
=
new
Page
<>();
mapPage
.
setRecords
(
resultList
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
View file @
3a74db0a
...
...
@@ -114,7 +114,10 @@
AND a.UPDATE_TIME like concat(#{date},'%')
</if>
<if
test=
"qrCodeColor != null and qrCodeColor != ''"
>
AND a.QRCODE_COLOR like concat(#{qrCodeColor},'%')
AND a.QRCODE_COLOR = #{qrCodeColor}
</if>
<if
test=
"ne != null and ne != ''"
>
AND a.QRCODE_COLOR != #{ne}
</if>
</where>
ORDER BY a.CREATE_TIME DESC
...
...
@@ -135,7 +138,10 @@
AND a.UPDATE_TIME like concat(#{date},'%')
</if>
<if
test=
"qrCodeColor != null and qrCodeColor != ''"
>
AND a.QRCODE_COLOR like concat(#{qrCodeColor},'%')
AND a.QRCODE_COLOR = #{qrCodeColor}
</if>
<if
test=
"ne != null and ne != ''"
>
AND a.QRCODE_COLOR != #{ne}
</if>
</where>
</select>
...
...
@@ -157,7 +163,10 @@
AND a.CREATE_TIME like concat(#{date},'%')
</if>
<if
test=
"qrCodeColor != null and qrCodeColor != ''"
>
AND a.QRCODE_COLOR like concat(#{qrCodeColor},'%')
AND a.QRCODE_COLOR = #{qrCodeColor}
</if>
<if
test=
"ne != null and ne != ''"
>
AND a.QRCODE_COLOR != #{ne}
</if>
</where>
ORDER BY a.CREATE_TIME DESC
...
...
@@ -178,7 +187,10 @@
AND a.CREATE_TIME like concat(#{date},'%')
</if>
<if
test=
"qrCodeColor != null and qrCodeColor != ''"
>
AND a.QRCODE_COLOR like concat(#{qrCodeColor},'%')
AND a.QRCODE_COLOR = #{qrCodeColor}
</if>
<if
test=
"ne != null and ne != ''"
>
AND a.QRCODE_COLOR != #{ne}
</if>
</where>
</select>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
View file @
3a74db0a
...
...
@@ -715,23 +715,23 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
}
public
Page
<
Map
<
String
,
Object
>>
getPersonYardByPage
(
String
parentCode
,
Integer
current
,
Integer
size
,
String
date
,
String
qrCodeColor
)
{
List
<
Map
<
String
,
Object
>>
resultList
=
personBasicMapper
.
getPersonYardByPage
((
current
-
1
)
*
size
,
size
,
parentCode
,
date
,
qrCodeColor
);
Integer
count
=
personBasicMapper
.
getPersonYardByPageCount
(
parentCode
,
date
,
qrCodeColor
);
resultList
.
forEach
(
item
->
{
String
name
=
QrcodeColorEnum
.
getName
(
String
.
valueOf
(
item
.
get
(
"qrCodeColor"
)));
item
.
put
(
"name"
,
name
);
});
Page
<
Map
<
String
,
Object
>>
mapPage
=
new
Page
<>();
mapPage
.
setRecords
(
resultList
);
mapPage
.
setCurrent
(
current
);
mapPage
.
setSize
(
size
);
mapPage
.
setTotal
(
count
);
return
mapPage
;
}
//
public Page<Map<String, Object>> getPersonYardByPage(String parentCode,
//
Integer current,
//
Integer size,
//
String date,
//
String qrCodeColor) {
//
List<Map<String, Object>> resultList = personBasicMapper.getPersonYardByPage((current - 1) * size, size , parentCode, date, qrCodeColor);
//
Integer count = personBasicMapper.getPersonYardByPageCount(parentCode, date, qrCodeColor);
//
//
resultList.forEach(item -> {
//
String name = QrcodeColorEnum.getName(String.valueOf(item.get("qrCodeColor")));
//
item.put("name", name);
//
});
//
Page<Map<String, Object>> mapPage = new Page<>();
//
mapPage.setRecords(resultList);
//
mapPage.setCurrent(current);
//
mapPage.setSize(size);
//
mapPage.setTotal(count);
//
return mapPage;
//
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitorFanIdxController.java
View file @
3a74db0a
...
...
@@ -125,6 +125,8 @@ public class MonitorFanIdxController extends BaseController {
IndexDto
indexDto
=
indexDtoList
.
get
(
i
-
1
);
hashMap
.
put
(
"url"
+
i
,
fanStatusImagePathPrefix
+
"/"
+
"风机-"
+
indexDto
.
getState
()+
".gif"
);
hashMap
.
put
(
"name"
+
i
,
prefix
+
indexDto
.
getEquipmentNumber
());
//用于参数传递
hashMap
.
put
(
"name"
+
i
+
'd'
,
indexDto
.
getEquipmentNumber
());
}
page
.
setTotal
(
10
);
page
.
setSize
(
10
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
3a74db0a
...
...
@@ -934,6 +934,8 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
if
(
Integer
.
parseInt
(
num
)
==
Integer
.
parseInt
(
listDatum
.
getEquipmentNumber
()))
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"title"
,
prefix
+
listDatum
.
getEquipmentNumber
());
//用于参数传递
map
.
put
(
"title1"
,
listDatum
.
getEquipmentNumber
());
map
.
put
(
"windSpeed"
,
listDatum
.
getValue
());
map
.
put
(
"power"
,
listDatum
.
getValueLabel
());
//获取风机状态如果获取到的状态为空-则默认为正常运行状态
...
...
@@ -984,7 +986,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
windSqlList
.
add
(
item
);
}
if
(
"有功功率"
.
equals
(
item
.
getEquipmentIndexName
()))
{
item
.
setValue
(
String
.
format
(
"%.2f"
,
Double
.
parseDouble
(
item
.
getValue
())
/
1000
));
if
(!
ObjectUtils
.
isEmpty
(
item
.
getValue
()))
{
item
.
setValue
(
String
.
format
(
"%.2f"
,
Double
.
parseDouble
(
item
.
getValue
())
/
1000
));
}
powerSqlList
.
add
(
item
);
}
if
(
"瞬时风速"
.
equals
(
item
.
getEquipmentIndexName
()))
{
...
...
@@ -1001,10 +1005,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
windSqlList
.
forEach
(
item
->
{
HashMap
<
String
,
String
>
stringStringHashMap
=
new
HashMap
<>();
stringStringHashMap
.
put
(
"equipmentNumber"
,
item
.
getEquipmentNumber
());
stringStringHashMap
.
put
(
"wind"
,
item
.
getValue
());
stringStringHashMap
.
put
(
"wind"
,
ObjectUtils
.
isEmpty
(
item
.
getValue
())?
"0.0"
:
item
.
getValue
());
stringStringHashMap
.
put
(
"power"
,
powerSqlMap
.
get
(
item
.
getEquipmentNumber
()));
stringStringHashMap
.
put
(
"windSpeed"
,
windSpeedSqlMap
.
get
(
item
.
getEquipmentNumber
()));
stringStringHashMap
.
put
(
"electricity"
,
String
.
format
(
"%.4f"
,
Double
.
valueOf
(
electricitySqlMap
.
get
(
item
.
getEquipmentNumber
()))));
stringStringHashMap
.
put
(
"electricity"
,
String
.
format
(
"%.4f"
,
ObjectUtils
.
isEmpty
(
item
.
getEquipmentNumber
())?
0.0000
:
Double
.
valueOf
(
electricitySqlMap
.
get
(
item
.
getEquipmentNumber
()
))));
resultList
.
add
(
stringStringHashMap
);
});
//构建平台数据
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/utils/InfluxDButils.java
View file @
3a74db0a
...
...
@@ -47,6 +47,7 @@ public class InfluxDButils {
if
(
"time"
.
equals
(
k
))
{
continue
;
}
else
{
v
=
String
.
valueOf
(
v
).
equals
(
""
)?
0.0
:
v
;
bean
.
setPropertyValue
(
k
,
v
);
}
}
...
...
@@ -90,7 +91,7 @@ public class InfluxDButils {
for
(
int
j
=
0
;
j
<
columns
.
size
();
++
j
)
{
String
k
=
columns
.
get
(
j
);
Object
v
=
values
.
get
(
i
).
get
(
j
);
v
=
String
.
valueOf
(
v
).
equals
(
""
)?
0.0
:
v
;
bean
.
setPropertyValue
(
k
,
v
);
}
...
...
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