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
eae12f78
Commit
eae12f78
authored
Oct 20, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测点运行曲线
parent
988aaede
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
25 deletions
+46
-25
IdxBizFanHealthIndexController.java
.../jxiop/biz/controller/IdxBizFanHealthIndexController.java
+2
-1
IdxBizFanHealthIndexServiceImpl.java
...iop/biz/service/impl/IdxBizFanHealthIndexServiceImpl.java
+43
-23
IndicatorDataMapper.java
...s/boot/module/jxiop/biz/tdmapper/IndicatorDataMapper.java
+1
-1
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 @
eae12f78
...
@@ -139,6 +139,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -139,6 +139,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"测点运行趋势图"
,
notes
=
"测点运行趋势图"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"测点运行趋势图"
,
notes
=
"测点运行趋势图"
)
@GetMapping
(
value
=
"/getqyt"
)
@GetMapping
(
value
=
"/getqyt"
)
public
ResponseModel
<
Object
>
getqyt
(
public
ResponseModel
<
Object
>
getqyt
(
int
type
,
String
address
,
String
address
,
String
statioName
,
String
statioName
,
String
equipmentName
,
String
equipmentName
,
...
@@ -147,6 +148,6 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -147,6 +148,6 @@ public class IdxBizFanHealthIndexController extends BaseController {
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
endTime
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
endTime
)
{
)
{
return
ResponseHelper
.
buildResponse
(
idxBizFanHealthIndexServiceImpl
.
getqyt
(
address
,
statioName
,
equipmentName
,
arae
,
startTime
,
endTime
));
return
ResponseHelper
.
buildResponse
(
idxBizFanHealthIndexServiceImpl
.
getqyt
(
type
,
address
,
statioName
,
equipmentName
,
arae
,
startTime
,
endTime
));
}
}
}
}
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 @
eae12f78
...
@@ -5,10 +5,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -5,10 +5,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanHealthIndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanHealthIndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthIndex
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.*
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizUxfv
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IndicatorData
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanPointProcessVariableClassificationMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvPointProcessVariableClassificationMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizUxfvMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizUxfvMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IIdxBizFanHealthIndexService
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IIdxBizFanHealthIndexService
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper
;
...
@@ -31,7 +31,10 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
...
@@ -31,7 +31,10 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
@Autowired
@Autowired
IdxBizUxfvMapper
idxBizUxfvMapper
;
IdxBizPvPointProcessVariableClassificationMapper
idxBizPvPointProcessVariableClassificationMapper
;
@Autowired
IdxBizFanPointProcessVariableClassificationMapper
idxBizFanPointProcessVariableClassificationMapper
;
@Autowired
@Autowired
IndicatorDataMapper
indicatorDataMapper
;
IndicatorDataMapper
indicatorDataMapper
;
/**
/**
...
@@ -63,18 +66,31 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
...
@@ -63,18 +66,31 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
public
Object
getqyt
(
String
address
,
String
statioName
,
String
equipmentName
,
String
arae
,
String
startTime
,
String
endTime
){
public
Object
getqyt
(
int
type
,
String
address
,
String
statioName
,
String
equipmentName
,
String
arae
,
String
startTime
,
String
endTime
){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
try
{
//获取场站网关
//获取场站网关
IdxBizUxfv
idxBizUxfv
=
idxBizUxfvMapper
.
selectOne
(
String
tdid
=
null
;
new
QueryWrapper
<
IdxBizUxfv
>()
if
(
type
==
1
){
.
eq
(
"INDEX_ADDRESS"
,
address
)
IdxBizPvPointProcessVariableClassification
idxBizPvPointProcessVariableClassification
=
idxBizPvPointProcessVariableClassificationMapper
.
selectOne
(
.
eq
(
"STATION"
,
statioName
)
new
QueryWrapper
<
IdxBizPvPointProcessVariableClassification
>()
.
eq
(
"EQUIPMENT_NAME"
,
equipmentName
)
.
eq
(
"INDEX_ADDRESS"
,
address
)
.
eq
(
"ARAE"
,
arae
)
.
eq
(
"STATION"
,
statioName
)
);
.
eq
(
"EQUIPMENT_NAME"
,
equipmentName
)
.
eq
(
"ARAE"
,
arae
)
String
tdid
=
address
+
"_"
+
idxBizUxfv
.
getGatewayId
();
);
tdid
=
address
+
"_"
+
idxBizPvPointProcessVariableClassification
.
getGatewayId
();
}
else
{
IdxBizFanPointProcessVariableClassification
idxBizFanPointProcessVariableClassification
=
idxBizFanPointProcessVariableClassificationMapper
.
selectOne
(
new
QueryWrapper
<
IdxBizFanPointProcessVariableClassification
>()
.
eq
(
"INDEX_ADDRESS"
,
address
)
.
eq
(
"STATION"
,
statioName
)
.
eq
(
"EQUIPMENT_NAME"
,
equipmentName
)
.
eq
(
"ARAE"
,
arae
)
);
tdid
=
address
+
"_"
+
idxBizFanPointProcessVariableClassification
.
getGatewayId
();
}
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd'T'HH:mm:ss'Z'"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd'T'HH:mm:ss'Z'"
);
Calendar
calendar
=
Calendar
.
getInstance
(
TimeZone
.
getTimeZone
(
"UTC"
));
Calendar
calendar
=
Calendar
.
getInstance
(
TimeZone
.
getTimeZone
(
"UTC"
));
sdf
.
setTimeZone
(
TimeZone
.
getTimeZone
(
"UTC"
));
sdf
.
setTimeZone
(
TimeZone
.
getTimeZone
(
"UTC"
));
...
@@ -87,8 +103,8 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
...
@@ -87,8 +103,8 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
startTime
=
sdf
.
format
(
currentDayStartTime
);
startTime
=
sdf
.
format
(
currentDayStartTime
);
endTime
=
sdf
.
format
(
currentDayEndTime
);
endTime
=
sdf
.
format
(
currentDayEndTime
);
}
else
{
}
else
{
Date
currentDayStartTime
=
new
Dat
e
(
startTime
);
Date
currentDayStartTime
=
dateFormat
.
pars
e
(
startTime
);
Date
currentDayEndTime
=
new
Dat
e
(
endTime
);
Date
currentDayEndTime
=
dateFormat
.
pars
e
(
endTime
);
startTime
=
sdf
.
format
(
currentDayStartTime
);
startTime
=
sdf
.
format
(
currentDayStartTime
);
endTime
=
sdf
.
format
(
currentDayEndTime
);
endTime
=
sdf
.
format
(
currentDayEndTime
);
}
}
...
@@ -100,13 +116,17 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
...
@@ -100,13 +116,17 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
activePowers
.
add
(
indicatorDataListActivePowers
.
get
(
i
).
getValue
());
activePowers
.
add
(
indicatorDataListActivePowers
.
get
(
i
).
getValue
());
axisData
.
add
(
DateUtil
.
format
(
indicatorDataListActivePowers
.
get
(
i
).
getCreatedTime
(),
"HH:mm"
));
axisData
.
add
(
DateUtil
.
format
(
indicatorDataListActivePowers
.
get
(
i
).
getCreatedTime
(),
"HH:mm"
));
}
}
List
<
Map
<
String
,
Object
>>
seriesData
=
new
ArrayList
<>();
//
List<Map<String, Object>> seriesData = new ArrayList<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map2
=
new
HashMap
<>();
//
Map<String, Object> map2 = new HashMap<>();
map2
.
put
(
"data"
,
activePowers
);
//
map2.put("data", activePowers);
seriesData
.
add
(
map2
);
//
seriesData.add(map2);
map
.
put
(
"seriesData"
,
seriesData
);
map
.
put
(
"seriesData"
,
activePowers
);
map
.
put
(
"axisData"
,
axisData
);
map
.
put
(
"axisData"
,
axisData
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
throw
new
RuntimeException
();
}
return
map
;
return
map
;
}
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdmapper/IndicatorDataMapper.java
View file @
eae12f78
...
@@ -41,7 +41,7 @@ public interface IndicatorDataMapper extends BaseMapper<IndicatorData> {
...
@@ -41,7 +41,7 @@ public interface IndicatorDataMapper extends BaseMapper<IndicatorData> {
List
<
IndicatorData
>
selectByIndexNameAndDate
(
@Param
(
"equipmentIndexName"
)
String
equipmentIndexName
,
@Param
(
"gatewayId"
)
String
gatewayId
,
@Param
(
"date"
)
String
date
,
@Param
(
"limitNum"
)
Integer
limitNum
);
List
<
IndicatorData
>
selectByIndexNameAndDate
(
@Param
(
"equipmentIndexName"
)
String
equipmentIndexName
,
@Param
(
"gatewayId"
)
String
gatewayId
,
@Param
(
"date"
)
String
date
,
@Param
(
"limitNum"
)
Integer
limitNum
);
@Select
(
"select `value`, created_time
, `value_f` as valueF
from iot_data.indicator_data where id =#{id} and ts >= #{startTime} and ts <= #{endTime} "
)
@Select
(
"select `value`, created_time from iot_data.indicator_data where id =#{id} and ts >= #{startTime} and ts <= #{endTime} "
)
List
<
IndicatorData
>
selectDataByequipmentIndexNameAndtimeAndEquipmentNumber
(
@Param
(
"id"
)
String
id
,
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
);
List
<
IndicatorData
>
selectDataByequipmentIndexNameAndtimeAndEquipmentNumber
(
@Param
(
"id"
)
String
id
,
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
);
...
...
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