From ddeecb977f263bb279ef677b29d17a25bf90225f Mon Sep 17 00:00:00 2001 From: e Date: Sun, 14 Oct 2018 00:02:12 +0800 Subject: [PATCH] =?UTF-8?q?1,=E4=BA=8C=E7=BB=B4=E7=A0=81JS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/uiDesigner.xml | 124 ++++ src/main/java/com/zzjee/BI/BiController.java | 275 +++++++++ .../webpage/com/zzjee/BI/home/reportbi.jsp | 327 +++++++++++ .../webapp/webpage/com/zzjee/BI/reportbi.jsp | 546 ------------------ src/main/webapp/webpage/main/acehome.jsp | 2 +- src/main/webapp/webpage/main/homeTab.jsp | 2 +- src/main/webapp/webpage/main/hplushome.jsp | 2 +- 7 files changed, 729 insertions(+), 549 deletions(-) create mode 100644 .idea/uiDesigner.xml create mode 100644 src/main/java/com/zzjee/BI/BiController.java create mode 100644 src/main/webapp/webpage/com/zzjee/BI/home/reportbi.jsp delete mode 100644 src/main/webapp/webpage/com/zzjee/BI/reportbi.jsp diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 00000000..e96534fb --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/zzjee/BI/BiController.java b/src/main/java/com/zzjee/BI/BiController.java new file mode 100644 index 00000000..803de412 --- /dev/null +++ b/src/main/java/com/zzjee/BI/BiController.java @@ -0,0 +1,275 @@ +package com.zzjee.BI; + + +import org.jeecgframework.core.common.controller.BaseController; +import org.jeecgframework.core.common.model.json.Highchart; +import org.jeecgframework.core.util.DateUtils; +import org.jeecgframework.web.system.service.SystemService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Validator; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Controller +@RequestMapping("/BiController") +public class BiController extends BaseController { + @Autowired + private SystemService systemService; + @Autowired + private Validator validator; + @RequestMapping(params = "homebi") + public ModelAndView bi(HttpServletRequest request) { + String num1= "0"; + String num2= "0"; + String num3= "0"; + String num4= "0"; + +// String yearstr = DateUtils.date2Str(DateUtils.yyyyMMdd); + + String ysql = "select CONVERT( sum(base_goodscount),DECIMAL(10,0)) as linecount from wm_im_notice_i where bin_pre = 'N'" ; + + List> ymaplist1=systemService.findForJdbc(ysql); + for (Map object : ymaplist1) { + Map obj = object; + + try { + num1 = obj.get("linecount").toString(); + } catch (Exception e) { + + } + } + ysql = "select CONVERT( sum(base_goodscount),DECIMAL(10,0)) as linecount from wm_in_qm_i where bin_sta = 'N'" ; + + List> ymaplist2=systemService.findForJdbc(ysql); + for (Map object : ymaplist2) { + Map obj = object; + + try { + num2 = obj.get("linecount").toString(); + } catch (Exception e) { + + } + } + ysql = "select CONVERT( sum(base_goodscount),DECIMAL(10,0)) as linecount from wm_om_qm_i where bin_sta = 'I'" ; + + List> ymaplist3=systemService.findForJdbc(ysql); + for (Map object : ymaplist3) { + Map obj = object; + + try { + num3 = obj.get("linecount").toString(); + } catch (Exception e) { + + } + } + ysql = "select CONVERT( sum(base_goodscount),DECIMAL(10,0)) as linecount from wm_om_qm_i where bin_sta = 'N'" ; + + List> ymaplist4=systemService.findForJdbc(ysql); + for (Map object : ymaplist4) { + Map obj = object; + + try { + num4 = obj.get("linecount").toString(); + } catch (Exception e) { + + } + } + + + + request.setAttribute("num1",num1); + request.setAttribute("num2",num2); + request.setAttribute("num3",num3); + request.setAttribute("num4",num4); + + return new ModelAndView("com/zzjee/BI/home/reportbi"); + } + /** + * highchart + * + * @return + */ + @RequestMapping(params = "dayCount") + @ResponseBody + public List dayCountmonth(HttpServletRequest request, String reportType, HttpServletResponse response) { + List list = new ArrayList(); + Highchart hc = new Highchart(); + StringBuffer sb = new StringBuffer(); + sb.append("select * from ( " + + "SELECT " + + " DATE_FORMAT(create_date, '%Y-%m-%d') as create_date, " + + " floor(sum(BASE_GOODSCOUNT)) as amount " + + "FROM" + + " wm_to_down_goods where ORDER_ID <> 'ZY' " + + "group by DATE_FORMAT(create_date, '%Y-%m-%d') " + + "order by DATE_FORMAT(create_date, '%Y-%m-%d') desc " + + "limit 7) temptable order by create_date "); +// List userBroswerList = systemService.(sb.toString()); + List> maplist=systemService.findForJdbc(sb.toString()); +// StringBuffer sbconut = new StringBuffer(); +// sbconut.append("SELECT floor(sum(or_Amount)) as amount FROM T_Kp_Order_One where cus_name is not null "); +// +// List> mapcount=systemService.findForJdbc(sbconut.toString()); +// Double count = systemService.getCountForJdbc("SELECT COUNT(1) FROM T_S_Log WHERE 1=1"); + List lt = new ArrayList(); + hc = new Highchart(); + hc.setName("近七日下架数量"); + hc.setType(reportType); + Map map; +// Double count = Double.parseDouble(mapcount.get(0).get("amount").toString()); + + if (maplist.size() > 0) { + for (Map object : maplist) { + map = new HashMap(); + Map obj = object; + map.put("name", obj.get("create_date").toString()); + map.put("y", (int) Double.parseDouble(obj.get("amount").toString())); + Double groupCount = 0.00; + try{ + groupCount = Double.parseDouble(obj.get("amount").toString()); + }catch (Exception e){ + + } +// Double percentage = 0.0; +// if (count != null && count.intValue() != 0) { +// percentage = new Double(groupCount)/count; +// } +// map.put("percentage", percentage*100); + lt.add(map); + } + } + + hc.setData(lt); + list.add(hc); + return list; + } + + + /** + * highchart + * + * @return + */ + @RequestMapping(params = "cpNameupCount") + @ResponseBody + public List studentCountmonth(HttpServletRequest request, String reportType, HttpServletResponse response) { + List list = new ArrayList(); + Highchart hc = new Highchart(); + StringBuffer sb = new StringBuffer(); + sb.append("select * from ( " + + "SELECT " + + " GOODS_ID as goodsid, " + + " floor(sum(BASE_GOODSCOUNT)) as amount " + + "FROM" + + " wm_to_up_goods where ORDER_ID <> 'ZY' " + + "group by GOODS_ID " + + ") temptable order by amount desc limit 6 "); +// List userBroswerList = systemService.(sb.toString()); + List> maplist=systemService.findForJdbc(sb.toString()); +// StringBuffer sbconut = new StringBuffer(); +// sbconut.append("SELECT floor(sum(or_Amount)) as amount FROM T_Kp_Order_One where cus_name is not null "); +// +// List> mapcount=systemService.findForJdbc(sbconut.toString()); +// Double count = systemService.getCountForJdbc("SELECT COUNT(1) FROM T_S_Log WHERE 1=1"); + List lt = new ArrayList(); + hc = new Highchart(); + hc.setName("上架数量前6"); + hc.setType(reportType); + Map map; +// Double count = Double.parseDouble(mapcount.get(0).get("amount").toString()); + + if (maplist.size() > 0) { + for (Map object : maplist) { + map = new HashMap(); + Map obj = object; + map.put("name", obj.get("goodsid").toString()); + map.put("y", (int) Double.parseDouble(obj.get("amount").toString())); + Double groupCount = 0.00; + try{ + groupCount = Double.parseDouble(obj.get("amount").toString()); + }catch (Exception e){ + + } +// Double percentage = 0.0; +// if (count != null && count.intValue() != 0) { +// percentage = new Double(groupCount)/count; +// } +// map.put("percentage", percentage*100); + lt.add(map); + } + } + + hc.setData(lt); + list.add(hc); + return list; + } + + /** + * highchart + * + * @return + */ + @RequestMapping(params = "cpNamedownCount") + @ResponseBody + public List studentCount(HttpServletRequest request, String reportType, HttpServletResponse response) { + List list = new ArrayList(); + Highchart hc = new Highchart(); + StringBuffer sb = new StringBuffer(); + sb.append("select * from ( " + + "SELECT " + + " GOODS_ID as goodsid, " + + " floor(sum(BASE_GOODSCOUNT)) as amount " + + "FROM" + + " wm_to_down_goods where ORDER_ID <> 'ZY' " + + "group by GOODS_ID " + + ") temptable order by amount desc limit 6 "); +// List userBroswerList = systemService.(sb.toString()); + List> maplist=systemService.findForJdbc(sb.toString()); +// StringBuffer sbconut = new StringBuffer(); +// sbconut.append("SELECT floor(sum(or_Amount)) as amount FROM T_Kp_Order_One where cus_name is not null "); +// +// List> mapcount=systemService.findForJdbc(sbconut.toString()); +// Double count = systemService.getCountForJdbc("SELECT COUNT(1) FROM T_S_Log WHERE 1=1"); + List lt = new ArrayList(); + hc = new Highchart(); + hc.setName("下架数量前6"); + hc.setType(reportType); + Map map; +// Double count = Double.parseDouble(mapcount.get(0).get("amount").toString()); + + if (maplist.size() > 0) { + for (Map object : maplist) { + map = new HashMap(); + Map obj = object; + map.put("name", obj.get("goodsid").toString()); + map.put("y", (int) Double.parseDouble(obj.get("amount").toString())); + Double groupCount = 0.00; + try{ + groupCount = Double.parseDouble(obj.get("amount").toString()); + }catch (Exception e){ + + } +// Double percentage = 0.0; +// if (count != null && count.intValue() != 0) { +// percentage = new Double(groupCount)/count; +// } +// map.put("percentage", percentage*100); + lt.add(map); + } + } + + hc.setData(lt); + list.add(hc); + return list; + } + +} diff --git a/src/main/webapp/webpage/com/zzjee/BI/home/reportbi.jsp b/src/main/webapp/webpage/com/zzjee/BI/home/reportbi.jsp new file mode 100644 index 00000000..7b5bac75 --- /dev/null +++ b/src/main/webapp/webpage/com/zzjee/BI/home/reportbi.jsp @@ -0,0 +1,327 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@include file="/context/mytags.jsp"%> + + + + + + + + + <%--<%@include file="/webpage/mobile/mobile_head.jsp" %>--%> + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+

+ + +
+ + +
+ +
+
+
+
+
+ +
+
+
+ + 待收货 +
+ + ${num1} +

待收货件数

+
+
+
+
+
+
+
+ + 待上架 +
+ + ${num2} +

待上架件数

+
+
+
+
+
+
+
+ + 待拣货 +
+ + ${num3} +

待拣货件数

+
+
+
+
+
+
+
+ + 拣货中 +
+ + ${num4} +

拣货中件数

+
+
+
+
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/webpage/com/zzjee/BI/reportbi.jsp b/src/main/webapp/webpage/com/zzjee/BI/reportbi.jsp deleted file mode 100644 index 84fce22d..00000000 --- a/src/main/webapp/webpage/com/zzjee/BI/reportbi.jsp +++ /dev/null @@ -1,546 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@include file="/context/mytags.jsp"%> - - - - - - - - - <%--<%@include file="/webpage/mobile/mobile_head.jsp" %>--%> - - - - - - - - - - - - - - - - - - - - - - -<%--
--%> - <%--
--%> - <%--
--%> - <%--
--%> - <%--
--%> - <%--
--%> - <%--
--%> -<%--
--%> -<%--
--%> - <%--
--%> - <%--
--%> - <%----%> -<%--
--%> - - - - - - -<%--
--%> - -
- - - <%----%> - <%----%> - - <%----%> - <%----%> - <%----%> - <%----%> - <%--<%––%>--%> - <%----%> - <%--<%––%>--%> - <%--<%––%>--%> - <%----%> - <%--<%––%>--%> - <%----%> - <%----%> - <%----%> - <%----%> - <%----%> - <%----%> - <%----%> - <%----%> - <%--<%––%>--%> - - <%----%> - - -
-
- -
-
-
- - 当年统计 -
- <%-- --%> - <%--${dnyf}--%> - <%--

当年累计应发

--%> - - - - - - - - - - - - - - - - - - - - - - - - -
- 加气 - - 标砖 - - 配套 -
- 数量 - - ${year2} - - ${year1} - - ${year3} -
- 金额 - - ${year5} - - - ${year4} - - ${year6} -
-
-
-
-
-
-
-
- - 当月统计 -
- <%-- --%> - <%--${dnsf}--%> - <%--

当年累计实发

--%> - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 加气 - - 标砖 - - 配套 -
- 数量 - - ${month2} - - ${month1} - - ${month3} -
- 金额 - - ${month5} - - - ${month4} - - ${month6} -
- - -
-
-
-
-
-
-
- - 当日统计 -
- <%-- --%> - <%--${byyf}--%> - <%--

应发工资总计

--%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 加气 - - 标砖 - - 配套 -
- 数量 - - ${day2} - - ${day1} - - ${day3} -
- 金额 - - ${day5} - - - ${day4} - - ${day6} -
- -
-
-
-
- -
- - -
- - - - \ No newline at end of file diff --git a/src/main/webapp/webpage/main/acehome.jsp b/src/main/webapp/webpage/main/acehome.jsp index ba559034..ac9fda0a 100644 --- a/src/main/webapp/webpage/main/acehome.jsp +++ b/src/main/webapp/webpage/main/acehome.jsp @@ -25,7 +25,7 @@ <%--
--%> - + <%--
--%> diff --git a/src/main/webapp/webpage/main/homeTab.jsp b/src/main/webapp/webpage/main/homeTab.jsp index 8f7203d7..d00b250c 100644 --- a/src/main/webapp/webpage/main/homeTab.jsp +++ b/src/main/webapp/webpage/main/homeTab.jsp @@ -29,7 +29,7 @@
- +
diff --git a/src/main/webapp/webpage/main/hplushome.jsp b/src/main/webapp/webpage/main/hplushome.jsp index 28e7d487..de7f64a0 100644 --- a/src/main/webapp/webpage/main/hplushome.jsp +++ b/src/main/webapp/webpage/main/hplushome.jsp @@ -24,7 +24,7 @@ <%--
--%> - + <%--
--%>