代码调整
This commit is contained in:
@@ -89,14 +89,6 @@
|
|||||||
<finalName>eventboot</finalName>
|
<finalName>eventboot</finalName>
|
||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
|
||||||
<directory>src/main/java</directory>
|
|
||||||
<includes>
|
|
||||||
<include>**/*.ftl</include>
|
|
||||||
<include>**/*.xml</include>
|
|
||||||
</includes>
|
|
||||||
<filtering>false</filtering>
|
|
||||||
</resource>
|
|
||||||
<!--设置自己目录下的配置文件-->
|
<!--设置自己目录下的配置文件-->
|
||||||
<resource>
|
<resource>
|
||||||
<directory>src/main/resources</directory>
|
<directory>src/main/resources</directory>
|
||||||
|
|||||||
@@ -1,86 +0,0 @@
|
|||||||
<#--区域统计和电压等级共用模板-->
|
|
||||||
{
|
|
||||||
title: {
|
|
||||||
text: '设备运行情况',
|
|
||||||
left:'center',
|
|
||||||
subtext:'${subtext}',
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
axisPointer: {
|
|
||||||
type: 'shadow'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data: ['在线', '离线',],
|
|
||||||
left: '10%',
|
|
||||||
top:'5%',
|
|
||||||
textStyle: {
|
|
||||||
color: "#666666"
|
|
||||||
},
|
|
||||||
itemWidth: 15,
|
|
||||||
itemHeight: 10,
|
|
||||||
itemGap: 25
|
|
||||||
},
|
|
||||||
grid: {
|
|
||||||
left: '3%',
|
|
||||||
right: '8%',
|
|
||||||
bottom: '5%',
|
|
||||||
top: '20%',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
name: '${xname}',
|
|
||||||
nameTextStyle: {
|
|
||||||
color: '#666666',
|
|
||||||
},
|
|
||||||
type: 'category',
|
|
||||||
data: ${area}
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
name: '(个)',
|
|
||||||
nameTextStyle: {
|
|
||||||
color: '#666666',
|
|
||||||
},
|
|
||||||
type: 'value',
|
|
||||||
axisLine: { show: true, lineStyle: { color: '#666666' } },
|
|
||||||
axisLabel: { color: '#666666' },
|
|
||||||
splitLine: { lineStyle: { color: ['#ccc'], type: [5, 8], dashOffset: 3 } },
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: '在线',
|
|
||||||
type: 'bar',
|
|
||||||
stack: 'account',
|
|
||||||
barWidth: 20,
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
color:'purple',
|
|
||||||
verticalAlign: 'middle',
|
|
||||||
rotate: 0,
|
|
||||||
fontSize: 12,
|
|
||||||
},
|
|
||||||
color:'green',
|
|
||||||
itemStyle: {
|
|
||||||
},
|
|
||||||
data: ${onlineData}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '离线',
|
|
||||||
type: 'bar',
|
|
||||||
stack: 'account',
|
|
||||||
barWidth: 20,
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
color:'purple',
|
|
||||||
verticalAlign: 'middle',
|
|
||||||
rotate: 0,
|
|
||||||
fontSize: 12,
|
|
||||||
},
|
|
||||||
color:'orange',
|
|
||||||
itemStyle: {
|
|
||||||
},
|
|
||||||
data: ${offlineData}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,103 +0,0 @@
|
|||||||
<#--区域和电压等级统计次数共用模板-->
|
|
||||||
{
|
|
||||||
title: {
|
|
||||||
text: '暂态事件次数',
|
|
||||||
left:'center',
|
|
||||||
subtext:'${subtext}',
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
axisPointer: {
|
|
||||||
type: 'shadow'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data: ['暂降次数', '中断次数', '暂升次数'],
|
|
||||||
left: '7%',
|
|
||||||
top:'5%',
|
|
||||||
textStyle: {
|
|
||||||
color: "#666666"
|
|
||||||
},
|
|
||||||
itemWidth: 10,
|
|
||||||
itemHeight: 10,
|
|
||||||
itemGap: 15
|
|
||||||
},
|
|
||||||
grid: {
|
|
||||||
left: '3%',
|
|
||||||
right: '8%',
|
|
||||||
bottom: '5%',
|
|
||||||
top: '20%',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
name: '${xname}',
|
|
||||||
nameTextStyle: {
|
|
||||||
color: '#666666',
|
|
||||||
},
|
|
||||||
type: 'category',
|
|
||||||
data: ${area}
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
name: '(次)',
|
|
||||||
nameTextStyle: {
|
|
||||||
color: '#666666',
|
|
||||||
},
|
|
||||||
type: 'value',
|
|
||||||
axisLine: { show: true, lineStyle: { color: '#666666' } },
|
|
||||||
axisLabel: { color: '#666666' },
|
|
||||||
splitLine: { lineStyle: { color: ['#ccc'], type: [5, 8], dashOffset: 3 } },
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: '暂降次数',
|
|
||||||
type: 'bar',
|
|
||||||
stack: 'account',
|
|
||||||
barWidth: 20,
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
color:'purple',
|
|
||||||
verticalAlign: 'middle',
|
|
||||||
rotate: 0,
|
|
||||||
fontSize: 12,
|
|
||||||
},
|
|
||||||
color:'#ff9966',
|
|
||||||
itemStyle: {
|
|
||||||
},
|
|
||||||
data: ${sag}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '中断次数',
|
|
||||||
type: 'bar',
|
|
||||||
stack: 'account',
|
|
||||||
barWidth: 20,
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
color:'purple',
|
|
||||||
verticalAlign: 'middle',
|
|
||||||
rotate: 0,
|
|
||||||
fontSize: 12,
|
|
||||||
},
|
|
||||||
color:'#00dd00',
|
|
||||||
itemStyle: {
|
|
||||||
},
|
|
||||||
data: ${break}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '暂升次数',
|
|
||||||
type: 'bar',
|
|
||||||
stack: 'account',
|
|
||||||
barWidth: 20,
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
color:'purple',
|
|
||||||
verticalAlign: 'middle',
|
|
||||||
rotate: 0,
|
|
||||||
fontSize: 12,
|
|
||||||
},
|
|
||||||
color:'#0066ff',
|
|
||||||
itemStyle: {
|
|
||||||
},
|
|
||||||
data: ${up}
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
<#--ITIC曲线专用-->
|
|
||||||
{
|
|
||||||
backgroundColor: "#FFF",
|
|
||||||
title: {
|
|
||||||
text: "ITIC曲线",
|
|
||||||
x: "center",
|
|
||||||
},
|
|
||||||
grid: {
|
|
||||||
left: "4%",
|
|
||||||
right: "2%",
|
|
||||||
bottom: "10%",
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data: ["上限", "下限", "可容忍事件", "不可容忍事件"],
|
|
||||||
x: "left",
|
|
||||||
},
|
|
||||||
color: ["#FF8C00", "#00BFFF", "green", "red"],
|
|
||||||
xAxis: [
|
|
||||||
{
|
|
||||||
type: "log",
|
|
||||||
min: "0.001",
|
|
||||||
max: "1000",
|
|
||||||
splitLine: {
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
name: "s",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
yAxis: [
|
|
||||||
{
|
|
||||||
type: "value",
|
|
||||||
splitNumber: 10,
|
|
||||||
minInterval: 3,
|
|
||||||
name: "%"
|
|
||||||
},
|
|
||||||
],
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: "上限",
|
|
||||||
type: "line",
|
|
||||||
data: [
|
|
||||||
[0.001, 200],
|
|
||||||
[0.003, 140],
|
|
||||||
[0.003, 120],
|
|
||||||
[0.5, 120],
|
|
||||||
[0.5, 110],
|
|
||||||
[10, 110],
|
|
||||||
[1000, 110]
|
|
||||||
],
|
|
||||||
showSymbol: false,
|
|
||||||
tooltips: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "下限",
|
|
||||||
type: "line",
|
|
||||||
data: [
|
|
||||||
[0.02, 0],
|
|
||||||
[0.02, 70],
|
|
||||||
[0.5, 70],
|
|
||||||
[0.5, 80],
|
|
||||||
[10, 80],
|
|
||||||
[10, 90],
|
|
||||||
[1000, 90]
|
|
||||||
],
|
|
||||||
showSymbol: false,
|
|
||||||
tooltips: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "可容忍事件",
|
|
||||||
type: "scatter",
|
|
||||||
symbol: "circle",
|
|
||||||
data: ${point}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "不可容忍事件",
|
|
||||||
type: "scatter",
|
|
||||||
symbol: "circle",
|
|
||||||
data: ${pointno}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
<#--F47曲线图专用模板-->
|
|
||||||
{
|
|
||||||
backgroundColor: "#fff",
|
|
||||||
title: {
|
|
||||||
text: "SEMI F47曲线",
|
|
||||||
x: "center",
|
|
||||||
},
|
|
||||||
grid: {
|
|
||||||
left: "4%",
|
|
||||||
right: "5%",
|
|
||||||
bottom: "10%",
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data: ["边界线", "可容忍事件", "不可容忍事件"],
|
|
||||||
x: "left",
|
|
||||||
},
|
|
||||||
color: ["yellow", "green", "red"],
|
|
||||||
xAxis: [
|
|
||||||
{
|
|
||||||
type: "log",
|
|
||||||
min: "0.001",
|
|
||||||
max: "1000",
|
|
||||||
splitLine: {
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
name: "s",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
yAxis: [
|
|
||||||
{
|
|
||||||
type: "value",
|
|
||||||
max: ${zdz} + 20,
|
|
||||||
splitNumber: 10,
|
|
||||||
minInterval: 0.1,
|
|
||||||
name: "%",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: "边界线",
|
|
||||||
type: "line",
|
|
||||||
data: ${bjx},
|
|
||||||
showSymbol: false,
|
|
||||||
tooltips: {
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "可容忍事件",
|
|
||||||
type: "scatter",
|
|
||||||
symbol: "circle",
|
|
||||||
data: ${point}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "不可容忍事件",
|
|
||||||
type: "scatter",
|
|
||||||
symbol: "circle",
|
|
||||||
data: ${pointno}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
<#--暂降幅值的概率分布函数专用模板-->
|
|
||||||
{
|
|
||||||
backgroundColor: "#fff",
|
|
||||||
title: {
|
|
||||||
text: "暂降幅值的概率分布函数",
|
|
||||||
x: "center"
|
|
||||||
},
|
|
||||||
grid: {
|
|
||||||
left: "10%",
|
|
||||||
right: "10%",
|
|
||||||
bottom: "15%"
|
|
||||||
},
|
|
||||||
toolbox: {
|
|
||||||
show: true,
|
|
||||||
feature: {
|
|
||||||
restore: { show: true },
|
|
||||||
saveAsImage: { show: true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: "axis",
|
|
||||||
formatter: "暂降幅值: {b0}<br />概率分布: {c0}%",
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
show: true,
|
|
||||||
left: 10,
|
|
||||||
data: ["概率分布", "占比"],
|
|
||||||
},
|
|
||||||
calculable: true,
|
|
||||||
xAxis: [
|
|
||||||
{
|
|
||||||
type: "category",
|
|
||||||
boundaryGap: false,
|
|
||||||
name: "暂降幅值",
|
|
||||||
nameLocation: "center",
|
|
||||||
nameGap: 20,
|
|
||||||
nameTextStyle: {
|
|
||||||
fontSize: 15,
|
|
||||||
},
|
|
||||||
data: [
|
|
||||||
"0",
|
|
||||||
"10%",
|
|
||||||
"20%",
|
|
||||||
"30%",
|
|
||||||
"40%",
|
|
||||||
"50%",
|
|
||||||
"60%",
|
|
||||||
"70%",
|
|
||||||
"80%",
|
|
||||||
"90%",
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
yAxis: [
|
|
||||||
{
|
|
||||||
type: "value",
|
|
||||||
name: "概率分布",
|
|
||||||
nameLocation: "center",
|
|
||||||
nameGap: 40,
|
|
||||||
nameTextStyle: {
|
|
||||||
fontSize: 15,
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
formatter: "{value} %",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: "value",
|
|
||||||
name: "占比",
|
|
||||||
nameLocation: "center",
|
|
||||||
nameGap: 40,
|
|
||||||
nameTextStyle: {
|
|
||||||
fontSize: 15,
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
formatter: "{value} %",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: "概率分布",
|
|
||||||
type: "line",
|
|
||||||
data: ${eventValue},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "占比",
|
|
||||||
type: "bar",
|
|
||||||
data: ${pereventValue},
|
|
||||||
barWidth: 30
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
<#--持续时间的概率分布函数专用模板-->
|
|
||||||
{
|
|
||||||
backgroundColor: "#fff",
|
|
||||||
title: {
|
|
||||||
text: "持续时间的概率分布函数",
|
|
||||||
x: "center",
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
show: true,
|
|
||||||
left: 10,
|
|
||||||
data: ["概率分布", "占比"],
|
|
||||||
},
|
|
||||||
calculable: true,
|
|
||||||
grid: {
|
|
||||||
left: "10%",
|
|
||||||
right: "10%",
|
|
||||||
bottom: "15%"
|
|
||||||
},
|
|
||||||
xAxis: [
|
|
||||||
{
|
|
||||||
type: "category",
|
|
||||||
boundaryGap: false,
|
|
||||||
name: "暂降持续时间(s)",
|
|
||||||
nameLocation: "center",
|
|
||||||
nameGap: 20,
|
|
||||||
nameTextStyle: {
|
|
||||||
fontSize: 15,
|
|
||||||
},
|
|
||||||
data: ["0.01", "0.1", "0.25", "0.5", "1", "3", "20", "60", "180"],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
yAxis: [
|
|
||||||
{
|
|
||||||
type: "value",
|
|
||||||
name: "概率分布",
|
|
||||||
nameLocation: "center",
|
|
||||||
nameGap: 40,
|
|
||||||
nameTextStyle: {
|
|
||||||
fontSize: 15,
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
formatter: "{value} %",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: "value",
|
|
||||||
name: "占比",
|
|
||||||
nameLocation: "center",
|
|
||||||
nameGap: 40,
|
|
||||||
nameTextStyle: {
|
|
||||||
fontSize: 15,
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
formatter: "{value} %",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: "概率分布",
|
|
||||||
type: "line",
|
|
||||||
data: ${sisttime},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "占比",
|
|
||||||
type: "bar",
|
|
||||||
data: ${persisttime},
|
|
||||||
barWidth: 30,
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
<#--月份统计专用模板-->
|
|
||||||
{
|
|
||||||
backgroundColor: "#fff",
|
|
||||||
title: {
|
|
||||||
text: "${text}",
|
|
||||||
x: "center",
|
|
||||||
},
|
|
||||||
color: ["#FF8C00"],
|
|
||||||
legend: {
|
|
||||||
data: ["暂降次数"],
|
|
||||||
x: "left",
|
|
||||||
},
|
|
||||||
grid: {
|
|
||||||
left: "3%",
|
|
||||||
bottom: "3%",
|
|
||||||
right: "7%",
|
|
||||||
containLabel: true,
|
|
||||||
},
|
|
||||||
xAxis: [
|
|
||||||
{
|
|
||||||
type: "category",
|
|
||||||
data: ${months},
|
|
||||||
name: "${xname}",
|
|
||||||
splitLine: {
|
|
||||||
show: false,
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
show: true,
|
|
||||||
interval: 0,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
yAxis: [
|
|
||||||
{
|
|
||||||
type: "value",
|
|
||||||
name: "次",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: "暂降次数",
|
|
||||||
type: "bar",
|
|
||||||
barMaxWidth: 45,
|
|
||||||
itemStyle: {
|
|
||||||
normal: {
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
textStyle: {
|
|
||||||
label: { show: true, position: "top" },
|
|
||||||
color: "#8B008B",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data: ${handle},
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
<#--类型专用模板-->
|
|
||||||
{
|
|
||||||
backgroundColor: '#fff',
|
|
||||||
animation: false,
|
|
||||||
title: {
|
|
||||||
text: '暂降类型',
|
|
||||||
x: 'center',
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
orient: 'vertical',
|
|
||||||
left: 'left',
|
|
||||||
data: ${typeArray}
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: '暂降类型',
|
|
||||||
type: 'pie',
|
|
||||||
radius: '70%',
|
|
||||||
center: ['50%', '60%'],
|
|
||||||
label: {
|
|
||||||
normal: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
show: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
lableLine: {
|
|
||||||
normal: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
show: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data: [<#list valueArray as a>
|
|
||||||
{value:${a.times?c},
|
|
||||||
name:'${a.type}'},
|
|
||||||
</#list>],
|
|
||||||
itemStyle: {
|
|
||||||
emphasis: {
|
|
||||||
shadowBlur: 10,
|
|
||||||
shadowOffsetX: 0,
|
|
||||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
<#--暂降原因专用模板-->
|
|
||||||
{
|
|
||||||
backgroundColor: '#fff',
|
|
||||||
animation: false,
|
|
||||||
title: {
|
|
||||||
text: '暂降原因',
|
|
||||||
x: 'center'
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
orient: 'vertical',
|
|
||||||
left: 'left',
|
|
||||||
data: ${typeArray}
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: '暂降原因',
|
|
||||||
type: 'pie',
|
|
||||||
radius: '70%',
|
|
||||||
center: ['50%', '53%'],
|
|
||||||
label: {
|
|
||||||
normal: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
show: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
lableLine: {
|
|
||||||
normal: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
show: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data: [<#list valueArray as a>
|
|
||||||
{value:${a.times?c},
|
|
||||||
name:'${a.reason}'},
|
|
||||||
</#list>],
|
|
||||||
itemStyle: {
|
|
||||||
emphasis: {
|
|
||||||
shadowBlur: 10,
|
|
||||||
shadowOffsetX: 0,
|
|
||||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
{
|
|
||||||
backgroundColor: "#FFF",
|
|
||||||
title: {
|
|
||||||
text: '电压等级',
|
|
||||||
x: 'center'
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
axisPointer: {
|
|
||||||
type: 'shadow'
|
|
||||||
},
|
|
||||||
formatter: function (params) {
|
|
||||||
var tips = "";
|
|
||||||
tips += params[0].name ;
|
|
||||||
for (var i = 0; i < params.length; i++) {
|
|
||||||
tips += params[i].seriesName + ":" + params[i].value ;
|
|
||||||
}
|
|
||||||
return tips;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
color: ['orange'],
|
|
||||||
legend: {
|
|
||||||
data: ['暂降次数'],
|
|
||||||
selectedMode: false,
|
|
||||||
x: 'left'
|
|
||||||
},
|
|
||||||
grid: {
|
|
||||||
left: '3%',
|
|
||||||
right: '12%',
|
|
||||||
bottom: '6%',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
xAxis: [{
|
|
||||||
type: 'category',
|
|
||||||
data: ${xvalue},
|
|
||||||
splitLine: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
name: '电压等级\n(监测点数)',
|
|
||||||
axisLabel: {
|
|
||||||
interval: 0,
|
|
||||||
show: true,
|
|
||||||
fontSize:10
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
yAxis: [{
|
|
||||||
type: 'value',
|
|
||||||
name: '(次)'
|
|
||||||
}],
|
|
||||||
series: [{
|
|
||||||
name: '暂降次数',
|
|
||||||
type: 'bar',
|
|
||||||
itemStyle: {
|
|
||||||
normal: {
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
textStyle: {
|
|
||||||
color: 'purple'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data: ${yvalue},
|
|
||||||
barMaxWidth: 45
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
{
|
|
||||||
backgroundColor: '#FFF',
|
|
||||||
title: {
|
|
||||||
text: '区域统计',
|
|
||||||
x: 'center'
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
axisPointer: {
|
|
||||||
type: 'shadow'
|
|
||||||
},
|
|
||||||
formatter: function (params) {
|
|
||||||
var tips = "";
|
|
||||||
tips += params[0].name ;
|
|
||||||
for (var i = 0; i < params.length; i++) {
|
|
||||||
tips += params[i].seriesName + ":" + params[i].value ;
|
|
||||||
}
|
|
||||||
return tips;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
color: ['orange'],
|
|
||||||
|
|
||||||
grid: {
|
|
||||||
left: '1%',
|
|
||||||
right: '7%',
|
|
||||||
bottom: '8%',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data: ['暂降次数'],
|
|
||||||
selectedMode: false,
|
|
||||||
x: 'left'
|
|
||||||
},
|
|
||||||
xAxis: [{
|
|
||||||
type: 'category',
|
|
||||||
data: ${xvalue},
|
|
||||||
splitLine: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
name: '地区\n(监测点数)',
|
|
||||||
axisLabel: {
|
|
||||||
interval: 0,
|
|
||||||
show: true,
|
|
||||||
rotate:0,
|
|
||||||
fontSize:10
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
yAxis: [{
|
|
||||||
type: 'value',
|
|
||||||
name: '(次)'
|
|
||||||
}],
|
|
||||||
series: [{
|
|
||||||
name: '暂降次数',
|
|
||||||
type: 'bar',
|
|
||||||
itemStyle: {
|
|
||||||
normal: {
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
textStyle: {
|
|
||||||
color: 'purple'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data: ${yvalue},
|
|
||||||
barMaxWidth: 45
|
|
||||||
}],
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
animation:false,
|
|
||||||
xAxis: {},
|
|
||||||
yAxis: {},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
symbolSize: 2,
|
|
||||||
data: ${bdata},
|
|
||||||
type: 'scatter'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
{
|
|
||||||
backgroundColor: "#FFF",
|
|
||||||
title: {
|
|
||||||
text: ${test},
|
|
||||||
x: 'center'
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'axis',
|
|
||||||
axisPointer: {
|
|
||||||
type: 'shadow'
|
|
||||||
},
|
|
||||||
formatter: function (params) {
|
|
||||||
var tips = "";
|
|
||||||
tips += params[0].name ;
|
|
||||||
for (var i = 0; i < params.length; i++) {
|
|
||||||
tips += params[i].seriesName + ":" + params[i].value;
|
|
||||||
}
|
|
||||||
return tips;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
grid: {
|
|
||||||
left: '3%',
|
|
||||||
bottom: '6%',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data: ['未关联暂降次数', '已关联处理事件'],
|
|
||||||
x: 'left'
|
|
||||||
},
|
|
||||||
xAxis: [{
|
|
||||||
type: 'category',
|
|
||||||
data:${xvalue},
|
|
||||||
name: ${test},
|
|
||||||
splitLine: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
show: true,
|
|
||||||
interval: 0,
|
|
||||||
fontSize:10
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
yAxis: [{
|
|
||||||
type: 'value',
|
|
||||||
name: '次'
|
|
||||||
}],
|
|
||||||
series: [{
|
|
||||||
name: '未关联暂降次数',
|
|
||||||
type: 'bar',
|
|
||||||
stack: '事件总数',
|
|
||||||
barMaxWidth: 45,
|
|
||||||
itemStyle: {
|
|
||||||
normal: {
|
|
||||||
color: 'orange',
|
|
||||||
barBorderColor: 'orange',
|
|
||||||
barBorderWidth: 2,
|
|
||||||
barBorderRadius: 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data: ${yvalue1}
|
|
||||||
}, {
|
|
||||||
name: '已关联处理事件',
|
|
||||||
type: 'bar',
|
|
||||||
stack: '事件总数',
|
|
||||||
barMaxWidth: 45,
|
|
||||||
itemStyle: {
|
|
||||||
normal: {
|
|
||||||
color: "#ccc",
|
|
||||||
barBorderColor: '#ccc',
|
|
||||||
barBorderWidth: 2,
|
|
||||||
barBorderRadius: 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data: ${yvalue2}
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
@@ -25,16 +25,6 @@ public class FreemarkerUtil {
|
|||||||
|
|
||||||
public String generateString(String templateFileName, String templateDirectory, Map<String, Object> datas)
|
public String generateString(String templateFileName, String templateDirectory, Map<String, Object> datas)
|
||||||
throws IOException, TemplateException {
|
throws IOException, TemplateException {
|
||||||
// Configuration configuration = new Configuration(Configuration.VERSION_2_3_0);
|
|
||||||
// // 设置默认编码
|
|
||||||
// configuration.setDefaultEncoding("UTF-8");
|
|
||||||
//
|
|
||||||
// // 设置模板所在文件夹
|
|
||||||
// path = java.net.URLDecoder.decode(path, "utf-8");
|
|
||||||
// System.out.println("路径为:" + path);
|
|
||||||
// System.out.println("templateDirectory:" + templateDirectory);
|
|
||||||
// configuration.setDirectoryForTemplateLoading(new File(path + templateDirectory));
|
|
||||||
|
|
||||||
// 生成模板对象
|
// 生成模板对象
|
||||||
Template template = freeMarkerConfigurer.getConfiguration().getTemplate(templateFileName);
|
Template template = freeMarkerConfigurer.getConfiguration().getTemplate(templateFileName);
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.fileupload.FileItem;
|
import org.apache.commons.fileupload.FileItem;
|
||||||
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
|
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.tomcat.util.http.fileupload.IOUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.influxdb.dto.QueryResult;
|
import org.influxdb.dto.QueryResult;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
@@ -236,8 +236,8 @@ public class CustomReportServiceImpl implements CustomReportService {
|
|||||||
.eq(ExcelRpt::getType, reportSearchParam.getType())
|
.eq(ExcelRpt::getType, reportSearchParam.getType())
|
||||||
//报表日期
|
//报表日期
|
||||||
.eq(ExcelRpt::getDataDate, reportSearchParam.getStartTime());
|
.eq(ExcelRpt::getDataDate, reportSearchParam.getStartTime());
|
||||||
ExcelRpt excelRpts = excelRptMapper.selectOne(lambdaQuery);
|
|
||||||
try {
|
try {
|
||||||
|
ExcelRpt excelRpts = excelRptMapper.selectOne(lambdaQuery);
|
||||||
if (Objects.nonNull(excelRpts)) {
|
if (Objects.nonNull(excelRpts)) {
|
||||||
fileStorageUtil.downloadStream(response, excelRpts.getContent());
|
fileStorageUtil.downloadStream(response, excelRpts.getContent());
|
||||||
} else {
|
} else {
|
||||||
@@ -360,12 +360,12 @@ public class CustomReportServiceImpl implements CustomReportService {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 解析报表数据
|
* 解析报表模板赋值数据
|
||||||
*/
|
*/
|
||||||
private String analyzeReport(ReportSearchParam reportSearchParam, ExcelRptTemp excelRptTemp) {
|
private String analyzeReport(ReportSearchParam reportSearchParam, ExcelRptTemp excelRptTemp) {
|
||||||
//根据content,获取v值并进行处理
|
//根据content,获取v值并进行处理
|
||||||
List<ReportTemplateDTO> reportTemplateDTOList = new ArrayList<>();
|
List<ReportTemplateDTO> reportTemplateDTOList = new ArrayList<>();
|
||||||
JSONArray jsonArray ;
|
JSONArray jsonArray;
|
||||||
InputStream fileStream = null;
|
InputStream fileStream = null;
|
||||||
try {
|
try {
|
||||||
//通过文件服务器获取
|
//通过文件服务器获取
|
||||||
@@ -412,12 +412,8 @@ public class CustomReportServiceImpl implements CustomReportService {
|
|||||||
});
|
});
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new BusinessException(HarmonicResponseEnum.CUSTOM_REPORT_JSON);
|
throw new BusinessException(HarmonicResponseEnum.CUSTOM_REPORT_JSON);
|
||||||
}finally {
|
} finally {
|
||||||
try {
|
IOUtils.closeQuietly(fileStream);
|
||||||
fileStream.close();
|
|
||||||
} catch (IOException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
List<ReportTemplateDTO> endList = new ArrayList<>();
|
List<ReportTemplateDTO> endList = new ArrayList<>();
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.njcn;
|
||||||
|
|
||||||
|
import com.njcn.oss.constant.OssPath;
|
||||||
|
import com.njcn.oss.utils.FileStorageUtil;
|
||||||
|
import lombok.SneakyThrows;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hongawen
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2021年12月14日 12:55
|
||||||
|
*/
|
||||||
|
public class OssTest extends BaseJunitTest{
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FileStorageUtil fileStorageUtil;
|
||||||
|
|
||||||
|
@SneakyThrows
|
||||||
|
@Test
|
||||||
|
public void test(){
|
||||||
|
File file = new File("C:\\Users\\DELL\\Desktop\\6FEC92B75A104D1295715A661A2CC196.docx");
|
||||||
|
String s = fileStorageUtil.uploadStream(new FileInputStream(file), OssPath.ALGORITHM, UUID.randomUUID() + ".docx");
|
||||||
|
System.out.println("hello");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user