GIS地图版
@ -11,12 +11,12 @@
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/GisMap" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
<option value="$PROJECT_DIR$/baselib" />
|
||||
<option value="$PROJECT_DIR$/chatmodule" />
|
||||
<option value="$PROJECT_DIR$/commandmodule" />
|
||||
<option value="$PROJECT_DIR$/commonmodule" />
|
||||
<option value="$PROJECT_DIR$/gismapmodule" />
|
||||
<option value="$PROJECT_DIR$/gridmodule" />
|
||||
<option value="$PROJECT_DIR$/mainmodule" />
|
||||
<option value="$PROJECT_DIR$/moduleijkplayer" />
|
||||
|
@ -50,7 +50,7 @@ dependencies {
|
||||
implementation project(':gridmodule')//网格员端
|
||||
implementation project(':commandmodule')//中心端
|
||||
implementation project(':supervisionmodule')//部门端
|
||||
implementation project(':GisMap')
|
||||
implementation project(':gismapmodule')
|
||||
}
|
||||
//ARouter
|
||||
api "com.alibaba:arouter-api:$rootProject.ext.gRouterApiVersion"
|
||||
|
BIN
app/release/app-release.apk
Normal file
@ -10,8 +10,8 @@
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"versionCode": 2,
|
||||
"versionName": "1.0.1",
|
||||
"versionCode": 3,
|
||||
"versionName": "1.0.2",
|
||||
"outputFile": "app-release.apk"
|
||||
}
|
||||
]
|
||||
|
@ -5,13 +5,13 @@
|
||||
<application
|
||||
android:name=".BaseMyApplication"
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:icon="@drawable/app_logo"
|
||||
android:label="@string/app_name"
|
||||
android:maxAspectRatio="2.4"
|
||||
android:networkSecurityConfig="@xml/network_config"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:resizeableActivity="true"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:roundIcon="@drawable/app_logo"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
android:usesCleartextTraffic="true">
|
||||
|
@ -7,6 +7,7 @@ package com.tenlionsoft.baselib.constant;
|
||||
* 描述: 项目基础配置
|
||||
*/
|
||||
public class BaseConfig {
|
||||
// public static final String APP_VERSION_ID = "f311fd32-cd36-45a1-9652-599d5f2c2d4f";/*正式App下载码*/
|
||||
public static final String APP_VERSION_ID = "c16826e7-8cfb-4db1-8844-09d2be697bc7";/*测试App下载码*/
|
||||
public static final String APP_VERSION_ID = "2f384d5c-419d-47a2-94cb-4a05b6f00936";/*测试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下载码*/
|
||||
}
|
||||
|
@ -2,8 +2,6 @@ package com.tenlionsoft.baselib.constant;
|
||||
|
||||
import android.os.Environment;
|
||||
|
||||
import com.tenlionsoft.baselib.app.BaseAppContext;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
@ -15,6 +13,7 @@ public class PathConfig {
|
||||
|
||||
public static final String PROVIDER_URL = "content://com.tengshisoft.citygovernance.content_provider";//内容提供者url
|
||||
public static final String BASE_LAYER = "http://support.supermap.com.cn:8090/iserver/services/map-china400/rest/maps/China";//地图基础图层
|
||||
public static final int CRS = 4326;//坐标系
|
||||
|
||||
/*===========================================*/
|
||||
public static final String ACTION_FROM_SOCKET_PUSH_MSG = "com.tengshisoft.city-governace.push_msg";//系统推送来的消息 根据 推送过来的消息 分为三类 系统消息类 通知类 聊天类 根据type来判断
|
||||
@ -48,7 +47,7 @@ public class PathConfig {
|
||||
public static final String ACTION_CALL_LOGIN_SUCCESS = "com.tengshisoft.city-governance.call_login_local_success";//本地登录成功
|
||||
public static final String ACTION_CALL_LOGIN_OUT = "com.tengshisoft.city-governance.call_login_local_loginout";//通知本地退出登录
|
||||
public static final String ACTION_CALL_LOCAL_PHONE_NO_SUPPORT = "com.tengshisoft.city-governance.call_login_local_no.support";//本地通知手机不支持通话
|
||||
|
||||
public static final String ACTION_NET_CHANGE = "android.net.conn.CONNECTIVITY_CHANGE";//网络状态变化
|
||||
//=============================主页按钮模块类型===========================
|
||||
public static final String SECRET = "CMXX_TOKEN_INFOS";//秘钥
|
||||
public static final String SOCKET_MSG_SECRET = "SocKEtsEcReT_KeY";//消息秘钥
|
||||
@ -68,12 +67,6 @@ public class PathConfig {
|
||||
public static final int CITY_DEFAULT_LEVEL = 3;
|
||||
public static final String DID_CITY_CODE = "640675";//日喀则市编码
|
||||
public static final boolean IS_SECRET = false;//websocket 是否信息是否加密
|
||||
|
||||
//包头坐标 109.926934,40.574501
|
||||
//呼市坐标 40.823879 111.771815
|
||||
//集宁市政府 41.000587 113.138723
|
||||
public static final double LA = 41.000587;//纬度
|
||||
public static final double LO = 113.138723;//经度
|
||||
//百度定位city-code
|
||||
// public static final String CITY_BAIDU_CODE = "168";//乌兰察布市
|
||||
public static final String CITY_BAIDU_CODE = "321";//呼和浩特市
|
||||
@ -84,6 +77,11 @@ public class PathConfig {
|
||||
public static final String DEFAULT_AREA_2_Name = "乌兰察布市";
|
||||
public static final String DEFAULT_AREA_1_CODE = "150000000000";
|
||||
public static final String DEFAULT_AREA_2_CODE = "150900000000";
|
||||
public static final double DEFAULT_LAT = 40.98896497581636;//默认纬度
|
||||
public static final double DEFAULT_LNG = 113.11412662267688;//默认经度
|
||||
public static final int DEFAULT_ZOOM = 15;//地图默认缩放
|
||||
|
||||
|
||||
// 区直领导:b01dac8e-c516-4974-b513-f1352ca40202
|
||||
// 片长:e483f019-d971-49ac-b5fa-3314220da703
|
||||
// N员:bc405346-8714-4ded-89ac-9cc4d755f66a
|
||||
@ -500,8 +498,10 @@ public class PathConfig {
|
||||
/*=========================================中心端============================================*/
|
||||
public static final String PATH_MODULE_COMMAND_ACTIVITY_INCIDENT_ACCEPT_LIST = "/modulecommand/activity/incidentAcceptList";//事件受理列表
|
||||
public static final String PATH_MODULE_COMMAND_ACTIVITY_INCIDENT_ACCEPT_DETAIL = "/modulecommand/activity/incidentAcceptDetail";//事件受理
|
||||
|
||||
public static final String PATH_MODULE_COMMAND_ACTIVITY_INCIDENT_DISPATCH_LIST = "/modulecommand/activity/incidentDispatchList";//事件派遣列表
|
||||
public static final String PATH_MODULE_COMMAND_ACTIVITY_INCIDENT_DISPATCH_DETAIL = "/modulecommand/activity/incidentDispatchDetail";//事件派遣
|
||||
|
||||
public static final String PATH_MODULE_COMMAND_ACTIVITY_INCIDENT_SEL_DEPT = "/modulecommand/activity/incidentDeptSel";//选择组织机构
|
||||
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.tenlionsoft.baselib.core.retrofit_net;
|
||||
|
||||
import com.tenlionsoft.baselib.constant.BaseConfig;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
|
||||
/**
|
||||
* 作者 : Adam on 2018/12/5.
|
||||
@ -10,32 +9,35 @@ import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
*/
|
||||
public class BaseUrlApi {
|
||||
|
||||
// public static final String IP = "http://192.168.0.103:7011/";/* 测试IP */
|
||||
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://1.24.238.149:37210/";/* 正式IP */
|
||||
public static final String SYS_USERCENTER = "usercenter/";
|
||||
public static final String SYS_POPULATION = "population/";/*人口系统*/
|
||||
public static final String SYS_CASE = "case/";/*事件部件*/
|
||||
public static final String SYS_HOUSE = "systemhouse/";/*房屋系统*/
|
||||
public static final String SYS_SECURITY = "systembase/";/*社会治安*/
|
||||
public static final String SYS_TASK = "systemtask/";/*任务系统*/
|
||||
public static final String SYS_HOUSE = "house/";/*房屋系统*/
|
||||
public static final String SYS_SECURITY = "manage/";/*社会治安*/
|
||||
public static final String SYS_TASK = "task/";/*任务系统*/
|
||||
public static final String SYS_LIBRARY = "library/";/*知识库系统*/
|
||||
public static final String SYS_VISITS = "systemvisits/";/*信访系统*/
|
||||
public static final String TEMP_IP = "http://192.168.0.120:8080/";
|
||||
|
||||
public static final String BASE_MAIN_IP = IP + SYS_USERCENTER;
|
||||
public static final String BASE_CASE_IP = "http://192.168.0.120:8080/" + SYS_CASE;
|
||||
public static final String BASE_SECURITY_IP = "http://192.168.0.111:8081/" + SYS_SECURITY;
|
||||
public static final String BASE_HOUSE_IP = "http://192.168.0.111:8083/" + SYS_HOUSE;
|
||||
public static final String BASE_LIBRARY_IP = "http://192.168.0.109:9000/" + SYS_LIBRARY;
|
||||
public static final String BASE_PERSON_IP = "http://192.168.0.109:8080/" + SYS_POPULATION;
|
||||
public static final String BASE_TASK_IP = "http://192.168.0.111:8080/" + SYS_TASK;
|
||||
public static final String BASE_VISITS = "http://192.168.0.111:8084/" + SYS_VISITS;
|
||||
public static final String BASE_CASE_IP = IP + SYS_CASE;
|
||||
public static final String BASE_LIBRARY_IP = IP + SYS_LIBRARY;
|
||||
public static final String BASE_TASK_IP = IP + SYS_TASK;
|
||||
public static final String BASE_PERSON_IP = IP + SYS_POPULATION;
|
||||
public static final String BASE_HOUSE_IP = IP + SYS_HOUSE;
|
||||
public static final String BASE_SECURITY_IP = IP + SYS_SECURITY;
|
||||
public static final String BASE_VISITS = IP + SYS_VISITS;
|
||||
public static final String BASE_URL = BASE_MAIN_IP;//基础URL
|
||||
|
||||
public static final String SOCKET_IP = "http://192.168.0.155:1991/websocket";/*SocketIP*/
|
||||
// public static final String SOCKET_IP = "http://192.168.0.103:8081/websocket";/*SocketIP*/
|
||||
public static final String SOCKET_IP = IP + "websocket";/*SocketIP*/
|
||||
// public static final String SOCKET_IP = "http://192.168.0.103:8081/websocket";/*SocketIP*/
|
||||
// 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_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_TASK_IP = "http://192.168.0.111:8080/systemtask/";
|
||||
|
||||
//地图页面展示类型
|
||||
|
||||
public static final String APP_DOWNLOAD_URL = BASE_URL + "app/appversion/download/" + BaseConfig.APP_VERSION_ID;
|
||||
|
||||
|
@ -3,9 +3,12 @@ package com.tenlionsoft.baselib.core.retrofit_net;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.conver.AreaInterceptor;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.conver.BaseUrlInterceptor;
|
||||
|
||||
import java.net.ProxySelector;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.internal.proxy.NullProxySelector;
|
||||
import retrofit2.Retrofit;
|
||||
import retrofit2.adapter.rxjava3.RxJava3CallAdapterFactory;
|
||||
import retrofit2.converter.gson.GsonConverterFactory;
|
||||
@ -56,6 +59,7 @@ public class RetrofitManager {
|
||||
|
||||
private OkHttpClient.Builder getOkBuilder() {
|
||||
OkHttpClient.Builder builder = new OkHttpClient.Builder();
|
||||
setLocalProxy();
|
||||
// 设置超时
|
||||
builder.connectTimeout(TIMEOUT, TimeUnit.MINUTES);
|
||||
builder.readTimeout(TIMEOUT, TimeUnit.MINUTES);
|
||||
@ -68,6 +72,27 @@ public class RetrofitManager {
|
||||
return builder;
|
||||
}
|
||||
|
||||
/*设置本地代理*/
|
||||
private void setLocalProxy() {
|
||||
Properties prop = System.getProperties();
|
||||
prop.setProperty("http.proxyHost", "192.168.0.36");//设置http网络请求的代理
|
||||
prop.setProperty("http.proxyPort", "8888");//设置http网络请求的代理
|
||||
prop.setProperty("http.nonProxyHosts", "http://1.24.238.149:37210/case/*");//设置http不需要代理的
|
||||
|
||||
prop.setProperty("https.proxyHost", "192.168.0.36");//设置http网络请求的代理
|
||||
prop.setProperty("https.proxyPort", "8888");//设置http网络请求的代理
|
||||
|
||||
}
|
||||
|
||||
/*清除本地代理*/
|
||||
private void removeLocalProxy() {
|
||||
Properties prop = System.getProperties();
|
||||
prop.remove("http.proxyHost");//设置http网络请求的代理
|
||||
prop.remove("http.proxyPort");//设置http网络请求的代理
|
||||
prop.remove("http.nonProxyHosts");//设置http不需要代理的
|
||||
prop.remove("https.proxyHost");//设置http网络请求的代理
|
||||
prop.remove("https.proxyPort");//设置http网络请求的代理
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建API
|
||||
|
@ -6,9 +6,8 @@ import android.graphics.Color;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.CommonNavigatorAdapter;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerIndicator;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.indicators.LinePagerIndicator;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.indicators.BezierPagerIndicator;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.ColorTransitionPagerTitleView;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.SimplePagerTitleView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -49,8 +48,9 @@ public class ViewPageNavigatorAdapter extends CommonNavigatorAdapter {
|
||||
|
||||
@Override
|
||||
public IPagerIndicator getIndicator(Context context) {
|
||||
LinePagerIndicator indicator = new LinePagerIndicator(context);
|
||||
indicator.setMode(LinePagerIndicator.MODE_EXACTLY);
|
||||
BezierPagerIndicator indicator = new BezierPagerIndicator(context);
|
||||
// LinePagerIndicator indicator = new LinePagerIndicator(context);
|
||||
// indicator.setMode(LinePagerIndicator.MODE_EXACTLY);
|
||||
indicator.setColors(Color.parseColor("#1189FF"));
|
||||
return indicator;
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ public class SearchPersonDialogView extends Dialog {
|
||||
|
||||
private void doSearchPerson() {
|
||||
String card = mEtCard.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(card) || !RegexUtils.isIDCard18Exact(card)) {
|
||||
if (TextUtils.isEmpty(card) || !RegexUtils.isIDNumber(card)) {
|
||||
ToastUtils.show("请输入合法的身份证号码");
|
||||
return;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 192 KiB |
BIN
baselib/src/main/res/drawable-xhdpi/ic_list_cache.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
baselib/src/main/res/drawable-xhdpi/ic_list_collect.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
baselib/src/main/res/drawable-xhdpi/ic_list_contact.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
baselib/src/main/res/drawable-xhdpi/ic_list_pwd.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
baselib/src/main/res/drawable-xhdpi/ic_list_version.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
baselib/src/main/res/drawable-xhdpi/splash_bg.png
Normal file
After Width: | Height: | Size: 197 KiB |
@ -32,7 +32,7 @@
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_base_search_content"
|
||||
android:id="@+id/et_base_search_v"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
|
@ -114,7 +114,7 @@
|
||||
<item name="colorPrimary">@color/main_theme</item>
|
||||
<item name="colorPrimaryDark">@color/main_theme</item>
|
||||
<item name="colorAccent">@color/main_theme</item>
|
||||
<item name="android:background">@drawable/bg_login</item>
|
||||
<item name="android:background">@drawable/splash_bg</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowFullscreen">true</item>
|
||||
</style>
|
||||
|
@ -55,8 +55,8 @@ ext {
|
||||
gCompileSdkVersion = 30
|
||||
gMinSdkVersion = 21
|
||||
gTargetSdkVersion = 30
|
||||
gVersionCode = 2
|
||||
gVersionName = '1.0.1'
|
||||
gVersionCode = 3
|
||||
gVersionName = '1.0.2'
|
||||
gBuildToolsVersion = "29.0.2"
|
||||
// gVersionCode=26
|
||||
// gVersionName='1.3.0'
|
||||
|
@ -41,7 +41,7 @@ dependencies {
|
||||
implementation project(':baselib')
|
||||
implementation project(':modulemap')
|
||||
implementation project(':commonmodule')
|
||||
implementation project(':GisMap')
|
||||
implementation project(':gismapmodule')
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'//地图
|
||||
testImplementation 'junit:junit:4.+'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.tengshisoft.chatmodule.keeplive.services;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.PendingIntent;
|
||||
import android.app.Service;
|
||||
import android.content.BroadcastReceiver;
|
||||
@ -8,6 +10,12 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.ServiceConnection;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.location.Address;
|
||||
import android.location.Criteria;
|
||||
import android.location.Geocoder;
|
||||
import android.location.Location;
|
||||
import android.location.LocationListener;
|
||||
import android.location.LocationManager;
|
||||
import android.media.MediaPlayer;
|
||||
import android.os.Build;
|
||||
@ -24,6 +32,7 @@ import com.baidu.location.LocationClientOption;
|
||||
import com.google.gson.Gson;
|
||||
import com.tengshisoft.chatmodule.KeepLiveAidl;
|
||||
import com.tengshisoft.chatmodule.R;
|
||||
import com.tengshisoft.chatmodule.hwclud.utils.LogUtil;
|
||||
import com.tengshisoft.chatmodule.keeplive.broadcast.OnePxReceiver;
|
||||
import com.tengshisoft.chatmodule.sockets.AppSocketMessage;
|
||||
import com.tengshisoft.chatmodule.sockets.BaseSocketBodyBean;
|
||||
@ -52,12 +61,15 @@ import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
|
||||
@ -109,6 +121,7 @@ public class BusinessService extends Service {
|
||||
LogUtils.e(e.getMessage());
|
||||
}
|
||||
startBusiness();//开启定位
|
||||
startGpsLocation();
|
||||
getSessionId();
|
||||
return START_STICKY;
|
||||
}
|
||||
@ -423,7 +436,7 @@ public class BusinessService extends Service {
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO 发送本地定位广播
|
||||
* 发送本地定位广播
|
||||
*/
|
||||
private void sendLocationCurrent(BDLocation bdLocation) {
|
||||
if (bdLocation.getRadius() <= mPrecision) {
|
||||
@ -431,11 +444,51 @@ public class BusinessService extends Service {
|
||||
Intent mIntent = new Intent(PathConfig.ACTION_LOCATION_MESSAGE);
|
||||
Double[] doubles = PointUtils.GCJ02ToWGS84(bdLocation.getLongitude(), bdLocation.getLatitude());
|
||||
mIntent.putExtra("data", new Location84(doubles[1], doubles[0]));
|
||||
mIntent.putExtra("address", bdLocation.getAddrStr());
|
||||
sendBroadcast(mIntent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*开启本地GPS定位*/
|
||||
private void startGpsLocation() {
|
||||
LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);
|
||||
Criteria baseProvider = getBaseProvider();
|
||||
String provider = locationManager.getBestProvider(baseProvider, false);
|
||||
LogUtils.e("定位提供器:==" + provider);
|
||||
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
|
||||
return;
|
||||
}
|
||||
LogUtils.e("开始定位");
|
||||
locationManager.requestLocationUpdates(provider, 0, 0, location -> {
|
||||
if (location != null) {
|
||||
LogUtils.e(location.getLatitude() + "=" + location.getLongitude());
|
||||
Geocoder geocoder = new Geocoder(BusinessService.this);
|
||||
try {
|
||||
List<Address> fromLocation = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);
|
||||
if (fromLocation != null && fromLocation.size() > 0) {
|
||||
Address address = fromLocation.get(0);
|
||||
LogUtils.e(address.getAdminArea() + "=" + address.getLocality() + "=" + address.getFeatureName());
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*获取定位提供*/
|
||||
@SuppressLint("WrongConstant")
|
||||
private Criteria getBaseProvider() {
|
||||
Criteria criteria = new Criteria();
|
||||
criteria.setAccuracy(Criteria.ACCURACY_FINE);
|
||||
criteria.setBearingRequired(false);
|
||||
criteria.setAltitudeRequired(true);
|
||||
criteria.setSpeedRequired(false);
|
||||
criteria.setPowerRequirement(Criteria.ACCURACY_HIGH);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
private void registerTimeReceiver() {
|
||||
mReceiver = new PunchTimeReceiver();
|
||||
IntentFilter filter = new IntentFilter();
|
||||
@ -453,6 +506,7 @@ public class BusinessService extends Service {
|
||||
filter.addAction(PathConfig.ACTION_CALL_LOGIN_FAIL);//本地融合通信登录失败
|
||||
filter.addAction(PathConfig.ACTION_CALL_LOGIN_SUCCESS);//本地融合融信登录成功
|
||||
filter.addAction(PathConfig.ACTION_CALL_LOCAL_PHONE_NO_SUPPORT);//本地手机不支持通知
|
||||
filter.addAction(PathConfig.ACTION_NET_CHANGE);//网络状态
|
||||
registerReceiver(mReceiver, filter);
|
||||
|
||||
}
|
||||
@ -530,6 +584,9 @@ public class BusinessService extends Service {
|
||||
String msg3 = gson3.toJson(bean3);
|
||||
sendSocketNoticeMsg(msg3);
|
||||
break;
|
||||
case PathConfig.ACTION_NET_CHANGE:
|
||||
LogUtils.e("网络发生变化");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,17 +7,12 @@
|
||||
android:background="@color/gray_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_bottom_shadow_white_no_radius"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||
android:id="@+id/mi_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp" />
|
||||
</LinearLayout>
|
||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||
android:id="@+id/mi_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/shp_bottom_shadow_white_no_radius" />
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/vp_content"
|
||||
|
@ -39,6 +39,7 @@ dependencies {
|
||||
implementation project(':modulemap')
|
||||
implementation project(':commonmodule')
|
||||
implementation project(':moduleijkplayer')
|
||||
implementation project(':gismapmodule')
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'//地图
|
||||
testImplementation 'junit:junit:4.+'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||||
|
@ -47,7 +47,7 @@ import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_COMMAND_ACTIVITY_INCIDENT_SEL_DEPT)
|
||||
public class DeptSelActivity extends BaseActivity {
|
||||
@BindView(R2.id.et_base_search_content)
|
||||
@BindView(R2.id.et_base_search_v)
|
||||
EditText mEtSearch;
|
||||
@BindView(R2.id.iv_base_clear)
|
||||
ImageView mIvClear;
|
||||
|
@ -1,22 +1,24 @@
|
||||
package com.tengshisoft.commandmodule.activitys.incident;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ZoomControls;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.supermap.imobilelite.maps.CoordinateReferenceSystem;
|
||||
import com.supermap.imobilelite.maps.DefaultItemizedOverlay;
|
||||
import com.supermap.imobilelite.maps.LayerView;
|
||||
import com.supermap.imobilelite.maps.OverlayItem;
|
||||
import com.supermap.imobilelite.maps.Point2D;
|
||||
import com.tengshisoft.commandmodule.R;
|
||||
import com.tengshisoft.commandmodule.R2;
|
||||
import com.tengshisoft.commonmodule.adapters.IncidentTagListAdapter;
|
||||
@ -29,6 +31,7 @@ import com.tengshisoft.commonmodule.beans.SuccessBean;
|
||||
import com.tengshisoft.commonmodule.beans.TagListBean;
|
||||
import com.tengshisoft.commonmodule.nets.CenterApis;
|
||||
import com.tengshisoft.commonmodule.nets.GridApis;
|
||||
import com.tengshisoft.gismap.TouchMapView;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.beans.OperateBean;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
|
||||
@ -107,6 +110,8 @@ public class IncidentAcceptDetailActivity extends BaseActivity {
|
||||
NestedScrollView mNsvContent;
|
||||
@BindView(R2.id.rlv_tags)
|
||||
RecyclerView mRlvTags;
|
||||
@BindView(R2.id.mv_map)
|
||||
TouchMapView mMvMap;
|
||||
|
||||
private Unbinder mBind;
|
||||
private String mId;
|
||||
@ -188,10 +193,29 @@ public class IncidentAcceptDetailActivity extends BaseActivity {
|
||||
mOperates.add(reportBean);
|
||||
}
|
||||
|
||||
|
||||
initMap();
|
||||
getDetailData();
|
||||
}
|
||||
|
||||
private DefaultItemizedOverlay mItemizedOverlay;
|
||||
|
||||
private void initMap() {
|
||||
Drawable marker = getResources().getDrawable(com.tengshisoft.commonmodule.R.drawable.ic_map_location_marker);
|
||||
mItemizedOverlay = new DefaultItemizedOverlay(marker);
|
||||
LayerView layerView = new LayerView(this);
|
||||
layerView.setURL(PathConfig.BASE_LAYER);
|
||||
CoordinateReferenceSystem crs = new CoordinateReferenceSystem();
|
||||
crs.wkid = PathConfig.CRS;
|
||||
layerView.setCRS(crs);
|
||||
mMvMap.addLayer(layerView);
|
||||
mMvMap.getController().setCenter(new Point2D(PathConfig.DEFAULT_LNG, PathConfig.DEFAULT_LAT));
|
||||
mMvMap.getController().setZoom(PathConfig.DEFAULT_ZOOM);
|
||||
mMvMap.setBuiltInZoomControls(false);//内置缩放控件
|
||||
mMvMap.setClickable(true);
|
||||
mMvMap.getOverlays().add(mItemizedOverlay);
|
||||
mMvMap.invalidate();
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示操作
|
||||
*/
|
||||
@ -833,17 +857,11 @@ public class IncidentAcceptDetailActivity extends BaseActivity {
|
||||
mTvContent.setText(b.getReportContent());
|
||||
double lat = Double.parseDouble(b.getReportLat());
|
||||
double lng = Double.parseDouble(b.getReportLng());
|
||||
|
||||
// moveMapToCenter(new LatLng(lat, lng), 18);
|
||||
// if (mBitMap == null) {
|
||||
// mBitMap = BitmapDescriptorFactory.fromResource(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);
|
||||
Point2D point = new Point2D(lng, lat);
|
||||
mMvMap.getController().setCenter(point);
|
||||
OverlayItem item = new OverlayItem(point, "", "");
|
||||
mItemizedOverlay.addItem(item);
|
||||
mMvMap.invalidate();
|
||||
if (!TextUtils.isEmpty(b.getReportPhotos())) {
|
||||
//有图片
|
||||
mTvPhotoHint.setVisibility(View.GONE);
|
||||
|
@ -18,6 +18,11 @@ import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.supermap.imobilelite.maps.CoordinateReferenceSystem;
|
||||
import com.supermap.imobilelite.maps.DefaultItemizedOverlay;
|
||||
import com.supermap.imobilelite.maps.LayerView;
|
||||
import com.supermap.imobilelite.maps.OverlayItem;
|
||||
import com.supermap.imobilelite.maps.Point2D;
|
||||
import com.tengshisoft.commandmodule.R;
|
||||
import com.tengshisoft.commandmodule.R2;
|
||||
import com.tengshisoft.commonmodule.adapters.IncidentTagListAdapter;
|
||||
@ -29,6 +34,7 @@ import com.tengshisoft.commonmodule.beans.SuccessBean;
|
||||
import com.tengshisoft.commonmodule.beans.TagListBean;
|
||||
import com.tengshisoft.commonmodule.nets.CenterApis;
|
||||
import com.tengshisoft.commonmodule.nets.GridApis;
|
||||
import com.tengshisoft.gismap.TouchMapView;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.beans.OperateBean;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
|
||||
@ -138,6 +144,8 @@ public class IncidentDispatchDetailActivity extends BaseActivity {
|
||||
Button mBtnSubmit;
|
||||
@BindView(R2.id.rlv_tags)
|
||||
RecyclerView mRlvTags;
|
||||
@BindView(R2.id.mv_map)
|
||||
TouchMapView mMvMap;
|
||||
private Unbinder mBind;
|
||||
private String mId;
|
||||
private String mTaskId;
|
||||
@ -275,6 +283,26 @@ public class IncidentDispatchDetailActivity extends BaseActivity {
|
||||
mOperates.add(warnBean);
|
||||
mOperates.add(collectBean);
|
||||
mOperates.add(diffBean);
|
||||
initMap();
|
||||
}
|
||||
|
||||
private DefaultItemizedOverlay mItemizedOverlay;
|
||||
|
||||
private void initMap() {
|
||||
Drawable marker = getResources().getDrawable(com.tengshisoft.commonmodule.R.drawable.ic_map_location_marker);
|
||||
mItemizedOverlay = new DefaultItemizedOverlay(marker);
|
||||
LayerView layerView = new LayerView(this);
|
||||
layerView.setURL(PathConfig.BASE_LAYER);
|
||||
CoordinateReferenceSystem crs = new CoordinateReferenceSystem();
|
||||
crs.wkid = PathConfig.CRS;
|
||||
layerView.setCRS(crs);
|
||||
mMvMap.addLayer(layerView);
|
||||
mMvMap.getController().setCenter(new Point2D(PathConfig.DEFAULT_LNG, PathConfig.DEFAULT_LAT));
|
||||
mMvMap.getController().setZoom(PathConfig.DEFAULT_ZOOM);
|
||||
mMvMap.setBuiltInZoomControls(false);//内置缩放控件
|
||||
mMvMap.setClickable(true);
|
||||
mMvMap.getOverlays().add(mItemizedOverlay);
|
||||
mMvMap.invalidate();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -662,17 +690,11 @@ public class IncidentDispatchDetailActivity extends BaseActivity {
|
||||
mTvContent.setText(b.getReportContent());
|
||||
double lat = Double.parseDouble(b.getReportLat());
|
||||
double lng = Double.parseDouble(b.getReportLng());
|
||||
//
|
||||
// moveMapToCenter(new LatLng(lat, lng), 18);
|
||||
// if (mBitMap == null) {
|
||||
// mBitMap = BitmapDescriptorFactory.fromResource(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);
|
||||
Point2D point = new Point2D(lng, lat);
|
||||
mMvMap.getController().setCenter(point);
|
||||
OverlayItem item = new OverlayItem(point, "", "");
|
||||
mItemizedOverlay.addItem(item);
|
||||
mMvMap.invalidate();
|
||||
if (!TextUtils.isEmpty(b.getReportPhotos())) {
|
||||
//有图片
|
||||
mTvPhotoHint.setVisibility(View.GONE);
|
||||
|
@ -183,6 +183,14 @@
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical_top">
|
||||
|
||||
<com.tengshisoft.gismap.TouchMapView
|
||||
android:id="@+id/mv_map"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical">
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardPreventCornerOverlap="true"
|
||||
app:cardUseCompatPadding="false"
|
||||
tools:visibility="gone">
|
||||
tools:visibility="visible">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
@ -190,6 +190,14 @@
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical_top">
|
||||
|
||||
<com.tengshisoft.gismap.TouchMapView
|
||||
android:id="@+id/mv_map"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical">
|
||||
|
||||
<TextView
|
||||
|
@ -37,7 +37,7 @@ dependencies {
|
||||
implementation 'com.google.android.material:material:1.2.1'
|
||||
implementation project(':baselib')
|
||||
implementation project(':modulemap')
|
||||
implementation project(':GisMap')
|
||||
implementation project(':gismapmodule')
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'//地图
|
||||
testImplementation 'junit:junit:4.+'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||||
|
@ -84,9 +84,9 @@ public class MineCollectActivity extends BaseActivity {
|
||||
mVpContent.setAdapter(adapter);
|
||||
CommonNavigator commonNavigator = new CommonNavigator(this);
|
||||
commonNavigator.setAdapter(new ViewPageNavigatorAdapter(this, mTitles, mVpContent));
|
||||
commonNavigator.setAdjustMode(true);
|
||||
commonNavigator.setAdjustMode(false);
|
||||
mMiTabs.setNavigator(commonNavigator);
|
||||
UIUtil.bindViewPager2(mMiTabs, mVpContent,null);
|
||||
UIUtil.bindViewPager2(mMiTabs, mVpContent, null);
|
||||
}
|
||||
|
||||
private class VpRecordAdapter extends FragmentStateAdapter {
|
||||
|
@ -15,6 +15,11 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
import com.supermap.imobilelite.maps.CoordinateReferenceSystem;
|
||||
import com.supermap.imobilelite.maps.DefaultItemizedOverlay;
|
||||
import com.supermap.imobilelite.maps.LayerView;
|
||||
import com.supermap.imobilelite.maps.OverlayItem;
|
||||
import com.supermap.imobilelite.maps.Point2D;
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
import com.tengshisoft.commonmodule.R2;
|
||||
import com.tengshisoft.commonmodule.adapters.HandleRecordAdapter;
|
||||
@ -26,6 +31,7 @@ import com.tengshisoft.commonmodule.beans.SaveCenterCheckBean;
|
||||
import com.tengshisoft.commonmodule.beans.SuccessBean;
|
||||
import com.tengshisoft.commonmodule.nets.CenterApis;
|
||||
import com.tengshisoft.commonmodule.nets.GridApis;
|
||||
import com.tengshisoft.gismap.TouchMapView;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.beans.AddPhotoBean;
|
||||
import com.tenlionsoft.baselib.core.beans.OperateBean;
|
||||
@ -123,6 +129,8 @@ public class IncidentCenterCheckDetailActivity extends BaseActivity {
|
||||
RecyclerView mRlvDispose;
|
||||
@BindView(R2.id.cv_dispose)
|
||||
CardView mCvDispose;
|
||||
@BindView(R2.id.mv_map)
|
||||
TouchMapView mMvMap;
|
||||
private Unbinder mBind;
|
||||
private String mId;
|
||||
private int mCurrentPage = 1;
|
||||
@ -212,7 +220,11 @@ public class IncidentCenterCheckDetailActivity extends BaseActivity {
|
||||
mTvContent.setText(b.getReportContent());
|
||||
double lat = Double.parseDouble(b.getReportLat());
|
||||
double lng = Double.parseDouble(b.getReportLng());
|
||||
//TODO 地图
|
||||
Point2D point = new Point2D(lng, lat);
|
||||
mMvMap.getController().setCenter(point);
|
||||
OverlayItem item = new OverlayItem(point, "", "");
|
||||
mItemizedOverlay.addItem(item);
|
||||
mMvMap.invalidate();
|
||||
if (!TextUtils.isEmpty(b.getReportPhotos())) {
|
||||
//有图片
|
||||
mTvPhotoHint.setVisibility(View.GONE);
|
||||
@ -435,6 +447,26 @@ public class IncidentCenterCheckDetailActivity extends BaseActivity {
|
||||
mOperates.add(flagBean);
|
||||
mOperates.add(warnBean);
|
||||
mOperates.add(diffBean);
|
||||
initMap();
|
||||
}
|
||||
|
||||
private DefaultItemizedOverlay mItemizedOverlay;
|
||||
|
||||
private void initMap() {
|
||||
Drawable marker = getResources().getDrawable(R.drawable.ic_map_location_marker);
|
||||
mItemizedOverlay = new DefaultItemizedOverlay(marker);
|
||||
LayerView layerView = new LayerView(this);
|
||||
layerView.setURL(PathConfig.BASE_LAYER);
|
||||
CoordinateReferenceSystem crs = new CoordinateReferenceSystem();
|
||||
crs.wkid = PathConfig.CRS;
|
||||
layerView.setCRS(crs);
|
||||
mMvMap.addLayer(layerView);
|
||||
mMvMap.getController().setCenter(new Point2D(PathConfig.DEFAULT_LNG, PathConfig.DEFAULT_LAT));
|
||||
mMvMap.getController().setZoom(PathConfig.DEFAULT_ZOOM);
|
||||
mMvMap.setBuiltInZoomControls(false);//内置缩放控件
|
||||
mMvMap.setClickable(true);
|
||||
mMvMap.getOverlays().add(mItemizedOverlay);
|
||||
mMvMap.invalidate();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -23,6 +23,11 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
import com.supermap.imobilelite.maps.CoordinateReferenceSystem;
|
||||
import com.supermap.imobilelite.maps.DefaultItemizedOverlay;
|
||||
import com.supermap.imobilelite.maps.LayerView;
|
||||
import com.supermap.imobilelite.maps.OverlayItem;
|
||||
import com.supermap.imobilelite.maps.Point2D;
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
import com.tengshisoft.commonmodule.R2;
|
||||
import com.tengshisoft.commonmodule.adapters.HandleRecordAdapter;
|
||||
@ -31,6 +36,7 @@ import com.tengshisoft.commonmodule.beans.IncidentDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.SaveCheckBean;
|
||||
import com.tengshisoft.commonmodule.beans.SuccessBean;
|
||||
import com.tengshisoft.commonmodule.nets.GridApis;
|
||||
import com.tengshisoft.gismap.TouchMapView;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.beans.AddPhotoBean;
|
||||
import com.tenlionsoft.baselib.core.beans.BaseSuccessBean;
|
||||
@ -78,8 +84,6 @@ import okhttp3.RequestBody;
|
||||
@Route(path = PathConfig.PATH_MODULE_COMMON_ACTIVITY_INCIDENT_CHECK_DETAIL)
|
||||
public class IncidentCheckDetailActivity extends BaseActivity {
|
||||
|
||||
@BindView(R2.id.tv_issue_base_info)
|
||||
TextView mTvIssueBaseInfo;
|
||||
@BindView(R2.id.tv_grid)
|
||||
TextView mTvGrid;
|
||||
@BindView(R2.id.tv_component)
|
||||
@ -92,8 +96,6 @@ public class IncidentCheckDetailActivity extends BaseActivity {
|
||||
TextView mTvArea5;
|
||||
@BindView(R2.id.tv_address)
|
||||
TextView mTvAddress;
|
||||
@BindView(R2.id.tv_issue_detail_info)
|
||||
TextView mTvIssueDetailInfo;
|
||||
@BindView(R2.id.tv_content)
|
||||
TextView mTvContent;
|
||||
@BindView(R2.id.rlv_photos)
|
||||
@ -128,6 +130,8 @@ public class IncidentCheckDetailActivity extends BaseActivity {
|
||||
Button mBtnConfirm;
|
||||
@BindView(R2.id.rg_way)
|
||||
RadioGroup mRgWay;
|
||||
@BindView(R2.id.mv_map)
|
||||
TouchMapView mMvMap;
|
||||
|
||||
private Unbinder mBind;
|
||||
private String mId;
|
||||
@ -221,6 +225,26 @@ public class IncidentCheckDetailActivity extends BaseActivity {
|
||||
mSelPassType = "failed";
|
||||
}
|
||||
});
|
||||
initMap();
|
||||
}
|
||||
|
||||
private DefaultItemizedOverlay mItemizedOverlay;
|
||||
|
||||
private void initMap() {
|
||||
Drawable marker = getResources().getDrawable(com.tengshisoft.commonmodule.R.drawable.ic_map_location_marker);
|
||||
mItemizedOverlay = new DefaultItemizedOverlay(marker);
|
||||
LayerView layerView = new LayerView(this);
|
||||
layerView.setURL(PathConfig.BASE_LAYER);
|
||||
CoordinateReferenceSystem crs = new CoordinateReferenceSystem();
|
||||
crs.wkid = PathConfig.CRS;
|
||||
layerView.setCRS(crs);
|
||||
mMvMap.addLayer(layerView);
|
||||
mMvMap.getController().setCenter(new Point2D(PathConfig.DEFAULT_LNG, PathConfig.DEFAULT_LAT));
|
||||
mMvMap.getController().setZoom(PathConfig.DEFAULT_ZOOM);
|
||||
mMvMap.setBuiltInZoomControls(false);//内置缩放控件
|
||||
mMvMap.setClickable(true);
|
||||
mMvMap.getOverlays().add(mItemizedOverlay);
|
||||
mMvMap.invalidate();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -540,7 +564,11 @@ public class IncidentCheckDetailActivity extends BaseActivity {
|
||||
mTvContent.setText(b.getReportContent());
|
||||
double lat = Double.parseDouble(b.getReportLat());
|
||||
double lng = Double.parseDouble(b.getReportLng());
|
||||
|
||||
Point2D point = new Point2D(lng, lat);
|
||||
mMvMap.getController().setCenter(point);
|
||||
OverlayItem item = new OverlayItem(point, "", "");
|
||||
mItemizedOverlay.addItem(item);
|
||||
mMvMap.invalidate();
|
||||
if (!TextUtils.isEmpty(b.getReportPhotos())) {
|
||||
//有图片
|
||||
mTvPhotoHint.setVisibility(View.GONE);
|
||||
|
@ -17,8 +17,14 @@ import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.supermap.imobilelite.maps.CoordinateReferenceSystem;
|
||||
import com.supermap.imobilelite.maps.DefaultItemizedOverlay;
|
||||
import com.supermap.imobilelite.maps.LayerView;
|
||||
import com.supermap.imobilelite.maps.OverlayItem;
|
||||
import com.supermap.imobilelite.maps.Point2D;
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
import com.tengshisoft.commonmodule.R2;
|
||||
import com.tengshisoft.commonmodule.activitys.checkwork.AttendanceActivity;
|
||||
import com.tengshisoft.commonmodule.adapters.IncidentTagListAdapter;
|
||||
import com.tengshisoft.commonmodule.beans.DeferDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.DelayApplyBean;
|
||||
@ -29,6 +35,7 @@ import com.tengshisoft.commonmodule.beans.SuccessBean;
|
||||
import com.tengshisoft.commonmodule.beans.TagListBean;
|
||||
import com.tengshisoft.commonmodule.nets.CenterApis;
|
||||
import com.tengshisoft.commonmodule.nets.GridApis;
|
||||
import com.tengshisoft.gismap.TouchMapView;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.beans.OperateBean;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
|
||||
@ -133,6 +140,8 @@ public class IncidentDeferExamineDetailActivity extends BaseActivity {
|
||||
TextView mTvApplyUser;
|
||||
@BindView(R2.id.tv_apply_time)
|
||||
TextView mTvApplyTime;
|
||||
@BindView(R2.id.mv_map)
|
||||
TouchMapView mMvMap;
|
||||
|
||||
private Unbinder mBind;
|
||||
private String mDeferApplyId;
|
||||
@ -256,9 +265,24 @@ public class IncidentDeferExamineDetailActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
private void initMap() {
|
||||
|
||||
private DefaultItemizedOverlay mItemizedOverlay;
|
||||
|
||||
private void initMap() {
|
||||
Drawable marker = getResources().getDrawable(com.tengshisoft.commonmodule.R.drawable.ic_map_location_marker);
|
||||
mItemizedOverlay = new DefaultItemizedOverlay(marker);
|
||||
LayerView layerView = new LayerView(this);
|
||||
layerView.setURL(PathConfig.BASE_LAYER);
|
||||
CoordinateReferenceSystem crs = new CoordinateReferenceSystem();
|
||||
crs.wkid = PathConfig.CRS;
|
||||
layerView.setCRS(crs);
|
||||
mMvMap.addLayer(layerView);
|
||||
mMvMap.getController().setCenter(new Point2D(PathConfig.DEFAULT_LNG, PathConfig.DEFAULT_LAT));
|
||||
mMvMap.getController().setZoom(PathConfig.DEFAULT_ZOOM);
|
||||
mMvMap.setBuiltInZoomControls(false);//内置缩放控件
|
||||
mMvMap.setClickable(true);
|
||||
mMvMap.getOverlays().add(mItemizedOverlay);
|
||||
mMvMap.invalidate();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -362,7 +386,11 @@ public class IncidentDeferExamineDetailActivity extends BaseActivity {
|
||||
mTvContent.setText(b.getReportContent());
|
||||
double lat = Double.parseDouble(b.getReportLat());
|
||||
double lng = Double.parseDouble(b.getReportLng());
|
||||
|
||||
Point2D point = new Point2D(lng, lat);
|
||||
mMvMap.getController().setCenter(point);
|
||||
OverlayItem item = new OverlayItem(point, "", "");
|
||||
mItemizedOverlay.addItem(item);
|
||||
mMvMap.invalidate();
|
||||
|
||||
if (!TextUtils.isEmpty(b.getReportPhotos())) {
|
||||
//有图片
|
||||
|
@ -638,21 +638,24 @@ public class IncidentDetailActivity extends BaseActivity {
|
||||
mSrlContent.finishLoadMore();
|
||||
// getHandleList(mCurrentPage);
|
||||
}
|
||||
|
||||
private DefaultItemizedOverlay mItemizedOverlay;
|
||||
|
||||
private void initMap() {
|
||||
Drawable marker = getResources().getDrawable(R.drawable.ic_map_location_marker);
|
||||
mItemizedOverlay = new DefaultItemizedOverlay(marker);
|
||||
LayerView layerView = new LayerView(this);
|
||||
layerView.setURL(PathConfig.BASE_LAYER);
|
||||
CoordinateReferenceSystem crs = new CoordinateReferenceSystem();
|
||||
crs.wkid = 4326;
|
||||
crs.wkid = PathConfig.CRS;
|
||||
layerView.setCRS(crs);
|
||||
mMvMap.addLayer(layerView);
|
||||
mMvMap.getController().setCenter(new Point2D(116.391468, 39.904491));
|
||||
mMvMap.getController().setZoom(12);
|
||||
mMvMap.getController().setCenter(new Point2D(PathConfig.DEFAULT_LNG, PathConfig.DEFAULT_LAT));
|
||||
mMvMap.getController().setZoom(PathConfig.DEFAULT_ZOOM);
|
||||
mMvMap.setBuiltInZoomControls(false);//内置缩放控件
|
||||
mMvMap.setClickable(true);
|
||||
mMvMap.getOverlays().add(mItemizedOverlay);
|
||||
mMvMap.invalidate();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1076,6 +1079,11 @@ public class IncidentDetailActivity extends BaseActivity {
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
mMvMap.destroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void clearSearch() {
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.tengshisoft.commonmodule.activitys.cases;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
@ -23,17 +22,25 @@ import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.supermap.imobilelite.maps.CoordinateReferenceSystem;
|
||||
import com.supermap.imobilelite.maps.DefaultItemizedOverlay;
|
||||
import com.supermap.imobilelite.maps.LayerView;
|
||||
import com.supermap.imobilelite.maps.OverlayItem;
|
||||
import com.supermap.imobilelite.maps.Point2D;
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
import com.tengshisoft.commonmodule.R2;
|
||||
import com.tengshisoft.commonmodule.adapters.DeferRecordAdapter;
|
||||
import com.tengshisoft.commonmodule.adapters.HandleRecordAdapter;
|
||||
import com.tengshisoft.commonmodule.beans.DeferRecordListBean;
|
||||
import com.tengshisoft.commonmodule.beans.DelayApplyBean;
|
||||
import com.tengshisoft.commonmodule.beans.DispatchDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.HandleListBean;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentRebackBean;
|
||||
import com.tengshisoft.commonmodule.beans.SaveHandleIncidentBean;
|
||||
import com.tengshisoft.commonmodule.beans.SuccessBean;
|
||||
import com.tengshisoft.commonmodule.nets.GridApis;
|
||||
import com.tengshisoft.gismap.TouchMapView;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.beans.AddPhotoBean;
|
||||
import com.tenlionsoft.baselib.core.beans.BaseSuccessBean;
|
||||
@ -149,6 +156,12 @@ public class IncidentHandleActivity extends BaseActivity {
|
||||
TextView mTvDeferTime;
|
||||
@BindView(R2.id.ll_defer_time)
|
||||
LinearLayout mLlDeferTime;
|
||||
@BindView(R2.id.mv_map)
|
||||
TouchMapView mMvMap;
|
||||
@BindView(R2.id.rlv_handles)
|
||||
RecyclerView mRlvHandles;
|
||||
@BindView(R2.id.cv_handle)
|
||||
CardView mCvHandle;
|
||||
private Unbinder mBind;
|
||||
private String mReportId;
|
||||
private IncidentDetailBean mIncidentDetailBean;
|
||||
@ -160,6 +173,8 @@ public class IncidentHandleActivity extends BaseActivity {
|
||||
private String mPhotoIds = "";//相片Id
|
||||
private String mPicPath;
|
||||
private String mTaskId;
|
||||
private List<HandleListBean.RowsBean> mDatas;
|
||||
private HandleRecordAdapter mHandleRecordAdapter;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
@ -283,6 +298,10 @@ public class IncidentHandleActivity extends BaseActivity {
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
mDatas = new ArrayList<>();
|
||||
mHandleRecordAdapter = new HandleRecordAdapter(mActivity, mDatas, 0);
|
||||
mRlvHandles.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvHandles.setAdapter(mHandleRecordAdapter);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -560,8 +579,23 @@ public class IncidentHandleActivity extends BaseActivity {
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
private DefaultItemizedOverlay mItemizedOverlay;
|
||||
|
||||
private void initMap() {
|
||||
Drawable marker = getResources().getDrawable(R.drawable.ic_map_location_marker);
|
||||
mItemizedOverlay = new DefaultItemizedOverlay(marker);
|
||||
LayerView layerView = new LayerView(this);
|
||||
layerView.setURL(PathConfig.BASE_LAYER);
|
||||
CoordinateReferenceSystem crs = new CoordinateReferenceSystem();
|
||||
crs.wkid = PathConfig.CRS;
|
||||
layerView.setCRS(crs);
|
||||
mMvMap.addLayer(layerView);
|
||||
mMvMap.getController().setCenter(new Point2D(PathConfig.DEFAULT_LNG, PathConfig.DEFAULT_LAT));
|
||||
mMvMap.getController().setZoom(PathConfig.DEFAULT_ZOOM);
|
||||
mMvMap.setBuiltInZoomControls(false);//内置缩放控件
|
||||
mMvMap.setClickable(true);
|
||||
mMvMap.getOverlays().add(mItemizedOverlay);
|
||||
mMvMap.invalidate();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -586,6 +620,7 @@ public class IncidentHandleActivity extends BaseActivity {
|
||||
setIncidentDetailToView();
|
||||
getDispatchDetail();//获取派遣信息
|
||||
getDeferRecord();
|
||||
getHandleList(1);
|
||||
|
||||
}
|
||||
|
||||
@ -602,6 +637,53 @@ public class IncidentHandleActivity extends BaseActivity {
|
||||
});
|
||||
}
|
||||
|
||||
private int mCurrentPage = 1;
|
||||
|
||||
/**
|
||||
* 获取处理记录列表
|
||||
*/
|
||||
private void getHandleList(int page) {
|
||||
mCurrentPage = page;
|
||||
RetrofitManager.getInstance()
|
||||
.create(GridApis.class)
|
||||
.getHandleLNewListByReportId(mReportId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<HandleListBean.RowsBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull List<HandleListBean.RowsBean> handleListBean) {
|
||||
if (handleListBean.size() > 0) {
|
||||
++mCurrentPage;
|
||||
mCvHandle.setVisibility(View.VISIBLE);
|
||||
if (page == 1) {
|
||||
mDatas.clear();
|
||||
mDatas.addAll(handleListBean);
|
||||
} else {
|
||||
mDatas.addAll(handleListBean);
|
||||
}
|
||||
mHandleRecordAdapter.notifyDataSetChanged();
|
||||
} else {
|
||||
mCvHandle.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mCvHandle.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取延期记录
|
||||
*/
|
||||
@ -714,8 +796,11 @@ public class IncidentHandleActivity extends BaseActivity {
|
||||
mTvContent.setText(mIncidentDetailBean.getReportContent());
|
||||
double lat = Double.parseDouble(mIncidentDetailBean.getReportLat());
|
||||
double lng = Double.parseDouble(mIncidentDetailBean.getReportLng());
|
||||
|
||||
|
||||
Point2D point = new Point2D(lng, lat);
|
||||
mMvMap.getController().setCenter(point);
|
||||
OverlayItem item = new OverlayItem(point, "", "");
|
||||
mItemizedOverlay.addItem(item);
|
||||
mMvMap.invalidate();
|
||||
if (!TextUtils.isEmpty(mIncidentDetailBean.getReportPhotos())) {
|
||||
//有图片
|
||||
mTvPhotoHint.setVisibility(View.GONE);
|
||||
|
@ -6,6 +6,7 @@ import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.media.MediaRecorder;
|
||||
import android.net.Uri;
|
||||
import android.os.Environment;
|
||||
import android.provider.MediaStore;
|
||||
@ -40,6 +41,7 @@ import com.tenlionsoft.baselib.core.beans.BaseSuccessBean;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.api.BaseApiService;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
|
||||
import com.tenlionsoft.baselib.core.widget.PhotoActivity;
|
||||
import com.tenlionsoft.baselib.core.widget.base.AddPhotoAdapter;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
@ -330,8 +332,7 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
RetrofitManager.getInstance()
|
||||
.create(GridApis.class)
|
||||
.doSaveCase(body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
@ -809,9 +810,7 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
mSelType2Name = bean1.getName();
|
||||
mTvType.setText(bean1.getName());
|
||||
} else {
|
||||
mSelType1 = bean.getId();
|
||||
mSelType2 = "";
|
||||
mTvType.setText(bean.getName());
|
||||
ToastUtils.show("详细类型数据未录入,无法选取");
|
||||
}
|
||||
})
|
||||
.setTitleText("请选择")
|
||||
|
@ -32,6 +32,7 @@ import com.supermap.imobilelite.maps.Util;
|
||||
import com.supermap.imobilelite.resources.UtilsCommon;
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
import com.tengshisoft.commonmodule.R2;
|
||||
import com.tengshisoft.gismap.TouchMapView;
|
||||
import com.tengshisoft.modulemap.common.Location84;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
|
||||
@ -83,7 +84,7 @@ public class AttendanceActivity extends BaseActivity {
|
||||
@BindView(R2.id.btn_reset_loc)
|
||||
Button mBtnResetLoc;
|
||||
@BindView(R2.id.mv_map)
|
||||
MapView mMvMap;
|
||||
TouchMapView mMvMap;
|
||||
|
||||
|
||||
private Unbinder mBind;
|
||||
@ -157,17 +158,18 @@ public class AttendanceActivity extends BaseActivity {
|
||||
mBaseLayerView = new LayerView(this);
|
||||
mBaseLayerView.setURL(PathConfig.BASE_LAYER);
|
||||
CoordinateReferenceSystem crs = new CoordinateReferenceSystem();
|
||||
crs.wkid = 4326;
|
||||
crs.wkid = PathConfig.CRS;
|
||||
mBaseLayerView.setCRS(crs);
|
||||
mMvMap.addLayer(mBaseLayerView);
|
||||
mMvMap.getController().setCenter(new Point2D(116.391468, 39.904491));
|
||||
mMvMap.getController().setZoom(6);
|
||||
mMvMap.getController().setCenter(new Point2D(PathConfig.DEFAULT_LNG, PathConfig.DEFAULT_LAT));
|
||||
mMvMap.getController().setZoom(PathConfig.DEFAULT_ZOOM);
|
||||
mMvMap.setBuiltInZoomControls(false);//内置缩放控件
|
||||
mMvMap.setClickable(true);
|
||||
mMvMap.getOverlays().add(new TouchOverlay());
|
||||
Drawable marker = getResources().getDrawable(R.drawable.ic_map_location_marker);
|
||||
mItemizedOverlay = new DefaultItemizedOverlay(marker);
|
||||
mMvMap.getOverlays().add(mItemizedOverlay);
|
||||
mMvMap.invalidate();
|
||||
|
||||
}
|
||||
|
||||
@ -264,6 +266,8 @@ public class AttendanceActivity extends BaseActivity {
|
||||
if (PathConfig.ACTION_LOCATION_MESSAGE.equals(action)) {
|
||||
//定位到了
|
||||
mCurrentLoc = (Location84) intent.getSerializableExtra("data");
|
||||
String address = intent.getStringExtra("address");
|
||||
mTvCurLocation.setText(address);
|
||||
setMyCurrentLocation();
|
||||
}
|
||||
}
|
||||
|
@ -1,21 +1,30 @@
|
||||
package com.tengshisoft.commonmodule.activitys.checkwork;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.graphics.DashPathEffect;
|
||||
import android.graphics.Paint;
|
||||
import android.os.Handler;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.supermap.imobilelite.maps.CoordinateReferenceSystem;
|
||||
import com.supermap.imobilelite.maps.LayerView;
|
||||
import com.supermap.imobilelite.maps.LineOverlay;
|
||||
import com.supermap.imobilelite.maps.Point2D;
|
||||
import com.supermap.imobilelite.maps.PolygonOverlay;
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
import com.tengshisoft.commonmodule.R2;
|
||||
import com.tengshisoft.commonmodule.beans.DrawMapLineBean;
|
||||
import com.tengshisoft.gismap.TouchMapView;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
import com.tenlionsoft.baselib.utils.LogUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
@ -23,10 +32,12 @@ import io.reactivex.rxjava3.core.Observable;
|
||||
@Route(path = PathConfig.PATH_MODULE_COMMON_DEMO)
|
||||
public class MapDemoActivity extends BaseActivity {
|
||||
|
||||
@BindView(R2.id.mv_map)
|
||||
TouchMapView mMvMap;
|
||||
private Unbinder mBind;
|
||||
|
||||
private Handler mHandler;
|
||||
|
||||
private LayerView mBaseLayerView;
|
||||
// 通过设置间隔时间和距离可以控制速度和图标移动的距离
|
||||
private static final int TIME_INTERVAL = 30;
|
||||
private static final double DISTANCE = 0.000005;
|
||||
@ -61,6 +72,23 @@ public class MapDemoActivity extends BaseActivity {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化地图
|
||||
*/
|
||||
private void initMap() {
|
||||
mBaseLayerView = new LayerView(this);
|
||||
mBaseLayerView.setURL(PathConfig.BASE_LAYER);
|
||||
CoordinateReferenceSystem crs = new CoordinateReferenceSystem();
|
||||
crs.wkid = PathConfig.CRS;
|
||||
mBaseLayerView.setCRS(crs);
|
||||
mMvMap.addLayer(mBaseLayerView);
|
||||
mMvMap.getController().setCenter(new Point2D(PathConfig.DEFAULT_LNG, PathConfig.DEFAULT_LAT));
|
||||
mMvMap.getController().setZoom(PathConfig.DEFAULT_ZOOM);
|
||||
mMvMap.setBuiltInZoomControls(false);//内置缩放控件
|
||||
mMvMap.setClickable(true);
|
||||
mMvMap.invalidate();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
@ -68,14 +96,11 @@ public class MapDemoActivity extends BaseActivity {
|
||||
|
||||
private void init() {
|
||||
initMap();
|
||||
drawPolyLine();
|
||||
drawLine();
|
||||
drawGrid();
|
||||
mHandler = new Handler(getMainLooper());
|
||||
}
|
||||
|
||||
private void initMap() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void drawPolyLine() {
|
||||
|
||||
@ -188,11 +213,72 @@ public class MapDemoActivity extends BaseActivity {
|
||||
point2DS.add(new Point2D(111.74426503720412, 40.80230021884654));
|
||||
point2DS.add(new Point2D(111.72573276691429, 40.8620153120026));
|
||||
polygonOverlay.setData(point2DS);
|
||||
// mMvMap.getOverlays().add(polygonOverlay);
|
||||
// mMvMap.invalidate();
|
||||
mMvMap.getOverlays().add(polygonOverlay);
|
||||
mMvMap.invalidate();
|
||||
});
|
||||
}
|
||||
|
||||
private void drawLine() {
|
||||
List<DrawMapLineBean> o = new ArrayList<>();
|
||||
DrawMapLineBean bean = new DrawMapLineBean();
|
||||
//TODO 速度大于20/s异常
|
||||
bean.setOnePoint(new Point2D(111.64800018875428, 40.85532310328682));
|
||||
bean.setTwoPoint(new Point2D(111.65829589447088, 40.78222359269927));
|
||||
bean.setType(14);
|
||||
bean.setLineColor(Integer.valueOf(Color.RED));
|
||||
bean.setEffect(false);
|
||||
DrawMapLineBean bean1 = new DrawMapLineBean();
|
||||
//TODO 速度小于0.5m/s等待
|
||||
bean1.setOnePoint(new Point2D(111.65829589447088, 40.78222359269927));
|
||||
bean1.setTwoPoint(new Point2D(111.74426503720412, 40.80230021884654));
|
||||
bean1.setType(13);
|
||||
bean1.setLineColor(Integer.valueOf(Color.YELLOW));
|
||||
bean1.setEffect(true);
|
||||
DrawMapLineBean bean2 = new DrawMapLineBean();
|
||||
//TODO 移动 绿色
|
||||
bean2.setOnePoint(new Point2D(111.74426503720412, 40.80230021884654));
|
||||
bean2.setTwoPoint(new Point2D(111.72573276691429, 40.8620153120026));
|
||||
bean2.setType(12);
|
||||
bean2.setLineColor(Integer.valueOf(Color.parseColor("#218868")));
|
||||
bean2.setEffect(false);
|
||||
DrawMapLineBean bean3 = new DrawMapLineBean();
|
||||
bean3.setOnePoint(new Point2D(111.72573276691429, 40.8620153120026));
|
||||
bean3.setTwoPoint(new Point2D(111.64800018875428, 40.85532310328682));
|
||||
bean3.setType(12);
|
||||
bean3.setLineColor(Integer.valueOf(Color.BLUE));
|
||||
bean3.setEffect(true);
|
||||
o.add(bean);
|
||||
o.add(bean1);
|
||||
o.add(bean2);
|
||||
o.add(bean3);
|
||||
for (int i = 0; i < o.size(); i++) {
|
||||
LineOverlay overlay = new LineOverlay(getLinePaint(o.get(i).getLineColor(), o.get(i).isEffect()));
|
||||
List<Point2D> points = new ArrayList<>();
|
||||
points.add(o.get(i).getOnePoint());
|
||||
points.add(o.get(i).getTwoPoint());
|
||||
overlay.setData(points);
|
||||
mMvMap.getOverlays().add(overlay);
|
||||
}
|
||||
mMvMap.getController().setCenter(o.get(0).getOnePoint());
|
||||
mMvMap.getController().setZoom(12);
|
||||
mMvMap.invalidate();
|
||||
}
|
||||
|
||||
/**
|
||||
* 绘线风格
|
||||
*/
|
||||
public static Paint getLinePaint(int color, boolean isEffect) {
|
||||
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
paint.setColor(color);
|
||||
paint.setStyle(Paint.Style.STROKE);
|
||||
paint.setStrokeWidth(5);
|
||||
paint.setAntiAlias(true);
|
||||
if (isEffect) {
|
||||
paint.setPathEffect(new DashPathEffect(new float[]{15, 5}, 5));
|
||||
}
|
||||
return paint;
|
||||
}
|
||||
|
||||
/**
|
||||
* 画网格的画笔
|
||||
*
|
||||
@ -200,12 +286,13 @@ public class MapDemoActivity extends BaseActivity {
|
||||
*/
|
||||
public static Paint getPolygonPaint() {
|
||||
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
paint.setColor(Color.argb(200, 10, 230, 250));
|
||||
paint.setStyle(Paint.Style.FILL_AND_STROKE);
|
||||
int a = Math.min(255, Math.max(0, (int) (0.4 * 255))) << 24;
|
||||
int rgb = 0x00ffffff & Color.parseColor("#000000");
|
||||
int col = a + rgb;
|
||||
paint.setColor(col);
|
||||
paint.setStrokeWidth(2);
|
||||
paint.setAntiAlias(true);
|
||||
return paint;
|
||||
|
||||
}
|
||||
/**
|
||||
* 循环进行移动逻辑
|
||||
|
@ -28,6 +28,24 @@ public class BuildSubmitBean {
|
||||
private List<FloorCountBean> floorCountList;
|
||||
private List<HouseCountBean> houseCountList;
|
||||
private List<List<UnitCountBean>> unitCountList;
|
||||
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 getBuildingNum() {
|
||||
return buildingNum;
|
||||
|
@ -25,6 +25,26 @@ public class BuildingDetailBean {
|
||||
private String residentialName;
|
||||
private int unitCount;
|
||||
private String unitCountStr;
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private List<FloorCountBean> floorCountList;
|
||||
private List<HouseCountBean> houseCountList;
|
||||
|
@ -24,6 +24,25 @@ public class CommunityAreaDetailBean {
|
||||
private String modifier;
|
||||
private String phone;
|
||||
private String remake;
|
||||
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 getAddress() {
|
||||
return address;
|
||||
|
@ -1,5 +1,8 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
|
||||
import com.supermap.imobilelite.maps.Point2D;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2019/8/29 - 17:34
|
||||
@ -7,40 +10,49 @@ package com.tengshisoft.commonmodule.beans;
|
||||
* 描述: type 线的类型 12:移动 13:等待 14:异常
|
||||
*/
|
||||
public class DrawMapLineBean {
|
||||
// private int type;//线的类型
|
||||
// private LatLng onePoint;
|
||||
// private LatLng twoPoint;
|
||||
// private Integer lineColor;
|
||||
//
|
||||
// public int getType() {
|
||||
// return type;
|
||||
// }
|
||||
//
|
||||
// public void setType(int type) {
|
||||
// this.type = type;
|
||||
// }
|
||||
//
|
||||
// public LatLng getOnePoint() {
|
||||
// return onePoint;
|
||||
// }
|
||||
//
|
||||
// public void setOnePoint(LatLng onePoint) {
|
||||
// this.onePoint = onePoint;
|
||||
// }
|
||||
//
|
||||
// public LatLng getTwoPoint() {
|
||||
// return twoPoint;
|
||||
// }
|
||||
//
|
||||
// public void setTwoPoint(LatLng twoPoint) {
|
||||
// this.twoPoint = twoPoint;
|
||||
// }
|
||||
//
|
||||
// public Integer getLineColor() {
|
||||
// return lineColor;
|
||||
// }
|
||||
//
|
||||
// public void setLineColor(Integer lineColor) {
|
||||
// this.lineColor = lineColor;
|
||||
// }
|
||||
private int type;//线的类型
|
||||
private Point2D onePoint;
|
||||
private Point2D twoPoint;
|
||||
private Integer lineColor;
|
||||
private boolean isEffect;
|
||||
|
||||
public boolean isEffect() {
|
||||
return isEffect;
|
||||
}
|
||||
|
||||
public void setEffect(boolean effect) {
|
||||
isEffect = effect;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Point2D getOnePoint() {
|
||||
return onePoint;
|
||||
}
|
||||
|
||||
public void setOnePoint(Point2D onePoint) {
|
||||
this.onePoint = onePoint;
|
||||
}
|
||||
|
||||
public Point2D getTwoPoint() {
|
||||
return twoPoint;
|
||||
}
|
||||
|
||||
public void setTwoPoint(Point2D twoPoint) {
|
||||
this.twoPoint = twoPoint;
|
||||
}
|
||||
|
||||
public Integer getLineColor() {
|
||||
return lineColor;
|
||||
}
|
||||
|
||||
public void setLineColor(Integer lineColor) {
|
||||
this.lineColor = lineColor;
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,24 @@ public class KeyAreaDetailBean {
|
||||
private String securityQuestion;
|
||||
private String securityQuestionCode;
|
||||
private String securityQuestionName;
|
||||
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 getEffectEvaluation() {
|
||||
return effectEvaluation;
|
||||
|
@ -17,6 +17,24 @@ public class SaveCommunityAreaBean {
|
||||
private String locationCode;
|
||||
private String phone;
|
||||
private String remake;
|
||||
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 getAddress() {
|
||||
return address;
|
||||
|
@ -30,6 +30,24 @@ public class SaveKeyAreaBean {
|
||||
private String securityQuestion;
|
||||
private String securityQuestionCode;
|
||||
private String securityQuestionName;
|
||||
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 getEffectEvaluation() {
|
||||
return effectEvaluation;
|
||||
|
@ -0,0 +1,178 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/12/24 - 5:05 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class UserGridList {
|
||||
|
||||
private String areaCode;
|
||||
private String areaName;
|
||||
private String fillColor;
|
||||
private String gmtCreate;
|
||||
private String gmtModified;
|
||||
private String gridCode;
|
||||
private String gridDuty;
|
||||
private String gridGroupId;
|
||||
private String gridId;
|
||||
private String gridName;
|
||||
private double gridSquare;
|
||||
private String gridSummary;
|
||||
private String relationId;
|
||||
private List<PointArrayBean> pointArray;
|
||||
private List<?> relationIdArray;
|
||||
|
||||
public String getAreaCode() {
|
||||
return areaCode;
|
||||
}
|
||||
|
||||
public void setAreaCode(String areaCode) {
|
||||
this.areaCode = areaCode;
|
||||
}
|
||||
|
||||
public String getAreaName() {
|
||||
return areaName;
|
||||
}
|
||||
|
||||
public void setAreaName(String areaName) {
|
||||
this.areaName = areaName;
|
||||
}
|
||||
|
||||
public String getFillColor() {
|
||||
return fillColor;
|
||||
}
|
||||
|
||||
public void setFillColor(String fillColor) {
|
||||
this.fillColor = fillColor;
|
||||
}
|
||||
|
||||
public String getGmtCreate() {
|
||||
return gmtCreate;
|
||||
}
|
||||
|
||||
public void setGmtCreate(String gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public String getGmtModified() {
|
||||
return gmtModified;
|
||||
}
|
||||
|
||||
public void setGmtModified(String gmtModified) {
|
||||
this.gmtModified = gmtModified;
|
||||
}
|
||||
|
||||
public String getGridCode() {
|
||||
return gridCode;
|
||||
}
|
||||
|
||||
public void setGridCode(String gridCode) {
|
||||
this.gridCode = gridCode;
|
||||
}
|
||||
|
||||
public String getGridDuty() {
|
||||
return gridDuty;
|
||||
}
|
||||
|
||||
public void setGridDuty(String gridDuty) {
|
||||
this.gridDuty = gridDuty;
|
||||
}
|
||||
|
||||
public String getGridGroupId() {
|
||||
return gridGroupId;
|
||||
}
|
||||
|
||||
public void setGridGroupId(String gridGroupId) {
|
||||
this.gridGroupId = gridGroupId;
|
||||
}
|
||||
|
||||
public String getGridId() {
|
||||
return gridId;
|
||||
}
|
||||
|
||||
public void setGridId(String gridId) {
|
||||
this.gridId = gridId;
|
||||
}
|
||||
|
||||
public String getGridName() {
|
||||
return gridName;
|
||||
}
|
||||
|
||||
public void setGridName(String gridName) {
|
||||
this.gridName = gridName;
|
||||
}
|
||||
|
||||
public double getGridSquare() {
|
||||
return gridSquare;
|
||||
}
|
||||
|
||||
public void setGridSquare(double gridSquare) {
|
||||
this.gridSquare = gridSquare;
|
||||
}
|
||||
|
||||
public String getGridSummary() {
|
||||
return gridSummary;
|
||||
}
|
||||
|
||||
public void setGridSummary(String gridSummary) {
|
||||
this.gridSummary = gridSummary;
|
||||
}
|
||||
|
||||
public String getRelationId() {
|
||||
return relationId;
|
||||
}
|
||||
|
||||
public void setRelationId(String relationId) {
|
||||
this.relationId = relationId;
|
||||
}
|
||||
|
||||
public List<PointArrayBean> getPointArray() {
|
||||
return pointArray;
|
||||
}
|
||||
|
||||
public void setPointArray(List<PointArrayBean> pointArray) {
|
||||
this.pointArray = pointArray;
|
||||
}
|
||||
|
||||
public List<?> getRelationIdArray() {
|
||||
return relationIdArray;
|
||||
}
|
||||
|
||||
public void setRelationIdArray(List<?> relationIdArray) {
|
||||
this.relationIdArray = relationIdArray;
|
||||
}
|
||||
|
||||
public static class PointArrayBean {
|
||||
private String gridId;
|
||||
private String lat;
|
||||
private String lng;
|
||||
|
||||
public String getGridId() {
|
||||
return gridId;
|
||||
}
|
||||
|
||||
public void setGridId(String gridId) {
|
||||
this.gridId = gridId;
|
||||
}
|
||||
|
||||
public String getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setLat(String lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public String getLng() {
|
||||
return lng;
|
||||
}
|
||||
|
||||
public void setLng(String lng) {
|
||||
this.lng = lng;
|
||||
}
|
||||
}
|
||||
}
|
@ -4,7 +4,10 @@ import android.graphics.Bitmap;
|
||||
import android.net.http.SslError;
|
||||
import android.os.Build;
|
||||
import android.view.View;
|
||||
import android.webkit.CookieManager;
|
||||
import android.webkit.HttpAuthHandler;
|
||||
import android.webkit.JsResult;
|
||||
import android.webkit.PermissionRequest;
|
||||
import android.webkit.SslErrorHandler;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebSettings;
|
||||
@ -36,6 +39,7 @@ import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
import okhttp3.Cookie;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
@ -80,15 +84,31 @@ public class SmartConsultFragment extends BaseFragment {
|
||||
private void initWebView() {
|
||||
mWvContent.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT));
|
||||
WebSettings settings = mWvContent.getSettings();
|
||||
settings.setCacheMode(WebSettings.LOAD_DEFAULT);
|
||||
settings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
|
||||
settings.setAppCacheEnabled(true);
|
||||
settings.setJavaScriptEnabled(true);//启用JS
|
||||
settings.setBlockNetworkImage(true);//阻塞页面图片加载
|
||||
settings.setDomStorageEnabled(true);
|
||||
settings.setUseWideViewPort(true);
|
||||
settings.setAllowFileAccess(true);
|
||||
settings.setLoadWithOverviewMode(true);
|
||||
settings.setJavaScriptCanOpenWindowsAutomatically(true);
|
||||
settings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);
|
||||
settings.setAllowFileAccessFromFileURLs(true);
|
||||
settings.setAllowUniversalAccessFromFileURLs(true);
|
||||
settings.setMediaPlaybackRequiresUserGesture(false);
|
||||
settings.setPluginState(WebSettings.PluginState.ON);
|
||||
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
String absolutePath = getApplicationContext().getCacheDir().getAbsolutePath();
|
||||
settings.setAppCachePath(absolutePath);
|
||||
settings.setDatabaseEnabled(true);
|
||||
mWvContent.requestFocus();
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
CookieManager.getInstance().setAcceptThirdPartyCookies(mWvContent, true);
|
||||
WebView.setWebContentsDebuggingEnabled(true);
|
||||
} else {
|
||||
CookieManager.getInstance().setAcceptCookie(true);
|
||||
}
|
||||
mWvContent.setWebChromeClient(new WebChromeClient() {
|
||||
@Override
|
||||
public void onProgressChanged(WebView view, int newProgress) {
|
||||
@ -100,6 +120,20 @@ public class SmartConsultFragment extends BaseFragment {
|
||||
mRlBar.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
|
||||
result.confirm();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPermissionRequest(PermissionRequest request) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
request.grant(request.getResources());
|
||||
request.getOrigin();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
@ -141,6 +175,7 @@ public class SmartConsultFragment extends BaseFragment {
|
||||
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
LogUtils.e(url);
|
||||
if (Build.VERSION.SDK_INT < 26) {
|
||||
view.loadUrl(url);
|
||||
return true;
|
||||
|
@ -31,6 +31,13 @@ import retrofit2.http.Query;
|
||||
public interface GridApis {
|
||||
/*=============================================================基础类接口===============================================================================*/
|
||||
|
||||
/**
|
||||
* 获取网格员网格
|
||||
*/
|
||||
@Headers({"Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/grid/list-with-point/relation-id/{relationId}")
|
||||
Observable<List<UserGridList>> getUserGrid(@Path("relationId") String userId, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 事件数量
|
||||
*/
|
||||
@ -1122,7 +1129,7 @@ public interface GridApis {
|
||||
* 上报事件
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@POST("app/report/save-app")
|
||||
@POST("app/report/save-grid")
|
||||
Observable<SuccessBean> doSaveCase(@Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
@ -1372,7 +1379,15 @@ public interface GridApis {
|
||||
*/
|
||||
@Headers({"base_url_name:task", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/receiveruser/listpagereceiveruser")
|
||||
Observable<TaskListBean> getTaskListByType(@Query("distributeStatus") String disStatus, @Query("distributeTaskType") String type, @Query("executeStatus") String status, @Query("isWarning") String warn, @Query("isSupervision") String sv, @Query("keywords") String key, @Query("page") String page, @Header("token") String token);
|
||||
Observable<TaskListBean> getTaskListByType(@Query("distributeStatus") String disStatus,
|
||||
@Query("orderDesc") String order,
|
||||
@Query("distributeTaskType") String type,
|
||||
@Query("executeStatus") String status,
|
||||
@Query("isWarning") String warn,
|
||||
@Query("isSupervision") String sv,
|
||||
@Query("keywords") String key,
|
||||
@Query("page") String page,
|
||||
@Header("token") String token);
|
||||
|
||||
/**
|
||||
* 获取任务详情
|
||||
|
@ -140,7 +140,7 @@
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="350dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="5dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="0dp">
|
||||
@ -149,7 +149,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.supermap.imobilelite.maps.MapView
|
||||
<com.tengshisoft.gismap.TouchMapView
|
||||
android:id="@+id/mv_map"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
@ -164,7 +164,8 @@
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/bm_btn_background"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp" />
|
||||
android:minHeight="0dp"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
@ -183,6 +183,13 @@
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical_top">
|
||||
|
||||
<com.tengshisoft.gismap.TouchMapView
|
||||
android:id="@+id/mv_map"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical">
|
||||
|
@ -38,13 +38,14 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="5dp">
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.ExpandableLinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:defaultItemCount="3"
|
||||
app:defaultItemCount="5"
|
||||
app:expandText="点击展开"
|
||||
app:hideText="点击收起"
|
||||
app:useDefaultBottom="true">
|
||||
@ -183,43 +184,13 @@
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical_top">
|
||||
|
||||
</com.tenlionsoft.baselib.core.widget.views.ExpandableLinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
app:cardCornerRadius="10dp"
|
||||
app:cardElevation="1dp"
|
||||
app:cardPreventCornerOverlap="true"
|
||||
app:cardUseCompatPadding="false"
|
||||
tools:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.ExpandableLinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:defaultItemCount="3"
|
||||
app:expandText="点击展开"
|
||||
app:hideText="点击收起"
|
||||
app:useDefaultBottom="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_issue_detail_info"
|
||||
style="@style/issue_report_title"
|
||||
android:padding="8dp"
|
||||
android:text="事件详细信息"
|
||||
android:textStyle="bold" />
|
||||
<com.tengshisoft.gismap.TouchMapView
|
||||
android:id="@+id/mv_map"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical">
|
||||
|
||||
@ -338,10 +309,13 @@
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</com.tenlionsoft.baselib.core.widget.views.ExpandableLinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cv_handle"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -191,6 +191,13 @@
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical_top">
|
||||
|
||||
<com.tengshisoft.gismap.TouchMapView
|
||||
android:id="@+id/mv_map"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical">
|
||||
|
@ -39,7 +39,7 @@
|
||||
app:expandText="点击展开"
|
||||
app:hideText="点击收起"
|
||||
app:useDefaultBottom="true"
|
||||
tools:visibility="gone">
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
style="@style/issue_report_title"
|
||||
@ -174,6 +174,14 @@
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical_top">
|
||||
|
||||
<com.tengshisoft.gismap.TouchMapView
|
||||
android:id="@+id/mv_map"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical">
|
||||
|
||||
<TextView
|
||||
@ -487,6 +495,35 @@
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cv_handle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardPreventCornerOverlap="true"
|
||||
app:cardUseCompatPadding="false"
|
||||
tools:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/issue_report_title"
|
||||
android:padding="8dp"
|
||||
android:text="处理详情"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_handles"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:listitem="@layout/item_incident_handle" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- 处理详情 -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
|
@ -11,7 +11,7 @@
|
||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||
android:id="@+id/mi_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/shp_bottom_shadow_white_no_radius" />
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
|
@ -1,37 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/gray_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||
android:id="@+id/mi_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_bottom_shadow_white_no_radius"
|
||||
android:orientation="horizontal">
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/shp_bottom_shadow_white_no_radius" />
|
||||
|
||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||
android:id="@+id/mi_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_condition"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_down_circle"
|
||||
android:elevation="12dp"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="筛选"
|
||||
android:textColor="@color/black"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/vp_content"
|
||||
|
@ -7,31 +7,14 @@
|
||||
android:background="@color/gray_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_bottom_shadow_white_no_radius"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||
android:id="@+id/mi_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@drawable/shp_bottom_shadow_white_no_radius"
|
||||
android:layout_height="50dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_condition"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_down_circle"
|
||||
android:elevation="12dp"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="筛选"
|
||||
android:textColor="@color/black"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/vp_content"
|
||||
|
@ -7,17 +7,13 @@
|
||||
android:background="@color/gray_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_bottom_shadow_white_no_radius"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||
android:id="@+id/mi_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp" />
|
||||
</LinearLayout>
|
||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||
android:id="@+id/mi_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/shp_bottom_shadow_white_no_radius" />
|
||||
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/vp_content"
|
||||
|
@ -6,5 +6,9 @@
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".activitys.checkwork.MapDemoActivity">
|
||||
|
||||
<com.tengshisoft.gismap.TouchMapView
|
||||
android:id="@+id/mv_map"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
@ -10,7 +10,7 @@
|
||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||
android:id="@+id/mi_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/shp_bottom_shadow_white_no_radius" />
|
||||
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_pwd_cir"
|
||||
android:drawableLeft="@drawable/ic_list_pwd"
|
||||
android:drawableRight="@drawable/ic_arrow_cir"
|
||||
android:drawablePadding="10dp"
|
||||
android:text="修改密码"
|
||||
@ -77,7 +77,7 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_clear_cache"
|
||||
android:drawableLeft="@drawable/ic_list_cache"
|
||||
android:drawablePadding="10dp"
|
||||
android:text="清除缓存"
|
||||
android:textColor="@color/black"
|
||||
@ -107,7 +107,7 @@
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_clear_cache"
|
||||
android:drawableLeft="@drawable/ic_list_cache"
|
||||
android:drawableRight="@drawable/ic_arrow_cir"
|
||||
android:drawablePadding="10dp"
|
||||
android:text="清空聊天记录"
|
||||
@ -129,7 +129,7 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_check_versionl"
|
||||
android:drawableLeft="@drawable/ic_list_version"
|
||||
android:drawablePadding="10dp"
|
||||
android:text="版本更新"
|
||||
android:textColor="@color/black"
|
||||
@ -159,7 +159,7 @@
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_pwd_cir"
|
||||
android:drawableLeft="@drawable/ic_list_collect"
|
||||
android:drawableRight="@drawable/ic_arrow_cir"
|
||||
android:drawablePadding="10dp"
|
||||
android:text="我的收藏"
|
||||
@ -181,7 +181,7 @@
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_pwd_cir"
|
||||
android:drawableLeft="@drawable/ic_list_contact"
|
||||
android:drawableRight="@drawable/ic_arrow_cir"
|
||||
android:drawablePadding="10dp"
|
||||
android:text="同步通讯录"
|
||||
|
@ -10,19 +10,26 @@ import com.supermap.imobilelite.maps.MapView;
|
||||
* 作者: adam
|
||||
* 日期: 2021/12/21 - 3:55 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
* 描述: 解决滑动冲突
|
||||
*/
|
||||
public class TouchMapView extends MapView {
|
||||
public TouchMapView(Context context) {
|
||||
super(context);
|
||||
// init();
|
||||
}
|
||||
|
||||
public TouchMapView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
// init();
|
||||
}
|
||||
|
||||
public TouchMapView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
// init();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
this.setBackgroundResource(R.drawable.shp_border_line);
|
||||
}
|
||||
|
||||
@Override
|
13
gismapmodule/src/main/res/drawable-xhdpi/shp_border_line.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="2dp" />
|
||||
<stroke
|
||||
android:width="2dp"
|
||||
android:color="@color/cardview_shadow_start_color" />
|
||||
<padding
|
||||
android:bottom="1dp"
|
||||
android:left="1dp"
|
||||
android:right="1dp"
|
||||
android:top="1dp" />
|
||||
</shape>
|
@ -39,7 +39,7 @@ dependencies {
|
||||
implementation project(':modulemap')
|
||||
implementation project(':commonmodule')
|
||||
implementation project(':moduleijkplayer')
|
||||
implementation project(':GisMap')
|
||||
implementation project(':gismapmodule')
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'//地图
|
||||
testImplementation 'junit:junit:4.+'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||||
|
@ -33,6 +33,7 @@ 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.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.LogUtils;
|
||||
import com.tenlionsoft.baselib.utils.RegexUtils;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
@ -63,7 +64,7 @@ import okhttp3.RequestBody;
|
||||
@Route(path = PathConfig.PATH_MODULE_GRID_ACTIVITY_HOUSE_BIND_PERSON)
|
||||
public class BindPersonToHouseActivity extends BaseActivity {
|
||||
|
||||
@BindView(R2.id.et_base_search_content)
|
||||
@BindView(R2.id.et_base_search_v)
|
||||
EditText mEtBaseSearchContent;
|
||||
@BindView(R2.id.iv_base_clear)
|
||||
ImageView mIvBaseClear;
|
||||
@ -148,10 +149,10 @@ public class BindPersonToHouseActivity extends BaseActivity {
|
||||
mBtnBaseSearch.setOnClickListener(v -> doSearchPerson());
|
||||
mBtnBind.setOnClickListener(v -> doBind());
|
||||
mAdapter.addOnItemClickListener(v -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_HIRER_DETAIL)
|
||||
.withString("id", v.getHouseUserId())
|
||||
.withString("houseId", v.getBuildingHouseId())
|
||||
.navigation(mActivity, 12));
|
||||
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_HIRER_DETAIL)
|
||||
.withString("id", v.getHouseUserId())
|
||||
.withString("houseId", v.getBuildingHouseId())
|
||||
.navigation(mActivity, 12));
|
||||
|
||||
}
|
||||
|
||||
@ -185,11 +186,11 @@ public class BindPersonToHouseActivity extends BaseActivity {
|
||||
DicBean bean = mDictionaryBeanList.get(o1);
|
||||
mTvType.setText(bean.getDataName());
|
||||
})
|
||||
.setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
.setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mPicker.setPicker(mDictionaryBeanList);
|
||||
}
|
||||
mPicker.show();
|
||||
@ -201,49 +202,49 @@ public class BindPersonToHouseActivity extends BaseActivity {
|
||||
private void doSearchPerson() {
|
||||
hideSoftKeyboard();
|
||||
String card = mEtBaseSearchContent.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(card) || !RegexUtils.isIDCard18Exact(card)) {
|
||||
if (TextUtils.isEmpty(card) || !RegexUtils.isIDNumber(card)) {
|
||||
ToastUtils.show("请输入合法的身份证号码");
|
||||
return;
|
||||
}
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "搜索中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.doSearchPerson(card, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<PersonSearchBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
.create(BaseApiService.class)
|
||||
.doSearchPerson(card, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<PersonSearchBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull PersonSearchBean personSearchBean) {
|
||||
dialog.dismiss();
|
||||
if (!TextUtils.isEmpty(personSearchBean.getFullName())) {
|
||||
mSearchBean = personSearchBean;
|
||||
setSearchContentView(2);
|
||||
mTvGender.setText(personSearchBean.getGenderDictionaryName());
|
||||
mTvName.setText(personSearchBean.getFullName());
|
||||
mEtPhone.setText(personSearchBean.getTelephone());
|
||||
} else {
|
||||
setSearchContentView(1);
|
||||
mTvSearchHint.setText("人口数据库中未找到该人员");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull PersonSearchBean personSearchBean) {
|
||||
dialog.dismiss();
|
||||
if (!TextUtils.isEmpty(personSearchBean.getFullName())) {
|
||||
mSearchBean = personSearchBean;
|
||||
setSearchContentView(2);
|
||||
mTvGender.setText(personSearchBean.getGenderDictionaryName());
|
||||
mTvName.setText(personSearchBean.getFullName());
|
||||
mEtPhone.setText(personSearchBean.getTelephone());
|
||||
} else {
|
||||
setSearchContentView(1);
|
||||
mTvSearchHint.setText("人口数据库中未找到该人员");
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -267,59 +268,59 @@ public class BindPersonToHouseActivity extends BaseActivity {
|
||||
private void getHireRecordList(int page) {
|
||||
mCurrentPage = page;
|
||||
RetrofitManager.getInstance()
|
||||
.create(GridApis.class)
|
||||
.getHouseHireRecordByHouseId(mId, page + "", UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<HireRecordListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
.create(GridApis.class)
|
||||
.getHouseHireRecordByHouseId(mId, page + "", UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<HireRecordListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull HireRecordListBean hireRecordListBean) {
|
||||
if (hireRecordListBean.getRows() != null && hireRecordListBean.getRows().size() > 0) {
|
||||
++mCurrentPage;
|
||||
if (page == 1) {
|
||||
mDatas.clear();
|
||||
mDatas.addAll(hireRecordListBean.getRows());
|
||||
} else {
|
||||
mDatas.addAll(hireRecordListBean.getRows());
|
||||
}
|
||||
setStateView(14);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mSrlContent.finishRefresh();
|
||||
if (mDatas.size() >= hireRecordListBean.getTotal()) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(true);
|
||||
} else {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(false);
|
||||
}
|
||||
@Override
|
||||
public void onNext(@NonNull HireRecordListBean hireRecordListBean) {
|
||||
if (hireRecordListBean.getRows() != null && hireRecordListBean.getRows().size() > 0) {
|
||||
++mCurrentPage;
|
||||
if (page == 1) {
|
||||
mDatas.clear();
|
||||
mDatas.addAll(hireRecordListBean.getRows());
|
||||
} else {
|
||||
if (page > 1) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(true);
|
||||
setStateView(14);
|
||||
} else {
|
||||
setStateView(15);
|
||||
}
|
||||
mDatas.addAll(hireRecordListBean.getRows());
|
||||
}
|
||||
setStateView(14);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mSrlContent.finishRefresh();
|
||||
if (mDatas.size() >= hireRecordListBean.getTotal()) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(true);
|
||||
} else {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(false);
|
||||
}
|
||||
} else {
|
||||
if (page > 1) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(true);
|
||||
setStateView(14);
|
||||
} else {
|
||||
setStateView(15);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.finishRefresh();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.finishRefresh();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -353,59 +354,8 @@ public class BindPersonToHouseActivity extends BaseActivity {
|
||||
dialog.show();
|
||||
RequestBody body = buildParams();
|
||||
RetrofitManager.getInstance()
|
||||
.create(GridApis.class)
|
||||
.doBindPersonToHouse(body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull SuccessBean successBean) {
|
||||
//绑定成功 刷列表 重置搜索
|
||||
dialog.dismiss();
|
||||
ToastUtils.show("添加成功");
|
||||
doRefresh();
|
||||
setSearchContentView(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void delHire(String id) {
|
||||
AlertDialog dialog = new AlertDialog.Builder(mActivity)
|
||||
.setTitle("警告")
|
||||
.setIcon(android.R.drawable.ic_dialog_info)
|
||||
.setMessage("确定要删除该租住记录吗?")
|
||||
.setPositiveButton("确定", (dialog1, which) -> doDelHire(id))
|
||||
.setNegativeButton("取消", (d, which) -> d.dismiss())
|
||||
.create();
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除绑定记录
|
||||
*/
|
||||
private void doDelHire(String id) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "删除中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(GridApis.class)
|
||||
.doDelHireRecord(id, UserLgUtils.getToken())
|
||||
.doBindPersonToHouse(body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
@ -416,8 +366,9 @@ public class BindPersonToHouseActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull SuccessBean successBean) {
|
||||
//绑定成功 刷列表 重置搜索
|
||||
dialog.dismiss();
|
||||
ToastUtils.show("删除成功");
|
||||
ToastUtils.show("添加成功");
|
||||
doRefresh();
|
||||
setSearchContentView(1);
|
||||
}
|
||||
@ -433,6 +384,56 @@ public class BindPersonToHouseActivity extends BaseActivity {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void delHire(String id) {
|
||||
AlertDialog dialog = new AlertDialog.Builder(mActivity)
|
||||
.setTitle("警告")
|
||||
.setIcon(android.R.drawable.ic_dialog_info)
|
||||
.setMessage("确定要删除该租住记录吗?")
|
||||
.setPositiveButton("确定", (dialog1, which) -> doDelHire(id))
|
||||
.setNegativeButton("取消", (d, which) -> d.dismiss())
|
||||
.create();
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除绑定记录
|
||||
*/
|
||||
private void doDelHire(String id) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "删除中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(GridApis.class)
|
||||
.doDelHireRecord(id, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull SuccessBean successBean) {
|
||||
dialog.dismiss();
|
||||
ToastUtils.show("删除成功");
|
||||
doRefresh();
|
||||
setSearchContentView(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|