From f60cf23a76972c0e0c7a437b17f37e1237e7d8d9 Mon Sep 17 00:00:00 2001
From: shicf <shi_chongfu@163.com>
Date: 星期一, 04 八月 2025 16:17:10 +0800
Subject: [PATCH] GPS坐标转换成百度坐标

---
 src/main/java/com/product/mobile/core/controller/SignInController.java |   51 ++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 46 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/product/mobile/core/controller/SignInController.java b/src/main/java/com/product/mobile/core/controller/SignInController.java
index f0f0c15..b6ea1fe 100644
--- a/src/main/java/com/product/mobile/core/controller/SignInController.java
+++ b/src/main/java/com/product/mobile/core/controller/SignInController.java
@@ -45,9 +45,15 @@
             fse = reqp.getFormData();
         }
         //绛惧埌鏃讹紝濡傛灉涓婁紶浜唘uid锛岃〃绀猴紝寰佸鍏徃瑙勫畾鐨勮�冨嫟鐐圭殑绛惧埌锛屽惁鍒欒〃绀轰笉鍦ㄥ叕鍙歌瀹氱殑鑰冨嫟鐐圭殑绛惧埌(浠绘剰鍦扮偣绛惧埌銆�)
-        
-        signInService.signIn(fse);
-        return this.OK();
+        try {
+	        signInService.signIn(fse);
+	        return this.OK();
+	    } catch (BaseException e) {
+	        return this.error(e);
+	    } catch (Exception e) {
+	    	
+	        return this.error(MobileCoreCode.SIGN_IN_FAIL);
+	    }
     }
 
     /**
@@ -70,6 +76,7 @@
 	    } catch (BaseException e) {
 	        return this.error(e);
 	    } catch (Exception e) {
+	    	
 	        return this.error(MobileCoreCode.SIGN_IN_FAIL);
 	    }
     }
@@ -88,7 +95,41 @@
             RequestParameterEntity reqp = (RequestParameterEntity) bean;
             fse = reqp.getFormData();
         }
-        //鑾峰彇褰撳墠浜虹殑鍏徃
-        return this.OK_List(signInService.signInSites(SpringMVCContextHolder.getCurrentUser().getCurrentCompany().getUUID()));
+        try {
+	        //鑾峰彇褰撳墠浜虹殑鍏徃
+	        return this.OK_List(signInService.signInSites(SpringMVCContextHolder.getCurrentUser().getCurrentCompany().getUUID()));
+        
+	    } catch (BaseException e) {
+	        return this.error(e);
+	    } catch (Exception e) {
+	    	
+	        return this.error(MobileCoreCode.SIGN_IN_FAIL);
+	    }
+    }
+    /**
+     * 鍦扮悊鍧愭爣杞崲鎺ュ彛
+     *
+     * @param request
+     * @return
+     */
+    @RequestMapping(value = "/map/coord/convert/{version}", method = RequestMethod.POST)
+    @ApiVersion(1)
+    public String coordinateTransform(HttpServletRequest request) {
+        FieldSetEntity fse = null;
+        Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA);
+        if (bean != null) {
+            RequestParameterEntity reqp = (RequestParameterEntity) bean;
+            fse = reqp.getFormData();
+        }
+        try {
+	        //杩斿洖缁忕含搴�
+	        return this.OK_List(signInService.coordinateTransform(fse.getInteger("type"),fse.getDouble("longitude"),fse.getDouble("latitude")));
+        
+	    } catch (BaseException e) {
+	        return this.error(e);
+	    } catch (Exception e) {
+	    	
+	        return this.error(MobileCoreCode.SIGN_IN_FAIL);
+	    }
     }
 }

--
Gitblit v1.9.2