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
b1f9ed9f
Commit
b1f9ed9f
authored
Oct 26, 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
5668ef5e
76257e86
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
106 additions
and
31 deletions
+106
-31
HouseholdContractServiceImpl.java
...e/hygf/biz/service/impl/HouseholdContractServiceImpl.java
+5
-1
TdHygfJpCollectorHistoryServiceImpl.java
...biz/service/impl/TdHygfJpCollectorHistoryServiceImpl.java
+11
-6
TdHygfJpInvertorElecHistoryServiceImpl.java
.../service/impl/TdHygfJpInvertorElecHistoryServiceImpl.java
+11
-9
AnalyseController.java
...s/boot/module/jxiop/biz/controller/AnalyseController.java
+14
-12
BigScreenAnalyseController.java
...dule/jxiop/biz/controller/BigScreenAnalyseController.java
+1
-1
IdxBizFanHealthIndexController.java
.../jxiop/biz/controller/IdxBizFanHealthIndexController.java
+27
-0
IdxBizFanHealthIndexMapper.java
.../module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
+1
-0
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+2
-2
IdxBizFanHealthIndexServiceImpl.java
...iop/biz/service/impl/IdxBizFanHealthIndexServiceImpl.java
+4
-0
IndicatorDataMapper.java
...s/boot/module/jxiop/biz/tdmapper/IndicatorDataMapper.java
+3
-0
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+27
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/HouseholdContractServiceImpl.java
View file @
b1f9ed9f
...
...
@@ -273,7 +273,9 @@ public class HouseholdContractServiceImpl extends BaseService<HouseholdContractD
contractDataDto
.
setPersonalOffsetY
(
contractTemplate
.
getPersonalOffsety
());
contractDataDto
.
setPersonalKeywordIndex
(
contractTemplate
.
getPersonalKeywordIndex
());
SimpleDateFormat
myFmt2
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Date
now
=
new
Date
();
String
daty
=
myFmt2
.
format
(
now
);
List
<
TemplateParamDto
>
templateParam
=
new
ArrayList
<>();
SimpleDateFormat
sdfdate
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
...
...
@@ -290,6 +292,8 @@ public class HouseholdContractServiceImpl extends BaseService<HouseholdContractD
templateParam
.
add
(
new
TemplateParamDto
(
"projectAddressDetail"
,
householdContract
.
getProjectAddressName
()!=
null
?
householdContract
.
getProjectAddressName
()+
householdContract
.
getProjectAddressDetail
():
null
));
templateParam
.
add
(
new
TemplateParamDto
(
"componentPower"
,
householdContract
.
getComponentPower
()!=
null
?
String
.
valueOf
(
householdContract
.
getComponentPower
()):
null
));
templateParam
.
add
(
new
TemplateParamDto
(
"stationPower"
,
householdContract
.
getStationPower
()!=
null
?
String
.
valueOf
(
householdContract
.
getStationPower
()):
null
));
templateParam
.
add
(
new
TemplateParamDto
(
"signingTime"
,
daty
));
Long
contractLockId
=
qiyuesuoServiceImpl
.
addContract
(
contractDataDto
,
templateParam
);
householdContract
.
setContractLockId
(
contractLockId
);
householdContract
.
setInitiateStatus
(
HouseholdContractEnum
.
发起状态
_
已发起
.
getCode
());
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/TdHygfJpCollectorHistoryServiceImpl.java
View file @
b1f9ed9f
...
...
@@ -55,7 +55,7 @@ public class TdHygfJpCollectorHistoryServiceImpl
if
(
collector
!=
null
)
{
List
<
TdHygfJpCollectorHistoryDto
>
list
=
this
.
baseMapper
.
dayList
(
collector
.
getSnCode
(),
collector
.
getThirdStationId
(),
TimeUtil
.
getStartTimeOfDay
(
day
)
,
TimeUtil
.
getEndTimeOfDay
(
day
)
);
collector
.
getThirdStationId
(),
TimeUtil
.
getStartTimeOfDay
(
day
)
-
8
*
60
*
60
*
1000
,
TimeUtil
.
getEndTimeOfDay
(
day
)-
8
*
60
*
60
*
1000
);
if
(!
list
.
isEmpty
())
{
list
.
forEach
(
i
->
{
i
.
setTimeFormat
(
TimeUtil
.
minuteFormat
(
i
.
getTime
()));
...
...
@@ -106,6 +106,9 @@ public class TdHygfJpCollectorHistoryServiceImpl
return
new
ArrayList
<>();
}
@Async
public
Object
syncData
()
{
Calendar
cal
=
Calendar
.
getInstance
();
...
...
@@ -115,12 +118,14 @@ public class TdHygfJpCollectorHistoryServiceImpl
int
month
=
cal
.
get
(
Calendar
.
MONTH
)
+
1
;
int
year
=
cal
.
get
(
Calendar
.
YEAR
);
// 月表
List
<
Map
<
String
,
Object
>>
monthList
=
this
.
baseMapper
.
dayToMonth
(
TimeUtil
.
getStartTimeOfDay
(
dayTime
),
TimeUtil
.
getEndTimeOfDay
(
dayTime
));
List
<
Map
<
String
,
Object
>>
monthList
=
this
.
baseMapper
.
dayToMonth
(
TimeUtil
.
getStartTimeOfDay
(
dayTime
)
-
8
*
60
*
60
*
1000
,
TimeUtil
.
getEndTimeOfDay
(
dayTime
)
-
8
*
60
*
60
*
1000
);
for
(
int
i
=
0
;
i
<
monthList
.
size
();
i
++)
{
monthList
.
get
(
i
).
put
(
"created_time"
,
dayTime
.
getTime
()
+
i
);
monthList
.
get
(
i
).
put
(
"day"
,
day
);
monthList
.
get
(
i
).
put
(
"year_month"
,
year
+
"-"
+
month
);
monthList
.
get
(
i
).
put
(
"sn_code"
,
monthList
.
get
(
i
).
get
(
"sn_code"
).
toString
().
trim
());
}
if
(!
monthList
.
isEmpty
())
{
List
<
JpCollectorHistoryMonthDto
>
listold
=
this
.
baseMapper
.
monthList
(
null
,
null
,
year
+
"-"
+
month
);
...
...
@@ -129,7 +134,7 @@ public class TdHygfJpCollectorHistoryServiceImpl
for
(
Map
<
String
,
Object
>
map
:
monthList
)
{
for
(
JpCollectorHistoryMonthDto
jpCollectorHistoryMonthDto
:
listold
)
{
if
(
map
.
get
(
"third_station_id"
).
toString
().
equals
(
jpCollectorHistoryMonthDto
.
getThirdStationId
())&&
map
.
get
(
"sn_code"
).
toString
().
equals
(
jpCollectorHistoryMonthDto
.
getSnCode
())){
if
(
map
.
get
(
"third_station_id"
).
toString
().
equals
(
jpCollectorHistoryMonthDto
.
getThirdStationId
())&&
map
.
get
(
"sn_code"
).
toString
().
trim
().
equals
(
jpCollectorHistoryMonthDto
.
getSnCode
().
trim
())&&
map
.
get
(
"day"
).
toString
().
equals
(
jpCollectorHistoryMonthDto
.
getDay
())){
map
.
put
(
"created_time"
,
jpCollectorHistoryMonthDto
.
getCreatedTime
())
;
}
}
...
...
@@ -155,7 +160,7 @@ public class TdHygfJpCollectorHistoryServiceImpl
&&
map
.
get
(
"third_station_id"
)
!=
null
&&
map
.
get
(
"sn_code"
)
!=
null
&&
map
.
get
(
"month"
)
!=
null
&&
map
.
get
(
"year"
)
!=
null
&&
dto
.
getThirdStationId
().
equals
(
map
.
get
(
"third_station_id"
).
toString
())
&&
dto
.
getSnCode
().
equals
(
map
.
get
(
"sn_code"
).
toString
())
&&
dto
.
getSnCode
().
trim
().
equals
(
map
.
get
(
"sn_code"
).
toString
().
trim
())
&&
dto
.
getYear
().
equals
(
map
.
get
(
"year"
).
toString
())
&&
dto
.
getMonth
().
equals
(
map
.
get
(
"month"
).
toString
()))
{
time
=
dto
.
getCreatedTime
();
...
...
@@ -178,7 +183,7 @@ public class TdHygfJpCollectorHistoryServiceImpl
&&
map
.
get
(
"third_station_id"
)
!=
null
&&
map
.
get
(
"sn_code"
)
!=
null
&&
map
.
get
(
"year"
)
!=
null
&&
dto
.
getThirdStationId
().
equals
(
map
.
get
(
"third_station_id"
).
toString
())
&&
dto
.
getSnCode
().
equals
(
map
.
get
(
"sn_code"
).
toString
())
&&
dto
.
getSnCode
().
trim
().
equals
(
map
.
get
(
"sn_code"
).
toString
().
trim
())
&&
dto
.
getYear
().
equals
(
map
.
get
(
"year"
).
toString
()))
{
time
=
dto
.
getCreatedTime
();
break
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/TdHygfJpInvertorElecHistoryServiceImpl.java
View file @
b1f9ed9f
...
...
@@ -49,7 +49,7 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
JpInverter
invertor
=
jpInvertorServiceImpl
.
getById
(
id
);
if
(
invertor
!=
null
)
{
List
<
TdHygfJpInvertorElecHistoryDto
>
list
=
this
.
baseMapper
.
dayList
(
invertor
.
getSnCode
(),
invertor
.
getThirdStationId
(),
TimeUtil
.
getStartTimeOfDay
(
day
)
,
TimeUtil
.
getEndTimeOfDay
(
day
)
);
invertor
.
getThirdStationId
(),
TimeUtil
.
getStartTimeOfDay
(
day
)
-
8
*
60
*
60
*
1000
,
TimeUtil
.
getEndTimeOfDay
(
day
)-
8
*
60
*
60
*
1000
);
if
(!
list
.
isEmpty
())
{
list
.
forEach
(
i
->
{
i
.
setTimeFormat
(
TimeUtil
.
minuteFormat
(
i
.
getTime
()));
...
...
@@ -69,7 +69,8 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
cal
.
setTime
(
month
);
String
monthStr
=
String
.
valueOf
(
cal
.
get
(
Calendar
.
YEAR
))
+
"-"
+
String
.
valueOf
(
cal
.
get
(
Calendar
.
MONTH
)
+
1
);
if
(
invertor
!=
null
)
{
return
this
.
baseMapper
.
monthList
(
invertor
.
getSnCode
(),
invertor
.
getThirdStationId
(),
monthStr
);
List
<
JpInvertorElecHistoryMonthDto
>
li
=
this
.
baseMapper
.
monthList
(
invertor
.
getSnCode
().
trim
(),
invertor
.
getThirdStationId
(),
monthStr
);
return
li
;
}
return
new
ArrayList
<>();
}
...
...
@@ -83,7 +84,7 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
cal
.
setTime
(
year
);
String
yearStr
=
String
.
valueOf
(
cal
.
get
(
Calendar
.
YEAR
));
if
(
invertor
!=
null
)
{
return
this
.
baseMapper
.
yearList
(
invertor
.
getSnCode
(),
invertor
.
getThirdStationId
(),
yearStr
);
return
this
.
baseMapper
.
yearList
(
invertor
.
getSnCode
()
.
trim
()
,
invertor
.
getThirdStationId
(),
yearStr
);
}
return
new
ArrayList
<>();
}
...
...
@@ -95,7 +96,7 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
JpInverter
invertor
=
jpInvertorServiceImpl
.
getById
(
id
);
if
(
invertor
!=
null
)
{
return
this
.
baseMapper
.
allList
(
invertor
.
getSnCode
(),
invertor
.
getThirdStationId
());
return
this
.
baseMapper
.
allList
(
invertor
.
getSnCode
()
.
trim
()
,
invertor
.
getThirdStationId
());
}
return
new
ArrayList
<>();
}
...
...
@@ -109,12 +110,13 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
int
month
=
cal
.
get
(
Calendar
.
MONTH
)
+
1
;
int
year
=
cal
.
get
(
Calendar
.
YEAR
);
// 月表
List
<
Map
<
String
,
Object
>>
monthList
=
this
.
baseMapper
.
dayToMonth
(
TimeUtil
.
getStartTimeOfDay
(
dayTime
),
TimeUtil
.
getEndTimeOfDay
(
dayTime
));
List
<
Map
<
String
,
Object
>>
monthList
=
this
.
baseMapper
.
dayToMonth
(
TimeUtil
.
getStartTimeOfDay
(
dayTime
)
-
8
*
60
*
60
*
1000
,
TimeUtil
.
getEndTimeOfDay
(
dayTime
)
-
8
*
60
*
60
*
1000
);
for
(
int
i
=
0
;
i
<
monthList
.
size
();
i
++)
{
monthList
.
get
(
i
).
put
(
"created_time"
,
dayTime
.
getTime
()
+
i
);
monthList
.
get
(
i
).
put
(
"day"
,
day
);
monthList
.
get
(
i
).
put
(
"year_month"
,
year
+
"-"
+
month
);
monthList
.
get
(
i
).
put
(
"sn_code"
,
monthList
.
get
(
i
).
get
(
"sn_code"
).
toString
().
trim
());
}
if
(!
monthList
.
isEmpty
())
{
...
...
@@ -125,7 +127,7 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
for
(
Map
<
String
,
Object
>
map
:
monthList
)
{
for
(
JpInvertorElecHistoryMonthDto
jpInvertorElecHistoryMonthDto
:
listold
)
{
if
(
map
.
get
(
"third_station_id"
).
toString
().
equals
(
jpInvertorElecHistoryMonthDto
.
getThirdStationId
())&&
map
.
get
(
"sn_code"
).
toString
().
equals
(
jpInvertorElecHistoryMonthDto
.
getSnCode
()))
{
if
(
map
.
get
(
"third_station_id"
).
toString
().
equals
(
jpInvertorElecHistoryMonthDto
.
getThirdStationId
())&&
map
.
get
(
"sn_code"
).
toString
().
trim
().
equals
(
jpInvertorElecHistoryMonthDto
.
getSnCode
().
trim
())&&
map
.
get
(
"day"
).
toString
().
equals
(
jpInvertorElecHistoryMonthDto
.
getDay
()))
{
map
.
put
(
"created_time"
,
jpInvertorElecHistoryMonthDto
.
getCreatedTime
());
}
}
...
...
@@ -151,7 +153,7 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
&&
map
.
get
(
"third_station_id"
)
!=
null
&&
map
.
get
(
"sn_code"
)
!=
null
&&
map
.
get
(
"month"
)
!=
null
&&
map
.
get
(
"year"
)
!=
null
&&
dto
.
getThirdStationId
().
equals
(
map
.
get
(
"third_station_id"
).
toString
())
&&
dto
.
getSnCode
().
equals
(
map
.
get
(
"sn_code"
).
toString
())
&&
dto
.
getSnCode
().
trim
().
equals
(
map
.
get
(
"sn_code"
).
toString
().
trim
())
&&
dto
.
getYear
().
equals
(
map
.
get
(
"year"
).
toString
())
&&
dto
.
getMonth
().
equals
(
map
.
get
(
"month"
).
toString
()))
{
time
=
dto
.
getCreatedTime
();
...
...
@@ -174,7 +176,7 @@ public class TdHygfJpInvertorElecHistoryServiceImpl extends
&&
map
.
get
(
"third_station_id"
)
!=
null
&&
map
.
get
(
"sn_code"
)
!=
null
&&
map
.
get
(
"year"
)
!=
null
&&
dto
.
getThirdStationId
().
equals
(
map
.
get
(
"third_station_id"
).
toString
())
&&
dto
.
getSnCode
().
equals
(
map
.
get
(
"sn_code"
).
toString
())
&&
dto
.
getSnCode
().
trim
().
equals
(
map
.
get
(
"sn_code"
).
toString
().
trim
())
&&
dto
.
getYear
().
equals
(
map
.
get
(
"year"
).
toString
()))
{
time
=
dto
.
getCreatedTime
();
break
;
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/AnalyseController.java
View file @
b1f9ed9f
...
...
@@ -139,16 +139,17 @@ public class AnalyseController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取influxdb数据"
,
notes
=
"获取influxdb数据"
)
@GetMapping
(
value
=
"/getInfluxdbDataByConditon"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getInfluxdbDataByConditon
(
@RequestParam
String
stationType
,
@RequestParam
String
pointId
,
@RequestParam
(
required
=
false
)
String
startTime
,
@RequestParam
(
required
=
false
)
String
endTime
)
{
if
(
StringUtils
.
isEmpty
(
startTime
)
&&
StringUtils
.
isEmpty
(
endTime
)
)
{
Date
current
DayStartTime
=
null
;
if
(
StringUtils
.
isEmpty
(
startTime
)
)
{
Date
sevenAgo
DayStartTime
=
null
;
try
{
currentDayStartTime
=
DateUtils
.
minDateOfMonth
(
new
Date
()
);
sevenAgoDayStartTime
=
DateUtils
.
dateAddDays
(
new
Date
(),
-
7
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
Date
currentDayEndTime
=
DateUtils
.
getCurrentMonthEndTime
(
new
Date
());
startTime
=
DateUtils
.
convertDateToString
(
currentDayStartTime
,
DateUtils
.
DATE_TIME_PATTERN
);
endTime
=
DateUtils
.
convertDateToString
(
currentDayEndTime
,
DateUtils
.
DATE_TIME_PATTERN
);
startTime
=
DateUtils
.
convertDateToString
(
sevenAgoDayStartTime
,
DateUtils
.
DATE_TIME_PATTERN
);
}
if
(
StringUtils
.
isEmpty
(
endTime
))
{
endTime
=
DateUtils
.
convertDateToString
(
new
Date
(),
DateUtils
.
DATE_TIME_PATTERN
);
}
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getInfluxdbDataByConditon
(
stationType
,
pointId
,
startTime
,
endTime
))
;
}
...
...
@@ -180,16 +181,17 @@ public class AnalyseController extends BaseController {
}
if
(
StringUtils
.
isEmpty
(
startTime
)
&&
StringUtils
.
isEmpty
(
endTime
)
)
{
Date
current
DayStartTime
=
null
;
if
(
StringUtils
.
isEmpty
(
startTime
)
)
{
Date
sevenAgo
DayStartTime
=
null
;
try
{
currentDayStartTime
=
DateUtils
.
minDateOfMonth
(
new
Date
()
);
sevenAgoDayStartTime
=
DateUtils
.
dateAddDays
(
new
Date
(),
-
7
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
Date
currentDayEndTime
=
DateUtils
.
getCurrentMonthEndTime
(
new
Date
());
startTime
=
DateUtils
.
convertDateToString
(
currentDayStartTime
,
DateUtils
.
DATE_TIME_PATTERN
);
endTime
=
DateUtils
.
convertDateToString
(
currentDayEndTime
,
DateUtils
.
DATE_TIME_PATTERN
);
startTime
=
DateUtils
.
convertDateToString
(
sevenAgoDayStartTime
,
DateUtils
.
DATE_TIME_PATTERN
);
}
if
(
StringUtils
.
isEmpty
(
endTime
))
{
endTime
=
DateUtils
.
convertDateToString
(
new
Date
(),
DateUtils
.
DATE_TIME_PATTERN
);
}
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getInfluxdbDataByConditon
(
stationType
,
pointId
,
startTime
,
endTime
))
;
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/BigScreenAnalyseController.java
View file @
b1f9ed9f
...
...
@@ -986,7 +986,7 @@ public class BigScreenAnalyseController extends BaseController {
List
<
Object
>
time
=
new
ArrayList
<>();
Collections
.
reverse
(
indicatorDataList
);
for
(
IndicatorData
indicatorData
:
indicatorDataList
)
{
valueList
.
add
(
indicatorData
.
getValueF
(
));
valueList
.
add
(
String
.
format
(
"%.2f"
,
indicatorData
.
getValueF
()
));
Timestamp
createdTime
=
indicatorData
.
getCreatedTime
();
String
s
=
DateUtils
.
convertDateToString
(
createdTime
,
"HH:mm"
);
time
.
add
(
s
);
...
...
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 @
b1f9ed9f
...
...
@@ -299,4 +299,31 @@ public class IdxBizFanHealthIndexController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询光伏场站所有设备状态统计"
,
notes
=
"查询光伏场站所有设备状态统计"
)
@GetMapping
(
value
=
"/getPvEquipStatusByStation"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getPvEquipStatusByStation
(
String
STATION
)
{
Map
<
String
,
Object
>
map
=
idxBizFanHealthIndexServiceImpl
.
getPvEquipStatusByStation
(
STATION
);
List
<
Map
<
String
,
Object
>>
maps
=
new
ArrayList
<>();
Map
<
String
,
Object
>
anquan
=
new
HashMap
<>();
anquan
.
put
(
"name"
,
"安全"
);
anquan
.
put
(
"value"
,
map
.
get
(
"安全"
));
maps
.
add
(
anquan
);
Map
<
String
,
Object
>
zhuyi
=
new
HashMap
<>();
zhuyi
.
put
(
"name"
,
"注意"
);
zhuyi
.
put
(
"value"
,
map
.
get
(
"注意"
));
maps
.
add
(
zhuyi
);
Map
<
String
,
Object
>
jinggao
=
new
HashMap
<>();
jinggao
.
put
(
"name"
,
"警告"
);
jinggao
.
put
(
"value"
,
map
.
get
(
"警告"
));
maps
.
add
(
jinggao
);
Map
<
String
,
Object
>
weixian
=
new
HashMap
<>();
weixian
.
put
(
"name"
,
"危险"
);
weixian
.
put
(
"value"
,
map
.
get
(
"危险"
));
maps
.
add
(
weixian
);
return
ResponseHelper
.
buildResponse
(
maps
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
View file @
b1f9ed9f
...
...
@@ -121,4 +121,5 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
List
<
IdxBizFanWarningRecord
>
warningData
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
);
Integer
pointNum
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
);
Map
<
String
,
Object
>
getPvEquipStatusByStation
(
String
station
);
}
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 @
b1f9ed9f
...
...
@@ -961,10 +961,10 @@ public class CommonServiceImpl {
List
<
IndicatorData
>
result
=
new
ArrayList
<>();
if
(
"FD"
.
equals
(
stationType
))
{
IdxBizFanPointProcessVariableClassification
idxBizFanPointProcessVariableClassification
=
idxBizFanPointProcessVariableClassificationMapper
.
selectOne
(
new
QueryWrapper
<
IdxBizFanPointProcessVariableClassification
>().
eq
(
"INDEX_ADDRESS"
,
pointId
).
eq
(
"TAG_CODE"
,
"分析变量"
));
result
=
indicatorDataMapper
.
selectDataByAddressAndtime
(
idxBizFanPointProcessVariableClassification
.
getIndexAddress
(),
startTime
,
endTime
,
idxBizFanPointProcessVariableClassification
.
getGatewayId
());
result
=
indicatorDataMapper
.
selectDataByAddressAndtime
Ts
(
idxBizFanPointProcessVariableClassification
.
getIndexAddress
(),
startTime
,
endTime
,
idxBizFanPointProcessVariableClassification
.
getGatewayId
());
}
else
{
IdxBizPvPointProcessVariableClassification
idxBizPvPointProcessVariableClassification
=
idxBizPvPointProcessVariableClassificationMapper
.
selectOne
(
new
QueryWrapper
<
IdxBizPvPointProcessVariableClassification
>().
eq
(
"INDEX_ADDRESS"
,
pointId
).
eq
(
"TAG_CODE"
,
"分析变量"
));
result
=
indicatorDataMapper
.
selectDataByAddressAndtime
(
idxBizPvPointProcessVariableClassification
.
getIndexAddress
(),
startTime
,
endTime
,
idxBizPvPointProcessVariableClassification
.
getGatewayId
());
result
=
indicatorDataMapper
.
selectDataByAddressAndtime
Ts
(
idxBizPvPointProcessVariableClassification
.
getIndexAddress
(),
startTime
,
endTime
,
idxBizPvPointProcessVariableClassification
.
getGatewayId
());
}
List
<
String
>
seriesData_valuse
=
new
ArrayList
<>();
List
<
String
>
axisData_valuse
=
new
ArrayList
<>();
...
...
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 @
b1f9ed9f
...
...
@@ -190,6 +190,10 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
return
this
.
getBaseMapper
().
getFanEquipStatusByStation
(
STATION
);
}
public
Map
<
String
,
Object
>
getPvEquipStatusByStation
(
String
STATION
){
return
this
.
getBaseMapper
().
getPvEquipStatusByStation
(
STATION
);
}
public
int
queryForLeftTableListByPointCount
(
String
STATION
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
){
return
this
.
getBaseMapper
().
queryForLeftTableListByPointCount
(
STATION
,
HEALTHLEVEL
,
EQUIPMENTNAME
,
POINTNAME
);
...
...
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 @
b1f9ed9f
...
...
@@ -15,6 +15,9 @@ public interface IndicatorDataMapper extends BaseMapper<IndicatorData> {
List
<
IndicatorData
>
selectDataByAddressAndtime
(
@Param
(
"address"
)
String
address
,
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"gatewayId"
)
String
gatewayId
);
@Select
(
"select `value`, created_time as createdTime, `value_f` as valueF from iot_data.indicator_data where address=#{address} and ts >= #{startTime} and ts <= #{endTime} and gateway_id =#{gatewayId}"
)
List
<
IndicatorData
>
selectDataByAddressAndtimeTs
(
@Param
(
"address"
)
String
address
,
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"gatewayId"
)
String
gatewayId
);
@Select
(
"select `unit` from iot_data.indicator_data where address=#{address} and gateway_id =#{gatewayId} limit 1"
)
IndicatorData
selectUnitByAddressAndGatewayId
(
@Param
(
"address"
)
String
address
,
@Param
(
"gatewayId"
)
String
gatewayId
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
b1f9ed9f
...
...
@@ -1200,4 +1200,31 @@
) a
</select>
<select
id=
"getPvEquipStatusByStation"
resultType=
"java.util.Map"
>
SELECT
max( CASE WHEN a.HEALTH_LEVEL = '安全' THEN num ELSE 0 END ) AS 安全,
max( CASE WHEN a.HEALTH_LEVEL = '注意' THEN num ELSE 0 END ) AS 注意,
max( CASE WHEN a.HEALTH_LEVEL = '警告' THEN num ELSE 0 END ) AS 警告,
max( CASE WHEN a.HEALTH_LEVEL = '危险' THEN num ELSE 0 END ) AS 危险
FROM
(
SELECT
STATION,
HEALTH_LEVEL,
count( 1 ) AS num
FROM
idx_biz_pv_health_index
WHERE
ANALYSIS_TYPE = '按天'
AND ANALYSIS_OBJ_TYPE = '设备'
AND REC_DATE >= CURRENT_DATE ( )
<if
test=
"STATION != null and STATION != ''"
>
AND STATION = #{STATION}
</if>
GROUP BY
STATION,
HEALTH_LEVEL
) a
</select>
</mapper>
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