Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
New MineTRS_java
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kiritoausna
New MineTRS_java
Commits
de7a5d62
Commit
de7a5d62
authored
Jul 09, 2025
by
ankh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
坡度比更正
parent
826142f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
DbDataServiceImpl.java
...e/zhengjie/gemho/service/data/impl/DbDataServiceImpl.java
+16
-16
No files found.
eladmin-system/src/main/java/me/zhengjie/gemho/service/data/impl/DbDataServiceImpl.java
View file @
de7a5d62
...
@@ -288,22 +288,22 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
...
@@ -288,22 +288,22 @@ public class DbDataServiceImpl extends ServiceImpl<DbDataMapper, DbData> impleme
dbDataPage
=
dbDataMapper
.
selectPage
(
dbDataPage
,
dbDataQueryWrapper
);
dbDataPage
=
dbDataMapper
.
selectPage
(
dbDataPage
,
dbDataQueryWrapper
);
List
<
DbData
>
records
=
dbDataPage
.
getRecords
();
List
<
DbData
>
records
=
dbDataPage
.
getRecords
();
// 插入计算 lenth / safeheight * 1000 并 setAngle 的逻辑
//
// 插入计算 lenth / safeheight * 1000 并 setAngle 的逻辑
for
(
DbData
record
:
records
)
{
//
for (DbData record : records) {
if
(
record
.
getLenth
()
!=
null
&&
record
.
getSafeheight
()
!=
null
//
if (record.getLenth() != null && record.getSafeheight() != null
&&
!
record
.
getSafeheight
().
equals
(
"0"
))
{
//
&& !record.getSafeheight().equals("0")) {
try
{
//
try {
double
lenthValue
=
Double
.
parseDouble
(
record
.
getLenth
());
//
double lenthValue = Double.parseDouble(record.getLenth());
double
aDouble
=
Double
.
parseDouble
(
record
.
getAngle
());
//
double aDouble = Double.parseDouble(record.getAngle());
double
result
=
(
aDouble
/
lenthValue
)
*
1000
;
//
double result = (aDouble / lenthValue) * 1000;
record
.
setSafeheight
(
String
.
format
(
"%.4f"
,
result
));
// 存入 angle 字段
//
record.setSafeheight(String.format("%.4f", result)); // 存入 angle 字段
}
catch
(
NumberFormatException
e
)
{
//
} catch (NumberFormatException e) {
record
.
setSafeheight
(
null
);
//
record.setSafeheight(null);
}
//
}
}
else
{
//
} else {
record
.
setSafeheight
(
null
);
//
record.setSafeheight(null);
}
//
}
}
//
}
long
total
=
dbDataPage
.
getTotal
();
long
total
=
dbDataPage
.
getTotal
();
//获取编码-名字map
//获取编码-名字map
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment