Browse Source

1.1.0 修改ios地图加载缓慢问题

feature/v1.1.0
peihao 4 years ago
parent
commit
81f90ba618
  1. 13
      air/src/main/java/com/air/applets/controller/AppletsMapController.java
  2. 3
      air/src/main/java/com/air/applets/controller/LandListedLonLatController.java
  3. 3
      air/src/main/java/com/air/applets/controller/LandToListLonLatController.java
  4. 70
      air/src/main/java/com/air/applets/convert/LandLonLatConvert.java
  5. 21
      air/src/main/java/com/air/applets/dto/CoordinatePoint.java
  6. 23
      air/src/main/java/com/air/applets/dto/Feature.java
  7. 27
      air/src/main/java/com/air/applets/dto/LandLonLatDto.java
  8. 21
      air/src/main/java/com/air/applets/dto/LandProperties.java
  9. 40
      air/src/main/java/com/air/applets/entity/CityAreaLonLatBase.java
  10. 5
      air/src/main/java/com/air/applets/entity/Dazutuan.java
  11. 7
      air/src/main/java/com/air/applets/entity/Huanxian.java
  12. 2
      air/src/main/java/com/air/applets/entity/Xiaozutuan.java
  13. 7
      air/src/main/java/com/air/applets/entity/Xingzhengqu.java
  14. 12
      air/src/main/java/com/air/applets/mapper/AppletsMapMapper.java
  15. 13
      air/src/main/java/com/air/applets/serivce/AppletsMapService.java
  16. 45
      air/src/main/java/com/air/applets/serivce/impl/AppletsMapServiceImpl.java
  17. 32
      air/src/main/java/com/air/entity/PolygonGeom.java
  18. 14
      air/src/main/java/com/air/entity/PolygonPoint.java
  19. 10
      air/src/main/java/com/air/land/controller/LandListedLonLatController.java
  20. 7
      air/src/main/java/com/air/land/controller/LandToListLonLatController.java
  21. 11
      air/src/main/java/com/air/land/entity/LandListedLonLat.java
  22. 11
      air/src/main/java/com/air/land/entity/LandToListLonLat.java
  23. 2
      air/src/main/java/com/air/land/mapper/LandToListLonLatMapper.java
  24. 3
      air/src/main/java/com/air/land/service/LandListedLonLatService.java
  25. 3
      air/src/main/java/com/air/land/service/LandToListLonLatService.java
  26. 9
      air/src/main/java/com/air/land/service/impl/LandListedLonLatServiceImpl.java
  27. 10
      air/src/main/java/com/air/land/service/impl/LandToListLonLatServiceImpl.java
  28. 2
      air/src/main/java/com/air/land/service/impl/LandToListSendServiceImpl.java
  29. 2
      air/src/main/java/com/air/land/vo/LandListedLonLatVo.java
  30. 2
      air/src/main/java/com/air/land/vo/LandToListLonLatVo.java
  31. 1
      air/src/main/java/com/air/sysMessage/controller/SysMessageController.java
  32. 69
      air/src/main/java/com/air/utils/GeomUtils.java
  33. 66
      air/src/main/java/com/air/utils/WgsUtil.java
  34. 67
      air/src/main/resources/mapper/AppletsMapMapper.xml
  35. 10
      air/src/main/resources/mapper/LandListedLonLatMapper.xml
  36. 14
      air/src/main/resources/mapper/LandToListLonLatMapper.xml

13
air/src/main/java/com/air/applets/controller/AppletsMapController.java

@ -1,5 +1,6 @@
package com.air.applets.controller;
import com.air.applets.dto.LandLonLatDto;
import com.air.applets.serivce.AppletsMapService;
import com.cinderella.framework.common.core.util.R;
import io.swagger.annotations.Api;
@ -33,7 +34,7 @@ public class AppletsMapController {
*/
@ApiOperation(value = "根据定位经纬度范围行政区数据", notes = "根据定位经纬度范围行政区数据")
@GetMapping("getRegionByLocation")
public R<List<Map<String, String>>> getRegionByLocation(String city) {
public R<List<LandLonLatDto>> getRegionByLocation(String city) {
return R.ok(mapService.getRegionByLocation(city), "查询成功");
}
@ -63,7 +64,7 @@ public class AppletsMapController {
*/
@ApiOperation(value = "根据定位经纬度返回5公里范围内的大组团小组团", notes = "根据定位经纬度返回5公里范围内的大组团小组团")
@GetMapping("getTypeRegionByLocation")
public R<List<Map<String, String>>> getTypeRegionByLocation(@RequestParam String type,String city) {
public R<List<LandLonLatDto>> getTypeRegionByLocation(@RequestParam String type,String city) {
return R.ok(mapService.getTypeRegionByLocation(type,city), "查询成功");
}
@ -74,7 +75,7 @@ public class AppletsMapController {
*/
@ApiOperation(value = "根据定位经纬度范围行政区数据", notes = "根据定位经纬度范围行政区数据")
@GetMapping("getLoopLine")
public R<List<Map<String, String>>> getLoopLine(String city) {
public R<List<LandLonLatDto>> getLoopLine(String city) {
return R.ok(mapService.getLoopLine(city), "查询成功");
}
@ -85,7 +86,7 @@ public class AppletsMapController {
*/
@ApiOperation(value = "获取拟挂牌地块数据", notes = "获取拟挂牌地块数据")
@GetMapping("getLandToList")
public R<List<Map<String, String>>> getLandToList(String city) {
public R<List<LandLonLatDto>> getLandToList(String city) {
return R.ok(mapService.getLandToList(city), "查询成功");
}
@ -96,7 +97,7 @@ public class AppletsMapController {
*/
@ApiOperation(value = "获取挂牌中数据", notes = "获取挂牌中数据")
@GetMapping("getLandListing")
public R<List<Map<String, String>>> getLandListing(String city) {
public R<List<LandLonLatDto>> getLandListing(String city) {
return R.ok(mapService.getLandListing(city), "查询成功");
}
@ -107,7 +108,7 @@ public class AppletsMapController {
*/
@ApiOperation(value = "获取出让地块数据", notes = "获取出让地块数据")
@GetMapping("getLandList")
public R<List<Map<String, String>>> getLandList(@RequestParam String start, @RequestParam String end,String city) {
public R<List<LandLonLatDto>> getLandList(@RequestParam String start, @RequestParam String end,String city) {
return R.ok(mapService.getLandList(start, end,city), "查询成功");
}

3
air/src/main/java/com/air/applets/controller/LandListedLonLatController.java

@ -1,5 +1,6 @@
package com.air.applets.controller;
import com.air.applets.dto.LandLonLatDto;
import com.air.land.entity.LandListedLonLat;
import com.air.land.service.LandListedLonLatService;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@ -36,7 +37,7 @@ public class LandListedLonLatController {
*/
@ApiOperation(value = "通过公告序号经纬度列表查询", notes = "通过公告序号经纬度列表查询")
@GetMapping("/list/{landListedId}")
public R<List<LandListedLonLat>> getLandListedLonLat(@PathVariable String landListedId) {
public R<List<LandLonLatDto>> getLandListedLonLat(@PathVariable String landListedId) {
return R.ok(landListedLonLatService.getLandListedLonLat(landListedId), "查询成功");
}
}

3
air/src/main/java/com/air/applets/controller/LandToListLonLatController.java

@ -1,5 +1,6 @@
package com.air.applets.controller;
import com.air.applets.dto.LandLonLatDto;
import com.air.land.entity.LandToListLonLat;
import com.air.land.service.LandToListLonLatService;
import com.cinderella.framework.common.core.util.R;
@ -35,7 +36,7 @@ public class LandToListLonLatController {
*/
@ApiOperation(value = "通过拟公告序号经纬度列表查询", notes = "通过拟公告序号经纬度列表查询")
@GetMapping("/list/{proposedseriaId}")
public R<List<LandToListLonLat>> getLandListedLonLatPage(@PathVariable String proposedseriaId) {
public R<List<LandLonLatDto>> getLandListedLonLatPage(@PathVariable String proposedseriaId) {
return R.ok(landToListLonLatService.getLandToListLonLat(proposedseriaId), "查询成功");
}
}

70
air/src/main/java/com/air/applets/convert/LandLonLatConvert.java

@ -0,0 +1,70 @@
package com.air.applets.convert;
import cn.hutool.core.collection.CollectionUtil;
import com.air.applets.dto.CoordinatePoint;
import com.air.applets.dto.Feature;
import com.air.applets.dto.LandLonLatDto;
import com.air.applets.dto.LandProperties;
import com.air.applets.entity.CityAreaLonLatBase;
import com.air.entity.PolygonGeom;
import com.air.land.entity.LandListedLonLat;
import com.air.utils.GeomUtils;
import java.util.ArrayList;
import java.util.List;
/**
* 地块经纬度转换
*
* @author peihao
* @date 2021-09-16
**/
public class LandLonLatConvert {
public static List<LandLonLatDto> getCityAreaLonLat(List<CityAreaLonLatBase> list, Integer id){
if (CollectionUtil.isEmpty(list)){
return null;
}
List<LandLonLatDto> landLonLatDtos = new ArrayList<>();
list.forEach(e ->{
LandLonLatDto landLonLatDto = new LandLonLatDto();
CoordinatePoint coordinatePoint = GeomUtils.lonLatConvertPoint(e.getPos());
PolygonGeom polygonGeom = GeomUtils.computeGemo(coordinatePoint.getPolygonPoints(), e.getLineColor()
, e.getLineOpaqueness(), e.getLineWidth(), e.getFillColor(), e.getFillOpaqueness());
polygonGeom.setId(id);
landLonLatDto.setPolygon(polygonGeom);
landLonLatDtos.add(landLonLatDto);
});
return landLonLatDtos;
}
public static List<LandLonLatDto> getLandLonLatDto(List<LandListedLonLat> landList, Integer id){
if (CollectionUtil.isEmpty(landList)){
return null;
}
List<LandLonLatDto> landLonLatDtos = new ArrayList<>();
landList.forEach(e ->{
LandLonLatDto landLonLatDto = new LandLonLatDto();
Feature feature = new Feature();
LandProperties landProperties = new LandProperties();
landProperties.setLatId(e.getLatId());
landProperties.setLandId(e.getLandListedId());
feature.setProperties(landProperties);
feature.setId(id);
CoordinatePoint coordinatePoint = GeomUtils.lonLatConvertPoint(e.getLandLonLat());
feature.setCoordinates(coordinatePoint.getCoordinates());
landLonLatDto.setFeature(feature);
landLonLatDto.setCenterPoint(coordinatePoint.getCenPoint());
PolygonGeom polygonGeom = GeomUtils.computeGemo(coordinatePoint.getPolygonPoints(), e.getLineColor(), Integer.valueOf(e.getLineOpaqueness()),
Integer.valueOf(e.getLineWidth()), e.getFillColor(), Integer.valueOf(e.getFillOpaqueness()));
polygonGeom.setId(id);
landLonLatDto.setPolygon(polygonGeom);
landLonLatDtos.add(landLonLatDto);
});
return landLonLatDtos;
}
}

21
air/src/main/java/com/air/applets/dto/CoordinatePoint.java

@ -0,0 +1,21 @@
package com.air.applets.dto;
import com.air.entity.PolygonPoint;
import lombok.Data;
import java.util.List;
/**
* @author peihao
* @date 2021-09-15
**/
@Data
public class CoordinatePoint {
private List<PolygonPoint> polygonPoints;
private List<List<Double>> coordinates;
private List<Double> cenPoint;
}

23
air/src/main/java/com/air/applets/dto/Feature.java

@ -0,0 +1,23 @@
package com.air.applets.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author peihao
* @date 2021-09-15
**/
@Data
public class Feature {
@ApiModelProperty(value = "地块,经纬度信息")
private LandProperties properties;
@ApiModelProperty(value = "坐标点")
private List<List<Double>> coordinates;
@ApiModelProperty(value = "id")
private Integer id;
}

27
air/src/main/java/com/air/applets/dto/LandLonLatDto.java

@ -0,0 +1,27 @@
package com.air.applets.dto;
import com.air.entity.PolygonGeom;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* 小程序土地地块经纬度
*
* @author peihao
* @date 2021-09-15
**/
@ApiModel
@Data
public class LandLonLatDto {
@ApiModelProperty(value = "图形坐标颜色等信息")
private PolygonGeom polygon;
@ApiModelProperty(value = "中间点位")
private List<Double> centerPoint;
@ApiModelProperty(value = "图形坐标颜色等信息")
private Feature feature;
}

21
air/src/main/java/com/air/applets/dto/LandProperties.java

@ -0,0 +1,21 @@
package com.air.applets.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 地块经纬度信息
*
* @author peihao
* @date 2021-09-15
**/
@ApiModel
@Data
public class LandProperties {
@ApiModelProperty(value = "地块id")
private String landId;
@ApiModelProperty(value = "经纬度id")
private Long latId;
}

40
air/src/main/java/com/air/applets/entity/CityAreaLonLatBase.java

@ -0,0 +1,40 @@
package com.air.applets.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 行政区大组团小组团环线通用
*
* @author peihao
* @date 2021-09-15
**/
@ApiModel
@Data
public class CityAreaLonLatBase {
@ApiModelProperty(value="")
private Integer id;
@ApiModelProperty(value="")
private String name;
@ApiModelProperty(value="")
private String pos;
@ApiModelProperty(value="")
private Integer lineWidth;
@ApiModelProperty(value="")
private String lineColor;
@ApiModelProperty(value="")
private Integer lineOpaqueness;
@ApiModelProperty(value="")
private String fillColor;
@ApiModelProperty(value="")
private Integer fillOpaqueness;
@ApiModelProperty(value="")
private Integer attr;
@ApiModelProperty(value="")
private String comment;
@ApiModelProperty(value="")
private String geom;
@ApiModelProperty(value = "城市")
private String city;
}

5
air/src/main/java/com/air/applets/entity/Dazutuan.java

@ -46,11 +46,6 @@ public class Dazutuan extends Model<Dazutuan> {
private Integer attr;
@ApiModelProperty(value="")
private String comment;
@ApiModelProperty(value="")
private String geom;
@ApiModelProperty(value = "城市")
private String city;
@TableField(exist = false)
@ApiModelProperty(value="")
private String geoms;
}

7
air/src/main/java/com/air/applets/entity/Huanxian.java

@ -46,12 +46,7 @@ public class Huanxian extends Model<Huanxian> {
private Integer attr;
@ApiModelProperty(value="")
private String comment;
@ApiModelProperty(value="")
private String geom;
@ApiModelProperty(value = "城市")
private String city;
@TableField(exist = false)
@ApiModelProperty(value="")
private String geoms;
}

2
air/src/main/java/com/air/applets/entity/Xiaozutuan.java

@ -45,8 +45,6 @@ public class Xiaozutuan extends Model<Xiaozutuan> {
private Integer attr;
@ApiModelProperty(value="")
private String comment;
@ApiModelProperty(value="")
private String geom;
@ApiModelProperty(value = "城市")
private String city;

7
air/src/main/java/com/air/applets/entity/Xingzhengqu.java

@ -48,12 +48,7 @@ public class Xingzhengqu extends Model<Xingzhengqu> {
private Double attr;
@ApiModelProperty(value="")
private String comment;
@ApiModelProperty(value="")
private String geom;
@ApiModelProperty(value = "城市")
private String city;
@TableField(exist = false)
@ApiModelProperty(value="")
private String geoms;
}

12
air/src/main/java/com/air/applets/mapper/AppletsMapMapper.java

@ -23,7 +23,7 @@ public interface AppletsMapMapper{
* @date 2021/6/7
* @return
**/
List<Map<String,String>> getRegionByLocation(@Param("city") String city);
List<CityAreaLonLatBase> getRegionByLocation(@Param("city") String city);
/**
* 根据定位经纬度范围行政区数据
@ -43,7 +43,7 @@ public interface AppletsMapMapper{
* @date 2021/6/7
* @return
**/
List<Map<String, String>> getTypeRegionByLocation(@Param("type") String type,@Param("city") String city);
List<CityAreaLonLatBase> getTypeRegionByLocation(@Param("type") String type,@Param("city") String city);
/**
* 获取环线数据
@ -51,7 +51,7 @@ public interface AppletsMapMapper{
* @date 2021/6/7
* @return
**/
List<Map<String, String>> getLoopLine(@Param("city") String city);
List<CityAreaLonLatBase> getLoopLine(@Param("city") String city);
/**
* 获取拟挂牌地块数据
@ -59,7 +59,7 @@ public interface AppletsMapMapper{
* @date 2021/6/7
* @return
**/
List<Map<String, String>> getLandToList(@Param("city") String city);
List<LandListedLonLat> getLandToList(@Param("city") String city);
/**
* 获取挂牌中数据
@ -69,7 +69,7 @@ public interface AppletsMapMapper{
* @date 2021/6/7
* @return
**/
List<Map<String, String>> getLandListing(@Param("nowDate")String nowDate,@Param("city")String city);
List<LandListedLonLat> getLandListing(@Param("nowDate")String nowDate,@Param("city")String city);
/**
* 获取出让地块数据
@ -80,7 +80,7 @@ public interface AppletsMapMapper{
* @date 2021/6/7
* @return
**/
List<Map<String, String>> getLandList(@Param("start") String start , @Param("end") String end,@Param("nowDate") String nowDate,@Param("city")String city);
List<LandListedLonLat> getLandList(@Param("start") String start , @Param("end") String end,@Param("nowDate") String nowDate,@Param("city")String city);
List<Xingzhengqu> getXingzhengqu();

13
air/src/main/java/com/air/applets/serivce/AppletsMapService.java

@ -1,5 +1,6 @@
package com.air.applets.serivce;
import com.air.applets.dto.LandLonLatDto;
import com.air.applets.entity.*;
import com.air.land.entity.LandListedLonLat;
import com.air.land.entity.LandToListLonLat;
@ -23,7 +24,7 @@ public interface AppletsMapService{
* @date 2021/6/7
* @return
**/
List<Map<String, String>> getRegionByLocation(String city);
List<LandLonLatDto> getRegionByLocation(String city);
/**
* 根据定位经纬度范围行政区数据
@ -43,7 +44,7 @@ public interface AppletsMapService{
* @date 2021/6/7
* @return
**/
List<Map<String, String>> getTypeRegionByLocation(String type,String city);
List<LandLonLatDto> getTypeRegionByLocation(String type,String city);
/**
* 获取环线数据
@ -51,7 +52,7 @@ public interface AppletsMapService{
* @date 2021/6/7
* @return
**/
List<Map<String, String>> getLoopLine(String city);
List<LandLonLatDto> getLoopLine(String city);
/**
* 获取拟挂牌地块数据
@ -59,7 +60,7 @@ public interface AppletsMapService{
* @date 2021/6/7
* @return
**/
List<Map<String, String>> getLandToList(String city);
List<LandLonLatDto> getLandToList(String city);
/**
* 获取挂牌中数据
@ -67,7 +68,7 @@ public interface AppletsMapService{
* @date 2021/6/7
* @return
**/
List<Map<String, String>> getLandListing(String city);
List<LandLonLatDto> getLandListing(String city);
/**
* 获取出让地块数据
@ -77,7 +78,7 @@ public interface AppletsMapService{
* @date 2021/6/7
* @return
**/
List<Map<String, String>> getLandList(String start , String end,String city);
List<LandLonLatDto> getLandList(String start , String end,String city);
/**
* 设置行政区环线大组团小组团经纬度

45
air/src/main/java/com/air/applets/serivce/impl/AppletsMapServiceImpl.java

@ -1,17 +1,26 @@
package com.air.applets.serivce.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.air.applets.convert.LandLonLatConvert;
import com.air.applets.dto.CoordinatePoint;
import com.air.applets.dto.Feature;
import com.air.applets.dto.LandLonLatDto;
import com.air.applets.dto.LandProperties;
import com.air.applets.entity.*;
import com.air.applets.mapper.AppletsMapMapper;
import com.air.applets.serivce.AppletsMapService;
import com.air.entity.PolygonGeom;
import com.air.land.entity.LandListedLonLat;
import com.air.land.entity.LandToListLonLat;
import com.air.utils.GeomUtils;
import com.air.utils.WgsUtil;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -23,8 +32,9 @@ public class AppletsMapServiceImpl implements AppletsMapService {
private AppletsMapMapper mapMapper;
@Override
public List<Map<String, String>> getRegionByLocation(String city) {
return mapMapper.getRegionByLocation(city);
public List<LandLonLatDto> getRegionByLocation(String city) {
List<CityAreaLonLatBase> list = mapMapper.getRegionByLocation(city);
return LandLonLatConvert.getCityAreaLonLat(list,4);
}
@Override
@ -33,28 +43,39 @@ public class AppletsMapServiceImpl implements AppletsMapService {
}
@Override
public List<Map<String, String>> getTypeRegionByLocation(String type,String city) {
return mapMapper.getTypeRegionByLocation(type,city);
public List<LandLonLatDto> getTypeRegionByLocation(String type,String city) {
List<CityAreaLonLatBase> list = mapMapper.getTypeRegionByLocation(type, city);
int id = 0;
if ("dazutuan".equals(type)){
id = 5;
}else if ("xiaozutuan".equals(type)){
id = 6;
}
return LandLonLatConvert.getCityAreaLonLat(list,id);
}
@Override
public List<Map<String, String>> getLoopLine(String city) {
return mapMapper.getLoopLine(city);
public List<LandLonLatDto> getLoopLine(String city) {
List<CityAreaLonLatBase> huanxians = mapMapper.getLoopLine(city);
return LandLonLatConvert.getCityAreaLonLat(huanxians,8);
}
@Override
public List<Map<String, String>> getLandToList(String city) {
return mapMapper.getLandToList(city);
public List<LandLonLatDto> getLandToList(String city) {
List<LandListedLonLat> landToList = mapMapper.getLandToList(city);
return LandLonLatConvert.getLandLonLatDto(landToList,3);
}
@Override
public List<Map<String, String>> getLandListing(String city) {
return mapMapper.getLandListing(DateUtil.formatDate(new Date()),city);
public List<LandLonLatDto> getLandListing(String city) {
List<LandListedLonLat> landListing = mapMapper.getLandListing(DateUtil.formatDate(new Date()), city);
return LandLonLatConvert.getLandLonLatDto(landListing,2);
}
@Override
public List<Map<String, String>> getLandList(String start , String end,String city) {
return mapMapper.getLandList(start,end,DateUtil.formatDate(new Date()),city);
public List<LandLonLatDto> getLandList(String start , String end,String city) {
List<LandListedLonLat> list = mapMapper.getLandList(start, end, DateUtil.formatDate(new Date()), city);
return LandLonLatConvert.getLandLonLatDto(list,1);
}
@Override

32
air/src/main/java/com/air/entity/PolygonGeom.java

@ -0,0 +1,32 @@
package com.air.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* 小程序坐标渲染对象
*
* @author peihao
* @date 2021-09-15
**/
@ApiModel("小程序坐标渲染对象")
@Data
public class PolygonGeom {
@ApiModelProperty(value = "填充颜色")
private String fillColor;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "线条颜色")
private String strokeColor;
@ApiModelProperty(value = "线条宽度")
private Integer strokeWidth;
@ApiModelProperty(value = "层级(默认1)")
private int zIndex = 1;
@ApiModelProperty(value = "坐标点位")
private List<PolygonPoint> points;
}

14
air/src/main/java/com/air/entity/LocateInfo.java → air/src/main/java/com/air/entity/PolygonPoint.java

@ -5,21 +5,17 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 定位信息
* 坐标点位
*
* @author peihao
* @date 2021-07-19
* @date 2021-09-15
**/
@ApiModel(value = "坐标点位")
@Data
@ApiModel
public class LocateInfo {
public class PolygonPoint {
@ApiModelProperty(value = "经度")
private double longitude;
@ApiModelProperty(value = "纬度")
private double Latitude;
@ApiModelProperty(value = "")
private boolean isChina;
private double latitude;
}

10
air/src/main/java/com/air/land/controller/LandListedLonLatController.java

@ -72,7 +72,7 @@ public class LandListedLonLatController {
landListedLonLat.setLandLonLat(new StringBuffer(landLonLat).append(";").append(split[0]).toString());
}
//转换经纬度标准格式
landListedLonLat.setGeom(WgsUtil.wgs84_To_Gcj02(landListedLonLat.getLandLonLat()));
landListedLonLat.setLandLonLat(WgsUtil.wgs84_To_Gcj02(landListedLonLat.getLandLonLat()));
return R.ok(landListedLonLatService.save(landListedLonLat), "保存成功");
}
@ -91,7 +91,7 @@ public class LandListedLonLatController {
LandListedLonLat landListedLonLat = new LandListedLonLat();
BeanUtil.copyProperties(landListedLonLatVo, landListedLonLat);
//转换经纬度标准格式
landListedLonLat.setGeom(null);
landListedLonLat.setLandLonLat(null);
landListedLonLatService.update(landListedLonLat, Wrappers.<LandListedLonLat>query().lambda()
.eq(LandListedLonLat::getLatId, landListedLonLatVo.getLatId()));
return R.ok("修改成功");
@ -129,14 +129,14 @@ public class LandListedLonLatController {
@ApiOperation(value = "经纬度转换(wgs84_To_Gcj02)", notes = "经纬度转换(wgs84_To_Gcj02)")
@GetMapping("/landListLonLatConversion")
public R<Boolean> landListLonLatConversion() {
List<LandListedLonLat> list = landListedLonLatService.list(Wrappers.<LandListedLonLat>query()
.lambda().isNull(LandListedLonLat::getGeom));
List<LandListedLonLat> list = landListedLonLatService.list();
if (CollectionUtil.isNotEmpty(list)){
list.forEach(landListedLonLat -> {
if(StrUtil.isNotEmpty(landListedLonLat.getLandLonLat())){
try{
String[] split = landListedLonLat.getLandLonLat().split(";");
landListedLonLat.setLandLonLat(new StringBuffer(landListedLonLat.getLandLonLat()).append(";").append(split[0]).toString());
String lonlat = new StringBuffer(landListedLonLat.getLandLonLat()).append(";").append(split[0]).toString();
landListedLonLat.setLandLonLat(lonlat);
}catch (Exception e){
log.error(landListedLonLat.getLandListedId()+"已挂牌经纬度转换出错!",e);
}

7
air/src/main/java/com/air/land/controller/LandToListLonLatController.java

@ -73,7 +73,7 @@ public class LandToListLonLatController {
landToListLonLat.setLandLonLat(new StringBuffer(landLonLat).append(";").append(split[0]).toString());
}
//转换经纬度标准格式
landToListLonLat.setGeom(WgsUtil.wgs84_To_Gcj02(landToListLonLat.getLandLonLat()));
landToListLonLat.setLandLonLat(WgsUtil.wgs84_To_Gcj02(landToListLonLat.getLandLonLat()));
return R.ok(landToListLonLatService.save(landToListLonLat), "保存成功");
}
@ -89,7 +89,7 @@ public class LandToListLonLatController {
LandToListLonLat landToListLonLat = new LandToListLonLat();
BeanUtil.copyProperties(landToListLonLatVo, landToListLonLat);
//转换经纬度标准格式
landToListLonLat.setGeom(null);
landToListLonLat.setLandLonLat(null);
landToListLonLatService.update(landToListLonLat, Wrappers.<LandToListLonLat>query().lambda()
.eq(LandToListLonLat::getLatId, landToListLonLatVo.getLatId()));
return R.ok("修改成功");
@ -127,8 +127,7 @@ public class LandToListLonLatController {
@ApiOperation(value = "经纬度转换(wgs84_To_Gcj02)", notes = "经纬度转换(wgs84_To_Gcj02)")
@GetMapping("/landToListLonLatConversion")
public R<Boolean> landToListLonLatConversion() {
List<LandToListLonLat> list = landToListLonLatService.list(Wrappers.<LandToListLonLat>query()
.lambda().isNull(LandToListLonLat::getGeom));
List<LandToListLonLat> list = landToListLonLatService.list();
if (CollectionUtil.isNotEmpty(list)){
list.forEach(landToListLonLat -> {
if(StrUtil.isNotEmpty(landToListLonLat.getLandLonLat())){

11
air/src/main/java/com/air/land/entity/LandListedLonLat.java

@ -81,15 +81,8 @@ public class LandListedLonLat extends Model<LandListedLonLat> {
private String remark;
@TableField(exist = false)
@ApiModelProperty(value = "空间坐标point")
private String centerPoint;
@ApiModelProperty(value = "空间坐标")
private String geom;
@TableField(exist = false)
@ApiModelProperty(value = "空间中标s")
private String geoms;
@ApiModelProperty(value = "坐标渲染对象")
private String polygons;
@TableField(exist = false)
@ApiModelProperty(value = "交易状态")

11
air/src/main/java/com/air/land/entity/LandToListLonLat.java

@ -76,15 +76,4 @@ public class LandToListLonLat extends Model<LandToListLonLat> {
@ApiModelProperty(value = "备注")
private String remark;
@TableField(exist = false)
@ApiModelProperty(value = "空间坐标point")
private String centerPoint;
@ApiModelProperty(value = "空间坐标")
private String geom;
@TableField(exist = false)
@ApiModelProperty(value = "空间中标s")
private String geoms;
}

2
air/src/main/java/com/air/land/mapper/LandToListLonLatMapper.java

@ -17,5 +17,5 @@ public interface LandToListLonLatMapper extends BaseMapper<LandToListLonLat> {
int insert(LandToListLonLat landListedLonLat);
List<LandToListLonLat> getLandToListLonLat(@Param("proposedseriaId") String proposedseriaId);
List<LandListedLonLat> getLandToListLonLat(@Param("proposedseriaId") String proposedseriaId);
}

3
air/src/main/java/com/air/land/service/LandListedLonLatService.java

@ -1,5 +1,6 @@
package com.air.land.service;
import com.air.applets.dto.LandLonLatDto;
import com.air.land.entity.LandListedLonLat;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;
@ -16,6 +17,6 @@ public interface LandListedLonLatService extends IService<LandListedLonLat> {
boolean importLandListedLonLatExcel(MultipartFile file,String landListedId);
List<LandListedLonLat> getLandListedLonLat(String landListedId);
List<LandLonLatDto> getLandListedLonLat(String landListedId);
}

3
air/src/main/java/com/air/land/service/LandToListLonLatService.java

@ -1,5 +1,6 @@
package com.air.land.service;
import com.air.applets.dto.LandLonLatDto;
import com.air.land.entity.LandToListLonLat;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;
@ -16,5 +17,5 @@ public interface LandToListLonLatService extends IService<LandToListLonLat> {
boolean importLandToListedLonLatExcel(MultipartFile file,String proposedseriaId);
List<LandToListLonLat> getLandToListLonLat(String proposedseriaId);
List<LandLonLatDto> getLandToListLonLat(String proposedseriaId);
}

9
air/src/main/java/com/air/land/service/impl/LandListedLonLatServiceImpl.java

@ -3,6 +3,8 @@ package com.air.land.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.air.applets.convert.LandLonLatConvert;
import com.air.applets.dto.LandLonLatDto;
import com.air.land.entity.LandListed;
import com.air.land.entity.LandListedLonLat;
import com.air.land.entity.LandToListLonLat;
@ -45,8 +47,9 @@ public class LandListedLonLatServiceImpl extends ServiceImpl<LandListedLonLatMap
}
@Override
public List<LandListedLonLat> getLandListedLonLat(String landListedId) {
return baseMapper.getLandListedLonLat(landListedId);
public List<LandLonLatDto> getLandListedLonLat(String landListedId) {
List<LandListedLonLat> list = baseMapper.getLandListedLonLat(landListedId);
return LandLonLatConvert.getLandLonLatDto(list,2);
}
private List<LandListedLonLat> listToEntity(List<List<String>> dataList,String landListedId) {
@ -67,7 +70,7 @@ public class LandListedLonLatServiceImpl extends ServiceImpl<LandListedLonLatMap
String[] split = landLonLat.split(";");
landListedLonLat.setLandLonLat(new StringBuffer(landLonLat).append(";").append(split[0]).toString());
}
landListedLonLat.setGeom(WgsUtil.wgs84_To_Gcj02(landListedLonLat.getLandLonLat()));
landListedLonLat.setLandLonLat(WgsUtil.wgs84_To_Gcj02(landListedLonLat.getLandLonLat()));
} catch (Exception e) {
e.printStackTrace();
throw new BusinessException("导入拟挂牌经纬度数据转换出错");

10
air/src/main/java/com/air/land/service/impl/LandToListLonLatServiceImpl.java

@ -3,6 +3,9 @@ package com.air.land.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.air.applets.convert.LandLonLatConvert;
import com.air.applets.dto.LandLonLatDto;
import com.air.land.entity.LandListedLonLat;
import com.air.land.entity.LandToListLonLat;
import com.air.land.mapper.LandToListLonLatMapper;
import com.air.land.service.LandToListLonLatService;
@ -42,8 +45,9 @@ public class LandToListLonLatServiceImpl extends ServiceImpl<LandToListLonLatMap
}
@Override
public List<LandToListLonLat> getLandToListLonLat(String proposedseriaId) {
return baseMapper.getLandToListLonLat(proposedseriaId);
public List<LandLonLatDto> getLandToListLonLat(String proposedseriaId) {
List<LandListedLonLat> list = baseMapper.getLandToListLonLat(proposedseriaId);
return LandLonLatConvert.getLandLonLatDto(list,3);
}
private List<LandToListLonLat> listToEntity(List<List<String>> dataList,String proposedseriaId) {
@ -64,7 +68,7 @@ public class LandToListLonLatServiceImpl extends ServiceImpl<LandToListLonLatMap
String[] split = landLonLat.split(";");
landToListLonLat.setLandLonLat(new StringBuffer(landLonLat).append(";").append(split[0]).toString());
}
landToListLonLat.setGeom(WgsUtil.wgs84_To_Gcj02(landToListLonLat.getLandLonLat()));
landToListLonLat.setLandLonLat(WgsUtil.wgs84_To_Gcj02(landToListLonLat.getLandLonLat()));
} catch (Exception e) {
e.printStackTrace();
throw new BusinessException("导入拟挂牌经纬度数据转换出错");

2
air/src/main/java/com/air/land/service/impl/LandToListSendServiceImpl.java

@ -131,7 +131,7 @@ public class LandToListSendServiceImpl implements LandToListSendService {
BeanUtil.copyProperties(landToListLonLat, landListedLonLat);
landListedLonLat.setLandListedId(landListedId);
//转换经纬度标准格式
landListedLonLat.setGeom(WgsUtil.wgs84_To_Gcj02(landToListLonLat.getLandLonLat()));
landListedLonLat.setLandLonLat(WgsUtil.wgs84_To_Gcj02(landToListLonLat.getLandLonLat()));
landListedLonLats.add(landListedLonLat);
});
return listedLonLatService.saveBatch(landListedLonLats);

2
air/src/main/java/com/air/land/vo/LandListedLonLatVo.java

@ -31,7 +31,7 @@ public class LandListedLonLatVo {
@ApiModelProperty(value = "地块编号", required = true)
private String landCode;
@ApiModelProperty(value = "地块经纬度")
@ApiModelProperty(value = "地块经纬度(gcj02)")
private String landLonLat;
@ApiModelProperty(value = "线条宽度")

2
air/src/main/java/com/air/land/vo/LandToListLonLatVo.java

@ -30,7 +30,7 @@ public class LandToListLonLatVo {
@ApiModelProperty(value = "公告对应的地块名称")
private String name;
@ApiModelProperty(value = "地块经纬度")
@ApiModelProperty(value = "地块经纬度(gcj02)")
private String landLonLat;
@ApiModelProperty(value = "线条宽度")

1
air/src/main/java/com/air/sysMessage/controller/SysMessageController.java

@ -40,7 +40,6 @@ public class SysMessageController {
public R getSysMessagePage(QueryPage page, String messageType) {
Page<SysMessage> result = sysMessageService.page(page.toPage(), Wrappers.<SysMessage>query().lambda()
.eq(StrUtil.isNotEmpty(messageType),SysMessage::getMessageType, messageType)
.eq(SysMessage::getStatusCd, SysMessageStatusEnum.SYS_MESSAGE_STATUS_1000.getCode())
.orderByDesc(SysMessage::getCreateDate));
return R.ok(result);
}

69
air/src/main/java/com/air/utils/GeomUtils.java

@ -0,0 +1,69 @@
package com.air.utils;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.air.applets.dto.CoordinatePoint;
import com.air.entity.PolygonGeom;
import com.air.entity.PolygonPoint;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author peihao
* @date 2021-09-14
**/
public class GeomUtils {
public static PolygonGeom computeGemo(List<PolygonPoint> polygonPoints,String lineColor,Integer lineOpaqueness,Integer lineWidth,String fillColor,Integer fillOpaqueness){
PolygonGeom polygonGeom = new PolygonGeom();
polygonGeom.setStrokeColor(computeColor(lineColor,lineOpaqueness));
polygonGeom.setFillColor(computeColor(fillColor,fillOpaqueness));
polygonGeom.setStrokeWidth(Integer.valueOf(lineWidth));
polygonGeom.setPoints(polygonPoints);
return polygonGeom;
}
public static CoordinatePoint lonLatConvertPoint(String lonLat){
List<String> lonLatList = Arrays.asList(lonLat.split(";"));
CoordinatePoint coordinatePoint = new CoordinatePoint();
//绘图经纬度
List<PolygonPoint> polygonPoints = new ArrayList<>();
//坐标数组
List<List<Double>> coordinates = new ArrayList<>();
//导航中间点
List<Double> cenPoint = new ArrayList<>(2);
for (int i = 0;i<lonLatList.size();i++){
String[] lntlat = lonLatList.get(i).split(",");
double lon = Double.parseDouble(lntlat[0]);
double lat = Double.parseDouble(lntlat[1]);
if (i == 0){
cenPoint.add(lon);
cenPoint.add(lat);
}
PolygonPoint point = new PolygonPoint();
point.setLongitude(lon);
point.setLatitude(lat);
List<Double> coordinate = new ArrayList<>();
coordinate.add(lon);
coordinate.add(lat);
polygonPoints.add(point);
coordinates.add(coordinate);
}
coordinatePoint.setCoordinates(coordinates);
coordinatePoint.setPolygonPoints(polygonPoints);
coordinatePoint.setCenPoint(cenPoint);
return coordinatePoint;
}
public static String computeColor(String color,Integer opaqueness){
if (StrUtil.isEmpty(color) || opaqueness == null){
return null;
}
String hex = Integer.toHexString(opaqueness);
return color+hex;
}
}

66
air/src/main/java/com/air/utils/WgsUtil.java

@ -1,17 +1,14 @@
package com.air.utils;
import com.air.entity.LocateInfo;
import com.air.land.entity.LandListedLonLat;
import com.cinderella.framework.common.core.exception.BusinessException;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.geom.Polygon;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.air.entity.PolygonPoint;
import com.vividsolutions.jts.geom.*;
import lombok.extern.slf4j.Slf4j;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.awt.geom.Point2D;
import java.math.BigDecimal;
import java.util.*;
/**
* 地图转换工具
@ -29,10 +26,15 @@ public class WgsUtil {
public static GeometryFactory geometryFactory = new GeometryFactory();
public static LocateInfo wgs84_To_Gcj02(double lat, double lon) {
LocateInfo info = new LocateInfo();
/**
* 平均半径,单位m
**/
private static final double EARTH_RADIUS = 6371393;
public static PolygonPoint wgs84_To_Gcj02(double lat, double lon) {
PolygonPoint info = new PolygonPoint();
if (outOfChina(lat, lon)) {
info.setChina(false);
//info.setChina(false);
info.setLatitude(lat);
info.setLongitude(lon);
} else {
@ -46,19 +48,19 @@ public class WgsUtil {
dLon = (dLon * 180.0) / (a / sqrtMagic * Math.cos(radLat) * pi);
double mgLat = lat + dLat;
double mgLon = lon + dLon;
info.setChina(true);
//info.setChina(true);
info.setLatitude(mgLat);
info.setLongitude(mgLon);
}
return info;
}
public static LocateInfo gcj02_To_Wgs84(double lat, double lon) {
LocateInfo info = new LocateInfo();
LocateInfo gps = transform(lat, lon);
public static PolygonPoint gcj02_To_Wgs84(double lat, double lon) {
PolygonPoint info = new PolygonPoint();
PolygonPoint gps = transform(lat, lon);
double lontitude = lon * 2 - gps.getLongitude();
double latitude = lat * 2 - gps.getLatitude();
info.setChina(gps.isChina());
//info.setChina(gps.isChina());
info.setLatitude(latitude);
info.setLongitude(lontitude);
return info;
@ -90,10 +92,10 @@ public class WgsUtil {
return ret;
}
private static LocateInfo transform(double lat, double lon) {
LocateInfo info = new LocateInfo();
private static PolygonPoint transform(double lat, double lon) {
PolygonPoint info = new PolygonPoint();
if (outOfChina(lat, lon)) {
info.setChina(false);
//info.setChina(false);
info.setLatitude(lat);
info.setLongitude(lon);
return info;
@ -108,7 +110,7 @@ public class WgsUtil {
dLon = (dLon * 180.0) / (a / sqrtMagic * Math.cos(radLat) * pi);
double mgLat = lat + dLat;
double mgLon = lon + dLon;
info.setChina(true);
//info.setChina(true);
info.setLatitude(mgLat);
info.setLongitude(mgLon);
@ -118,17 +120,19 @@ public class WgsUtil {
public static String wgs84_To_Gcj02(String lonLat) {
try {
List<String> lonLatList = Arrays.asList(lonLat.split(";"));
List<Coordinate> coordinates = new ArrayList<>();
lonLatList.forEach(lonLatVo -> {
String[] lntlat = lonLatVo.split(",");
StringBuffer polygon = new StringBuffer();
for(int i = 0;i<lonLatList.size();i++){
String[] lntlat = lonLatList.get(i).split(",");
Double lnt = Double.parseDouble(lntlat[0]);
Double lat = Double.parseDouble(lntlat[1]);
LocateInfo locateInfo = wgs84_To_Gcj02(lat, lnt);
Coordinate coordinate = new Coordinate(locateInfo.getLongitude(), locateInfo.getLatitude());
coordinates.add(coordinate);
});
Coordinate[] coordinatesArray = new Coordinate[coordinates.size()];
Geometry polygon = geometryFactory.createPolygon(coordinates.toArray(coordinatesArray));
PolygonPoint point = wgs84_To_Gcj02(lat, lnt);
polygon.append(point.getLongitude());
polygon.append(",");
polygon.append(point.getLatitude());
if (i != lonLatList.size()-1){
polygon.append(";");
}
}
return polygon.toString();
} catch (Exception e) {
log.error("数据坐标转换异常",e);

67
air/src/main/resources/mapper/AppletsMapMapper.xml

@ -5,8 +5,8 @@
<mapper namespace="com.air.applets.mapper.AppletsMapMapper">
<select id="getRegionByLocation" resultType="java.util.Map">
select *,st_astext(geom) as geoms from xingzhengqu
<select id="getRegionByLocation" resultType="com.air.applets.entity.CityAreaLonLatBase">
select * from xingzhengqu
<where>
<if test="city != null and city != ''">
city = #{city}
@ -26,8 +26,8 @@
ST_SRID ( geom, 4326 )) &lt; #{ radius}
</select>
<select id="getTypeRegionByLocation" resultType="java.util.Map">
select *,st_astext(geom) as geoms from ${type}
<select id="getTypeRegionByLocation" resultType="com.air.applets.entity.CityAreaLonLatBase">
select * from ${type}
<where>
<if test="city != null and city != ''">
city = #{city}
@ -35,8 +35,8 @@
</where>
</select>
<select id="getLoopLine" resultType="java.util.Map">
select *,st_astext(geom) as geoms from huanxian
<select id="getLoopLine" resultType="com.air.applets.entity.CityAreaLonLatBase">
select * from huanxian
<where>
<if test="city != null and city != ''">
city = #{city}
@ -44,53 +44,54 @@
</where>
</select>
<select id="getLandToList" resultType="java.util.Map">
<select id="getLandToList" resultType="com.air.land.entity.LandListedLonLat">
SELECT
*,st_astext(st_centroid(geom)) as centerPoint,st_astext(geom) as geoms
lat_id,
proposedseria_id landListedId,
land_code,
name,
land_lon_lat,
line_width,
line_color,
line_opaqueness,
fill_color,
fill_opaqueness
from
land_to_list_lon_lat
where
geom is not null
<if test="city != null and city != ''">
and city = #{city}
</if>
<where>
<if test="city != null and city != ''">
city = #{city}
</if>
</where>
</select>
<select id="getLandListing" resultType="java.util.Map">
<select id="getLandListing" resultType="com.air.land.entity.LandListedLonLat">
SELECT
if(date_format(b.auction_date,'%Y-%m-%d') &lt; #{nowDate},'已出让','挂牌中') transactionStatus,
a.*,
st_astext (
st_centroid ( a.geom )) AS centerPoint,
st_astext ( a.geom ) AS geoms
a.*
FROM
land_listed_lon_lat a
LEFT JOIN land_listed b ON a.land_listed_id = b.land_listed_id
WHERE
geom IS NOT NULL
and date_format(b.auction_date,'%Y-%m-%d') > #{nowDate}
date_format(b.auction_date,'%Y-%m-%d') > #{nowDate}
<if test="city != null and city != ''">
and city = #{city}
and b.city = #{city}
</if>
</select>
<select id="getLandList" resultType="java.util.Map">
<select id="getLandList" resultType="com.air.land.entity.LandListedLonLat">
SELECT
if(date_format(b.auction_date,'%Y-%m-%d') &lt; #{nowDate},'已出让','挂牌中') transactionStatus,
st_astext (
st_centroid ( a.geom )) AS centerPoint,
a.*,
st_astext ( a.geom ) AS geoms
a.*
FROM
land_listed_lon_lat a
JOIN land_listed b ON a.land_listed_id = b.land_listed_id
WHERE
geom IS NOT NULL
and date_format(b.auction_date,'%Y-%m-%d') &lt; #{nowDate}
date_format(b.auction_date,'%Y-%m-%d') &lt; #{nowDate}
and date_format(b.auction_date,'%Y-%m-%d') &lt; #{end}
and date_format(b.auction_date,'%Y-%m-%d') > #{start}
<if test="city != null and city != ''">
and city = #{city}
and b.city = #{city}
</if>
</select>
@ -99,7 +100,7 @@
</select>
<update id="updateXingzhengqu">
update xingzhengqu set geom = ST_GeometryFromText(#{geom}) where gid = #{id}
update xingzhengqu set pos = #{geom} where gid = #{id}
</update>
<select id="getHuanxian" resultType="com.air.applets.entity.Huanxian">
@ -107,7 +108,7 @@
</select>
<update id="updateHuanxian">
update huanxian set geom = ST_GeometryFromText(#{geom}) where id = #{id}
update huanxian set pos = #{geom} where id = #{id}
</update>
<select id="getDazutuan" resultType="com.air.applets.entity.Dazutuan">
@ -115,7 +116,7 @@
</select>
<update id="updateDazutuan">
update dazutuan set geom = ST_GeometryFromText(#{geom}) where id = #{id}
update dazutuan set pos = #{geom} where id = #{id}
</update>
<select id="getXiaozutuan" resultType="com.air.applets.entity.Xiaozutuan">
@ -123,7 +124,7 @@
</select>
<update id="updateXiaozutuan">
update xiaozutuan set geom = ST_GeometryFromText(#{geom}) where id = #{id}
update xiaozutuan set pos = #{geom} where id = #{id}
</update>
</mapper>

10
air/src/main/resources/mapper/LandListedLonLatMapper.xml

@ -28,15 +28,7 @@
ll.line_color,
ll.line_opaqueness,
ll.fill_color,
ll.fill_opaqueness,
ll.status_cd,
ll.status_date,
ll.create_user_id,
ll.create_date,
ll.update_user_id,
ll.update_date,
st_astext ( st_centroid ( geom ) ) centerPoint,
st_astext ( geom ) geom
ll.fill_opaqueness
FROM
land_listed_lon_lat ll
WHERE

14
air/src/main/resources/mapper/LandToListLonLatMapper.xml

@ -16,10 +16,10 @@
)
</insert>
<select id="getLandToListLonLat" resultType="com.air.land.entity.LandToListLonLat">
<select id="getLandToListLonLat" resultType="com.air.land.entity.LandListedLonLat">
SELECT
ll.lat_id,
ll.proposedseria_id,
ll.proposedseria_id landListedId,
ll.land_code,
ll.name,
ll.land_lon_lat,
@ -27,15 +27,7 @@
ll.line_color,
ll.line_opaqueness,
ll.fill_color,
ll.fill_opaqueness,
ll.status_cd,
ll.status_date,
ll.create_user_id,
ll.create_date,
ll.update_user_id,
ll.update_date,
st_astext ( st_centroid ( geom ) ) centerPoint,
st_astext ( geom ) geom
ll.fill_opaqueness
FROM
land_to_list_lon_lat ll
WHERE

Loading…
Cancel
Save