Commit 45a2e4cb by zhangyuan

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

parent ef550372
package com.ruoyi.web.controller.system; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import com.ruoyi.system.service.IOrhonGtxxService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
...@@ -33,6 +35,9 @@ public class SysIndexController extends BaseController ...@@ -33,6 +35,9 @@ public class SysIndexController extends BaseController
@org.springframework.beans.factory.annotation.Autowired @org.springframework.beans.factory.annotation.Autowired
private com.ruoyi.system.service.IOrhonShzzService orhonShzzService; private com.ruoyi.system.service.IOrhonShzzService orhonShzzService;
@Autowired
private IOrhonGtxxService orhonGtxxService;
// 系统首页 // 系统首页
@GetMapping("/index") @GetMapping("/index")
public String index(ModelMap mmap) public String index(ModelMap mmap)
...@@ -63,8 +68,10 @@ public class SysIndexController extends BaseController ...@@ -63,8 +68,10 @@ public class SysIndexController extends BaseController
{ {
String dzz = orhonFgqyService.findDzz(); String dzz = orhonFgqyService.findDzz();
String qyzs = orhonFgqyService.findQyzs(); String qyzs = orhonFgqyService.findQyzs();
String qyzyzs = orhonFgqyService.findQyzyzs();
String gtzs = orhonGtxxService.findGtzs();
double fgl=0; 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"); java.text.DecimalFormat df = new java.text.DecimalFormat("0.0");
String format = df.format( fgl ); String format = df.format( fgl );
...@@ -79,17 +86,22 @@ public class SysIndexController extends BaseController ...@@ -79,17 +86,22 @@ public class SysIndexController extends BaseController
String qyzs1 = orhonShzzService.findQyzs(); String qyzs1 = orhonShzzService.findQyzs();
String shzz = orhonShzzService.findShzz(); String shzz = orhonShzzService.findShzz();
String shzzzydzzs = orhonShzzService.findShzzzydzzs();
double shzzfgl=0; double shzzfgl=0;
shzzfgl=Double.valueOf( shzz )/Double.valueOf( qyzs1 ); shzzfgl=Double.valueOf( shzzzydzzs )/Double.valueOf( qyzs1 );
String percent1 = nf.format(shzzfgl); String percent1 = nf.format(shzzfgl);
mmap.put("version", Global.getVersion()); mmap.put("version", Global.getVersion());
mmap.put("qyzs",qyzs); mmap.put("qyzs",qyzs);
mmap.put( "dzz",dzz ); mmap.put( "dzz",dzz );
mmap.put("qyzyzs",qyzyzs);
mmap.put( "fgl",percent ); mmap.put( "fgl",percent );
mmap.put( "shzzqyzs",qyzs1 ); mmap.put( "shzzqyzs",qyzs1 );
mmap.put( "shzz",shzz ); mmap.put( "shzz",shzz );
mmap.put( "shzzzydzzs",shzzzydzzs );
mmap.put( "shzzfgl",percent1 ); mmap.put( "shzzfgl",percent1 );
mmap.put( "gtzs",gtzs );
return "main"; return "main";
} }
} }
...@@ -65,6 +65,8 @@ public interface OrhonFgqyMapper ...@@ -65,6 +65,8 @@ public interface OrhonFgqyMapper
public String findQyzs(); public String findQyzs();
String findQyzyzs();
public List<Map> selectLineChart(); public List<Map> selectLineChart();
List<Map> selectBarChart(); List<Map> selectBarChart();
...@@ -74,4 +76,5 @@ public interface OrhonFgqyMapper ...@@ -74,4 +76,5 @@ public interface OrhonFgqyMapper
List<Map> selectPieChart(); List<Map> selectPieChart();
List<Map> selectRadarChart(); List<Map> selectRadarChart();
} }
...@@ -58,4 +58,6 @@ public interface OrhonGtxxMapper ...@@ -58,4 +58,6 @@ public interface OrhonGtxxMapper
* @return 结果 * @return 结果
*/ */
public int deleteOrhonGtxxByIds(String[] ids); public int deleteOrhonGtxxByIds(String[] ids);
String findGtzs();
} }
...@@ -62,4 +62,6 @@ public interface OrhonShzzMapper ...@@ -62,4 +62,6 @@ public interface OrhonShzzMapper
public String findShzz(); public String findShzz();
public String findQyzs(); public String findQyzs();
String findShzzzydzzs();
} }
...@@ -66,4 +66,6 @@ public interface IOrhonFgqyService ...@@ -66,4 +66,6 @@ public interface IOrhonFgqyService
public String findDzz(); public String findDzz();
Object chart(); Object chart();
String findQyzyzs();
} }
...@@ -58,4 +58,6 @@ public interface IOrhonGtxxService ...@@ -58,4 +58,6 @@ public interface IOrhonGtxxService
* @return 结果 * @return 结果
*/ */
public int deleteOrhonGtxxById(String id); public int deleteOrhonGtxxById(String id);
String findGtzs();
} }
...@@ -62,4 +62,6 @@ public interface IOrhonShzzService ...@@ -62,4 +62,6 @@ public interface IOrhonShzzService
public String findQyzs(); public String findQyzs();
public String findShzz(); public String findShzz();
String findShzzzydzzs();
} }
...@@ -107,6 +107,11 @@ public class OrhonFgqyServiceImpl implements com.ruoyi.system.service.IOrhonFgqy ...@@ -107,6 +107,11 @@ public class OrhonFgqyServiceImpl implements com.ruoyi.system.service.IOrhonFgqy
} }
@Override @Override
public String findQyzyzs() {
return orhonFgqyMapper.findQyzyzs();
}
@Override
public Object chart() { public Object chart() {
Map resultMap = new HashMap(); Map resultMap = new HashMap();
try { try {
...@@ -129,4 +134,6 @@ public class OrhonFgqyServiceImpl implements com.ruoyi.system.service.IOrhonFgqy ...@@ -129,4 +134,6 @@ public class OrhonFgqyServiceImpl implements com.ruoyi.system.service.IOrhonFgqy
} }
return AjaxResult.success(resultMap); return AjaxResult.success(resultMap);
} }
} }
...@@ -92,4 +92,9 @@ public class OrhonGtxxServiceImpl implements IOrhonGtxxService ...@@ -92,4 +92,9 @@ public class OrhonGtxxServiceImpl implements IOrhonGtxxService
{ {
return orhonGtxxMapper.deleteOrhonGtxxById(id); return orhonGtxxMapper.deleteOrhonGtxxById(id);
} }
@Override
public String findGtzs() {
return orhonGtxxMapper.findGtzs();
}
} }
...@@ -100,4 +100,9 @@ public class OrhonShzzServiceImpl implements com.ruoyi.system.service.IOrhonShzz ...@@ -100,4 +100,9 @@ public class OrhonShzzServiceImpl implements com.ruoyi.system.service.IOrhonShzz
public String findShzz() { public String findShzz() {
return orhonShzzMapper.findShzz(); return orhonShzzMapper.findShzz();
} }
@Override
public String findShzzzydzzs() {
return orhonShzzMapper.findShzzzydzzs();
}
} }
...@@ -127,6 +127,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -127,6 +127,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select COUNT(*) from orhon_fgqy select COUNT(*) from orhon_fgqy
</select> </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 id="insertOrhonFgqy" parameterType="OrhonFgqy">
insert into orhon_fgqy insert into orhon_fgqy
......
...@@ -355,4 +355,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -355,4 +355,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
</delete> </delete>
<!-- 查询个体工商户总数总数-->
<select id="findGtzs" resultType="String">
select COUNT(*) from orhon_gtxx
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -494,4 +494,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -494,4 +494,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select COUNT(*) from orhon_shzz select COUNT(*) from orhon_shzz
</select> </select>
<!-- 查询非公企业在营总数总数-->
<select id="findShzzzydzzs" resultType="String">
select COUNT(*) from orhon_shzz where (lx is null or lx = '0') and isdzz=1
</select>
</mapper> </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