Merge branch 'master' of http://39.105.213.67:3000/hwj_system/psdc
commit
1294a2cd98
@ -0,0 +1,27 @@ |
||||
package com.psdc.entity.res; |
||||
|
||||
import lombok.AllArgsConstructor; |
||||
import lombok.Data; |
||||
import lombok.NoArgsConstructor; |
||||
|
||||
/** |
||||
* @Author:戴仕崑 |
||||
* @Project:psdc |
||||
* @Filename:TodayThisHourUseElectricInfoRes |
||||
* @Date:2023/5/10 15:20 |
||||
* @Version 1.0 |
||||
*/ |
||||
@Data |
||||
@AllArgsConstructor |
||||
@NoArgsConstructor |
||||
public class TodayThisHourUseElectricInfoRes { |
||||
|
||||
Integer id; // 序号
|
||||
String hour; // 当前小时间段
|
||||
Integer deviceId; // 设备Id
|
||||
String simDate; // 更新日期
|
||||
String upDateTime; // 更新时间
|
||||
Double useElectric; // 该小时间段用电量
|
||||
|
||||
|
||||
} |
@ -0,0 +1,24 @@ |
||||
package com.psdc.service; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @Author:戴仕崑 |
||||
* @Project:psdc |
||||
* @Filename:IPsdcElectricHtdata |
||||
* @Date:2023/5/10 9:00 |
||||
* @Version 1.0 |
||||
*/ |
||||
public interface IPsdcElectricHtdataService { |
||||
|
||||
|
||||
Map selTotalElectricityInfo(); |
||||
|
||||
List selThisHourUseElectric(); |
||||
|
||||
List selDcglThisHourUseElectric(); |
||||
|
||||
List selDcglThisDayUseElectric(); |
||||
|
||||
} |
@ -0,0 +1,17 @@ |
||||
package com.psdc.service; |
||||
|
||||
import com.psdc.entity.res.PsdcDevicePowerRes; |
||||
|
||||
|
||||
/** |
||||
* @Author:戴仕崑 |
||||
* @Project:psdc |
||||
* @Filename:IPsdcElectricRtdata |
||||
* @Date:2023/5/10 9:00 |
||||
* @Version 1.0 |
||||
*/ |
||||
public interface IPsdcElectricRtdataService { |
||||
|
||||
PsdcDevicePowerRes queryById(); |
||||
|
||||
} |
@ -0,0 +1,90 @@ |
||||
package com.psdc.service.impl; |
||||
|
||||
import com.psdc.mapper.PsdcElectricHtdataMapper; |
||||
import com.psdc.service.IPsdcElectricHtdataService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.text.SimpleDateFormat; |
||||
import java.util.*; |
||||
|
||||
/** |
||||
* @Author:戴仕崑 |
||||
* @Project:psdc |
||||
* @Filename:PsdcElectricRtdataServiceImpl |
||||
* @Date:2023/5/10 9:01 |
||||
* @Version 1.0 |
||||
*/ |
||||
@Service |
||||
public class PsdcElectricHtdataServiceImpl implements IPsdcElectricHtdataService { |
||||
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); |
||||
|
||||
@Resource |
||||
PsdcElectricHtdataMapper electricHtdataMapper; |
||||
|
||||
/** |
||||
* 总电表查询 |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public Map selTotalElectricityInfo() { |
||||
Date date = new Date(); |
||||
Map<String, Double> map = new HashMap<>(); |
||||
String tb = df.format(date) + " 00:00:00"; // 今天开始检索时间
|
||||
String te = df.format(date) + " 23:59:59"; // 今天结束检索时间
|
||||
String mb = benYue()[0] + " 00:00:00"; // 本月开始检索时间
|
||||
String me = benYue()[1] + " 23:59:59"; // 本月结束检索时间
|
||||
Double todayUseElectric = electricHtdataMapper.selTodayUseEnergy(13, tb, te);// 总电表今日用电量
|
||||
Double toMonthUseElectric = electricHtdataMapper.selTodayUseEnergy(13, mb, me);// 总电表本月用电量
|
||||
map.put("eday", todayUseElectric); |
||||
map.put("emonth", toMonthUseElectric); |
||||
return map; |
||||
} |
||||
|
||||
/** |
||||
* 总电表查询日用电量集合 |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public List selThisHourUseElectric() { |
||||
return electricHtdataMapper.selThisHourUseElectric(13, df.format(new Date())); |
||||
} |
||||
|
||||
/** |
||||
* 电磁锅炉查询日用电量 |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public List selDcglThisHourUseElectric() { |
||||
return electricHtdataMapper.selThisHourUseElectric(1, df.format(new Date())); |
||||
} |
||||
/** |
||||
* 电磁锅炉查询月用电量 |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public List selDcglThisDayUseElectric() { |
||||
return electricHtdataMapper.selThisDayUseElectric(1, df.format(new Date()).substring(0,7)); |
||||
} |
||||
|
||||
|
||||
private String[] benYue(){ |
||||
String startDay = df.format(new Date()); |
||||
String[] s1 = new String[2]; |
||||
|
||||
Calendar calendar = Calendar.getInstance(); |
||||
calendar.set(Integer.parseInt(startDay.substring(0,4)), Integer.parseInt(startDay.substring(5,7)) - 1, 1); |
||||
String firstDayOfMonth = df.format(calendar.getTime()); |
||||
s1[0] = firstDayOfMonth; |
||||
// 这里先设置要获取月份的下月的第一天
|
||||
calendar.set(Integer.parseInt(startDay.substring(0,4)), Integer.parseInt(startDay.substring(5,7)), 1); |
||||
// 这里将日期值减去一天,从而获取到要求的月份最后一天
|
||||
calendar.add(Calendar.DATE, -1); |
||||
String lastDayOfMonth = df.format(calendar.getTime()); |
||||
s1[1] = lastDayOfMonth; |
||||
|
||||
return s1; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,47 @@ |
||||
package com.psdc.service.impl; |
||||
|
||||
import com.psdc.entity.PsdcDevicePowerHdata96; |
||||
import com.psdc.entity.res.PsdcDevicePowerRes; |
||||
import com.psdc.mapper.PsdcDevicePowerHdata96Mapper; |
||||
import com.psdc.mapper.PsdcElectricRtdataMapper; |
||||
import com.psdc.service.IPsdcElectricRtdataService; |
||||
import com.psdc.utils.SecurityUtils; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.text.SimpleDateFormat; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @Author:戴仕崑 |
||||
* @Project:psdc |
||||
* @Filename:PsdcElectricRtdataServiceImpl |
||||
* @Date:2023/5/10 16:08 |
||||
* @Version 1.0 |
||||
*/ |
||||
@Service |
||||
public class PsdcElectricRtdataServiceImpl implements IPsdcElectricRtdataService { |
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
||||
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyyMMdd"); |
||||
|
||||
@Resource |
||||
PsdcElectricRtdataMapper electricRtdataMapper; |
||||
|
||||
@Resource |
||||
PsdcDevicePowerHdata96Mapper devicePowerHdata96Mapper; |
||||
|
||||
/** |
||||
* 电磁锅炉查询 |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public PsdcDevicePowerRes queryById() { |
||||
long userId = SecurityUtils.getUserId(); |
||||
Date date = new Date(); |
||||
PsdcDevicePowerRes devicePowerRes = electricRtdataMapper.queryById(1, sdf.format(date)); |
||||
PsdcDevicePowerHdata96 hdata96 = devicePowerHdata96Mapper.queryById(userId, 13, sdf2.format(date)); |
||||
devicePowerRes.setTodayUsePowers(hdata96); |
||||
return devicePowerRes; |
||||
} |
||||
} |
@ -0,0 +1,6 @@ |
||||
import request from '@/utils/request' |
||||
|
||||
//8个温度传感器接口
|
||||
export function getTemperature() { |
||||
return request.get('/indexLook/8wd') |
||||
} |
After Width: | Height: | Size: 697 KiB |
Before Width: | Height: | Size: 159 KiB After Width: | Height: | Size: 159 KiB |
After Width: | Height: | Size: 6.3 KiB |
@ -1,16 +1,310 @@ |
||||
<template> |
||||
<div class="app-container home"> |
||||
<h1>手动控制</h1> |
||||
<el-button type="primary" :icon="Download">策略导入</el-button> |
||||
<div class="dev_control_wrapper"> |
||||
<div class="dev_control_item"> |
||||
<div class="item_header"> |
||||
<span>电热锅炉</span> |
||||
<el-switch v-model="value1" class="switch" style="--el-switch-on-color: #13ce66; --el-switch-off-color: #dddddd"/> |
||||
</div> |
||||
<div class="item_bottom"> |
||||
<div class="item_bottom_img"> |
||||
<img src="./src/assets/images/dcgl.png" alt=""> |
||||
</div> |
||||
<div class="item_bottom_form"> |
||||
<el-form :model="form1"> |
||||
<el-form-item label="当前状态:"><span class="green">开启</span></el-form-item> |
||||
<el-form-item label="进水温度:"><el-input v-model="form1.enter" /></el-form-item> |
||||
<el-form-item label="出水温度:"><el-input v-model="form1.leave" /></el-form-item> |
||||
<div class="submit" @click="onSubmit1">确定</div> |
||||
</el-form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="dev_control_item"> |
||||
<div class="item_header"> |
||||
<span>空气源热泵</span> |
||||
<el-switch v-model="value2" class="switch" style="--el-switch-on-color: #13ce66; --el-switch-off-color: #dddddd"/> |
||||
</div> |
||||
<div class="item_bottom"> |
||||
<div class="item_bottom_img"> |
||||
<img src="./src/assets/images/空气源热泵.png" alt=""> |
||||
</div> |
||||
<div class="item_bottom_form"> |
||||
<el-form :model="form2"> |
||||
<el-form-item label="当前状态:"><span class="red">关闭</span></el-form-item> |
||||
<el-form-item label="进水温度:"><el-input v-model="form2.enter" /></el-form-item> |
||||
<el-form-item label="出水温度:"><el-input v-model="form2.leave" /></el-form-item> |
||||
<div class="submit" @click="onSubmit2">确定</div> |
||||
</el-form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="dev_control_item"> |
||||
<div class="item_header"> |
||||
<span>发热电缆</span> |
||||
<el-switch v-model="value3" class="switch" style="--el-switch-on-color: #13ce66; --el-switch-off-color: #dddddd"/> |
||||
</div> |
||||
<div class="item_bottom"> |
||||
<div class="item_bottom_img"> |
||||
<img src="./src/assets/images/发热电缆.png" alt=""> |
||||
</div> |
||||
<div class="item_bottom_form"> |
||||
<el-form :model="form3"> |
||||
<el-form-item label="当前状态:"><span class="red">关闭</span></el-form-item> |
||||
<el-form-item label="当前温度:"><el-input v-model="form3.now" /></el-form-item> |
||||
<div class="submit" @click="onSubmit3">确定</div> |
||||
</el-form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="dev_control_item"> |
||||
<div class="item_header"> |
||||
<span>风机盘管</span> |
||||
<el-switch v-model="value4" class="switch" style="--el-switch-on-color: #13ce66; --el-switch-off-color: #dddddd"/> |
||||
</div> |
||||
<div class="item_bottom"> |
||||
<div class="item_bottom_img"> |
||||
<img src="./src/assets/images/风机盘管.png" alt=""> |
||||
</div> |
||||
<div class="item_bottom_form"> |
||||
<el-form> |
||||
<el-form-item label="当前状态:"><span class="red">关闭</span></el-form-item> |
||||
</el-form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="dev_control_item"> |
||||
<div class="item_header"> |
||||
<span>水泵</span> |
||||
<el-switch v-model="value5" class="switch" style="--el-switch-on-color: #13ce66; --el-switch-off-color: #dddddd"/> |
||||
</div> |
||||
<div class="item_bottom"> |
||||
<div class="item_bottom_img"> |
||||
<img src="./src/assets/images/水泵.png" alt=""> |
||||
</div> |
||||
<div class="item_bottom_form"> |
||||
<el-form> |
||||
<el-form-item label="当前状态:"><span class="red">关闭</span></el-form-item> |
||||
</el-form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="dev_control_item"> |
||||
<div class="item_header"> |
||||
<span>蓄热锅炉</span> |
||||
<el-switch v-model="value6" class="switch" style="--el-switch-on-color: #13ce66; --el-switch-off-color: #dddddd"/> |
||||
</div> |
||||
<div class="item_bottom"> |
||||
<div class="item_bottom_img"> |
||||
<img src="./src/assets/images/蓄热锅炉.png" alt=""> |
||||
</div> |
||||
<div class="item_bottom_form"> |
||||
<el-form> |
||||
<el-form-item label="当前状态:"><span class="red">关闭</span></el-form-item> |
||||
</el-form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="dev_control_item"> |
||||
<div class="item_header"> |
||||
<span>沙盘</span> |
||||
<el-switch v-model="value7" class="switch" style="--el-switch-on-color: #13ce66; --el-switch-off-color: #dddddd"/> |
||||
</div> |
||||
<div class="item_bottom"> |
||||
<div class="item_bottom_img"> |
||||
<img src="./src/assets/images/沙盘.png" alt=""> |
||||
</div> |
||||
<div class="item_bottom_form"> |
||||
<el-form> |
||||
<el-form-item label="当前状态:"><span class="red">关闭</span></el-form-item> |
||||
</el-form> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="dev_control_table"> |
||||
<div class="control_header"><span>调控日志</span></div> |
||||
<div class="control_table"> |
||||
<el-table v-loading="loading" :data="controlList" @selection-change="handleSelectionChange"> |
||||
<el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" /> |
||||
<el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" /> |
||||
<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" /> |
||||
<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[3].visible" width="120" /> |
||||
<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible"> |
||||
<template #default="scope"> |
||||
<el-switch |
||||
v-model="scope.row.status" |
||||
active-value="0" |
||||
inactive-value="1" |
||||
@change="handleStatusChange(scope.row)" |
||||
></el-switch> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[4].visible" width="160"> |
||||
<template #default="scope"> |
||||
<span>{{ parseTime(scope.row.createTime) }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
</el-table> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script setup name="Index"> |
||||
import { Share,Download } from '@element-plus/icons-vue' //element字体图标 |
||||
import { ref,reactive } from 'vue' |
||||
|
||||
|
||||
const value1 = ref(true) |
||||
const value2 = ref(false) |
||||
const value3 = ref(false) |
||||
const value4 = ref(false) |
||||
const value5 = ref(false) |
||||
const value6 = ref(false) |
||||
const value7 = ref(false) |
||||
const form1 = reactive({ |
||||
enter:'', |
||||
leave:'', |
||||
}) |
||||
const form2 = reactive({ |
||||
enter:'', |
||||
leave:'', |
||||
}) |
||||
const form3 = reactive({ |
||||
now:'', |
||||
}) |
||||
|
||||
const onSubmit1 = () => { |
||||
console.log('确定') |
||||
} |
||||
const onSubmit2 = () => { |
||||
console.log('确定') |
||||
} |
||||
const onSubmit3 = () => { |
||||
console.log('确定') |
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
</script> |
||||
|
||||
<style scoped lang="scss"> |
||||
.home { |
||||
height: calc(100vh - 118px); |
||||
.dev_control_wrapper{ |
||||
display: flex; |
||||
justify-content: flex-start; |
||||
flex-wrap: wrap; |
||||
width: 100%; |
||||
height: 50%; |
||||
overflow-y: auto; |
||||
.dev_control_item{ |
||||
width: 24.46%; |
||||
height: 47%; |
||||
margin-right: 12px; |
||||
margin-bottom: 12px; |
||||
background-color: #2F3D8A; |
||||
overflow: hidden; |
||||
&:nth-child(4n){ |
||||
margin-right: 0px; |
||||
} |
||||
|
||||
.item_header{ |
||||
width: 100%; |
||||
height: 20%; |
||||
background-color: #374590; |
||||
padding: 0 10px; |
||||
span{ |
||||
font-size: 16px; |
||||
font-weight: bold; |
||||
line-height: 37px; |
||||
} |
||||
.switch{ |
||||
float: right; |
||||
line-height: 37px; |
||||
height: 37px; |
||||
} |
||||
} |
||||
.item_bottom{ |
||||
display: flex; |
||||
width: 100%; |
||||
height: 80%; |
||||
.item_bottom_img{ |
||||
width: 40%; |
||||
height: 100%; |
||||
//border: 1px solid red; |
||||
padding: 10px; |
||||
img{ |
||||
width: 100%; |
||||
height: 100%; |
||||
} |
||||
} |
||||
.item_bottom_form{ |
||||
width: 60%; |
||||
height: 100%; |
||||
//border: 1px solid red; |
||||
padding: 0 10px 0 0; |
||||
.green{ |
||||
color: #00ff07; |
||||
} |
||||
.red{ |
||||
color: #ff0000; |
||||
} |
||||
.submit{ |
||||
padding: 3px 15px; |
||||
border-radius: 2px; |
||||
background-color: #2F8EED; |
||||
float: right; |
||||
margin-top: 8px; |
||||
cursor: pointer; |
||||
&:hover{ |
||||
background-color: #5ba2f3; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
.dev_control_table{ |
||||
width: 100%; |
||||
height: 50%; |
||||
background-color: #2F3D8A; |
||||
.control_header{ |
||||
width: 100%; |
||||
height: 10%; |
||||
background-color: #374590; |
||||
padding: 0 10px; |
||||
span{ |
||||
font-size: 16px; |
||||
font-weight: bold; |
||||
line-height: 37px; |
||||
} |
||||
} |
||||
.control_table{ |
||||
width: 100%; |
||||
height: 90%; |
||||
border: 1px solid red; |
||||
} |
||||
} |
||||
} |
||||
|
||||
::v-deep .el-button{ |
||||
border-radius: 2px; |
||||
margin-bottom: 12px; |
||||
} |
||||
::v-deep .el-switch__core .el-switch__action{ |
||||
top: 1px; |
||||
width: 17px; |
||||
height: 17px; |
||||
} |
||||
::v-deep .el-form-item--default{ |
||||
margin-bottom: 3px; |
||||
} |
||||
::v-deep .el-input__inner{ |
||||
color: #f3ffff; |
||||
} |
||||
</style> |
||||
|
||||
|
@ -1,16 +1,164 @@ |
||||
<template> |
||||
<div class="app-container home"> |
||||
<h1>电热锅炉</h1> |
||||
<div class="top"> |
||||
<div class="card"> |
||||
<div>pic</div> |
||||
<div> |
||||
<p>总用电量</p> |
||||
<h2>1641kWh</h2> |
||||
</div> |
||||
</div> |
||||
<div class="card"> |
||||
<div>pic</div> |
||||
<div> |
||||
<p>当前功率</p> |
||||
<h2>11kW</h2> |
||||
</div> |
||||
</div> |
||||
<div class="card"> |
||||
<div>pic</div> |
||||
<div> |
||||
<div style="display: flex; margin-bottom: 5px"> |
||||
<p>进水温度:</p> |
||||
<h2>25℃</h2> |
||||
</div> |
||||
<div style="display: flex"> |
||||
<p>出水温度:</p> |
||||
<h2>85℃</h2> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<div class="card"> |
||||
<div>pic</div> |
||||
<div> |
||||
<p>运行状态</p> |
||||
<h2 style="color: #1ab394">开启</h2> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="bottom"> |
||||
<div class="bottom1"> |
||||
<div class="bottom1-1"> |
||||
日用电量 |
||||
</div> |
||||
<div id="myEcharts" style="width: 100%; height: 86.7%"> |
||||
pic |
||||
</div> |
||||
</div> |
||||
<div class="bottom1"> |
||||
<div class="bottom1-1"> |
||||
月用电量 |
||||
</div> |
||||
<div> |
||||
pic |
||||
</div> |
||||
</div> |
||||
<div class="bottom1"> |
||||
<div class="bottom1-1"> |
||||
当前功率 |
||||
</div> |
||||
<div> |
||||
pic |
||||
</div> |
||||
</div> |
||||
<div class="bottom1"> |
||||
<div class="bottom1-1"> |
||||
当前温度 |
||||
</div> |
||||
<div> |
||||
pic |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script setup name="Index"> |
||||
|
||||
<script name="Index"> |
||||
import { onMounted } from "vue"; |
||||
import * as echarts from 'echarts'; |
||||
export default { |
||||
name: "drgl", |
||||
setup() { |
||||
onMounted(() => {//需要获取到element,所以是onMounted的Hook |
||||
let myChart = echarts.init(document.getElementById("myEcharts")); |
||||
// 绘制图表 |
||||
myChart.setOption({ |
||||
title: {}, |
||||
tooltip: {}, |
||||
xAxis: { |
||||
data: ["12-3", "12-4", "12-5", "12-6", "12-7", "12-8"], |
||||
}, |
||||
yAxis: { |
||||
nameTextStyle: { |
||||
color: 'white' |
||||
}, |
||||
show: true, |
||||
type: 'value', |
||||
axisLine: { |
||||
show: true, |
||||
} |
||||
}, |
||||
series: [ |
||||
{ |
||||
name: "用户量", |
||||
type: "bar", |
||||
data: [5, 20, 36, 10, 10, 20], |
||||
}, |
||||
], |
||||
}); |
||||
window.onresize = function () {//自适应大小 |
||||
myChart.resize(); |
||||
}; |
||||
}); |
||||
}, |
||||
components: {}, |
||||
mounted() {}, |
||||
}; |
||||
|
||||
|
||||
</script> |
||||
|
||||
<style scoped lang="scss"> |
||||
.top{ |
||||
width: 100%; |
||||
height: 110px; |
||||
display: flex; |
||||
flex-wrap: wrap; |
||||
justify-content: space-between; |
||||
margin-bottom: 20px; |
||||
} |
||||
.card{ |
||||
width: 24%; |
||||
height: 110px; |
||||
background-color: #2F3D8A; |
||||
display: flex; |
||||
justify-content: space-around; |
||||
align-items: center; |
||||
} |
||||
|
||||
.bottom{ |
||||
width: 100%; |
||||
height: 640px; |
||||
display: flex; |
||||
flex-wrap: wrap; |
||||
justify-content: space-between; |
||||
} |
||||
.bottom1{ |
||||
width: 49.35%; |
||||
height: 300px; |
||||
background-color: #2F3D8A; |
||||
margin-bottom: 20px; |
||||
} |
||||
p{ |
||||
margin-bottom: 10px; |
||||
} |
||||
.bottom1-1{ |
||||
width: 100%; |
||||
height: 13.3%; |
||||
background-color: #374590; |
||||
padding-top: 10px; |
||||
padding-left: 10px; |
||||
} |
||||
</style> |
||||
|
||||
|
@ -0,0 +1,46 @@ |
||||
package com.psdc.controller.monitor; |
||||
|
||||
import com.psdc.core.domain.AjaxResult; |
||||
import com.psdc.service.IPsdcElectricHtdataService; |
||||
import com.psdc.service.IPsdcElectricRtdataService; |
||||
import com.psdc.service.IPsdcThermometerHtdataService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.security.access.prepost.PreAuthorize; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestMethod; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
/** |
||||
* @Author:戴仕崑 |
||||
* @Project:psdc |
||||
* @Filename:ElectromagneticBoilerController |
||||
* @Date:2023/5/10 16:12 |
||||
* @Version 1.0 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/api/monitor/drgl/index") |
||||
public class ElectromagneticBoilerController { |
||||
|
||||
@Autowired |
||||
IPsdcElectricRtdataService psdcElectricRtdataService; |
||||
@Autowired |
||||
IPsdcThermometerHtdataService psdcThermometerHtdataService; |
||||
@Autowired |
||||
IPsdcElectricHtdataService psdcElectricHtdataService; |
||||
|
||||
@PreAuthorize("@ss.hasPermi('emonitor:drgl')") |
||||
@RequestMapping(value = "/sel1", method = RequestMethod.GET) |
||||
public AjaxResult seldrgl1() { |
||||
AjaxResult ajax = AjaxResult.success(psdcElectricRtdataService.queryById()); |
||||
return ajax; |
||||
} |
||||
|
||||
@PreAuthorize("@ss.hasPermi('emonitor:drgl')") |
||||
@RequestMapping(value = "/sel2", method = RequestMethod.GET) |
||||
public AjaxResult seldrgl2() { |
||||
AjaxResult ajax = psdcThermometerHtdataService.selDzglWenDu(); |
||||
ajax.put("dcglqhour", psdcElectricHtdataService.selDcglThisHourUseElectric()); |
||||
ajax.put("dcglqday", psdcElectricHtdataService.selDcglThisDayUseElectric()); |
||||
return ajax; |
||||
} |
||||
} |
@ -0,0 +1,52 @@ |
||||
package com.psdc.controller.monitor; |
||||
|
||||
import com.psdc.core.domain.AjaxResult; |
||||
import com.psdc.entity.res.PsdcDevicePowerRes; |
||||
import com.psdc.service.IPsdcElectricHtdataService; |
||||
import com.psdc.service.IPsdcThermometerHtdataService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.security.access.prepost.PreAuthorize; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestMethod; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @Author:戴仕崑 |
||||
* @Project:psdc |
||||
* @Filename:TotalElectricMeterController |
||||
* @Date:2023/5/10 10:59 |
||||
* @Version 1.0 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/api/monitor/db/index") |
||||
public class TotalElectricMeterController { |
||||
|
||||
@Autowired |
||||
IPsdcThermometerHtdataService psdcThermometerHtdataService; |
||||
|
||||
@Autowired |
||||
IPsdcElectricHtdataService psdcElectricHtdataService; |
||||
|
||||
@PreAuthorize("@ss.hasPermi('emonitor:db')") |
||||
@RequestMapping(value = "/sel1", method = RequestMethod.GET) |
||||
public AjaxResult selzdb1() { |
||||
PsdcDevicePowerRes devicePowerRes = psdcThermometerHtdataService.selTotalElectricityInfo(); |
||||
Map map = psdcElectricHtdataService.selTotalElectricityInfo(); |
||||
devicePowerRes.setEDay((Double) map.get("eday")); |
||||
devicePowerRes.setEMonth((Double) map.get("emonth")); |
||||
AjaxResult ajax = AjaxResult.success(devicePowerRes); |
||||
return ajax; |
||||
} |
||||
|
||||
@PreAuthorize("@ss.hasPermi('emonitor:db')") |
||||
@RequestMapping(value = "/sel2", method = RequestMethod.GET) |
||||
public AjaxResult selzdb2() { |
||||
List list = psdcElectricHtdataService.selThisHourUseElectric(); |
||||
AjaxResult ajax = AjaxResult.success(list); |
||||
return ajax; |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue