From 67e03b179e1a257622cf2b5b21ec0610115c3bf9 Mon Sep 17 00:00:00 2001
From: chenhuan <czj123456>
Date: 星期二, 28 五月 2024 17:48:40 +0800
Subject: [PATCH] Merge branch 'master' of http://117.78.1.188:8089/r/dkyChenJiang
---
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/TubLogController.java | 6
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/ITubLogService.java | 2
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/TubLogServiceImpl.java | 4
javaweb-plus/javaweb-framework/src/main/java/com/javaweb/framework/config/ResourcesConfig.java | 2
javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java | 12 +-
javaweb-plus/javaweb-admin/src/main/resources/templates/index.html | 5
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/info.html | 133 +++++++++++++++++++++++++-
javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml | 18 +++
javaweb-plus/javaweb-framework/src/main/java/com/javaweb/framework/config/ShiroConfig.java | 1
javaweb-plus/javaweb-admin/src/main/resources/templates/main.html | 100 ++++++++++++++++----
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/TubLogMapper.java | 2
11 files changed, 242 insertions(+), 43 deletions(-)
diff --git a/javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java b/javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java
index 865861d..ff28937 100644
--- a/javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java
+++ b/javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java
@@ -122,7 +122,7 @@
// 绯荤粺浠嬬粛
@ResponseBody
- @GetMapping("/system/project")
+ @GetMapping("/system/stat/project")
public AjaxResult project() {
AjaxResult ajaxResult = AjaxResult.success();
List<Project> projects = projectService.selectProjectList(new Project());
@@ -135,7 +135,7 @@
* @return
*/
@ResponseBody
- @GetMapping("/system/totalProcess")
+ @GetMapping("/system/stat/totalProcess")
public AjaxResult totalProcess() {
AjaxResult ajaxResult = AjaxResult.success();
Hole hole = holeService.selectHoleTotalProcess();
@@ -149,7 +149,7 @@
* @return
*/
@ResponseBody
- @GetMapping("/system/projectProcess")
+ @GetMapping("/system/stat/projectProcess")
public AjaxResult projectProcess() {
AjaxResult ajaxResult = AjaxResult.success();
List<Hole> holes = holeService.selectHoleProjectProcess();
@@ -205,7 +205,7 @@
* @return
*/
@ResponseBody
- @GetMapping("/system/indexDataCount")
+ @GetMapping("/system/stat/indexDataCount")
public AjaxResult indexDataCount() {
IndexVo result = new IndexVo();
//=============================鏌ヨ鍦哄湴鏁伴噺===============================
@@ -249,10 +249,10 @@
* @return
*/
@ResponseBody
- @GetMapping("/system/tubLogData")
+ @GetMapping("/system/stat/tubLogData")
public AjaxResult tubLogData() {
AjaxResult ajaxResult = new AjaxResult();
- List<TubLog> tubLogs = tubLogMapper.countTubLogDate();
+ List<TubLog> tubLogs = tubLogMapper.countTubLogDate(null);
ajaxResult.put("tubLogs",tubLogs);
return ajaxResult;
}
diff --git a/javaweb-plus/javaweb-admin/src/main/resources/templates/index.html b/javaweb-plus/javaweb-admin/src/main/resources/templates/index.html
index 567de64..a9b460d 100644
--- a/javaweb-plus/javaweb-admin/src/main/resources/templates/index.html
+++ b/javaweb-plus/javaweb-admin/src/main/resources/templates/index.html
@@ -35,11 +35,13 @@
<img th:src="@{/images/logo.png}">
</li>
</a>
+
<li id="minilogo" style="display: none;height: 100px;align-content: center;">
<a style="text-align: center;padding: 0;" th:href="@{/index}">
<img th:src="@{/images/minilogo.png}">
</a>
</li>
+
<!-- <li>-->
<!-- <div class="user-panel">-->
<!-- <a class="menuItem" title="涓汉涓績" th:href="@{/system/user/profile}"> -->
@@ -55,6 +57,7 @@
<!-- </div>-->
<!-- </div>-->
<!-- </li>-->
+
<li th:each="menu : ${menus}">
<a th:class="@{${menu.url != '' && menu.url != '#'} ? ${menu.target}}" th:href="@{${menu.url == ''} ? |#| : ${menu.url}}">
<i class="fa fa-bar-chart-o" th:class="${menu.icon}"></i>
@@ -236,7 +239,7 @@
th:src="@{/system/main}" frameborder="0" seamless></iframe>
</div>
<div class="footer">
- <div class="pull-right">Copyright 漏 2022.宸ョ▼鍕樺療鍦拌川淇℃伅鏌ヨ鏈嶅姟骞冲彴 All Rights Reserved. Powered by. 浜琁CP澶�</div>
+ <div class="pull-right">Copyright 漏 2024.閽绘帰宸ョ▼淇℃伅鍖栫郴缁� All Rights Reserved. Powered by. 浜琁CP澶�</div>
</div>
</div>
<!--鍙充晶閮ㄥ垎缁撴潫-->
diff --git a/javaweb-plus/javaweb-admin/src/main/resources/templates/main.html b/javaweb-plus/javaweb-admin/src/main/resources/templates/main.html
index ae6e881..c52325b 100644
--- a/javaweb-plus/javaweb-admin/src/main/resources/templates/main.html
+++ b/javaweb-plus/javaweb-admin/src/main/resources/templates/main.html
@@ -263,26 +263,29 @@
<div style="height: 200px;width: 100%;">
<h3>鏉愭枡缁熻</h3>
<el-col :span="10" style="height: 200px;">
- <template>
- <el-table :data="tubLogs" border size="small" style="width: 100%"
- :header-cell-style="{color: '#4D4D4D',background: '#F7931E',fontWeight: '400'}"
- :row-class-name="tableRowClassName">
-<!-- <el-table-column prop="code" label="搴忓彿"></el-table-column>-->
- <el-table-column prop="tubName" label="鍚嶇О"></el-table-column>
- <el-table-column prop="inboundNumber" label="鍏ュ簱鏁伴噺"></el-table-column>
- <el-table-column prop="outboundNumber" label="鍑哄簱鏁伴噺"></el-table-column>
- <el-table-column prop="unit" label="鍗曚綅"></el-table-column>
+ <div style="margin-top: 15px">
+ <template>
+ <el-table :data="tubLogs" border size="small" style="width: 100%"
+ :header-cell-style="{color: '#4D4D4D',background: '#F7931E',fontWeight: '400'}"
+ :row-class-name="tableRowClassName">
+ <!-- <el-table-column prop="code" label="搴忓彿"></el-table-column>-->
+ <el-table-column prop="tubName" label="鍚嶇О"></el-table-column>
+ <el-table-column prop="inboundNumber" label="鍏ュ簱鏁伴噺"></el-table-column>
+ <el-table-column prop="outboundNumber" label="鍑哄簱鏁伴噺"></el-table-column>
+ <el-table-column prop="unit" label="鍗曚綅"></el-table-column>
- </el-table>
- </template>
+ </el-table>
+ </template>
+ </div>
</el-col>
<el-col :span="14" style="height: 200px;">
+ <div id="column-chart" style="height: 180px; width: 100%;"></div>
</el-col>
</div>
</el-card>
<el-card class="box-card" style="margin-top: 20px;">
- <div id="map_div" style="width: 100%;height: 550px;"></div>
+ <div id="map_div" style="width: 100%;height: 550px;margin-top: -5px"></div>
</el-card>
</el-col>
@@ -370,18 +373,77 @@
}
function tubLogs() {
- let url = ctx + "/system/tubLogData";
+
+ const chart = echarts.init(document.getElementById("column-chart"));
+ const option = {
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'shadow'
+ }
+ },
+ legend: {},
+ grid: {
+ left: '3%',
+ right: '4%',
+ bottom: '3%',
+ containLabel: true
+ },
+ xAxis: [
+ {
+ type: 'category',
+ data: []
+ }
+ ],
+ yAxis: [
+ {
+ type: 'value'
+ }
+ ],
+ series: [
+ {
+ name: '鍑哄簱',
+ type: 'bar',
+ emphasis: {
+ focus: 'series'
+ },
+ data: []
+ },
+ {
+ name: '鍏ュ簱',
+ type: 'bar',
+ stack: 'Ad',
+ emphasis: {
+ focus: 'series'
+ },
+ data: []
+ },
+
+ ]
+ };
+
+ let url = ctx + "/system/stat/tubLogData";
$.ajaxSettings.async = false;
$.get(url,{},function(res){
vm.tubLogs = res.tubLogs;
+
+ res.tubLogs.forEach(function(value, index, array) {
+ const tubName = value.tubName;
+ const inboundNumber = value.inboundNumber;
+ const outboundNumber = value.outboundNumber;
+ const unit = value.unit;
+ option.xAxis[0].data[index] = tubName;
+ option.series[0].data[index] = outboundNumber;
+ option.series[1].data[index] = inboundNumber;
+ });
+ chart.setOption(option, true);
})
$.ajaxSettings.async = false;
- console.log(vm.tubLogs);
}
//棣栭〉绗竴琛屼釜鏁扮粺璁�
function indexCount() {
- let url = ctx + "/system/indexDataCount";
+ let url = ctx + "/system/stat/indexDataCount";
$.ajaxSettings.async = false;
$.get(url,{},function(res){
vm.indexDataCount = res.data;
@@ -391,14 +453,12 @@
}
//鍦哄湴杩涘害
function stationProcess() {
- let url = ctx + "/system/projectProcess";
+ let url = ctx + "/system/stat/projectProcess";
$.ajaxSettings.async = false;
$.get(url,{},function(res){
vm.stationProcessData = res.projectData;
})
$.ajaxSettings.async = false;
- console.log(vm.stationProcessData);
-
}
var vm = new Vue({
el: "#app",
@@ -482,7 +542,7 @@
// 鑾峰彇鏁版嵁搴撶湡瀹炴暟鎹�
function getReallyData() {
- let url = window.location.protocol + "//" + window.location.host + "/bjfw/system/project";
+ let url = window.location.protocol + "//" + window.location.host + "/bjfw/system/stat/project";
$.get(url,function(res){
var data = res.projects;
showProjectPoint(data);
@@ -543,7 +603,7 @@
function totalProcess() {
var Chart1 = echarts.init(document.getElementById('Chart1'));
var pointerData = 0; // 浠〃鎸囬拡鏁版嵁
- let url = ctx + "/system/totalProcess";
+ let url = ctx + "/system/stat/totalProcess";
$.ajaxSettings.async = false;
$.get(url,{},function(res){
pointerData = res.pointerData;
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/TubLogController.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/TubLogController.java
index 2ae93e6..6695b35 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/TubLogController.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/TubLogController.java
@@ -141,10 +141,10 @@
/**
* 缁熻
*/
- @GetMapping("/countTubLogDate")
+ @GetMapping("/countTubLogDate/{projectId}")
@ResponseBody
- public AjaxResult countTubLogDate() {
- return tubLogService.countTubLogDate();
+ public AjaxResult countTubLogDate(@PathVariable("projectId") String projectId) {
+ return tubLogService.countTubLogDate(projectId);
}
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/TubLogMapper.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/TubLogMapper.java
index 2aa702e..8f33224 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/TubLogMapper.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/TubLogMapper.java
@@ -70,5 +70,5 @@
/**
* 缁熻
*/
- List<TubLog> countTubLogDate();
+ List<TubLog> countTubLogDate(@Param("projectId") String projectId);
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/ITubLogService.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/ITubLogService.java
index 3a51560..dd8a9ef 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/ITubLogService.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/ITubLogService.java
@@ -76,5 +76,5 @@
/**
* 缁熻
*/
- AjaxResult countTubLogDate();
+ AjaxResult countTubLogDate(String projectId);
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/TubLogServiceImpl.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/TubLogServiceImpl.java
index 9d153f2..f7de5ef 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/TubLogServiceImpl.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/TubLogServiceImpl.java
@@ -111,8 +111,8 @@
* 缁熻
*/
@Override
- public AjaxResult countTubLogDate() {
- List<TubLog> list = tubLogMapper.countTubLogDate();
+ public AjaxResult countTubLogDate(String projectId) {
+ List<TubLog> list = tubLogMapper.countTubLogDate(projectId);
return AjaxResult.success("鏌ヨ鎴愬姛锛�",list);
}
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml
index 7410116..650f94b 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml
+++ b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml
@@ -52,7 +52,7 @@
SELECT MAX(id) FROM js_tub_log where project_id = #{projectId}
</select>
- <select id="countTubLogDate" resultMap="TubLogResult">
+ <select id="countTubLogDate2" resultMap="TubLogResult">
SELECT
a.tub_name,
b.inbound_number,
@@ -63,6 +63,22 @@
LEFT JOIN ( SELECT tub_name, SUM( number ) AS inbound_number, unit FROM js_tub_log WHERE inbound_date IS NOT NULL GROUP BY tub_name ) b ON a.tub_name = b.tub_name
</select>
+ <select id="countTubLogDate" resultMap="TubLogResult">
+ SELECT
+ a.project_id,
+ a.tub_name,
+ b.inbound_number,
+ a.outbound_number,
+ a.unit
+ FROM
+ ( SELECT project_id, tub_name, SUM( number ) AS outbound_number, unit FROM js_tub_log WHERE outbound_date IS NOT NULL GROUP BY tub_name ) a
+ LEFT JOIN ( SELECT project_id, tub_name, SUM( number ) AS inbound_number, unit FROM js_tub_log WHERE inbound_date IS NOT NULL GROUP BY tub_name ) b ON a.tub_name = b.tub_name
+ AND a.project_id = b.project_id
+ <where>
+ <if test="projectId != null and projectId != ''"> and a.project_id = #{projectId}</if>
+ </where>
+ </select>
+
<insert id="insertTubLog" parameterType="TubLog" useGeneratedKeys="true" keyProperty="id">
insert into js_tub_log
<trim prefix="(" suffix=")" suffixOverrides=",">
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/info.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/info.html
index 180fb5e..15c7106 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/info.html
+++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/info.html
@@ -77,6 +77,7 @@
</template>
{{project.code}}
</el-descriptions-item>
+
<el-descriptions-item>
<template slot="label">
<i class="el-icon-map-location"></i>
@@ -154,14 +155,55 @@
</div>
</el-card>
</el-col>
+
+
+
</el-row>
<el-row style="height: 200px;">
<el-col :span="24">
- <el-card class="box-card card-green" style="height: 320px;margin-top: 20px">
- <div slot="header" class="clearfix">
- <span>鏉愭枡淇℃伅</span>
- </div>
+
+ <el-card class="box-card card-green" style="height: 320px;margin-top: 20px">
+ <div slot="header" class="clearfix">
+ <span>鏉愭枡缁熻</span>
+ </div>
+ <el-col :span="10" style="height: 320px;">
+ <template>
+ <el-table :data="tubLogs" border size="small" style="width: 100%"
+ :header-cell-style="{color: '#4D4D4D',background: '#F7931E',fontWeight: '400'}"
+ :row-class-name="tableRowClassName">
+ <el-table-column prop="tubName" label="鍚嶇О"></el-table-column>
+ <el-table-column prop="inboundNumber" label="鍏ュ簱鏁伴噺"></el-table-column>
+ <el-table-column prop="outboundNumber" label="鍑哄簱鏁伴噺"></el-table-column>
+ <el-table-column prop="unit" label="鍗曚綅"></el-table-column>
+ </el-table>
+ </template>
+ </el-col>
+ <el-col :span="14" style="height: 320px;">
+ <div id="column-chart" style="height: 250px; width: 100%;"></div>
+ </el-col>
</el-card>
+<!-- <el-card class="box-card card-green" style="height: 320px;margin-top: 20px">-->
+<!-- <div slot="header" class="clearfix">-->
+<!-- <span>鏉愭枡淇℃伅</span>-->
+<!-- </div>-->
+<!-- <div>-->
+<!-- <template>-->
+<!-- <el-table :data="tubLogs" border size="small" style="width: 100%"-->
+<!-- :header-cell-style="{color: '#4D4D4D',background: '#F7931E',fontWeight: '400'}"-->
+<!-- :row-class-name="tableRowClassName">-->
+<!-- <!– <el-table-column prop="code" label="搴忓彿"></el-table-column>–>-->
+<!-- <el-table-column prop="tubName" label="鍚嶇О"></el-table-column>-->
+<!-- <el-table-column prop="inboundNumber" label="鍏ュ簱鏁伴噺"></el-table-column>-->
+<!-- <el-table-column prop="outboundNumber" label="鍑哄簱鏁伴噺"></el-table-column>-->
+<!-- <el-table-column prop="unit" label="鍗曚綅"></el-table-column>-->
+
+<!-- </el-table>-->
+<!-- </template>-->
+<!-- </div>-->
+<!-- </el-card>-->
+
+
+
</el-col>
</el-row>
@@ -169,12 +211,14 @@
<th:block th:include="include :: footer" />
+ <script th:src="@{/ajax/libs/report/echarts/echarts-all.js}"></script>
<script th:inline="javascript">
var project =[[${project}]];
var projectId=[[${projectId}]];
var statusDatas = [[${@dict.getType('hole_status')}]];
var prefix = ctx + "geo/hole";
+ var prefix2 = ctx + "geo/TubLog";
$(function() {
var url = prefix + "/holelist?projectId=" + projectId;
@@ -183,10 +227,77 @@
vm.holeData = res.data;
});
vm.project = project;
-
- console.log(vm.project);
- console.log(vm.holeData);
+ tubLogs();
});
+
+ function tubLogs() {
+ const chart = echarts.init(document.getElementById("column-chart"));
+ const option = {
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'shadow'
+ }
+ },
+ legend: {},
+ grid: {
+ left: '3%',
+ right: '4%',
+ bottom: '3%',
+ containLabel: true
+ },
+ xAxis: [
+ {
+ type: 'category',
+ data: []
+ }
+ ],
+ yAxis: [
+ {
+ type: 'value'
+ }
+ ],
+ series: [
+ {
+ name: '鍑哄簱',
+ type: 'bar',
+ emphasis: {
+ focus: 'series'
+ },
+ data: []
+ },
+ {
+ name: '鍏ュ簱',
+ type: 'bar',
+ stack: 'Ad',
+ emphasis: {
+ focus: 'series'
+ },
+ data: []
+ },
+
+ ]
+ };
+
+ let url = prefix2 + "/countTubLogDate/" + projectId;
+ $.ajaxSettings.async = false;
+ $.get(url,{},function(res){
+ vm.tubLogs = res.data;
+
+ res.data.forEach(function(value, index, array) {
+ const tubName = value.tubName;
+ const inboundNumber = value.inboundNumber;
+ const outboundNumber = value.outboundNumber;
+ const unit = value.unit;
+ option.xAxis[0].data[index] = tubName;
+ option.series[0].data[index] = outboundNumber;
+ option.series[1].data[index] = inboundNumber;
+ });
+ chart.setOption(option, true);
+
+ })
+ $.ajaxSettings.async = false;
+ }
var vm = new Vue({
el: "#app",
@@ -194,9 +305,17 @@
return {
project: "",
holeData: [],
+ tubLogs:[],
};
},
methods: {
+ tableRowClassName({ row, rowIndex }) {
+ if (rowIndex % 2 == 0) {
+ return "";
+ } else {
+ return "warning-row";
+ }
+ },
}
});
diff --git a/javaweb-plus/javaweb-framework/src/main/java/com/javaweb/framework/config/ResourcesConfig.java b/javaweb-plus/javaweb-framework/src/main/java/com/javaweb/framework/config/ResourcesConfig.java
index b288bea..4d1fbfd 100644
--- a/javaweb-plus/javaweb-framework/src/main/java/com/javaweb/framework/config/ResourcesConfig.java
+++ b/javaweb-plus/javaweb-framework/src/main/java/com/javaweb/framework/config/ResourcesConfig.java
@@ -64,6 +64,6 @@
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/webgis/**");
- registry.addMapping("/geotdp/**");
+ registry.addMapping("/system/stat/**");
}
}
\ No newline at end of file
diff --git a/javaweb-plus/javaweb-framework/src/main/java/com/javaweb/framework/config/ShiroConfig.java b/javaweb-plus/javaweb-framework/src/main/java/com/javaweb/framework/config/ShiroConfig.java
index c139bc6..c1854e2 100644
--- a/javaweb-plus/javaweb-framework/src/main/java/com/javaweb/framework/config/ShiroConfig.java
+++ b/javaweb-plus/javaweb-framework/src/main/java/com/javaweb/framework/config/ShiroConfig.java
@@ -268,6 +268,7 @@
filterChainDefinitionMap.put("/webgis/**", "anon");//娉ㄦ剰鍓嶅彴璇锋眰涓嶆嫤鎴�
filterChainDefinitionMap.put("/geotdp/**", "anon");//娉ㄦ剰鍓嶅彴璇锋眰涓嶆嫤鎴�
filterChainDefinitionMap.put("/geo/**", "anon");//娉ㄦ剰鍓嶅彴璇锋眰涓嶆嫤鎴�
+ filterChainDefinitionMap.put("/system/stat/**", "anon");//娉ㄦ剰鍓嶅彴璇锋眰涓嶆嫤鎴�
filterChainDefinitionMap.put("/page/view", "anon");
filterChainDefinitionMap.put("/images/**", "anon");
filterChainDefinitionMap.put("/img/**", "anon");
--
Gitblit v1.9.1