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
321e54a2
Commit
321e54a2
authored
Dec 19, 2022
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改地图接口
parent
1b4db922
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
14 deletions
+28
-14
ProjectDto.java
.../com/yeejoin/amos/boot/module/ugp/api/dto/ProjectDto.java
+5
-0
WeldController.java
...n/amos/boot/module/ugp/biz/controller/WeldController.java
+5
-4
WeldServiceImpl.java
...mos/boot/module/ugp/biz/service/impl/WeldServiceImpl.java
+18
-10
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 @
321e54a2
...
@@ -5,12 +5,14 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -5,12 +5,14 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Weld
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* 项目信息表
* 项目信息表
...
@@ -130,4 +132,7 @@ public class ProjectDto extends BaseDto {
...
@@ -130,4 +132,7 @@ public class ProjectDto extends BaseDto {
private
String
userId
;
private
String
userId
;
private
String
context
;
private
String
context
;
List
<
Weld
>
weldList
;
List
<
List
<
Double
>>
weldLines
;
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/WeldController.java
View file @
321e54a2
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.ugp.biz.controller;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.ugp.biz.controller;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WeldVerifyDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.WeldVerifyDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Weld
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Weld
;
...
@@ -237,10 +238,10 @@ public class WeldController extends BaseController {
...
@@ -237,10 +238,10 @@ public class WeldController extends BaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@
GetMapping
(
value
=
"/getWeldListByLocation/{northeast}/{southwest}
"
)
@
PostMapping
(
value
=
"/getWeldListByLocation
"
)
@ApiOperation
(
httpMethod
=
"
GE
T"
,
value
=
""
,
notes
=
""
)
@ApiOperation
(
httpMethod
=
"
POS
T"
,
value
=
""
,
notes
=
""
)
public
ResponseModel
<
List
<
String
>>
getWeldListByLocation
(
@PathVariable
(
value
=
"northeast"
)
Object
object
,
@PathVariable
(
value
=
"southwest"
)
Object
obj
){
public
ResponseModel
<
List
<
ProjectDto
>>
getWeldListByLocation
(
@RequestBody
Object
obj
){
return
ResponseHelper
.
buildResponse
(
weldServiceImpl
.
getWeldListByLocation
(
obj
ect
,
obj
));
return
ResponseHelper
.
buildResponse
(
weldServiceImpl
.
getWeldListByLocation
(
obj
));
}
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/WeldServiceImpl.java
View file @
321e54a2
...
@@ -371,30 +371,37 @@ class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements
...
@@ -371,30 +371,37 @@ class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements
/**
/**
* 根据地图经纬度信息获取项目id
* 根据地图经纬度信息获取项目id
* @param obj
ect
* @param obj
* @param obj
* @param obj
* @return
* @return
*/
*/
public
List
<
String
>
getWeldListByLocation
(
Object
object
,
Object
obj
){
public
List
<
ProjectDto
>
getWeldListByLocation
(
Object
obj
){
JSONObject
jsonObject
=
JSON
.
parseObject
(
String
.
valueOf
(
object
));
JSONObject
jsonObject
=
JSON
.
parseObject
(
String
.
valueOf
(
obj
));
Double
leftLongitude
=
jsonObject
.
getDouble
(
"longitude"
);
JSONObject
left
=
jsonObject
.
getJSONObject
(
"northeast"
);
Double
leftLatitude
=
jsonObject
.
getDouble
(
"latitude"
);
JSONObject
right
=
jsonObject
.
getJSONObject
(
"southwest"
);
JSONObject
json
=
JSON
.
parseObject
(
String
.
valueOf
(
obj
));
Double
leftLongitude
=
left
.
getDouble
(
"longitude"
);
Double
rightLongitude
=
json
.
getDouble
(
"longitude"
);
Double
leftLatitude
=
left
.
getDouble
(
"latitude"
);
Double
rightLatitude
=
json
.
getDouble
(
"latitude"
);
Double
rightLongitude
=
right
.
getDouble
(
"longitude"
);
Double
rightLatitude
=
right
.
getDouble
(
"latitude"
);
List
<
ProjectDto
>
projectList
=
projectService
.
getProjectLocation
();
List
<
ProjectDto
>
projectList
=
projectService
.
getProjectLocation
();
List
<
String
>
projectIds
=
new
ArrayList
<>();
List
<
String
>
projectIds
=
new
ArrayList
<>();
List
<
ProjectDto
>
projectDtos
=
new
ArrayList
<>();
List
<
Weld
>
weldList
=
new
ArrayList
<>();
for
(
ProjectDto
projectDto:
projectList
){
for
(
ProjectDto
projectDto:
projectList
){
if
(!
ValidationUtil
.
isEmpty
(
projectDto
.
getLatitude
())
&&
!
ValidationUtil
.
isEmpty
(
projectDto
.
getLongitude
()))
{
if
(!
ValidationUtil
.
isEmpty
(
projectDto
.
getLatitude
())
&&
!
ValidationUtil
.
isEmpty
(
projectDto
.
getLongitude
()))
{
Double
longitude
=
Double
.
valueOf
(
projectDto
.
getLongitude
());
Double
longitude
=
Double
.
valueOf
(
projectDto
.
getLongitude
());
Double
latitude
=
Double
.
valueOf
(
projectDto
.
getLatitude
());
Double
latitude
=
Double
.
valueOf
(
projectDto
.
getLatitude
());
if
(
rightLongitude
<
longitude
&&
longitude
<
leftLongitude
&&
rightLatitude
<
latitude
&&
latitude
<
leftLatitude
)
{
if
(
rightLongitude
<
longitude
&&
longitude
<
leftLongitude
&&
rightLatitude
<
latitude
&&
latitude
<
leftLatitude
)
{
project
Ids
.
add
(
String
.
valueOf
(
projectDto
.
getSequenceNbr
())
);
project
Dtos
.
add
(
projectDto
);
}
}
}
}
}
}
return
projectIds
;
for
(
ProjectDto
projectDto
:
projectDtos
){
projectDto
.
setWeldList
(
this
.
list
(
new
LambdaQueryWrapper
<
Weld
>().
eq
(
Weld:
:
getProjectId
,
projectDto
.
getSequenceNbr
())));
projectDto
.
setWeldLines
(
getWeldCode
(
String
.
valueOf
(
projectDto
.
getSequenceNbr
())));
}
return
projectDtos
;
}
}
}
}
\ No newline at end of file
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