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("
  • \n"); htmlStr.append("\n"); - htmlStr.append("  " + i18n(menu.getName()) + " \n"); + + if (StringUtils.isNotBlank(menu.getName()) && "在线办公".equals(menu.getName())){ + htmlStr.append("  " + i18n(menu.getName()) + "  " + " \n"); + } else { + htmlStr.append("  " + i18n(menu.getName()) + " \n"); + } + htmlStr.append(rightContainer); htmlStr.append("\n"); //递归获取二级->N级菜单 @@ -67,7 +73,11 @@ public class TreeInit implements Function { htmlStr2.append(href.equals("blank")?rightContainer:""); htmlStr2.append(href.equals("blank")?"\n":""); - htmlStr2.append(href.equals("blank")?"":"
  •  " + i18n(menu1.getName()) + "
  • \n"); + if(StringUtils.isNotBlank(menu1.getName()) && "待办任务".equals(menu1.getName())){ + htmlStr2.append(href.equals("blank")?"":"
  •  " + i18n(menu1.getName()) + "  0" + "
  • \n"); + } else { + htmlStr2.append(href.equals("blank")?"":"
  •  " + i18n(menu1.getName()) + "
  • \n"); + } subMenu(menuList,menu1, href, htmlStr2, rightContainer); } } diff --git a/jsite-framework/src/main/resources/views/modules/sys/sysIndex/topNvaOnline.html b/jsite-framework/src/main/resources/views/modules/sys/sysIndex/topNvaOnline.html index 1a951607..8240b28a 100644 --- a/jsite-framework/src/main/resources/views/modules/sys/sysIndex/topNvaOnline.html +++ b/jsite-framework/src/main/resources/views/modules/sys/sysIndex/topNvaOnline.html @@ -11,5 +11,24 @@ } refreshOnlineCount(); // 先执行一次 setInterval(refreshOnlineCount, 180000); // 3分钟执行一次 + + function refreshToDoTask(){ + $.post('${ctx}/act/task/todoData', {"pageSize":1000},function(data){ + try{ + var count = data.count; + if (count > 0){ + // $('#toDoTaskLine').html(count) + $('#toDoTask').html(count) + } else { + $('#toDoTaskLine').hide(); + $('#toDoTask').hide(); + } + }catch(e){ + + } + }) + } + refreshToDoTask(); // 先执行一次 + setInterval(refreshToDoTask, 180000); // 3分钟执行一次 \ No newline at end of file -- Gitee From 565bf8ac781afc4fdeeab5c7c9bd0140db36b795 Mon Sep 17 00:00:00 2001 From: binxinnidongde <17600669152@163.com> Date: Tue, 28 May 2019 17:22:11 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E5=B7=A5=E8=B5=84=E6=B1=87=E6=80=BB=E7=8E=AF?= =?UTF-8?q?=E5=BD=A2=E5=9B=BE=E5=8D=A0=E6=AF=94=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 | 239 +++++++++++------- .../wages/web/WagesRecordController.java | 27 +- 2 files changed, 177 insertions(+), 89 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 b01738ec..4c53a67f 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 @@ -136,24 +136,35 @@ -
    +
    - +
    - 设备种类 + 部门工资汇总
    +
    + +
    +
    @@ -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 @@
    -

    工资汇总

    +

    部门工资汇总