Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
pipeline-network
Commits
6dcd6cf2
Commit
6dcd6cf2
authored
Aug 28, 2026
by
wujipeng
Browse files
道路详情-增加字段
parent
56d4351f
Changes
3
Show whitespace changes
Inline
Side-by-side
src/main/java/com/example/pipelinenetwork/pojo/entity/BasicEntity.java
View file @
6dcd6cf2
...
...
@@ -51,4 +51,22 @@ public class BasicEntity {
@TableField
(
value
=
"rel_id"
)
private
String
relId
;
/**
* 管径
*/
@TableField
(
value
=
"pipe_diameter"
)
private
Double
pipeDiameter
;
/**
* 管道类型
*/
@TableField
(
value
=
"pipe_type"
)
private
String
pipeType
;
/**
* 文件名
*/
@TableField
(
value
=
"file_name"
)
private
String
fileName
;
}
src/main/java/com/example/pipelinenetwork/pojo/vo/RoadVO.java
View file @
6dcd6cf2
package
com.example.pipelinenetwork.pojo.vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.example.pipelinenetwork.pojo.entity.RoadEntity
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
lombok.*
;
import
java.util.List
;
import
java.util.Set
;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
...
...
@@ -68,4 +70,20 @@ public class RoadVO extends RoadEntity {
*/
private
List
<
RoadVO
>
data
;
/**
* 管径
*/
private
Double
pipeDiameter
;
/**
* 管道类型
*/
private
Set
<
String
>
pipeType
;
/**
* 文件名
*/
private
String
fileName
;
}
\ No newline at end of file
src/main/java/com/example/pipelinenetwork/service/impl/RoadServiceImpl.java
View file @
6dcd6cf2
...
...
@@ -16,20 +16,16 @@ import com.example.pipelinenetwork.service.DefectService;
import
com.example.pipelinenetwork.service.RepairService
;
import
com.example.pipelinenetwork.service.RoadService
;
import
com.example.pipelinenetwork.util.LinestringUtil
;
import
com.example.pipelinenetwork.util.NumberUtils
;
import
org.apache.poi.ss.usermodel.Row
;
import
org.apache.poi.ss.usermodel.Sheet
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.apache.poi.ss.usermodel.WorkbookFactory
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Resource
;
import
java.io.InputStream
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
@Service
public
class
RoadServiceImpl
extends
ServiceImpl
<
RoadMapper
,
RoadEntity
>
implements
RoadService
{
...
...
@@ -94,10 +90,19 @@ public class RoadServiceImpl extends ServiceImpl<RoadMapper, RoadEntity> impleme
int
structuralDefect
=
0
;
//功能性缺陷
int
functionalDefect
=
0
;
//管径
double
pipeDiameter
=
0
;
//管道类型
Set
<
String
>
pipeType
=
new
HashSet
<>();
//文件名
String
fileName
=
""
;
//列表
List
<
RoadVO
>
data
=
new
ArrayList
<>();
//获取relId
List
<
BasicEntity
>
list
=
basicService
.
list
(
new
LambdaQueryWrapper
<
BasicEntity
>().
eq
(
BasicEntity:
:
getRoadName
,
roadDTO
.
getRoadName
()));
if
(!
list
.
isEmpty
()){
fileName
=
list
.
get
(
0
).
getFileName
();
}
List
<
String
>
relIds
=
new
ArrayList
<>();
for
(
BasicEntity
basicEntity
:
list
)
{
relIds
.
add
(
basicEntity
.
getRelId
());
...
...
@@ -107,6 +112,12 @@ public class RoadServiceImpl extends ServiceImpl<RoadMapper, RoadEntity> impleme
if
(
basicEntity
.
getDetectionLength
()
!=
null
)
{
length
+=
basicEntity
.
getDetectionLength
();
}
if
(
basicEntity
.
getPipeDiameter
()
!=
null
)
{
pipeDiameter
+=
basicEntity
.
getPipeDiameter
();
}
if
(
basicEntity
.
getPipeType
()
!=
null
)
{
pipeType
.
add
(
basicEntity
.
getPipeType
());
}
}
if
(
relIds
.
isEmpty
())
{
return
Result
.
success
(
result
);
...
...
@@ -150,6 +161,9 @@ public class RoadServiceImpl extends ServiceImpl<RoadMapper, RoadEntity> impleme
result
.
setLength
(
length
);
result
.
setStructuralDefect
(
structuralDefect
);
result
.
setFunctionalDefect
(
functionalDefect
);
result
.
setPipeDiameter
(
pipeDiameter
);
result
.
setPipeType
(
pipeType
);
result
.
setFileName
(
fileName
);
result
.
setData
(
data
);
return
Result
.
success
(
result
);
}
...
...
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