Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zjsgfa_mysql
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangyun
zjsgfa_mysql
Commits
1be4d6f4
Commit
1be4d6f4
authored
Jul 18, 2025
by
jiang'yun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
ef615c77
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
0 deletions
+109
-0
src/main/java/com/ruoyi/project/zjsgfa/controller/SjJygjGdsjgdcsController.java
+18
-0
src/main/java/com/ruoyi/project/zjsgfa/service/ISjJygjGdsjgdcsService.java
+5
-0
src/main/java/com/ruoyi/project/zjsgfa/service/impl/SjJygjGdsjgdcsServiceImpl.java
+86
-0
No files found.
src/main/java/com/ruoyi/project/zjsgfa/controller/SjJygjGdsjgdcsController.java
View file @
1be4d6f4
package
com
.
ruoyi
.
project
.
zjsgfa
.
controller
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletResponse
;
import
com.alibaba.fastjson2.JSONObject
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -101,4 +104,19 @@ public class SjJygjGdsjgdcsController extends BaseController
{
return
toAjax
(
sjJygjGdsjgdcsService
.
deleteSjJygjGdsjgdcsByIds
(
ids
));
}
/**
* 查询井眼轨迹二维:水平投影、垂直投影图
*/
@GetMapping
(
"/jygjEw"
)
public
String
jygjEw
(
SjJygjGdsjgdcs
sjJygjGdsjgdcs
)
{
Map
jsjgt
=
sjJygjGdsjgdcsService
.
jygjEw
(
sjJygjGdsjgdcs
);
JSONObject
jsonObject
=
new
JSONObject
(
jsjgt
);
String
jsonString
=
jsonObject
.
toJSONString
();
return
jsonString
;
}
}
src/main/java/com/ruoyi/project/zjsgfa/service/ISjJygjGdsjgdcsService.java
View file @
1be4d6f4
package
com
.
ruoyi
.
project
.
zjsgfa
.
service
;
import
java.util.List
;
import
java.util.Map
;
import
com.ruoyi.project.zjsgfa.domain.SjJygjGdsjgdcs
;
/**
...
...
@@ -58,4 +60,7 @@ public interface ISjJygjGdsjgdcsService
* @return 结果
*/
public
int
deleteSjJygjGdsjgdcsById
(
Long
id
);
Map
jygjEw
(
SjJygjGdsjgdcs
sjJygjGdsjgdcs
);
}
src/main/java/com/ruoyi/project/zjsgfa/service/impl/SjJygjGdsjgdcsServiceImpl.java
View file @
1be4d6f4
package
com
.
ruoyi
.
project
.
zjsgfa
.
service
.
impl
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.ruoyi.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -92,4 +97,85 @@ public class SjJygjGdsjgdcsServiceImpl implements ISjJygjGdsjgdcsService
{
return
sjJygjGdsjgdcsMapper
.
deleteSjJygjGdsjgdcsById
(
id
);
}
@Override
public
Map
jygjEw
(
SjJygjGdsjgdcs
sjJygjGdsjgdcs
)
{
List
<
SjJygjGdsjgdcs
>
gjlist
=
sjJygjGdsjgdcsMapper
.
selectSjJygjGdsjgdcsList
(
sjJygjGdsjgdcs
);
// 水平投影
Map
sptymap
=
new
HashMap
();
List
spList
=
new
ArrayList
<>();
sptymap
.
put
(
"data"
,
spList
);
// 垂直投影
Map
cztymap
=
new
HashMap
();
List
czList
=
new
ArrayList
<>();
cztymap
.
put
(
"data"
,
czList
);
// 垂直投影坐标范围
Double
maxcs
=
0.0
;
Double
maxsp
=
0.0
;
Double
minsp
=
0.0
;
// 水平投影使用范围
Double
maxnb
=
0.0
;
Double
minnb
=
0.0
;
Double
maxdx
=
0.0
;
Double
mindx
=
0.0
;
maxcs
=
gjlist
.
stream
().
map
(
SjJygjGdsjgdcs:
:
getCs
).
max
(
Double:
:
compare
).
get
();
maxsp
=
gjlist
.
stream
().
map
(
SjJygjGdsjgdcs:
:
getSpy
).
max
(
Double:
:
compare
).
get
();
minsp
=
gjlist
.
stream
().
map
(
SjJygjGdsjgdcs:
:
getSpy
).
min
(
Double:
:
compare
).
get
();
maxnb
=
gjlist
.
stream
().
map
(
SjJygjGdsjgdcs:
:
getNbwy
).
max
(
Double:
:
compare
).
get
();
minnb
=
gjlist
.
stream
().
map
(
SjJygjGdsjgdcs:
:
getNbwy
).
min
(
Double:
:
compare
).
get
();
maxdx
=
gjlist
.
stream
().
map
(
SjJygjGdsjgdcs:
:
getDxwy
).
max
(
Double:
:
compare
).
get
();
mindx
=
gjlist
.
stream
().
map
(
SjJygjGdsjgdcs:
:
getDxwy
).
min
(
Double:
:
compare
).
get
();
for
(
int
i
=
0
;
i
<
gjlist
.
size
();
i
++){
SjJygjGdsjgdcs
dw
=
gjlist
.
get
(
i
);
if
(
dw
.
getCs
()==
null
||
dw
.
getNbwy
()==
null
||
dw
.
getDxwy
()==
null
||
dw
.
getSpy
()==
null
)
{
return
back
(
"数据存在空值"
);
}
Double
cs
=
dw
.
getCs
();
// 垂深
Double
sp
=
dw
.
getSpy
();
// 水平
Double
nb
=
dw
.
getNbwy
();
// 南北
Double
dx
=
dw
.
getDxwy
();
// 东西
Map
spd
=
new
HashMap
();
// 水平投影的点
spd
.
put
(
"y"
,
nb
);
// 给N北 南北位移
spd
.
put
(
"x"
,
dx
);
//给E东 东西位移
spList
.
add
(
spd
);
Map
czd
=
new
HashMap
();
// 垂直投影的点
czd
.
put
(
"y"
,
cs
);
// 垂深
czd
.
put
(
"x"
,
sp
);
// 水平位移
czList
.
add
(
czd
);
}
sptymap
.
put
(
"xmax"
,
maxdx
);
sptymap
.
put
(
"xmin"
,
mindx
);
sptymap
.
put
(
"ymax"
,
maxnb
);
sptymap
.
put
(
"ymin"
,
minnb
);
cztymap
.
put
(
"xmax"
,
maxsp
+
500
);
// +1000
cztymap
.
put
(
"xmin"
,
minsp
-
300
);
cztymap
.
put
(
"ymax"
,
maxcs
+
500
);
// +1000
cztymap
.
put
(
"ymin"
,
0
);
Map
map
=
new
HashMap
();
map
.
put
(
"code"
,
200
);
map
.
put
(
"msg"
,
"成功"
);
map
.
put
(
"sptymap"
,
sptymap
);
map
.
put
(
"cztymap"
,
cztymap
);
return
map
;
}
public
static
Map
back
(
String
msg
)
{
Map
map
=
new
HashMap
();
map
.
put
(
"code"
,
500
);
map
.
put
(
"msg"
,
msg
);
return
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