新需求开发
This commit is contained in:
+3
@@ -13,6 +13,8 @@ public class LargeScreenMap {
|
||||
|
||||
private String orgName;
|
||||
|
||||
private String address;
|
||||
|
||||
private String type;
|
||||
|
||||
private String loveNum;
|
||||
@@ -56,6 +58,7 @@ public class LargeScreenMap {
|
||||
this.name = xjAed.getName();
|
||||
this.orgName = xjAed.getOrgCode();
|
||||
this.type = "4";
|
||||
this.address = xjAed.getAddress();
|
||||
this.latitude = String.valueOf(xjAed.getLatitude());
|
||||
this.longitude = String.valueOf(xjAed.getLongitude());
|
||||
this.manageName = xjAed.getManageName();
|
||||
|
||||
+18
-11
@@ -29,7 +29,7 @@ public class XjAedServiceImpl extends ServiceImpl<XjAedMapper, XjAed> implements
|
||||
|
||||
@Override
|
||||
public void aedDataInit() {
|
||||
String filePath = "D:\\Project\\Java\\rk\\文档\\新疆油田-24\\各二级单位坐标位置更正统计9.15(2).xlsx";
|
||||
String filePath = "D:\\Project\\Java\\rk\\文档\\新疆油田-24\\各二级单位坐标位置更正统计9.15.xlsx";
|
||||
|
||||
try (FileInputStream file = new FileInputStream(filePath);
|
||||
XSSFWorkbook workbook = new XSSFWorkbook(file)) {
|
||||
@@ -41,25 +41,32 @@ public class XjAedServiceImpl extends ServiceImpl<XjAedMapper, XjAed> implements
|
||||
for (int i = 2; i <= sheet.getLastRowNum(); i++) {
|
||||
XSSFRow row = sheet.getRow(i);
|
||||
if (row != null) {
|
||||
// 获取第一个单元格(索引0)的数据 设置地点
|
||||
// 获取第一个单元格(索引0)的数据 二级单位名称
|
||||
XSSFCell firstCell = row.getCell(0);
|
||||
String firstCellValue = firstCell != null ? getCellValue(firstCell) : "[空]";
|
||||
|
||||
// 获取第二个单元格(索引1)的数据 经度
|
||||
// 获取第二个单元格(索引1)的数据 三级单位名称
|
||||
XSSFCell secondCell = row.getCell(1);
|
||||
String secondCellValue = secondCell != null ? getCellValue(secondCell) : "[空]";
|
||||
|
||||
// 获取第三个单元格(索引1)的数据 纬度
|
||||
XSSFCell threeCell = row.getCell(2);
|
||||
String threeCellValue = secondCell != null ? getCellValue(threeCell) : "[空]";
|
||||
if (firstCellValue.equals("滴12生活点会议室")){
|
||||
System.out.println(1);
|
||||
}
|
||||
// 获取第七个单元格(索引6)的数据 设置地点
|
||||
XSSFCell sevenCell = row.getCell(6);
|
||||
String sevenCellValue = secondCell != null ? getCellValue(sevenCell) : "[空]";
|
||||
|
||||
// 获取第八个单元格(索引7)的数据 精度
|
||||
XSSFCell eightCell = row.getCell(7);
|
||||
String eightCellValue = secondCell != null ? getCellValue(eightCell) : "[空]";
|
||||
|
||||
// 获取第九个单元格(索引8)的数据 纬度
|
||||
XSSFCell nineCell = row.getCell(8);
|
||||
String nineCellValue = secondCell != null ? getCellValue(nineCell) : "[空]";
|
||||
|
||||
|
||||
XjAed xjAed = new XjAed();
|
||||
xjAed.setName("自动体外除颤仪");
|
||||
xjAed.setAddress(firstCellValue);
|
||||
xjAed.setAddress(firstCellValue+secondCellValue+sevenCellValue);
|
||||
try {
|
||||
String[] split = converter.run(secondCellValue + "-" + threeCellValue).split("-");
|
||||
String[] split = converter.run(eightCellValue + "-" + nineCellValue).split("-");
|
||||
CoordinateConverter.Gps gps = CoordinateConverter.GPS84ToGCJ02(
|
||||
TypeConversionUtil.toDoubleOfNull(split[0]), TypeConversionUtil.toDoubleOfNull(split[1]));
|
||||
if (gps != null) {
|
||||
|
||||
Reference in New Issue
Block a user