Commit 45a2e4cb by zhangyuan

修改、新加首页统计接口、页面

parent ef550372
package com.ruoyi.web.controller.system;
import java.util.List;
import com.ruoyi.system.service.IOrhonGtxxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
......@@ -33,6 +35,9 @@ public class SysIndexController extends BaseController
@org.springframework.beans.factory.annotation.Autowired
private com.ruoyi.system.service.IOrhonShzzService orhonShzzService;
@Autowired
private IOrhonGtxxService orhonGtxxService;
// 系统首页
@GetMapping("/index")
public String index(ModelMap mmap)
......@@ -63,8 +68,10 @@ public class SysIndexController extends BaseController
{
String dzz = orhonFgqyService.findDzz();
String qyzs = orhonFgqyService.findQyzs();
String qyzyzs = orhonFgqyService.findQyzyzs();
String gtzs = orhonGtxxService.findGtzs();
double fgl=0;
fgl=Double.valueOf( dzz )/Double.valueOf( qyzs );
fgl=Double.valueOf( dzz )/Double.valueOf( qyzyzs );
java.text.DecimalFormat df = new java.text.DecimalFormat("0.0");
String format = df.format( fgl );
......@@ -79,17 +86,22 @@ public class SysIndexController extends BaseController
String qyzs1 = orhonShzzService.findQyzs();
String shzz = orhonShzzService.findShzz();
String shzzzydzzs = orhonShzzService.findShzzzydzzs();
double shzzfgl=0;
shzzfgl=Double.valueOf( shzz )/Double.valueOf( qyzs1 );
shzzfgl=Double.valueOf( shzzzydzzs )/Double.valueOf( qyzs1 );
String percent1 = nf.format(shzzfgl);
mmap.put("version", Global.getVersion());
mmap.put("qyzs",qyzs);
mmap.put( "dzz",dzz );
mmap.put("qyzyzs",qyzyzs);
mmap.put( "fgl",percent );
mmap.put( "shzzqyzs",qyzs1 );
mmap.put( "shzz",shzz );
mmap.put( "shzzzydzzs",shzzzydzzs );
mmap.put( "shzzfgl",percent1 );
mmap.put( "gtzs",gtzs );
return "main";
}
}
......@@ -26,7 +26,7 @@
<div class="row border-bottom white-bg dashboard-header">
<div class="col-sm-12">
<h4 class="form-header h4">统计信息</h4>
<div class="col-sm-2" style="float: left ;">
<div class="col-xs-2" style="float: left ;width: 11%;padding-right: 0px;">
<!-- <button class="btn btn-primary dim btn-large-dim" type="button"><span style="font-size: 26px;" th:text="${qyzs}"></span></button>-->
<!-- <span>非公企业总数</span>-->
<div class="prg-cont rad-prg" id="indicatorContainer">
......@@ -36,17 +36,37 @@
</div>
</div>
</div>
<div class="col-sm-2" style="float: left ;">
<div class="col-xs-2" style="float: left ;width: 11%;padding-right: 0px;">
<!-- <button class="btn btn-primary dim btn-large-dim" type="button"><span style="font-size: 26px;" th:text="${qyzs}"></span></button>-->
<!-- <span>非公企业总数</span>-->
<div class="prg-cont rad-prg" id="indicatorContainer6">
<div class="rad-con">
<p th:text="${qyzyzs}"></p>
<p>正常运营企业数</p>
</div>
</div>
</div>
<div class="col-xs-2" style="float: left ;width: 11%;padding-right: 0px;">
<!-- <button class="btn btn-primary dim btn-large-dim" type="button"><span style="font-size: 26px;" th:text="${qyzs}"></span></button>-->
<!-- <span>非公企业总数</span>-->
<div class="prg-cont rad-prg" id="indicatorContainer7">
<div class="rad-con">
<p th:text="${gtzs}"></p>
<p>个体户总数</p>
</div>
</div>
</div>
<div class="col-xs-2" style="float: left ;width: 11%;padding-right: 0px;">
<!-- <button class="btn btn-primary dim btn-large-dim" type="button"><span style="font-size: 26px;" th:text="${dzz}"></span></button>-->
<!-- <span>非公企业党组织数</span>-->
<div class="prg-cont rad-prg" id="indicatorContainer1">
<div class="rad-con">
<p th:text="${dzz}"></p>
<p>非公企业党组织数</p>
<p>非公党组织数</p>
</div>
</div>
</div>
<div class="col-sm-2" style="float: left ;">
<div class="col-xs-2" style="float: left ;width: 11%;padding-right: 0px;">
<!-- <button class="btn btn-primary dim btn-large-dim" type="button"><span style="font-size: 26px;" th:text="${fgl}"></span></button>-->
<!-- <span>非公企业党组织覆盖率</span>-->
<div class="prg-cont rad-prg" id="indicatorContainer2">
......@@ -58,38 +78,48 @@
</div>
<div class="col-sm-2" style="float: left;">
<div class="col-xs-2" style="float: left;width: 11%;padding-right: 0px;">
<!-- <button class="btn btn-primary dim btn-large-dim" type="button"><span style="font-size: 26px;" th:text="${shzzqyzs}"></span></button>-->
<!-- <span>社会组织总数</span>-->
<div class="prg-cont rad-prg" id="indicatorContainer3">
<div class="rad-con">
<p th:text="${shzzqyzs}"></p>
<p>社会组织总数</p>
</div>
<div class="prg-cont rad-prg" id="indicatorContainer3">
<div class="rad-con">
<p th:text="${shzzqyzs}"></p>
<p>社会组织总数</p>
</div>
</div>
</div>
<div class="col-sm-2" style="float: left ;">
<!-- <button class="btn btn-primary dim btn-large-dim" type="button"><span style="font-size: 26px;" th:text="${shzz}"></span></button>-->
<!-- <span>社会组织党组织数</span>-->
<div class="prg-cont rad-prg" id="indicatorContainer4">
<div class="rad-con">
<p th:text="${shzz}"></p>
<p>社会组织党组织数</p>
</div>
<div class="col-xs-2" style="float: left ;width: 11%;padding-right: 0px;">
<!-- <button class="btn btn-primary dim btn-large-dim" type="button"><span style="font-size: 26px;" th:text="${shzz}"></span></button>-->
<!-- <span>社会组织党组织数</span>-->
<div class="prg-cont rad-prg" id="indicatorContainer4">
<div class="rad-con">
<p th:text="${shzz}"></p>
<p>社会组织党组织数</p>
</div>
</div>
<div class="col-sm-2" style="float: left ;">
<!-- <button class="btn btn-primary dim btn-large-dim" type="button"><span style="font-size: 26px;" th:text="${shzzfgl}"></span></button>-->
<!-- <span>社会组织党组织覆盖率</span>-->
<div class="prg-cont rad-prg" id="indicatorContainer5">
<div class="rad-con">
<p th:text="${shzzfgl}"></p>
<p>社会组织党组织覆盖率</p>
</div>
</div>
<div class="col-xs-2" style="float: left ;width: 11%;padding-right: 0px;">
<!-- <button class="btn btn-primary dim btn-large-dim" type="button"><span style="font-size: 26px;" th:text="${shzz}"></span></button>-->
<!-- <span>社会组织党组织数</span>-->
<div class="prg-cont rad-prg" id="indicatorContainer8">
<div class="rad-con">
<p th:text="${shzzzydzzs}"></p>
<p>正常运营社会组织党组织数</p>
</div>
</div>
</div>
<div class="col-xs-2" style="float: left ;width: 11%;padding-right: 0px;">
<!-- <button class="btn btn-primary dim btn-large-dim" type="button"><span style="font-size: 26px;" th:text="${shzzfgl}"></span></button>-->
<!-- <span>社会组织党组织覆盖率</span>-->
<div class="prg-cont rad-prg" id="indicatorContainer5">
<div class="rad-con">
<p th:text="${shzzfgl}"></p>
<p>社会组织党组织覆盖率</p>
</div>
</div>
</div>
</div>
</div>
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-sm-6">
......@@ -128,16 +158,25 @@
</div>
</div>
</div>
<!-- 曲线图-->
<div class="row">
<div class="col-sm-12">
<h5 style="border-left: 2px solid red;padding-left: 10px;">市直、各旗区非公企业与社会组织已建立党组织数量分布</h5>
<!-- 非公企业曲线图-->
<div class="col-sm-6">
<h5 style="border-left: 2px solid red;padding-left: 10px;">市直、各旗区非公企业已建立党组织数量分布</h5>
<div class="ibox float-e-margins">
<div class="ibox-content">
<div class="echarts" id="echarts-curve-chart"></div>
</div>
</div>
</div>
<!-- 社会组织曲线图-->
<div class="col-sm-6">
<h5 style="border-left: 2px solid red;padding-left: 10px;">市直、各旗区社会组织已建立党组织数量分布</h5>
<div class="ibox float-e-margins">
<div class="ibox-content">
<div class="echarts" id="echarts-curve-chart1"></div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
......@@ -248,6 +287,33 @@
displayNumber: false,
radius: 50
});
$('#indicatorContainer6').radialIndicator({
barColor: '#480adc',
barWidth: 5,
initValue: [[${qyzyzs}]],
roundCorner : true,
percentage: true,
displayNumber: false,
radius: 50
});
$('#indicatorContainer7').radialIndicator({
barColor: '#10eaea',
barWidth: 5,
initValue: [[${gtzs}]],
roundCorner : true,
percentage: true,
displayNumber: false,
radius: 50
});
$('#indicatorContainer8').radialIndicator({
barColor: '#43ef0b',
barWidth: 5,
initValue: [[${shzzzydzzs}]],
roundCorner : true,
percentage: true,
displayNumber: false,
radius: 50
});
// setTimeout(function(){
// var radObj = $('#indicatorContainer2').data('radialIndicator');
// radObj.animate(100);
......@@ -300,12 +366,12 @@
stack: '总量',
symbolSize:10,
itemStyle: {
color: '#f8e7cd'
color: '#F4A460'
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#f8e7cd'
color: '#F4A460'
}, {
offset: 1,
color: '#faf3ed'
......@@ -473,12 +539,16 @@
for(let i = 0;i<curveCharts.length;i++){
curveoption.series[0].data.push(curveCharts[i].fgqyValue)
curveoption.series[1].data.push(curveCharts[i].shzzValue)
curveoption1.series[0].data.push(curveCharts[i].shzzValue)
curveoption.xAxis[0].data.push(curveCharts[i].name)
curveoption1.xAxis[0].data.push(curveCharts[i].name)
}
curveChart.setOption(curveoption);
window.onresize = curveChart.resize;
curveChart1.setOption(curveoption1);
window.onresize = curveChart1.resize;
console.log(pieoption)
let maxs = Math.max.apply(Math,pieCharts.map(item => { return item.shzzValue }))
......@@ -633,12 +703,12 @@
stack: '总量',
symbolSize:10,
itemStyle: {
color: '#c5f4e2'
color: '#00CED1'
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#c5f4e2'
color: '#00CED1'
}, {
offset: 1,
color: '#e8f7f4'
......@@ -650,8 +720,6 @@
};
var curveChart = echarts.init(document.getElementById("echarts-curve-chart"));
var curveoption = {
tooltip: {
......@@ -671,7 +739,7 @@
// y 设置垂直安放位置,默认全图顶端,可选值:'top' ¦ 'bottom' ¦ 'center' ¦ {number}(y坐标,单位px)
y: 'top',
align: 'right',
data: ['非公企业','社会组织']
data: ['非公企业']
},
grid: {
left: '3%',
......@@ -706,11 +774,74 @@
smooth: true,
data: [],
},
}
]
};
var curveChart1 = echarts.init(document.getElementById("echarts-curve-chart1"));
var curveoption1 = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
legend: {
// orient 设置布局方式,默认水平布局,可选值:'horizontal'(水平) ¦ 'vertical'(垂直)
orient: 'vertical',
// x 设置水平安放位置,默认全图居中,可选值:'center' ¦ 'left' ¦ 'right' ¦ {number}(x坐标,单位px)
x: 'right',
// y 设置垂直安放位置,默认全图顶端,可选值:'top' ¦ 'bottom' ¦ 'center' ¦ {number}(y坐标,单位px)
y: 'top',
align: 'right',
data: ['社会组织']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: false
},
xAxis: [
{
type: 'category',
axisTick: {
alignWithLabel: true
},
axisLine: {
onZero: false,
lineStyle: {
color: '#6a7985',
}
},
data: []
}
],
yAxis: [
{
type: 'value'
}
],
series: [
{
name: '社会组织',
type: 'line',
smooth: true,
itemStyle : {
normal : {
color:'#3526ff',
lineStyle:{
color:'#3526ff'
}
}
},
data: [],
}
......
......@@ -65,6 +65,8 @@ public interface OrhonFgqyMapper
public String findQyzs();
String findQyzyzs();
public List<Map> selectLineChart();
List<Map> selectBarChart();
......@@ -74,4 +76,5 @@ public interface OrhonFgqyMapper
List<Map> selectPieChart();
List<Map> selectRadarChart();
}
......@@ -58,4 +58,6 @@ public interface OrhonGtxxMapper
* @return 结果
*/
public int deleteOrhonGtxxByIds(String[] ids);
String findGtzs();
}
......@@ -62,4 +62,6 @@ public interface OrhonShzzMapper
public String findShzz();
public String findQyzs();
String findShzzzydzzs();
}
......@@ -66,4 +66,6 @@ public interface IOrhonFgqyService
public String findDzz();
Object chart();
String findQyzyzs();
}
......@@ -58,4 +58,6 @@ public interface IOrhonGtxxService
* @return 结果
*/
public int deleteOrhonGtxxById(String id);
String findGtzs();
}
......@@ -62,4 +62,6 @@ public interface IOrhonShzzService
public String findQyzs();
public String findShzz();
String findShzzzydzzs();
}
......@@ -107,6 +107,11 @@ public class OrhonFgqyServiceImpl implements com.ruoyi.system.service.IOrhonFgqy
}
@Override
public String findQyzyzs() {
return orhonFgqyMapper.findQyzyzs();
}
@Override
public Object chart() {
Map resultMap = new HashMap();
try {
......@@ -129,4 +134,6 @@ public class OrhonFgqyServiceImpl implements com.ruoyi.system.service.IOrhonFgqy
}
return AjaxResult.success(resultMap);
}
}
......@@ -92,4 +92,9 @@ public class OrhonGtxxServiceImpl implements IOrhonGtxxService
{
return orhonGtxxMapper.deleteOrhonGtxxById(id);
}
@Override
public String findGtzs() {
return orhonGtxxMapper.findGtzs();
}
}
......@@ -100,4 +100,9 @@ public class OrhonShzzServiceImpl implements com.ruoyi.system.service.IOrhonShzz
public String findShzz() {
return orhonShzzMapper.findShzz();
}
@Override
public String findShzzzydzzs() {
return orhonShzzMapper.findShzzzydzzs();
}
}
......@@ -127,6 +127,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select COUNT(*) from orhon_fgqy
</select>
<!-- 查询非公企业在营总数总数-->
<select id="findQyzyzs" resultType="String">
select COUNT(*) from orhon_fgqy where (lx is null or lx = '0')
</select>
<insert id="insertOrhonFgqy" parameterType="OrhonFgqy">
insert into orhon_fgqy
......
......@@ -355,4 +355,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<!-- 查询个体工商户总数总数-->
<select id="findGtzs" resultType="String">
select COUNT(*) from orhon_gtxx
</select>
</mapper>
\ No newline at end of file
......@@ -494,4 +494,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select COUNT(*) from orhon_shzz
</select>
<!-- 查询非公企业在营总数总数-->
<select id="findShzzzydzzs" resultType="String">
select COUNT(*) from orhon_shzz where (lx is null or lx = '0') and isdzz=1
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment