From 4e6d6105915edcc630d6a8bcc1c56a6177c88686 Mon Sep 17 00:00:00 2001
From: chenhuan <czj123456>
Date: 星期二, 25 六月 2024 18:07:44 +0800
Subject: [PATCH] Merge branch 'master' of http://117.78.1.188:8089/r/dkyChenJiang
---
javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java | 22 +++++++++--
javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleLogMapper.xml | 16 +++++++
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/HoleLogMapper.java | 8 ++++
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IHoleLogService.java | 8 ++++
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/DrillDateVo.java | 25 ++++++++++++
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleLogServiceImpl.java | 10 +++++
6 files changed, 84 insertions(+), 5 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 1861efe..8555a5f 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
@@ -17,10 +17,8 @@
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;
-import com.javaweb.geo.service.IProjectCameraService;
-import com.javaweb.geo.service.IProjectService;
+import com.javaweb.geo.service.*;
+import com.javaweb.geo.vo.DrillDateVo;
import com.javaweb.geo.vo.IndexVo;
import com.javaweb.geo.vo.ProjectProcessVO;
import com.javaweb.system.service.ISysConfigService;
@@ -77,6 +75,9 @@
@Autowired
private IProjectCameraService cameraService;
+
+ @Autowired
+ private IHoleLogService holeLogService;
private String getAdminIndex() {
@@ -376,4 +377,17 @@
return prefix + "/player2";
}
+ /**
+ * 缁熻鏈�杩�10澶╄繘灏洪噺
+ * @return
+ */
+ @ResponseBody
+ @GetMapping("/system/stat/sumHoleLog")
+ public AjaxResult sumHoleLog() {
+ AjaxResult ajaxResult = new AjaxResult();
+ List<DrillDateVo> drillDateList = holeLogService.SUMHoleLog();
+ ajaxResult.put("drillDateList",drillDateList);
+ return ajaxResult;
+ }
+
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/HoleLogMapper.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/HoleLogMapper.java
index 4f6395e..f9908d4 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/HoleLogMapper.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/HoleLogMapper.java
@@ -1,6 +1,8 @@
package com.javaweb.geo.mapper;
import com.javaweb.geo.domain.HoleLog;
+import com.javaweb.geo.vo.DrillDateVo;
+
import java.util.List;
/**
@@ -58,4 +60,10 @@
* @return 缁撴灉
*/
public int deleteHoleLogByIds(String[] ids);
+
+ /**
+ * 缁熻鏈�杩�10澶╄繘灏洪噺
+ * @return
+ */
+ List<DrillDateVo> SUMHoleLog();
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IHoleLogService.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IHoleLogService.java
index 8987eca..5063821 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IHoleLogService.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IHoleLogService.java
@@ -1,6 +1,8 @@
package com.javaweb.geo.service;
import com.javaweb.geo.domain.HoleLog;
+import com.javaweb.geo.vo.DrillDateVo;
+
import java.util.List;
/**
@@ -58,4 +60,10 @@
* @return 缁撴灉
*/
public int deleteHoleLogById(String id);
+
+ /**
+ * 缁熻鏈�杩�10澶╄繘灏洪噺
+ * @return
+ */
+ List<DrillDateVo> SUMHoleLog();
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleLogServiceImpl.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleLogServiceImpl.java
index ca1dfa1..f2f9f37 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleLogServiceImpl.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleLogServiceImpl.java
@@ -4,6 +4,7 @@
import com.javaweb.common.utils.DateUtils;
import com.javaweb.common.utils.IdGenerate;
+import com.javaweb.geo.vo.DrillDateVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.javaweb.geo.mapper.HoleLogMapper;
@@ -91,4 +92,13 @@
public int deleteHoleLogById(String id) {
return holeLogMapper.deleteHoleLogById(id);
}
+
+ /**
+ * 缁熻鏈�杩�10澶╄繘灏洪噺
+ * @return
+ */
+ @Override
+ public List<DrillDateVo> SUMHoleLog() {
+ return holeLogMapper.SUMHoleLog();
+ }
}
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/DrillDateVo.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/DrillDateVo.java
new file mode 100644
index 0000000..fb6e5ad
--- /dev/null
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/DrillDateVo.java
@@ -0,0 +1,25 @@
+package com.javaweb.geo.vo;
+
+import java.util.Date;
+
+public class DrillDateVo {
+
+ private String drillDate;
+ private Double totalDrilledMeters;
+
+ public String getDrillDate() {
+ return drillDate;
+ }
+
+ public void setDrillDate(String drillDate) {
+ this.drillDate = drillDate;
+ }
+
+ public Double getTotalDrilledMeters() {
+ return totalDrilledMeters;
+ }
+
+ public void setTotalDrilledMeters(Double totalDrilledMeters) {
+ this.totalDrilledMeters = totalDrilledMeters;
+ }
+}
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleLogMapper.xml b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleLogMapper.xml
index bbd9be5..daf359d 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleLogMapper.xml
+++ b/javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleLogMapper.xml
@@ -47,7 +47,21 @@
<include refid="selectHoleLogVo"/>
where id = #{id}
</select>
-
+
+ <select id="SUMHoleLog" resultType="com.javaweb.geo.vo.DrillDateVo">
+ SELECT
+ DATE_FORMAT(create_time, '%Y-%m-%d') AS drillDate,
+ SUM( end_depth - begin_depth ) AS totalDrilledMeters
+ FROM
+ js_hole_log
+ WHERE
+ create_time >= CURDATE( ) - INTERVAL 10 DAY
+ GROUP BY
+ DATE( create_time )
+ ORDER BY
+ create_time;
+ </select>
+
<insert id="insertHoleLog" parameterType="HoleLog">
insert into js_hole_log
<trim prefix="(" suffix=")" suffixOverrides=",">
--
Gitblit v1.9.1