增加BI主题
parent
c077e09ce2
commit
88ceb56ea5
|
@ -0,0 +1,274 @@
|
||||||
|
package com.zzjee.BI;
|
||||||
|
|
||||||
|
|
||||||
|
import org.jeecgframework.core.common.controller.BaseController;
|
||||||
|
import org.jeecgframework.core.common.model.json.Highchart;
|
||||||
|
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("/BiBinController")
|
||||||
|
public class BiBinController 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<Map<String,Object>> ymaplist1=systemService.findForJdbc(ysql);
|
||||||
|
for (Map<String,Object> object : ymaplist1) {
|
||||||
|
Map<String, Object> 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<Map<String,Object>> ymaplist2=systemService.findForJdbc(ysql);
|
||||||
|
for (Map<String,Object> object : ymaplist2) {
|
||||||
|
Map<String, Object> 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<Map<String,Object>> ymaplist3=systemService.findForJdbc(ysql);
|
||||||
|
for (Map<String,Object> object : ymaplist3) {
|
||||||
|
Map<String, Object> 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<Map<String,Object>> ymaplist4=systemService.findForJdbc(ysql);
|
||||||
|
for (Map<String,Object> object : ymaplist4) {
|
||||||
|
Map<String, Object> 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<Highchart> dayCountmonth(HttpServletRequest request, String reportType, HttpServletResponse response) {
|
||||||
|
List<Highchart> list = new ArrayList<Highchart>();
|
||||||
|
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<Map<String,Object>> 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<Map<String,Object>> 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<String, Object> map;
|
||||||
|
// Double count = Double.parseDouble(mapcount.get(0).get("amount").toString());
|
||||||
|
|
||||||
|
if (maplist.size() > 0) {
|
||||||
|
for (Map<String,Object> object : maplist) {
|
||||||
|
map = new HashMap<String, Object>();
|
||||||
|
Map<String,Object> 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<Highchart> studentCountmonth(HttpServletRequest request, String reportType, HttpServletResponse response) {
|
||||||
|
List<Highchart> list = new ArrayList<Highchart>();
|
||||||
|
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<Map<String,Object>> 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<Map<String,Object>> 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<String, Object> map;
|
||||||
|
// Double count = Double.parseDouble(mapcount.get(0).get("amount").toString());
|
||||||
|
|
||||||
|
if (maplist.size() > 0) {
|
||||||
|
for (Map<String,Object> object : maplist) {
|
||||||
|
map = new HashMap<String, Object>();
|
||||||
|
Map<String,Object> 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<Highchart> studentCount(HttpServletRequest request, String reportType, HttpServletResponse response) {
|
||||||
|
List<Highchart> list = new ArrayList<Highchart>();
|
||||||
|
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<Map<String,Object>> 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<Map<String,Object>> 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<String, Object> map;
|
||||||
|
// Double count = Double.parseDouble(mapcount.get(0).get("amount").toString());
|
||||||
|
|
||||||
|
if (maplist.size() > 0) {
|
||||||
|
for (Map<String,Object> object : maplist) {
|
||||||
|
map = new HashMap<String, Object>();
|
||||||
|
Map<String,Object> 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,274 @@
|
||||||
|
package com.zzjee.BI;
|
||||||
|
|
||||||
|
|
||||||
|
import org.jeecgframework.core.common.controller.BaseController;
|
||||||
|
import org.jeecgframework.core.common.model.json.Highchart;
|
||||||
|
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("/BiCostController")
|
||||||
|
public class BiCostController 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<Map<String,Object>> ymaplist1=systemService.findForJdbc(ysql);
|
||||||
|
for (Map<String,Object> object : ymaplist1) {
|
||||||
|
Map<String, Object> 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<Map<String,Object>> ymaplist2=systemService.findForJdbc(ysql);
|
||||||
|
for (Map<String,Object> object : ymaplist2) {
|
||||||
|
Map<String, Object> 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<Map<String,Object>> ymaplist3=systemService.findForJdbc(ysql);
|
||||||
|
for (Map<String,Object> object : ymaplist3) {
|
||||||
|
Map<String, Object> 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<Map<String,Object>> ymaplist4=systemService.findForJdbc(ysql);
|
||||||
|
for (Map<String,Object> object : ymaplist4) {
|
||||||
|
Map<String, Object> 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<Highchart> dayCountmonth(HttpServletRequest request, String reportType, HttpServletResponse response) {
|
||||||
|
List<Highchart> list = new ArrayList<Highchart>();
|
||||||
|
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<Map<String,Object>> 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<Map<String,Object>> 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<String, Object> map;
|
||||||
|
// Double count = Double.parseDouble(mapcount.get(0).get("amount").toString());
|
||||||
|
|
||||||
|
if (maplist.size() > 0) {
|
||||||
|
for (Map<String,Object> object : maplist) {
|
||||||
|
map = new HashMap<String, Object>();
|
||||||
|
Map<String,Object> 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<Highchart> studentCountmonth(HttpServletRequest request, String reportType, HttpServletResponse response) {
|
||||||
|
List<Highchart> list = new ArrayList<Highchart>();
|
||||||
|
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<Map<String,Object>> 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<Map<String,Object>> 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<String, Object> map;
|
||||||
|
// Double count = Double.parseDouble(mapcount.get(0).get("amount").toString());
|
||||||
|
|
||||||
|
if (maplist.size() > 0) {
|
||||||
|
for (Map<String,Object> object : maplist) {
|
||||||
|
map = new HashMap<String, Object>();
|
||||||
|
Map<String,Object> 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<Highchart> studentCount(HttpServletRequest request, String reportType, HttpServletResponse response) {
|
||||||
|
List<Highchart> list = new ArrayList<Highchart>();
|
||||||
|
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<Map<String,Object>> 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<Map<String,Object>> 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<String, Object> map;
|
||||||
|
// Double count = Double.parseDouble(mapcount.get(0).get("amount").toString());
|
||||||
|
|
||||||
|
if (maplist.size() > 0) {
|
||||||
|
for (Map<String,Object> object : maplist) {
|
||||||
|
map = new HashMap<String, Object>();
|
||||||
|
Map<String,Object> 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,274 @@
|
||||||
|
package com.zzjee.BI;
|
||||||
|
|
||||||
|
|
||||||
|
import org.jeecgframework.core.common.controller.BaseController;
|
||||||
|
import org.jeecgframework.core.common.model.json.Highchart;
|
||||||
|
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("/BiCustomerController")
|
||||||
|
public class BiCustomerController 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<Map<String,Object>> ymaplist1=systemService.findForJdbc(ysql);
|
||||||
|
for (Map<String,Object> object : ymaplist1) {
|
||||||
|
Map<String, Object> 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<Map<String,Object>> ymaplist2=systemService.findForJdbc(ysql);
|
||||||
|
for (Map<String,Object> object : ymaplist2) {
|
||||||
|
Map<String, Object> 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<Map<String,Object>> ymaplist3=systemService.findForJdbc(ysql);
|
||||||
|
for (Map<String,Object> object : ymaplist3) {
|
||||||
|
Map<String, Object> 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<Map<String,Object>> ymaplist4=systemService.findForJdbc(ysql);
|
||||||
|
for (Map<String,Object> object : ymaplist4) {
|
||||||
|
Map<String, Object> 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<Highchart> dayCountmonth(HttpServletRequest request, String reportType, HttpServletResponse response) {
|
||||||
|
List<Highchart> list = new ArrayList<Highchart>();
|
||||||
|
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<Map<String,Object>> 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<Map<String,Object>> 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<String, Object> map;
|
||||||
|
// Double count = Double.parseDouble(mapcount.get(0).get("amount").toString());
|
||||||
|
|
||||||
|
if (maplist.size() > 0) {
|
||||||
|
for (Map<String,Object> object : maplist) {
|
||||||
|
map = new HashMap<String, Object>();
|
||||||
|
Map<String,Object> 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<Highchart> studentCountmonth(HttpServletRequest request, String reportType, HttpServletResponse response) {
|
||||||
|
List<Highchart> list = new ArrayList<Highchart>();
|
||||||
|
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<Map<String,Object>> 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<Map<String,Object>> 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<String, Object> map;
|
||||||
|
// Double count = Double.parseDouble(mapcount.get(0).get("amount").toString());
|
||||||
|
|
||||||
|
if (maplist.size() > 0) {
|
||||||
|
for (Map<String,Object> object : maplist) {
|
||||||
|
map = new HashMap<String, Object>();
|
||||||
|
Map<String,Object> 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<Highchart> studentCount(HttpServletRequest request, String reportType, HttpServletResponse response) {
|
||||||
|
List<Highchart> list = new ArrayList<Highchart>();
|
||||||
|
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<Map<String,Object>> 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<Map<String,Object>> 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<String, Object> map;
|
||||||
|
// Double count = Double.parseDouble(mapcount.get(0).get("amount").toString());
|
||||||
|
|
||||||
|
if (maplist.size() > 0) {
|
||||||
|
for (Map<String,Object> object : maplist) {
|
||||||
|
map = new HashMap<String, Object>();
|
||||||
|
Map<String,Object> 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -21,7 +21,7 @@ import java.util.Map;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/BiController")
|
@RequestMapping("/BiController")
|
||||||
public class BiController extends BaseController {
|
public class BiHomeController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private SystemService systemService;
|
private SystemService systemService;
|
||||||
@Autowired
|
@Autowired
|
|
@ -0,0 +1,274 @@
|
||||||
|
package com.zzjee.BI;
|
||||||
|
|
||||||
|
|
||||||
|
import org.jeecgframework.core.common.controller.BaseController;
|
||||||
|
import org.jeecgframework.core.common.model.json.Highchart;
|
||||||
|
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("/BiStaffController")
|
||||||
|
public class BiStaffController 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<Map<String,Object>> ymaplist1=systemService.findForJdbc(ysql);
|
||||||
|
for (Map<String,Object> object : ymaplist1) {
|
||||||
|
Map<String, Object> 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<Map<String,Object>> ymaplist2=systemService.findForJdbc(ysql);
|
||||||
|
for (Map<String,Object> object : ymaplist2) {
|
||||||
|
Map<String, Object> 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<Map<String,Object>> ymaplist3=systemService.findForJdbc(ysql);
|
||||||
|
for (Map<String,Object> object : ymaplist3) {
|
||||||
|
Map<String, Object> 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<Map<String,Object>> ymaplist4=systemService.findForJdbc(ysql);
|
||||||
|
for (Map<String,Object> object : ymaplist4) {
|
||||||
|
Map<String, Object> 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<Highchart> dayCountmonth(HttpServletRequest request, String reportType, HttpServletResponse response) {
|
||||||
|
List<Highchart> list = new ArrayList<Highchart>();
|
||||||
|
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<Map<String,Object>> 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<Map<String,Object>> 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<String, Object> map;
|
||||||
|
// Double count = Double.parseDouble(mapcount.get(0).get("amount").toString());
|
||||||
|
|
||||||
|
if (maplist.size() > 0) {
|
||||||
|
for (Map<String,Object> object : maplist) {
|
||||||
|
map = new HashMap<String, Object>();
|
||||||
|
Map<String,Object> 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<Highchart> studentCountmonth(HttpServletRequest request, String reportType, HttpServletResponse response) {
|
||||||
|
List<Highchart> list = new ArrayList<Highchart>();
|
||||||
|
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<Map<String,Object>> 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<Map<String,Object>> 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<String, Object> map;
|
||||||
|
// Double count = Double.parseDouble(mapcount.get(0).get("amount").toString());
|
||||||
|
|
||||||
|
if (maplist.size() > 0) {
|
||||||
|
for (Map<String,Object> object : maplist) {
|
||||||
|
map = new HashMap<String, Object>();
|
||||||
|
Map<String,Object> 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<Highchart> studentCount(HttpServletRequest request, String reportType, HttpServletResponse response) {
|
||||||
|
List<Highchart> list = new ArrayList<Highchart>();
|
||||||
|
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<Map<String,Object>> 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<Map<String,Object>> 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<String, Object> map;
|
||||||
|
// Double count = Double.parseDouble(mapcount.get(0).get("amount").toString());
|
||||||
|
|
||||||
|
if (maplist.size() > 0) {
|
||||||
|
for (Map<String,Object> object : maplist) {
|
||||||
|
map = new HashMap<String, Object>();
|
||||||
|
Map<String,Object> 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,320 @@
|
||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||||
|
<%@include file="/context/mytags.jsp"%>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<!-- context path -->
|
||||||
|
<t:base type="jquery,easyui"></t:base>
|
||||||
|
<script type="text/javascript" src="plug-in/Highcharts-2.2.5/js/highcharts.src.js"></script>
|
||||||
|
<script type="text/javascript" src="plug-in/Highcharts-2.2.5/js/modules/exporting.src.js"></script>
|
||||||
|
<%--<%@include file="/webpage/mobile/mobile_head.jsp" %>--%>
|
||||||
|
<link rel="stylesheet" href="mobile/fonts/themify/themify.css">
|
||||||
|
<link rel="stylesheet" href="mobile/css/home.css">
|
||||||
|
<link rel="stylesheet" href="mobile/css/custom-mobile.css">
|
||||||
|
<link rel="stylesheet" href="mobile/css/examples/pages/home/ecommerce.css">
|
||||||
|
<link rel="stylesheet" href="mobile/themes/classic/global/css/bootstrap.css">
|
||||||
|
<link rel="stylesheet" href="mobile/themes/classic/base/css/site.css" id="admui-siteStyle">
|
||||||
|
|
||||||
|
<!-- 图标 CSS-->
|
||||||
|
<link rel="stylesheet" href="mobile/fonts/font-awesome/font-awesome.css">
|
||||||
|
<link rel="stylesheet" href="mobile/fonts/web-icons/web-icons.css">
|
||||||
|
|
||||||
|
<!-- 插件 CSS -->
|
||||||
|
<link rel="stylesheet" href="mobile/vendor/animsition/animsition.css">
|
||||||
|
<link rel="stylesheet" href="mobile/vendor/toastr/toastr.css">
|
||||||
|
<c:set var="ctxPath" value="${pageContext.request.contextPath}" />
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$(document).ready(function() {
|
||||||
|
var chart;
|
||||||
|
$.ajax({
|
||||||
|
type : "POST",
|
||||||
|
url : "BiController.do?dayCount&reportType=line",
|
||||||
|
success : function(jsondata) {
|
||||||
|
data = eval(jsondata);
|
||||||
|
var xAxisCategories = new Array();
|
||||||
|
|
||||||
|
for(var i = 0; i < data[0].data.length; i++){
|
||||||
|
xAxisCategories[i] = data[0].data[i].name;
|
||||||
|
}
|
||||||
|
chart = new Highcharts.Chart({
|
||||||
|
chart : {
|
||||||
|
renderTo : 'containerdayline',
|
||||||
|
plotBackgroundColor : null,
|
||||||
|
plotBorderWidth : null,
|
||||||
|
plotShadow : false
|
||||||
|
},
|
||||||
|
title : {
|
||||||
|
text : '近七日下架数'
|
||||||
|
},
|
||||||
|
xAxis : {
|
||||||
|
categories : xAxisCategories
|
||||||
|
},
|
||||||
|
tooltip : {
|
||||||
|
shadow: false,
|
||||||
|
percentageDecimals : 0,
|
||||||
|
formatter: function() {
|
||||||
|
return '<b>'+this.point.name + '</b>:' + Highcharts.numberFormat(this.y, 0) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
plotOptions : {
|
||||||
|
pie : {
|
||||||
|
allowPointSelect : true,
|
||||||
|
cursor : 'pointer',
|
||||||
|
showInLegend : true,
|
||||||
|
dataLabels : {
|
||||||
|
enabled : true,
|
||||||
|
color : '#000000',
|
||||||
|
connectorColor : '#000000',
|
||||||
|
formatter : function() {
|
||||||
|
return '<b>' + this.point.name + '</b>: ' + Highcharts.numberFormat(this.percentage, 1)+"%";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
series : data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$(document).ready(function() {
|
||||||
|
var chart;
|
||||||
|
$.ajax({
|
||||||
|
type : "POST",
|
||||||
|
url : "BiController.do?cpNamedownCount&reportType=column",
|
||||||
|
success : function(jsondata) {
|
||||||
|
data = eval(jsondata);
|
||||||
|
var xAxisCategories = new Array();
|
||||||
|
|
||||||
|
for(var i = 0; i < data[0].data.length; i++){
|
||||||
|
xAxisCategories[i] = data[0].data[i].name;
|
||||||
|
}
|
||||||
|
//console.log(data);//Highcharts报表插件bug,IE8下不能出现该语句,否则报表不显示
|
||||||
|
|
||||||
|
chart = new Highcharts.Chart({
|
||||||
|
chart : {
|
||||||
|
renderTo : 'containerCol',
|
||||||
|
plotBackgroundColor : null,
|
||||||
|
plotBorderWidth : null,
|
||||||
|
plotShadow : false
|
||||||
|
},
|
||||||
|
title : {
|
||||||
|
text : '下架数量前6'
|
||||||
|
},
|
||||||
|
xAxis : {
|
||||||
|
|
||||||
|
categories :xAxisCategories
|
||||||
|
|
||||||
|
},
|
||||||
|
tooltip : {
|
||||||
|
percentageDecimals : 0,
|
||||||
|
formatter: function() {
|
||||||
|
return '<b>'+this.point.name + '</b>:' + Highcharts.numberFormat(this.y, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
plotOptions : {
|
||||||
|
column : {
|
||||||
|
allowPointSelect : true,
|
||||||
|
cursor : 'pointer',
|
||||||
|
showInLegend : true,
|
||||||
|
dataLabels : {
|
||||||
|
enabled : true,
|
||||||
|
color : '#000000',
|
||||||
|
connectorColor : '#000000',
|
||||||
|
formatter : function() {
|
||||||
|
|
||||||
|
return Highcharts.numberFormat(this.y, 1);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
series:data//,IE8不喜欢多余的逗号
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$(document).ready(function() {
|
||||||
|
var chart;
|
||||||
|
$.ajax({
|
||||||
|
type : "POST",
|
||||||
|
url : "BiController.do?cpNameupCount&reportType=pie",
|
||||||
|
success : function(jsondata) {
|
||||||
|
data = eval(jsondata);
|
||||||
|
var xAxisCategories = new Array();
|
||||||
|
|
||||||
|
for(var i = 0; i < data[0].data.length; i++){
|
||||||
|
xAxisCategories[i] = data[0].data[i].name;
|
||||||
|
}
|
||||||
|
chart = new Highcharts.Chart({
|
||||||
|
chart : {
|
||||||
|
renderTo : 'containerPie',
|
||||||
|
plotBackgroundColor : null,
|
||||||
|
plotBorderWidth : null,
|
||||||
|
plotShadow : false
|
||||||
|
},
|
||||||
|
title : {
|
||||||
|
text : '上架数量前6'
|
||||||
|
},
|
||||||
|
xAxis : {
|
||||||
|
categories : xAxisCategories
|
||||||
|
},
|
||||||
|
tooltip : {
|
||||||
|
shadow: false,
|
||||||
|
percentageDecimals : 0,
|
||||||
|
formatter: function() {
|
||||||
|
return '<b>'+this.point.name + '</b>:' + Highcharts.numberFormat(this.y, 0) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
plotOptions : {
|
||||||
|
pie : {
|
||||||
|
allowPointSelect : true,
|
||||||
|
cursor : 'pointer',
|
||||||
|
showInLegend : true,
|
||||||
|
dataLabels : {
|
||||||
|
enabled : true,
|
||||||
|
color : '#000000',
|
||||||
|
connectorColor : '#000000',
|
||||||
|
formatter : function() {
|
||||||
|
return Highcharts.numberFormat(this.y, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
series : data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
setInterval(function(){
|
||||||
|
var myDate = new Date();
|
||||||
|
var month=myDate.getMonth()+1;
|
||||||
|
month =(month<10 ? "0"+month:month);
|
||||||
|
var x="欢迎您使用WMS,现在时间:"+myDate.getFullYear()+"年"+month+"月"+myDate.getDate()+"日 "+myDate.getHours()+"点"+myDate.getMinutes()+"分"+myDate.getSeconds()+"秒";
|
||||||
|
document.getElementById("x"). innerHTML=x;
|
||||||
|
},1000);
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.a{background:red;width:350px;height:80px;color:#ffffff;font-size:13px;line-height:80px;text-align:center}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<div class="col-ms-12 col-xs-12 col-md-12" id="ecommerceChartView">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content tab-content bg-white padding-10">
|
||||||
|
|
||||||
|
<div class="media" style="border:0px">
|
||||||
|
<div class="media-body" style="padding-top: 10px;padding-left: 50px; ">
|
||||||
|
<h3 class="media-heading" id=x> </h3>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="padding-bottom: -100px;padding-top: -100px; height: 140px ">
|
||||||
|
<div >
|
||||||
|
|
||||||
|
<div class="col-lg-3 col-sm-3 col-xs-12 info-panel">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content bg-white padding-20">
|
||||||
|
<button type="button" class="btn btn-floating btn-sm btn-warning">
|
||||||
|
<i class="icon wb-shopping-cart"></i>
|
||||||
|
</button>
|
||||||
|
<span class="margin-left-15 font-weight-400">待收货</span>
|
||||||
|
<div class="content-text text-center margin-bottom-0">
|
||||||
|
<i class="text-danger icon wb-triangle-up font-size-20"> </i>
|
||||||
|
<span class="font-size-30 font-weight-100">${num1}</span>
|
||||||
|
<p class="blue-grey-400 font-weight-100 margin-0">待收货件数</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-3 col-sm-3 col-xs-12 info-panel">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content bg-white padding-20">
|
||||||
|
<button type="button" class="btn btn-floating btn-sm btn-danger">
|
||||||
|
<i class="icon fa-yen"></i>
|
||||||
|
</button>
|
||||||
|
<span class="margin-left-15 font-weight-400">待上架</span>
|
||||||
|
<div class="content-text text-center margin-bottom-0">
|
||||||
|
<i class="text-success icon wb-triangle-up font-size-20"> </i>
|
||||||
|
<span class="font-size-30 font-weight-100">${num2}</span>
|
||||||
|
<p class="blue-grey-400 font-weight-100 margin-0">待上架件数</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-3 col-sm-3 col-xs-12 info-panel">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content bg-white padding-20">
|
||||||
|
<button type="button" class="btn btn-floating btn-sm btn-success">
|
||||||
|
<i class="icon wb-eye"></i>
|
||||||
|
</button>
|
||||||
|
<span class="margin-left-15 font-weight-400">待拣货</span>
|
||||||
|
<div class="content-text text-center margin-bottom-0">
|
||||||
|
<i class="text-danger icon wb-triangle-up font-size-20"> </i>
|
||||||
|
<span class="font-size-30 font-weight-100">${num3}</span>
|
||||||
|
<p class="blue-grey-400 font-weight-100 margin-0">待拣货件数</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-3 col-sm-3 col-xs-12 info-panel">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content bg-white padding-20">
|
||||||
|
<button type="button" class="btn btn-floating btn-sm btn-primary">
|
||||||
|
<i class="icon wb-user"></i>
|
||||||
|
</button>
|
||||||
|
<span class="margin-left-15 font-weight-400">拣货中</span>
|
||||||
|
<div class="content-text text-center margin-bottom-0">
|
||||||
|
<i class="text-danger icon wb-triangle-up font-size-20"> </i>
|
||||||
|
<span class="font-size-30 font-weight-100">${num4}</span>
|
||||||
|
<p class="blue-grey-400 font-weight-100 margin-0">拣货中件数</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<span id="containerPie" style="float: left; width: 36%; height:350px;"></span>
|
||||||
|
<span id="containerdayline" style="float: left; width: 33%; height:350px;"></span>
|
||||||
|
<span id="containerCol" style="float: left; width: 31%;height:350px;"></span>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
$(document.body).css("width","99.3%");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,320 @@
|
||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||||
|
<%@include file="/context/mytags.jsp"%>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<!-- context path -->
|
||||||
|
<t:base type="jquery,easyui"></t:base>
|
||||||
|
<script type="text/javascript" src="plug-in/Highcharts-2.2.5/js/highcharts.src.js"></script>
|
||||||
|
<script type="text/javascript" src="plug-in/Highcharts-2.2.5/js/modules/exporting.src.js"></script>
|
||||||
|
<%--<%@include file="/webpage/mobile/mobile_head.jsp" %>--%>
|
||||||
|
<link rel="stylesheet" href="mobile/fonts/themify/themify.css">
|
||||||
|
<link rel="stylesheet" href="mobile/css/home.css">
|
||||||
|
<link rel="stylesheet" href="mobile/css/custom-mobile.css">
|
||||||
|
<link rel="stylesheet" href="mobile/css/examples/pages/home/ecommerce.css">
|
||||||
|
<link rel="stylesheet" href="mobile/themes/classic/global/css/bootstrap.css">
|
||||||
|
<link rel="stylesheet" href="mobile/themes/classic/base/css/site.css" id="admui-siteStyle">
|
||||||
|
|
||||||
|
<!-- 图标 CSS-->
|
||||||
|
<link rel="stylesheet" href="mobile/fonts/font-awesome/font-awesome.css">
|
||||||
|
<link rel="stylesheet" href="mobile/fonts/web-icons/web-icons.css">
|
||||||
|
|
||||||
|
<!-- 插件 CSS -->
|
||||||
|
<link rel="stylesheet" href="mobile/vendor/animsition/animsition.css">
|
||||||
|
<link rel="stylesheet" href="mobile/vendor/toastr/toastr.css">
|
||||||
|
<c:set var="ctxPath" value="${pageContext.request.contextPath}" />
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$(document).ready(function() {
|
||||||
|
var chart;
|
||||||
|
$.ajax({
|
||||||
|
type : "POST",
|
||||||
|
url : "BiController.do?dayCount&reportType=line",
|
||||||
|
success : function(jsondata) {
|
||||||
|
data = eval(jsondata);
|
||||||
|
var xAxisCategories = new Array();
|
||||||
|
|
||||||
|
for(var i = 0; i < data[0].data.length; i++){
|
||||||
|
xAxisCategories[i] = data[0].data[i].name;
|
||||||
|
}
|
||||||
|
chart = new Highcharts.Chart({
|
||||||
|
chart : {
|
||||||
|
renderTo : 'containerdayline',
|
||||||
|
plotBackgroundColor : null,
|
||||||
|
plotBorderWidth : null,
|
||||||
|
plotShadow : false
|
||||||
|
},
|
||||||
|
title : {
|
||||||
|
text : '近七日下架数'
|
||||||
|
},
|
||||||
|
xAxis : {
|
||||||
|
categories : xAxisCategories
|
||||||
|
},
|
||||||
|
tooltip : {
|
||||||
|
shadow: false,
|
||||||
|
percentageDecimals : 0,
|
||||||
|
formatter: function() {
|
||||||
|
return '<b>'+this.point.name + '</b>:' + Highcharts.numberFormat(this.y, 0) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
plotOptions : {
|
||||||
|
pie : {
|
||||||
|
allowPointSelect : true,
|
||||||
|
cursor : 'pointer',
|
||||||
|
showInLegend : true,
|
||||||
|
dataLabels : {
|
||||||
|
enabled : true,
|
||||||
|
color : '#000000',
|
||||||
|
connectorColor : '#000000',
|
||||||
|
formatter : function() {
|
||||||
|
return '<b>' + this.point.name + '</b>: ' + Highcharts.numberFormat(this.percentage, 1)+"%";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
series : data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$(document).ready(function() {
|
||||||
|
var chart;
|
||||||
|
$.ajax({
|
||||||
|
type : "POST",
|
||||||
|
url : "BiController.do?cpNamedownCount&reportType=column",
|
||||||
|
success : function(jsondata) {
|
||||||
|
data = eval(jsondata);
|
||||||
|
var xAxisCategories = new Array();
|
||||||
|
|
||||||
|
for(var i = 0; i < data[0].data.length; i++){
|
||||||
|
xAxisCategories[i] = data[0].data[i].name;
|
||||||
|
}
|
||||||
|
//console.log(data);//Highcharts报表插件bug,IE8下不能出现该语句,否则报表不显示
|
||||||
|
|
||||||
|
chart = new Highcharts.Chart({
|
||||||
|
chart : {
|
||||||
|
renderTo : 'containerCol',
|
||||||
|
plotBackgroundColor : null,
|
||||||
|
plotBorderWidth : null,
|
||||||
|
plotShadow : false
|
||||||
|
},
|
||||||
|
title : {
|
||||||
|
text : '下架数量前6'
|
||||||
|
},
|
||||||
|
xAxis : {
|
||||||
|
|
||||||
|
categories :xAxisCategories
|
||||||
|
|
||||||
|
},
|
||||||
|
tooltip : {
|
||||||
|
percentageDecimals : 0,
|
||||||
|
formatter: function() {
|
||||||
|
return '<b>'+this.point.name + '</b>:' + Highcharts.numberFormat(this.y, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
plotOptions : {
|
||||||
|
column : {
|
||||||
|
allowPointSelect : true,
|
||||||
|
cursor : 'pointer',
|
||||||
|
showInLegend : true,
|
||||||
|
dataLabels : {
|
||||||
|
enabled : true,
|
||||||
|
color : '#000000',
|
||||||
|
connectorColor : '#000000',
|
||||||
|
formatter : function() {
|
||||||
|
|
||||||
|
return Highcharts.numberFormat(this.y, 1);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
series:data//,IE8不喜欢多余的逗号
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$(document).ready(function() {
|
||||||
|
var chart;
|
||||||
|
$.ajax({
|
||||||
|
type : "POST",
|
||||||
|
url : "BiController.do?cpNameupCount&reportType=pie",
|
||||||
|
success : function(jsondata) {
|
||||||
|
data = eval(jsondata);
|
||||||
|
var xAxisCategories = new Array();
|
||||||
|
|
||||||
|
for(var i = 0; i < data[0].data.length; i++){
|
||||||
|
xAxisCategories[i] = data[0].data[i].name;
|
||||||
|
}
|
||||||
|
chart = new Highcharts.Chart({
|
||||||
|
chart : {
|
||||||
|
renderTo : 'containerPie',
|
||||||
|
plotBackgroundColor : null,
|
||||||
|
plotBorderWidth : null,
|
||||||
|
plotShadow : false
|
||||||
|
},
|
||||||
|
title : {
|
||||||
|
text : '上架数量前6'
|
||||||
|
},
|
||||||
|
xAxis : {
|
||||||
|
categories : xAxisCategories
|
||||||
|
},
|
||||||
|
tooltip : {
|
||||||
|
shadow: false,
|
||||||
|
percentageDecimals : 0,
|
||||||
|
formatter: function() {
|
||||||
|
return '<b>'+this.point.name + '</b>:' + Highcharts.numberFormat(this.y, 0) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
plotOptions : {
|
||||||
|
pie : {
|
||||||
|
allowPointSelect : true,
|
||||||
|
cursor : 'pointer',
|
||||||
|
showInLegend : true,
|
||||||
|
dataLabels : {
|
||||||
|
enabled : true,
|
||||||
|
color : '#000000',
|
||||||
|
connectorColor : '#000000',
|
||||||
|
formatter : function() {
|
||||||
|
return Highcharts.numberFormat(this.y, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
series : data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
setInterval(function(){
|
||||||
|
var myDate = new Date();
|
||||||
|
var month=myDate.getMonth()+1;
|
||||||
|
month =(month<10 ? "0"+month:month);
|
||||||
|
var x="欢迎您使用WMS,现在时间:"+myDate.getFullYear()+"年"+month+"月"+myDate.getDate()+"日 "+myDate.getHours()+"点"+myDate.getMinutes()+"分"+myDate.getSeconds()+"秒";
|
||||||
|
document.getElementById("x"). innerHTML=x;
|
||||||
|
},1000);
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.a{background:red;width:350px;height:80px;color:#ffffff;font-size:13px;line-height:80px;text-align:center}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<div class="col-ms-12 col-xs-12 col-md-12" id="ecommerceChartView">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content tab-content bg-white padding-10">
|
||||||
|
|
||||||
|
<div class="media" style="border:0px">
|
||||||
|
<div class="media-body" style="padding-top: 10px;padding-left: 50px; ">
|
||||||
|
<h3 class="media-heading" id=x> </h3>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="padding-bottom: -100px;padding-top: -100px; height: 140px ">
|
||||||
|
<div >
|
||||||
|
|
||||||
|
<div class="col-lg-3 col-sm-3 col-xs-12 info-panel">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content bg-white padding-20">
|
||||||
|
<button type="button" class="btn btn-floating btn-sm btn-warning">
|
||||||
|
<i class="icon wb-shopping-cart"></i>
|
||||||
|
</button>
|
||||||
|
<span class="margin-left-15 font-weight-400">待收货</span>
|
||||||
|
<div class="content-text text-center margin-bottom-0">
|
||||||
|
<i class="text-danger icon wb-triangle-up font-size-20"> </i>
|
||||||
|
<span class="font-size-30 font-weight-100">${num1}</span>
|
||||||
|
<p class="blue-grey-400 font-weight-100 margin-0">待收货件数</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-3 col-sm-3 col-xs-12 info-panel">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content bg-white padding-20">
|
||||||
|
<button type="button" class="btn btn-floating btn-sm btn-danger">
|
||||||
|
<i class="icon fa-yen"></i>
|
||||||
|
</button>
|
||||||
|
<span class="margin-left-15 font-weight-400">待上架</span>
|
||||||
|
<div class="content-text text-center margin-bottom-0">
|
||||||
|
<i class="text-success icon wb-triangle-up font-size-20"> </i>
|
||||||
|
<span class="font-size-30 font-weight-100">${num2}</span>
|
||||||
|
<p class="blue-grey-400 font-weight-100 margin-0">待上架件数</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-3 col-sm-3 col-xs-12 info-panel">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content bg-white padding-20">
|
||||||
|
<button type="button" class="btn btn-floating btn-sm btn-success">
|
||||||
|
<i class="icon wb-eye"></i>
|
||||||
|
</button>
|
||||||
|
<span class="margin-left-15 font-weight-400">待拣货</span>
|
||||||
|
<div class="content-text text-center margin-bottom-0">
|
||||||
|
<i class="text-danger icon wb-triangle-up font-size-20"> </i>
|
||||||
|
<span class="font-size-30 font-weight-100">${num3}</span>
|
||||||
|
<p class="blue-grey-400 font-weight-100 margin-0">待拣货件数</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-3 col-sm-3 col-xs-12 info-panel">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content bg-white padding-20">
|
||||||
|
<button type="button" class="btn btn-floating btn-sm btn-primary">
|
||||||
|
<i class="icon wb-user"></i>
|
||||||
|
</button>
|
||||||
|
<span class="margin-left-15 font-weight-400">拣货中</span>
|
||||||
|
<div class="content-text text-center margin-bottom-0">
|
||||||
|
<i class="text-danger icon wb-triangle-up font-size-20"> </i>
|
||||||
|
<span class="font-size-30 font-weight-100">${num4}</span>
|
||||||
|
<p class="blue-grey-400 font-weight-100 margin-0">拣货中件数</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<span id="containerPie" style="float: left; width: 36%; height:350px;"></span>
|
||||||
|
<span id="containerdayline" style="float: left; width: 33%; height:350px;"></span>
|
||||||
|
<span id="containerCol" style="float: left; width: 31%;height:350px;"></span>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
$(document.body).css("width","99.3%");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,320 @@
|
||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||||
|
<%@include file="/context/mytags.jsp"%>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<!-- context path -->
|
||||||
|
<t:base type="jquery,easyui"></t:base>
|
||||||
|
<script type="text/javascript" src="plug-in/Highcharts-2.2.5/js/highcharts.src.js"></script>
|
||||||
|
<script type="text/javascript" src="plug-in/Highcharts-2.2.5/js/modules/exporting.src.js"></script>
|
||||||
|
<%--<%@include file="/webpage/mobile/mobile_head.jsp" %>--%>
|
||||||
|
<link rel="stylesheet" href="mobile/fonts/themify/themify.css">
|
||||||
|
<link rel="stylesheet" href="mobile/css/home.css">
|
||||||
|
<link rel="stylesheet" href="mobile/css/custom-mobile.css">
|
||||||
|
<link rel="stylesheet" href="mobile/css/examples/pages/home/ecommerce.css">
|
||||||
|
<link rel="stylesheet" href="mobile/themes/classic/global/css/bootstrap.css">
|
||||||
|
<link rel="stylesheet" href="mobile/themes/classic/base/css/site.css" id="admui-siteStyle">
|
||||||
|
|
||||||
|
<!-- 图标 CSS-->
|
||||||
|
<link rel="stylesheet" href="mobile/fonts/font-awesome/font-awesome.css">
|
||||||
|
<link rel="stylesheet" href="mobile/fonts/web-icons/web-icons.css">
|
||||||
|
|
||||||
|
<!-- 插件 CSS -->
|
||||||
|
<link rel="stylesheet" href="mobile/vendor/animsition/animsition.css">
|
||||||
|
<link rel="stylesheet" href="mobile/vendor/toastr/toastr.css">
|
||||||
|
<c:set var="ctxPath" value="${pageContext.request.contextPath}" />
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$(document).ready(function() {
|
||||||
|
var chart;
|
||||||
|
$.ajax({
|
||||||
|
type : "POST",
|
||||||
|
url : "BiController.do?dayCount&reportType=line",
|
||||||
|
success : function(jsondata) {
|
||||||
|
data = eval(jsondata);
|
||||||
|
var xAxisCategories = new Array();
|
||||||
|
|
||||||
|
for(var i = 0; i < data[0].data.length; i++){
|
||||||
|
xAxisCategories[i] = data[0].data[i].name;
|
||||||
|
}
|
||||||
|
chart = new Highcharts.Chart({
|
||||||
|
chart : {
|
||||||
|
renderTo : 'containerdayline',
|
||||||
|
plotBackgroundColor : null,
|
||||||
|
plotBorderWidth : null,
|
||||||
|
plotShadow : false
|
||||||
|
},
|
||||||
|
title : {
|
||||||
|
text : '近七日下架数'
|
||||||
|
},
|
||||||
|
xAxis : {
|
||||||
|
categories : xAxisCategories
|
||||||
|
},
|
||||||
|
tooltip : {
|
||||||
|
shadow: false,
|
||||||
|
percentageDecimals : 0,
|
||||||
|
formatter: function() {
|
||||||
|
return '<b>'+this.point.name + '</b>:' + Highcharts.numberFormat(this.y, 0) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
plotOptions : {
|
||||||
|
pie : {
|
||||||
|
allowPointSelect : true,
|
||||||
|
cursor : 'pointer',
|
||||||
|
showInLegend : true,
|
||||||
|
dataLabels : {
|
||||||
|
enabled : true,
|
||||||
|
color : '#000000',
|
||||||
|
connectorColor : '#000000',
|
||||||
|
formatter : function() {
|
||||||
|
return '<b>' + this.point.name + '</b>: ' + Highcharts.numberFormat(this.percentage, 1)+"%";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
series : data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$(document).ready(function() {
|
||||||
|
var chart;
|
||||||
|
$.ajax({
|
||||||
|
type : "POST",
|
||||||
|
url : "BiController.do?cpNamedownCount&reportType=column",
|
||||||
|
success : function(jsondata) {
|
||||||
|
data = eval(jsondata);
|
||||||
|
var xAxisCategories = new Array();
|
||||||
|
|
||||||
|
for(var i = 0; i < data[0].data.length; i++){
|
||||||
|
xAxisCategories[i] = data[0].data[i].name;
|
||||||
|
}
|
||||||
|
//console.log(data);//Highcharts报表插件bug,IE8下不能出现该语句,否则报表不显示
|
||||||
|
|
||||||
|
chart = new Highcharts.Chart({
|
||||||
|
chart : {
|
||||||
|
renderTo : 'containerCol',
|
||||||
|
plotBackgroundColor : null,
|
||||||
|
plotBorderWidth : null,
|
||||||
|
plotShadow : false
|
||||||
|
},
|
||||||
|
title : {
|
||||||
|
text : '下架数量前6'
|
||||||
|
},
|
||||||
|
xAxis : {
|
||||||
|
|
||||||
|
categories :xAxisCategories
|
||||||
|
|
||||||
|
},
|
||||||
|
tooltip : {
|
||||||
|
percentageDecimals : 0,
|
||||||
|
formatter: function() {
|
||||||
|
return '<b>'+this.point.name + '</b>:' + Highcharts.numberFormat(this.y, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
plotOptions : {
|
||||||
|
column : {
|
||||||
|
allowPointSelect : true,
|
||||||
|
cursor : 'pointer',
|
||||||
|
showInLegend : true,
|
||||||
|
dataLabels : {
|
||||||
|
enabled : true,
|
||||||
|
color : '#000000',
|
||||||
|
connectorColor : '#000000',
|
||||||
|
formatter : function() {
|
||||||
|
|
||||||
|
return Highcharts.numberFormat(this.y, 1);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
series:data//,IE8不喜欢多余的逗号
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$(document).ready(function() {
|
||||||
|
var chart;
|
||||||
|
$.ajax({
|
||||||
|
type : "POST",
|
||||||
|
url : "BiController.do?cpNameupCount&reportType=pie",
|
||||||
|
success : function(jsondata) {
|
||||||
|
data = eval(jsondata);
|
||||||
|
var xAxisCategories = new Array();
|
||||||
|
|
||||||
|
for(var i = 0; i < data[0].data.length; i++){
|
||||||
|
xAxisCategories[i] = data[0].data[i].name;
|
||||||
|
}
|
||||||
|
chart = new Highcharts.Chart({
|
||||||
|
chart : {
|
||||||
|
renderTo : 'containerPie',
|
||||||
|
plotBackgroundColor : null,
|
||||||
|
plotBorderWidth : null,
|
||||||
|
plotShadow : false
|
||||||
|
},
|
||||||
|
title : {
|
||||||
|
text : '上架数量前6'
|
||||||
|
},
|
||||||
|
xAxis : {
|
||||||
|
categories : xAxisCategories
|
||||||
|
},
|
||||||
|
tooltip : {
|
||||||
|
shadow: false,
|
||||||
|
percentageDecimals : 0,
|
||||||
|
formatter: function() {
|
||||||
|
return '<b>'+this.point.name + '</b>:' + Highcharts.numberFormat(this.y, 0) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
plotOptions : {
|
||||||
|
pie : {
|
||||||
|
allowPointSelect : true,
|
||||||
|
cursor : 'pointer',
|
||||||
|
showInLegend : true,
|
||||||
|
dataLabels : {
|
||||||
|
enabled : true,
|
||||||
|
color : '#000000',
|
||||||
|
connectorColor : '#000000',
|
||||||
|
formatter : function() {
|
||||||
|
return Highcharts.numberFormat(this.y, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
series : data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
setInterval(function(){
|
||||||
|
var myDate = new Date();
|
||||||
|
var month=myDate.getMonth()+1;
|
||||||
|
month =(month<10 ? "0"+month:month);
|
||||||
|
var x="欢迎您使用WMS,现在时间:"+myDate.getFullYear()+"年"+month+"月"+myDate.getDate()+"日 "+myDate.getHours()+"点"+myDate.getMinutes()+"分"+myDate.getSeconds()+"秒";
|
||||||
|
document.getElementById("x"). innerHTML=x;
|
||||||
|
},1000);
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.a{background:red;width:350px;height:80px;color:#ffffff;font-size:13px;line-height:80px;text-align:center}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<div class="col-ms-12 col-xs-12 col-md-12" id="ecommerceChartView">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content tab-content bg-white padding-10">
|
||||||
|
|
||||||
|
<div class="media" style="border:0px">
|
||||||
|
<div class="media-body" style="padding-top: 10px;padding-left: 50px; ">
|
||||||
|
<h3 class="media-heading" id=x> </h3>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="padding-bottom: -100px;padding-top: -100px; height: 140px ">
|
||||||
|
<div >
|
||||||
|
|
||||||
|
<div class="col-lg-3 col-sm-3 col-xs-12 info-panel">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content bg-white padding-20">
|
||||||
|
<button type="button" class="btn btn-floating btn-sm btn-warning">
|
||||||
|
<i class="icon wb-shopping-cart"></i>
|
||||||
|
</button>
|
||||||
|
<span class="margin-left-15 font-weight-400">待收货</span>
|
||||||
|
<div class="content-text text-center margin-bottom-0">
|
||||||
|
<i class="text-danger icon wb-triangle-up font-size-20"> </i>
|
||||||
|
<span class="font-size-30 font-weight-100">${num1}</span>
|
||||||
|
<p class="blue-grey-400 font-weight-100 margin-0">待收货件数</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-3 col-sm-3 col-xs-12 info-panel">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content bg-white padding-20">
|
||||||
|
<button type="button" class="btn btn-floating btn-sm btn-danger">
|
||||||
|
<i class="icon fa-yen"></i>
|
||||||
|
</button>
|
||||||
|
<span class="margin-left-15 font-weight-400">待上架</span>
|
||||||
|
<div class="content-text text-center margin-bottom-0">
|
||||||
|
<i class="text-success icon wb-triangle-up font-size-20"> </i>
|
||||||
|
<span class="font-size-30 font-weight-100">${num2}</span>
|
||||||
|
<p class="blue-grey-400 font-weight-100 margin-0">待上架件数</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-3 col-sm-3 col-xs-12 info-panel">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content bg-white padding-20">
|
||||||
|
<button type="button" class="btn btn-floating btn-sm btn-success">
|
||||||
|
<i class="icon wb-eye"></i>
|
||||||
|
</button>
|
||||||
|
<span class="margin-left-15 font-weight-400">待拣货</span>
|
||||||
|
<div class="content-text text-center margin-bottom-0">
|
||||||
|
<i class="text-danger icon wb-triangle-up font-size-20"> </i>
|
||||||
|
<span class="font-size-30 font-weight-100">${num3}</span>
|
||||||
|
<p class="blue-grey-400 font-weight-100 margin-0">待拣货件数</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-3 col-sm-3 col-xs-12 info-panel">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content bg-white padding-20">
|
||||||
|
<button type="button" class="btn btn-floating btn-sm btn-primary">
|
||||||
|
<i class="icon wb-user"></i>
|
||||||
|
</button>
|
||||||
|
<span class="margin-left-15 font-weight-400">拣货中</span>
|
||||||
|
<div class="content-text text-center margin-bottom-0">
|
||||||
|
<i class="text-danger icon wb-triangle-up font-size-20"> </i>
|
||||||
|
<span class="font-size-30 font-weight-100">${num4}</span>
|
||||||
|
<p class="blue-grey-400 font-weight-100 margin-0">拣货中件数</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<span id="containerPie" style="float: left; width: 36%; height:350px;"></span>
|
||||||
|
<span id="containerdayline" style="float: left; width: 33%; height:350px;"></span>
|
||||||
|
<span id="containerCol" style="float: left; width: 31%;height:350px;"></span>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
$(document.body).css("width","99.3%");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,320 @@
|
||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||||
|
<%@include file="/context/mytags.jsp"%>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<!-- context path -->
|
||||||
|
<t:base type="jquery,easyui"></t:base>
|
||||||
|
<script type="text/javascript" src="plug-in/Highcharts-2.2.5/js/highcharts.src.js"></script>
|
||||||
|
<script type="text/javascript" src="plug-in/Highcharts-2.2.5/js/modules/exporting.src.js"></script>
|
||||||
|
<%--<%@include file="/webpage/mobile/mobile_head.jsp" %>--%>
|
||||||
|
<link rel="stylesheet" href="mobile/fonts/themify/themify.css">
|
||||||
|
<link rel="stylesheet" href="mobile/css/home.css">
|
||||||
|
<link rel="stylesheet" href="mobile/css/custom-mobile.css">
|
||||||
|
<link rel="stylesheet" href="mobile/css/examples/pages/home/ecommerce.css">
|
||||||
|
<link rel="stylesheet" href="mobile/themes/classic/global/css/bootstrap.css">
|
||||||
|
<link rel="stylesheet" href="mobile/themes/classic/base/css/site.css" id="admui-siteStyle">
|
||||||
|
|
||||||
|
<!-- 图标 CSS-->
|
||||||
|
<link rel="stylesheet" href="mobile/fonts/font-awesome/font-awesome.css">
|
||||||
|
<link rel="stylesheet" href="mobile/fonts/web-icons/web-icons.css">
|
||||||
|
|
||||||
|
<!-- 插件 CSS -->
|
||||||
|
<link rel="stylesheet" href="mobile/vendor/animsition/animsition.css">
|
||||||
|
<link rel="stylesheet" href="mobile/vendor/toastr/toastr.css">
|
||||||
|
<c:set var="ctxPath" value="${pageContext.request.contextPath}" />
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$(document).ready(function() {
|
||||||
|
var chart;
|
||||||
|
$.ajax({
|
||||||
|
type : "POST",
|
||||||
|
url : "BiController.do?dayCount&reportType=line",
|
||||||
|
success : function(jsondata) {
|
||||||
|
data = eval(jsondata);
|
||||||
|
var xAxisCategories = new Array();
|
||||||
|
|
||||||
|
for(var i = 0; i < data[0].data.length; i++){
|
||||||
|
xAxisCategories[i] = data[0].data[i].name;
|
||||||
|
}
|
||||||
|
chart = new Highcharts.Chart({
|
||||||
|
chart : {
|
||||||
|
renderTo : 'containerdayline',
|
||||||
|
plotBackgroundColor : null,
|
||||||
|
plotBorderWidth : null,
|
||||||
|
plotShadow : false
|
||||||
|
},
|
||||||
|
title : {
|
||||||
|
text : '近七日下架数'
|
||||||
|
},
|
||||||
|
xAxis : {
|
||||||
|
categories : xAxisCategories
|
||||||
|
},
|
||||||
|
tooltip : {
|
||||||
|
shadow: false,
|
||||||
|
percentageDecimals : 0,
|
||||||
|
formatter: function() {
|
||||||
|
return '<b>'+this.point.name + '</b>:' + Highcharts.numberFormat(this.y, 0) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
plotOptions : {
|
||||||
|
pie : {
|
||||||
|
allowPointSelect : true,
|
||||||
|
cursor : 'pointer',
|
||||||
|
showInLegend : true,
|
||||||
|
dataLabels : {
|
||||||
|
enabled : true,
|
||||||
|
color : '#000000',
|
||||||
|
connectorColor : '#000000',
|
||||||
|
formatter : function() {
|
||||||
|
return '<b>' + this.point.name + '</b>: ' + Highcharts.numberFormat(this.percentage, 1)+"%";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
series : data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$(document).ready(function() {
|
||||||
|
var chart;
|
||||||
|
$.ajax({
|
||||||
|
type : "POST",
|
||||||
|
url : "BiController.do?cpNamedownCount&reportType=column",
|
||||||
|
success : function(jsondata) {
|
||||||
|
data = eval(jsondata);
|
||||||
|
var xAxisCategories = new Array();
|
||||||
|
|
||||||
|
for(var i = 0; i < data[0].data.length; i++){
|
||||||
|
xAxisCategories[i] = data[0].data[i].name;
|
||||||
|
}
|
||||||
|
//console.log(data);//Highcharts报表插件bug,IE8下不能出现该语句,否则报表不显示
|
||||||
|
|
||||||
|
chart = new Highcharts.Chart({
|
||||||
|
chart : {
|
||||||
|
renderTo : 'containerCol',
|
||||||
|
plotBackgroundColor : null,
|
||||||
|
plotBorderWidth : null,
|
||||||
|
plotShadow : false
|
||||||
|
},
|
||||||
|
title : {
|
||||||
|
text : '下架数量前6'
|
||||||
|
},
|
||||||
|
xAxis : {
|
||||||
|
|
||||||
|
categories :xAxisCategories
|
||||||
|
|
||||||
|
},
|
||||||
|
tooltip : {
|
||||||
|
percentageDecimals : 0,
|
||||||
|
formatter: function() {
|
||||||
|
return '<b>'+this.point.name + '</b>:' + Highcharts.numberFormat(this.y, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
plotOptions : {
|
||||||
|
column : {
|
||||||
|
allowPointSelect : true,
|
||||||
|
cursor : 'pointer',
|
||||||
|
showInLegend : true,
|
||||||
|
dataLabels : {
|
||||||
|
enabled : true,
|
||||||
|
color : '#000000',
|
||||||
|
connectorColor : '#000000',
|
||||||
|
formatter : function() {
|
||||||
|
|
||||||
|
return Highcharts.numberFormat(this.y, 1);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
series:data//,IE8不喜欢多余的逗号
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$(document).ready(function() {
|
||||||
|
var chart;
|
||||||
|
$.ajax({
|
||||||
|
type : "POST",
|
||||||
|
url : "BiController.do?cpNameupCount&reportType=pie",
|
||||||
|
success : function(jsondata) {
|
||||||
|
data = eval(jsondata);
|
||||||
|
var xAxisCategories = new Array();
|
||||||
|
|
||||||
|
for(var i = 0; i < data[0].data.length; i++){
|
||||||
|
xAxisCategories[i] = data[0].data[i].name;
|
||||||
|
}
|
||||||
|
chart = new Highcharts.Chart({
|
||||||
|
chart : {
|
||||||
|
renderTo : 'containerPie',
|
||||||
|
plotBackgroundColor : null,
|
||||||
|
plotBorderWidth : null,
|
||||||
|
plotShadow : false
|
||||||
|
},
|
||||||
|
title : {
|
||||||
|
text : '上架数量前6'
|
||||||
|
},
|
||||||
|
xAxis : {
|
||||||
|
categories : xAxisCategories
|
||||||
|
},
|
||||||
|
tooltip : {
|
||||||
|
shadow: false,
|
||||||
|
percentageDecimals : 0,
|
||||||
|
formatter: function() {
|
||||||
|
return '<b>'+this.point.name + '</b>:' + Highcharts.numberFormat(this.y, 0) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
plotOptions : {
|
||||||
|
pie : {
|
||||||
|
allowPointSelect : true,
|
||||||
|
cursor : 'pointer',
|
||||||
|
showInLegend : true,
|
||||||
|
dataLabels : {
|
||||||
|
enabled : true,
|
||||||
|
color : '#000000',
|
||||||
|
connectorColor : '#000000',
|
||||||
|
formatter : function() {
|
||||||
|
return Highcharts.numberFormat(this.y, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
series : data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
setInterval(function(){
|
||||||
|
var myDate = new Date();
|
||||||
|
var month=myDate.getMonth()+1;
|
||||||
|
month =(month<10 ? "0"+month:month);
|
||||||
|
var x="欢迎您使用WMS,现在时间:"+myDate.getFullYear()+"年"+month+"月"+myDate.getDate()+"日 "+myDate.getHours()+"点"+myDate.getMinutes()+"分"+myDate.getSeconds()+"秒";
|
||||||
|
document.getElementById("x"). innerHTML=x;
|
||||||
|
},1000);
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.a{background:red;width:350px;height:80px;color:#ffffff;font-size:13px;line-height:80px;text-align:center}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<div class="col-ms-12 col-xs-12 col-md-12" id="ecommerceChartView">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content tab-content bg-white padding-10">
|
||||||
|
|
||||||
|
<div class="media" style="border:0px">
|
||||||
|
<div class="media-body" style="padding-top: 10px;padding-left: 50px; ">
|
||||||
|
<h3 class="media-heading" id=x> </h3>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="padding-bottom: -100px;padding-top: -100px; height: 140px ">
|
||||||
|
<div >
|
||||||
|
|
||||||
|
<div class="col-lg-3 col-sm-3 col-xs-12 info-panel">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content bg-white padding-20">
|
||||||
|
<button type="button" class="btn btn-floating btn-sm btn-warning">
|
||||||
|
<i class="icon wb-shopping-cart"></i>
|
||||||
|
</button>
|
||||||
|
<span class="margin-left-15 font-weight-400">待收货</span>
|
||||||
|
<div class="content-text text-center margin-bottom-0">
|
||||||
|
<i class="text-danger icon wb-triangle-up font-size-20"> </i>
|
||||||
|
<span class="font-size-30 font-weight-100">${num1}</span>
|
||||||
|
<p class="blue-grey-400 font-weight-100 margin-0">待收货件数</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-3 col-sm-3 col-xs-12 info-panel">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content bg-white padding-20">
|
||||||
|
<button type="button" class="btn btn-floating btn-sm btn-danger">
|
||||||
|
<i class="icon fa-yen"></i>
|
||||||
|
</button>
|
||||||
|
<span class="margin-left-15 font-weight-400">待上架</span>
|
||||||
|
<div class="content-text text-center margin-bottom-0">
|
||||||
|
<i class="text-success icon wb-triangle-up font-size-20"> </i>
|
||||||
|
<span class="font-size-30 font-weight-100">${num2}</span>
|
||||||
|
<p class="blue-grey-400 font-weight-100 margin-0">待上架件数</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-3 col-sm-3 col-xs-12 info-panel">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content bg-white padding-20">
|
||||||
|
<button type="button" class="btn btn-floating btn-sm btn-success">
|
||||||
|
<i class="icon wb-eye"></i>
|
||||||
|
</button>
|
||||||
|
<span class="margin-left-15 font-weight-400">待拣货</span>
|
||||||
|
<div class="content-text text-center margin-bottom-0">
|
||||||
|
<i class="text-danger icon wb-triangle-up font-size-20"> </i>
|
||||||
|
<span class="font-size-30 font-weight-100">${num3}</span>
|
||||||
|
<p class="blue-grey-400 font-weight-100 margin-0">待拣货件数</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-3 col-sm-3 col-xs-12 info-panel">
|
||||||
|
<div class="widget widget-shadow">
|
||||||
|
<div class="widget-content bg-white padding-20">
|
||||||
|
<button type="button" class="btn btn-floating btn-sm btn-primary">
|
||||||
|
<i class="icon wb-user"></i>
|
||||||
|
</button>
|
||||||
|
<span class="margin-left-15 font-weight-400">拣货中</span>
|
||||||
|
<div class="content-text text-center margin-bottom-0">
|
||||||
|
<i class="text-danger icon wb-triangle-up font-size-20"> </i>
|
||||||
|
<span class="font-size-30 font-weight-100">${num4}</span>
|
||||||
|
<p class="blue-grey-400 font-weight-100 margin-0">拣货中件数</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<span id="containerPie" style="float: left; width: 36%; height:350px;"></span>
|
||||||
|
<span id="containerdayline" style="float: left; width: 33%; height:350px;"></span>
|
||||||
|
<span id="containerCol" style="float: left; width: 31%;height:350px;"></span>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
$(document.body).css("width","99.3%");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</html>
|
Loading…
Reference in New Issue