Commit afc4b181 authored by zhangyingbin's avatar zhangyingbin

修改焊口经纬度查询接口

parent df21b41e
...@@ -230,9 +230,9 @@ public class WeldController extends BaseController { ...@@ -230,9 +230,9 @@ public class WeldController extends BaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/getWeldCode") @GetMapping(value = "/getWeldCode/{projectId}")
@ApiOperation(httpMethod = "GET", value = "获取焊口定位信息List(只有经纬度信息)", notes = "获取焊口定位信息List(只有经纬度信息)") @ApiOperation(httpMethod = "GET", value = "获取焊口定位信息List(只有经纬度信息)", notes = "获取焊口定位信息List(只有经纬度信息)")
public ResponseModel<List<List<String>>> getWeldCode(String projectId){ public ResponseModel<List<List<Double>>> getWeldCode(@PathVariable String projectId){
return ResponseHelper.buildResponse(weldServiceImpl.getWeldCode(projectId)); return ResponseHelper.buildResponse(weldServiceImpl.getWeldCode(projectId));
} }
} }
...@@ -358,16 +358,18 @@ class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements ...@@ -358,16 +358,18 @@ class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements
return page; return page;
} }
public List<List<String>> getWeldCode(String projectId){ public List<List<Double>> getWeldCode(String projectId){
LambdaQueryWrapper<Weld> wrapper = new LambdaQueryWrapper(); LambdaQueryWrapper<Weld> wrapper = new LambdaQueryWrapper();
wrapper.eq(Weld::getProjectId,projectId); wrapper.eq(Weld::getProjectId,projectId);
List<Weld> weldList = weldMapper.selectList(wrapper); List<Weld> weldList = weldMapper.selectList(wrapper);
ArrayList<List<String>> list = Lists.newArrayList(); ArrayList<List<Double>> list = Lists.newArrayList();
for(Weld weld : weldList){ for(Weld weld : weldList){
ArrayList<String> objects = Lists.newArrayList(); if(!ValidationUtil.isEmpty(weld.getLatitude()) && !ValidationUtil.isEmpty(weld.getLongitude())) {
objects.add(weld.getLatitude()); ArrayList<Double> objects = Lists.newArrayList();
objects.add(weld.getLongitude()); objects.add(Double.valueOf(weld.getLongitude()));
list.add(objects); objects.add(Double.valueOf(weld.getLatitude()));
list.add(objects);
}
} }
return list; return list;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment