Commit afc4b181 authored by zhangyingbin's avatar zhangyingbin

修改焊口经纬度查询接口

parent df21b41e
......@@ -230,9 +230,9 @@ public class WeldController extends BaseController {
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/getWeldCode")
@GetMapping(value = "/getWeldCode/{projectId}")
@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));
}
}
......@@ -358,17 +358,19 @@ class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements
return page;
}
public List<List<String>> getWeldCode(String projectId){
public List<List<Double>> getWeldCode(String projectId){
LambdaQueryWrapper<Weld> wrapper = new LambdaQueryWrapper();
wrapper.eq(Weld::getProjectId,projectId);
List<Weld> weldList = weldMapper.selectList(wrapper);
ArrayList<List<String>> list = Lists.newArrayList();
ArrayList<List<Double>> list = Lists.newArrayList();
for(Weld weld : weldList){
ArrayList<String> objects = Lists.newArrayList();
objects.add(weld.getLatitude());
objects.add(weld.getLongitude());
if(!ValidationUtil.isEmpty(weld.getLatitude()) && !ValidationUtil.isEmpty(weld.getLongitude())) {
ArrayList<Double> objects = Lists.newArrayList();
objects.add(Double.valueOf(weld.getLongitude()));
objects.add(Double.valueOf(weld.getLatitude()));
list.add(objects);
}
}
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