From 5ee9baa45f4090425ded1f7236e46c1a86b0d9cb Mon Sep 17 00:00:00 2001
From: zmk <496160012@qq.com>
Date: 星期二, 28 五月 2024 18:07:26 +0800
Subject: [PATCH] 提交代码
---
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/IndexVo.java | 37 ++++++++++++++++++
javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleMapper.xml | 5 ++
javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java | 6 +++
javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectCameraMapper.xml | 5 ++
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/info.html | 12 +++++
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/ProjectCameraMapper.java | 2 +
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/HoleMapper.java | 2 +
javaweb-plus/javaweb-admin/src/main/resources/templates/main.html | 2
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/HoleController.java | 17 ++++++++
9 files changed, 86 insertions(+), 2 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 ff28937..b141511 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
@@ -13,6 +13,7 @@
import com.javaweb.geo.domain.Project;
import com.javaweb.geo.domain.TubLog;
import com.javaweb.geo.enums.RecordType;
+import com.javaweb.geo.mapper.ProjectCameraMapper;
import com.javaweb.geo.mapper.TubLogMapper;
import com.javaweb.geo.service.IHoleMediaService;
import com.javaweb.geo.service.IHoleService;
@@ -63,6 +64,9 @@
@Autowired
private TubLogMapper tubLogMapper;
+
+ @Autowired
+ private ProjectCameraMapper projectCameraMapper;
private String getAdminIndex() {
@@ -241,6 +245,8 @@
HoleMedia holeMedia = holeMediaService.selectHoleMediaNumber();
result.setFileCount(holeMedia.getNumber());
+ Integer cameraCount = projectCameraMapper.count();
+ result.setCameraCount(cameraCount);
return AjaxResult.success("鏌ヨ鎴愬姛",result);
}
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 119fd49..6391db5 100644
--- a/javaweb-plus/javaweb-admin/src/main/resources/templates/main.html
+++ b/javaweb-plus/javaweb-admin/src/main/resources/templates/main.html
@@ -215,7 +215,7 @@
</div>
<span style="color:rgba(0,0,0,.87);font-size: 15px;">
- 宸插畨瑁� <span style="float: right">0</span>
+ 宸插畨瑁� <span style="float: right">{{indexDataCount.cameraCount}}</span>
<!-- <li class="el-icon-caret-bottom" style="color: #f56c6c">-->
</span>
<span style="color:rgba(0,0,0,.87);font-size: 15px;">
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/HoleController.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/HoleController.java
index 0cbe91d..2b7c86f 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/HoleController.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/HoleController.java
@@ -5,6 +5,7 @@
import cn.hutool.core.math.MathUtil;
import cn.hutool.core.util.ObjectUtil;
import com.javaweb.common.utils.Arith;
+import com.javaweb.geo.mapper.HoleMapper;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@@ -35,6 +36,9 @@
@Autowired
private IHoleService holeService;
+ @Autowired
+ private HoleMapper holeMapper;
+
@RequiresPermissions("geo:hole:view")
@GetMapping()
public String hole(String id, ModelMap mmap) {
@@ -62,6 +66,19 @@
return AjaxResult.success(list);
}
+ @GetMapping("/holeProcess")
+ @ResponseBody
+ public AjaxResult holeProcess(Hole hole) {
+
+ Hole hole2 = holeMapper.selectProjectProcess(hole.getProjectId());
+ Double process = Arith.div(hole2.getFootageCpl(), hole2.getFootage(), 2);
+ return AjaxResult.success(process);
+
+ }
+
+
+
+
/**
* 瀵煎嚭閽诲瓟鍒楄〃
*/
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/HoleMapper.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/HoleMapper.java
index 41088ac..6a74b69 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/HoleMapper.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/HoleMapper.java
@@ -84,5 +84,7 @@
public Hole selectHoleTotalProcess();
+ public Hole selectProjectProcess(@Param("projectId") String projectId);
+
public List<Hole> selectHoleProjectProcess();
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/ProjectCameraMapper.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/ProjectCameraMapper.java
index da1dafd..bee7057 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/ProjectCameraMapper.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/ProjectCameraMapper.java
@@ -58,4 +58,6 @@
* @return 缁撴灉
*/
public int deleteProjectCameraByIds(String[] ids);
+
+ public Integer count();
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/IndexVo.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/IndexVo.java
index 83c111b..934b425 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/IndexVo.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/IndexVo.java
@@ -34,6 +34,43 @@
*/
private Long fileCount;
+ private Integer sgCount;
+ private Integer aqCount;
+ private Integer zlCount;
+
+ private Integer cameraCount;
+
+ public Integer getSgCount() {
+ return sgCount;
+ }
+
+ public void setSgCount(Integer sgCount) {
+ this.sgCount = sgCount;
+ }
+
+ public Integer getAqCount() {
+ return aqCount;
+ }
+
+ public void setAqCount(Integer aqCount) {
+ this.aqCount = aqCount;
+ }
+
+ public Integer getZlCount() {
+ return zlCount;
+ }
+
+ public void setZlCount(Integer zlCount) {
+ this.zlCount = zlCount;
+ }
+
+ public Integer getCameraCount() {
+ return cameraCount;
+ }
+
+ public void setCameraCount(Integer cameraCount) {
+ this.cameraCount = cameraCount;
+ }
public Integer getProjectStatus0() {
return projectStatus0;
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleMapper.xml b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleMapper.xml
index 77c94a0..dfb949c 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleMapper.xml
+++ b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleMapper.xml
@@ -108,6 +108,11 @@
from js_hole GROUP BY project_id
</select>
+ <select id="selectProjectProcess" resultMap="HoleResult" >
+ select project_id as project_id, sum(footage_cpl) as footage_cpl, sum(footage) as footage
+ from js_hole where project_id = #{projectId}
+ </select>
+
<insert id="insertHole" parameterType="Hole">
insert into js_hole
<trim prefix="(" suffix=")" suffixOverrides=",">
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectCameraMapper.xml b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectCameraMapper.xml
index 3a4a281..b5e3012 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectCameraMapper.xml
+++ b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/ProjectCameraMapper.xml
@@ -36,6 +36,10 @@
<include refid="selectProjectCameraVo"/>
where id = #{id}
</select>
+
+ <select id ="count" resultType="Integer">
+ select count(*) from js_project_camera
+ </select>
<insert id="insertProjectCamera" parameterType="ProjectCamera">
insert into js_project_camera
@@ -82,6 +86,7 @@
delete from js_project_camera where id = #{id}
</delete>
+
<delete id="deleteProjectCameraByIds" parameterType="String">
delete from js_project_camera where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
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 15c7106..b528a47 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
@@ -149,7 +149,7 @@
</div>
<div>
<div style="padding-left: 20%;">
- <el-progress type="dashboard" color="#FF0000" :percentage="50">
+ <el-progress type="dashboard" color="#FF0000" :percentage=holeProcess>
</el-progress>
</div>
</div>
@@ -221,12 +221,21 @@
var prefix2 = ctx + "geo/TubLog";
$(function() {
+ //鍦哄湴閽诲瓟鍒楄〃
var url = prefix + "/holelist?projectId=" + projectId;
$.ajaxSettings.async = false;
$.get(url,{},function(res){
vm.holeData = res.data;
});
vm.project = project;
+ //鍦哄湴杩涘害
+ var url2 = prefix + "/holeProcess?projectId=" + projectId;
+ $.ajaxSettings.async = false;
+ $.get(url2,{},function(res){
+ vm.holeProcess = (res.data*100).toFixed(0);
+ alert(vm.holeProcess);
+ });
+
tubLogs();
});
@@ -303,6 +312,7 @@
el: "#app",
data() {
return {
+ holeProcess:"",
project: "",
holeData: [],
tubLogs:[],
--
Gitblit v1.9.1