事件接口修改
This commit is contained in:
parent
1a28d39d16
commit
61992c1be4
@ -27,6 +27,7 @@ public class PathConfig {
|
||||
public static final String SESSION_ID = "sessionId";
|
||||
public static final int MSG_REGISTER = 1000;//注册socket
|
||||
public static final int MSG_TYPE_TEXT = 2001;//聊天消息 文本信息
|
||||
public static final int MSG_TYPE_POINT = 11001;//发送定位信息
|
||||
public static final int MSG_NOTICE = 3001;//系统通知
|
||||
public static final int MSG_NOTICE_TARGET = 3003;//系统带参数的通知
|
||||
public static final int MSG_TYPE_STATE = 9001;//消息发送的状态
|
||||
@ -159,7 +160,7 @@ public class PathConfig {
|
||||
public static final String USER_TYPE_N = "bc405346-8714-4ded-89ac-9cc4d755f66a";
|
||||
public static final String USER_TYPE_X = "25affe67-134c-4a32-ba41-64b0cfedc782";
|
||||
// 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 = "4f75940c-930f-4576-ae0b-b8f699aa5bdc";/*测试App下载码*/
|
||||
|
||||
public static final String NEWS_ID = "f497904b-7727-4832-891c-604c36ae4167";//文化动态ID
|
||||
public static final String NEWS_SHOW_ID = "f1d5d313-f728-4dda-9843-1116d97e17b0";//展览展示ID
|
||||
@ -193,7 +194,8 @@ public class PathConfig {
|
||||
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 = "168";//乌兰察布市
|
||||
public static final String CITY_BAIDU_CODE = "321";//呼和浩特市
|
||||
|
||||
public static final String DEFAULT_AREA_1 = "99537";//默认一级地区 内蒙古
|
||||
public static final String DEFAULT_AREA_2 = "110889";//默认二级地区 乌兰察布
|
||||
@ -314,6 +316,8 @@ public class PathConfig {
|
||||
public static final String PATH_MODULE_COMMON_ACTIVITY_SEL_DEPT = "/modulecommon/activity/chooseDept";//部门选择接口
|
||||
public static final String PATH_MODULE_COMMON_ACTIVITY_SEL_PERSON = "/modulecommon/activity/choosePerson";//人员选择
|
||||
public static final String PATH_MODULE_COMMON_ACTIVITY_INCIDENT_LOG = "/modulecommon/activity/incidentLog";//事件日志
|
||||
|
||||
public static final String PATH_MODULE_COMMON_ACTIVITY_STATISTICS = "/modulecommon/activity/statistics";//统计分析
|
||||
//======================网格员==================================================
|
||||
//小区
|
||||
public static final String PATH_MODULE_GRID_ACTIVITY_COMMUNITY_MANAGE = "/modulegrid/activity/communityManage";//小区管理
|
||||
@ -496,6 +500,7 @@ public class PathConfig {
|
||||
public static final String PATH_MODULE_GRID_ACTIVITY_INCIDENT_CHECK_LIST = "/modulegrid/activity/incidentCheckList";//事件核查
|
||||
public static final String PATH_MODULE_GRID_ACTIVITY_INCIDENT_CHECK_DETAIL = "/modulegrid/activity/incidentCheckDetail";//事件核查详情
|
||||
|
||||
public static final String PATH_MODULE_GRID_ACTIVITY_WORK_LOCUS = "/modulegrid/activity/locusWork";//工作轨迹
|
||||
/*=========================================中心端============================================*/
|
||||
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";//事件受理
|
||||
|
@ -0,0 +1,70 @@
|
||||
package com.tenlionsoft.baselib.core.beans;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/29 - 4:56 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class SaveLocationBean {
|
||||
// @CheckEmptyAnnotation(name = "用户经度")
|
||||
private String userLng;
|
||||
// @CheckEmptyAnnotation(name = "用户维度")
|
||||
private String userLat;
|
||||
// @CheckNumberAnnotation(name = "是否越界")
|
||||
private Integer isOverstep;
|
||||
// @CheckEmptyAnnotation(name = "创建人")
|
||||
private String creator;
|
||||
// @CheckEmptyAnnotation(name = "用户名")
|
||||
private String userUsername;
|
||||
// @CheckEmptyAnnotation(name = "昵称")
|
||||
private String userName;
|
||||
|
||||
public String getUserLng() {
|
||||
return userLng;
|
||||
}
|
||||
|
||||
public void setUserLng(String userLng) {
|
||||
this.userLng = userLng;
|
||||
}
|
||||
|
||||
public String getUserLat() {
|
||||
return userLat;
|
||||
}
|
||||
|
||||
public void setUserLat(String userLat) {
|
||||
this.userLat = userLat;
|
||||
}
|
||||
|
||||
public Integer getIsOverstep() {
|
||||
return isOverstep;
|
||||
}
|
||||
|
||||
public void setIsOverstep(Integer isOverstep) {
|
||||
this.isOverstep = isOverstep;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getUserUsername() {
|
||||
return userUsername;
|
||||
}
|
||||
|
||||
public void setUserUsername(String userUsername) {
|
||||
this.userUsername = userUsername;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
}
|
@ -10,7 +10,7 @@ import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
public class BaseUrlApi {
|
||||
|
||||
// public static final String IP = "http://192.168.0.109:8080/";/* 正式IP */
|
||||
public static final String IP = "http://192.168.0.103:7011/";/* 正式IP */
|
||||
public static final String IP = "http://192.168.0.120:8080/";/* 正式IP */
|
||||
public static final String SYS_USERCENTER = "usercenter/";
|
||||
public static final String SYS_POPULATION = "population/";/*人口系统*/
|
||||
public static final String SYS_CASE = "case/";/*事件部件*/
|
||||
@ -19,7 +19,7 @@ public class BaseUrlApi {
|
||||
public static final String SYS_TASK = "systemtask/";/*任务系统*/
|
||||
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_MAIN_IP = IP + SYS_CASE;
|
||||
public static final String BASE_CASE_IP = IP + SYS_CASE;
|
||||
public static final String BASE_SECURITY_IP = IP + SYS_SECURITY;
|
||||
public static final String BASE_HOUSE_IP = IP + SYS_HOUSE;
|
||||
@ -27,7 +27,7 @@ public class BaseUrlApi {
|
||||
public static final String BASE_TASK_IP = IP + SYS_TASK;
|
||||
public static final String BASE_URL = BASE_MAIN_IP;//基础URL
|
||||
|
||||
public static final String SOCKET_IP = "http://192.168.0.120:8080/websocket";/*SocketIP*/
|
||||
public static final String SOCKET_IP = "http://192.168.0.120:8081/websocket";/*SocketIP*/
|
||||
|
||||
//地图页面展示类型
|
||||
|
||||
|
@ -117,6 +117,12 @@ public final class TimeUtils {
|
||||
return format.format(date);
|
||||
}
|
||||
|
||||
public static String getCurrentDate() {
|
||||
Date date = new Date();
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
return format.format(date);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前时间
|
||||
*
|
||||
|
@ -19,11 +19,15 @@ import com.baidu.location.BDAbstractLocationListener;
|
||||
import com.baidu.location.BDLocation;
|
||||
import com.baidu.location.LocationClient;
|
||||
import com.baidu.location.LocationClientOption;
|
||||
import com.baidu.mapapi.model.LatLng;
|
||||
import com.baidu.mapapi.utils.SpatialRelationUtil;
|
||||
import com.google.gson.Gson;
|
||||
import com.tengshisoft.chatmodule.adapter.UserContactAdapter;
|
||||
import com.tenlionsoft.baselib.constant.GlobalProvider;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.beans.BaseSuccessBean;
|
||||
import com.tenlionsoft.baselib.core.beans.MessageBean;
|
||||
import com.tenlionsoft.baselib.core.beans.SaveLocationBean;
|
||||
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;
|
||||
@ -43,6 +47,7 @@ import org.json.JSONObject;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
@ -74,6 +79,8 @@ public class BusinessService extends Service {
|
||||
private boolean isUpload = false;
|
||||
private long mUploadPointTime;
|
||||
private PunchTimeReceiver mReceiver;
|
||||
private int mMaxPoint = 2;
|
||||
private int mConnectCount = 1;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
@ -118,6 +125,7 @@ public class BusinessService extends Service {
|
||||
|
||||
@Override
|
||||
public void onNext(BaseSuccessBean baseSuccessBean) {
|
||||
mConnectCount = 1;
|
||||
if (!TextUtils.isEmpty(baseSuccessBean.getData())) {
|
||||
GlobalProvider.save(BusinessService.this, PathConfig.SESSION_ID, baseSuccessBean.getData());
|
||||
//开启websocket
|
||||
@ -129,7 +137,10 @@ public class BusinessService extends Service {
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
//TODO startSocketService();
|
||||
++mConnectCount;
|
||||
if (mConnectCount < 5) {
|
||||
startSocketService();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -293,17 +304,116 @@ public class BusinessService extends Service {
|
||||
mLocationClient.start();
|
||||
}
|
||||
|
||||
/*获取到的定位信息*/
|
||||
private class MyLocationListener extends BDAbstractLocationListener {
|
||||
|
||||
@Override
|
||||
public void onReceiveLocation(BDLocation bdLocation) {
|
||||
if (bdLocation != null && bdLocation.getLatitude() != 0 && bdLocation.getLongitude() != 0) {
|
||||
if (bdLocation.getLongitude() != Double.MIN_VALUE && bdLocation.getLongitude() != Double.MIN_VALUE) {
|
||||
//TODO 获取到的定位信息
|
||||
sendLocationCurrent(bdLocation);
|
||||
addPointToList(bdLocation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void addPointToList(BDLocation bdLocation) {
|
||||
if (null != bdLocation) {
|
||||
boolean isLegal = checkSinglePoint(bdLocation);
|
||||
if (isLegal) {
|
||||
if (mTempList.size() >= mMaxPoint) {
|
||||
checkPoints();
|
||||
} else {
|
||||
mTempList.add(bdLocation);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据定位精度取最小精度
|
||||
*/
|
||||
private void checkPoints() {
|
||||
Collections.sort(mTempList, (o1, o2) -> {
|
||||
if (o1.getRadius() > o2.getRadius()) {
|
||||
return 1;
|
||||
} else if (o1.getRadius() < o2.getRadius()) {
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
buildUploadPoint();
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建定位上传参数
|
||||
*/
|
||||
private void buildUploadPoint() {
|
||||
boolean wsConnected = mWsManager.isWsConnected();
|
||||
if (wsConnected) {
|
||||
SaveLocationBean bean = new SaveLocationBean();
|
||||
bean.setCreator(UserLgUtils.getUserId());
|
||||
bean.setUserLat(mTempList.get(0).getLatitude() + "");
|
||||
bean.setUserLng(mTempList.get(0).getLongitude() + "");
|
||||
bean.setIsOverstep(0);
|
||||
bean.setUserName(UserLgUtils.getName());
|
||||
bean.setUserUsername(UserLgUtils.getUserName());
|
||||
Gson gson = new Gson();
|
||||
String s = gson.toJson(bean);
|
||||
sendLocationPoint(s);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* socket上报定位
|
||||
*/
|
||||
private void sendLocationPoint(String point) {
|
||||
AppSocketMessage msgBean = new AppSocketMessage();
|
||||
msgBean.setType(PathConfig.MSG_TYPE_POINT);
|
||||
msgBean.setTo("system");
|
||||
msgBean.setFrom(UserLgUtils.getUserId());
|
||||
msgBean.setBody(point);
|
||||
msgBean.setId(System.currentTimeMillis() + "");
|
||||
Gson gson = new Gson();
|
||||
String s = gson.toJson(msgBean);
|
||||
mWsManager.sendMessage(s);
|
||||
mTempList.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验定位点的合法性
|
||||
*/
|
||||
private boolean checkSinglePoint(BDLocation bdLocation) {
|
||||
boolean isLegal = false;
|
||||
if (isFirst) {
|
||||
if (PathConfig.CITY_BAIDU_CODE.equals(bdLocation.getCityCode())) {
|
||||
isLegal = true;
|
||||
} else {
|
||||
isLegal = false;
|
||||
}
|
||||
} else {
|
||||
if (PathConfig.CITY_BAIDU_CODE.equals(bdLocation.getCityCode()) && bdLocation.getRadius() <= mPrecision) {
|
||||
if (mCurrentLocation != null) {
|
||||
LatLng latLng1 = new LatLng(mCurrentLocation.getLatitude(), mCurrentLocation.getLongitude());
|
||||
LatLng latLng2 = new LatLng(bdLocation.getLatitude(), bdLocation.getLongitude());
|
||||
boolean circleContainsPoint = SpatialRelationUtil.isCircleContainsPoint(latLng1, 200, latLng2);
|
||||
if (circleContainsPoint) {
|
||||
mCurrentLocation = bdLocation;
|
||||
isLegal = true;
|
||||
} else {
|
||||
isLegal = false;
|
||||
}
|
||||
} else {
|
||||
mCurrentLocation = bdLocation;
|
||||
isLegal = true;
|
||||
}
|
||||
} else {
|
||||
isLegal = false;
|
||||
}
|
||||
}
|
||||
return isLegal;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -313,11 +423,11 @@ public class BusinessService extends Service {
|
||||
*/
|
||||
private void sendLocationCurrent(BDLocation bdLocation) {
|
||||
if (bdLocation.getRadius() <= mPrecision) {
|
||||
//PathConfig.DEFAULT_CITY_CODE.equals(bdLocation.getCityCode()) &&
|
||||
if (bdLocation.getRadius() <= mPrecision) {
|
||||
Intent mIntent = new Intent(PathConfig.ACTION_LOCATION_MESSAGE);
|
||||
mIntent.putExtra("data", bdLocation);
|
||||
sendBroadcast(mIntent);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -451,6 +561,7 @@ public class BusinessService extends Service {
|
||||
mWsManager.sendMessage(s);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发送socket已办
|
||||
*/
|
||||
|
@ -3,7 +3,8 @@
|
||||
package="com.tengshisoft.commonmodule">
|
||||
|
||||
<application>
|
||||
<activity android:name=".activitys.logs.IncidentLogActivity"></activity>
|
||||
<activity android:name=".activitys.logs.StatisticsActivity"></activity>
|
||||
<activity android:name=".activitys.logs.IncidentLogActivity" />
|
||||
<activity android:name=".activitys.department.ChoosePersonActivity" />
|
||||
<activity android:name=".activitys.department.ChooseDeptActivity" />
|
||||
<activity android:name=".activitys.usercenter.UserCenterActivity" />
|
||||
|
@ -18,6 +18,7 @@ import com.tengshisoft.commonmodule.R2;
|
||||
import com.tengshisoft.commonmodule.adapters.ChooseDeptAdapter;
|
||||
import com.tengshisoft.commonmodule.adapters.SelDeptAdapter;
|
||||
import com.tengshisoft.commonmodule.beans.DepartmentListBean;
|
||||
import com.tengshisoft.commonmodule.beans.DistributionDeptBean;
|
||||
import com.tengshisoft.commonmodule.nets.Apis;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
@ -74,6 +75,7 @@ public class ChooseDeptActivity extends BaseActivity {
|
||||
private List<DepartmentListBean> mDepartments = new ArrayList<>();
|
||||
private SelDeptAdapter mSelAdapter;
|
||||
private ChooseDeptAdapter mAdapter;
|
||||
private String mTaskId;
|
||||
|
||||
|
||||
@Override
|
||||
@ -84,20 +86,60 @@ public class ChooseDeptActivity extends BaseActivity {
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mDeptId = getIntent().getStringExtra("deptId");
|
||||
mDeptName = getIntent().getStringExtra("deptName");
|
||||
mTaskId = getIntent().getStringExtra("taskId");
|
||||
|
||||
mTvBaseTitle.setText("选择部门");
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
mTvPublish.setText("确定");
|
||||
mTvPublish.setOnClickListener(v -> doConfirm());
|
||||
if (TextUtils.isEmpty(mDeptId)) {
|
||||
if (TextUtils.isEmpty(mTaskId)) {
|
||||
ToastUtils.show("数据有误");
|
||||
finish();
|
||||
} else {
|
||||
initViews();
|
||||
getDepartByTaskId();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据TaskId获取部门信息
|
||||
*/
|
||||
private void getDepartByTaskId() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.getDeptByTaskId(mTaskId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<DistributionDeptBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull DistributionDeptBean distributionDeptBean) {
|
||||
if (!TextUtils.isEmpty(distributionDeptBean.getUserDeptId())) {
|
||||
mDeptId = distributionDeptBean.getUserDeptId();
|
||||
mDeptName = distributionDeptBean.getUserDeptName();
|
||||
initViews();
|
||||
} else {
|
||||
refreshView(STATE_LOAD_EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认选择
|
||||
*/
|
||||
|
@ -0,0 +1,32 @@
|
||||
package com.tengshisoft.commonmodule.activitys.logs;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2021年10月29日16:43:03
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 统计分析
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_COMMON_ACTIVITY_STATISTICS)
|
||||
public class StatisticsActivity extends BaseActivity {
|
||||
|
||||
|
||||
private Unbinder mBind;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_statistics;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
}
|
||||
}
|
@ -0,0 +1,124 @@
|
||||
package com.tengshisoft.commonmodule.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
import com.tengshisoft.commonmodule.beans.LocusTextBean;
|
||||
import com.tengshisoft.commonmodule.holders.LocusOfflineHolder;
|
||||
import com.tengshisoft.commonmodule.holders.LocusOnlineHolder;
|
||||
import com.tengshisoft.commonmodule.holders.LocusStartHolder;
|
||||
import com.tengshisoft.commonmodule.holders.LocusStayHolder;
|
||||
import com.tengshisoft.commonmodule.holders.LocusStopHolder;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
|
||||
import com.tenlionsoft.baselib.utils.TimeUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2019/7/31 - 10:30
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class LocusStepAdapter extends BaseRecyclerAdapter<LocusTextBean, RecyclerView.ViewHolder> {
|
||||
public static final int TYPE_START = 121;//开始
|
||||
public static final int TYPE_ONLINE = 122;//在线,移动
|
||||
public static final int TYPE_OFFLINE = 123;//离线
|
||||
public static final int TYPE_STAY = 124;//停留
|
||||
public static final int TYPE_STOP = 125;//停止
|
||||
public static final int TYPE_UNUSUAL = 126;//异常
|
||||
|
||||
public LocusStepAdapter(Context ctx, List<LocusTextBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecyclerView.ViewHolder createHolder(ViewGroup parent, int viewType) {
|
||||
RecyclerView.ViewHolder holder = null;
|
||||
View itemView = null;
|
||||
switch (viewType) {
|
||||
case TYPE_START:
|
||||
itemView = LayoutInflater.from(mContext).inflate(R.layout.item_step_start, parent, false);
|
||||
holder = new LocusStartHolder(itemView);
|
||||
break;
|
||||
case TYPE_ONLINE:
|
||||
itemView = LayoutInflater.from(mContext).inflate(R.layout.item_step_online, parent, false);
|
||||
holder = new LocusOnlineHolder(itemView);
|
||||
break;
|
||||
case TYPE_OFFLINE:
|
||||
itemView = LayoutInflater.from(mContext).inflate(R.layout.item_step_offline, parent, false);
|
||||
holder = new LocusOfflineHolder(itemView);
|
||||
break;
|
||||
case TYPE_STAY:
|
||||
itemView = LayoutInflater.from(mContext).inflate(R.layout.item_step_stay, parent, false);
|
||||
holder = new LocusStayHolder(itemView);
|
||||
break;
|
||||
case TYPE_STOP:
|
||||
itemView = LayoutInflater.from(mContext).inflate(R.layout.item_step_stop, parent, false);
|
||||
holder = new LocusStopHolder(itemView);
|
||||
break;
|
||||
case TYPE_UNUSUAL:
|
||||
itemView = LayoutInflater.from(mContext).inflate(R.layout.item_step_unusual, parent, false);
|
||||
holder = new LocusStopHolder(itemView);
|
||||
break;
|
||||
default:
|
||||
itemView = LayoutInflater.from(mContext).inflate(R.layout.item_step_offline, parent, false);
|
||||
holder = new LocusOfflineHolder(itemView);
|
||||
break;
|
||||
}
|
||||
return holder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
return mData.get(position).getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(RecyclerView.ViewHolder myHolder, int i) {
|
||||
int itemViewType = getItemViewType(i);
|
||||
String time = "";
|
||||
if (mData.get(i).getSecond() > 0) {
|
||||
time = TimeUtils.secToTime(mData.get(i).getSecond());
|
||||
} else {
|
||||
time = "0";
|
||||
}
|
||||
switch (itemViewType) {
|
||||
case TYPE_START:
|
||||
((LocusStartHolder) myHolder).mTvTime.setText(mData.get(i).getTime());
|
||||
((LocusStartHolder) myHolder).mTvAddress.setText(mData.get(i).getAddress());
|
||||
break;
|
||||
case TYPE_ONLINE:
|
||||
((LocusOnlineHolder) myHolder).mTvTime.setText(mData.get(i).getTime());
|
||||
((LocusOnlineHolder) myHolder).mTvAddress.setText(mData.get(i).getAddress());
|
||||
((LocusOnlineHolder) myHolder).mTvStateTime.setText("移动时间:" + time);
|
||||
break;
|
||||
case TYPE_OFFLINE:
|
||||
((LocusOfflineHolder) myHolder).mTvTime.setText(mData.get(i).getTime());
|
||||
((LocusOfflineHolder) myHolder).mTvAddress.setText(mData.get(i).getAddress());
|
||||
((LocusOfflineHolder) myHolder).mTvStateTime.setText("断联时间:" + time);
|
||||
break;
|
||||
case TYPE_STAY:
|
||||
((LocusStayHolder) myHolder).mTvTime.setText(mData.get(i).getTime());
|
||||
((LocusStayHolder) myHolder).mTvAddress.setText(mData.get(i).getAddress());
|
||||
((LocusStayHolder) myHolder).mTvStateTime.setText("等待时间:" + time);
|
||||
break;
|
||||
case TYPE_STOP:
|
||||
((LocusStopHolder) myHolder).mTvTime.setText(mData.get(i).getTime());
|
||||
((LocusStopHolder) myHolder).mTvAddress.setText(mData.get(i).getAddress());
|
||||
break;
|
||||
case TYPE_UNUSUAL:
|
||||
((LocusStopHolder) myHolder).mTvTime.setText(mData.get(i).getTime());
|
||||
((LocusStopHolder) myHolder).mTvAddress.setText(mData.get(i).getAddress());
|
||||
((LocusStopHolder) myHolder).mTvStateTime.setText("异常时间:" + time);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,155 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/30 - 2:36 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class DistributionDeptBean {
|
||||
|
||||
private String businessId;
|
||||
private String creator;
|
||||
private String creatorName;
|
||||
private String distributionId;
|
||||
private String distributionUserId;
|
||||
private String gmtCreate;
|
||||
private String reportId;
|
||||
private String taskId;
|
||||
private String userDeptId;
|
||||
private String userDeptName;
|
||||
private String userId;
|
||||
private String userName;
|
||||
private String userStatus;
|
||||
private String userStatusText;
|
||||
private String userType;
|
||||
private String userTypeText;
|
||||
|
||||
public String getBusinessId() {
|
||||
return businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getCreatorName() {
|
||||
return creatorName;
|
||||
}
|
||||
|
||||
public void setCreatorName(String creatorName) {
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
|
||||
public String getDistributionId() {
|
||||
return distributionId;
|
||||
}
|
||||
|
||||
public void setDistributionId(String distributionId) {
|
||||
this.distributionId = distributionId;
|
||||
}
|
||||
|
||||
public String getDistributionUserId() {
|
||||
return distributionUserId;
|
||||
}
|
||||
|
||||
public void setDistributionUserId(String distributionUserId) {
|
||||
this.distributionUserId = distributionUserId;
|
||||
}
|
||||
|
||||
public String getGmtCreate() {
|
||||
return gmtCreate;
|
||||
}
|
||||
|
||||
public void setGmtCreate(String gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public String getReportId() {
|
||||
return reportId;
|
||||
}
|
||||
|
||||
public void setReportId(String reportId) {
|
||||
this.reportId = reportId;
|
||||
}
|
||||
|
||||
public String getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(String taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getUserDeptId() {
|
||||
return userDeptId;
|
||||
}
|
||||
|
||||
public void setUserDeptId(String userDeptId) {
|
||||
this.userDeptId = userDeptId;
|
||||
}
|
||||
|
||||
public String getUserDeptName() {
|
||||
return userDeptName;
|
||||
}
|
||||
|
||||
public void setUserDeptName(String userDeptName) {
|
||||
this.userDeptName = userDeptName;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getUserStatus() {
|
||||
return userStatus;
|
||||
}
|
||||
|
||||
public void setUserStatus(String userStatus) {
|
||||
this.userStatus = userStatus;
|
||||
}
|
||||
|
||||
public String getUserStatusText() {
|
||||
return userStatusText;
|
||||
}
|
||||
|
||||
public void setUserStatusText(String userStatusText) {
|
||||
this.userStatusText = userStatusText;
|
||||
}
|
||||
|
||||
public String getUserType() {
|
||||
return userType;
|
||||
}
|
||||
|
||||
public void setUserType(String userType) {
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
public String getUserTypeText() {
|
||||
return userTypeText;
|
||||
}
|
||||
|
||||
public void setUserTypeText(String userTypeText) {
|
||||
this.userTypeText = userTypeText;
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
import com.baidu.mapapi.model.LatLng;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2019/8/29 - 17:34
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 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;
|
||||
}
|
||||
}
|
@ -7,17 +7,16 @@ package com.tengshisoft.commonmodule.beans;
|
||||
* 描述:
|
||||
*/
|
||||
public class IncidentRebackBean {
|
||||
|
||||
private String dispatchId;
|
||||
private String reportId;
|
||||
private String explain;
|
||||
private String taskId;
|
||||
|
||||
public String getDispatchId() {
|
||||
return dispatchId;
|
||||
public String getReportId() {
|
||||
return reportId;
|
||||
}
|
||||
|
||||
public void setDispatchId(String dispatchId) {
|
||||
this.dispatchId = dispatchId;
|
||||
public void setReportId(String reportId) {
|
||||
this.reportId = reportId;
|
||||
}
|
||||
|
||||
public String getExplain() {
|
||||
|
@ -0,0 +1,93 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/29 - 6:05 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:用户轨迹点
|
||||
*/
|
||||
public class LocationPointBean implements Comparable<LocationPointBean> {
|
||||
|
||||
private String creator;
|
||||
private String gmtCreate;
|
||||
private int isOverstep;
|
||||
private String userLat;
|
||||
private String userLng;
|
||||
private String userLocationId;
|
||||
private String userName;
|
||||
private String userUsername;
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getGmtCreate() {
|
||||
return gmtCreate;
|
||||
}
|
||||
|
||||
public void setGmtCreate(String gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public int getIsOverstep() {
|
||||
return isOverstep;
|
||||
}
|
||||
|
||||
public void setIsOverstep(int isOverstep) {
|
||||
this.isOverstep = isOverstep;
|
||||
}
|
||||
|
||||
public String getUserLat() {
|
||||
return userLat;
|
||||
}
|
||||
|
||||
public void setUserLat(String userLat) {
|
||||
this.userLat = userLat;
|
||||
}
|
||||
|
||||
public String getUserLng() {
|
||||
return userLng;
|
||||
}
|
||||
|
||||
public void setUserLng(String userLng) {
|
||||
this.userLng = userLng;
|
||||
}
|
||||
|
||||
public String getUserLocationId() {
|
||||
return userLocationId;
|
||||
}
|
||||
|
||||
public void setUserLocationId(String userLocationId) {
|
||||
this.userLocationId = userLocationId;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getUserUsername() {
|
||||
return userUsername;
|
||||
}
|
||||
|
||||
public void setUserUsername(String userUsername) {
|
||||
this.userUsername = userUsername;
|
||||
}
|
||||
@Override
|
||||
public int compareTo(LocationPointBean o) {
|
||||
if (gmtCreate.compareTo(o.getGmtCreate()) > 0) {
|
||||
return 1;
|
||||
} else if (gmtCreate.compareTo(o.getGmtCreate()) < 0) {
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2019/7/31 - 11:32
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class LocusTextBean implements Comparable<LocusTextBean> {
|
||||
private String time;//时间
|
||||
private String stateTime;
|
||||
private String address;//地址
|
||||
private int type;//类型
|
||||
private String createTime;
|
||||
private long second;
|
||||
private int order;//排序
|
||||
|
||||
public long getSecond() {
|
||||
return second;
|
||||
}
|
||||
|
||||
public void setSecond(long second) {
|
||||
this.second = second;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
private boolean isDelete;
|
||||
|
||||
public boolean isDelete() {
|
||||
return isDelete;
|
||||
}
|
||||
|
||||
public void setDelete(boolean delete) {
|
||||
isDelete = delete;
|
||||
}
|
||||
|
||||
public String getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(String time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public String getStateTime() {
|
||||
return stateTime;
|
||||
}
|
||||
|
||||
public void setStateTime(String stateTime) {
|
||||
this.stateTime = stateTime;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int getOrder() {
|
||||
return order;
|
||||
}
|
||||
|
||||
public void setOrder(int order) {
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(LocusTextBean o) {
|
||||
if (getOrder() > o.getOrder()) {
|
||||
return -1;
|
||||
} else if (getOrder() < o.getOrder()) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
@ -8,17 +8,17 @@ package com.tengshisoft.commonmodule.beans;
|
||||
*/
|
||||
public class SaveHandleIncidentBean {
|
||||
|
||||
private String dispatchId;
|
||||
private String handlePhotos;
|
||||
private String handleSummary;
|
||||
private String taskId;
|
||||
private String reportId;
|
||||
|
||||
public String getDispatchId() {
|
||||
return dispatchId;
|
||||
public String getReportId() {
|
||||
return reportId;
|
||||
}
|
||||
|
||||
public void setDispatchId(String dispatchId) {
|
||||
this.dispatchId = dispatchId;
|
||||
public void setReportId(String reportId) {
|
||||
this.reportId = reportId;
|
||||
}
|
||||
|
||||
public String getHandlePhotos() {
|
||||
|
@ -0,0 +1,28 @@
|
||||
package com.tengshisoft.commonmodule.holders;
|
||||
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2019/7/31 - 11:35
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 工作轨迹-离线item
|
||||
*/
|
||||
public class LocusOfflineHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvTime;
|
||||
public TextView mTvStateTime;
|
||||
public TextView mTvAddress;
|
||||
public LocusOfflineHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mTvTime = itemView.findViewById(R.id.tv_time);
|
||||
mTvStateTime = itemView.findViewById(R.id.tv_state_time);
|
||||
mTvAddress = itemView.findViewById(R.id.tv_address);
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.tengshisoft.commonmodule.holders;
|
||||
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2019/7/31 - 11:35
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 工作轨迹-在线item
|
||||
*/
|
||||
public class LocusOnlineHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvTime;
|
||||
public TextView mTvStateTime;
|
||||
public TextView mTvAddress;
|
||||
public LocusOnlineHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mTvTime = itemView.findViewById(R.id.tv_time);
|
||||
mTvStateTime = itemView.findViewById(R.id.tv_state_time);
|
||||
mTvAddress = itemView.findViewById(R.id.tv_address);
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.tengshisoft.commonmodule.holders;
|
||||
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2019/7/31 - 11:35
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 工作轨迹-开始item
|
||||
*/
|
||||
public class LocusStartHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvTime;
|
||||
public TextView mTvStateTime;
|
||||
public TextView mTvAddress;
|
||||
|
||||
public LocusStartHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mTvTime = itemView.findViewById(R.id.tv_time);
|
||||
mTvAddress = itemView.findViewById(R.id.tv_address);
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.tengshisoft.commonmodule.holders;
|
||||
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2019/7/31 - 11:35
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 工作轨迹-停留item
|
||||
*/
|
||||
public class LocusStayHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvTime;
|
||||
public TextView mTvStateTime;
|
||||
public TextView mTvAddress;
|
||||
public LocusStayHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mTvTime = itemView.findViewById(R.id.tv_time);
|
||||
mTvStateTime = itemView.findViewById(R.id.tv_state_time);
|
||||
mTvAddress = itemView.findViewById(R.id.tv_address);
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.tengshisoft.commonmodule.holders;
|
||||
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2019/7/31 - 11:35
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 工作轨迹-停止item
|
||||
*/
|
||||
public class LocusStopHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvTime;
|
||||
public TextView mTvStateTime;
|
||||
public TextView mTvAddress;
|
||||
public LocusStopHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mTvTime = itemView.findViewById(R.id.tv_time);
|
||||
mTvStateTime = itemView.findViewById(R.id.tv_state_time);
|
||||
mTvAddress = itemView.findViewById(R.id.tv_address);
|
||||
}
|
||||
}
|
@ -28,6 +28,7 @@ import com.tengshisoft.commonmodule.beans.CorrectDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.DepartmentBean;
|
||||
import com.tengshisoft.commonmodule.beans.DepartmentListBean;
|
||||
import com.tengshisoft.commonmodule.beans.DispatchDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.DistributionDeptBean;
|
||||
import com.tengshisoft.commonmodule.beans.DrugDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.ExpressDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.ExpressListBean;
|
||||
@ -45,6 +46,7 @@ import com.tengshisoft.commonmodule.beans.IncidentListBean;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentLogBean;
|
||||
import com.tengshisoft.commonmodule.beans.KeyAreaDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.KeyAreaListBean;
|
||||
import com.tengshisoft.commonmodule.beans.LocationPointBean;
|
||||
import com.tengshisoft.commonmodule.beans.MigrantDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.MigrantListBean;
|
||||
import com.tengshisoft.commonmodule.beans.OutboundDetailBean;
|
||||
@ -136,6 +138,13 @@ public interface Apis {
|
||||
@GET("app/dispatch/list-dispatchdepttree/{deptId}")
|
||||
Observable<List<DepartmentListBean>> getDeptList(@Path("deptId") String deptId, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 根据taskid获取任务分拨部门信息
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/dispatch/getdistributionuser-bytask/{taskId}")
|
||||
Observable<DistributionDeptBean> getDeptByTaskId(@Path("taskId") String taskId, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 根据部门Id获取部门下所有人员
|
||||
*/
|
||||
@ -157,6 +166,12 @@ public interface Apis {
|
||||
@GET("app/department/user/list-with-user")
|
||||
Observable<List<UserDatabaseBean>> getAllUserList(@Header("token") String token);
|
||||
|
||||
/**
|
||||
* 获取用户定位记录
|
||||
*/
|
||||
@Headers({"Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/user-realtime-location/list")
|
||||
Observable<List<LocationPointBean>> getUserLocationList(@Query("startTime") String startTime, @Query("endTime") String endTime, @Header("token") String token);
|
||||
/*======================================================网格员========================================================================================*/
|
||||
|
||||
/**
|
||||
@ -1025,21 +1040,21 @@ public interface Apis {
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/taskbase/listpage-task-dh")
|
||||
Observable<IncidentHandleListBean> getIncidentHandleList(@Query("keywords") String key, @Query("page") String page, @Header("token") String token);
|
||||
Observable<IncidentListBean> getIncidentHandleList(@Query("keywords") String key, @Query("page") String page, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 获取事件派遣详情
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/dispatch/get/{dispatchId}")
|
||||
Observable<DispatchDetailBean> getDispatchDetailById(@Path("dispatchId") String id, @Header("token") String token);
|
||||
@GET("app/dispatch/get-bytaskId/{taskId}")
|
||||
Observable<DispatchDetailBean> getDispatchDetailById(@Path("taskId") String id, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 延期申请
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@POST("app/delayapply/save")
|
||||
Observable<SuccessBean> doApplyDelay(@Body RequestBody body, @Header("token") String token);
|
||||
@POST("app/delayapply/save/{reportId}")
|
||||
Observable<SuccessBean> doApplyDelay(@Path("reportId") String reportId, @Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 保存处理
|
||||
@ -1066,8 +1081,8 @@ public interface Apis {
|
||||
* 获取事件处理详情
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/handle/get/{handleId}")
|
||||
Observable<IncidentHandleDetailBean> getHandleDetailByHandleId(@Path("handleId") String id, @Header("token") String token);
|
||||
@GET("app/handle/get-bytaskId/{taskId}")
|
||||
Observable<IncidentHandleDetailBean> getHandleDetailByHandleId(@Path("taskId") String id, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 获取事件核查列表
|
||||
|
@ -30,29 +30,29 @@ public interface DeptApis {
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/taskbase/listpage-dispatch")
|
||||
Observable<IncidentDisDeptListBean> getIncidentDistributionList(@Query("keywords") String key, @Query("page") String page, @Header("token") String token);
|
||||
Observable<IncidentListBean> getIncidentDistributionList(@Query("keywords") String key, @Query("page") String page, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 事件分拨-分拨确认列表
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/taskbase/listpage-task-as")
|
||||
Observable<IncidentAcceptListBean> getIncidentAcceptList(@Query("keywords") String key, @Query("page") String page, @Header("token") String token);
|
||||
Observable<IncidentListBean> getIncidentAcceptList(@Query("keywords") String key, @Query("page") String page, @Header("token") String token);
|
||||
|
||||
|
||||
/**
|
||||
* 事件分拨-确认受理
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@PUT("app/taskcompetebase/update-allocatesure-accept/{distributionUserId}")
|
||||
Observable<SuccessBean> doIncidentAccept(@Path("distributionUserId") String id, @Body RequestBody body, @Header("token") String token);
|
||||
@PUT("app/taskcompetebase/update-allocatesure-accept/{reportId}")
|
||||
Observable<SuccessBean> doIncidentAccept(@Path("reportId") String id, @Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 事件分拨-不予受理
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@PUT("app/taskcompetebase/update-allocatesure-noaccept/{distributionUserId}")
|
||||
Observable<SuccessBean> doIncidentAbolish(@Path("distributionUserId") String id, @Body RequestBody body, @Header("token") String token);
|
||||
@PUT("app/taskcompetebase/update-allocatesure-noaccept/{reportId}")
|
||||
Observable<SuccessBean> doIncidentAbolish(@Path("reportId") String id, @Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 事件派遣保存
|
||||
@ -66,19 +66,19 @@ public interface DeptApis {
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/taskbase/listpage-task-dhe")
|
||||
Observable<IncidentHandleListBean> getIncidentCheckList(@Query("keywords") String key, @Query("page") String page, @Header("token") String token);
|
||||
Observable<IncidentListBean> getIncidentCheckList(@Query("keywords") String key, @Query("page") String page, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 事件核查通过
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@PUT("app/taskcompetebase/update-dispatch-he-pass/{dispatchId}")
|
||||
Observable<SuccessBean> doIncidentDeptCheckPass(@Path("dispatchId") String id, @Body RequestBody body, @Header("token") String token);
|
||||
@PUT("app/taskcompetebase/update-dispatch-he-pass/{reportId}")
|
||||
Observable<SuccessBean> doIncidentDeptCheckPass(@Path("reportId") String id, @Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 事件核查不通过
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@PUT("app/taskcompetebase/update-dispatch-he-pass/{dispatchId}/{handleId}")
|
||||
Observable<SuccessBean> doIncidentDeptCheckUnPass(@Path("dispatchId") String id, @Path("handleId") String hId, @Body RequestBody body, @Header("token") String token);
|
||||
@PUT("app/taskcompetebase/update-dispatch-he-pass/{reportId}")
|
||||
Observable<SuccessBean> doIncidentDeptCheckUnPass(@Path("reportId") String id, @Body RequestBody body, @Header("token") String token);
|
||||
}
|
||||
|
BIN
commonmodule/src/main/res/drawable-xhdpi/ic_step_offline.png
Executable file
BIN
commonmodule/src/main/res/drawable-xhdpi/ic_step_offline.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
commonmodule/src/main/res/drawable-xhdpi/ic_step_online.png
Executable file
BIN
commonmodule/src/main/res/drawable-xhdpi/ic_step_online.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
commonmodule/src/main/res/drawable-xhdpi/ic_step_start.png
Executable file
BIN
commonmodule/src/main/res/drawable-xhdpi/ic_step_start.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
BIN
commonmodule/src/main/res/drawable-xhdpi/ic_step_stay.png
Executable file
BIN
commonmodule/src/main/res/drawable-xhdpi/ic_step_stay.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
5
commonmodule/src/main/res/drawable/sel_btn_submit_gray_left.xml
Executable file
5
commonmodule/src/main/res/drawable/sel_btn_submit_gray_left.xml
Executable file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/shape_btn_left_radius_gray" android:state_checked="false" />
|
||||
<item android:drawable="@drawable/shape_btn_left_radius_blue" android:state_checked="true" />
|
||||
</selector>
|
5
commonmodule/src/main/res/drawable/sel_btn_submit_gray_right.xml
Executable file
5
commonmodule/src/main/res/drawable/sel_btn_submit_gray_right.xml
Executable file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/shape_btn_right_radius_gray" android:state_checked="false" />
|
||||
<item android:drawable="@drawable/shape_btn_right_radius_blue" android:state_checked="true" />
|
||||
</selector>
|
6
commonmodule/src/main/res/drawable/sel_btn_text_white_black.xml
Executable file
6
commonmodule/src/main/res/drawable/sel_btn_text_white_black.xml
Executable file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="#000000" android:state_checked="false" /> <!-- pressed -->
|
||||
<item android:color="#FFFFFF" android:state_checked="true" /> <!-- focused -->
|
||||
<item android:color="#FFFFFF" /> <!-- default -->
|
||||
</selector>
|
11
commonmodule/src/main/res/drawable/shape_btn_left_radius_blue.xml
Executable file
11
commonmodule/src/main/res/drawable/shape_btn_left_radius_blue.xml
Executable file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/text_blue" />
|
||||
<corners
|
||||
android:bottomLeftRadius="10dp"
|
||||
android:topLeftRadius="10dp" />
|
||||
<size
|
||||
android:width="30dp"
|
||||
android:height="20dp" />
|
||||
</shape>
|
11
commonmodule/src/main/res/drawable/shape_btn_left_radius_gray.xml
Executable file
11
commonmodule/src/main/res/drawable/shape_btn_left_radius_gray.xml
Executable file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/gray_df" />
|
||||
<corners
|
||||
android:bottomLeftRadius="10dp"
|
||||
android:topLeftRadius="10dp" />
|
||||
<size
|
||||
android:width="30dp"
|
||||
android:height="20dp" />
|
||||
</shape>
|
11
commonmodule/src/main/res/drawable/shape_btn_right_radius_blue.xml
Executable file
11
commonmodule/src/main/res/drawable/shape_btn_right_radius_blue.xml
Executable file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/text_blue" />
|
||||
<corners
|
||||
android:bottomRightRadius="10dp"
|
||||
android:topRightRadius="10dp" />
|
||||
<size
|
||||
android:width="30dp"
|
||||
android:height="20dp" />
|
||||
</shape>
|
11
commonmodule/src/main/res/drawable/shape_btn_right_radius_gray.xml
Executable file
11
commonmodule/src/main/res/drawable/shape_btn_right_radius_gray.xml
Executable file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/gray_df" />
|
||||
<corners
|
||||
android:bottomRightRadius="10dp"
|
||||
android:topRightRadius="10dp" />
|
||||
<size
|
||||
android:width="30dp"
|
||||
android:height="20dp" />
|
||||
</shape>
|
9
commonmodule/src/main/res/layout/activity_statistics.xml
Normal file
9
commonmodule/src/main/res/layout/activity_statistics.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
||||
tools:context=".activitys.logs.StatisticsActivity">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
48
commonmodule/src/main/res/layout/item_step_offline.xml
Executable file
48
commonmodule/src/main/res/layout/item_step_offline.xml
Executable file
@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/ic_step_offline"
|
||||
android:scaleType="fitXY" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_clock_blue"
|
||||
android:drawablePadding="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:includeFontPadding="false"
|
||||
tools:text="12:12" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_state_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
tools:text="停留时间2小时48分钟" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textColor="@color/gray_text"
|
||||
tools:text="内蒙古呼和浩特市高新经济开发区成吉思汗东街附近(100米)" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
46
commonmodule/src/main/res/layout/item_step_offline_test.xml
Executable file
46
commonmodule/src/main/res/layout/item_step_offline_test.xml
Executable file
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
tools:text="12:12" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.5"
|
||||
android:background="@drawable/ic_step_offline" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="8.5"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_state_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
tools:text="停留时间2小时48分钟" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textColor="@color/gray_text"
|
||||
android:textSize="16sp"
|
||||
tools:text="内蒙古呼和浩特市高新经济开发区成吉思汗东街附近(100米)" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
47
commonmodule/src/main/res/layout/item_step_online.xml
Executable file
47
commonmodule/src/main/res/layout/item_step_online.xml
Executable file
@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/ic_step_online"
|
||||
android:scaleType="fitXY" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_clock_blue"
|
||||
android:drawablePadding="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:includeFontPadding="false"
|
||||
tools:text="12:12" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_state_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
tools:text="停留时间2小时48分钟" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textColor="@color/gray_text"
|
||||
tools:text="内蒙古呼和浩特市高新经济开发区成吉思汗东街附近(100米)" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
54
commonmodule/src/main/res/layout/item_step_start.xml
Executable file
54
commonmodule/src/main/res/layout/item_step_start.xml
Executable file
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/ic_step_start" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="10dp"
|
||||
android:paddingTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_clock_blue"
|
||||
android:drawablePadding="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:includeFontPadding="false"
|
||||
tools:text="291234:4313241234:123412:12" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="轨迹开始"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_state_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:visibility="gone"
|
||||
tools:text="停留时间2小时48分钟" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textColor="@color/gray_text"
|
||||
tools:text="内蒙古呼和浩特市高新经济开发区成吉思汗东街附近(100米)" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
50
commonmodule/src/main/res/layout/item_step_stay.xml
Executable file
50
commonmodule/src/main/res/layout/item_step_stay.xml
Executable file
@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/ic_step_stay"
|
||||
android:paddingLeft="3dp"
|
||||
android:paddingRight="3dp" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_clock_blue"
|
||||
android:drawablePadding="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:includeFontPadding="false"
|
||||
tools:text="12:12" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_state_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
tools:text="停留时间2小时48分钟" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textColor="@color/gray_text"
|
||||
tools:text="内蒙古呼和浩特市高新经济开发区成吉思汗东街附近(100米)" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
54
commonmodule/src/main/res/layout/item_step_stop.xml
Executable file
54
commonmodule/src/main/res/layout/item_step_stop.xml
Executable file
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/ic_step_start" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_clock_blue"
|
||||
android:drawablePadding="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:includeFontPadding="false"
|
||||
tools:text="291234:4313241234:123412:12" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="轨迹结束"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_state_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:visibility="gone"
|
||||
tools:text="停留时间2小时48分钟" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textColor="@color/gray_text"
|
||||
tools:text="内蒙古呼和浩特市高新经济开发区成吉思汗东街附近(100米)" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
50
commonmodule/src/main/res/layout/item_step_unusual.xml
Executable file
50
commonmodule/src/main/res/layout/item_step_unusual.xml
Executable file
@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/ic_step_offline"
|
||||
android:paddingLeft="3dp"
|
||||
android:paddingRight="3dp" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_clock_blue"
|
||||
android:drawablePadding="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:includeFontPadding="false"
|
||||
tools:text="12:12" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_state_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
tools:text="停留时间2小时48分钟" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textColor="@color/gray_text"
|
||||
tools:text="内蒙古呼和浩特市高新经济开发区成吉思汗东街附近(100米)" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -4,7 +4,8 @@
|
||||
package="com.tengshisoft.gridmodule">
|
||||
|
||||
<application>
|
||||
<activity android:name=".incident.activitys.tasks.TaskReportRecordEditActivity"></activity>
|
||||
<activity android:name=".incident.activitys.locus.WorkLocusActivity"></activity>
|
||||
<activity android:name=".incident.activitys.tasks.TaskReportRecordEditActivity" />
|
||||
<activity android:name=".incident.activitys.tasks.TaskReportRecordDetailActivity" />
|
||||
<activity android:name=".incident.activitys.schools.SchoolCaseDetailActivity" />
|
||||
<activity android:name=".incident.activitys.schools.SchoolCaseAddActivity" />
|
||||
|
@ -150,8 +150,7 @@ public class IncidentHandleActivity extends BaseActivity {
|
||||
@BindView(R2.id.rlv_handle_photos)
|
||||
RecyclerView mRlvHandlePhotos;
|
||||
private Unbinder mBind;
|
||||
private String mCaseId;
|
||||
private String mDispatchId;
|
||||
private String mReportId;
|
||||
private IncidentDetailBean mIncidentDetailBean;
|
||||
private DispatchDetailBean mDispatchDetailBean;
|
||||
private BaiduMap mBaiduMap;
|
||||
@ -173,8 +172,7 @@ public class IncidentHandleActivity extends BaseActivity {
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("事件处理");
|
||||
mCaseId = getIntent().getStringExtra("caseId");
|
||||
mDispatchId = getIntent().getStringExtra("dispatchId");
|
||||
mReportId = getIntent().getStringExtra("reportId");
|
||||
mTaskId = getIntent().getStringExtra("taskId");
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
mTvPublish.setText("日志");
|
||||
@ -196,6 +194,7 @@ public class IncidentHandleActivity extends BaseActivity {
|
||||
private void onShowBackDialog() {
|
||||
CenterInputView intputView = new CenterInputView.DialogBuilder(mActivity).build();
|
||||
intputView.addOnChoseListener((time, content) -> {
|
||||
hideSoftKeyboard();
|
||||
intputView.dismiss();
|
||||
doRollBack(content);
|
||||
});
|
||||
@ -209,7 +208,7 @@ public class IncidentHandleActivity extends BaseActivity {
|
||||
*/
|
||||
private void doRollBack(String content) {
|
||||
IncidentRebackBean bean = new IncidentRebackBean();
|
||||
bean.setDispatchId(mDispatchId);
|
||||
bean.setReportId(mReportId);
|
||||
bean.setExplain(content);
|
||||
bean.setTaskId(mTaskId);
|
||||
Gson gson = new Gson();
|
||||
@ -322,7 +321,7 @@ public class IncidentHandleActivity extends BaseActivity {
|
||||
*/
|
||||
private RequestBody buildParams() {
|
||||
SaveHandleIncidentBean bean = new SaveHandleIncidentBean();
|
||||
bean.setDispatchId(mDispatchId);
|
||||
bean.setReportId(mReportId);
|
||||
bean.setHandlePhotos(mPhotoIds);
|
||||
String content = mEtContent.getText().toString().trim();
|
||||
bean.setHandleSummary(content);
|
||||
@ -507,7 +506,7 @@ public class IncidentHandleActivity extends BaseActivity {
|
||||
*/
|
||||
private void doSaveApply(String time, String content) {
|
||||
DelayApplyBean bean = new DelayApplyBean();
|
||||
bean.setDispatchId(mDispatchId);
|
||||
bean.setDispatchId("");
|
||||
bean.setDelayExpireTime(time);
|
||||
bean.setDelayApplyReason(content);
|
||||
Gson gson = new Gson();
|
||||
@ -517,7 +516,7 @@ public class IncidentHandleActivity extends BaseActivity {
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.doApplyDelay(requestBody, UserLgUtils.getToken())
|
||||
.doApplyDelay(mReportId, requestBody, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
@ -573,8 +572,8 @@ public class IncidentHandleActivity extends BaseActivity {
|
||||
* 获取详情
|
||||
*/
|
||||
private void getDetailData() {
|
||||
Observable<DispatchDetailBean> dispatch = RetrofitManager.getInstance().create(Apis.class).getDispatchDetailById(mDispatchId, UserLgUtils.getToken());
|
||||
Observable<IncidentDetailBean> incidentDetail = RetrofitManager.getInstance().create(Apis.class).getIncidentDetailById(mCaseId, UserLgUtils.getToken());
|
||||
Observable<DispatchDetailBean> dispatch = RetrofitManager.getInstance().create(Apis.class).getDispatchDetailById(mTaskId, UserLgUtils.getToken());
|
||||
Observable<IncidentDetailBean> incidentDetail = RetrofitManager.getInstance().create(Apis.class).getIncidentDetailById(mReportId, UserLgUtils.getToken());
|
||||
Observable.merge(dispatch, incidentDetail)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
|
@ -15,7 +15,9 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
import com.tengshisoft.commonmodule.adapters.IncidentHandleListAdapter;
|
||||
import com.tengshisoft.commonmodule.adapters.IncidentListAdapter;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentHandleListBean;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentListBean;
|
||||
import com.tengshisoft.commonmodule.nets.Apis;
|
||||
import com.tengshisoft.gridmodule.R;
|
||||
import com.tengshisoft.gridmodule.R2;
|
||||
@ -69,8 +71,8 @@ public class IncidentHandleListActivity extends BaseActivity {
|
||||
@BindView(R2.id.tv_error_hint)
|
||||
TextView mTvErrorHint;
|
||||
private Unbinder mBind;
|
||||
private List<IncidentHandleListBean.RowsBean> mDatas;
|
||||
private IncidentHandleListAdapter mAdapter;
|
||||
private List<IncidentListBean.RowsBean> mDatas;
|
||||
private IncidentListAdapter mAdapter;
|
||||
private int mCurrentPage = 1;
|
||||
private String mKeywords = "";
|
||||
|
||||
@ -86,7 +88,7 @@ public class IncidentHandleListActivity extends BaseActivity {
|
||||
mEtBaseSearchContent.setHint("请输入事件编码(分类名称)");
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mDatas = new ArrayList<>();
|
||||
mAdapter = new IncidentHandleListAdapter(mActivity, mDatas);
|
||||
mAdapter = new IncidentListAdapter(mActivity, mDatas);
|
||||
mRlvComponents.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvComponents.setAdapter(mAdapter);
|
||||
mSrlContent.setOnRefreshListener(v -> doRefresh());
|
||||
@ -101,8 +103,7 @@ public class IncidentHandleListActivity extends BaseActivity {
|
||||
});
|
||||
mAdapter.addOnItemClickListener(v -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_INCIDENT_HANDLE)
|
||||
.withString("caseId", v.getReportId())
|
||||
.withString("dispatchId", v.getDispatchId())
|
||||
.withString("reportId", v.getReportId())
|
||||
.withString("taskId", v.getTaskId())
|
||||
.navigation(mActivity, 12));
|
||||
}
|
||||
@ -117,14 +118,14 @@ public class IncidentHandleListActivity extends BaseActivity {
|
||||
.getIncidentHandleList(mKeywords, mCurrentPage + "", UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<IncidentHandleListBean>() {
|
||||
.subscribe(new Observer<IncidentListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull IncidentHandleListBean communityListBean) {
|
||||
public void onNext(@NonNull IncidentListBean communityListBean) {
|
||||
if (communityListBean.getRows() != null && communityListBean.getRows().size() > 0) {
|
||||
++mCurrentPage;
|
||||
if (currentPage == 1) {
|
||||
|
@ -0,0 +1,678 @@
|
||||
package com.tengshisoft.gridmodule.incident.activitys.locus;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.ProgressDialog;
|
||||
import android.graphics.Color;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ZoomControls;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.baidu.mapapi.map.BaiduMap;
|
||||
import com.baidu.mapapi.map.BitmapDescriptor;
|
||||
import com.baidu.mapapi.map.MapStatus;
|
||||
import com.baidu.mapapi.map.MapStatusUpdate;
|
||||
import com.baidu.mapapi.map.MapStatusUpdateFactory;
|
||||
import com.baidu.mapapi.map.OverlayOptions;
|
||||
import com.baidu.mapapi.map.PolylineOptions;
|
||||
import com.baidu.mapapi.map.TextureMapView;
|
||||
import com.baidu.mapapi.model.LatLng;
|
||||
import com.baidu.mapapi.utils.DistanceUtil;
|
||||
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
||||
import com.bigkoo.pickerview.view.TimePickerView;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.tengshisoft.commonmodule.adapters.LocusStepAdapter;
|
||||
import com.tengshisoft.commonmodule.beans.DrawMapLineBean;
|
||||
import com.tengshisoft.commonmodule.beans.LocationPointBean;
|
||||
import com.tengshisoft.commonmodule.beans.LocusTextBean;
|
||||
import com.tengshisoft.commonmodule.nets.Apis;
|
||||
import com.tengshisoft.gridmodule.R;
|
||||
import com.tengshisoft.gridmodule.R2;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.constant.TimeConstants;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.TimeUtils;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
|
||||
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 io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2021年10月29日17:33:22
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 工作轨迹
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_GRID_ACTIVITY_WORK_LOCUS)
|
||||
public class WorkLocusActivity extends BaseActivity {
|
||||
|
||||
|
||||
@BindView(R2.id.tmv_map)
|
||||
TextureMapView mTmvMap;
|
||||
@BindView(R2.id.btn_reload)
|
||||
Button mBtnReload;
|
||||
@BindView(R2.id.rb_type_map)
|
||||
RadioButton mRbTypeMap;
|
||||
@BindView(R2.id.rb_satellite)
|
||||
RadioButton mRbSatellite;
|
||||
@BindView(R2.id.rg_map_type)
|
||||
RadioGroup mRgMapType;
|
||||
@BindView(R2.id.rl_map_view)
|
||||
RelativeLayout mRlMapView;
|
||||
@BindView(R2.id.rb_map)
|
||||
RadioButton mRbMap;
|
||||
@BindView(R2.id.rb_text)
|
||||
RadioButton mRbText;
|
||||
@BindView(R2.id.rg_type)
|
||||
RadioGroup mRgType;
|
||||
@BindView(R2.id.iv_user_icon)
|
||||
ImageView mIvUserIcon;
|
||||
@BindView(R2.id.tv_user_name)
|
||||
TextView mTvUserName;
|
||||
@BindView(R2.id.tv_distance)
|
||||
TextView mTvDistance;
|
||||
@BindView(R2.id.cv_card)
|
||||
CardView mCvCard;
|
||||
@BindView(R2.id.rlv_step)
|
||||
RecyclerView mRlvStep;
|
||||
@BindView(R2.id.tv_start_date)
|
||||
TextView mTvStartDate;
|
||||
private Unbinder mBind;
|
||||
|
||||
|
||||
private TimePickerView mTimePickerView;
|
||||
private String mNowDate;
|
||||
private BaiduMap mBaiduMap;
|
||||
private BitmapDescriptor mBitMap;
|
||||
private int mCurrentShowType = 1;//1是地图 2是文本
|
||||
private LocusStepAdapter mAdapter;
|
||||
private ProgressDialog mProgressDialog;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_work_locus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mTvStartDate.setOnClickListener(v -> showPickerView());
|
||||
mNowDate = TimeUtils.getCurrentDate();
|
||||
initMap();
|
||||
initViews();
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
mRgType.setOnCheckedChangeListener((group, checkedId) -> {
|
||||
if (checkedId == R.id.rb_map) {
|
||||
mCurrentShowType = 1;
|
||||
} else if (checkedId == R.id.rb_text) {
|
||||
mCurrentShowType = 2;
|
||||
}
|
||||
setCurrentShowView();
|
||||
});
|
||||
mRgMapType.setOnCheckedChangeListener((group, checkedId) -> {
|
||||
int id = 0;
|
||||
if (checkedId == R.id.rb_type_map) {//普通的
|
||||
id = 123;
|
||||
} else if (checkedId == R.id.rb_satellite) {//卫星地图
|
||||
id = 1234;
|
||||
}
|
||||
if (id != 0) {
|
||||
setMapType(id);
|
||||
}
|
||||
});
|
||||
mTvStartDate.setText(TimeUtils.getCurrentDate());
|
||||
setCurrentShowView();
|
||||
List<LocusTextBean> mStep = new ArrayList<>();
|
||||
mAdapter = new LocusStepAdapter(this, mStep);
|
||||
mRlvStep.setLayoutManager(new LinearLayoutManager(this));
|
||||
mRlvStep.setAdapter(mAdapter);
|
||||
getLocusList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 地图显示方式切换
|
||||
*/
|
||||
private void setMapType(int id) {
|
||||
if (id == 123) {
|
||||
mBaiduMap.setMapType(BaiduMap.MAP_TYPE_NORMAL);
|
||||
} else {
|
||||
mBaiduMap.setMapType(BaiduMap.MAP_TYPE_SATELLITE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 视图切换
|
||||
*/
|
||||
private void setCurrentShowView() {
|
||||
if (mCurrentShowType == 1) {
|
||||
//显示地图
|
||||
mRlMapView.setVisibility(View.VISIBLE);
|
||||
mRlvStep.setVisibility(View.GONE);
|
||||
} else {
|
||||
//显示文本
|
||||
mRlvStep.setVisibility(View.VISIBLE);
|
||||
mRlMapView.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化地图
|
||||
*/
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
private void initMap() {
|
||||
mTmvMap.showZoomControls(false);//缩放控件
|
||||
mTmvMap.showScaleControl(false);//比例尺
|
||||
mBaiduMap = mTmvMap.getMap();
|
||||
mBaiduMap.setMapType(BaiduMap.MAP_TYPE_NORMAL);
|
||||
mBaiduMap.setMyLocationEnabled(false);
|
||||
View childAt = mTmvMap.getChildAt(1);
|
||||
if (childAt != null && (childAt instanceof ImageView || childAt instanceof ZoomControls)) {
|
||||
childAt.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
moveMapToCenter(new LatLng(PathConfig.LA, PathConfig.LO), 14);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将地图移动到定位中心
|
||||
*
|
||||
* @param latLng
|
||||
*/
|
||||
private void moveMapToCenter(LatLng latLng, int room) {
|
||||
MapStatus ms = new MapStatus.Builder().zoom(room).target(latLng).build();
|
||||
MapStatusUpdate u = MapStatusUpdateFactory.newMapStatus(ms);
|
||||
mBaiduMap.setMapStatus(u);
|
||||
}
|
||||
|
||||
private void showPickerView() {
|
||||
mTimePickerView = new TimePickerBuilder(mActivity, (date, v) -> {
|
||||
boolean i = TimeUtils.compare(mNowDate, TimeUtils.dateToString(date));
|
||||
if (i) {
|
||||
ToastUtils.show("请选择当前时间之前的日期.");
|
||||
} else {
|
||||
mNowDate = TimeUtils.dateToString(date);
|
||||
mTvStartDate.setText(mNowDate);
|
||||
getLocusList();
|
||||
}
|
||||
})
|
||||
.setTitleText("请选择日期")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setType(new boolean[]{true, true, true, false, false, false})
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mTimePickerView.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取定位点
|
||||
*/
|
||||
private void getLocusList() {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
||||
dialog.show();
|
||||
String startTime = mNowDate + " 00:00:00";
|
||||
String endTime = mNowDate + " 23:59:59";
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.getUserLocationList(startTime, endTime, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<LocationPointBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull List<LocationPointBean> locationPointBeans) {
|
||||
dialog.dismiss();
|
||||
if (locationPointBeans.size() > 0) {
|
||||
drawLineToMap(locationPointBeans);
|
||||
parserLocationPoint(locationPointBeans);
|
||||
} else {
|
||||
ToastUtils.show("当前选择时间段内无轨迹");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void drawLineToMap(List<LocationPointBean> mBeas) {
|
||||
//清除之前的
|
||||
if (mBeas.size() > 2) {
|
||||
Collections.sort(mBeas);
|
||||
List<LocationPointBean> mTempBeans = new ArrayList<>(mBeas);
|
||||
Observable.just(mTempBeans)
|
||||
.map(mineLocationBeans -> {
|
||||
//坐标集合
|
||||
//颜色集合
|
||||
List<DrawMapLineBean> lineDatas = new ArrayList<>();
|
||||
for (int i = 0; i < mineLocationBeans.size(); i++) {
|
||||
if (i != mineLocationBeans.size() - 1) {
|
||||
//TODO 12:移动 13:等待 14:异常
|
||||
DrawMapLineBean bean = new DrawMapLineBean();
|
||||
//第一个
|
||||
LocationPointBean preBean = mineLocationBeans.get(i);
|
||||
//下一点
|
||||
LocationPointBean nextBean = mineLocationBeans.get(i + 1);
|
||||
long timeSpan = TimeUtils.getTimeSpan(nextBean.getGmtCreate(), preBean.getGmtCreate(), TimeConstants.SEC);
|
||||
LatLng preLatlng = new LatLng(Double.parseDouble(preBean.getUserLat()), Double.parseDouble(preBean.getUserLng()));
|
||||
LatLng nextLatlng = new LatLng(Double.parseDouble(nextBean.getUserLat()), Double.parseDouble(nextBean.getUserLng()));
|
||||
//TODO 1、距离
|
||||
double distance = DistanceUtil.getDistance(preLatlng, nextLatlng);
|
||||
if (timeSpan < 600) {
|
||||
//在线
|
||||
if (distance / timeSpan > 20) {
|
||||
//TODO 速度大于20/s异常
|
||||
bean.setOnePoint(preLatlng);
|
||||
bean.setTwoPoint(nextLatlng);
|
||||
bean.setType(14);
|
||||
bean.setLineColor(Integer.valueOf(Color.RED));
|
||||
} else if (distance / timeSpan <= 0.5) {
|
||||
//TODO 速度小于0.5m/s等待
|
||||
bean.setOnePoint(preLatlng);
|
||||
bean.setTwoPoint(nextLatlng);
|
||||
bean.setType(13);
|
||||
bean.setLineColor(Integer.valueOf(Color.YELLOW));
|
||||
} else {
|
||||
//TODO 移动 绿色
|
||||
bean.setOnePoint(preLatlng);
|
||||
bean.setTwoPoint(nextLatlng);
|
||||
bean.setType(12);
|
||||
bean.setLineColor(Integer.valueOf(Color.parseColor("#218868")));
|
||||
}
|
||||
} else {
|
||||
//TODO 失联
|
||||
bean.setOnePoint(preLatlng);
|
||||
bean.setTwoPoint(nextLatlng);
|
||||
bean.setType(12);
|
||||
bean.setLineColor(Integer.valueOf(Color.GRAY));
|
||||
}
|
||||
lineDatas.add(bean);
|
||||
}
|
||||
}
|
||||
return lineDatas;
|
||||
})
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<DrawMapLineBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<DrawMapLineBean> o) {
|
||||
mBaiduMap.clear();
|
||||
if (o != null && o.size() > 0) {
|
||||
for (int i = 0; i < o.size(); i++) {
|
||||
List<LatLng> points = new ArrayList<>();
|
||||
points.add(o.get(i).getOnePoint());
|
||||
points.add(o.get(i).getTwoPoint());
|
||||
OverlayOptions ooPolyline11 = new PolylineOptions()
|
||||
.width(10)
|
||||
.dottedLine(false)
|
||||
.color(o.get(i).getLineColor())
|
||||
.points(points);
|
||||
mBaiduMap.addOverlay(ooPolyline11);
|
||||
}
|
||||
moveMapToCenter(new LatLng(o.get(0).getOnePoint().latitude, o.get(0).getOnePoint().longitude), 14);
|
||||
}
|
||||
// TODO 电子围栏
|
||||
// if (mPenLineBeans != null && mPenLineBeans.size() > 0) {
|
||||
// drawPenToMap(mPenLineBeans);
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TODO 解析文本数据
|
||||
*
|
||||
* @param mineBeans
|
||||
*/
|
||||
private void parserLocationPoint(List<LocationPointBean> mineBeans) {
|
||||
Collections.sort(mineBeans);
|
||||
Observable.just(mineBeans)
|
||||
.map((List<LocationPointBean> mineLocationBeans) -> {
|
||||
List<LocusTextBean> mStepBeans = new ArrayList<>();
|
||||
if (mineBeans.size() >= 2) {
|
||||
for (int i = 0; i < mineBeans.size(); i++) {
|
||||
if (i != mineBeans.size() - 1) {
|
||||
//第一个
|
||||
LocationPointBean preBean = mineBeans.get(i);
|
||||
//下一点
|
||||
LocationPointBean nextBean = mineBeans.get(i + 1);
|
||||
long timeSpan = TimeUtils.getTimeSpan(nextBean.getGmtCreate(), preBean.getGmtCreate(), TimeConstants.SEC);
|
||||
LatLng preLatlng = new LatLng(Double.parseDouble(preBean.getUserLat()), Double.parseDouble(preBean.getUserLng()));
|
||||
LatLng nextLatlng = new LatLng(Double.parseDouble(nextBean.getUserLat()), Double.parseDouble(nextBean.getUserLng()));
|
||||
if (i == 0) {
|
||||
LocusTextBean bean = new LocusTextBean();
|
||||
// bean.setAddress("定位地址:未知");
|
||||
// if (TextUtils.isEmpty(preBean.getUserLocation()) || "null".equals(preBean.getUserLocation())) {
|
||||
//
|
||||
// } else {
|
||||
// bean.setAddress(preBean.getUserLocation());
|
||||
// }
|
||||
bean.setTime(preBean.getGmtCreate());
|
||||
bean.setStateTime("开始定位" + preBean.getGmtCreate());
|
||||
bean.setType(LocusStepAdapter.TYPE_START);
|
||||
bean.setCreateTime(preBean.getGmtCreate());
|
||||
bean.setOrder(i);
|
||||
mStepBeans.add(bean);
|
||||
} else {
|
||||
//TODO 1、距离
|
||||
double distance = DistanceUtil.getDistance(preLatlng, nextLatlng);
|
||||
if (timeSpan < 600) {
|
||||
//在线
|
||||
if (distance / timeSpan > 20) {
|
||||
//TODO 速度大于20/s异常
|
||||
if (mStepBeans != null && mStepBeans.size() > 0) {
|
||||
LocusTextBean tempbean = mStepBeans.get(mStepBeans.size() - 1);
|
||||
if (tempbean.getType() == LocusStepAdapter.TYPE_UNUSUAL) {
|
||||
//上一条也是移动的 //将停止时间累计
|
||||
long timeSpan2 = TimeUtils.getTimeSpan(nextBean.getGmtCreate(), tempbean.getCreateTime(), TimeConstants.SEC);
|
||||
tempbean.setStateTime(timeSpan2 + "");
|
||||
tempbean.setCreateTime(nextBean.getGmtCreate());
|
||||
long l = tempbean.getSecond() + timeSpan2;
|
||||
tempbean.setOrder(i);
|
||||
tempbean.setSecond(l);
|
||||
} else {
|
||||
LocusTextBean text = mStepBeans.get(mStepBeans.size() - 1);
|
||||
LocusTextBean bean = new LocusTextBean();
|
||||
// if (TextUtils.isEmpty(preBean.getUserLocation()) || "null".equals(preBean.getUserLocation())) {
|
||||
// bean.setAddress("定位地址:未知");
|
||||
// } else {
|
||||
// bean.setAddress("定位地址:" + preBean.getUserLocation());
|
||||
// }
|
||||
bean.setCreateTime(nextBean.getGmtCreate());
|
||||
bean.setTime(text.getCreateTime());
|
||||
long timeSpan1 = TimeUtils.getTimeSpan(nextBean.getGmtCreate(), text.getCreateTime(), TimeConstants.SEC);
|
||||
bean.setStateTime(timeSpan1 + "");
|
||||
bean.setType(LocusStepAdapter.TYPE_UNUSUAL);
|
||||
bean.setSecond(timeSpan1);
|
||||
bean.setOrder(i);
|
||||
mStepBeans.add(bean);
|
||||
}
|
||||
} else {
|
||||
LocusTextBean bean = new LocusTextBean();
|
||||
// if (TextUtils.isEmpty(preBean.getUserLocation()) || "null".equals(preBean.getUserLocation())) {
|
||||
// bean.setAddress("定位地址:未知");
|
||||
// } else {
|
||||
// bean.setAddress("定位地址:" + preBean.getUserLocation());
|
||||
// }
|
||||
bean.setCreateTime(nextBean.getGmtCreate());
|
||||
bean.setTime(preBean.getGmtCreate());
|
||||
long timeSpan1 = TimeUtils.getTimeSpan(nextBean.getGmtCreate(), preBean.getGmtCreate(), TimeConstants.SEC);
|
||||
bean.setStateTime(timeSpan1 + "");
|
||||
bean.setSecond(timeSpan1);
|
||||
bean.setType(LocusStepAdapter.TYPE_UNUSUAL);
|
||||
bean.setOrder(i);
|
||||
mStepBeans.add(bean);
|
||||
}
|
||||
} else if (distance / timeSpan <= 0.5) {
|
||||
//TODO 速度小于0.5m/s等待
|
||||
if (mStepBeans != null && mStepBeans.size() > 0) {
|
||||
LocusTextBean tempbean = mStepBeans.get(mStepBeans.size() - 1);
|
||||
if (tempbean.getType() == LocusStepAdapter.TYPE_STAY) {
|
||||
//上一条也是移动的 //将停止时间累计
|
||||
long timeSpan2 = TimeUtils.getTimeSpan(nextBean.getGmtCreate(), tempbean.getCreateTime(), TimeConstants.SEC);
|
||||
tempbean.setStateTime(timeSpan2 + "");
|
||||
tempbean.setCreateTime(nextBean.getGmtCreate());
|
||||
long l = tempbean.getSecond() + timeSpan2;
|
||||
tempbean.setOrder(i);
|
||||
tempbean.setSecond(l);
|
||||
} else {
|
||||
LocusTextBean text = mStepBeans.get(mStepBeans.size() - 1);
|
||||
LocusTextBean bean = new LocusTextBean();
|
||||
// if (TextUtils.isEmpty(preBean.getUserLocation()) || "null".equals(preBean.getUserLocation())) {
|
||||
// bean.setAddress("定位地址:未知");
|
||||
// } else {
|
||||
// bean.setAddress("定位地址:" + preBean.getUserLocation());
|
||||
// }
|
||||
bean.setCreateTime(nextBean.getGmtCreate());
|
||||
bean.setTime(text.getCreateTime());
|
||||
long timeSpan1 = TimeUtils.getTimeSpan(nextBean.getGmtCreate(), text.getCreateTime(), TimeConstants.SEC);
|
||||
bean.setStateTime(timeSpan1 + "");
|
||||
bean.setType(LocusStepAdapter.TYPE_STAY);
|
||||
bean.setOrder(i);
|
||||
bean.setSecond(timeSpan1);
|
||||
mStepBeans.add(bean);
|
||||
}
|
||||
} else {
|
||||
LocusTextBean bean = new LocusTextBean();
|
||||
// if (TextUtils.isEmpty(preBean.getUserLocation()) || "null".equals(preBean.getUserLocation())) {
|
||||
// bean.setAddress("定位地址:未知");
|
||||
// } else {
|
||||
// bean.setAddress("定位地址:" + preBean.getUserLocation());
|
||||
// }
|
||||
bean.setCreateTime(nextBean.getGmtCreate());
|
||||
bean.setTime(preBean.getGmtCreate());
|
||||
long timeSpan1 = TimeUtils.getTimeSpan(nextBean.getGmtCreate(), preBean.getGmtCreate(), TimeConstants.SEC);
|
||||
bean.setStateTime(timeSpan1 + "");
|
||||
bean.setSecond(timeSpan1);
|
||||
bean.setType(LocusStepAdapter.TYPE_STAY);
|
||||
bean.setOrder(i);
|
||||
mStepBeans.add(bean);
|
||||
}
|
||||
} else {
|
||||
//TODO 移动
|
||||
if (mStepBeans != null && mStepBeans.size() > 0) {
|
||||
LocusTextBean tempbean = mStepBeans.get(mStepBeans.size() - 1);
|
||||
if (tempbean.getType() == LocusStepAdapter.TYPE_ONLINE) {
|
||||
//上一条也是移动的 //将停止时间累计
|
||||
long timeSpan2 = TimeUtils.getTimeSpan(nextBean.getGmtCreate(), tempbean.getCreateTime(), TimeConstants.SEC);
|
||||
tempbean.setStateTime(timeSpan2 + "");
|
||||
tempbean.setCreateTime(nextBean.getGmtCreate());
|
||||
long l = tempbean.getSecond() + timeSpan2;
|
||||
tempbean.setSecond(l);
|
||||
tempbean.setOrder(i);
|
||||
} else {
|
||||
LocusTextBean locusTextBean = mStepBeans.get(mStepBeans.size() - 1);
|
||||
LocusTextBean bean = new LocusTextBean();
|
||||
// if (TextUtils.isEmpty(preBean.getUserLocation()) || "null".equals(preBean.getUserLocation())) {
|
||||
// bean.setAddress("定位地址:未知");
|
||||
// } else {
|
||||
// bean.setAddress("定位地址:" + preBean.getUserLocation());
|
||||
// }
|
||||
bean.setCreateTime(nextBean.getGmtCreate());
|
||||
bean.setTime(locusTextBean.getCreateTime());
|
||||
long timeSpan1 = TimeUtils.getTimeSpan(nextBean.getGmtCreate(), locusTextBean.getCreateTime(), TimeConstants.SEC);
|
||||
bean.setStateTime(timeSpan1 + "");
|
||||
bean.setType(LocusStepAdapter.TYPE_ONLINE);
|
||||
bean.setSecond(timeSpan1);
|
||||
bean.setOrder(i);
|
||||
mStepBeans.add(bean);
|
||||
}
|
||||
} else {
|
||||
LocusTextBean bean = new LocusTextBean();
|
||||
// if (TextUtils.isEmpty(preBean.getUserLocation()) || "null".equals(preBean.getUserLocation())) {
|
||||
// bean.setAddress("定位地址:未知");
|
||||
// } else {
|
||||
// bean.setAddress("定位地址:" + preBean.getUserLocation());
|
||||
// }
|
||||
bean.setCreateTime(nextBean.getGmtCreate());
|
||||
bean.setTime(preBean.getGmtCreate());
|
||||
long timeSpan1 = TimeUtils.getTimeSpan(nextBean.getGmtCreate(), preBean.getGmtCreate(), TimeConstants.SEC);
|
||||
bean.setStateTime(timeSpan1 + "");
|
||||
bean.setSecond(timeSpan1);
|
||||
bean.setType(LocusStepAdapter.TYPE_ONLINE);
|
||||
bean.setOrder(i);
|
||||
mStepBeans.add(bean);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//TODO 失联
|
||||
if (mStepBeans != null && mStepBeans.size() > 0) {
|
||||
LocusTextBean tempbean = mStepBeans.get(mStepBeans.size() - 1);
|
||||
if (tempbean.getType() == LocusStepAdapter.TYPE_OFFLINE) {
|
||||
//上一条也是移动的 //将停止时间累计
|
||||
long timeSpan2 = TimeUtils.getTimeSpan(nextBean.getGmtCreate(), tempbean.getCreateTime(), TimeConstants.SEC);
|
||||
tempbean.setStateTime(timeSpan2 + "");
|
||||
tempbean.setCreateTime(nextBean.getGmtCreate());
|
||||
long l = tempbean.getSecond() + timeSpan2;
|
||||
tempbean.setSecond(l);
|
||||
tempbean.setOrder(i);
|
||||
} else {
|
||||
LocusTextBean locusTextBean = mStepBeans.get(mStepBeans.size() - 1);
|
||||
LocusTextBean bean = new LocusTextBean();
|
||||
// if (TextUtils.isEmpty(preBean.getUserLocation()) || "null".equals(preBean.getUserLocation())) {
|
||||
// bean.setAddress("定位地址:未知");
|
||||
// } else {
|
||||
// bean.setAddress("定位地址:" + preBean.getUserLocation());
|
||||
// }
|
||||
bean.setCreateTime(nextBean.getGmtCreate());
|
||||
bean.setTime(locusTextBean.getCreateTime());
|
||||
long timeSpan1 = TimeUtils.getTimeSpan(nextBean.getGmtCreate(), locusTextBean.getCreateTime(), TimeConstants.SEC);
|
||||
bean.setStateTime(timeSpan1 + "");
|
||||
bean.setType(LocusStepAdapter.TYPE_OFFLINE);
|
||||
bean.setSecond(timeSpan1);
|
||||
bean.setOrder(i);
|
||||
mStepBeans.add(bean);
|
||||
}
|
||||
} else {
|
||||
LocusTextBean bean = new LocusTextBean();
|
||||
// if (TextUtils.isEmpty(preBean.getUserLocation()) || "null".equals(preBean.getUserLocation())) {
|
||||
// bean.setAddress("定位地址:未知");
|
||||
// } else {
|
||||
// bean.setAddress("定位地址:" + preBean.getUserLocation());
|
||||
// }
|
||||
bean.setOrder(i);
|
||||
bean.setCreateTime(nextBean.getGmtCreate());
|
||||
bean.setTime(preBean.getGmtCreate());
|
||||
long timeSpan1 = TimeUtils.getTimeSpan(nextBean.getGmtCreate(), preBean.getGmtCreate(), TimeConstants.SEC);
|
||||
bean.setStateTime(timeSpan1 + "");
|
||||
bean.setSecond(timeSpan1);
|
||||
bean.setType(LocusStepAdapter.TYPE_OFFLINE);
|
||||
mStepBeans.add(bean);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//最后一个点
|
||||
LocationPointBean mineLocationBean = mineBeans.get(mineBeans.size() - 1);
|
||||
LocusTextBean bean = new LocusTextBean();
|
||||
// if (TextUtils.isEmpty(mineLocationBean.getUserLocation()) || "null".equals(mineLocationBean.getUserLocation())) {
|
||||
// bean.setAddress("定位地址:未知");
|
||||
// } else {
|
||||
// bean.setAddress(mineLocationBean.getUserLocation());
|
||||
// }
|
||||
bean.setOrder(i);
|
||||
bean.setTime(mineLocationBean.getGmtCreate());
|
||||
bean.setStateTime("开始定位" + mineLocationBean.getGmtCreate());
|
||||
bean.setType(LocusStepAdapter.TYPE_STOP);
|
||||
bean.setCreateTime(mineLocationBean.getGmtCreate());
|
||||
mStepBeans.add(bean);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LocationPointBean mineLocationBean = mineBeans.get(mineBeans.size() - 1);
|
||||
LocusTextBean bean = new LocusTextBean();
|
||||
// if (TextUtils.isEmpty(mineLocationBean.getUserLocation()) || "null".equals(mineLocationBean.getUserLocation())) {
|
||||
// bean.setAddress("定位地址:未知");
|
||||
// } else {
|
||||
// bean.setAddress(mineLocationBean.getUserLocation());
|
||||
// }
|
||||
bean.setOrder(2);
|
||||
bean.setTime(mineLocationBean.getGmtCreate());
|
||||
bean.setStateTime("开始定位" + mineLocationBean.getGmtCreate());
|
||||
bean.setType(LocusStepAdapter.TYPE_START);
|
||||
bean.setCreateTime(mineLocationBean.getGmtCreate());
|
||||
mStepBeans.add(bean);
|
||||
|
||||
LocusTextBean bean1 = new LocusTextBean();
|
||||
// if (TextUtils.isEmpty(mineLocationBean.getUserLocation()) || "null".equals(mineLocationBean.getUserLocation())) {
|
||||
// bean1.setAddress("定位地址:未知");
|
||||
// } else {
|
||||
// bean1.setAddress(mineLocationBean.getUserLocation());
|
||||
// }
|
||||
bean1.setOrder(1);
|
||||
bean1.setTime(mineLocationBean.getGmtCreate());
|
||||
bean1.setStateTime("开始定位" + mineLocationBean.getGmtCreate());
|
||||
bean1.setType(LocusStepAdapter.TYPE_STOP);
|
||||
bean1.setCreateTime(mineLocationBean.getGmtCreate());
|
||||
mStepBeans.add(bean1);
|
||||
}
|
||||
return mStepBeans;
|
||||
}).subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<LocusTextBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<LocusTextBean> locusTextBeans) {
|
||||
if (locusTextBeans != null && locusTextBeans.size() > 0) {
|
||||
Collections.sort(locusTextBeans);
|
||||
mAdapter.setData(locusTextBeans);
|
||||
}
|
||||
if (mProgressDialog != null && mProgressDialog.isShowing()) {
|
||||
mProgressDialog.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
e.printStackTrace();
|
||||
if (mProgressDialog != null && mProgressDialog.isShowing()) {
|
||||
mProgressDialog.dismiss();
|
||||
}
|
||||
ToastUtils.show("获取历史轨迹数据失败,请稍后重试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
223
gridmodule/src/main/res/layout/activity_work_locus.xml
Normal file
223
gridmodule/src/main/res/layout/activity_work_locus.xml
Normal file
@ -0,0 +1,223 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_map_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.baidu.mapapi.map.TextureMapView
|
||||
android:id="@+id/tmv_map"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_reload"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bm_btn_background"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_map_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_type_map"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/sel_btn_submit_gray_left"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:padding="5dp"
|
||||
android:text="普通"
|
||||
android:textColor="@drawable/sel_btn_text_white_black" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_satellite"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/sel_btn_submit_gray_right"
|
||||
android:button="@null"
|
||||
android:padding="5dp"
|
||||
android:text="卫星"
|
||||
android:textColor="@drawable/sel_btn_text_white_black" />
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<!--标题-->
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_margin="20dp"
|
||||
android:background="@color/white">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</RelativeLayout>
|
||||
<!--地图文本选择-->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cv_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
app:cardCornerRadius="10dp"
|
||||
app:cardElevation="3dp"
|
||||
app:cardPreventCornerOverlap="true"
|
||||
app:cardUseCompatPadding="false"
|
||||
app:contentPadding="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@color/white"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_map"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/sel_btn_submit_gray_left"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:paddingLeft="40dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="40dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="地图"
|
||||
android:textColor="@drawable/sel_btn_text_white_black" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/sel_btn_submit_gray_right"
|
||||
android:button="@null"
|
||||
android:paddingLeft="40dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="40dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="文本"
|
||||
android:textColor="@drawable/sel_btn_text_white_black" />
|
||||
</RadioGroup>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_user_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_user_default" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_toRightOf="@id/iv_user_icon"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="当前登录人" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_distance"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="距片区距离:" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:text="选择时间:"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_start_date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:drawablePadding="2dp"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请选择开始日期"
|
||||
tools:text="2019年12月11日" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_step"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/cv_card"
|
||||
android:layout_marginTop="10dp" />
|
||||
|
||||
</RelativeLayout>
|
@ -162,6 +162,9 @@ public class HomeActivity extends BaseActivity {
|
||||
showNotifySettingPage();
|
||||
}
|
||||
KeepLiveManage.doKeepLive(getApplication());//开启保活
|
||||
Intent intent = new Intent();
|
||||
intent.setAction(PathConfig.ACTION_PUSH_RESTART_SOCKET);
|
||||
sendBroadcast(intent);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -54,8 +54,11 @@ public class GridMainFragment extends BaseFragment {
|
||||
LinearLayout mLlPlan;
|
||||
private Unbinder mBind;
|
||||
private List<FuncBean> mFuncs = new ArrayList<>();
|
||||
private String[] mBtnStrs = new String[]{"房屋人口",
|
||||
private String[] mBtnStrs = new String[]{
|
||||
"打卡签到",
|
||||
"房屋人口",
|
||||
"通讯录",
|
||||
"工作轨迹",
|
||||
"事件上报",
|
||||
"事件处理",
|
||||
"事件核实",
|
||||
@ -71,6 +74,8 @@ public class GridMainFragment extends BaseFragment {
|
||||
"重点区域"};
|
||||
private int[] mBtnIds = new int[]{
|
||||
R.drawable.ic_case_report,
|
||||
R.drawable.ic_case_report,
|
||||
R.drawable.ic_case_record,
|
||||
R.drawable.ic_case_record,
|
||||
R.drawable.ic_case_dispose,
|
||||
R.drawable.ic_case_dispose,
|
||||
@ -146,6 +151,16 @@ public class GridMainFragment extends BaseFragment {
|
||||
*/
|
||||
private void choosePage(String text) {
|
||||
switch (text) {
|
||||
case "工作轨迹":
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_WORK_LOCUS)
|
||||
.navigation();
|
||||
break;
|
||||
case "打卡签到":
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_CHECK_WORK)
|
||||
.navigation();
|
||||
break;
|
||||
case "通讯录":
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_CHAT_ADDRESSLIST)
|
||||
|
@ -24,6 +24,7 @@
|
||||
android:layout_marginTop="10dp"
|
||||
android:src="@drawable/ic_grid_title" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -110,14 +110,11 @@ public class IncidentAcceptDeptDetailActivity extends BaseActivity {
|
||||
@BindView(R2.id.btn_abolish)
|
||||
Button mBtnAbolish;
|
||||
private Unbinder mBind;
|
||||
private String mId;
|
||||
private String mTaskId;
|
||||
private BaiduMap mBaiduMap;
|
||||
private BitmapDescriptor mBitMap;
|
||||
private int mLevel;
|
||||
private String mReportId;
|
||||
private String mDeptId;
|
||||
private String mDeptName;
|
||||
private IncidentDetailBean mDetailBean;
|
||||
|
||||
|
||||
@ -130,12 +127,9 @@ public class IncidentAcceptDeptDetailActivity extends BaseActivity {
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("事件受理");
|
||||
mId = getIntent().getStringExtra("id");
|
||||
mTaskId = getIntent().getStringExtra("taskId");
|
||||
mLevel = getIntent().getIntExtra("level", -4);
|
||||
mReportId = getIntent().getStringExtra("reportId");
|
||||
mDeptId = getIntent().getStringExtra("deptId");
|
||||
mDeptName = getIntent().getStringExtra("deptName");
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
mTvPublish.setText("日志");
|
||||
mTvPublish.setOnClickListener(v -> ARouter.getInstance()
|
||||
@ -162,7 +156,7 @@ public class IncidentAcceptDeptDetailActivity extends BaseActivity {
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(DeptApis.class)
|
||||
.doIncidentAccept(mId, body, UserLgUtils.getToken())
|
||||
.doIncidentAccept(mReportId, body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
@ -203,7 +197,7 @@ public class IncidentAcceptDeptDetailActivity extends BaseActivity {
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(DeptApis.class)
|
||||
.doIncidentAbolish(mId, body, UserLgUtils.getToken())
|
||||
.doIncidentAbolish(mReportId, body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
|
@ -15,7 +15,9 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
import com.tengshisoft.commonmodule.adapters.IncidentAcceptListAdapter;
|
||||
import com.tengshisoft.commonmodule.adapters.IncidentListAdapter;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentAcceptListBean;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentListBean;
|
||||
import com.tengshisoft.commonmodule.nets.DeptApis;
|
||||
import com.tengshisoft.supervisionmodule.R;
|
||||
import com.tengshisoft.supervisionmodule.R2;
|
||||
@ -67,8 +69,8 @@ public class IncidentAcceptDeptListActivity extends BaseActivity {
|
||||
@BindView(R2.id.tv_error_hint)
|
||||
TextView mTvErrorHint;
|
||||
private Unbinder mBind;
|
||||
private List<IncidentAcceptListBean.RowsBean> mDatas;
|
||||
private IncidentAcceptListAdapter mAdapter;
|
||||
private List<IncidentListBean.RowsBean> mDatas;
|
||||
private IncidentListAdapter mAdapter;
|
||||
private int mCurrentPage = 1;
|
||||
private String mKeywords = "";
|
||||
|
||||
@ -85,7 +87,7 @@ public class IncidentAcceptDeptListActivity extends BaseActivity {
|
||||
mEtBaseSearchContent.setHint("请输入事件编码(分类名称)");
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mDatas = new ArrayList<>();
|
||||
mAdapter = new IncidentAcceptListAdapter(mActivity, mDatas);
|
||||
mAdapter = new IncidentListAdapter(mActivity, mDatas);
|
||||
mRlvComponents.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvComponents.setAdapter(mAdapter);
|
||||
mSrlContent.setOnRefreshListener(v -> doRefresh());
|
||||
@ -102,9 +104,6 @@ public class IncidentAcceptDeptListActivity extends BaseActivity {
|
||||
.build(PathConfig.PATH_MODULE_SUPERVISION_INCIDENT_ACCEPT_DETAIL_ACTIVITY)
|
||||
.withString("reportId", v.getReportId())
|
||||
.withString("taskId", v.getTaskId())
|
||||
.withString("id", v.getDistributionUserId())
|
||||
.withString("deptId", v.getUserDeptId())
|
||||
.withString("deptName", v.getUserDeptName())
|
||||
.navigation(mActivity, 12));
|
||||
}
|
||||
|
||||
@ -118,14 +117,14 @@ public class IncidentAcceptDeptListActivity extends BaseActivity {
|
||||
.getIncidentAcceptList(mKeywords, mCurrentPage + "", UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<IncidentAcceptListBean>() {
|
||||
.subscribe(new Observer<IncidentListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull IncidentAcceptListBean communityListBean) {
|
||||
public void onNext(@NonNull IncidentListBean communityListBean) {
|
||||
if (communityListBean.getRows() != null && communityListBean.getRows().size() > 0) {
|
||||
++mCurrentPage;
|
||||
if (currentPage == 1) {
|
||||
|
@ -133,9 +133,7 @@ public class IncidentCheckDeptDetailActivity extends BaseActivity {
|
||||
private BitmapDescriptor mBitMap;
|
||||
private String mReportId;
|
||||
private String mTaskId;
|
||||
private String mHandleId;
|
||||
private IncidentHandleDetailBean mHandleDetail;
|
||||
private String mDispatchId;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
@ -147,8 +145,7 @@ public class IncidentCheckDeptDetailActivity extends BaseActivity {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mReportId = getIntent().getStringExtra("reportId");
|
||||
mTaskId = getIntent().getStringExtra("taskId");
|
||||
mHandleId = getIntent().getStringExtra("handleId");
|
||||
mDispatchId = getIntent().getStringExtra("dispatchId");
|
||||
mTvBaseTitle.setText("事件核查");
|
||||
mSrlContent.setEnableRefresh(false);
|
||||
mSrlContent.setEnableLoadMore(false);
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
@ -173,7 +170,7 @@ public class IncidentCheckDeptDetailActivity extends BaseActivity {
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(DeptApis.class)
|
||||
.doIncidentDeptCheckUnPass(mDispatchId, mHandleId, body, UserLgUtils.getToken())
|
||||
.doIncidentDeptCheckUnPass(mReportId, body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
@ -214,7 +211,7 @@ public class IncidentCheckDeptDetailActivity extends BaseActivity {
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(DeptApis.class)
|
||||
.doIncidentDeptCheckPass(mDispatchId, body, UserLgUtils.getToken())
|
||||
.doIncidentDeptCheckPass(mReportId, body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
@ -275,7 +272,7 @@ public class IncidentCheckDeptDetailActivity extends BaseActivity {
|
||||
* 获取详情
|
||||
*/
|
||||
private void getDetailData() {
|
||||
Observable<IncidentHandleDetailBean> dispatch = RetrofitManager.getInstance().create(Apis.class).getHandleDetailByHandleId(mHandleId, UserLgUtils.getToken());
|
||||
Observable<IncidentHandleDetailBean> dispatch = RetrofitManager.getInstance().create(Apis.class).getHandleDetailByHandleId(mTaskId, UserLgUtils.getToken());
|
||||
Observable<IncidentDetailBean> incidentDetail = RetrofitManager.getInstance().create(Apis.class).getIncidentDetailById(mReportId, UserLgUtils.getToken());
|
||||
Observable.merge(dispatch, incidentDetail)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
@ -15,7 +15,9 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
import com.tengshisoft.commonmodule.adapters.IncidentHandleListAdapter;
|
||||
import com.tengshisoft.commonmodule.adapters.IncidentListAdapter;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentHandleListBean;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentListBean;
|
||||
import com.tengshisoft.commonmodule.nets.DeptApis;
|
||||
import com.tengshisoft.supervisionmodule.R;
|
||||
import com.tengshisoft.supervisionmodule.R2;
|
||||
@ -69,8 +71,8 @@ public class IncidentCheckDeptListActivity extends BaseActivity {
|
||||
@BindView(R2.id.tv_error_hint)
|
||||
TextView mTvErrorHint;
|
||||
private Unbinder mBind;
|
||||
private List<IncidentHandleListBean.RowsBean> mDatas;
|
||||
private IncidentHandleListAdapter mAdapter;
|
||||
private List<IncidentListBean.RowsBean> mDatas;
|
||||
private IncidentListAdapter mAdapter;
|
||||
private int mCurrentPage = 1;
|
||||
private String mKeywords = "";
|
||||
|
||||
@ -86,7 +88,7 @@ public class IncidentCheckDeptListActivity extends BaseActivity {
|
||||
mEtBaseSearchContent.setHint("请输入事件编码(分类名称)");
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mDatas = new ArrayList<>();
|
||||
mAdapter = new IncidentHandleListAdapter(mActivity, mDatas);
|
||||
mAdapter = new IncidentListAdapter(mActivity, mDatas);
|
||||
mRlvComponents.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvComponents.setAdapter(mAdapter);
|
||||
mSrlContent.setOnRefreshListener(v -> doRefresh());
|
||||
@ -103,8 +105,6 @@ public class IncidentCheckDeptListActivity extends BaseActivity {
|
||||
.build(PathConfig.PATH_MODULE_SUPERVISION_INCIDENT_CHECK_DETAIL)
|
||||
.withString("reportId", v.getReportId())
|
||||
.withString("taskId", v.getTaskId())
|
||||
.withString("handleId", v.getHandleId())
|
||||
.withString("dispatchId", v.getDispatchId())
|
||||
.navigation(mActivity, 12));
|
||||
}
|
||||
|
||||
@ -118,14 +118,14 @@ public class IncidentCheckDeptListActivity extends BaseActivity {
|
||||
.getIncidentCheckList(mKeywords, mCurrentPage + "", UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<IncidentHandleListBean>() {
|
||||
.subscribe(new Observer<IncidentListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull IncidentHandleListBean communityListBean) {
|
||||
public void onNext(@NonNull IncidentListBean communityListBean) {
|
||||
if (communityListBean.getRows() != null && communityListBean.getRows().size() > 0) {
|
||||
++mCurrentPage;
|
||||
if (currentPage == 1) {
|
||||
|
@ -124,7 +124,7 @@ public class IncidentDistributionDeptDetailActivity extends BaseActivity {
|
||||
@BindView(R2.id.btn_submit)
|
||||
Button mBtnSubmit;
|
||||
private Unbinder mBind;
|
||||
private String mId;
|
||||
// private String mId;
|
||||
private String mTaskId;
|
||||
private BaiduMap mBaiduMap;
|
||||
private BitmapDescriptor mBitMap;
|
||||
@ -133,8 +133,8 @@ public class IncidentDistributionDeptDetailActivity extends BaseActivity {
|
||||
private String mSelDeptName;
|
||||
private String mSelUserId;
|
||||
private String mSelUserName;
|
||||
private String mDeptId;
|
||||
private String mDeptName;
|
||||
// private String mDeptId;
|
||||
// private String mDeptName;
|
||||
private DepartmentListBean mSelDeptBean;
|
||||
private ChoosePersonListBean mSelUser;
|
||||
private String mReportId;
|
||||
@ -152,9 +152,6 @@ public class IncidentDistributionDeptDetailActivity extends BaseActivity {
|
||||
mTvBaseTitle.setText("事件派遣");
|
||||
mReportId = getIntent().getStringExtra("reportId");
|
||||
mTaskId = getIntent().getStringExtra("taskId");
|
||||
mId = getIntent().getStringExtra("id");
|
||||
mDeptId = getIntent().getStringExtra("deptId");
|
||||
mDeptName = getIntent().getStringExtra("deptName");
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
mTvPublish.setText("日志");
|
||||
mTvPublish.setOnClickListener(v -> ARouter.getInstance()
|
||||
@ -174,8 +171,7 @@ public class IncidentDistributionDeptDetailActivity extends BaseActivity {
|
||||
//部门选择
|
||||
mTvDept.setOnClickListener(v -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_SEL_DEPT)
|
||||
.withString("deptId", mDeptId)
|
||||
.withString("deptName", mDeptName)
|
||||
.withString("taskId", mTaskId)
|
||||
.navigation(mActivity, 12));
|
||||
|
||||
//人员选择
|
||||
@ -203,7 +199,7 @@ public class IncidentDistributionDeptDetailActivity extends BaseActivity {
|
||||
RequestBody body = buildParams();
|
||||
RetrofitManager.getInstance()
|
||||
.create(DeptApis.class)
|
||||
.doSaveDistribution(mId, body, UserLgUtils.getToken())
|
||||
.doSaveDistribution(mReportId, body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
|
@ -72,8 +72,8 @@ public class IncidentDistributionDeptListActivity extends BaseActivity {
|
||||
@BindView(R2.id.tv_error_hint)
|
||||
TextView mTvErrorHint;
|
||||
private Unbinder mBind;
|
||||
private List<IncidentDisDeptListBean.RowsBean> mDatas;
|
||||
private IncidentDisDeptListAdapter mAdapter;
|
||||
private List<IncidentListBean.RowsBean> mDatas;
|
||||
private IncidentListAdapter mAdapter;
|
||||
private int mCurrentPage = 1;
|
||||
private String mKeywords = "";
|
||||
|
||||
@ -89,7 +89,7 @@ public class IncidentDistributionDeptListActivity extends BaseActivity {
|
||||
mEtBaseSearchContent.setHint("请输入事件编码(分类名称)");
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mDatas = new ArrayList<>();
|
||||
mAdapter = new IncidentDisDeptListAdapter(mActivity, mDatas);
|
||||
mAdapter = new IncidentListAdapter(mActivity, mDatas);
|
||||
mRlvComponents.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvComponents.setAdapter(mAdapter);
|
||||
mSrlContent.setOnRefreshListener(v -> doRefresh());
|
||||
@ -106,9 +106,6 @@ public class IncidentDistributionDeptListActivity extends BaseActivity {
|
||||
.build(PathConfig.PATH_MODULE_SUPERVISION_INCIDENT_DISTRIBUTION_DETAIL_ACTIVITY)
|
||||
.withString("reportId", v.getReportId())
|
||||
.withString("taskId", v.getTaskId())
|
||||
.withString("deptId", v.getUserDeptId())
|
||||
.withString("deptName", v.getUserDeptName())
|
||||
.withString("id", v.getDistributionUserId())
|
||||
.navigation(mActivity, 12));
|
||||
}
|
||||
|
||||
@ -122,14 +119,14 @@ public class IncidentDistributionDeptListActivity extends BaseActivity {
|
||||
.getIncidentDistributionList(mKeywords, mCurrentPage + "", UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<IncidentDisDeptListBean>() {
|
||||
.subscribe(new Observer<IncidentListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull IncidentDisDeptListBean communityListBean) {
|
||||
public void onNext(@NonNull IncidentListBean communityListBean) {
|
||||
if (communityListBean.getRows() != null && communityListBean.getRows().size() > 0) {
|
||||
++mCurrentPage;
|
||||
if (currentPage == 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user