Commit ceb9b205 authored by limei's avatar limei

获取焊口定位信息

parent c7d2efcd
......@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import java.util.Map;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.WeldServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
......@@ -228,6 +229,13 @@ public class WeldController extends BaseController {
return ResponseHelper.buildResponse(weldServiceImpl.list());
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/getWeldCode")
@ApiOperation(httpMethod = "GET", value = "获取焊口定位信息", notes = "获取焊口定位信息")
public ResponseModel<List<List<String>>> getWeldCode(String projectId){
return ResponseHelper.buildResponse(weldServiceImpl.getWeldCode(projectId));
}
}
......@@ -25,6 +25,7 @@ import com.yeejoin.amos.boot.module.ugp.api.service.IProjectInitiationService;
import com.yeejoin.amos.boot.module.ugp.api.service.IWeldService;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.systemctl.Systemctl;
import org.apache.commons.compress.utils.Lists;
import org.apache.http.entity.ContentType;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -369,5 +370,18 @@ class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements
return weldList;
}
public List<List<String>> 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();
for(Weld weld : weldList){
ArrayList<String> objects = Lists.newArrayList();
objects.add(weld.getLatitude());
objects.add(weld.getLongitude());
list.add(objects);
}
return list;
}
}
\ No newline at end of file
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