From a0e5dd65a474c35226bf0c8777f685de6bdda36b Mon Sep 17 00:00:00 2001
From: binxinnidongde <17600669152@163.com>
Date: Tue, 28 May 2019 11:58:02 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E8=8F=9C=E5=8D=95?=
=?UTF-8?q?=E6=A0=8F=E6=B7=BB=E5=8A=A0=E6=8F=90=E7=A4=BA=E6=A0=87=E8=AF=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/jsite/common/beetl/fn/TreeInit.java | 14 ++++++++++++--
.../modules/sys/sysIndex/topNvaOnline.html | 19 +++++++++++++++++++
2 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/jsite-framework/src/main/java/com/jsite/common/beetl/fn/TreeInit.java b/jsite-framework/src/main/java/com/jsite/common/beetl/fn/TreeInit.java
index 329e8aa4..a285168b 100644
--- a/jsite-framework/src/main/java/com/jsite/common/beetl/fn/TreeInit.java
+++ b/jsite-framework/src/main/java/com/jsite/common/beetl/fn/TreeInit.java
@@ -31,7 +31,13 @@ public class TreeInit implements Function {
href = StringUtils.isBlank(menu.getHref()) ? "blank" : menu.getHref();
htmlStr.append("
+
-
设备种类
+
部门工资汇总
- - 资源池:1
- - 物理机:1
- - 虚拟机:1
- - 网络设备:1
- - 安全设备:1
- - 存储设备:1
- - 备份设备:1
- - ERP设备:1
+ - 董经办
+ - 总经办
+ - 财务部
+ - 行政部
+ - 商务部
+ - 事业部
+ - 人力资源部
+
+
+
+
+
+ - 项目中心
+ - 质量监察部
+ - 集成服务事业部
+ - 营销部
+ - 东郊机房运维项目
+ - 配电室运维项目
+ - 电科院机房运维项目
@@ -285,83 +296,139 @@
// - PIE CHART -
// -------------
// Get context with jQuery - using jQuery's .get() method.
- var pieChartCanvas = $('#pieChart').get(0).getContext('2d');
- var pieChart = new Chart(pieChartCanvas);
- var PieData = [
- {
- value : 40,
- color : '#f56954',//red
- highlight: '#f56954',
- label : '资源池数量'
- },
- {
- value : 50,
- color : '#00a65a',//green
- highlight: '#00a65a',
- label : '物理机数量'
- },
- {
- value : 30,
- color : '#f39c12',//yellow
- highlight: '#f39c12',
- label : '虚拟机数量'
- },
- {
- value : 10,
- color : '#00c0ef',//aqua
- highlight: '#00c0ef',
- label : '网络设备数量'
- },
- {
- value : 5,
- color : '#3c8dbc',//light bule
- highlight: '#3c8dbc',
- label : '安全设备数量'
- },
- {
- value : 66,
- color : '#6F00D2',//purple
- highlight: '#6F00D2',
- label : '存储设备数量'
- },
- {
- value : 88,
- color : '#d2d6de',//gray
- highlight: '#d2d6de',
- label : '备份设备数量'
+ $.ajax({
+ type : "post",
+ async : true, //异步请求(同步请求将会锁住浏览器,用户其他操作必须等待请求完成才可以执行)
+ url : "${ctx}/wages/wagesRecord/echartSummary", //请求发送到TestServlet处
+ data : {},
+ dataType : "json", //返回数据形式为json
+ success : function(result) {
+ //请求成功时执行该函数内容,result即为服务器返回的json对象
+ if (result) {
+ // var json = result["总经办"];
+ // console.log(json.officeName + "=====" + json.wagesRealTotal);
+ var PieData = [
+ {
+ value : result["总经办"] ? result["总经办"].wagesRealTotal : "0",
+ color : '#f56954',//red
+ highlight: '#f56954',
+ label : result["总经办"] ? result["总经办"].officeName : "总经办"
+ },
+ {
+ value : result["财务部"] ? result["财务部"].wagesRealTotal : "0",
+ color : '#00a65a',//green
+ highlight: '#00a65a',
+ label : result["财务部"] ? result["财务部"].officeName : "财务部"
+ },
+ {
+ value : result["东郊机房运维项目"] ? result["东郊机房运维项目"].wagesRealTotal : "0",
+ color : '#f39c12',//yellow
+ highlight: '#f39c12',
+ label : result["东郊机房运维项目"] ? result["东郊机房运维项目"].officeName : "东郊机房运维项目"
+ },
+ {
+ value : result["配电室运维项目"] ? result["配电室运维项目"].wagesRealTotal : "0",
+ color : '#00c0ef',//aqua
+ highlight: '#00c0ef',
+ label : result["配电室运维项目"] ? result["配电室运维项目"].officeName : "配电室运维项目"
+ },
+ {
+ value : result["电科院机房运维项目"] ? result["电科院机房运维项目"].wagesRealTotal : "0",
+ color : '#72bdef',//aqua
+ highlight: '#72bdef',
+ label : result["电科院机房运维项目"] ? result["电科院机房运维项目"].officeName : "电科院机房运维项目"
+ },
+ {
+ value : result["行政部"] ? result["行政部"].wagesRealTotal : "0",
+ color : '#3c8dbc',//light bule
+ highlight: '#3c8dbc',
+ label : result["行政部"] ? result["行政部"].officeName : "行政部"
+ },
+ {
+ value : result["商务部"] ? result["商务部"].wagesRealTotal : "0",
+ color : '#6F00D2',//purple
+ highlight: '#6F00D2',
+ label : result["商务部"] ? result["商务部"].officeName : "商务部"
+ },
+ {
+ value : result["人力资源部"] ? result["人力资源部"].wagesRealTotal : "0",
+ color : '#d2d6de',//gray
+ highlight: '#d2d6de',
+ label : result["人力资源部"] ? result["人力资源部"].officeName : "人力资源部"
+ },
+ {
+ value : result["事业部"] ? result["事业部"].wagesRealTotal : "0",
+ color : '#f012be',
+ highlight: '#f012be',
+ label : result["事业部"] ? result["事业部"].officeName : "事业部"
+ },
+ {
+ value : result["项目中心"] ? result["项目中心"].wagesRealTotal : "0",
+ color : '#fff648',
+ highlight: '#fff648',
+ label : result["项目中心"] ? result["项目中心"].officeName : "项目中心"
+ },
+ {
+ value : result["质量监察部"] ? result["质量监察部"].wagesRealTotal : "0",
+ color : '#f01c1e',
+ highlight: '#f01c1e',
+ label : result["质量监察部"] ? result["质量监察部"].officeName : "质量监察部"
+ },
+ {
+ value : result["集成服务事业部"] ? result["集成服务事业部"].wagesRealTotal : "0",
+ color : '#262ef0',
+ highlight: '#262ef0',
+ label : result["集成服务事业部"] ? result["集成服务事业部"].officeName : "集成服务事业部"
+ },
+ {
+ value : result["营销部"] ? result["营销部"].wagesRealTotal : "0",
+ color : '#2ef0ae',
+ highlight: '#2ef0ae',
+ label : result["营销部"] ? result["营销部"].officeName : "营销部"
+ },
+ {
+ value : result["董经办"] ? result["董经办"].wagesRealTotal : "0",
+ color : '#f03065',
+ highlight: '#f03065',
+ label : result["董经办"] ? result["董经办"].officeName : "董经办"
+ }
+ ];
+ var pieChartCanvas = $('#pieChart').get(0).getContext('2d');
+ var pieChart = new Chart(pieChartCanvas);
+ var pieOptions = {
+ // Boolean - Whether we should show a stroke on each segment
+ segmentShowStroke : true,
+ // String - The colour of each segment stroke
+ segmentStrokeColor : '#fff',
+ // Number - The width of each segment stroke
+ segmentStrokeWidth : 1,
+ // Number - The percentage of the chart that we cut out of the middle
+ percentageInnerCutout: 50, // This is 0 for Pie charts
+ // Number - Amount of animation steps
+ animationSteps : 100,
+ // String - Animation easing effect
+ animationEasing : 'easeOutBounce',
+ // Boolean - Whether we animate the rotation of the Doughnut
+ animateRotate : true,
+ // Boolean - Whether we animate scaling the Doughnut from the centre
+ animateScale : false,
+ // Boolean - whether to make the chart responsive to window resizing
+ responsive : true,
+ // Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container
+ maintainAspectRatio : false
+ };
+ // Create pie or douhnut chart
+ // You can switch between pie and douhnut using the method below.
+ pieChart.Doughnut(PieData, pieOptions);
+ }
},
- {
- value : 22,
- color : '#f012be',
- highlight: '#f012be',
- label : 'ERP设备数量'
+ error : function(errorMsg) {
+ //请求失败时执行该函数
+ alert("图表请求数据失败!");
+ myChart.hideLoading();
+ console.log(errorMsg)
}
- ];
- var pieOptions = {
- // Boolean - Whether we should show a stroke on each segment
- segmentShowStroke : true,
- // String - The colour of each segment stroke
- segmentStrokeColor : '#fff',
- // Number - The width of each segment stroke
- segmentStrokeWidth : 1,
- // Number - The percentage of the chart that we cut out of the middle
- percentageInnerCutout: 50, // This is 0 for Pie charts
- // Number - Amount of animation steps
- animationSteps : 100,
- // String - Animation easing effect
- animationEasing : 'easeOutBounce',
- // Boolean - Whether we animate the rotation of the Doughnut
- animateRotate : true,
- // Boolean - Whether we animate scaling the Doughnut from the centre
- animateScale : false,
- // Boolean - whether to make the chart responsive to window resizing
- responsive : true,
- // Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container
- maintainAspectRatio : false
- };
- // Create pie or douhnut chart
- // You can switch between pie and douhnut using the method below.
- pieChart.Doughnut(PieData, pieOptions);
+ });
});
diff --git a/jsite-web/src/main/java/com/jsite/modules/wages/web/WagesRecordController.java b/jsite-web/src/main/java/com/jsite/modules/wages/web/WagesRecordController.java
index 89c427dd..11db2480 100644
--- a/jsite-web/src/main/java/com/jsite/modules/wages/web/WagesRecordController.java
+++ b/jsite-web/src/main/java/com/jsite/modules/wages/web/WagesRecordController.java
@@ -137,9 +137,6 @@ public class WagesRecordController extends BaseController {
return page;
}
-
-
-
@RequiresPermissions("wages:wagesRecord:view")
@RequestMapping(value = "form")
public String form(WagesRecord wagesRecord, Model model) {
@@ -425,6 +422,30 @@ public class WagesRecordController extends BaseController {
return renderResult(Global.TRUE, "已成功生成 " + successNum + " 条工资数据" + failureMsg);
}
+ @RequiresPermissions("wages:wagesRecord:view")
+ @RequestMapping(value = "echartSummary")
+ @ResponseBody
+ public Map
echartSummary(String year, String month, HttpServletResponse response) {
+ List wagesRecords = wagesRecordService.findList(new WagesRecord());
+ Map wagesDept = new HashMap<>();
+
+ WagesRecordSummary summaryTotal = new WagesRecordSummary("合计");
+ for (int i=0; i office = AreaOfficeUtils.getOfficeByNameNoDelFlag(record.getOfficeName());
+ Integer sort = office.size() > 0 ? office.get(0).getParent().getType().equals("1") ? office.get(0).getSort() : office.get(0).getParent().getSort() : 0 ;
+ wagesDept.put(record.getOfficeName(), new WagesRecordSummary(record.getOfficeName(), record, sort));
+ }
+ summaryTotal.addOn(record);
+ }
+ return wagesDept;
+ }
+
+
+
private void calculatWages(String year, String month, WagesRecord record, WagesBaseInfo wagesBaseInfo, List wagesLeaveInfos) throws RegularDaysNullException {
BigDecimal b;
--
Gitee
From 6a8811ce7d783a4416fac7c5c8688d9de319e17f Mon Sep 17 00:00:00 2001
From: binxinnidongde <17600669152@163.com>
Date: Wed, 29 May 2019 11:14:56 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=A2=9E=E5=8A=A0?=
=?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=88=86=E6=9C=88=E6=B1=87=E6=80=BB=E7=9A=84?=
=?UTF-8?q?=E5=9B=BE=E8=A1=A8=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/sys/sysIndex/sysDesktop.html | 304 ++++++++++--------
.../wages/web/WagesRecordController.java | 43 ++-
2 files changed, 207 insertions(+), 140 deletions(-)
diff --git a/jsite-framework/src/main/resources/views/modules/sys/sysIndex/sysDesktop.html b/jsite-framework/src/main/resources/views/modules/sys/sysIndex/sysDesktop.html
index 4c53a67f..6900497c 100644
--- a/jsite-framework/src/main/resources/views/modules/sys/sysIndex/sysDesktop.html
+++ b/jsite-framework/src/main/resources/views/modules/sys/sysIndex/sysDesktop.html
@@ -91,7 +91,7 @@