Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
energyai_java
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
葛齐林
energyai_java
Commits
b845d14a
Commit
b845d14a
authored
Jun 17, 2024
by
史志龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资阳西站提交初版--shizhilong
parent
66773fa3
Changes
60
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
60 changed files
with
3024 additions
and
662 deletions
+3024
-662
InitRunner.java
...a/com/devplatform/admin/common/scheduling/InitRunner.java
+9
-8
SimpleJob.java
...va/com/devplatform/admin/common/scheduling/SimpleJob.java
+16
-5
Constants.java
...in/java/com/devplatform/admin/common/utils/Constants.java
+33
-0
KqcljInfo.java
...java/com/devplatform/admin/modules/eq/bean/KqcljInfo.java
+39
-0
KqcljInfoHour.java
.../com/devplatform/admin/modules/eq/bean/KqcljInfoHour.java
+36
-0
SwqxzInfo.java
...java/com/devplatform/admin/modules/eq/bean/SwqxzInfo.java
+7
-0
SwqxzInfoHour.java
.../com/devplatform/admin/modules/eq/bean/SwqxzInfoHour.java
+3
-0
TimedTask.java
...java/com/devplatform/admin/modules/eq/bean/TimedTask.java
+4
-1
WarnInfo.java
.../java/com/devplatform/admin/modules/eq/bean/WarnInfo.java
+50
-0
ZyFlrbInfo.java
...ava/com/devplatform/admin/modules/eq/bean/ZyFlrbInfo.java
+60
-0
ZyJfktpInfo.java
...va/com/devplatform/admin/modules/eq/bean/ZyJfktpInfo.java
+76
-0
AnalysisController.java
...tform/admin/modules/eq/controller/AnalysisController.java
+27
-1
EquipmentController.java
...form/admin/modules/eq/controller/EquipmentController.java
+539
-442
EquipmentController2.java
...orm/admin/modules/eq/controller/EquipmentController2.java
+511
-0
EquipmentController3.java
...orm/admin/modules/eq/controller/EquipmentController3.java
+577
-0
KqcljInfoDao.java
...va/com/devplatform/admin/modules/eq/dao/KqcljInfoDao.java
+22
-0
KqcljInfoHourDao.java
...om/devplatform/admin/modules/eq/dao/KqcljInfoHourDao.java
+21
-0
SnqxzInfoDao.java
...va/com/devplatform/admin/modules/eq/dao/SnqxzInfoDao.java
+2
-0
SwqxzInfoDao.java
...va/com/devplatform/admin/modules/eq/dao/SwqxzInfoDao.java
+2
-0
WarnInfoDao.java
...ava/com/devplatform/admin/modules/eq/dao/WarnInfoDao.java
+16
-0
ZyFlrbInfoDao.java
...a/com/devplatform/admin/modules/eq/dao/ZyFlrbInfoDao.java
+25
-0
ZyJfktpInfoDao.java
.../com/devplatform/admin/modules/eq/dao/ZyJfktpInfoDao.java
+23
-0
AnalysisService.java
...devplatform/admin/modules/eq/service/AnalysisService.java
+2
-0
EquipmentService.java
...evplatform/admin/modules/eq/service/EquipmentService.java
+2
-0
KqcljInfoHourService.java
...atform/admin/modules/eq/service/KqcljInfoHourService.java
+19
-0
KqcljInfoService.java
...evplatform/admin/modules/eq/service/KqcljInfoService.java
+22
-0
SnqxzInfoService.java
...evplatform/admin/modules/eq/service/SnqxzInfoService.java
+2
-0
SwqxzInfoService.java
...evplatform/admin/modules/eq/service/SwqxzInfoService.java
+1
-0
WarnInfoService.java
...devplatform/admin/modules/eq/service/WarnInfoService.java
+18
-0
ZyFlrbInfoService.java
...vplatform/admin/modules/eq/service/ZyFlrbInfoService.java
+21
-0
ZyJfktpInfoService.java
...platform/admin/modules/eq/service/ZyJfktpInfoService.java
+21
-0
AnalysisServiceImpl.java
...rm/admin/modules/eq/service/impl/AnalysisServiceImpl.java
+172
-123
EquipmentServiceImpl.java
...m/admin/modules/eq/service/impl/EquipmentServiceImpl.java
+151
-35
FlrbInfoServiceImpl.java
...rm/admin/modules/eq/service/impl/FlrbInfoServiceImpl.java
+2
-1
JfktpInfoServiceImpl.java
...m/admin/modules/eq/service/impl/JfktpInfoServiceImpl.java
+2
-1
KqcljInfoHourServiceImpl.java
...min/modules/eq/service/impl/KqcljInfoHourServiceImpl.java
+25
-0
KqcljServiceImpl.java
...tform/admin/modules/eq/service/impl/KqcljServiceImpl.java
+47
-0
SnqxzInfoServiceImpl.java
...m/admin/modules/eq/service/impl/SnqxzInfoServiceImpl.java
+5
-0
SwqxzInfoServiceImpl.java
...m/admin/modules/eq/service/impl/SwqxzInfoServiceImpl.java
+4
-0
WarnInfoServiceImpl.java
...rm/admin/modules/eq/service/impl/WarnInfoServiceImpl.java
+24
-0
ZyFlrbInfoServiceImpl.java
.../admin/modules/eq/service/impl/ZyFlrbInfoServiceImpl.java
+35
-0
ZyJfktpInfoServiceImpl.java
...admin/modules/eq/service/impl/ZyJfktpInfoServiceImpl.java
+35
-0
LiResourceDao.java
...vplatform/admin/modules/liresource/dao/LiResourceDao.java
+2
-0
LiResourceService.java
...m/admin/modules/liresource/service/LiResourceService.java
+2
-0
LiResourceServiceImpl.java
...odules/liresource/service/impl/LiResourceServiceImpl.java
+4
-0
SysLoginController.java
...form/admin/modules/sys/controller/SysLoginController.java
+4
-4
application.yml
microservice-admin/src/main/resources/application.yml
+4
-0
FlrbInfoMapper.xml
...ice-admin/src/main/resources/mapper/eq/FlrbInfoMapper.xml
+32
-32
JfktpInfoMapper.xml
...ce-admin/src/main/resources/mapper/eq/JfktpInfoMapper.xml
+1
-1
KqcljInfoHourMapper.xml
...dmin/src/main/resources/mapper/eq/KqcljInfoHourMapper.xml
+47
-0
KqcljInfoMapper.xml
...ce-admin/src/main/resources/mapper/eq/KqcljInfoMapper.xml
+48
-0
SnqxzInfoMapper.xml
...ce-admin/src/main/resources/mapper/eq/SnqxzInfoMapper.xml
+9
-1
SwqxzInfoHourMapper.xml
...dmin/src/main/resources/mapper/eq/SwqxzInfoHourMapper.xml
+3
-1
SwqxzInfoMapper.xml
...ce-admin/src/main/resources/mapper/eq/SwqxzInfoMapper.xml
+9
-3
WarnInfoMapper.xml
...ice-admin/src/main/resources/mapper/eq/WarnInfoMapper.xml
+6
-0
ZyFlrbInfoMapper.xml
...e-admin/src/main/resources/mapper/eq/ZyFlrbInfoMapper.xml
+66
-0
ZyJfktpInfoMapper.xml
...-admin/src/main/resources/mapper/eq/ZyJfktpInfoMapper.xml
+70
-0
LiResourceMapper.xml
...src/main/resources/mapper/liResource/LiResourceMapper.xml
+5
-0
SysFaulalarmMapper.xml
...dmin/src/main/resources/mapper/sys/SysFaulalarmMapper.xml
+2
-1
application-dev.yml
...vice-config-server/src/main/resources/application-dev.yml
+2
-2
No files found.
microservice-admin/src/main/java/com/devplatform/admin/common/scheduling/InitRunner.java
View file @
b845d14a
...
...
@@ -36,16 +36,17 @@ public class InitRunner implements CommandLineRunner {
List
<
TimedTask
>
timedTasks
=
timedTaskService
.
list
(
new
LambdaQueryWrapper
<
TimedTask
>().
eq
(
TimedTask:
:
getStatus
,
Constants
.
INT_1
));
if
(
timedTasks
!=
null
&&
timedTasks
.
size
()
>
0
){
for
(
TimedTask
timedTask
:
timedTasks
){
//人工模式
if
(
sysSystemParams
.
getType
()
==
1
&&
timedTask
.
getBusinessType
()
!=
Constants
.
INT_3
)
{
// R r = equipmentController.timedTask(timedTask.getId(), timedTask.getStartTime(), timedTask.getEndTime(), Constants.INT_1,
// timedTask.getBusinessType(), timedTask.getType(), Constants.STRING_1,Constants.INT_3);
// if (!Constants.STRING_0.equals(r.get(Constants.CODE_WORD).toString())) {
// System.err.println("定时任务启动失败!!");
// }
}
else
if
(
sysSystemParams
.
getType
()
==
2
&&
timedTask
.
getBusinessType
()
==
Constants
.
INT_3
)
{
//开启节能大小循环
R
r
=
equipmentController
.
timedTask
(
timedTask
.
getId
(),
timedTask
.
getStartTime
(),
timedTask
.
getEndTime
(),
Constants
.
INT_1
,
timedTask
.
getBusinessType
(),
timedTask
.
getType
(),
Constants
.
STRING_1
);
if
(!
Constants
.
STRING_0
.
equals
(
r
.
get
(
Constants
.
CODE_WORD
).
toString
()))
{
System
.
err
.
println
(
"定时任务启动失败!!"
);
}
}
else
if
(
sysSystemParams
.
getType
()
==
2
&&
timedTask
.
getBusinessType
()
==
Constants
.
INT_3
)
{
R
r
=
equipmentController
.
timedTask
(
timedTask
.
getId
(),
timedTask
.
getStartTime
(),
timedTask
.
getEndTime
(),
Constants
.
INT_1
,
timedTask
.
getBusinessType
(),
timedTask
.
getType
(),
Constants
.
STRING_1
);
timedTask
.
getBusinessType
(),
timedTask
.
getType
(),
Constants
.
STRING_1
,
timedTask
.
getBusinessSonType
());
if
(!
Constants
.
STRING_0
.
equals
(
r
.
get
(
Constants
.
CODE_WORD
).
toString
()))
{
System
.
err
.
println
(
"定时任务启动失败!!"
);
}
...
...
microservice-admin/src/main/java/com/devplatform/admin/common/scheduling/SimpleJob.java
View file @
b845d14a
...
...
@@ -26,6 +26,7 @@ public class SimpleJob implements Job {
Integer
status
=
(
Integer
)
jobDataMap
.
get
(
"status"
);
Integer
type
=
(
Integer
)
jobDataMap
.
get
(
"type"
);
Integer
businessType
=
(
Integer
)
jobDataMap
.
get
(
"businessType"
);
Integer
businessSonType
=
(
Integer
)
jobDataMap
.
get
(
"businessSonType"
);
Map
<
String
,
String
>
postParam
=
new
HashMap
<
String
,
String
>(
10
);
...
...
@@ -49,12 +50,22 @@ public class SimpleJob implements Job {
}
}
else
if
(
businessType
==
Constants
.
INT_3
){
LOG
.
info
(
"执行节能任务"
);
if
(
businessSonType
==
Constants
.
INT_1
){
String
postUrl
=
"http://localhost:8089/command/energyTask"
;
Map
<
String
,
Object
>
resultMap
=
TestClient
.
uploadText
(
postUrl
,
postParam
);
Map
<
String
,
Object
>
map
=
null
;
if
(
Constants
.
STRING_200
.
equals
(
resultMap
.
get
(
Constants
.
STATUS_CODE
).
toString
()))
{
map
=
JSONObject
.
parseObject
(
resultMap
.
get
(
"data"
).
toString
(),
Map
.
class
);
}
}
else
if
(
businessSonType
==
Constants
.
INT_2
){
String
postUrl
=
"http://localhost:8089/command/energyTask2"
;
Map
<
String
,
Object
>
resultMap
=
TestClient
.
uploadText
(
postUrl
,
postParam
);
Map
<
String
,
Object
>
map
=
null
;
if
(
Constants
.
STRING_200
.
equals
(
resultMap
.
get
(
Constants
.
STATUS_CODE
).
toString
()))
{
map
=
JSONObject
.
parseObject
(
resultMap
.
get
(
"data"
).
toString
(),
Map
.
class
);
}
}
}
}
}
microservice-admin/src/main/java/com/devplatform/admin/common/utils/Constants.java
View file @
b845d14a
...
...
@@ -697,5 +697,38 @@ public class Constants {
* 右热泵主机2
*/
public
static
final
String
ID_FLRBJZ_4
=
"21b83b939a3848ae8a38368a59ca0004"
;
/**
* 组合式空调机组A
*/
public
static
final
String
KTJZ_A
=
"组合式空调机组A"
;
/**
* 组合式空调机组C
*/
public
static
final
String
KTJZ_C
=
"组合式空调机组C"
;
/**
* 一体化风冷热泵A
*/
public
static
final
String
FLRB_A
=
"一体化风冷热泵A"
;
/**
* 一体化风冷热泵C
*/
public
static
final
String
FLRB_C
=
"一体化风冷热泵C"
;
/**设备类型ID*/
/**
* 资阳西站空调机组
*/
public
static
final
String
ZY_KTJZ
=
"2"
;
/**
* 资阳西站一体化风冷热泵机组
*/
public
static
final
String
ZY_FLRB
=
"3"
;
/**
* 资阳西站空气处理机
*/
public
static
final
String
ZY_KQCLJ
=
"1"
;
/**
* 资阳西站全部能耗统计
*/
public
static
final
String
ZY_QB
=
"999"
;
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/bean/KqcljInfo.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
bean
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author dxw
*/
@Data
@ApiModel
(
value
=
"空气处理器信息对象"
,
description
=
"空气处理器信息对象"
)
@TableName
(
"kqclj_info"
)
public
class
KqcljInfo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键id */
@ApiModelProperty
(
value
=
"主键ID"
,
name
=
"id"
)
@TableId
private
String
id
;
/** 资源点id */
@ApiModelProperty
(
value
=
"资源点id"
,
name
=
"resourceId"
)
private
String
resourceId
;
/** 空气处理机能耗 */
@ApiModelProperty
(
value
=
"空气处理机能耗"
,
name
=
"energy"
)
private
String
energy
;
/** 类型(1手动,2节能) */
@ApiModelProperty
(
value
=
"类型(1手动,2节能)"
,
name
=
"type"
)
private
Integer
type
;
/** 站点表id */
@ApiModelProperty
(
value
=
"站点表id"
,
name
=
"stationId"
)
private
String
stationId
;
/** 创建时间 */
@ApiModelProperty
(
value
=
"创建时间"
,
name
=
"createTime"
)
private
java
.
util
.
Date
createTime
;
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/bean/KqcljInfoHour.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
bean
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
@ApiModel
(
value
=
"空气处理机信息-时对象"
,
description
=
"空气处理机信息-时对象"
)
@TableName
(
"kqclj_info_hour"
)
public
class
KqcljInfoHour
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键id */
@ApiModelProperty
(
value
=
"主键ID"
,
name
=
"id"
)
@TableId
private
String
id
;
/** 资源点id */
@ApiModelProperty
(
value
=
"资源点id"
,
name
=
"resourceId"
)
private
String
resourceId
;
/** 空气处理机能耗 */
@ApiModelProperty
(
value
=
"空气处理机能耗"
,
name
=
"electricEnergy"
)
private
String
electricEnergy
;
/** 类型(1手动,2节能) */
@ApiModelProperty
(
value
=
"类型(1手动,2节能)"
,
name
=
"type"
)
private
Integer
type
;
/** 站点表id */
@ApiModelProperty
(
value
=
"站点表id"
,
name
=
"stationId"
)
private
String
stationId
;
/** 创建时间 */
@ApiModelProperty
(
value
=
"创建时间"
,
name
=
"createTime"
)
private
java
.
util
.
Date
createTime
;
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/bean/SwqxzInfo.java
View file @
b845d14a
...
...
@@ -36,6 +36,9 @@ public class SwqxzInfo implements Serializable {
/** 风向 */
@ApiModelProperty
(
value
=
"风向"
,
name
=
"windDirection"
)
private
java
.
lang
.
String
windDirection
;
/** 风向360 */
@ApiModelProperty
(
value
=
"风向360"
,
name
=
"windDirectionNum"
)
private
String
windDirectionNum
;
/** 光照度 */
@ApiModelProperty
(
value
=
"光照度"
,
name
=
"illuminance"
)
private
java
.
lang
.
String
illuminance
;
...
...
@@ -51,6 +54,10 @@ public class SwqxzInfo implements Serializable {
/** 电表通讯故障 */
@ApiModelProperty
(
value
=
"电表通讯故障"
,
name
=
"communicationFailure"
)
private
java
.
lang
.
String
communicationFailure
;
/** 气压 */
@ApiModelProperty
(
value
=
"气压"
,
name
=
"pressure"
)
private
java
.
lang
.
String
pressure
;
/** 类型(1手动,2节能) */
@ApiModelProperty
(
value
=
"类型(1手动,2节能)"
,
name
=
"type"
)
private
Integer
type
;
...
...
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/bean/SwqxzInfoHour.java
View file @
b845d14a
...
...
@@ -46,6 +46,9 @@ public class SwqxzInfoHour implements Serializable {
/** 辐射 */
@ApiModelProperty
(
value
=
"辐射"
,
name
=
"radiation"
)
private
java
.
lang
.
String
radiation
;
/** 气压 */
@ApiModelProperty
(
value
=
"气压"
,
name
=
"pressure"
)
private
java
.
lang
.
String
pressure
;
/** 类型(1手动,2节能) */
@ApiModelProperty
(
value
=
"类型(1手动,2节能)"
,
name
=
"type"
)
private
Integer
type
;
...
...
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/bean/TimedTask.java
View file @
b845d14a
...
...
@@ -54,7 +54,7 @@ public class TimedTask implements Serializable {
/** 备用项3 */
@ApiModelProperty
(
value
=
"备用项3"
,
name
=
"byx3"
)
private
java
.
lang
.
String
byx3
;
/** 业务类型(1
候车大厅全局 2 电动门帘
) */
/** 业务类型(1
人工 3节能
) */
@ApiModelProperty
(
value
=
"业务类型(1 候车大厅全局 2 电动门帘)"
,
name
=
"businessType"
)
private
Integer
businessType
;
/** 类型(1 上升 2 下降) */
...
...
@@ -63,4 +63,7 @@ public class TimedTask implements Serializable {
/** 温度 */
@ApiModelProperty
(
value
=
"温度"
,
name
=
"temperature"
)
private
java
.
lang
.
String
temperature
;
/** 业务子类型:节能(1:大循环,2:小循环)3:人工模式 */
@ApiModelProperty
(
value
=
"业务子类型:节能(1:大循环,2:小循环)3:人工模式"
,
name
=
"businessSonType"
)
private
Integer
businessSonType
;
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/bean/WarnInfo.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
bean
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @author dxw
*/
@Data
@ApiModel
(
value
=
"算法模块预警信息表"
,
description
=
"算法模块预警信息表"
)
@TableName
(
"warn_info"
)
public
class
WarnInfo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键id */
@ApiModelProperty
(
value
=
"主键ID"
,
name
=
"id"
)
@TableId
private
String
id
;
/** 预警类型(1:数值范围错误,2:网络问题连接不上,3:空调机组滤网压差故障,4:空调机组故障,5:恢复) */
@ApiModelProperty
(
value
=
"预警类型"
,
name
=
"infoStatus"
)
private
Integer
infoStatus
;
/** 资源点id */
@ApiModelProperty
(
value
=
"资源点id"
,
name
=
"resourceId"
)
private
String
resourceId
;
/** 资源点名称 */
@ApiModelProperty
(
value
=
"资源点名称"
,
name
=
"resourceName"
)
private
String
resourceName
;
/** 点位名称 */
@ApiModelProperty
(
value
=
"点位名称"
,
name
=
"pointName"
)
private
String
pointName
;
/** 点位id */
@ApiModelProperty
(
value
=
"点位id"
,
name
=
"pointId"
)
private
String
pointId
;
/** 预警信息 */
@ApiModelProperty
(
value
=
"预警信息"
,
name
=
"info"
)
private
String
info
;
/** 创建时间 */
@ApiModelProperty
(
value
=
"创建时间"
,
name
=
"createTime"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/bean/ZyFlrbInfo.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
bean
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author dxw
*/
@Data
@ApiModel
(
value
=
"资阳西站风冷热泵机组信息对象"
,
description
=
"风冷热泵机组信息对象"
)
@TableName
(
"zy_flrb_info"
)
public
class
ZyFlrbInfo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键id */
@ApiModelProperty
(
value
=
"主键ID"
,
name
=
"id"
)
@TableId
private
String
id
;
/** 资源点id */
@ApiModelProperty
(
value
=
"资源点id"
,
name
=
"resourceId"
)
private
String
resourceId
;
/** 供水实时温度 */
@ApiModelProperty
(
value
=
"供水温度"
,
name
=
"waterSupplyTemperature"
)
private
String
waterSupplyTemperature
;
/** 回水实时温度 */
@ApiModelProperty
(
value
=
"回水温度"
,
name
=
"returnWaterTemperature"
)
private
String
returnWaterTemperature
;
/** 总管水流量 */
@ApiModelProperty
(
value
=
"总管水流量"
,
name
=
"waterRate"
)
private
String
waterRate
;
/** 制热温度 */
@ApiModelProperty
(
value
=
"制热温度"
,
name
=
"heatingTem"
)
private
String
heatingTem
;
/** 制冷温度 */
@ApiModelProperty
(
value
=
"制冷温度"
,
name
=
"refrigerationTem"
)
private
String
refrigerationTem
;
/** 制冷制热模式切换 */
@ApiModelProperty
(
value
=
"制冷制热模式切换"
,
name
=
"switchMode"
)
private
String
switchMode
;
/** 主机状态 */
@ApiModelProperty
(
value
=
"主机状态"
,
name
=
"hostStatus"
)
private
String
hostStatus
;
/** 冷热源能耗 */
@ApiModelProperty
(
value
=
"冷热源能耗"
,
name
=
"energy"
)
private
String
energy
;
/** 类型(1手动,2节能) */
@ApiModelProperty
(
value
=
"类型(1手动,2节能)"
,
name
=
"type"
)
private
Integer
type
;
/** 站点表id */
@ApiModelProperty
(
value
=
"站点表id"
,
name
=
"stationId"
)
private
String
stationId
;
/** 创建时间 */
@ApiModelProperty
(
value
=
"创建时间"
,
name
=
"createTime"
)
private
java
.
util
.
Date
createTime
;
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/bean/ZyJfktpInfo.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
bean
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author dxw
*/
@Data
@ApiModel
(
value
=
"资阳西站空调机组信息对象"
,
description
=
"机房空调信息对象"
)
@TableName
(
"zy_jfktp_info"
)
public
class
ZyJfktpInfo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键id */
@ApiModelProperty
(
value
=
"主键ID"
,
name
=
"id"
)
@TableId
private
String
id
;
/** 资源点id */
@ApiModelProperty
(
value
=
"资源点id"
,
name
=
"resourceId"
)
private
String
resourceId
;
/** 空调回风温度 */
@ApiModelProperty
(
value
=
"空调回风温度"
,
name
=
"windTem"
)
private
String
windTem
;
/** 水阀反馈 */
@ApiModelProperty
(
value
=
"水阀反馈"
,
name
=
"waterFeedback"
)
private
String
waterFeedback
;
/** 新风温度 */
@ApiModelProperty
(
value
=
"新风温度"
,
name
=
"newTem"
)
private
String
newTem
;
/** 季节 */
@ApiModelProperty
(
value
=
"季节"
,
name
=
"season"
)
private
String
season
;
/** 滤网压差 */
@ApiModelProperty
(
value
=
"滤网压差"
,
name
=
"filterPressure"
)
private
String
filterPressure
;
/** 风机压差 */
@ApiModelProperty
(
value
=
"风机压差"
,
name
=
"fanPressure"
)
private
String
fanPressure
;
/** 状态 */
@ApiModelProperty
(
value
=
"状态"
,
name
=
"status"
)
private
String
status
;
/** 故障 */
@ApiModelProperty
(
value
=
"故障"
,
name
=
"failure"
)
private
String
failure
;
/** 手自动 */
@ApiModelProperty
(
value
=
"手自动"
,
name
=
"automatic"
)
private
String
automatic
;
/** 空调能耗 */
@ApiModelProperty
(
value
=
"空调能耗"
,
name
=
"energy"
)
private
String
energy
;
/** 类型(1手动,2节能) */
@ApiModelProperty
(
value
=
"类型(1手动,2节能)"
,
name
=
"type"
)
private
Integer
type
;
/** 站点表id */
@ApiModelProperty
(
value
=
"站点表id"
,
name
=
"stationId"
)
private
String
stationId
;
/** 创建时间 */
@ApiModelProperty
(
value
=
"创建时间"
,
name
=
"createTime"
)
private
java
.
util
.
Date
createTime
;
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/controller/AnalysisController.java
View file @
b845d14a
...
...
@@ -65,23 +65,36 @@ public class AnalysisController extends AbstractController {
startTime
=
DateUtil
.
getStringOfFirstDay
(
startTime
);
endTime
=
DateUtil
.
getStringOfLastDay
(
endTime
);
List
<
SwqxzInfoHour
>
list
=
swqxzInfoHourService
.
getList
(
startTime
,
endTime
);
//温度
List
<
List
<
String
>>
temperatureList
=
new
ArrayList
<
List
<
String
>>();
//湿度
List
<
List
<
String
>>
humidityList
=
new
ArrayList
<
List
<
String
>>();
//风速
List
<
List
<
String
>>
windSpeedList
=
new
ArrayList
<
List
<
String
>>();
//照度
List
<
List
<
String
>>
illuminanceList
=
new
ArrayList
<
List
<
String
>>();
//co2
List
<
List
<
String
>>
carbonDioxideList
=
new
ArrayList
<
List
<
String
>>();
//细粒度
List
<
List
<
String
>>
fineParticlesList
=
new
ArrayList
<
List
<
String
>>();
//辐射
List
<
List
<
String
>>
radiationList
=
new
ArrayList
<
List
<
String
>>();
List
<
List
<
String
>>
bjList
=
new
ArrayList
<
List
<
String
>>();
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
//温度详情
List
<
String
>
temperatureListDetail
=
new
ArrayList
<
String
>();
//湿度详情
List
<
String
>
humidityListDetail
=
new
ArrayList
<
String
>();
//风速详情
List
<
String
>
windSpeedListDetail
=
new
ArrayList
<
String
>();
//照度详情
List
<
String
>
illuminanceListDetail
=
new
ArrayList
<
String
>();
//co2详情
List
<
String
>
carbonDioxideListDetail
=
new
ArrayList
<
String
>();
//细粒度详情
List
<
String
>
fineParticlesListDetail
=
new
ArrayList
<
String
>();
//辐射详情
List
<
String
>
radiationListDetail
=
new
ArrayList
<
String
>();
String
time
=
DateUtils
.
format
(
list
.
get
(
i
).
getCreateTime
(),
"yyyy-MM-dd HH:mm:ss"
);
...
...
@@ -236,6 +249,19 @@ public class AnalysisController extends AbstractController {
List
<
List
<
String
>>
list
=
analysisService
.
getEnergyListFx
(
startTime
,
endTime
,
resourceType
);
return
R
.
ok
().
put
(
"list"
,
list
);
}
/**
* 资阳西站获取能耗数据分析
*
* @return
*/
@ApiOperation
(
value
=
"资阳西站获取能耗数据分析"
,
notes
=
"资阳西站获取能耗数据分析"
)
@GetMapping
(
"/getZyEnergyFx"
)
public
R
getZyEnergyFx
(
String
startTime
,
String
endTime
,
String
resourceType
)
{
startTime
=
DateUtil
.
getStringOfFirstDay
(
startTime
);
endTime
=
DateUtil
.
getStringOfLastDay
(
endTime
);
List
<
List
<
String
>>
list
=
analysisService
.
getZyEnergyFx
(
startTime
,
endTime
,
resourceType
);
return
R
.
ok
().
put
(
"list"
,
list
);
}
/**
* 数据分析-能耗数据-导出
...
...
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/controller/EquipmentController.java
View file @
b845d14a
This diff is collapsed.
Click to expand it.
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/controller/EquipmentController2.java
0 → 100644
View file @
b845d14a
This diff is collapsed.
Click to expand it.
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/controller/EquipmentController3.java
0 → 100644
View file @
b845d14a
This diff is collapsed.
Click to expand it.
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/dao/KqcljInfoDao.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
dao
;
import
com.devplatform.admin.modules.eq.bean.KqcljInfo
;
import
com.devplatform.common.dao.MyBaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.Map
;
/**
* KqcljInfo Mapper
* 用于空气处理机信息的数据库操作
* @author Administrator
*
*/
@Mapper
public
interface
KqcljInfoDao
extends
MyBaseMapper
<
KqcljInfo
>
{
List
<
Map
<
String
,
Object
>>
getList
();
BigDecimal
getTotalEnergy
(
String
time
);
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/dao/KqcljInfoHourDao.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
dao
;
import
com.devplatform.admin.modules.eq.bean.KqcljInfoHour
;
import
com.devplatform.common.dao.MyBaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* KqcljInfoHour Mapper
* 用于空气处理机信息-时的数据库操作
* @author Administrator
*
*/
@Mapper
public
interface
KqcljInfoHourDao
extends
MyBaseMapper
<
KqcljInfoHour
>
{
List
<
Map
<
String
,
Object
>>
queryListByParam
(
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
);
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/dao/SnqxzInfoDao.java
View file @
b845d14a
...
...
@@ -32,4 +32,6 @@ public interface SnqxzInfoDao extends MyBaseMapper<SnqxzInfo> {
List
<
SnqxzInfo
>
queryPageList
(
SnqxzInfoModel
model
);
List
<
Map
<
String
,
Object
>>
getList
();
List
<
Map
<
String
,
Object
>>
getList2
(
String
time
);
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/dao/SwqxzInfoDao.java
View file @
b845d14a
...
...
@@ -32,4 +32,6 @@ public interface SwqxzInfoDao extends MyBaseMapper<SwqxzInfo> {
List
<
SwqxzInfo
>
queryPageList
(
SwqxzInfoModel
model
);
List
<
Map
<
String
,
Object
>>
getList
();
List
<
Map
<
String
,
Object
>>
getList2
();
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/dao/WarnInfoDao.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
dao
;
import
com.devplatform.admin.modules.eq.bean.WarnInfo
;
import
com.devplatform.common.dao.MyBaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* WarnInfo Mapper
* 算法模块预警信息的数据库操作
* @author Administrator
*
*/
@Mapper
public
interface
WarnInfoDao
extends
MyBaseMapper
<
WarnInfo
>
{
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/dao/ZyFlrbInfoDao.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
dao
;
import
com.devplatform.admin.modules.eq.bean.ZyFlrbInfo
;
import
com.devplatform.common.dao.MyBaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.Map
;
/**
* ZyFlrbInfo Mapper
* 用于资阳西站风冷热泵机组信息的数据库操作
* @author Administrator
*
*/
@Mapper
public
interface
ZyFlrbInfoDao
extends
MyBaseMapper
<
ZyFlrbInfo
>
{
List
<
Map
<
String
,
Object
>>
getList
();
ZyFlrbInfo
selectZyFlrbInfo
(
@Param
(
"resourceId"
)
String
resourceId
,
@Param
(
"time"
)
String
time
);
BigDecimal
getTotalEnergy
(
String
time
);
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/dao/ZyJfktpInfoDao.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
dao
;
import
com.devplatform.admin.modules.eq.bean.ZyJfktpInfo
;
import
com.devplatform.common.dao.MyBaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.Map
;
/**
* JfktpInfo Mapper
* 用于资阳西站空调机组信息的数据库操作
* @author Administrator
*
*/
@Mapper
public
interface
ZyJfktpInfoDao
extends
MyBaseMapper
<
ZyJfktpInfo
>
{
List
<
Map
<
String
,
Object
>>
getList
();
ZyJfktpInfo
selectZyJfktpInfo
(
@Param
(
"resourceId"
)
String
resourceId
,
@Param
(
"time"
)
String
time
);
BigDecimal
getTotalEnergy
(
String
time
);
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/AnalysisService.java
View file @
b845d14a
...
...
@@ -17,4 +17,6 @@ public interface AnalysisService {
List
<
List
<
String
>>
getEnergyListFx
(
String
startTime
,
String
endTime
,
String
resourceType
);
void
toExcel
(
HttpServletResponse
response
,
String
startTime
,
String
endTime
,
String
resourceType
);
List
<
List
<
String
>>
getZyEnergyFx
(
String
startTime
,
String
endTime
,
String
resourceType
);
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/EquipmentService.java
View file @
b845d14a
...
...
@@ -9,4 +9,6 @@ import java.util.Map;
public
interface
EquipmentService
{
Map
<
String
,
Object
>
getList
();
Map
<
String
,
Object
>
getList2
(
String
startTime
,
String
endTime
,
String
resourceType
);
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/KqcljInfoHourService.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
service
;
import
com.devplatform.admin.modules.eq.bean.KqcljInfoHour
;
import
com.devplatform.common.service.MyBaseService
;
import
java.util.List
;
import
java.util.Map
;
/**
* 空气处理机-时的service接口
* <br>
* <b>功能:</b>JfktpInfoHourService<br>
* @author 代码生成器产生
*/
public
interface
KqcljInfoHourService
extends
MyBaseService
<
KqcljInfoHour
>
{
List
<
Map
<
String
,
Object
>>
queryListByParam
(
String
startTime
,
String
endTime
);
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/KqcljInfoService.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
service
;
import
com.devplatform.admin.modules.eq.bean.KqcljInfo
;
import
com.devplatform.common.service.MyBaseService
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.Map
;
/**
* 空气处理机信息的service接口
* <br>
* <b>功能:</b>KqcljInfoService<br>
* @author 代码生成器产生
*/
public
interface
KqcljInfoService
extends
MyBaseService
<
KqcljInfo
>
{
List
<
Map
<
String
,
Object
>>
getList
();
BigDecimal
getTotalEnergy
(
String
time
);
List
<
Map
<
String
,
Object
>>
queryListByParam
(
String
startTime
,
String
endTime
);
}
\ No newline at end of file
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/SnqxzInfoService.java
View file @
b845d14a
...
...
@@ -23,4 +23,6 @@ public interface SnqxzInfoService extends MyBaseService<SnqxzInfo> {
List
<
SnqxzInfo
>
queryPageList
(
SnqxzInfoModel
model
);
List
<
Map
<
String
,
Object
>>
getList
();
List
<
Map
<
String
,
Object
>>
getList2
(
String
time
);
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/SwqxzInfoService.java
View file @
b845d14a
...
...
@@ -23,4 +23,5 @@ public interface SwqxzInfoService extends MyBaseService<SwqxzInfo> {
List
<
SwqxzInfo
>
queryPageList
(
SwqxzInfoModel
model
);
List
<
Map
<
String
,
Object
>>
getList
();
List
<
Map
<
String
,
Object
>>
getList2
();
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/WarnInfoService.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
service
;
import
com.devplatform.admin.modules.eq.bean.WarnInfo
;
import
com.devplatform.common.service.MyBaseService
;
import
java.util.List
;
/**
* 算法模块预警信息的service接口
* <br>
* <b>功能:</b>TotalMonthService<br>
* @author 代码生成器产生
*/
public
interface
WarnInfoService
extends
MyBaseService
<
WarnInfo
>
{
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/ZyFlrbInfoService.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
service
;
import
com.devplatform.admin.modules.eq.bean.ZyFlrbInfo
;
import
com.devplatform.common.service.MyBaseService
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.Map
;
/**
* 资阳西站风冷热泵机组信息的service接口
* <br>
* <b>功能:</b>FlrbInfoService<br>
* @author 代码生成器产生
*/
public
interface
ZyFlrbInfoService
extends
MyBaseService
<
ZyFlrbInfo
>
{
List
<
Map
<
String
,
Object
>>
getList
();
ZyFlrbInfo
selectZyFlrbInfo
(
String
resourceId
,
String
time
);
BigDecimal
getTotalEnergy
(
String
time
);
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/ZyJfktpInfoService.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
service
;
import
com.devplatform.admin.modules.eq.bean.ZyJfktpInfo
;
import
com.devplatform.common.service.MyBaseService
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.Map
;
/**
* 资阳西站空调机组信息的service接口
* <br>
* <b>功能:</b>JfktpInfoService<br>
* @author 代码生成器产生
*/
public
interface
ZyJfktpInfoService
extends
MyBaseService
<
ZyJfktpInfo
>
{
List
<
Map
<
String
,
Object
>>
getList
();
ZyJfktpInfo
selectZyJfktpInfo
(
String
resourceId
,
String
time
);
BigDecimal
getTotalEnergy
(
String
time
);
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/impl/AnalysisServiceImpl.java
View file @
b845d14a
This diff is collapsed.
Click to expand it.
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/impl/EquipmentServiceImpl.java
View file @
b845d14a
This diff is collapsed.
Click to expand it.
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/impl/FlrbInfoServiceImpl.java
View file @
b845d14a
...
...
@@ -69,7 +69,8 @@ public class FlrbInfoServiceImpl extends MyBaseServiceImpl<FlrbInfoDao, FlrbInfo
@Override
public
List
<
Map
<
String
,
Object
>>
queryListByParam
(
String
startTime
,
String
endTime
)
{
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
int
type
=
DateUtil
.
checkTimeToType
(
startTime
,
endTime
);
//int type = DateUtil.checkTimeToType(startTime,endTime);
int
type
=
1
;
if
(
type
==
Constants
.
INT_1
){
list
=
flrbInfoHourService
.
queryListByParam
(
startTime
,
endTime
);
}
else
if
(
type
==
Constants
.
INT_2
||
type
==
Constants
.
INT_3
){
...
...
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/impl/JfktpInfoServiceImpl.java
View file @
b845d14a
...
...
@@ -70,7 +70,8 @@ public class JfktpInfoServiceImpl extends MyBaseServiceImpl<JfktpInfoDao, JfktpI
@Override
public
List
<
Map
<
String
,
Object
>>
queryListByParam
(
String
startTime
,
String
endTime
)
{
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
int
type
=
DateUtil
.
checkTimeToType
(
startTime
,
endTime
);
//int type = DateUtil.checkTimeToType(startTime,endTime);
int
type
=
1
;
if
(
type
==
Constants
.
INT_1
){
list
=
jfktpInfoHourService
.
queryListByParam
(
startTime
,
endTime
);
}
else
if
(
type
==
Constants
.
INT_2
||
type
==
Constants
.
INT_3
){
...
...
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/impl/KqcljInfoHourServiceImpl.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
service
.
impl
;
import
com.devplatform.admin.modules.eq.bean.KqcljInfoHour
;
import
com.devplatform.admin.modules.eq.dao.KqcljInfoHourDao
;
import
com.devplatform.admin.modules.eq.service.KqcljInfoHourService
;
import
com.devplatform.common.service.impl.MyBaseServiceImpl
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
/**
* 空气处理机机组信息-时的service接口实现类
* <br>
* <b>功能:</b>KqcljInfoHourServiceImpl<br>
* @author 代码生成器产生
*/
@Service
(
"kqcljInfoHourService"
)
public
class
KqcljInfoHourServiceImpl
extends
MyBaseServiceImpl
<
KqcljInfoHourDao
,
KqcljInfoHour
>
implements
KqcljInfoHourService
{
@Override
public
List
<
Map
<
String
,
Object
>>
queryListByParam
(
String
startTime
,
String
endTime
)
{
return
baseMapper
.
queryListByParam
(
startTime
,
endTime
);
}
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/impl/KqcljServiceImpl.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
service
.
impl
;
import
com.devplatform.admin.common.utils.Constants
;
import
com.devplatform.admin.modules.eq.bean.KqcljInfo
;
import
com.devplatform.admin.modules.eq.dao.KqcljInfoDao
;
import
com.devplatform.admin.modules.eq.service.KqcljInfoHourService
;
import
com.devplatform.admin.modules.eq.service.KqcljInfoService
;
import
com.devplatform.common.service.impl.MyBaseServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
/**
* 空气处理机信息的service接口实现类
* <br>
* <b>功能:</b>KqcljServiceImpl<br>
* @author 代码生成器产生
*/
@Service
(
"kqcljInfoService"
)
public
class
KqcljServiceImpl
extends
MyBaseServiceImpl
<
KqcljInfoDao
,
KqcljInfo
>
implements
KqcljInfoService
{
@Autowired
private
KqcljInfoHourService
kqcljInfoHourService
;
@Override
public
List
<
Map
<
String
,
Object
>>
getList
()
{
return
baseMapper
.
getList
();
}
@Override
public
BigDecimal
getTotalEnergy
(
String
time
)
{
return
baseMapper
.
getTotalEnergy
(
time
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
queryListByParam
(
String
startTime
,
String
endTime
)
{
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
int
type
=
1
;
if
(
type
==
Constants
.
INT_1
){
list
=
kqcljInfoHourService
.
queryListByParam
(
startTime
,
endTime
);
}
return
list
;
}
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/impl/SnqxzInfoServiceImpl.java
View file @
b845d14a
...
...
@@ -30,4 +30,9 @@ public class SnqxzInfoServiceImpl extends MyBaseServiceImpl<SnqxzInfoDao, SnqxzI
public
List
<
Map
<
String
,
Object
>>
getList
()
{
return
baseMapper
.
getList
();
}
@Override
public
List
<
Map
<
String
,
Object
>>
getList2
(
String
time
)
{
return
baseMapper
.
getList2
(
time
);
}
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/impl/SwqxzInfoServiceImpl.java
View file @
b845d14a
...
...
@@ -30,4 +30,8 @@ public class SwqxzInfoServiceImpl extends MyBaseServiceImpl<SwqxzInfoDao, SwqxzI
public
List
<
Map
<
String
,
Object
>>
getList
()
{
return
baseMapper
.
getList
();
}
@Override
public
List
<
Map
<
String
,
Object
>>
getList2
()
{
return
baseMapper
.
getList2
();
}
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/impl/WarnInfoServiceImpl.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.devplatform.admin.modules.eq.bean.WarnInfo
;
import
com.devplatform.admin.modules.eq.dao.WarnInfoDao
;
import
com.devplatform.admin.modules.eq.service.WarnInfoService
;
import
com.devplatform.common.service.impl.MyBaseServiceImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.UUID
;
/**
* 算法模块预警信息service接口实现类
* <br>
* <b>功能:</b>WarnInfoServiceImpl<br>
* @author 代码生成器产生
*/
@Service
(
"warnInfoService"
)
public
class
WarnInfoServiceImpl
extends
MyBaseServiceImpl
<
WarnInfoDao
,
WarnInfo
>
implements
WarnInfoService
{
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/impl/ZyFlrbInfoServiceImpl.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
service
.
impl
;
import
com.devplatform.admin.modules.eq.bean.ZyFlrbInfo
;
import
com.devplatform.admin.modules.eq.dao.ZyFlrbInfoDao
;
import
com.devplatform.admin.modules.eq.service.ZyFlrbInfoService
;
import
com.devplatform.common.service.impl.MyBaseServiceImpl
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.Map
;
/**
* 资阳西站风冷热泵机组信息的service接口实现类
* <br>
* <b>功能:</b>ZyFlrbInfoServiceImpl<br>
* @author 代码生成器产生
*/
@Service
(
"zyFlrbInfoService"
)
public
class
ZyFlrbInfoServiceImpl
extends
MyBaseServiceImpl
<
ZyFlrbInfoDao
,
ZyFlrbInfo
>
implements
ZyFlrbInfoService
{
@Override
public
List
<
Map
<
String
,
Object
>>
getList
()
{
return
baseMapper
.
getList
();
}
@Override
public
ZyFlrbInfo
selectZyFlrbInfo
(
String
resourceId
,
String
time
)
{
return
baseMapper
.
selectZyFlrbInfo
(
resourceId
,
time
);
}
@Override
public
BigDecimal
getTotalEnergy
(
String
time
)
{
return
baseMapper
.
getTotalEnergy
(
time
);
}
}
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/service/impl/ZyJfktpInfoServiceImpl.java
0 → 100644
View file @
b845d14a
package
com
.
devplatform
.
admin
.
modules
.
eq
.
service
.
impl
;
import
com.devplatform.admin.modules.eq.bean.ZyJfktpInfo
;
import
com.devplatform.admin.modules.eq.dao.ZyJfktpInfoDao
;
import
com.devplatform.admin.modules.eq.service.ZyJfktpInfoService
;
import
com.devplatform.common.service.impl.MyBaseServiceImpl
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.Map
;
/**
* 资阳西站空调机组信息的service接口实现类
* <br>
* <b>功能:</b>ZyJfktpInfoServiceImpl<br>
* @author 代码生成器产生
*/
@Service
(
"zyJfktpInfoService"
)
public
class
ZyJfktpInfoServiceImpl
extends
MyBaseServiceImpl
<
ZyJfktpInfoDao
,
ZyJfktpInfo
>
implements
ZyJfktpInfoService
{
@Override
public
List
<
Map
<
String
,
Object
>>
getList
()
{
return
baseMapper
.
getList
();
}
@Override
public
ZyJfktpInfo
selectZyJfktpInfo
(
String
resourceId
,
String
time
)
{
return
baseMapper
.
selectZyJfktpInfo
(
resourceId
,
time
);
}
@Override
public
BigDecimal
getTotalEnergy
(
String
time
)
{
return
baseMapper
.
getTotalEnergy
(
time
);
}
}
microservice-admin/src/main/java/com/devplatform/admin/modules/liresource/dao/LiResourceDao.java
View file @
b845d14a
...
...
@@ -67,4 +67,6 @@ public interface LiResourceDao extends MyBaseMapper<LiResource> {
* @return
*/
List
<
LiResource
>
queryListByParam
(
String
modeTypes
);
List
<
LiResource
>
selectResourceList
();
}
microservice-admin/src/main/java/com/devplatform/admin/modules/liresource/service/LiResourceService.java
View file @
b845d14a
...
...
@@ -61,4 +61,6 @@ public interface LiResourceService extends MyBaseService<LiResource> {
* @return
*/
List
<
LiResource
>
queryListByParam
(
String
modeTypes
);
List
<
LiResource
>
selectResourceList
();
}
microservice-admin/src/main/java/com/devplatform/admin/modules/liresource/service/impl/LiResourceServiceImpl.java
View file @
b845d14a
...
...
@@ -51,4 +51,8 @@ public class LiResourceServiceImpl extends MyBaseServiceImpl<LiResourceDao, LiRe
return
baseMapper
.
queryListByParam
(
modeTypes
);
}
@Override
public
List
<
LiResource
>
selectResourceList
()
{
return
baseMapper
.
selectResourceList
();
}
}
microservice-admin/src/main/java/com/devplatform/admin/modules/sys/controller/SysLoginController.java
View file @
b845d14a
...
...
@@ -99,10 +99,10 @@ public class SysLoginController extends AbstractController {
@ApiImplicitParam
(
name
=
"form"
,
value
=
"用户实体类"
,
required
=
true
,
paramType
=
"query"
,
dataType
=
"SysLoginForm"
)
@PostMapping
(
"/sys/login"
)
public
Map
<
String
,
Object
>
login
(
@RequestBody
SysLoginForm
form
)
{
String
str
=
LicenseAuth
.
authLicense
(
environment
);
if
(!
str
.
equals
(
"YES"
))
{
return
R
.
error
(
str
);
}
//
String str = LicenseAuth.authLicense(environment);
//
if(!str.equals("YES")) {
//
return R.error(str);
//
}
boolean
captcha
=
sysCaptchaService
.
validate
(
form
.
getUuid
(),
form
.
getCaptcha
());
if
(!
captcha
){
return
R
.
error
(
"验证码不正确"
);
...
...
microservice-admin/src/main/resources/application.yml
View file @
b845d14a
...
...
@@ -16,5 +16,9 @@ mybatis-plus:
#cache-enabled: false
#call-setters-on-nulls: true
#节能大循环节能算法间隔30分钟
bigTime
:
30
#节能小循环节能算法间隔10分钟
smallTime
:
10
microservice-admin/src/main/resources/mapper/eq/FlrbInfoMapper.xml
View file @
b845d14a
microservice-admin/src/main/resources/mapper/eq/JfktpInfoMapper.xml
View file @
b845d14a
microservice-admin/src/main/resources/mapper/eq/KqcljInfoHourMapper.xml
0 → 100644
View file @
b845d14a
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.devplatform.admin.modules.eq.dao.KqcljInfoHourDao"
>
<!-- Result Map -->
<resultMap
id=
"BaseResultMap"
type=
"com.devplatform.admin.modules.eq.bean.KqcljInfoHour"
>
<result
column=
"id"
property=
"id"
/>
<result
column=
"resource_id"
property=
"resourceId"
/>
<result
column=
"electric_energy"
property=
"electricEnergy"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"station_id"
property=
"stationId"
/>
<result
column=
"create_time"
property=
"createTime"
/>
</resultMap>
<!-- flrb_info_hour table all fields -->
<sql
id=
"Base_Column_List"
>
id,resource_id,electric_energy,type,station_id,create_time
</sql>
<!-- 公共查询条件 -->
<sql
id=
"Example_Where_Clause"
>
where t.deleted=0
<if
test=
"id!=null and id!=''"
>
and t.id = #{id}
</if>
<if
test=
"resourceId!=null and resourceId!=''"
>
and t.resource_id = #{resourceId}
</if>
<if
test=
"electricEnergy!=null and electricEnergy!=''"
>
and t.electric_energy = #{electricEnergy}
</if>
<if
test=
"type!=null "
>
and t.type = #{type}
</if>
<if
test=
"stationId!=null and stationId!=''"
>
and t.station_id = #{stationId}
</if>
<if
test=
"createTime!=null "
>
and t.create_time = #{createTime}
</if>
</sql>
<select
id=
"queryListByParam"
resultType=
"java.util.Map"
>
select create_time,cast(sum(cast(electric_energy as decimal(10, 2))) as decimal(10, 2)) as electric_energy
from kqclj_info_hour
where 1=1
<if
test=
"(startTime == null or startTime == '') and (endTime == null or endTime == '')"
>
and TO_DAYS(create_time) = TO_DAYS(NOW())
</if>
<if
test=
"startTime != null and startTime != ''"
>
and create_time
>
= #{startTime}
</if>
<if
test=
"endTime != null and endTime != ''"
>
and create_time
<
= #{endTime}
</if>
group by create_time
order by create_time
</select>
</mapper>
microservice-admin/src/main/resources/mapper/eq/KqcljInfoMapper.xml
0 → 100644
View file @
b845d14a
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.devplatform.admin.modules.eq.dao.KqcljInfoDao"
>
<!-- Result Map -->
<resultMap
id=
"BaseResultMap"
type=
"com.devplatform.admin.modules.eq.bean.KqcljInfo"
>
<result
column=
"id"
property=
"id"
/>
<result
column=
"resource_id"
property=
"resourceId"
/>
<result
column=
"energy"
property=
"energy"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"station_id"
property=
"stationId"
/>
<result
column=
"create_time"
property=
"createTime"
/>
</resultMap>
<!-- kqclj_info table all fields -->
<sql
id=
"Base_Column_List"
>
id,resource_id,energy,type,station_id,create_time
</sql>
<!-- 公共查询条件 -->
<sql
id=
"Example_Where_Clause"
>
where t.deleted=0
<if
test=
"id!=null and id!=''"
>
and t.id = #{id}
</if>
<if
test=
"resourceId!=null and resourceId!=''"
>
and t.resource_id = #{resourceId}
</if>
<if
test=
"energy!=null and energy!=''"
>
and t.energy = #{energy}
</if>
<if
test=
"type!=null "
>
and t.type = #{type}
</if>
<if
test=
"stationId!=null and stationId!=''"
>
and t.station_id = #{stationId}
</if>
<if
test=
"createTime!=null "
>
and t.create_time = #{createTime}
</if>
</sql>
<select
id=
"getList"
resultType=
"java.util.Map"
>
SELECT t1.*,li.name as resourceName,li.remark as remark,li.deploy_location as deployLocation,li.status as status,li.region as region
FROM kqclj_info AS t1
INNER JOIN
(SELECT t2.resource_id, MAX(t2.create_time) AS maxdate
FROM kqclj_info AS t2
GROUP BY t2.resource_id) AS t3 ON t1.resource_id = t3.resource_id AND t1.create_time = t3.maxdate
left join li_resource li on li.id = t1.resource_id
</select>
<select
id=
"getTotalEnergy"
resultType=
"java.math.BigDecimal"
>
SELECT
cast(sum(cast(energy as decimal(10, 2))) as decimal(10, 2)) as totalEnergy
FROM
kqclj_info
WHERE 1 = 1
AND date_format( create_time, '%Y%m%d' ) = #{time}
</select>
</mapper>
microservice-admin/src/main/resources/mapper/eq/SnqxzInfoMapper.xml
View file @
b845d14a
...
...
@@ -57,7 +57,15 @@
GROUP BY t2.resource_id) AS t3 ON t1.resource_id = t3.resource_id AND t1.create_time = t3.maxdate
left join li_resource li on li.id = t1.resource_id
</select>
<select
id=
"getList2"
resultType=
"java.util.Map"
>
SELECT
cast(AVG(cast(temperature as decimal(10, 1))) as decimal(10, 1)) as temperature,
cast(AVG(cast(humidity as decimal(10, 1))) as decimal(10, 1)) as humidity
FROM
snqxz_info_hour
where
date_format(create_time,'%Y%m%d%H') = #{time}
</select>
</mapper>
microservice-admin/src/main/resources/mapper/eq/SwqxzInfoHourMapper.xml
View file @
b845d14a
...
...
@@ -13,6 +13,7 @@
<result
column=
"carbon_dioxide"
property=
"carbonDioxide"
/>
<result
column=
"fine_particles"
property=
"fineParticles"
/>
<result
column=
"radiation"
property=
"radiation"
/>
<result
column=
"pressure"
property=
"pressure"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"station_id"
property=
"stationId"
/>
<result
column=
"create_time"
property=
"createTime"
/>
...
...
@@ -20,7 +21,7 @@
<!-- swqxz_info_hour table all fields -->
<sql
id=
"Base_Column_List"
>
id,resource_id,temperature,humidity,wind_speed,wind_direction,illuminance,carbon_dioxide,fine_particles,radiation,type,station_id,create_time
id,resource_id,temperature,humidity,wind_speed,wind_direction,illuminance,carbon_dioxide,fine_particles,radiation,
pressure,
type,station_id,create_time
</sql>
<!-- 公共查询条件 -->
...
...
@@ -39,6 +40,7 @@
<if
test=
"type!=null "
>
and t.type = #{type}
</if>
<if
test=
"stationId!=null and stationId!=''"
>
and t.station_id = #{stationId}
</if>
<if
test=
"createTime!=null "
>
and t.create_time = #{createTime}
</if>
<if
test=
"pressure!=null and pressure!=''"
>
and t.pressure = #{pressure}
</if>
</sql>
<select
id=
"queryPageByCount"
parameterType=
"Object"
resultType=
"java.lang.Integer"
>
...
...
microservice-admin/src/main/resources/mapper/eq/SwqxzInfoMapper.xml
View file @
b845d14a
...
...
@@ -9,11 +9,13 @@
<result
column=
"humidity"
property=
"humidity"
/>
<result
column=
"wind_speed"
property=
"windSpeed"
/>
<result
column=
"wind_direction"
property=
"windDirection"
/>
<result
column=
"wind_direction_num"
property=
"windDirectionNum"
/>
<result
column=
"illuminance"
property=
"illuminance"
/>
<result
column=
"carbon_dioxide"
property=
"carbonDioxide"
/>
<result
column=
"fine_particles"
property=
"fineParticles"
/>
<result
column=
"radiation"
property=
"radiation"
/>
<result
column=
"communication_failure"
property=
"communicationFailure"
/>
<result
column=
"pressure"
property=
"pressure"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"station_id"
property=
"stationId"
/>
<result
column=
"create_time"
property=
"createTime"
/>
...
...
@@ -21,7 +23,7 @@
<!-- swqxz_info table all fields -->
<sql
id=
"Base_Column_List"
>
id,resource_id,temperature,humidity,wind_speed,wind_direction,
illuminance,carbon_dioxide,fine_particles,radiation,communication_fail
ure,type,station_id,create_time
id,resource_id,temperature,humidity,wind_speed,wind_direction,
wind_direction_num,illuminance,carbon_dioxide,fine_particles,radiation,communication_failure,press
ure,type,station_id,create_time
</sql>
<!-- 公共查询条件 -->
...
...
@@ -33,11 +35,13 @@
<if
test=
"humidity!=null and humidity!=''"
>
and t.humidity = #{humidity}
</if>
<if
test=
"windSpeed!=null and windSpeed!=''"
>
and t.wind_speed = #{windSpeed}
</if>
<if
test=
"windDirection!=null and windDirection!=''"
>
and t.wind_direction = #{windDirection}
</if>
<if
test=
"windDirectionNum!=null and windDirectionNum!=''"
>
and t.wind_direction_num = #{windDirectionNum}
</if>
<if
test=
"illuminance!=null and illuminance!=''"
>
and t.illuminance = #{illuminance}
</if>
<if
test=
"carbonDioxide!=null and carbonDioxide!=''"
>
and t.carbon_dioxide = #{carbonDioxide}
</if>
<if
test=
"fineParticles!=null and fineParticles!=''"
>
and t.fine_particles = #{fineParticles}
</if>
<if
test=
"radiation!=null and radiation!=''"
>
and t.radiation = #{radiation}
</if>
<if
test=
"communicationFailure!=null and communicationFailure!=''"
>
and t.communication_failure = #{communicationFailure}
</if>
<if
test=
"pressure!=null and pressure!=''"
>
and t.pressure = #{pressure}
</if>
<if
test=
"type!=null "
>
and t.type = #{type}
</if>
<if
test=
"stationId!=null and stationId!=''"
>
and t.station_id = #{stationId}
</if>
<if
test=
"createTime!=null "
>
and t.create_time = #{createTime}
</if>
...
...
@@ -67,7 +71,9 @@
GROUP BY t2.resource_id) AS t3 ON t1.resource_id = t3.resource_id AND t1.create_time = t3.maxdate
left join li_resource li on li.id = t1.resource_id
</select>
<select
id=
"getList2"
resultType=
"java.util.Map"
>
SELECT * FROM swqxz_info order by create_time desc limit 1
</select>
</mapper>
microservice-admin/src/main/resources/mapper/eq/WarnInfoMapper.xml
0 → 100644
View file @
b845d14a
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.devplatform.admin.modules.eq.dao.WarnInfoDao"
>
</mapper>
microservice-admin/src/main/resources/mapper/eq/ZyFlrbInfoMapper.xml
0 → 100644
View file @
b845d14a
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.devplatform.admin.modules.eq.dao.ZyFlrbInfoDao"
>
<!-- Result Map -->
<resultMap
id=
"BaseResultMap"
type=
"com.devplatform.admin.modules.eq.bean.ZyFlrbInfo"
>
<result
column=
"id"
property=
"id"
/>
<result
column=
"resource_id"
property=
"resourceId"
/>
<result
column=
"water_supply_temperature"
property=
"waterSupplyTemperature"
/>
<result
column=
"return_water_temperature"
property=
"returnWaterTemperature"
/>
<result
column=
"water_rate"
property=
"waterRate"
/>
<result
column=
"heating_tem"
property=
"heatingTem"
/>
<result
column=
"refrigeration_tem"
property=
"refrigerationTem"
/>
<result
column=
"switch_mode"
property=
"switchMode"
/>
<result
column=
"host_status"
property=
"hostStatus"
/>
<result
column=
"energy"
property=
"energy"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"station_id"
property=
"stationId"
/>
<result
column=
"create_time"
property=
"createTime"
/>
</resultMap>
<!-- zy_flrb_info table all fields -->
<sql
id=
"Base_Column_List"
>
id,resource_id,water_supply_temperature,return_water_temperature,water_rate,heating_tem,refrigeration_tem,switch_mode,host_status,energy,type,station_id,create_time
</sql>
<!-- 公共查询条件 -->
<sql
id=
"Example_Where_Clause"
>
where t.deleted=0
<if
test=
"id!=null and id!=''"
>
and t.id = #{id}
</if>
<if
test=
"resourceId!=null and resourceId!=''"
>
and t.resource_id = #{resourceId}
</if>
<if
test=
"waterSupplyTemperature!=null and waterSupplyTemperature!=''"
>
and t.water_supply_temperature = #{waterSupplyTemperature}
</if>
<if
test=
"returnWaterTemperature!=null and returnWaterTemperature!=''"
>
and t.return_water_temperature = #{returnWaterTemperature}
</if>
<if
test=
"waterRate!=null and waterRate!=''"
>
and t.water_rate = #{waterRate}
</if>
<if
test=
"heatingTem!=null and heatingTem!=''"
>
and t.heating_tem = #{heatingTem}
</if>
<if
test=
"refrigerationTem!=null and refrigerationTem!=''"
>
and t.refrigeration_tem = #{refrigerationTem}
</if>
<if
test=
"switchMode!=null and switchMode!=''"
>
and t.switch_mode = #{switchMode}
</if>
<if
test=
"hostStatus!=null and hostStatus!=''"
>
and t.host_status = #{hostStatus}
</if>
<if
test=
"energy!=null and energy!=''"
>
and t.energy = #{energy}
</if>
<if
test=
"type!=null "
>
and t.type = #{type}
</if>
<if
test=
"stationId!=null and stationId!=''"
>
and t.station_id = #{stationId}
</if>
<if
test=
"createTime!=null "
>
and t.create_time = #{createTime}
</if>
</sql>
<select
id=
"getList"
resultType=
"java.util.Map"
>
SELECT t1.*,li.name as resourceName,li.remark as remark,li.deploy_location as deployLocation,li.status as status,li.region as region
FROM zy_flrb_info AS t1
INNER JOIN
(SELECT t2.resource_id, MAX(t2.create_time) AS maxdate
FROM zy_flrb_info AS t2
GROUP BY t2.resource_id) AS t3 ON t1.resource_id = t3.resource_id AND t1.create_time = t3.maxdate
left join li_resource li on li.id = t1.resource_id
</select>
<select
id=
"selectZyFlrbInfo"
resultType=
"com.devplatform.admin.modules.eq.bean.ZyFlrbInfo"
>
SELECT * FROM zy_flrb_info WHERE 1 = 1 AND date_format( create_time, '%Y%m%d%H' ) = #{time}
AND resource_id = #{resourceId} ORDER BY create_time DESC LIMIT 1
</select>
<select
id=
"getTotalEnergy"
resultType=
"java.math.BigDecimal"
>
SELECT
cast(sum(cast(energy as decimal(10, 2))) as decimal(10, 2)) as totalEnergy
FROM
zy_flrb_info
WHERE 1 = 1
AND date_format( create_time, '%Y%m%d' ) = #{time}
</select>
</mapper>
microservice-admin/src/main/resources/mapper/eq/ZyJfktpInfoMapper.xml
0 → 100644
View file @
b845d14a
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.devplatform.admin.modules.eq.dao.ZyJfktpInfoDao"
>
<!-- Result Map -->
<resultMap
id=
"BaseResultMap"
type=
"com.devplatform.admin.modules.eq.bean.ZyJfktpInfo"
>
<result
column=
"id"
property=
"id"
/>
<result
column=
"resource_id"
property=
"resourceId"
/>
<result
column=
"wind_tem"
property=
"windTem"
/>
<result
column=
"water_feedback"
property=
"waterFeedback"
/>
<result
column=
"new_tem"
property=
"newTem"
/>
<result
column=
"season"
property=
"season"
/>
<result
column=
"filter_pressure"
property=
"filterPressure"
/>
<result
column=
"fan_pressure"
property=
"fanPressure"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"failure"
property=
"failure"
/>
<result
column=
"automatic"
property=
"automatic"
/>
<result
column=
"energy"
property=
"energy"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"station_id"
property=
"stationId"
/>
<result
column=
"create_time"
property=
"createTime"
/>
</resultMap>
<!-- zy_jfktp_info table all fields -->
<sql
id=
"Base_Column_List"
>
id,resource_id,wind_tem,water_feedback,new_tem,season,filter_pressure,fan_pressure,status,failure,automatic,energy,type,station_id,create_time
</sql>
<!-- 公共查询条件 -->
<sql
id=
"Example_Where_Clause"
>
where t.deleted=0
<if
test=
"id!=null and id!=''"
>
and t.id = #{id}
</if>
<if
test=
"resourceId!=null and resourceId!=''"
>
and t.resource_id = #{resourceId}
</if>
<if
test=
"windTem!=null and windTem!=''"
>
and t.wind_tem = #{windTem}
</if>
<if
test=
"waterFeedback!=null and waterFeedback!=''"
>
and t.water_feedback = #{waterFeedback}
</if>
<if
test=
"newTem!=null and newTem!=''"
>
and t.new_tem = #{newTem}
</if>
<if
test=
"season!=null and season!=''"
>
and t.season = #{season}
</if>
<if
test=
"filterPressure!=null and filterPressure!=''"
>
and t.filter_pressure = #{filterPressure}
</if>
<if
test=
"fanPressure!=null and fanPressure!=''"
>
and t.fan_pressure = #{fanPressure}
</if>
<if
test=
"status!=null and status!=''"
>
and t.status = #{status}
</if>
<if
test=
"failure!=null and failure!=''"
>
and t.failure = #{failure}
</if>
<if
test=
"automatic!=null and automatic!=''"
>
and t.automatic = #{automatic}
</if>
<if
test=
"energy!=null and energy!=''"
>
and t.energy = #{energy}
</if>
<if
test=
"type!=null "
>
and t.type = #{type}
</if>
<if
test=
"stationId!=null and stationId!=''"
>
and t.station_id = #{stationId}
</if>
<if
test=
"createTime!=null "
>
and t.create_time = #{createTime}
</if>
</sql>
<select
id=
"getList"
resultType=
"java.util.Map"
>
SELECT t1.*,li.name as resourceName,li.remark as remark,li.deploy_location as deployLocation,li.status as status
FROM zy_jfktp_info AS t1
INNER JOIN
(SELECT t2.resource_id, MAX(t2.create_time) AS maxdate
FROM zy_jfktp_info AS t2
GROUP BY t2.resource_id) AS t3 ON t1.resource_id = t3.resource_id AND t1.create_time = t3.maxdate
left join li_resource li on li.id = t1.resource_id
</select>
<select
id=
"selectZyJfktpInfo"
resultType=
"com.devplatform.admin.modules.eq.bean.ZyJfktpInfo"
>
SELECT * FROM zy_jfktp_info WHERE 1 = 1 AND date_format( create_time, '%Y%m%d%H' ) = #{time}
AND resource_id = #{resourceId} ORDER BY create_time DESC LIMIT 1
</select>
<select
id=
"getTotalEnergy"
resultType=
"java.math.BigDecimal"
>
SELECT
cast(sum(cast(energy as decimal(10, 2))) as decimal(10, 2)) as totalEnergy
FROM
zy_jfktp_info
WHERE 1 = 1
AND date_format( create_time, '%Y%m%d' ) = #{time}
</select>
</mapper>
microservice-admin/src/main/resources/mapper/liResource/LiResourceMapper.xml
View file @
b845d14a
...
...
@@ -251,6 +251,11 @@
from li_resource lr
where lr.deleted = 0 and FIND_IN_SET(#{modeTypes},lr.mode_types)
</select>
<select
id=
"selectResourceList"
resultType=
"com.devplatform.admin.modules.liresource.bean.LiResource"
>
select lr.id,lr.name
from li_resource lr
where lr.deleted = 0
</select>
</mapper>
microservice-admin/src/main/resources/mapper/sys/SysFaulalarmMapper.xml
View file @
b845d14a
...
...
@@ -92,7 +92,8 @@
<if
test=
"endTime != null and endTime != ''"
>
and start_time
<
= #{endTime}
</if>
GROUP BY date_format(start_time,'%Y%m%d%H')
-- GROUP BY date_format(start_time,'%Y%m%d%H')
GROUP BY start_time
order by start_time
</select>
...
...
microservice-config-server/src/main/resources/application-dev.yml
View file @
b845d14a
...
...
@@ -60,13 +60,13 @@ spring:
datasource
:
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.jdbc.Driver
#
url: jdbc:mysql://localhost:3306/energy?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&allowMultiQueries=true&serverTimezone=GMT%2B8&useSSL=false
url
:
jdbc:mysql://localhost:3306/energy?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&allowMultiQueries=true&serverTimezone=GMT%2B8&useSSL=false
# username: root
# password: 123456
# url: jdbc:mysql://47.94.207.62:3306/energy?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&allowMultiQueries=true&serverTimezone=GMT%2B8&useSSL=false
# username: root
# password: superAdmin&321
url
:
jdbc:mysql://10.20.2.33:3306/energy?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&allowMultiQueries=true&serverTimezone=GMT%2B8&useSSL=false
#
url: jdbc:mysql://10.20.2.33:3306/energy?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&allowMultiQueries=true&serverTimezone=GMT%2B8&useSSL=false
username
:
root
password
:
root
initialSize
:
5
...
...
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