修改
This commit is contained in:
parent
98f396fbeb
commit
10058b4587
5
README.md
Normal file
5
README.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# 修改记录
|
||||||
|
|
||||||
|
### 2022-2-10
|
||||||
|
> 1 学校重点人员添加网格信息 添加经纬度信息
|
||||||
|
> 2 学校涉及案件添加网格、经纬度信息
|
Binary file not shown.
@ -10,8 +10,8 @@
|
|||||||
{
|
{
|
||||||
"type": "SINGLE",
|
"type": "SINGLE",
|
||||||
"filters": [],
|
"filters": [],
|
||||||
"versionCode": 3,
|
"versionCode": 5,
|
||||||
"versionName": "1.0.2",
|
"versionName": "1.0.4",
|
||||||
"outputFile": "app-release.apk"
|
"outputFile": "app-release.apk"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -7,8 +7,8 @@ package com.tenlionsoft.baselib.core.retrofit_net;
|
|||||||
*/
|
*/
|
||||||
public class BaseUrlApi {
|
public class BaseUrlApi {
|
||||||
|
|
||||||
// public static final String IP = "http://192.168.0.155:7011/";/* 测试IP */
|
// public static final String IP = "http://192.168.0.155:7011/";/* 测试IP */
|
||||||
// public static final String IP = "http://49.233.36.36:58091/";/* 测试IP */
|
// public static final String IP = "http://49.233.36.36:58091/";/* 测试IP */
|
||||||
public static final String IP = "http://1.24.238.149:37210/";/* 正式IP */
|
public static final String IP = "http://1.24.238.149:37210/";/* 正式IP */
|
||||||
public static final String SYS_USERCENTER = "usercenter/";
|
public static final String SYS_USERCENTER = "usercenter/";
|
||||||
public static final String SYS_POPULATION = "population/";/*人口系统*/
|
public static final String SYS_POPULATION = "population/";/*人口系统*/
|
||||||
@ -32,7 +32,7 @@ public class BaseUrlApi {
|
|||||||
public static final String SOCKET_IP = IP + "websocket";/* SocketIP */
|
public static final String SOCKET_IP = IP + "websocket";/* SocketIP */
|
||||||
// public static final String SOCKET_IP = "http://192.168.0.155:8081/websocket";/*SocketIP*/
|
// public static final String SOCKET_IP = "http://192.168.0.155:8081/websocket";/*SocketIP*/
|
||||||
// public static final String SOCKET_IP = "http://49.233.36.36:58092/websocket";/*SocketIP*/
|
// public static final String SOCKET_IP = "http://49.233.36.36:58092/websocket";/*SocketIP*/
|
||||||
// public static final String BASE_SECURITY_IP = "http://192.168.0.111:8081/systembase/";
|
// public static final String BASE_SECURITY_IP = "http://192.168.0.111:8081/systembase/";
|
||||||
// public static final String BASE_CASE_IP = "http://192.168.0.120:8080/" + SYS_CASE;
|
// public static final String BASE_CASE_IP = "http://192.168.0.120:8080/" + SYS_CASE;
|
||||||
// public static final String BASE_HOUSE_IP = "http://192.168.0.111:8083/systemhouse/";/*测试*/
|
// public static final String BASE_HOUSE_IP = "http://192.168.0.111:8083/systemhouse/";/*测试*/
|
||||||
// public static final String BASE_PERSON_IP = "http://1.24.238.149:37210/" + SYS_POPULATION;/*测试*/
|
// public static final String BASE_PERSON_IP = "http://1.24.238.149:37210/" + SYS_POPULATION;/*测试*/
|
||||||
@ -58,8 +58,8 @@ public class BaseUrlApi {
|
|||||||
// public static final String APP_VERSION_ID = "c16826e7-8cfb-4db1-8844-09d2be697bc7";/* 155 测试App下载码*/
|
// public static final String APP_VERSION_ID = "c16826e7-8cfb-4db1-8844-09d2be697bc7";/* 155 测试App下载码*/
|
||||||
public static final String APP_VERSION_ID = "2f384d5c-419d-47a2-94cb-4a05b6f00936";/*正式App下载码*/
|
public static final String APP_VERSION_ID = "2f384d5c-419d-47a2-94cb-4a05b6f00936";/*正式App下载码*/
|
||||||
/*百度定位city-code*/
|
/*百度定位city-code*/
|
||||||
public static final String CITY_BAIDU_CODE = "168";//乌兰察布市
|
// public static final String CITY_BAIDU_CODE = "168";//乌兰察布市
|
||||||
// public static final String CITY_BAIDU_CODE = "321";//呼和浩特市
|
public static final String CITY_BAIDU_CODE = "321";//呼和浩特市
|
||||||
|
|
||||||
|
|
||||||
public static final String APP_DOWNLOAD_URL = BASE_URL + "app/appversion/download/" + APP_VERSION_ID;
|
public static final String APP_DOWNLOAD_URL = BASE_URL + "app/appversion/download/" + APP_VERSION_ID;
|
||||||
|
@ -55,8 +55,8 @@ ext {
|
|||||||
gCompileSdkVersion = 30
|
gCompileSdkVersion = 30
|
||||||
gMinSdkVersion = 21
|
gMinSdkVersion = 21
|
||||||
gTargetSdkVersion = 30
|
gTargetSdkVersion = 30
|
||||||
gVersionCode = 3
|
gVersionCode = 5
|
||||||
gVersionName = '1.0.2'
|
gVersionName = '1.0.4'
|
||||||
gBuildToolsVersion = "29.0.2"
|
gBuildToolsVersion = "29.0.2"
|
||||||
// gVersionCode=26
|
// gVersionCode=26
|
||||||
// gVersionName='1.3.0'
|
// gVersionName='1.3.0'
|
||||||
|
@ -38,7 +38,6 @@ import com.tengshisoft.chatmodule.hwclud.ui.DialogUtil;
|
|||||||
import com.tengshisoft.chatmodule.hwclud.ui.FullScreenDialog;
|
import com.tengshisoft.chatmodule.hwclud.ui.FullScreenDialog;
|
||||||
import com.tengshisoft.chatmodule.hwclud.utils.AppUtil;
|
import com.tengshisoft.chatmodule.hwclud.utils.AppUtil;
|
||||||
import com.tengshisoft.chatmodule.hwclud.utils.Constant;
|
import com.tengshisoft.chatmodule.hwclud.utils.Constant;
|
||||||
import com.tengshisoft.chatmodule.hwclud.utils.LogUtil;
|
|
||||||
import com.tengshisoft.chatmodule.hwclud.utils.NetUtil;
|
import com.tengshisoft.chatmodule.hwclud.utils.NetUtil;
|
||||||
import com.tengshisoft.chatmodule.sockets.MsgTypeStateEnum;
|
import com.tengshisoft.chatmodule.sockets.MsgTypeStateEnum;
|
||||||
import com.tenlionsoft.baselib.app.BaseAppContext;
|
import com.tenlionsoft.baselib.app.BaseAppContext;
|
||||||
@ -244,7 +243,7 @@ public class AddressUserDetailActivity extends BaseActivity implements LoginView
|
|||||||
//发送让对方登录的广播
|
//发送让对方登录的广播
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
mClickTime = System.currentTimeMillis();
|
mClickTime = System.currentTimeMillis();
|
||||||
LoginMangerV2.getInstance().checkLogin("zh-1", "hc123456@", AddressUserDetailActivity.this);
|
LoginMangerV2.getInstance().checkLogin("zh-1", "Huawei@12345", AddressUserDetailActivity.this);
|
||||||
mVoiceTime = System.currentTimeMillis();
|
mVoiceTime = System.currentTimeMillis();
|
||||||
isVideoCall = false;
|
isVideoCall = false;
|
||||||
}
|
}
|
||||||
@ -262,7 +261,7 @@ public class AddressUserDetailActivity extends BaseActivity implements LoginView
|
|||||||
if (Math.abs(mClickTime - System.currentTimeMillis()) > 3000) {
|
if (Math.abs(mClickTime - System.currentTimeMillis()) > 3000) {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
mClickTime = System.currentTimeMillis();
|
mClickTime = System.currentTimeMillis();
|
||||||
LoginMangerV2.getInstance().checkLogin("zh-1", "hc123456@", AddressUserDetailActivity.this);
|
LoginMangerV2.getInstance().checkLogin("zh-1", "Huawei@12345", AddressUserDetailActivity.this);
|
||||||
mVideoTime = System.currentTimeMillis();
|
mVideoTime = System.currentTimeMillis();
|
||||||
isVideoCall = true;
|
isVideoCall = true;
|
||||||
}
|
}
|
||||||
|
@ -414,7 +414,7 @@ public class ChatActivity extends BaseActivity implements LoginView, LocalBroadc
|
|||||||
if (Math.abs(mClickTime - System.currentTimeMillis()) > 3000) {
|
if (Math.abs(mClickTime - System.currentTimeMillis()) > 3000) {
|
||||||
//发送让对方登录的广播
|
//发送让对方登录的广播
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
LoginMangerV2.getInstance().checkLogin("zh-1", "hc123456@", ChatActivity.this);
|
LoginMangerV2.getInstance().checkLogin("zh-1", "Huawei@12345", ChatActivity.this);
|
||||||
mVoiceTime = System.currentTimeMillis();
|
mVoiceTime = System.currentTimeMillis();
|
||||||
isVideoCall = false;
|
isVideoCall = false;
|
||||||
}
|
}
|
||||||
@ -431,7 +431,7 @@ public class ChatActivity extends BaseActivity implements LoginView, LocalBroadc
|
|||||||
if (AppUtils.isSupportCall()) {
|
if (AppUtils.isSupportCall()) {
|
||||||
if (Math.abs(mClickTime - System.currentTimeMillis()) > 3000) {
|
if (Math.abs(mClickTime - System.currentTimeMillis()) > 3000) {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
LoginMangerV2.getInstance().checkLogin("zh-1", "hc123456@", ChatActivity.this);
|
LoginMangerV2.getInstance().checkLogin("zh-1", "Huawei@12345", ChatActivity.this);
|
||||||
mVideoTime = System.currentTimeMillis();
|
mVideoTime = System.currentTimeMillis();
|
||||||
isVideoCall = true;
|
isVideoCall = true;
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,52 @@ public class SaveEmphasesBean {
|
|||||||
private String degreeOfHarmName;
|
private String degreeOfHarmName;
|
||||||
private int isFollow;
|
private int isFollow;
|
||||||
private String schoolId;
|
private String schoolId;
|
||||||
|
private String location;
|
||||||
|
private String locationCode;
|
||||||
|
private String grid;
|
||||||
|
private String longitude;
|
||||||
|
private String latitude;
|
||||||
|
|
||||||
|
|
||||||
|
public String getLongitude() {
|
||||||
|
return longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLongitude(String longitude) {
|
||||||
|
this.longitude = longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLatitude() {
|
||||||
|
return latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLatitude(String latitude) {
|
||||||
|
this.latitude = latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocation() {
|
||||||
|
return location;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocation(String location) {
|
||||||
|
this.location = location;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocationCode() {
|
||||||
|
return locationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocationCode(String locationCode) {
|
||||||
|
this.locationCode = locationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGrid() {
|
||||||
|
return grid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGrid(String grid) {
|
||||||
|
this.grid = grid;
|
||||||
|
}
|
||||||
|
|
||||||
public String getBaseId() {
|
public String getBaseId() {
|
||||||
return baseId;
|
return baseId;
|
||||||
|
@ -30,6 +30,33 @@ public class SaveSchoolCaseBean {
|
|||||||
private String principalCardNum;
|
private String principalCardNum;
|
||||||
private String principalName;
|
private String principalName;
|
||||||
private String schoolId;
|
private String schoolId;
|
||||||
|
private String grid;
|
||||||
|
private String longitude;
|
||||||
|
private String latitude;
|
||||||
|
|
||||||
|
public String getGrid() {
|
||||||
|
return grid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGrid(String grid) {
|
||||||
|
this.grid = grid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLongitude() {
|
||||||
|
return longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLongitude(String longitude) {
|
||||||
|
this.longitude = longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLatitude() {
|
||||||
|
return latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLatitude(String latitude) {
|
||||||
|
this.latitude = latitude;
|
||||||
|
}
|
||||||
|
|
||||||
public int getArrestCount() {
|
public int getArrestCount() {
|
||||||
return arrestCount;
|
return arrestCount;
|
||||||
|
@ -31,6 +31,44 @@ public class SchoolCaseDetailBean {
|
|||||||
private String principalName;
|
private String principalName;
|
||||||
private String schoolId;
|
private String schoolId;
|
||||||
private String stuTeaSafeId;
|
private String stuTeaSafeId;
|
||||||
|
private String gridName;
|
||||||
|
private String grid;
|
||||||
|
private String latitude;
|
||||||
|
private String longitude;
|
||||||
|
|
||||||
|
|
||||||
|
public String getGrid() {
|
||||||
|
return grid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGrid(String grid) {
|
||||||
|
this.grid = grid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGridName() {
|
||||||
|
return gridName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGridName(String gridName) {
|
||||||
|
this.gridName = gridName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getLatitude() {
|
||||||
|
return latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLatitude(String latitude) {
|
||||||
|
this.latitude = latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLongitude() {
|
||||||
|
return longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLongitude(String longitude) {
|
||||||
|
this.longitude = longitude;
|
||||||
|
}
|
||||||
|
|
||||||
public int getArrestCount() {
|
public int getArrestCount() {
|
||||||
return arrestCount;
|
return arrestCount;
|
||||||
|
@ -12,7 +12,13 @@ public class SchoolEmphasesPersonDetailBean {
|
|||||||
private String degreeOfHarm;
|
private String degreeOfHarm;
|
||||||
private String degreeOfHarmCode;
|
private String degreeOfHarmCode;
|
||||||
private String degreeOfHarmName;
|
private String degreeOfHarmName;
|
||||||
|
private String grid;
|
||||||
|
private String gridName;
|
||||||
private int isFollow;
|
private int isFollow;
|
||||||
|
private String latitude;
|
||||||
|
private String location;
|
||||||
|
private String locationCode;
|
||||||
|
private String longitude;
|
||||||
private String schoolId;
|
private String schoolId;
|
||||||
private String schoolKeyId;
|
private String schoolKeyId;
|
||||||
|
|
||||||
@ -48,6 +54,22 @@ public class SchoolEmphasesPersonDetailBean {
|
|||||||
this.degreeOfHarmName = degreeOfHarmName;
|
this.degreeOfHarmName = degreeOfHarmName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getGrid() {
|
||||||
|
return grid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGrid(String grid) {
|
||||||
|
this.grid = grid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGridName() {
|
||||||
|
return gridName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGridName(String gridName) {
|
||||||
|
this.gridName = gridName;
|
||||||
|
}
|
||||||
|
|
||||||
public int getIsFollow() {
|
public int getIsFollow() {
|
||||||
return isFollow;
|
return isFollow;
|
||||||
}
|
}
|
||||||
@ -56,6 +78,38 @@ public class SchoolEmphasesPersonDetailBean {
|
|||||||
this.isFollow = isFollow;
|
this.isFollow = isFollow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getLatitude() {
|
||||||
|
return latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLatitude(String latitude) {
|
||||||
|
this.latitude = latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocation() {
|
||||||
|
return location;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocation(String location) {
|
||||||
|
this.location = location;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocationCode() {
|
||||||
|
return locationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocationCode(String locationCode) {
|
||||||
|
this.locationCode = locationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLongitude() {
|
||||||
|
return longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLongitude(String longitude) {
|
||||||
|
this.longitude = longitude;
|
||||||
|
}
|
||||||
|
|
||||||
public String getSchoolId() {
|
public String getSchoolId() {
|
||||||
return schoolId;
|
return schoolId;
|
||||||
}
|
}
|
||||||
|
@ -116,12 +116,13 @@ public class CommunityEditActivity extends BaseActivity {
|
|||||||
private String mSelAreaId;
|
private String mSelAreaId;
|
||||||
private String mSelAreaNames;
|
private String mSelAreaNames;
|
||||||
private AreaGridListBean.RowsBean mSelGridBean;
|
private AreaGridListBean.RowsBean mSelGridBean;
|
||||||
|
private double mLat;
|
||||||
|
private double mLng;
|
||||||
|
|
||||||
private String mSelCommunityName;
|
private String mSelCommunityName;
|
||||||
private String mSelCommunityId;
|
private String mSelCommunityId;
|
||||||
private CommunityDetailBean mDetailBean;
|
private CommunityDetailBean mDetailBean;
|
||||||
private String mId;
|
private String mId;
|
||||||
private double mLat;
|
|
||||||
private double mLng;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int setLayoutId() {
|
protected int setLayoutId() {
|
||||||
@ -563,11 +564,6 @@ public class CommunityEditActivity extends BaseActivity {
|
|||||||
mSelGridBean = new AreaGridListBean.RowsBean();
|
mSelGridBean = new AreaGridListBean.RowsBean();
|
||||||
mSelGridBean.setGridId(bean.getGrid());
|
mSelGridBean.setGridId(bean.getGrid());
|
||||||
mSelGridBean.setGridName(bean.getGridName());
|
mSelGridBean.setGridName(bean.getGridName());
|
||||||
mTvGrid.setText(bean.getGridName());
|
|
||||||
mEtPropertyName.setText(bean.getPropertyName());
|
|
||||||
mEtPropertyLinkName.setText(bean.getLinkMan());
|
|
||||||
mEtPropertyLinkPhone.setText(bean.getPhone());
|
|
||||||
mEtAddress.setText(bean.getResidentialAddress());
|
|
||||||
if (!TextUtils.isEmpty(bean.getLatitude()) && !TextUtils.isEmpty(bean.getLongitude())) {
|
if (!TextUtils.isEmpty(bean.getLatitude()) && !TextUtils.isEmpty(bean.getLongitude())) {
|
||||||
mLat = Double.parseDouble(bean.getLatitude());
|
mLat = Double.parseDouble(bean.getLatitude());
|
||||||
mLng = Double.parseDouble(bean.getLongitude());
|
mLng = Double.parseDouble(bean.getLongitude());
|
||||||
@ -575,6 +571,12 @@ public class CommunityEditActivity extends BaseActivity {
|
|||||||
Location84 loc = PointUtils.wgs84ToBd09(new Location84(mLat, mLng));
|
Location84 loc = PointUtils.wgs84ToBd09(new Location84(mLat, mLng));
|
||||||
addMarkToMap(loc.getLat(), loc.getLng());
|
addMarkToMap(loc.getLat(), loc.getLng());
|
||||||
}
|
}
|
||||||
|
mTvGrid.setText(bean.getGridName());
|
||||||
|
mEtPropertyName.setText(bean.getPropertyName());
|
||||||
|
mEtPropertyLinkName.setText(bean.getLinkMan());
|
||||||
|
mEtPropertyLinkPhone.setText(bean.getPhone());
|
||||||
|
mEtAddress.setText(bean.getResidentialAddress());
|
||||||
|
|
||||||
mEtRemark.setText(bean.getRemake());
|
mEtRemark.setText(bean.getRemake());
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -320,7 +320,7 @@ public class KeyRoadCaseEditActivity extends BaseActivity {
|
|||||||
mSelAreaId = id;
|
mSelAreaId = id;
|
||||||
mSelAreaName = names;
|
mSelAreaName = names;
|
||||||
mTvArea.setText(names);
|
mTvArea.setText(names);
|
||||||
mSelGridBean= null;
|
mSelGridBean = null;
|
||||||
mTvGrid.setText("");
|
mTvGrid.setText("");
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
});
|
});
|
||||||
@ -416,7 +416,7 @@ public class KeyRoadCaseEditActivity extends BaseActivity {
|
|||||||
ToastUtils.show("请选择发生日期");
|
ToastUtils.show("请选择发生日期");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (TextUtils.isEmpty(mSelAreaId)) {
|
if (TextUtils.isEmpty(mSelAreaCode)) {
|
||||||
ToastUtils.show("请选择案发地");
|
ToastUtils.show("请选择案发地");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,26 +1,45 @@
|
|||||||
package com.tengshisoft.gridmodule.incident.activitys.schools;
|
package com.tengshisoft.gridmodule.incident.activitys.schools;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
|
import android.content.Intent;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
import android.view.MotionEvent;
|
||||||
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
import android.widget.ZoomControls;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
|
import com.baidu.mapapi.map.BaiduMap;
|
||||||
|
import com.baidu.mapapi.map.BitmapDescriptor;
|
||||||
|
import com.baidu.mapapi.map.BitmapDescriptorFactory;
|
||||||
|
import com.baidu.mapapi.map.MapStatus;
|
||||||
|
import com.baidu.mapapi.map.MapStatusUpdate;
|
||||||
|
import com.baidu.mapapi.map.MapStatusUpdateFactory;
|
||||||
|
import com.baidu.mapapi.map.MarkerOptions;
|
||||||
|
import com.baidu.mapapi.map.TextureMapView;
|
||||||
|
import com.baidu.mapapi.model.LatLng;
|
||||||
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||||
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
||||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||||
import com.bigkoo.pickerview.view.TimePickerView;
|
import com.bigkoo.pickerview.view.TimePickerView;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.hjq.toast.ToastUtils;
|
import com.hjq.toast.ToastUtils;
|
||||||
|
import com.tengshisoft.commonmodule.beans.AreaGridListBean;
|
||||||
import com.tengshisoft.commonmodule.beans.SaveSchoolCaseBean;
|
import com.tengshisoft.commonmodule.beans.SaveSchoolCaseBean;
|
||||||
import com.tengshisoft.commonmodule.beans.SchoolCaseDetailBean;
|
import com.tengshisoft.commonmodule.beans.SchoolCaseDetailBean;
|
||||||
import com.tengshisoft.commonmodule.beans.SuccessBean;
|
import com.tengshisoft.commonmodule.beans.SuccessBean;
|
||||||
import com.tengshisoft.commonmodule.nets.GridApis;
|
import com.tengshisoft.commonmodule.nets.GridApis;
|
||||||
import com.tengshisoft.gridmodule.R;
|
import com.tengshisoft.gridmodule.R;
|
||||||
import com.tengshisoft.gridmodule.R2;
|
import com.tengshisoft.gridmodule.R2;
|
||||||
|
import com.tengshisoft.modulemap.common.Location84;
|
||||||
|
import com.tengshisoft.modulemap.common.PointUtils;
|
||||||
import com.tenlionsoft.baselib.constant.DicIds;
|
import com.tenlionsoft.baselib.constant.DicIds;
|
||||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||||
import com.tenlionsoft.baselib.core.beans.DicBean;
|
import com.tenlionsoft.baselib.core.beans.DicBean;
|
||||||
@ -34,6 +53,7 @@ import com.tenlionsoft.baselib.utils.UserLgUtils;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.widget.SwitchCompat;
|
import androidx.appcompat.widget.SwitchCompat;
|
||||||
import androidx.core.widget.NestedScrollView;
|
import androidx.core.widget.NestedScrollView;
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
@ -91,6 +111,12 @@ public class SchoolCaseAddActivity extends BaseActivity {
|
|||||||
Button mBtnSubmit;
|
Button mBtnSubmit;
|
||||||
@BindView(R2.id.nsv_content)
|
@BindView(R2.id.nsv_content)
|
||||||
NestedScrollView mNsvContent;
|
NestedScrollView mNsvContent;
|
||||||
|
@BindView(R2.id.tv_grid)
|
||||||
|
TextView mTvGrid;
|
||||||
|
@BindView(R2.id.tv_address_sel)
|
||||||
|
TextView mTvAddressSel;
|
||||||
|
@BindView(R2.id.tmv_map)
|
||||||
|
TextureMapView mTmvMap;
|
||||||
private Unbinder mBind;
|
private Unbinder mBind;
|
||||||
private String mId;
|
private String mId;
|
||||||
private OptionsPickerView<DicBean> mCardTypePicker;
|
private OptionsPickerView<DicBean> mCardTypePicker;
|
||||||
@ -107,6 +133,9 @@ public class SchoolCaseAddActivity extends BaseActivity {
|
|||||||
private String mSchoolId;
|
private String mSchoolId;
|
||||||
private SchoolCaseDetailBean mBean;
|
private SchoolCaseDetailBean mBean;
|
||||||
private int mIsSw = 0;
|
private int mIsSw = 0;
|
||||||
|
private AreaGridListBean.RowsBean mSelGridBean;
|
||||||
|
private double mLat;
|
||||||
|
private double mLng;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int setLayoutId() {
|
protected int setLayoutId() {
|
||||||
@ -129,6 +158,7 @@ public class SchoolCaseAddActivity extends BaseActivity {
|
|||||||
mBind = ButterKnife.bind(this);
|
mBind = ButterKnife.bind(this);
|
||||||
mId = getIntent().getStringExtra("id");
|
mId = getIntent().getStringExtra("id");
|
||||||
mSchoolId = getIntent().getStringExtra("schoolId");
|
mSchoolId = getIntent().getStringExtra("schoolId");
|
||||||
|
initMap();
|
||||||
initViews();
|
initViews();
|
||||||
if (TextUtils.isEmpty(mId)) {
|
if (TextUtils.isEmpty(mId)) {
|
||||||
mTvBaseTitle.setText("涉及师生安全案件信息录入");
|
mTvBaseTitle.setText("涉及师生安全案件信息录入");
|
||||||
@ -144,33 +174,33 @@ public class SchoolCaseAddActivity extends BaseActivity {
|
|||||||
*/
|
*/
|
||||||
private void getDetailData() {
|
private void getDetailData() {
|
||||||
RetrofitManager.getInstance()
|
RetrofitManager.getInstance()
|
||||||
.create(GridApis.class)
|
.create(GridApis.class)
|
||||||
.getSchoolCaseDetailById(mId, UserLgUtils.getToken())
|
.getSchoolCaseDetailById(mId, UserLgUtils.getToken())
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Observer<SchoolCaseDetailBean>() {
|
.subscribe(new Observer<SchoolCaseDetailBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@NonNull Disposable d) {
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(@NonNull SchoolCaseDetailBean schoolCaseDetailBean) {
|
public void onNext(@NonNull SchoolCaseDetailBean schoolCaseDetailBean) {
|
||||||
mBean = schoolCaseDetailBean;
|
mBean = schoolCaseDetailBean;
|
||||||
setDataToView();
|
setDataToView();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(@NonNull Throwable e) {
|
public void onError(@NonNull Throwable e) {
|
||||||
refreshView(STATE_LOAD_ERROR);
|
refreshView(STATE_LOAD_ERROR);
|
||||||
ExceptionHandler.handleException(e);
|
ExceptionHandler.handleException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -184,6 +214,40 @@ public class SchoolCaseAddActivity extends BaseActivity {
|
|||||||
mTvDate.setOnClickListener(v -> onShowDate());
|
mTvDate.setOnClickListener(v -> onShowDate());
|
||||||
mBtnSubmit.setOnClickListener(v -> doConfirm());
|
mBtnSubmit.setOnClickListener(v -> doConfirm());
|
||||||
mSwIsCrack.setOnCheckedChangeListener((buttonView, isChecked) -> mIsSw = isChecked ? 1 : 0);
|
mSwIsCrack.setOnCheckedChangeListener((buttonView, isChecked) -> mIsSw = isChecked ? 1 : 0);
|
||||||
|
mTvGrid.setOnClickListener(v -> {
|
||||||
|
if (TextUtils.isEmpty(mSelAreaCode)) {
|
||||||
|
ToastUtils.show("请选择案发地");
|
||||||
|
} else {
|
||||||
|
ARouter.getInstance()
|
||||||
|
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_SEL_GRID)
|
||||||
|
.withString("areaCode", mSelAreaCode)
|
||||||
|
.navigation(mActivity, 15);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
mTvAddressSel.setOnClickListener(v -> ARouter.getInstance()
|
||||||
|
.build(PathConfig.PATH_MODULE_MAP_SEL_POINT)
|
||||||
|
.navigation(mActivity, 14));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onActivityResult(int requestCode, int resultCode, @Nullable @org.jetbrains.annotations.Nullable Intent data) {
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
if (requestCode == 14) {
|
||||||
|
if (resultCode == 22) {
|
||||||
|
mLat = data.getDoubleExtra("lat", -1);
|
||||||
|
mLng = data.getDoubleExtra("lng", -1);
|
||||||
|
String address = data.getStringExtra("address");
|
||||||
|
mEtAddress.setText(address);
|
||||||
|
mTvAddressSel.setText(mLat + "-" + mLng);
|
||||||
|
Location84 loc = PointUtils.wgs84ToBd09(new Location84(mLat, mLng));
|
||||||
|
addMarkToMap(loc.getLat(), loc.getLng());
|
||||||
|
}
|
||||||
|
} else if (requestCode == 15) {
|
||||||
|
if (resultCode == 222) {
|
||||||
|
mSelGridBean = (AreaGridListBean.RowsBean) data.getSerializableExtra("bean");
|
||||||
|
mTvGrid.setText(mSelGridBean.getGridName());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -206,35 +270,35 @@ public class SchoolCaseAddActivity extends BaseActivity {
|
|||||||
dialog.show();
|
dialog.show();
|
||||||
RequestBody body = buildParams();
|
RequestBody body = buildParams();
|
||||||
RetrofitManager.getInstance()
|
RetrofitManager.getInstance()
|
||||||
.create(GridApis.class)
|
.create(GridApis.class)
|
||||||
.doSaveSchoolCase(body, UserLgUtils.getToken())
|
.doSaveSchoolCase(body, UserLgUtils.getToken())
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Observer<SuccessBean>() {
|
.subscribe(new Observer<SuccessBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@NonNull Disposable d) {
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(@NonNull SuccessBean successBean) {
|
public void onNext(@NonNull SuccessBean successBean) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
ToastUtils.show("录入成功");
|
ToastUtils.show("录入成功");
|
||||||
setResult(13);
|
setResult(13);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(@NonNull Throwable e) {
|
public void onError(@NonNull Throwable e) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
ExceptionHandler.handleException(e);
|
ExceptionHandler.handleException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,38 +311,91 @@ public class SchoolCaseAddActivity extends BaseActivity {
|
|||||||
dialog.show();
|
dialog.show();
|
||||||
RequestBody body = buildParams();
|
RequestBody body = buildParams();
|
||||||
RetrofitManager.getInstance()
|
RetrofitManager.getInstance()
|
||||||
.create(GridApis.class)
|
.create(GridApis.class)
|
||||||
.doEditSchoolCase(mId, body, UserLgUtils.getToken())
|
.doEditSchoolCase(mId, body, UserLgUtils.getToken())
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Observer<SuccessBean>() {
|
.subscribe(new Observer<SuccessBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@NonNull Disposable d) {
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(@NonNull SuccessBean successBean) {
|
public void onNext(@NonNull SuccessBean successBean) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
ToastUtils.show("编辑成功");
|
ToastUtils.show("编辑成功");
|
||||||
setResult(13);
|
setResult(13);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(@NonNull Throwable e) {
|
public void onError(@NonNull Throwable e) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
ExceptionHandler.handleException(e);
|
ExceptionHandler.handleException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private BaiduMap mBaiduMap;
|
||||||
|
private BitmapDescriptor mBitMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化地图
|
||||||
|
*/
|
||||||
|
@SuppressLint("ClickableViewAccessibility")
|
||||||
|
private void initMap() {
|
||||||
|
mTmvMap.showZoomControls(false);//缩放控件
|
||||||
|
mTmvMap.showScaleControl(false);//比例尺
|
||||||
|
mBaiduMap = mTmvMap.getMap();
|
||||||
|
mBaiduMap.setMapType(BaiduMap.MAP_TYPE_NORMAL);
|
||||||
|
mBaiduMap.setMyLocationEnabled(true);
|
||||||
|
View childAt = mTmvMap.getChildAt(1);
|
||||||
|
if (childAt != null && (childAt instanceof ImageView || childAt instanceof ZoomControls)) {
|
||||||
|
childAt.setVisibility(View.INVISIBLE);
|
||||||
|
}
|
||||||
|
mTmvMap.getChildAt(0).setOnTouchListener((View v, MotionEvent event) -> {
|
||||||
|
if (event.getAction() == MotionEvent.ACTION_UP) {
|
||||||
|
mNsvContent.requestDisallowInterceptTouchEvent(false);
|
||||||
|
} else {
|
||||||
|
mNsvContent.requestDisallowInterceptTouchEvent(true);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
moveMapToCenter(new LatLng(PathConfig.DEFAULT_LAT, PathConfig.DEFAULT_LNG), 14);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将地图移动到定位中心
|
||||||
|
*
|
||||||
|
* @param latLng
|
||||||
|
*/
|
||||||
|
private void moveMapToCenter(LatLng latLng, int room) {
|
||||||
|
MapStatus ms = new MapStatus.Builder().zoom(room).target(latLng).build();
|
||||||
|
MapStatusUpdate u = MapStatusUpdateFactory.newMapStatus(ms);
|
||||||
|
mBaiduMap.setMapStatus(u);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addMarkToMap(double lat, double lng) {
|
||||||
|
mBaiduMap.clear();
|
||||||
|
moveMapToCenter(new LatLng(lat, lng), 18);
|
||||||
|
if (mBitMap == null) {
|
||||||
|
mBitMap = BitmapDescriptorFactory.fromResource(com.tengshisoft.commonmodule.R.drawable.ic_map_location_marker);
|
||||||
|
}
|
||||||
|
MarkerOptions markerOptions = new MarkerOptions()
|
||||||
|
.position(new LatLng(lat, lng))//mark出现的位置
|
||||||
|
.icon(mBitMap) //mark图标
|
||||||
|
.draggable(false)//mark可拖拽
|
||||||
|
.animateType(MarkerOptions.MarkerAnimateType.none);
|
||||||
|
mBaiduMap.addOverlay(markerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 显示案件性质
|
* 显示案件性质
|
||||||
@ -291,11 +408,11 @@ public class SchoolCaseAddActivity extends BaseActivity {
|
|||||||
mSelNature = mNatureList.get(o1);
|
mSelNature = mNatureList.get(o1);
|
||||||
mTvNatureType.setText(mSelNature.getDataName());
|
mTvNatureType.setText(mSelNature.getDataName());
|
||||||
})
|
})
|
||||||
.setTitleText("请选择")
|
.setTitleText("请选择")
|
||||||
.setCancelColor(Color.parseColor("#1189FF"))
|
.setCancelColor(Color.parseColor("#1189FF"))
|
||||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||||
.setTitleColor(Color.parseColor("#1189FF"))
|
.setTitleColor(Color.parseColor("#1189FF"))
|
||||||
.build();
|
.build();
|
||||||
mNaturePicker.setPicker(mNatureList);
|
mNaturePicker.setPicker(mNatureList);
|
||||||
}
|
}
|
||||||
mNaturePicker.show();
|
mNaturePicker.show();
|
||||||
@ -315,11 +432,11 @@ public class SchoolCaseAddActivity extends BaseActivity {
|
|||||||
mSelCardType = mCardType.get(o1);
|
mSelCardType = mCardType.get(o1);
|
||||||
mTvCardType.setText(mSelCardType.getDataName());
|
mTvCardType.setText(mSelCardType.getDataName());
|
||||||
})
|
})
|
||||||
.setTitleText("请选择")
|
.setTitleText("请选择")
|
||||||
.setCancelColor(Color.parseColor("#1189FF"))
|
.setCancelColor(Color.parseColor("#1189FF"))
|
||||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||||
.setTitleColor(Color.parseColor("#1189FF"))
|
.setTitleColor(Color.parseColor("#1189FF"))
|
||||||
.build();
|
.build();
|
||||||
mCardTypePicker.setPicker(mCardType);
|
mCardTypePicker.setPicker(mCardType);
|
||||||
}
|
}
|
||||||
mCardTypePicker.show();
|
mCardTypePicker.show();
|
||||||
@ -333,9 +450,9 @@ public class SchoolCaseAddActivity extends BaseActivity {
|
|||||||
*/
|
*/
|
||||||
private void onShowArea() {
|
private void onShowArea() {
|
||||||
AreaChooseDialog dialog = new AreaChooseDialog
|
AreaChooseDialog dialog = new AreaChooseDialog
|
||||||
.DialogBuilder(mActivity)
|
.DialogBuilder(mActivity)
|
||||||
.setDefault(true)
|
.setDefault(true)
|
||||||
.build();
|
.build();
|
||||||
dialog.addOnChoseListener((names, id, code) -> {
|
dialog.addOnChoseListener((names, id, code) -> {
|
||||||
mSelAreaCode = code;
|
mSelAreaCode = code;
|
||||||
mSelAreaId = id;
|
mSelAreaId = id;
|
||||||
@ -353,12 +470,12 @@ public class SchoolCaseAddActivity extends BaseActivity {
|
|||||||
private void onShowDate() {
|
private void onShowDate() {
|
||||||
hideSoftKeyboard();
|
hideSoftKeyboard();
|
||||||
TimePickerView mTimePickerView = new TimePickerBuilder(mActivity, (date, v) -> mTvDate.setText(TimeUtils.dateToString(date)))
|
TimePickerView mTimePickerView = new TimePickerBuilder(mActivity, (date, v) -> mTvDate.setText(TimeUtils.dateToString(date)))
|
||||||
.setTitleText("请选日期")
|
.setTitleText("请选日期")
|
||||||
.setCancelColor(Color.parseColor("#1189FF"))
|
.setCancelColor(Color.parseColor("#1189FF"))
|
||||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||||
.setType(new boolean[]{true, true, true, false, false, false})
|
.setType(new boolean[]{true, true, true, false, false, false})
|
||||||
.setTitleColor(Color.parseColor("#1189FF"))
|
.setTitleColor(Color.parseColor("#1189FF"))
|
||||||
.build();
|
.build();
|
||||||
mTimePickerView.show();
|
mTimePickerView.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -369,52 +486,60 @@ public class SchoolCaseAddActivity extends BaseActivity {
|
|||||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
||||||
dialog.show();
|
dialog.show();
|
||||||
RetrofitManager.getInstance()
|
RetrofitManager.getInstance()
|
||||||
.create(GridApis.class)
|
.create(GridApis.class)
|
||||||
.getDictListAllByPid(pId, UserLgUtils.getToken())
|
.getDictListAllByPid(pId, UserLgUtils.getToken())
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Observer<List<DicBean>>() {
|
.subscribe(new Observer<List<DicBean>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@NonNull Disposable d) {
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(@NonNull List<DicBean> typeListBeans) {
|
public void onNext(@NonNull List<DicBean> typeListBeans) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
if (typeListBeans.size() > 0) {
|
if (typeListBeans.size() > 0) {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 1:
|
case 1:
|
||||||
mNatureList = typeListBeans;
|
mNatureList = typeListBeans;
|
||||||
onShowNature();
|
onShowNature();
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
mCardType = typeListBeans;
|
mCardType = typeListBeans;
|
||||||
onShowCardType();
|
onShowCardType();
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
} else {
|
|
||||||
ToastUtils.show("暂无数据");
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
ToastUtils.show("暂无数据");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(@NonNull Throwable e) {
|
public void onError(@NonNull Throwable e) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
ExceptionHandler.handleException(e);
|
ExceptionHandler.handleException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验参数
|
* 校验参数
|
||||||
*/
|
*/
|
||||||
private boolean checkParams() {
|
private boolean checkParams() {
|
||||||
|
if (mSelGridBean == null) {
|
||||||
|
ToastUtils.show("请选择所在网格");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (mLat == 0 || mLng == 0) {
|
||||||
|
ToastUtils.show("请选择所在经纬度");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
String name = mEtName.getText().toString().trim();
|
String name = mEtName.getText().toString().trim();
|
||||||
if (TextUtils.isEmpty(name)) {
|
if (TextUtils.isEmpty(name)) {
|
||||||
ToastUtils.show("请输入案(事)件名称");
|
ToastUtils.show("请输入案(事)件名称");
|
||||||
@ -499,6 +624,17 @@ public class SchoolCaseAddActivity extends BaseActivity {
|
|||||||
mEtFleeCount.setText(mBean.getAtLargeCount() + "");
|
mEtFleeCount.setText(mBean.getAtLargeCount() + "");
|
||||||
mEtCatchCount.setText(mBean.getArrestCount() + "");
|
mEtCatchCount.setText(mBean.getArrestCount() + "");
|
||||||
mEtDetect.setText(Html.fromHtml(mBean.getCaseSolve()));
|
mEtDetect.setText(Html.fromHtml(mBean.getCaseSolve()));
|
||||||
|
mSelGridBean = new AreaGridListBean.RowsBean();
|
||||||
|
mSelGridBean.setGridId(mBean.getGrid());
|
||||||
|
mSelGridBean.setGridName(mBean.getGridName());
|
||||||
|
if (!TextUtils.isEmpty(mBean.getLatitude()) && !TextUtils.isEmpty(mBean.getLongitude())) {
|
||||||
|
mLat = Double.parseDouble(mBean.getLatitude());
|
||||||
|
mLng = Double.parseDouble(mBean.getLongitude());
|
||||||
|
mTvAddressSel.setText(mLat + "-" + mLng);
|
||||||
|
Location84 loc = PointUtils.wgs84ToBd09(new Location84(mLat, mLng));
|
||||||
|
addMarkToMap(loc.getLat(), loc.getLng());
|
||||||
|
}
|
||||||
|
mTvGrid.setText(mBean.getGridName());
|
||||||
}
|
}
|
||||||
|
|
||||||
private RequestBody buildParams() {
|
private RequestBody buildParams() {
|
||||||
@ -508,6 +644,9 @@ public class SchoolCaseAddActivity extends BaseActivity {
|
|||||||
if (!TextUtils.isEmpty(number)) {
|
if (!TextUtils.isEmpty(number)) {
|
||||||
bean.setCaseCode(number);
|
bean.setCaseCode(number);
|
||||||
}
|
}
|
||||||
|
bean.setGrid(mSelGridBean.getGridId());
|
||||||
|
bean.setLatitude(mLat + "");
|
||||||
|
bean.setLongitude(mLng + "");
|
||||||
String name = mEtName.getText().toString().trim();
|
String name = mEtName.getText().toString().trim();
|
||||||
bean.setCaseName(name);
|
bean.setCaseName(name);
|
||||||
String date = mTvDate.getText().toString().trim();
|
String date = mTvDate.getText().toString().trim();
|
||||||
|
@ -1,13 +1,30 @@
|
|||||||
package com.tengshisoft.gridmodule.incident.activitys.schools;
|
package com.tengshisoft.gridmodule.incident.activitys.schools;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.MotionEvent;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
import android.widget.ZoomControls;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
|
import com.baidu.mapapi.map.BaiduMap;
|
||||||
|
import com.baidu.mapapi.map.BitmapDescriptor;
|
||||||
|
import com.baidu.mapapi.map.BitmapDescriptorFactory;
|
||||||
|
import com.baidu.mapapi.map.MapStatus;
|
||||||
|
import com.baidu.mapapi.map.MapStatusUpdate;
|
||||||
|
import com.baidu.mapapi.map.MapStatusUpdateFactory;
|
||||||
|
import com.baidu.mapapi.map.MarkerOptions;
|
||||||
|
import com.baidu.mapapi.map.TextureMapView;
|
||||||
|
import com.baidu.mapapi.model.LatLng;
|
||||||
import com.tengshisoft.commonmodule.beans.SchoolCaseDetailBean;
|
import com.tengshisoft.commonmodule.beans.SchoolCaseDetailBean;
|
||||||
import com.tengshisoft.commonmodule.nets.GridApis;
|
import com.tengshisoft.commonmodule.nets.GridApis;
|
||||||
import com.tengshisoft.gridmodule.R;
|
import com.tengshisoft.gridmodule.R;
|
||||||
import com.tengshisoft.gridmodule.R2;
|
import com.tengshisoft.gridmodule.R2;
|
||||||
|
import com.tengshisoft.modulemap.common.Location84;
|
||||||
|
import com.tengshisoft.modulemap.common.PointUtils;
|
||||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||||
@ -66,6 +83,12 @@ public class SchoolCaseDetailActivity extends BaseActivity {
|
|||||||
TextView mTvDetect;
|
TextView mTvDetect;
|
||||||
@BindView(R2.id.nsv_content)
|
@BindView(R2.id.nsv_content)
|
||||||
NestedScrollView mNsvContent;
|
NestedScrollView mNsvContent;
|
||||||
|
@BindView(R2.id.tv_grid)
|
||||||
|
TextView mTvGrid;
|
||||||
|
@BindView(R2.id.tv_address_sel)
|
||||||
|
TextView mTvAddressSel;
|
||||||
|
@BindView(R2.id.tmv_map)
|
||||||
|
TextureMapView mTmvMap;
|
||||||
private SchoolCaseDetailBean mBean;
|
private SchoolCaseDetailBean mBean;
|
||||||
private String mId;
|
private String mId;
|
||||||
|
|
||||||
@ -94,6 +117,7 @@ public class SchoolCaseDetailActivity extends BaseActivity {
|
|||||||
ButterKnife.bind(this);
|
ButterKnife.bind(this);
|
||||||
mTvBaseTitle.setText("涉及师生安全案件详情");
|
mTvBaseTitle.setText("涉及师生安全案件详情");
|
||||||
mId = getIntent().getStringExtra("id");
|
mId = getIntent().getStringExtra("id");
|
||||||
|
initMap();
|
||||||
getDetailData();
|
getDetailData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,33 +126,86 @@ public class SchoolCaseDetailActivity extends BaseActivity {
|
|||||||
*/
|
*/
|
||||||
private void getDetailData() {
|
private void getDetailData() {
|
||||||
RetrofitManager.getInstance()
|
RetrofitManager.getInstance()
|
||||||
.create(GridApis.class)
|
.create(GridApis.class)
|
||||||
.getSchoolCaseDetailById(mId, UserLgUtils.getToken())
|
.getSchoolCaseDetailById(mId, UserLgUtils.getToken())
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Observer<SchoolCaseDetailBean>() {
|
.subscribe(new Observer<SchoolCaseDetailBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@NonNull Disposable d) {
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(@NonNull SchoolCaseDetailBean schoolCaseDetailBean) {
|
public void onNext(@NonNull SchoolCaseDetailBean schoolCaseDetailBean) {
|
||||||
mBean = schoolCaseDetailBean;
|
mBean = schoolCaseDetailBean;
|
||||||
setDataToView();
|
setDataToView();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(@NonNull Throwable e) {
|
public void onError(@NonNull Throwable e) {
|
||||||
refreshView(STATE_LOAD_ERROR);
|
refreshView(STATE_LOAD_ERROR);
|
||||||
ExceptionHandler.handleException(e);
|
ExceptionHandler.handleException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private BaiduMap mBaiduMap;
|
||||||
|
private BitmapDescriptor mBitMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化地图
|
||||||
|
*/
|
||||||
|
@SuppressLint("ClickableViewAccessibility")
|
||||||
|
private void initMap() {
|
||||||
|
mTmvMap.showZoomControls(false);//缩放控件
|
||||||
|
mTmvMap.showScaleControl(false);//比例尺
|
||||||
|
mBaiduMap = mTmvMap.getMap();
|
||||||
|
mBaiduMap.setMapType(BaiduMap.MAP_TYPE_NORMAL);
|
||||||
|
mBaiduMap.setMyLocationEnabled(true);
|
||||||
|
View childAt = mTmvMap.getChildAt(1);
|
||||||
|
if (childAt != null && (childAt instanceof ImageView || childAt instanceof ZoomControls)) {
|
||||||
|
childAt.setVisibility(View.INVISIBLE);
|
||||||
|
}
|
||||||
|
mTmvMap.getChildAt(0).setOnTouchListener((View v, MotionEvent event) -> {
|
||||||
|
if (event.getAction() == MotionEvent.ACTION_UP) {
|
||||||
|
mNsvContent.requestDisallowInterceptTouchEvent(false);
|
||||||
|
} else {
|
||||||
|
mNsvContent.requestDisallowInterceptTouchEvent(true);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
moveMapToCenter(new LatLng(PathConfig.DEFAULT_LAT, PathConfig.DEFAULT_LNG), 14);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将地图移动到定位中心
|
||||||
|
*
|
||||||
|
* @param latLng
|
||||||
|
*/
|
||||||
|
private void moveMapToCenter(LatLng latLng, int room) {
|
||||||
|
MapStatus ms = new MapStatus.Builder().zoom(room).target(latLng).build();
|
||||||
|
MapStatusUpdate u = MapStatusUpdateFactory.newMapStatus(ms);
|
||||||
|
mBaiduMap.setMapStatus(u);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addMarkToMap(double lat, double lng) {
|
||||||
|
mBaiduMap.clear();
|
||||||
|
moveMapToCenter(new LatLng(lat, lng), 18);
|
||||||
|
if (mBitMap == null) {
|
||||||
|
mBitMap = BitmapDescriptorFactory.fromResource(com.tengshisoft.commonmodule.R.drawable.ic_map_location_marker);
|
||||||
|
}
|
||||||
|
MarkerOptions markerOptions = new MarkerOptions()
|
||||||
|
.position(new LatLng(lat, lng))//mark出现的位置
|
||||||
|
.icon(mBitMap) //mark图标
|
||||||
|
.draggable(false)//mark可拖拽
|
||||||
|
.animateType(MarkerOptions.MarkerAnimateType.none);
|
||||||
|
mBaiduMap.addOverlay(markerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -138,6 +215,7 @@ public class SchoolCaseDetailActivity extends BaseActivity {
|
|||||||
refreshView(STATE_LOAD_SUCCESS);
|
refreshView(STATE_LOAD_SUCCESS);
|
||||||
mTvNumber.setText(mBean.getCaseCode());
|
mTvNumber.setText(mBean.getCaseCode());
|
||||||
mTvName.setText(mBean.getCaseName());
|
mTvName.setText(mBean.getCaseName());
|
||||||
|
mTvGrid.setText(mBean.getGridName());
|
||||||
mTvDate.setText(mBean.getHappenTime());
|
mTvDate.setText(mBean.getHappenTime());
|
||||||
mTvArea.setText(mBean.getHappenLocationName());
|
mTvArea.setText(mBean.getHappenLocationName());
|
||||||
mTvAddress.setText(mBean.getHappenAddress());
|
mTvAddress.setText(mBean.getHappenAddress());
|
||||||
@ -151,5 +229,14 @@ public class SchoolCaseDetailActivity extends BaseActivity {
|
|||||||
mTvCatchCount.setText(mBean.getArrestCount() + "");
|
mTvCatchCount.setText(mBean.getArrestCount() + "");
|
||||||
mSwIsCrack.setChecked(mBean.getIsSolve() == 1);
|
mSwIsCrack.setChecked(mBean.getIsSolve() == 1);
|
||||||
mTvDetect.setText(Html.fromHtml(mBean.getCaseSolve()));
|
mTvDetect.setText(Html.fromHtml(mBean.getCaseSolve()));
|
||||||
|
if (!TextUtils.isEmpty(mBean.getLatitude()) && !TextUtils.isEmpty(mBean.getLongitude())) {
|
||||||
|
double mLat = Double.parseDouble(mBean.getLatitude());
|
||||||
|
double mLng = Double.parseDouble(mBean.getLongitude());
|
||||||
|
mTvAddressSel.setText(mLat + "-" + mLng);
|
||||||
|
Location84 loc = PointUtils.wgs84ToBd09(new Location84(mLat, mLng));
|
||||||
|
addMarkToMap(loc.getLat(), loc.getLng());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,7 @@
|
|||||||
package com.tengshisoft.gridmodule.incident.activitys.schools;
|
package com.tengshisoft.gridmodule.incident.activitys.schools;
|
||||||
|
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
|
import android.content.Intent;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -11,6 +12,7 @@ import android.widget.LinearLayout;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
@ -77,14 +79,10 @@ public class SchoolEmphasesAddActivity extends BaseActivity {
|
|||||||
TextView mTvBaseIdCard;
|
TextView mTvBaseIdCard;
|
||||||
@BindView(R2.id.tv_base_phone)
|
@BindView(R2.id.tv_base_phone)
|
||||||
TextView mTvBasePhone;
|
TextView mTvBasePhone;
|
||||||
@BindView(R2.id.tv_base_native)
|
|
||||||
TextView mTvBaseNative;
|
|
||||||
@BindView(R2.id.tv_base_nation)
|
@BindView(R2.id.tv_base_nation)
|
||||||
TextView mTvBaseNation;
|
TextView mTvBaseNation;
|
||||||
@BindView(R2.id.tv_base_register_loc)
|
@BindView(R2.id.tv_base_register_loc)
|
||||||
TextView mTvBaseRegisterLoc;
|
TextView mTvBaseRegisterLoc;
|
||||||
@BindView(R2.id.tv_base_cur_loc)
|
|
||||||
TextView mTvBaseCurLoc;
|
|
||||||
@BindView(R2.id.tv_base_cur_address)
|
@BindView(R2.id.tv_base_cur_address)
|
||||||
TextView mTvBaseCurAddress;
|
TextView mTvBaseCurAddress;
|
||||||
@BindView(R2.id.cv_base_info_detail)
|
@BindView(R2.id.cv_base_info_detail)
|
||||||
@ -97,6 +95,12 @@ public class SchoolEmphasesAddActivity extends BaseActivity {
|
|||||||
Button mBtnConfirm;
|
Button mBtnConfirm;
|
||||||
@BindView(R2.id.ll_content)
|
@BindView(R2.id.ll_content)
|
||||||
LinearLayout mLlContent;
|
LinearLayout mLlContent;
|
||||||
|
@BindView(R2.id.tv_base_area)
|
||||||
|
TextView mTvBaseArea;
|
||||||
|
@BindView(R2.id.tv_base_grid)
|
||||||
|
TextView mTvBaseGrid;
|
||||||
|
@BindView(R2.id.tv_address_sel)
|
||||||
|
TextView mTvAddressSel;
|
||||||
private Unbinder mBind;
|
private Unbinder mBind;
|
||||||
private String mPersonId;
|
private String mPersonId;
|
||||||
private String mId;
|
private String mId;
|
||||||
@ -108,6 +112,8 @@ public class SchoolEmphasesAddActivity extends BaseActivity {
|
|||||||
private List<DicBean> mTypeList;
|
private List<DicBean> mTypeList;
|
||||||
private DicBean mSelType;
|
private DicBean mSelType;
|
||||||
|
|
||||||
|
private double mLat;
|
||||||
|
private double mLng;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int setLayoutId() {
|
protected int setLayoutId() {
|
||||||
@ -154,40 +160,40 @@ public class SchoolEmphasesAddActivity extends BaseActivity {
|
|||||||
* 获取详情
|
* 获取详情
|
||||||
*/
|
*/
|
||||||
private void getDetailData() {
|
private void getDetailData() {
|
||||||
Observable<PersonSearchBean> personBaseBean = RetrofitManager.getInstance().create(GridApis.class).getBaseInfoDetailById(mPersonId, UserLgUtils.getToken());
|
Observable<PersonSearchBean> personBaseBean = RetrofitManager.getInstance().create(BaseApiService.class).doSearchPerson(mPersonId, UserLgUtils.getToken());
|
||||||
Observable<SchoolEmphasesPersonDetailBean> detailById = RetrofitManager.getInstance().create(GridApis.class).getSchoolEmphasesPersonDetailById(mId, UserLgUtils.getToken());
|
Observable<SchoolEmphasesPersonDetailBean> detailById = RetrofitManager.getInstance().create(GridApis.class).getSchoolEmphasesPersonDetailById(mId, UserLgUtils.getToken());
|
||||||
Observable.mergeDelayError(personBaseBean, detailById)
|
Observable.mergeDelayError(personBaseBean, detailById)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Observer<Object>() {
|
.subscribe(new Observer<Object>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@NonNull Disposable d) {
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(@NonNull Object o) {
|
||||||
|
if (o instanceof PersonSearchBean) {
|
||||||
|
mBaseInfo = (PersonSearchBean) o;
|
||||||
|
setBaseInfo();
|
||||||
|
} else if (o instanceof SchoolEmphasesPersonDetailBean) {
|
||||||
|
mDetailBean = (SchoolEmphasesPersonDetailBean) o;
|
||||||
|
setInfo();
|
||||||
}
|
}
|
||||||
|
refreshView(STATE_LOAD_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(@NonNull Object o) {
|
public void onError(@NonNull Throwable e) {
|
||||||
if (o instanceof PersonSearchBean) {
|
ExceptionHandler.handleException(e);
|
||||||
mBaseInfo = (PersonSearchBean) o;
|
refreshView(STATE_LOAD_ERROR);
|
||||||
setBaseInfo();
|
}
|
||||||
} else if (o instanceof SchoolEmphasesPersonDetailBean) {
|
|
||||||
mDetailBean = (SchoolEmphasesPersonDetailBean) o;
|
|
||||||
setInfo();
|
|
||||||
}
|
|
||||||
refreshView(STATE_LOAD_SUCCESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(@NonNull Throwable e) {
|
public void onComplete() {
|
||||||
ExceptionHandler.handleException(e);
|
|
||||||
refreshView(STATE_LOAD_ERROR);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
}
|
||||||
public void onComplete() {
|
});
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -202,7 +208,13 @@ public class SchoolEmphasesAddActivity extends BaseActivity {
|
|||||||
mSelType.setDataName(mDetailBean.getDegreeOfHarmName());
|
mSelType.setDataName(mDetailBean.getDegreeOfHarmName());
|
||||||
mTvHarm.setText(mDetailBean.getDegreeOfHarmName());
|
mTvHarm.setText(mDetailBean.getDegreeOfHarmName());
|
||||||
mSwAttention.setChecked(mDetailBean.getIsFollow() == 1);
|
mSwAttention.setChecked(mDetailBean.getIsFollow() == 1);
|
||||||
|
|
||||||
mIsAttention = mDetailBean.getIsFollow();
|
mIsAttention = mDetailBean.getIsFollow();
|
||||||
|
if (!TextUtils.isEmpty(mDetailBean.getLatitude()) && !TextUtils.isEmpty(mDetailBean.getLongitude())) {
|
||||||
|
mLat = Double.parseDouble(mDetailBean.getLatitude());
|
||||||
|
mLng = Double.parseDouble(mDetailBean.getLongitude());
|
||||||
|
mTvAddressSel.setText(mLat + "-" + mLng);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -214,6 +226,9 @@ public class SchoolEmphasesAddActivity extends BaseActivity {
|
|||||||
mIvClear.setOnClickListener(v -> mEtSearchCentent.setText(""));
|
mIvClear.setOnClickListener(v -> mEtSearchCentent.setText(""));
|
||||||
mTvHarm.setOnClickListener(v -> onShowHarm());
|
mTvHarm.setOnClickListener(v -> onShowHarm());
|
||||||
mSwAttention.setOnCheckedChangeListener((buttonView, isChecked) -> mIsAttention = isChecked ? 1 : 0);
|
mSwAttention.setOnCheckedChangeListener((buttonView, isChecked) -> mIsAttention = isChecked ? 1 : 0);
|
||||||
|
mTvAddressSel.setOnClickListener(v -> ARouter.getInstance()
|
||||||
|
.build(PathConfig.PATH_MODULE_MAP_SEL_POINT)
|
||||||
|
.navigation(mActivity, 16));
|
||||||
mBtnConfirm.setOnClickListener(v -> doConfirm());
|
mBtnConfirm.setOnClickListener(v -> doConfirm());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,6 +245,18 @@ public class SchoolEmphasesAddActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
|
if (resultCode == 22) {
|
||||||
|
if (requestCode == 16) {
|
||||||
|
mLat = data.getDoubleExtra("lat", -1);
|
||||||
|
mLng = data.getDoubleExtra("lng", -1);
|
||||||
|
mTvAddressSel.setText(mLat + "-" + mLng);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑
|
* 编辑
|
||||||
*/
|
*/
|
||||||
@ -239,35 +266,35 @@ public class SchoolEmphasesAddActivity extends BaseActivity {
|
|||||||
dialog.show();
|
dialog.show();
|
||||||
RequestBody body = buildParams();
|
RequestBody body = buildParams();
|
||||||
RetrofitManager.getInstance()
|
RetrofitManager.getInstance()
|
||||||
.create(GridApis.class)
|
.create(GridApis.class)
|
||||||
.doEditSchoolEmphases(mId, body, UserLgUtils.getToken())
|
.doEditSchoolEmphases(mId, body, UserLgUtils.getToken())
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Observer<SuccessBean>() {
|
.subscribe(new Observer<SuccessBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@NonNull Disposable d) {
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(@NonNull SuccessBean successBean) {
|
public void onNext(@NonNull SuccessBean successBean) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
ToastUtils.show("修改成功");
|
ToastUtils.show("修改成功");
|
||||||
setResult(13);
|
setResult(13);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(@NonNull Throwable e) {
|
public void onError(@NonNull Throwable e) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
ExceptionHandler.handleException(e);
|
ExceptionHandler.handleException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -280,35 +307,35 @@ public class SchoolEmphasesAddActivity extends BaseActivity {
|
|||||||
dialog.show();
|
dialog.show();
|
||||||
RequestBody body = buildParams();
|
RequestBody body = buildParams();
|
||||||
RetrofitManager.getInstance()
|
RetrofitManager.getInstance()
|
||||||
.create(GridApis.class)
|
.create(GridApis.class)
|
||||||
.doSaveSchoolEmphases(body, UserLgUtils.getToken())
|
.doSaveSchoolEmphases(body, UserLgUtils.getToken())
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Observer<SuccessBean>() {
|
.subscribe(new Observer<SuccessBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@NonNull Disposable d) {
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(@NonNull SuccessBean successBean) {
|
public void onNext(@NonNull SuccessBean successBean) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
ToastUtils.show("录入成功");
|
ToastUtils.show("录入成功");
|
||||||
setResult(13);
|
setResult(13);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(@NonNull Throwable e) {
|
public void onError(@NonNull Throwable e) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
ExceptionHandler.handleException(e);
|
ExceptionHandler.handleException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -324,6 +351,10 @@ public class SchoolEmphasesAddActivity extends BaseActivity {
|
|||||||
ToastUtils.show("请选择危害程度");
|
ToastUtils.show("请选择危害程度");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (mLat == 0 || mLng == 0) {
|
||||||
|
ToastUtils.show("请选择所在经纬度");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,12 +363,18 @@ public class SchoolEmphasesAddActivity extends BaseActivity {
|
|||||||
*/
|
*/
|
||||||
private RequestBody buildParams() {
|
private RequestBody buildParams() {
|
||||||
SaveEmphasesBean bean = new SaveEmphasesBean();
|
SaveEmphasesBean bean = new SaveEmphasesBean();
|
||||||
bean.setBaseId(mBaseInfo.getBasePopulationInfoId());
|
bean.setBaseId(mBaseInfo.getIdCardNumber());
|
||||||
bean.setSchoolId(mSchoolId);
|
bean.setSchoolId(mSchoolId);
|
||||||
bean.setDegreeOfHarm(mSelType.getDataId());
|
bean.setDegreeOfHarm(mSelType.getDataId());
|
||||||
bean.setDegreeOfHarmCode(mSelType.getDataSummary());
|
bean.setDegreeOfHarmCode(mSelType.getDataSummary());
|
||||||
bean.setDegreeOfHarmName(mSelType.getDataName());
|
bean.setDegreeOfHarmName(mSelType.getDataName());
|
||||||
bean.setIsFollow(mIsAttention);
|
bean.setIsFollow(mIsAttention);
|
||||||
|
bean.setGrid(mBaseInfo.getGridId());
|
||||||
|
bean.setLatitude(mLat + "");
|
||||||
|
bean.setLongitude(mLng + "");
|
||||||
|
bean.setLocation(mBaseInfo.getAreaNames());
|
||||||
|
bean.setLocationCode(mBaseInfo.getAreaCode());
|
||||||
|
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
String obj = gson.toJson(bean);
|
String obj = gson.toJson(bean);
|
||||||
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||||
@ -355,11 +392,11 @@ public class SchoolEmphasesAddActivity extends BaseActivity {
|
|||||||
mSelType = mTypeList.get(o1);
|
mSelType = mTypeList.get(o1);
|
||||||
mTvHarm.setText(mSelType.getDataName());
|
mTvHarm.setText(mSelType.getDataName());
|
||||||
})
|
})
|
||||||
.setTitleText("请选择")
|
.setTitleText("请选择")
|
||||||
.setCancelColor(Color.parseColor("#1189FF"))
|
.setCancelColor(Color.parseColor("#1189FF"))
|
||||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||||
.setTitleColor(Color.parseColor("#1189FF"))
|
.setTitleColor(Color.parseColor("#1189FF"))
|
||||||
.build();
|
.build();
|
||||||
mTypePicker.setPicker(mTypeList);
|
mTypePicker.setPicker(mTypeList);
|
||||||
}
|
}
|
||||||
mTypePicker.show();
|
mTypePicker.show();
|
||||||
@ -375,42 +412,42 @@ public class SchoolEmphasesAddActivity extends BaseActivity {
|
|||||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
||||||
dialog.show();
|
dialog.show();
|
||||||
RetrofitManager.getInstance()
|
RetrofitManager.getInstance()
|
||||||
.create(GridApis.class)
|
.create(GridApis.class)
|
||||||
.getDictListAllByPid(pId, UserLgUtils.getToken())
|
.getDictListAllByPid(pId, UserLgUtils.getToken())
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Observer<List<DicBean>>() {
|
.subscribe(new Observer<List<DicBean>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@NonNull Disposable d) {
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(@NonNull List<DicBean> typeListBeans) {
|
public void onNext(@NonNull List<DicBean> typeListBeans) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
if (typeListBeans.size() > 0) {
|
if (typeListBeans.size() > 0) {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 1:
|
case 1:
|
||||||
mTypeList = typeListBeans;
|
mTypeList = typeListBeans;
|
||||||
onShowHarm();
|
onShowHarm();
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
} else {
|
|
||||||
ToastUtils.show("暂无数据");
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
ToastUtils.show("暂无数据");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(@NonNull Throwable e) {
|
public void onError(@NonNull Throwable e) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
ExceptionHandler.handleException(e);
|
ExceptionHandler.handleException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() {
|
public void onComplete() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -426,39 +463,39 @@ public class SchoolEmphasesAddActivity extends BaseActivity {
|
|||||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "查询中...");
|
ProgressDialog dialog = UIUtil.initDialog(mActivity, "查询中...");
|
||||||
dialog.show();
|
dialog.show();
|
||||||
RetrofitManager.getInstance()
|
RetrofitManager.getInstance()
|
||||||
.create(BaseApiService.class)
|
.create(BaseApiService.class)
|
||||||
.doSearchPerson(searchIdCard, UserLgUtils.getToken())
|
.doSearchPerson(searchIdCard, UserLgUtils.getToken())
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Observer<PersonSearchBean>() {
|
.subscribe(new Observer<PersonSearchBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@NonNull Disposable d) {
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(@NonNull PersonSearchBean infoBean1) {
|
||||||
|
dialog.dismiss();
|
||||||
|
if (!TextUtils.isEmpty(infoBean1.getIdCardNumber())) {
|
||||||
|
//设置基础信息
|
||||||
|
mBaseInfo = infoBean1;
|
||||||
|
setBaseInfo();
|
||||||
|
} else {
|
||||||
|
ToastUtils.show("未查询到该人员的基础信息,请完善基础信息");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(@NonNull PersonSearchBean infoBean1) {
|
public void onError(@NonNull Throwable e) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
if (!TextUtils.isEmpty(infoBean1.getIdCardNumber())) {
|
ExceptionHandler.handleException(e);
|
||||||
//设置基础信息
|
}
|
||||||
mBaseInfo = infoBean1;
|
|
||||||
setBaseInfo();
|
|
||||||
} else {
|
|
||||||
ToastUtils.show("未查询到该人员的基础信息,请完善基础信息");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(@NonNull Throwable e) {
|
public void onComplete() {
|
||||||
dialog.dismiss();
|
|
||||||
ExceptionHandler.handleException(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
}
|
||||||
public void onComplete() {
|
});
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -467,15 +504,17 @@ public class SchoolEmphasesAddActivity extends BaseActivity {
|
|||||||
* 基础信息
|
* 基础信息
|
||||||
*/
|
*/
|
||||||
private void setBaseInfo() {
|
private void setBaseInfo() {
|
||||||
|
mTvBaseGrid.setText(mBaseInfo.getGridName());
|
||||||
|
mTvBaseArea.setText(mBaseInfo.getAreaNames());
|
||||||
mTvBaseName.setText(mBaseInfo.getFullName());
|
mTvBaseName.setText(mBaseInfo.getFullName());
|
||||||
mTvBaseFormerName.setText(mBaseInfo.getNameUsedBefore());
|
mTvBaseFormerName.setText(mBaseInfo.getNameUsedBefore());
|
||||||
mTvBaseGender.setText(mBaseInfo.getGenderDictionaryName());
|
mTvBaseGender.setText(mBaseInfo.getGenderDictionaryName());
|
||||||
mTvBaseIdCard.setText(mBaseInfo.getIdCardNumber());//身份证
|
mTvBaseIdCard.setText(mBaseInfo.getIdCardNumber());//身份证
|
||||||
mTvBasePhone.setText(mBaseInfo.getTelephone());//联系电话
|
mTvBasePhone.setText(mBaseInfo.getTelephone());//联系电话
|
||||||
mTvBaseNative.setText(mBaseInfo.getNativePlaceDictionaryName());//籍贯
|
// mTvBaseNative.setText(mBaseInfo.getNativePlaceDictionaryName());//籍贯
|
||||||
mTvBaseNation.setText(mBaseInfo.getNationDictionaryName());//名族
|
mTvBaseNation.setText(mBaseInfo.getNationDictionaryName());//名族
|
||||||
mTvBaseRegisterLoc.setText(mBaseInfo.getRegisteredResidenceDictionaryName());//户籍地
|
mTvBaseRegisterLoc.setText(mBaseInfo.getNativePlaceAddr());//户籍地
|
||||||
mTvBaseCurLoc.setText(mBaseInfo.getCurrentResidenceDictionaryName());//现住址
|
// mTvBaseCurLoc.setText(mBaseInfo.getCurrentResidenceDictionaryName());//现住址
|
||||||
mTvBaseCurAddress.setText(mBaseInfo.getCurrentResidenceAddr());//现住址详情
|
mTvBaseCurAddress.setText(mBaseInfo.getCurrentResidenceAddr());//现住址详情
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -11,6 +11,7 @@ import com.tengshisoft.gridmodule.R2;
|
|||||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||||
import com.tenlionsoft.baselib.core.beans.PersonSearchBean;
|
import com.tenlionsoft.baselib.core.beans.PersonSearchBean;
|
||||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||||
|
import com.tenlionsoft.baselib.core.retrofit_net.api.BaseApiService;
|
||||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||||
@ -47,14 +48,10 @@ public class SchoolEmphasesDetailActivity extends BaseActivity {
|
|||||||
TextView mTvBaseIdCard;
|
TextView mTvBaseIdCard;
|
||||||
@BindView(R2.id.tv_base_phone)
|
@BindView(R2.id.tv_base_phone)
|
||||||
TextView mTvBasePhone;
|
TextView mTvBasePhone;
|
||||||
@BindView(R2.id.tv_base_native)
|
|
||||||
TextView mTvBaseNative;
|
|
||||||
@BindView(R2.id.tv_base_nation)
|
@BindView(R2.id.tv_base_nation)
|
||||||
TextView mTvBaseNation;
|
TextView mTvBaseNation;
|
||||||
@BindView(R2.id.tv_base_register_loc)
|
@BindView(R2.id.tv_base_register_loc)
|
||||||
TextView mTvBaseRegisterLoc;
|
TextView mTvBaseRegisterLoc;
|
||||||
@BindView(R2.id.tv_base_cur_loc)
|
|
||||||
TextView mTvBaseCurLoc;
|
|
||||||
@BindView(R2.id.tv_base_cur_address)
|
@BindView(R2.id.tv_base_cur_address)
|
||||||
TextView mTvBaseCurAddress;
|
TextView mTvBaseCurAddress;
|
||||||
@BindView(R2.id.cv_base_info_detail)
|
@BindView(R2.id.cv_base_info_detail)
|
||||||
@ -65,6 +62,12 @@ public class SchoolEmphasesDetailActivity extends BaseActivity {
|
|||||||
SwitchCompat mSwAttention;
|
SwitchCompat mSwAttention;
|
||||||
@BindView(R2.id.ll_content)
|
@BindView(R2.id.ll_content)
|
||||||
LinearLayout mLlContent;
|
LinearLayout mLlContent;
|
||||||
|
@BindView(R2.id.tv_base_area)
|
||||||
|
TextView mTvBaseArea;
|
||||||
|
@BindView(R2.id.tv_base_grid)
|
||||||
|
TextView mTvBaseGrid;
|
||||||
|
@BindView(R2.id.tv_address_sel)
|
||||||
|
TextView mTvAddressSel;
|
||||||
private Unbinder mBind;
|
private Unbinder mBind;
|
||||||
private PersonSearchBean mBaseInfo;
|
private PersonSearchBean mBaseInfo;
|
||||||
private SchoolEmphasesPersonDetailBean mDetailBean;
|
private SchoolEmphasesPersonDetailBean mDetailBean;
|
||||||
@ -104,40 +107,40 @@ public class SchoolEmphasesDetailActivity extends BaseActivity {
|
|||||||
* 获取详情
|
* 获取详情
|
||||||
*/
|
*/
|
||||||
private void getDetailData() {
|
private void getDetailData() {
|
||||||
Observable<PersonSearchBean> personBaseBean = RetrofitManager.getInstance().create(GridApis.class).getBaseInfoDetailById(mPersonId, UserLgUtils.getToken());
|
Observable<PersonSearchBean> personBaseBean = RetrofitManager.getInstance().create(BaseApiService.class).doSearchPerson(mPersonId, UserLgUtils.getToken());
|
||||||
Observable<SchoolEmphasesPersonDetailBean> detailById = RetrofitManager.getInstance().create(GridApis.class).getSchoolEmphasesPersonDetailById(mId, UserLgUtils.getToken());
|
Observable<SchoolEmphasesPersonDetailBean> detailById = RetrofitManager.getInstance().create(GridApis.class).getSchoolEmphasesPersonDetailById(mId, UserLgUtils.getToken());
|
||||||
Observable.mergeDelayError(personBaseBean, detailById)
|
Observable.mergeDelayError(personBaseBean, detailById)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Observer<Object>() {
|
.subscribe(new Observer<Object>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(@NonNull Disposable d) {
|
public void onSubscribe(@NonNull Disposable d) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNext(@NonNull Object o) {
|
||||||
|
if (o instanceof PersonSearchBean) {
|
||||||
|
mBaseInfo = (PersonSearchBean) o;
|
||||||
|
setBaseInfo();
|
||||||
|
} else if (o instanceof SchoolEmphasesPersonDetailBean) {
|
||||||
|
mDetailBean = (SchoolEmphasesPersonDetailBean) o;
|
||||||
|
setInfo();
|
||||||
}
|
}
|
||||||
|
refreshView(STATE_LOAD_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNext(@NonNull Object o) {
|
public void onError(@NonNull Throwable e) {
|
||||||
if (o instanceof PersonSearchBean) {
|
ExceptionHandler.handleException(e);
|
||||||
mBaseInfo = (PersonSearchBean) o;
|
refreshView(STATE_LOAD_ERROR);
|
||||||
setBaseInfo();
|
}
|
||||||
} else if (o instanceof SchoolEmphasesPersonDetailBean) {
|
|
||||||
mDetailBean = (SchoolEmphasesPersonDetailBean) o;
|
|
||||||
setInfo();
|
|
||||||
}
|
|
||||||
refreshView(STATE_LOAD_SUCCESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(@NonNull Throwable e) {
|
public void onComplete() {
|
||||||
ExceptionHandler.handleException(e);
|
|
||||||
refreshView(STATE_LOAD_ERROR);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
}
|
||||||
public void onComplete() {
|
});
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -148,6 +151,7 @@ public class SchoolEmphasesDetailActivity extends BaseActivity {
|
|||||||
private void setInfo() {
|
private void setInfo() {
|
||||||
mTvHarm.setText(mDetailBean.getDegreeOfHarmName());
|
mTvHarm.setText(mDetailBean.getDegreeOfHarmName());
|
||||||
mSwAttention.setChecked(mDetailBean.getIsFollow() == 1);
|
mSwAttention.setChecked(mDetailBean.getIsFollow() == 1);
|
||||||
|
mTvAddressSel.setText(mDetailBean.getLatitude() + "-" + mDetailBean.getLongitude());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -155,15 +159,17 @@ public class SchoolEmphasesDetailActivity extends BaseActivity {
|
|||||||
* 基础信息
|
* 基础信息
|
||||||
*/
|
*/
|
||||||
private void setBaseInfo() {
|
private void setBaseInfo() {
|
||||||
|
mTvBaseGrid.setText(mBaseInfo.getGridName());
|
||||||
|
mTvBaseArea.setText(mBaseInfo.getAreaNames());
|
||||||
mTvBaseName.setText(mBaseInfo.getFullName());
|
mTvBaseName.setText(mBaseInfo.getFullName());
|
||||||
mTvBaseFormerName.setText(mBaseInfo.getNameUsedBefore());
|
mTvBaseFormerName.setText(mBaseInfo.getNameUsedBefore());
|
||||||
mTvBaseGender.setText(mBaseInfo.getGenderDictionaryName());
|
mTvBaseGender.setText(mBaseInfo.getGenderDictionaryName());
|
||||||
mTvBaseIdCard.setText(mBaseInfo.getIdCardNumber());//身份证
|
mTvBaseIdCard.setText(mBaseInfo.getIdCardNumber());//身份证
|
||||||
mTvBasePhone.setText(mBaseInfo.getTelephone());//联系电话
|
mTvBasePhone.setText(mBaseInfo.getTelephone());//联系电话
|
||||||
mTvBaseNative.setText(mBaseInfo.getNativePlaceDictionaryName());//籍贯
|
// mTvBaseNative.setText(mBaseInfo.getNativePlaceDictionaryName());//籍贯
|
||||||
mTvBaseNation.setText(mBaseInfo.getNationDictionaryName());//名族
|
mTvBaseNation.setText(mBaseInfo.getNationDictionaryName());//名族
|
||||||
mTvBaseRegisterLoc.setText(mBaseInfo.getRegisteredResidenceDictionaryName());//户籍地
|
mTvBaseRegisterLoc.setText(mBaseInfo.getNativePlaceAddr());//户籍地
|
||||||
mTvBaseCurLoc.setText(mBaseInfo.getCurrentResidenceDictionaryName());//现住址
|
// mTvBaseCurLoc.setText(mBaseInfo.getCurrentResidenceDictionaryName());//现住址
|
||||||
mTvBaseCurAddress.setText(mBaseInfo.getCurrentResidenceAddr());//现住址详情
|
mTvBaseCurAddress.setText(mBaseInfo.getCurrentResidenceAddr());//现住址详情
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,7 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
@ -38,6 +37,25 @@
|
|||||||
android:text="案(事)件信息"
|
android:text="案(事)件信息"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<LinearLayout style="@style/item_gray">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
style="@style/style_hint_star"
|
||||||
|
android:visibility="visible" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/item_title"
|
||||||
|
android:text="所在网格" />
|
||||||
|
|
||||||
|
<View style="@style/vertical_line" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_grid"
|
||||||
|
style="@style/sel_text_arrow"
|
||||||
|
android:hint="请选择案件所在网格" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout style="@style/item_gray">
|
<LinearLayout style="@style/item_gray">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@ -132,6 +150,32 @@
|
|||||||
android:inputType="text" />
|
android:inputType="text" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout style="@style/item_gray">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
style="@style/style_hint_star"
|
||||||
|
android:visibility="visible" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/item_title"
|
||||||
|
android:text="位置坐标" />
|
||||||
|
|
||||||
|
<View style="@style/vertical_line" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_address_sel"
|
||||||
|
style="@style/sel_text_arrow"
|
||||||
|
android:hint="请选择位置坐标" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout style="@style/item_gray_vertical_top">
|
||||||
|
|
||||||
|
<com.baidu.mapapi.map.TextureMapView
|
||||||
|
android:id="@+id/tmv_map"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="200dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout style="@style/item_gray">
|
<LinearLayout style="@style/item_gray">
|
||||||
|
|
||||||
<ImageView style="@style/style_hint_star" />
|
<ImageView style="@style/style_hint_star" />
|
||||||
|
@ -38,6 +38,21 @@
|
|||||||
android:text="案(事)件信息"
|
android:text="案(事)件信息"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout style="@style/item_gray">
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/item_title"
|
||||||
|
android:text="所在网格" />
|
||||||
|
|
||||||
|
<View style="@style/vertical_line" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_grid"
|
||||||
|
style="@style/item_content" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout style="@style/item_gray">
|
<LinearLayout style="@style/item_gray">
|
||||||
|
|
||||||
|
|
||||||
@ -107,6 +122,31 @@
|
|||||||
style="@style/item_content" />
|
style="@style/item_content" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout style="@style/item_gray">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
style="@style/style_hint_star"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/item_title"
|
||||||
|
android:text="位置坐标" />
|
||||||
|
|
||||||
|
<View style="@style/vertical_line" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_address_sel"
|
||||||
|
style="@style/item_content" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout style="@style/item_gray_vertical_top">
|
||||||
|
|
||||||
|
<com.baidu.mapapi.map.TextureMapView
|
||||||
|
android:id="@+id/tmv_map"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="200dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout style="@style/item_gray">
|
<LinearLayout style="@style/item_gray">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -35,7 +35,8 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/issue_report_title"
|
style="@style/issue_report_title"
|
||||||
@ -94,8 +95,22 @@
|
|||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout style="@style/item_gray">
|
||||||
|
|
||||||
|
<ImageView style="@style/style_hint_star" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/item_title"
|
||||||
|
android:text="经纬度" />
|
||||||
|
|
||||||
|
<View style="@style/vertical_line" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_address_sel"
|
||||||
|
style="@style/sel_text_arrow"
|
||||||
|
android:hint="请选择所在经纬度" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
@ -33,7 +32,8 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
android:paddingBottom="10dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/issue_report_title"
|
style="@style/issue_report_title"
|
||||||
@ -90,10 +90,21 @@
|
|||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout style="@style/item_gray">
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/item_title"
|
||||||
|
android:text="经纬度" />
|
||||||
|
|
||||||
|
<View style="@style/vertical_line" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_address_sel"
|
||||||
|
style="@style/item_content" />
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
@ -345,14 +345,14 @@ public class MainTabActivity extends BaseActivity implements LoginView, LocalBro
|
|||||||
mBnv.setBackgroundStyle(BottomNavigationBar.BACKGROUND_STYLE_STATIC);
|
mBnv.setBackgroundStyle(BottomNavigationBar.BACKGROUND_STYLE_STATIC);
|
||||||
mBnv.setBarBackgroundColor(R.color.white);
|
mBnv.setBarBackgroundColor(R.color.white);
|
||||||
//TODO 根据权限来生成首页
|
//TODO 根据权限来生成首页
|
||||||
BottomNavigationItem gridItem = new BottomNavigationItem(R.drawable.sel_bottom_tab_activity, "首页");//网格员首页
|
BottomNavigationItem gridItem = new BottomNavigationItem(R.drawable.sel_bottom_tab_activity, "网格");//网格员首页
|
||||||
BottomNavigationItem deptItem = new BottomNavigationItem(R.drawable.sel_bottom_tab_activity, "首页");//部门首页
|
BottomNavigationItem deptItem = new BottomNavigationItem(R.drawable.sel_bottom_tab_activity, "部门");//部门首页
|
||||||
BottomNavigationItem centerItem = new BottomNavigationItem(R.drawable.sel_bottom_tab_activity, "首页");//中心端首页
|
BottomNavigationItem centerItem = new BottomNavigationItem(R.drawable.sel_bottom_tab_activity, "中心");//中心端首页
|
||||||
|
|
||||||
mBnv.addItem(gridItem)
|
mBnv.addItem(gridItem)
|
||||||
.addItem(deptItem)
|
.addItem(deptItem)
|
||||||
.addItem(centerItem)
|
|
||||||
.addItem(new BottomNavigationItem(R.drawable.sel_bottom_tab_place, "咨询"))
|
.addItem(new BottomNavigationItem(R.drawable.sel_bottom_tab_place, "咨询"))
|
||||||
|
.addItem(centerItem)
|
||||||
.addItem(new BottomNavigationItem(R.drawable.sel_bottom_tab_mine, "我的"))
|
.addItem(new BottomNavigationItem(R.drawable.sel_bottom_tab_mine, "我的"))
|
||||||
.setFirstSelectedPosition(0)
|
.setFirstSelectedPosition(0)
|
||||||
.initialise();
|
.initialise();
|
||||||
@ -633,7 +633,7 @@ public class MainTabActivity extends BaseActivity implements LoginView, LocalBro
|
|||||||
//1.支持通话,进行登录
|
//1.支持通话,进行登录
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
LogUtils.e("手机支持通话登录中...");
|
LogUtils.e("手机支持通话登录中...");
|
||||||
LoginMangerV2.getInstance().checkLogin("zh-2", "hc123456@", this);
|
LoginMangerV2.getInstance().checkLogin("zh-2", "Huawei@12345", this);
|
||||||
} else {
|
} else {
|
||||||
//TODO 通知对方,手机不支持通话
|
//TODO 通知对方,手机不支持通话
|
||||||
sendBroadcast(new Intent(PathConfig.ACTION_CALL_OTHER_NO_SUPPORT));
|
sendBroadcast(new Intent(PathConfig.ACTION_CALL_OTHER_NO_SUPPORT));
|
||||||
|
Loading…
Reference in New Issue
Block a user