From 8890c3cef398629ac46e5cd331a5e9ea8964e1ab Mon Sep 17 00:00:00 2001
From: zmk <496160012@qq.com>
Date: 星期三, 12 六月 2024 17:15:45 +0800
Subject: [PATCH] 提交代码
---
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/hole/hole.html | 1 +
javaweb-plus/javaweb-admin/src/main/java/com/javaweb/web/controller/system/SysIndexController.java | 8 ++++++--
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/project/info.html | 28 +++++++++++++++-------------
javaweb-plus/javaweb-cms/src/main/resources/templates/loginPage/process/login.html | 4 ++--
javaweb-plus/javaweb-cms/src/main/java/com/javaweb/geo/controller/HoleController.java | 5 +----
5 files changed, 25 insertions(+), 21 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 b141511..66269c8 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
@@ -5,6 +5,7 @@
import java.util.List;
import java.util.Map;
+import cn.hutool.core.util.ObjectUtil;
import com.javaweb.cms.util.CmsConstants;
import com.javaweb.common.core.domain.AjaxResult;
import com.javaweb.common.utils.Arith;
@@ -159,8 +160,11 @@
List<Hole> holes = holeService.selectHoleProjectProcess();
Map<String, Double> holeMap = new HashMap<>();
for (Hole hole : holes) {
- Double val = Arith.div(hole.getFootageCpl(), hole.getFootage(), 2);
- val = Arith.round(val * 100, 2);
+ Double val =0.0d;
+ if(ObjectUtil.isNotEmpty(hole.getFootageCpl()) && ObjectUtil.isNotEmpty(hole.getFootage())) {
+ val = Arith.div(hole.getFootageCpl(), hole.getFootage(), 2);
+ val = Arith.round(val * 100, 2);
+ }
holeMap.put(hole.getProjectId(), val);
}
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 2b7c86f..8878b61 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
@@ -130,16 +130,13 @@
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(Hole hole) {
- if(isNotNull(hole.getFootage()) && isNotNull(hole.getFootageCpl())){
+ if(ObjectUtil.isNotEmpty(hole.getFootage()) && ObjectUtil.isNotEmpty(hole.getFootageCpl())){
Double rate = Arith.div(hole.getFootageCpl(),hole.getFootage(),2) ;
hole.setRate(rate);
}
return toAjax(holeService.updateHole(hole));
}
- private boolean isNotNull(Double val){
- return val !=null && val !=0.0D;
- }
/**
* 鍒犻櫎閽诲瓟
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 45a6a9f..6d86725 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
@@ -74,6 +74,7 @@
exportUrl: prefix + "/export",
importUrl: prefix + "/importHole/"+projectId,
modalName: "閽诲瓟",
+ pageSize:50,
columns: [{
checkbox: true
},
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 1b70522..0d09f3b 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
@@ -124,21 +124,23 @@
<div slot="header" class="clearfix">
<span>閽诲瓟杩涘害</span>
</div>
- <template>
- <el-table :data="holeData" size="small" style="width: 100%">
- <el-table-column prop="code" label="缂栧彿"></el-table-column>
- <el-table-column prop="type" label="绫诲瀷"></el-table-column>
- <el-table-column prop="footage" label="鎬昏繘灏�(m)"></el-table-column>
- <el-table-column prop="footageCpl" label="宸插畬鎴�(m)"></el-table-column>
- <el-table-column label="杩涘害(%)">
- <template slot-scope="scope">
- <el-progress :percentage=(scope.row.rate*100).toFixed(0) ></el-progress>
- </template>
- </el-table-column>
+ <div style="height: 250px;">
+ <template>
+ <el-table :data="holeData" size="small" style="width: 100%" height="250">
+ <el-table-column prop="code" label="缂栧彿"></el-table-column>
+ <el-table-column prop="type" label="绫诲瀷"></el-table-column>
+ <el-table-column prop="footage" label="鎬昏繘灏�(m)"></el-table-column>
+ <el-table-column prop="footageCpl" label="宸插畬鎴�(m)"></el-table-column>
+ <el-table-column label="杩涘害(%)">
+ <template slot-scope="scope">
+ <el-progress :percentage=(scope.row.rate*100).toFixed(0) ></el-progress>
+ </template>
+ </el-table-column>
- </el-table>
- </template>
+ </el-table>
+ </template>
+ </div>
</el-card>
</el-col>
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/loginPage/process/login.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/loginPage/process/login.html
index 38206f8..e288fe0 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/templates/loginPage/process/login.html
+++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/loginPage/process/login.html
@@ -152,12 +152,12 @@
<div style="width:100%">
<div class="input-container" style="margin-top:124px;position:relative;">
<img src="images/loginPage/user1.png" style="margin-right:5px;"/>
- <input id="username" name="username" class="txt" value="admin" type="text" autocomplete="off" placeholder="璇疯緭鍏ョ敤鎴峰悕/閭" >
+ <input id="username" name="username" class="txt" value="" type="text" autocomplete="off" placeholder="璇疯緭鍏ョ敤鎴峰悕/閭" >
<div class="error-tip"></div>
</div>
<div class="login-input input-container" style="margin-top:42px;position:relative;">
<img class="password-icon" src="images/loginPage/password1.png"style="margin-top:-5px"/>
- <input name="password" id="password" value="admin123" class="txt" type="password" placeholder="璇疯緭鍏ョ櫥褰曞瘑鐮�" autocomplete="off" >
+ <input name="password" id="password" value="" class="txt" type="password" placeholder="璇疯緭鍏ョ櫥褰曞瘑鐮�" autocomplete="off" >
<div class="error-tip"></div>
</div>
--
Gitblit v1.9.1