线条颜色和下午的bug修复
This commit is contained in:
parent
4b64948710
commit
5fc143726d
|
@ -41,7 +41,7 @@ public class DynamicRabbitListener implements ApplicationRunner {
|
||||||
this.businessMessageListenerContainer = new SimpleMessageListenerContainer();
|
this.businessMessageListenerContainer = new SimpleMessageListenerContainer();
|
||||||
this.businessMessageListenerContainer.setConnectionFactory(connectionFactory);
|
this.businessMessageListenerContainer.setConnectionFactory(connectionFactory);
|
||||||
this.businessMessageListenerContainer.setMessageListener(this.businessMessageListener);
|
this.businessMessageListenerContainer.setMessageListener(this.businessMessageListener);
|
||||||
// this.businessMessageListenerContainer.start();
|
this.businessMessageListenerContainer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -4,10 +4,7 @@ import com.isu.gaswellwatch.service.DeviceService;
|
||||||
import com.isu.gaswellwatch.service.SummaryService;
|
import com.isu.gaswellwatch.service.SummaryService;
|
||||||
import com.isu.gaswellwatch.vo.DeviceHistoryVO;
|
import com.isu.gaswellwatch.vo.DeviceHistoryVO;
|
||||||
import com.isu.gaswellwatch.vo.DeviceVO;
|
import com.isu.gaswellwatch.vo.DeviceVO;
|
||||||
import com.isu.gaswellwatch.vo.summary.LineDataVO;
|
import com.isu.gaswellwatch.vo.summary.*;
|
||||||
import com.isu.gaswellwatch.vo.summary.LineSummaryVO;
|
|
||||||
import com.isu.gaswellwatch.vo.summary.PieDataVO;
|
|
||||||
import com.isu.gaswellwatch.vo.summary.PieSummaryVO;
|
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
@ -117,15 +114,18 @@ public class SummaryServiceImpl implements SummaryService {
|
||||||
List<String> legendData = new ArrayList<>();
|
List<String> legendData = new ArrayList<>();
|
||||||
legendData.add("油压");
|
legendData.add("油压");
|
||||||
legendData.add("套压");
|
legendData.add("套压");
|
||||||
|
legendData.add("输压");
|
||||||
lineSummaryVO.setLegendData(legendData);
|
lineSummaryVO.setLegendData(legendData);
|
||||||
|
|
||||||
List<String> oilPressureData = new ArrayList<>();
|
List<String> oilPressureData = new ArrayList<>();
|
||||||
List<String> casPressureData = new ArrayList<>();
|
List<String> casPressureData = new ArrayList<>();
|
||||||
|
List<String> prePressureData = new ArrayList<>();
|
||||||
|
|
||||||
for(DeviceHistoryVO deviceHistoryVO : dataList){
|
for(DeviceHistoryVO deviceHistoryVO : dataList){
|
||||||
xAxisData.add(deviceHistoryVO.getCollectionTime());
|
xAxisData.add(deviceHistoryVO.getCollectionTime());
|
||||||
oilPressureData.add(StringUtils.isEmpty(deviceHistoryVO.getOilPressure())?"0":deviceHistoryVO.getOilPressure());
|
oilPressureData.add(StringUtils.isEmpty(deviceHistoryVO.getOilPressure())?"0":deviceHistoryVO.getOilPressure());
|
||||||
casPressureData.add(StringUtils.isEmpty(deviceHistoryVO.getCasPressure())?"0":deviceHistoryVO.getCasPressure());
|
casPressureData.add(StringUtils.isEmpty(deviceHistoryVO.getCasPressure())?"0":deviceHistoryVO.getCasPressure());
|
||||||
|
prePressureData.add(StringUtils.isEmpty(deviceHistoryVO.getPrePressure())?"0":deviceHistoryVO.getPrePressure());
|
||||||
}
|
}
|
||||||
|
|
||||||
//设置x轴数据(日期)
|
//设置x轴数据(日期)
|
||||||
|
@ -138,13 +138,40 @@ public class SummaryServiceImpl implements SummaryService {
|
||||||
oil.setType("line");
|
oil.setType("line");
|
||||||
oil.setData(oilPressureData);
|
oil.setData(oilPressureData);
|
||||||
|
|
||||||
|
//设置线条颜色 #A50021 深红 #333399 深蓝
|
||||||
|
ItemStyleVO itemStyleVO = new ItemStyleVO();
|
||||||
|
NormalStyleVO normalStyleVO = new NormalStyleVO();
|
||||||
|
normalStyleVO.setColor("#A50021");
|
||||||
|
LineStyleVO lineStyleVO = new LineStyleVO();
|
||||||
|
lineStyleVO.setColor("#A50021");
|
||||||
|
normalStyleVO.setLineStyle(lineStyleVO);
|
||||||
|
itemStyleVO.setNormal(normalStyleVO);
|
||||||
|
oil.setItemStyle(itemStyleVO);
|
||||||
|
|
||||||
LineDataVO cas = new LineDataVO();
|
LineDataVO cas = new LineDataVO();
|
||||||
cas.setName("套压");
|
cas.setName("套压");
|
||||||
cas.setType("line");
|
cas.setType("line");
|
||||||
cas.setData(casPressureData);
|
cas.setData(casPressureData);
|
||||||
|
|
||||||
|
//设置线条颜色
|
||||||
|
ItemStyleVO itemStyleVO1 = new ItemStyleVO();
|
||||||
|
NormalStyleVO normalStyleVO1 = new NormalStyleVO();
|
||||||
|
normalStyleVO1.setColor("#333399");
|
||||||
|
LineStyleVO lineStyleVO1 = new LineStyleVO();
|
||||||
|
lineStyleVO1.setColor("#333399");
|
||||||
|
normalStyleVO.setLineStyle(lineStyleVO1);
|
||||||
|
itemStyleVO1.setNormal(normalStyleVO1);
|
||||||
|
cas.setItemStyle(itemStyleVO1);
|
||||||
|
|
||||||
|
LineDataVO pre = new LineDataVO();
|
||||||
|
pre.setName("输压");
|
||||||
|
pre.setType("line");
|
||||||
|
pre.setData(prePressureData);
|
||||||
|
|
||||||
|
|
||||||
series.add(oil);
|
series.add(oil);
|
||||||
series.add(cas);
|
series.add(cas);
|
||||||
|
series.add(pre);
|
||||||
|
|
||||||
lineSummaryVO.setSeries(series);
|
lineSummaryVO.setSeries(series);
|
||||||
return lineSummaryVO;
|
return lineSummaryVO;
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class TubPressureOptimization extends Command implements Timing {
|
||||||
private static final long serialVersionUID = 6405657928042198221L;
|
private static final long serialVersionUID = 6405657928042198221L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 套压开关
|
* 油压开关
|
||||||
*/
|
*/
|
||||||
private boolean tubPressureSwitch;
|
private boolean tubPressureSwitch;
|
||||||
/**
|
/**
|
||||||
|
@ -34,11 +34,11 @@ public class TubPressureOptimization extends Command implements Timing {
|
||||||
*/
|
*/
|
||||||
private BigDecimal tubPressureSensorRange;
|
private BigDecimal tubPressureSensorRange;
|
||||||
/**
|
/**
|
||||||
* 开井套压
|
* 开井油压
|
||||||
*/
|
*/
|
||||||
private BigDecimal openTubPressure;
|
private BigDecimal openTubPressure;
|
||||||
/**
|
/**
|
||||||
* 复位套压
|
* 复位油压
|
||||||
*/
|
*/
|
||||||
private BigDecimal openResetTubPressure;
|
private BigDecimal openResetTubPressure;
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class CasingMode extends Command implements Timing {
|
||||||
command.setLength(0);
|
command.setLength(0);
|
||||||
// 地址码 功能码 起始地址 连续长度 连续字长
|
// 地址码 功能码 起始地址 连续长度 连续字长
|
||||||
// 01 10 00AA 0004 08
|
// 01 10 00AA 0004 08
|
||||||
command.append("011000AA000204");
|
command.append("011000AA000408");
|
||||||
command.append(StringUtils.leftPad(Long.toHexString(this.toSeconds(this.minWellCloseTimeDuration)), 8, "0"));
|
command.append(StringUtils.leftPad(Long.toHexString(this.toSeconds(this.minWellCloseTimeDuration)), 8, "0"));
|
||||||
command.append(StringUtils.leftPad(Long.toHexString(this.toSeconds(this.maxWellCloseTimeDuration)), 8, "0"));
|
command.append(StringUtils.leftPad(Long.toHexString(this.toSeconds(this.maxWellCloseTimeDuration)), 8, "0"));
|
||||||
resultList.add(ModbusCommandDto.builder().command(command.toString()).length(16).build());
|
resultList.add(ModbusCommandDto.builder().command(command.toString()).length(16).build());
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.isu.gaswellwatch.vo.summary;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class ItemStyleVO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private NormalStyleVO normal;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -22,5 +22,7 @@ public class LineDataVO implements Serializable {
|
||||||
|
|
||||||
private List<String> data;
|
private List<String> data;
|
||||||
|
|
||||||
|
private ItemStyleVO itemStyle;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.isu.gaswellwatch.vo.summary;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class LineStyleVO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private String color;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.isu.gaswellwatch.vo.summary;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class NormalStyleVO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private String color;
|
||||||
|
|
||||||
|
private LineStyleVO lineStyle;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -70,10 +70,10 @@
|
||||||
|
|
||||||
|
|
||||||
<select id="historyPage" resultType="com.isu.gaswellwatch.vo.DeviceHistoryVO">
|
<select id="historyPage" resultType="com.isu.gaswellwatch.vo.DeviceHistoryVO">
|
||||||
select t.collection_time,t.oil_pressure,t.cas_pressure
|
select t.collection_time,t.oil_pressure,t.cas_pressure,t.pre_pressure
|
||||||
<if test="deviceProduct!=null and deviceProduct=='knpc'">,t.pre_pressure,t.run_mode,t.status_end_time,t.temperature,t.humidity,t.well_status,t.plug_status</if>
|
<if test="deviceProduct!=null and deviceProduct=='knpc'">,t.run_mode,t.status_end_time,t.temperature,t.humidity,t.well_status,t.plug_status</if>
|
||||||
<if test="deviceProduct!=null and deviceProduct=='etc'">,t.current_status_remaining_time as statusEndTime,t.controller_current_status as runMode,t.solenoid_valve_status as wellStatus</if>
|
<if test="deviceProduct!=null and deviceProduct=='etc'">,t.current_status_remaining_time as statusEndTime,t.controller_current_status as runMode,t.solenoid_valve_status as wellStatus</if>
|
||||||
<if test="deviceProduct!=null and deviceProduct=='scss'">,t.pre_pressure,t.ctl_model as runMode,t.remaining_time_action as statusEndTime,t.solar_voltage,t.first_solenoid_status as wellStatus</if>
|
<if test="deviceProduct!=null and deviceProduct=='scss'">,t.ctl_model as runMode,t.remaining_time_action as statusEndTime,t.solar_voltage,t.first_solenoid_status as wellStatus</if>
|
||||||
from ${tableName} t
|
from ${tableName} t
|
||||||
<where>
|
<where>
|
||||||
t.device_id = #{deviceId}
|
t.device_id = #{deviceId}
|
||||||
|
|
Loading…
Reference in New Issue