Commit cd267f0c authored by lisong's avatar lisong

精度丢失bug修改

parent 4add3e9d
...@@ -29,6 +29,7 @@ import com.yeejoin.amos.patrol.feign.RemoteSecurityService; ...@@ -29,6 +29,7 @@ import com.yeejoin.amos.patrol.feign.RemoteSecurityService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import liquibase.pro.packaged.S;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -804,8 +805,14 @@ public class RouteController extends AbstractBaseController { ...@@ -804,8 +805,14 @@ public class RouteController extends AbstractBaseController {
@PutMapping(value = "/relevancyPoint", produces = "application/json;charset=UTF-8") @PutMapping(value = "/relevancyPoint", produces = "application/json;charset=UTF-8")
public CommonResponse relevancyPoint(@ApiParam(value = "巡检路线", required = true) @RequestBody JSONObject map) { public CommonResponse relevancyPoint(@ApiParam(value = "巡检路线", required = true) @RequestBody JSONObject map) {
Route route = new Route(); Route route = new Route();
List<Long> ids = (List<Long>) map.get("ids"); List<String> ids = (List<String>) map.get("ids");
List<RoutePoint> routePoint = pointMapper.getRoutePoint(ids); List<RoutePoint> routePoint = new ArrayList<>();
for (String id : ids) {
RoutePoint routePointItem = new RoutePoint();
routePointItem.setPointId(Long.parseLong(id));
routePoint.add(routePointItem);
}
// if (!ObjectUtils.isEmpty(ids)){ // if (!ObjectUtils.isEmpty(ids)){
// ids.forEach(item ->{ // ids.forEach(item ->{
// RoutePoint routePoint = new RoutePoint(); // RoutePoint routePoint = new RoutePoint();
......
...@@ -2039,6 +2039,10 @@ public class PointServiceImpl implements IPointService { ...@@ -2039,6 +2039,10 @@ public class PointServiceImpl implements IPointService {
throw new RuntimeException("查询条件有误"); throw new RuntimeException("查询条件有误");
} }
List<Map<String, Object>> resList = pointMapper.queryEquipListByPointId(pointId); List<Map<String, Object>> resList = pointMapper.queryEquipListByPointId(pointId);
resList.stream().forEach(item ->{
item.put("classifyId", ObjectUtils.isEmpty(item.get("classifyId")) ? "" :item.get("classifyId"));
});
return resList; return resList;
} }
......
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