change-整点报表样式完善

master
wenjy 3 years ago
parent f63e1553a3
commit 039e21f168

@ -52,7 +52,7 @@
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-primary btn-rounded btn-sm" onclick="queryArchivesList()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
@ -119,10 +119,10 @@
function queryArchivesList() {
var formData = new FormData();
formData.append("monitorId",$("#monitorId").val());
/*formData.append("pMonitor",$("#pMonitor").val());
formData.append("monitorType",2);
formData.append("beginTime",$("#startTime").val());
formData.append("endTime",$("#endTime").val());*/
formData.append("pMonitor",$("#pMonitor").val());
/*formData.append("monitorType",2);*/
formData.append("beginCollectTime",$("#startTime").val());
formData.append("endCollectTime",$("#endTime").val());
$.ajax({
type: "post",
url: prefix + "/jsonList",

@ -66,6 +66,10 @@ public class ScadaEmsPointElectricloss extends BaseEntity
@Excel(name = "整点")
private Long pointNumber;
private Date beginCollectTime;
private Date endCollectTime;
public void setUuid(String uuid)
{
this.uuid = uuid;
@ -156,6 +160,22 @@ public class ScadaEmsPointElectricloss extends BaseEntity
this.pMonitorId = pMonitorId;
}
public Date getBeginCollectTime() {
return beginCollectTime;
}
public void setBeginCollectTime(Date beginCollectTime) {
this.beginCollectTime = beginCollectTime;
}
public Date getEndCollectTime() {
return endCollectTime;
}
public void setEndCollectTime(Date endCollectTime) {
this.endCollectTime = endCollectTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -1,5 +1,6 @@
package com.ruoyi.system.service.impl;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@ -55,6 +56,24 @@ public class ScadaEmsPointElectriclossServiceImpl implements IScadaEmsPointElect
*/
@Override
public String selectPointElectriclossJson(ScadaEmsPointElectricloss scadaEmsPointElectricloss){
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
cal.add(Calendar.DATE,-20);
if(scadaEmsPointElectricloss.getBeginCollectTime() == null){
scadaEmsPointElectricloss.setBeginCollectTime(cal.getTime());
}
if(scadaEmsPointElectricloss.getEndCollectTime() == null){
scadaEmsPointElectricloss.setEndCollectTime(new Date());
}
Map<String,Object> collectTimeMap = new HashMap<>();
collectTimeMap.put("beginCollectTime",scadaEmsPointElectricloss.getBeginCollectTime());
collectTimeMap.put("endCollectTime",scadaEmsPointElectricloss.getEndCollectTime());
scadaEmsPointElectricloss.setParams(collectTimeMap);
List<ScadaEmsPointElectricloss> list = scadaEmsPointElectriclossMapper.selectScadaEmsPointElectriclossList(scadaEmsPointElectricloss);
List<String> monitorInfoList = new ArrayList<>();
List<String> recordDateList = new ArrayList<>();

@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="monitorId != null and monitorId != ''"> and t1.monitor_id = #{monitorId}</if>
<if test="pMonitorId != null and pMonitorId != ''"> and t2.p_monitor_id = #{pMonitorId}</if>
<if test="params.beginCollectTime != null and params.beginCollectTime != '' and params.endCollectTime != null and params.endCollectTime != ''"> and t1.collect_time between #{params.beginCollectTime} and #{params.endCollectTime}</if>
<if test="params.beginCollectTime != null and params.endCollectTime != null "> and t1.collect_time between #{params.beginCollectTime} and #{params.endCollectTime}</if>
<if test="recordDate != null and recordDate != ''"> and t1.record_date = #{recordDate}</if>
<if test="pointNumber != null "> and t1.point_number = #{pointNumber}</if>
</where>

Loading…
Cancel
Save