更新日尖峰平谷显示

master
chardon55 3 years ago
parent f8af1223ac
commit 1c218ea51e

@ -3,8 +3,10 @@ package com.ruoyi.web.controller.api;
import com.alibaba.fastjson.JSONArray;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.BaseJfpgInfo;
import com.ruoyi.system.domain.ScadaEmsDayElectricloss;
import com.ruoyi.system.domain.ScadaEmsElectricloss;
import com.ruoyi.system.service.IBaseJfpgInfoService;
import com.ruoyi.system.service.IScadaEmsDayElectriclossService;
import com.ruoyi.system.service.IScadaEmsElectriclossService;
import com.ruoyi.web.controller.tool.UUIDTool;
import org.springframework.beans.factory.annotation.Autowired;
@ -30,14 +32,20 @@ public class JfpgAnalyzeController {
@Autowired
private IScadaEmsElectriclossService scadaEmsElectriclossService;
@Autowired
private IScadaEmsDayElectriclossService scadaEmsDayElectriclossService;
@GetMapping("/info")
public String Analyze(){
List<BaseJfpgInfo> jfpgInfoList = baseJfpgInfoService.selectBaseJfpgInfoList(new BaseJfpgInfo(0L));
//List<ScadaEmsElectricloss> scadaEmsElectriclossList = scadaEmsElectriclossService.selectScadaEmsElectriclossList(new ScadaEmsElectricloss());
List<ScadaEmsElectricloss> scadaEmsElectriclossList = scadaEmsElectriclossService.selectScadaEmsElectriclossList(new ScadaEmsElectricloss());
List<ScadaEmsDayElectricloss> scadaEmsDayElectriclossList = scadaEmsDayElectriclossService.selectScadaEmsDayElectriclossList(new ScadaEmsDayElectricloss());
Map<Integer,List<BaseJfpgInfo>> jfpgMap = jfpgInfoList.stream().collect(Collectors.groupingBy(BaseJfpgInfo :: getTimeframeCode));
// 尖
// 峰

@ -152,10 +152,30 @@
width:100,
align:"center",
},{
field: property+'Expend',
title: '费用',
field: property+'Sharp',
title: '',
width:100,
align:"center"
},{
field: property+'Peak',
title: '峰',
width:100,
align:"center"
},{
field: property+'Plain',
title: '平',
width:100,
align:"center"
},{
field: property+'Hollow',
title: '谷',
width:100,
align:"center"
// },{
// field: property+'Expend',
// title: '费用',
// width:100,
// align:"center"
});
}
}

@ -61,75 +61,87 @@ public class ScadaEmsDayElectricloss extends BaseEntity
private String endRecordDate;
public void setUuid(String uuid)
/** 尖 */
private Double sharp;
/** 峰 */
private Double peak;
/** 平 */
private Double plain;
/** 谷 */
private Double hollow;
public void setUuid(String uuid)
{
this.uuid = uuid;
}
public String getUuid()
public String getUuid()
{
return uuid;
}
public void setMonitorId(String monitorId)
public void setMonitorId(String monitorId)
{
this.monitorId = monitorId;
}
public String getMonitorId()
public String getMonitorId()
{
return monitorId;
}
public void setMaxZxyg(Long maxZxyg)
public void setMaxZxyg(Long maxZxyg)
{
this.maxZxyg = maxZxyg;
}
public Long getMaxZxyg()
public Long getMaxZxyg()
{
return maxZxyg;
}
public void setMinZxyg(Long minZxyg)
public void setMinZxyg(Long minZxyg)
{
this.minZxyg = minZxyg;
}
public Long getMinZxyg()
public Long getMinZxyg()
{
return minZxyg;
}
public void setPt(Long pt)
public void setPt(Long pt)
{
this.pt = pt;
}
public Long getPt()
public Long getPt()
{
return pt;
}
public void setCt(Long ct)
public void setCt(Long ct)
{
this.ct = ct;
}
public Long getCt()
public Long getCt()
{
return ct;
}
public void setRecordDate(String recordDate)
public void setRecordDate(String recordDate)
{
this.recordDate = recordDate;
}
public String getRecordDate()
public String getRecordDate()
{
return recordDate;
}
public void setCollectTime(Date collectTime)
public void setCollectTime(Date collectTime)
{
this.collectTime = collectTime;
}
public Date getCollectTime()
public Date getCollectTime()
{
return collectTime;
}
@ -163,4 +175,36 @@ public class ScadaEmsDayElectricloss extends BaseEntity
.append("collectTime", getCollectTime())
.toString();
}
public Double getSharp() {
return sharp;
}
public void setSharp(Double sharp) {
this.sharp = sharp;
}
public Double getPeak() {
return peak;
}
public void setPeak(Double peak) {
this.peak = peak;
}
public Double getPlain() {
return plain;
}
public void setPlain(Double plain) {
this.plain = plain;
}
public Double getHollow() {
return hollow;
}
public void setHollow(Double hollow) {
this.hollow = hollow;
}
}

@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.ScadaEmsDayElectricloss;
import org.apache.ibatis.annotations.Mapper;
/**
* Mapper
@ -9,6 +10,7 @@ import com.ruoyi.system.domain.ScadaEmsDayElectricloss;
* @author WenJY
* @date 2021-11-26
*/
@Mapper
public interface ScadaEmsDayElectriclossMapper
{
/**

@ -98,6 +98,11 @@ public class ScadaEmsDayElectriclossServiceImpl implements IScadaEmsDayElectricl
if(monitor.size()>0){
ScadaEmsDayElectricloss pointDate = monitor.get(0);
map.put(recordDate.toString(),pointDate.getMaxZxyg());
map.put(recordDate+"Sharp",pointDate.getSharp());
map.put(recordDate+"Peak",pointDate.getPeak());
map.put(recordDate+"Plain",pointDate.getPlain());
map.put(recordDate+"Hollow",pointDate.getHollow());
map.put(recordDate+"Expend",(pointDate.getMaxZxyg()-pointDate.getMinZxyg()));
}else{
map.put(recordDate.toString(),"-");

@ -13,14 +13,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="ct" column="ct" />
<result property="recordDate" column="record_date" />
<result property="collectTime" column="collect_time" />
<result property="sharp" column="sharp" />
<result property="peak" column="peak" />
<result property="plain" column="plain" />
<result property="hollow" column="hollow" />
</resultMap>
<sql id="selectScadaEmsDayElectriclossVo">
select uuid, monitor_id, max_zxyg, min_zxyg, pt, ct, record_date, collect_time from scada_ems_day_electricloss
select uuid, monitor_id, max_zxyg, min_zxyg, pt, ct, record_date, collect_time, sharp, peak, plain, hollow from scada_ems_day_electricloss
</sql>
<select id="selectScadaEmsDayElectriclossList" parameterType="ScadaEmsDayElectricloss" resultMap="ScadaEmsDayElectriclossResult">
select t1.uuid, t1.monitor_id,t2.p_monitor_id ,t1.max_zxyg, t1.min_zxyg, t1.pt,t1.ct, t1.collect_time, t1.record_date
select t1.uuid, t1.monitor_id,t2.p_monitor_id ,t1.max_zxyg, t1.min_zxyg, t1.pt,t1.ct, t1.collect_time, t1.record_date, sharp, peak, plain, hollow
from scada_ems_day_electricloss t1
left join base_monitor_info t2 on t1.monitor_id = t2.monitor_id
<where>

Loading…
Cancel
Save