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
4c6bef56
Commit
4c6bef56
authored
Jul 18, 2025
by
jiang'yun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
3b840c0c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
3 deletions
+62
-3
src/main/java/com/ruoyi/project/zjsgfa/controller/SjDjjcController.java
+21
-0
src/main/java/com/ruoyi/project/zjsgfa/domain/SjJygjGdsjgdcs.java
+6
-0
src/main/java/com/ruoyi/project/zjsgfa/service/impl/SjJsjgServiceImpl.java
+27
-0
src/main/resources/mybatis/zjsgfa/SjJygjGdsjgdcsMapper.xml
+8
-3
No files found.
src/main/java/com/ruoyi/project/zjsgfa/controller/SjDjjcController.java
View file @
4c6bef56
...
@@ -677,6 +677,9 @@ public class SjDjjcController extends BaseController
...
@@ -677,6 +677,9 @@ public class SjDjjcController extends BaseController
gdfdcs
.
setGjm
(
Double
.
parseDouble
(
gjm
));
gdfdcs
.
setGjm
(
Double
.
parseDouble
(
gjm
));
}
}
//计算视平移
double
spy
=
calculateApparentDisplacement
(
Double
.
parseDouble
(
bhfw
),
Double
.
parseDouble
(
nbwy
),
Double
.
parseDouble
(
dxwy
));
gdfdcs
.
setSpy
(
spy
);
sjJygjGdsjgdcsList
.
add
(
gdfdcs
);
sjJygjGdsjgdcsList
.
add
(
gdfdcs
);
}
}
...
@@ -1136,6 +1139,24 @@ public class SjDjjcController extends BaseController
...
@@ -1136,6 +1139,24 @@ public class SjDjjcController extends BaseController
}
}
/**
* 计算指定方向上的视平移
* @param closureAzimuth 闭合方位角(度)
* @param nsDisplacement 南北位移(米)
* @param ewDisplacement 东西位移(米)
* @return 视平移(米)
*/
public
double
calculateApparentDisplacement
(
double
closureAzimuth
,
double
nsDisplacement
,
double
ewDisplacement
)
{
// 将角度转换为弧度(Java 的三角函数使用弧度)
double
azimuthRadians
=
Math
.
toRadians
(
closureAzimuth
);
// 计算视平移
return
nsDisplacement
*
Math
.
cos
(
azimuthRadians
)
+
ewDisplacement
*
Math
.
sin
(
azimuthRadians
);
}
...
...
src/main/java/com/ruoyi/project/zjsgfa/domain/SjJygjGdsjgdcs.java
View file @
4c6bef56
...
@@ -2,6 +2,7 @@ package com.ruoyi.project.zjsgfa.domain;
...
@@ -2,6 +2,7 @@ package com.ruoyi.project.zjsgfa.domain;
import
java.util.Date
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.framework.aspectj.lang.annotation.Excel
;
import
com.ruoyi.framework.aspectj.lang.annotation.Excel
;
...
@@ -13,6 +14,7 @@ import com.ruoyi.framework.web.domain.BaseEntity;
...
@@ -13,6 +14,7 @@ import com.ruoyi.framework.web.domain.BaseEntity;
* @author ruoyi
* @author ruoyi
* @date 2025-06-26
* @date 2025-06-26
*/
*/
@Data
public
class
SjJygjGdsjgdcs
extends
BaseEntity
public
class
SjJygjGdsjgdcs
extends
BaseEntity
{
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -72,6 +74,10 @@ public class SjJygjGdsjgdcs extends BaseEntity
...
@@ -72,6 +74,10 @@ public class SjJygjGdsjgdcs extends BaseEntity
@Excel
(
name
=
"工具面"
)
@Excel
(
name
=
"工具面"
)
private
Double
gjm
;
private
Double
gjm
;
@Excel
(
name
=
"视平移"
)
private
Double
spy
;
/** 备注 */
/** 备注 */
@Excel
(
name
=
"备注"
)
@Excel
(
name
=
"备注"
)
private
String
bz
;
private
String
bz
;
...
...
src/main/java/com/ruoyi/project/zjsgfa/service/impl/SjJsjgServiceImpl.java
View file @
4c6bef56
package
com
.
ruoyi
.
project
.
zjsgfa
.
service
.
impl
;
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.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -99,7 +102,31 @@ public class SjJsjgServiceImpl implements ISjJsjgService
...
@@ -99,7 +102,31 @@ public class SjJsjgServiceImpl implements ISjJsjgService
public
Map
selectJsjgt
(
SjJsjg
sjJsjg
)
{
public
Map
selectJsjgt
(
SjJsjg
sjJsjg
)
{
List
<
SjJsjg
>
sjJsjgs
=
sjJsjgMapper
.
selectSjJsjgList
(
sjJsjg
);
List
<
SjJsjg
>
sjJsjgs
=
sjJsjgMapper
.
selectSjJsjgList
(
sjJsjg
);
Map
jsJgmap
=
new
HashMap
();
Double
maxY
=
sjJsjgs
.
stream
().
map
(
SjJsjg:
:
getJs
).
max
(
Double:
:
compare
).
get
();
Double
maxX
=
sjJsjgs
.
stream
().
map
(
SjJsjg:
:
getZtzj
).
max
(
Double:
:
compare
).
get
();
jsJgmap
.
put
(
"maxY"
,
Math
.
ceil
(
maxY
+
500
));
jsJgmap
.
put
(
"maxX"
,
Math
.
ceil
(
maxX
+
1000
));
List
zxList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
sjJsjgs
.
size
();
i
++){
SjJsjg
sjJsjg1
=
sjJsjgs
.
get
(
i
);
Double
cs1
=
sjJsjg1
.
getJs
();
Double
spy1
=
sjJsjg1
.
getZtzj
();
//填充中心线
Map
zxmap
=
new
HashMap
();
zxmap
.
put
(
"x"
,
Math
.
ceil
(
spy1
+
500
));
zxmap
.
put
(
"y"
,
cs1
);
if
(
i
==
0
){
zxmap
.
put
(
"y"
,
new
BigDecimal
(
0
));
}
zxList
.
add
(
zxmap
);
}
jsJgmap
.
put
(
"zx"
,
zxList
);
return
null
;
return
null
;
...
...
src/main/resources/mybatis/zjsgfa/SjJygjGdsjgdcsMapper.xml
View file @
4c6bef56
...
@@ -24,10 +24,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -24,10 +24,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"createdTime"
column=
"created_time"
/>
<result
property=
"createdTime"
column=
"created_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"spy"
column=
"spy"
/>
</resultMap>
</resultMap>
<sql
id=
"selectSjJygjGdsjgdcsVo"
>
<sql
id=
"selectSjJygjGdsjgdcsVo"
>
select id, jh, js, jx, fw, bhfw, cs, bhj, nbwy, dxwy, zxl, fwbhl, qjbhl, gjm, bz, created_by, created_time, update_by, update_time from sj_jygj_gdsjgdcs
select id, jh, js, jx, fw, bhfw, cs, bhj, nbwy, dxwy, zxl, fwbhl, qjbhl, gjm, bz, created_by, created_time, update_by, update_time
,spy
from sj_jygj_gdsjgdcs
</sql>
</sql>
<select
id=
"selectSjJygjGdsjgdcsList"
parameterType=
"SjJygjGdsjgdcs"
resultMap=
"SjJygjGdsjgdcsResult"
>
<select
id=
"selectSjJygjGdsjgdcsList"
parameterType=
"SjJygjGdsjgdcs"
resultMap=
"SjJygjGdsjgdcsResult"
>
...
@@ -78,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -78,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"createdTime != null"
>
created_time,
</if>
<if
test=
"createdTime != null"
>
created_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"spy != null"
>
spy,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"jh != null"
>
#{jh},
</if>
<if
test=
"jh != null"
>
#{jh},
</if>
...
@@ -98,11 +100,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -98,11 +100,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"createdTime != null"
>
#{createdTime},
</if>
<if
test=
"createdTime != null"
>
#{createdTime},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"spy != null"
>
#{spy},
</if>
</trim>
</trim>
</insert>
</insert>
<insert
id=
"insertSjJygjGdsjgdcsBatch"
>
<insert
id=
"insertSjJygjGdsjgdcsBatch"
>
INSERT INTO sj_jygj_gdsjgdcs
INSERT INTO sj_jygj_gdsjgdcs
(jh, js, jx, fw, bhfw, cs, bhj, nbwy, dxwy, zxl, fwbhl, qjbhl, gjm, bz)
(jh, js, jx, fw, bhfw, cs, bhj, nbwy, dxwy, zxl, fwbhl, qjbhl, gjm, bz
, spy
)
VALUES
VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
(
...
@@ -119,7 +122,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -119,7 +122,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.fwbhl},
#{item.fwbhl},
#{item.qjbhl},
#{item.qjbhl},
#{item.gjm},
#{item.gjm},
#{item.bz}
#{item.bz},
#{item.spy}
)
)
</foreach>
</foreach>
</insert>
</insert>
...
@@ -145,6 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -145,6 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"createdTime != null"
>
created_time = #{createdTime},
</if>
<if
test=
"createdTime != null"
>
created_time = #{createdTime},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"spy != null"
>
spy = #{spy},
</if>
</trim>
</trim>
where id = #{id}
where id = #{id}
</update>
</update>
...
...
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