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";
}
}
......@@ -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