From 3f47c88e7cb4e53b3637620794420181f47b5a5e Mon Sep 17 00:00:00 2001
From: zmk <496160012@qq.com>
Date: 星期三, 23 十月 2024 16:07:13 +0800
Subject: [PATCH] 提交代码

---
 javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/add.html                            |    2 
 javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java |   27 +++++++-
 javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleLogMapper.xml                           |   14 ++++
 javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/mapper/HoleLogMapper.java                   |    3 +
 javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/impl/HoleLogServiceImpl.java        |    8 ++
 javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/hole.html                           |    6 +
 javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/HoleMapper.xml                              |    6 +
 javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/Hole.java                            |   13 ++++
 javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/info.html                        |    4 
 javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/service/IHoleLogService.java                |    7 ++
 javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/edit.html                           |    8 ++
 javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/ProjectProcessVO.java                    |   18 ++++++
 javaweb-plus/javaweb-admin/src/main/resources/static/images/icon/ending.png                        |    0 
 javaweb-plus/javaweb-admin/src/main/resources/templates/main.html                                  |   34 +++++-----
 14 files changed, 122 insertions(+), 28 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 be620f2..62a039b 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
@@ -181,13 +181,22 @@
         AjaxResult ajaxResult = AjaxResult.success();
         List<Hole> holes = holeService.selectHoleProjectProcess();
         Map<String, Double> holeMap = new HashMap<>();
+        Map<String,Double> rateMap = new HashMap<>();
         for (Hole hole : holes) {
             Double val =0.0d;
-            if(ObjectUtil.isNotEmpty(hole.getFootageCpl()) && ObjectUtil.isNotEmpty(hole.getFootage())) {
+            Double FootageCpl= hole.getFootageCpl();
+            Double Footage= hole.getFootage();
+            if(ObjectUtil.isNotEmpty(FootageCpl) && ObjectUtil.isNotEmpty(Footage)) {
                 val = Arith.div(hole.getFootageCpl(), hole.getFootage(), 2);
                 val = Arith.round(val * 100, 2);
             }
             holeMap.put(hole.getProjectId(), val);
+
+            if(ObjectUtil.isNotEmpty(FootageCpl)){
+                rateMap.put(hole.getProjectId(), Footage-FootageCpl) ;
+            }else{
+                rateMap.put(hole.getProjectId(), Footage) ;
+            }
         }
 
         List<Project> projects = projectService.selectProjectList(new Project());
@@ -205,12 +214,12 @@
                 vo.setValue(val);
                 vo.setLng(projects.get(i).getLng());
                 vo.setLat(projects.get(i).getLat());
-
+                vo.setNex(rateMap.get(ids));
 
                 if (val == null) {
                     vo.setValue(0.0d);
                 }
-                String []statusName ={"鍗忚皟涓�","寰呭紑宸�","杩涜涓�"};
+                String []statusName ={"鍗忚皟涓�","寰呭紑宸�","杩涜涓�","瀹屽伐"};
                 String status = projects.get(i).getStatus();
                 if(status.equals("0")){
                     vo.setStatus(statusName[0]);
@@ -219,7 +228,7 @@
                 }else if(status.equals("2")){
                     vo.setStatus(statusName[2]);
                 }else{
-                    vo.setStatus("鏈煡");
+                    vo.setStatus("瀹屽伐");
                 }
                 vos.add(vo);
             }
@@ -392,4 +401,14 @@
         return ajaxResult;
     }
 
+    @ResponseBody
+    @GetMapping("/system/stat/sumProjectHoleLog")
+    public AjaxResult sumProjectHoleLog(String projectId) {
+        AjaxResult ajaxResult =  AjaxResult.success();
+        HoleLog  holeLog= new HoleLog();
+        holeLog.setProjectId(projectId);
+        List<DrillDateVo> drillDateList = holeLogService.SUMProjectHoleLog(holeLog);
+        ajaxResult.put("drillDateList",drillDateList);
+        return ajaxResult;
+    }
 }
diff --git a/javaweb-plus/javaweb-admin/src/main/resources/static/images/icon/ending.png b/javaweb-plus/javaweb-admin/src/main/resources/static/images/icon/ending.png
new file mode 100644
index 0000000..d659668
--- /dev/null
+++ b/javaweb-plus/javaweb-admin/src/main/resources/static/images/icon/ending.png
Binary files differ
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 25eb478..3916c71 100644
--- a/javaweb-plus/javaweb-admin/src/main/resources/templates/main.html
+++ b/javaweb-plus/javaweb-admin/src/main/resources/templates/main.html
@@ -150,21 +150,22 @@
 					</div>
 
 					<div style="flex:6;" class="ilblock">
-						<span style="color:rgba(0,0,0,.87);font-size: 15px;">
-							鍗忚皟涓�
-							<span style="float: right">{{indexDataCount.projectStatus0}}</span>
-<!--							<li class="el-icon-caret-bottom" style="color: #f56c6c">-->
+<!--						<span style="color:rgba(0,0,0,.87);font-size: 15px;">-->
+<!--							鍗忚皟涓�-->
+<!--							<span style="float: right">{{indexDataCount.projectStatus0}}</span>-->
 
-						</span>
-						<span style="color:rgba(0,0,0,.87);font-size: 15px;">
-							寰呭紑宸�
-							<span style="float: right">{{indexDataCount.projectStatus1}}</span>
-<!--						    <li class="el-icon-caret-bottom" style="color: #e6a23c">-->
-						</span>
+<!--						</span>-->
+<!--						<span style="color:rgba(0,0,0,.87);font-size: 15px;">-->
+<!--							寰呭紑宸�-->
+<!--							<span style="float: right">{{indexDataCount.projectStatus1}}</span>-->
+<!--						</span>-->
 						<span style="color:rgba(0,0,0,.87);font-size: 15px;">
 							杩涜涓�
 							<span style="float: right">{{indexDataCount.projectStatus2}}</span>
-<!--							<li class="el-icon-caret-top" style="color: #409eff">-->
+						</span>
+						<span style="color:rgba(0,0,0,.87);font-size: 15px;">
+							宸插畬鎴�
+							<span style="float: right">{{34-indexDataCount.projectStatus2}}</span>
 						</span>
 
 					</div>
@@ -187,11 +188,9 @@
 					<div style="flex:6;" class="ilblock">
 						<span style="color:rgba(0,0,0,.87);font-size: 15px;">
 							鎬昏繘灏� <span style="float: right">{{indexDataCount.footageCount}}m</span>
-<!--							<li class="el-icon-caret-bottom" style="color: #f56c6c">-->
 						</span>
 						<span style="color:rgba(0,0,0,.87);font-size: 15px;">
 							宸插畬鎴�   <span style="float: right">{{indexDataCount.footageCplCount}}m</span>
-<!--						    <li class="el-icon-caret-bottom" style="color: #409eff">-->
 						</span>
 					</div>
 				</el-card>
@@ -287,7 +286,7 @@
 									<div v-if="entity.status=='鍗忚皟涓�'" class="active-red">{{entity.ranking}}</div>
 									<div v-if="entity.status=='寰呭紑宸�'" class="active-yellow">{{entity.ranking}}</div>
 									<div v-if="entity.status=='杩涜涓�'" class="active-blue">{{entity.ranking}}</div>
-
+									<div v-if="entity.status=='瀹屽伐'" class="active-red">{{entity.ranking}}</div>
 								</el-col>
 
 								<el-col :span="7">
@@ -318,7 +317,8 @@
 	<script th:src="@{/js/jquery.min.js}"></script>
 	<script th:src="@{/js/bootstrap.min.js}"></script>
 	<script th:src="@{/ajax/libs/flot/jquery.flot.js}"></script>
-	<script th:src="@{/ajax/libs/report/echarts/echarts-all.js}"></script>
+<!--	<script th:src="@{/ajax/libs/report/echarts/echarts-all.js}"></script>-->
+	<script src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js"></script>
 	<script th:src="@{/js/tdt.js}" type="text/javascript"></script>
 	<script src="http://lbs.tianditu.gov.cn/js/lib/d3/d3.min.js" type="text/javascript"></script>
 	<script src="http://lbs.tianditu.gov.cn/api/js4.0/opensource/openlibrary/D3SvgOverlay.js" type="text/javascript"></script>
@@ -555,9 +555,9 @@
 					iconSize: new T.Point(30, 30),
 					iconAnchor: new T.Point(6, 40),
 				});
-			}else {
+			}else if (data[i].status === '3') {
 				projectIcon = new T.Icon({
-					iconUrl: '/bjfw/images/icon/red.png',
+					iconUrl: '/bjfw/images/icon/ending.png',
 					iconSize: new T.Point(30, 30),
 					iconAnchor: new T.Point(6, 40),
 				});
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/Hole.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/Hole.java
index 506b333..8debd8e 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/Hole.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/domain/Hole.java
@@ -101,12 +101,23 @@
     /** 褰撳墠杩涘害  footageCpl/footage */
     private Double rate;
 
-    /** 鎬昏繘灏� */
+    /** 鏇存敼鍚庢�昏繘灏� */
     private Double footage;
 
     /** 宸插畬鎴愯繘灏� */
     private Double footageCpl;
 
+    /** 璁捐鎬昏繘灏� */
+    private Double totalFootage;
+
+    public Double getTotalFootage() {
+        return totalFootage;
+    }
+
+    public void setTotalFootage(Double totalFootage) {
+        this.totalFootage = totalFootage;
+    }
+
     /** 閽诲瓟鐘舵�� */
     @Excel(name = "閽诲瓟鐘舵��")
     private String status;
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 f9908d4..c3bbb81 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
@@ -66,4 +66,7 @@
      * @return
      */
     List<DrillDateVo> SUMHoleLog();
+
+    List<DrillDateVo> SUMProjectHoleLog(HoleLog holeLog);
+
 }
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 5063821..1f62c1a 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
@@ -66,4 +66,11 @@
      * @return
      */
     List<DrillDateVo> SUMHoleLog();
+
+    /**
+     * 缁熻椤圭洰鐨勬渶杩�10澶╃殑杩涘昂
+     * @param holeLog
+     * @return
+     */
+    List<DrillDateVo>SUMProjectHoleLog(HoleLog holeLog);
 }
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 f2f9f37..0afd7f9 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
@@ -101,4 +101,12 @@
     public List<DrillDateVo> SUMHoleLog() {
         return holeLogMapper.SUMHoleLog();
     }
+    /**
+     * 缁熻椤圭洰鐨勬渶杩�10澶╄繘灏洪噺
+     * @return
+     */
+    @Override
+    public List<DrillDateVo> SUMProjectHoleLog(HoleLog holeLog) {
+        return holeLogMapper.SUMProjectHoleLog(holeLog);
+    }
 }
diff --git a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/ProjectProcessVO.java b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/ProjectProcessVO.java
index 04c64ef..c00f31d 100644
--- a/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/ProjectProcessVO.java
+++ b/javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/vo/ProjectProcessVO.java
@@ -10,6 +10,24 @@
     private String station;
     private Double value;
     private String status;
+    private Double nex;
+    private Double avg ;
+
+    public Double getAvg() {
+        return avg;
+    }
+
+    public void setAvg(Double avg) {
+        this.avg = avg;
+    }
+
+    public Double getNex() {
+        return nex;
+    }
+
+    public void setNex(Double nex) {
+        this.nex = nex;
+    }
 
     private Double lng;
     private Double lat;
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 daf359d..b69046d 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
@@ -62,6 +62,20 @@
             create_time;
     </select>
 
+    <select id="SUMProjectHoleLog" resultType="com.javaweb.geo.vo.DrillDateVo" parameterType="HoleLog">
+        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) and project_id =#{projectId}
+        GROUP BY
+            DATE( create_time )
+        ORDER BY
+            create_time;
+    </select>
+
     <insert id="insertHoleLog" parameterType="HoleLog">
         insert into js_hole_log
         <trim prefix="(" suffix=")" suffixOverrides=",">
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 dfb949c..3b0c835 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
@@ -29,6 +29,7 @@
         <result property="reason"    column="reason"    />
         <result property="rate"    column="rate"    />
         <result property="footage"    column="footage"    />
+        <result property="totalFootage"    column="total_footage"    />
         <result property="footageCpl"    column="footage_cpl"    />
         <result property="status"    column="status"    />
         <result property="isDeleted"    column="is_deleted"    />
@@ -36,7 +37,7 @@
     </resultMap>
 
     <sql id="selectHoleVo">
-        select ids, project_id, code, create_time, update_time, description, type, elevation, depth, longitude, latitude, survey_x, survey_y, survey_z, survey_latitude, survey_longitude, map_latitude, map_longitude, map_time, position, locate_time, reason, rate, footage, footage_cpl, status, is_deleted, is_flag from js_hole
+        select ids, project_id, code, create_time, update_time, description, type, elevation, depth, longitude, latitude, survey_x, survey_y, survey_z, survey_latitude, survey_longitude, map_latitude, map_longitude, map_time, position, locate_time, reason, rate, footage,total_footage, footage_cpl, status, is_deleted, is_flag from js_hole
     </sql>
 
     <select id="selectHoleList" parameterType="Hole" resultMap="HoleResult">
@@ -140,6 +141,7 @@
             <if test="reason != null  and reason != ''">reason,</if>
             <if test="rate != null">rate,</if>
             <if test="footage != null">footage,</if>
+            <if test="totalFootage != null">total_footage,</if>
             <if test="footageCpl != null">footage_cpl,</if>
             <if test="status != null  and status != ''">status,</if>
             <if test="isDeleted != null  and isDeleted != ''">is_deleted,</if>
@@ -170,6 +172,7 @@
             <if test="reason != null  and reason != ''">#{reason},</if>
             <if test="rate != null">#{rate},</if>
             <if test="footage != null">#{footage},</if>
+            <if test="totalFootage != null">#{totalFootage},</if>
             <if test="footageCpl != null">#{footageCpl},</if>
             <if test="status != null  and status != ''">#{status},</if>
             <if test="isDeleted != null  and isDeleted != ''">#{isDeleted},</if>
@@ -203,6 +206,7 @@
             <if test="reason != null  and reason != ''">reason = #{reason},</if>
             <if test="rate != null">rate = #{rate},</if>
             <if test="footage != null">footage = #{footage},</if>
+            <if test="totalFootage != null">total_footage = #{totalFootage},</if>
             <if test="footageCpl != null">footage_cpl = #{footageCpl},</if>
             <if test="status != null  and status != ''">status = #{status},</if>
             <if test="isDeleted != null  and isDeleted != ''">is_deleted = #{isDeleted},</if>
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/add.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/add.html
index e958edb..c74bdd9 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/add.html
+++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/add.html
@@ -46,7 +46,7 @@
                 </div>
             </div>
             <div class="form-group">
-                <label class="col-sm-3 control-label">鎬昏繘灏�(m)锛�</label>
+                <label class="col-sm-3 control-label">璁捐鎬昏繘灏�(m)锛�</label>
                 <div class="col-sm-8">
                     <input name="footage" class="form-control" type="text" required placeholder="璇疯緭鍏ユ�昏繘灏�,鍗曚綅锛坢锛�">
                 </div>
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/edit.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/edit.html
index 3814b6a..124be19 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/edit.html
+++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/edit.html
@@ -55,7 +55,13 @@
                 </div>
             </div>
             <div class="form-group">
-                <label class="col-sm-3 control-label">鎬昏繘灏猴紙m锛夛細</label>
+                <label class="col-sm-3 control-label">璁捐鎬昏繘灏猴紙m锛夛細</label>
+                <div class="col-sm-8">
+                    <input name="totalFootage"  th:field="*{totalFootage}" class="form-control" type="text" placeholder="璇疯緭鍏ヨ璁℃�昏繘灏�,鍗曚綅锛坢锛�" required>
+                </div>
+            </div>
+            <div class="form-group">
+                <label class="col-sm-3 control-label">鏇存敼鍚庢�昏繘灏猴紙m锛夛細</label>
                 <div class="col-sm-8">
                     <input name="footage" th:field="*{footage}" class="form-control" type="text" placeholder="璇疯緭鍏ユ�昏繘灏�,鍗曚綅锛坢锛�" required>
                 </div>
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/hole.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/hole.html
index 2f3f474..24c029a 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/hole.html
+++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/hole.html
@@ -119,9 +119,13 @@
                     field : 'status', 
                     title : '閽诲瓟鐘舵��'
                 },
+                    {
+                        field : 'totalFootage',
+                        title : '璁捐鎬昏繘灏猴紙m锛�',
+                    },
                 {
                     field : 'footage',
-                    title : '鎬昏繘灏猴紙m锛�',
+                    title : '鏇存敼鍚庢�昏繘灏猴紙m锛�',
                 },
                 {
                      field : 'footageCpl',
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 41acdbf..45db276 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
@@ -210,8 +210,8 @@
 
 
     <th:block th:include="include :: footer" />
-    <script th:src="@{/ajax/libs/report/echarts/echarts-all.js}"></script>
-
+<!--    <script th:src="@{/ajax/libs/report/echarts/echarts-all.js}"></script>-->
+    <script src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js"></script>
    <script th:inline="javascript">
         var project =[[${project}]];
 

--
Gitblit v1.9.1