Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
040712b0
Commit
040712b0
authored
Mar 09, 2023
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开发根据项目ID获取项目详情接口
parent
e2a5e401
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
3 deletions
+40
-3
ProjectDto.java
.../com/yeejoin/amos/boot/module/ugp/api/dto/ProjectDto.java
+2
-0
ProjectController.java
...mos/boot/module/ugp/biz/controller/ProjectController.java
+1
-3
IPipeServiceImpl.java
...os/boot/module/ugp/biz/service/impl/IPipeServiceImpl.java
+2
-0
ProjectServiceImpl.java
.../boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
+35
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/ProjectDto.java
View file @
040712b0
...
...
@@ -198,4 +198,6 @@ public class ProjectDto extends BaseDto {
* 组织机构代码
*/
private
String
creditCode
;
private
String
completionEstimateString
;
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/ProjectController.java
View file @
040712b0
...
...
@@ -134,9 +134,7 @@ public class ProjectController extends BaseController {
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个项目信息表"
,
notes
=
"根据sequenceNbr查询单个项目信息表"
)
public
ResponseModel
<
ProjectDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
ProjectDto
projectDto
=
projectServiceImpl
.
queryBySeq
(
sequenceNbr
);
projectDto
.
setStartDateString
(
new
SimpleDateFormat
(
"yyy-MM-dd HH:mm:ss"
).
format
(
projectDto
.
getStartDate
()));
return
ResponseHelper
.
buildResponse
(
projectServiceImpl
.
queryBySeq
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
projectServiceImpl
.
selectById
(
sequenceNbr
));
}
/**
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/IPipeServiceImpl.java
View file @
040712b0
...
...
@@ -35,7 +35,9 @@ public class IPipeServiceImpl extends BaseService<PipeDto, Pipe, PipeMapper> imp
pipeMapper
.
delete
(
lambda
);
userList
.
forEach
(
item
->
{
item
.
setStartPosition
(
item
.
getStartPositionObject
().
getString
(
"latitude"
)+
","
+
item
.
getStartPositionObject
().
getString
(
"longitude"
));
item
.
setStartName
(
item
.
getStartPositionObject
().
getString
(
"address"
));
item
.
setEndPosition
(
item
.
getEndPositionObject
().
getString
(
"latitude"
)+
","
+
item
.
getEndPositionObject
().
getString
(
"longitude"
));
item
.
setEndName
(
item
.
getEndPositionObject
().
getString
(
"address"
));
item
.
setProjectId
(
projectId
);
this
.
createWithModel
(
item
);
});
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProjectServiceImpl.java
View file @
040712b0
...
...
@@ -13,6 +13,7 @@ import com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectInitiationEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.WhetherItPassEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.constants.XJConstant
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.PipeDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectProcessDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.*
;
...
...
@@ -147,6 +148,40 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
}
}
/**
* 根据项目id获取项目详情
*/
public
ProjectDto
selectById
(
Long
sequenceNbr
){
ProjectDto
projectDto
=
this
.
queryBySeq
(
sequenceNbr
);
LambdaQueryWrapper
<
Pipe
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Pipe:
:
getProjectId
,
sequenceNbr
);
List
<
Pipe
>
pipeList
=
pipeService
.
list
(
wrapper
);
List
<
PipeDto
>
pipeDtoList
=
new
ArrayList
<>();
for
(
Pipe
pipe:
pipeList
){
PipeDto
pipeDto
=
new
PipeDto
();
BeanUtils
.
copyProperties
(
pipe
,
pipeDto
);
if
(
pipe
.
getStartPosition
().
contains
(
","
))
{
String
[]
position
=
pipe
.
getStartPosition
().
split
(
","
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"latitude"
,
position
[
0
]);
jsonObject
.
put
(
"longitude"
,
position
[
1
]);
jsonObject
.
put
(
"address"
,
pipe
.
getStartName
());
pipeDto
.
setStartPositionObject
(
jsonObject
);
}
if
(
pipe
.
getEndPosition
().
contains
(
","
))
{
String
[]
position
=
pipe
.
getEndPosition
().
split
(
","
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"latitude"
,
position
[
0
]);
jsonObject
.
put
(
"longitude"
,
position
[
1
]);
jsonObject
.
put
(
"address"
,
pipe
.
getEndName
());
pipeDto
.
setEndPositionObject
(
jsonObject
);
}
pipeDtoList
.
add
(
pipeDto
);
}
projectDto
.
setPipeSubForm
(
pipeDtoList
);
return
projectDto
;
}
// 静态变量存储最大值
private
static
final
AtomicInteger
atomicNum
=
new
AtomicInteger
();
private
static
final
Integer
INIT_CODE_NUM
=
0
;
...
...
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