Commit 52ed5667 by zhengxj

finish 距离计算 on 20200107 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@25778 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent a3d7fa19
...@@ -3817,10 +3817,12 @@ public class OrderServiceImpl implements IOrderService { ...@@ -3817,10 +3817,12 @@ public class OrderServiceImpl implements IOrderService {
Byte userType = null; Byte userType = null;
String mechanicLongitude = null; String mechanicLongitude = null;
String mechanicLatitude = null; String mechanicLatitude = null;
String add = null;
if (obj != null && obj.getIntValue("code") == ResultCodeEnum.SUCCESS.getCode()) { if (obj != null && obj.getIntValue("code") == ResultCodeEnum.SUCCESS.getCode()) {
JSONObject data = obj.getJSONObject("data"); JSONObject data = obj.getJSONObject("data");
mechanicLongitude = data.getString("longitude"); mechanicLongitude = data.getString("longitude");
mechanicLatitude = data.getString("latitude"); mechanicLatitude = data.getString("latitude");
add = data.getString("lastestAddress");
} }
logger.info( logger.info(
"技工最新坐标经纬度----mechanicLongitude:" + mechanicLongitude + ",mechanicLatitude" + mechanicLatitude); "技工最新坐标经纬度----mechanicLongitude:" + mechanicLongitude + ",mechanicLatitude" + mechanicLatitude);
...@@ -3844,7 +3846,8 @@ public class OrderServiceImpl implements IOrderService { ...@@ -3844,7 +3846,8 @@ public class OrderServiceImpl implements IOrderService {
} }
// 返回技工最新的定位地址 // 返回技工最新的定位地址
String add = AMapUtils.getAddress(mechanicLatitude, mechanicLongitude); // String add = AMapUtils.getAddress(mechanicLatitude,
// mechanicLongitude);
if (null != add) { if (null != add) {
mechanicBusiness.setAddress(add); mechanicBusiness.setAddress(add);
} }
......
...@@ -173,6 +173,19 @@ public class SysUser extends BaseModel implements Serializable { ...@@ -173,6 +173,19 @@ public class SysUser extends BaseModel implements Serializable {
private int createOrderType; private int createOrderType;
/**
* 用户最新地位地址
*/
private String lastestAddress;
public String getLastestAddress() {
return lastestAddress;
}
public void setLastestAddress(String lastestAddress) {
this.lastestAddress = lastestAddress;
}
public int getCreateOrderType() { public int getCreateOrderType() {
return createOrderType; return createOrderType;
} }
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
<result column="mini_openId" jdbcType="VARCHAR" property="miniOpenId"/> <result column="mini_openId" jdbcType="VARCHAR" property="miniOpenId"/>
<result column="longitude" jdbcType="VARCHAR" property="longitude"/> <result column="longitude" jdbcType="VARCHAR" property="longitude"/>
<result column="latitude" jdbcType="VARCHAR" property="latitude"/> <result column="latitude" jdbcType="VARCHAR" property="latitude"/>
<result column="lastest_address" jdbcType="VARCHAR" property="lastestAddress"/>
</resultMap> </resultMap>
<resultMap id="merchantResultMap" type="com.glsx.usercenter.pojo.user.SysMerchant"> <resultMap id="merchantResultMap" type="com.glsx.usercenter.pojo.user.SysMerchant">
...@@ -116,7 +117,7 @@ ...@@ -116,7 +117,7 @@
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, username, name, org_id, phone_number, user_status, create_by, create_time, update_by, id, username, name, org_id, phone_number, user_status, create_by, create_time, update_by,
update_time, password, sex, remark, user_type, group_id,public_openId,mini_openId,latitude,longitude update_time, password, sex, remark, user_type, group_id,public_openId,mini_openId,latitude,longitude,lastestAddress
</sql> </sql>
<select id="selectByExample" parameterType="com.glsx.usercenter.pojo.user.SysUserExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.glsx.usercenter.pojo.user.SysUserExample" resultMap="BaseResultMap">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!