소스 검색

:art: 获取录入的定位信息

Ritchie 1 년 전
부모
커밋
34a4efcade

+ 33 - 9
src/main/java/com/szwl/controller/TLocationCheckController.java

@@ -36,7 +36,7 @@ public class TLocationCheckController {
         this.adminService = adminService;
     }
 
-    @ApiOperation(value = "获取录入的定位信息")
+    @ApiOperation(value = "获取定位信息")
     @GetMapping("/getLocInfo")
     public ResponseModel<?> getLocInfo(String clientId) {
         if (StringUtils.isEmpty(clientId)) {
@@ -47,14 +47,38 @@ public class TLocationCheckController {
         lqw.eq(TLocationCheck::getClientId, clientId);
         TLocationCheck locationCheck = locationCheckService.getOne(lqw);
         if (Objects.nonNull(locationCheck)) {
+            HashMap<String, String> locationMap = new HashMap<>();
             String country = locationCheck.getCountry();
-            if (country.equals("中国")) {
-                String location = locationCheck.getLocation();
-                return R.ok(country + location);
-            } else {
-                return R.ok(country);
-            }
-
+            String username = locationCheck.getUsername();
+            String name = locationCheck.getName();
+            String phone = locationCheck.getPhone();
+            String longitude = locationCheck.getLongitude();
+            String latitude = locationCheck.getLatitude();
+            String addr = locationCheck.getAddr();
+            String modUsername = locationCheck.getModUsername();
+            String modName = locationCheck.getModName();
+            String modPhone = locationCheck.getModPhone();
+            String message = locationCheck.getMessage();
+
+            locationMap.put("country", country); // 录入国家
+            locationMap.put("username", username); // 账号用户名
+            locationMap.put("name", name); // 录入人姓名
+            locationMap.put("phone", phone); // 录入人电话
+            locationMap.put("longitude", longitude); // 经度
+            locationMap.put("latitude", latitude); // 纬度
+            locationMap.put("address", addr); // 反编译的地址
+            locationMap.put("modUsername", modUsername); // 修改人账号
+            locationMap.put("modName", modName); // 修改人姓名
+            locationMap.put("modPhone", modPhone); // 修改人电话
+            locationMap.put("message", message); // 修改原因
+
+//            if (country.equals("中国")) {
+//                String location = locationCheck.getLocation();
+//                return R.ok(country + location);
+//            } else {
+//                return R.ok(country);
+//            }
+            return R.ok(locationMap);
         }
         return R.fail("地区信息未录入");
     }
@@ -88,7 +112,7 @@ public class TLocationCheckController {
         return R.ok(result);
     }
 
-    @ApiOperation(value = "修改录入的定位信息")
+    @ApiOperation(value = "修改定位信息")
     @PostMapping("/updateLocInfo")
     public ResponseModel<?> updateLocInfo(@RequestBody TLocationCheck locationCheck) {
         if (Objects.isNull(locationCheck)) {

+ 0 - 3
src/main/java/com/szwl/controller/TParametersController.java

@@ -4,7 +4,6 @@ package com.szwl.controller;
 import cn.com.crbank.ommo.bean.ResultMessage;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage;
 import com.szwl.constant.ResponseCodesEnum;
 import com.szwl.model.bean.CommonParamVo;
 import com.szwl.model.bo.R;
@@ -12,14 +11,12 @@ import com.szwl.model.bo.ResponseModel;
 import com.szwl.model.entity.TEquipment;
 import com.szwl.model.entity.TEquipmentDesc;
 import com.szwl.model.entity.TParameters;
-import com.szwl.model.entity.TProduct;
 import com.szwl.model.utils.PushUtils;
 import com.szwl.service.TEquipmentDescService;
 import com.szwl.service.TEquipmentService;
 import com.szwl.service.TParametersService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;

+ 0 - 3
src/main/java/com/szwl/util/geoCoderUtil.java

@@ -1,12 +1,9 @@
 package com.szwl.util;
 
-import cn.hutool.http.HttpRequest;
 import cn.hutool.http.HttpUtil;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import com.sun.org.apache.xpath.internal.SourceTree;
 
-import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 
 public class geoCoderUtil {