部门端 事件受理、事件下派,中心端 事件分拨
This commit is contained in:
parent
d9d97f97c8
commit
0672ae422a
@ -54,6 +54,7 @@ dependencies {
|
||||
implementation project(':commonmodule')//公共模块
|
||||
implementation project(':gridmodule')//网格员端
|
||||
implementation project(':commandmodule')//中心端
|
||||
implementation project(':supervisionmodule')//部门端
|
||||
}
|
||||
//ARouter
|
||||
api "com.alibaba:arouter-api:$rootProject.ext.gRouterApiVersion"
|
||||
|
@ -150,7 +150,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 = "96aee0e5-2b4e-4b4a-a13c-9c71052b9ad7";/*测试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
|
||||
@ -291,11 +291,13 @@ public class PathConfig {
|
||||
//============================公共模块=============================
|
||||
public static final String PATH_MODULE_COMMON_ACTIVITY_CHECK_WORK = "/modulecommon/activity/checkwork";//考勤
|
||||
public static final String PATH_MODULE_COMMON_DEMO = "/modulecommon/activity/mapdemo";//地图测试
|
||||
|
||||
|
||||
public static final String PATH_MODULE_COMMON_ACTIVITY_USER_CENTER = "/modulecommon/activity/userCenter";//用户中心activity
|
||||
public static final String PATH_MODULE_COMMON_FRAGMENT_USER_CENTER = "/modulecommon/fragment/userCenter";//用户中心fragment
|
||||
public static final String PATH_MODULE_BASELIB_SHOW_IMG = "/modulebaselib/activity/showImg";//浏览图片
|
||||
public static final String PATH_MODULE_BASELIB_TAKE_PHOTO = "/modulebaselib/activity/takePhotoOrVideo";//摄像或拍照
|
||||
|
||||
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_GRID_ACTIVITY_COMMUNITY_MANAGE = "/modulegrid/activity/communityManage";//小区管理
|
||||
@ -466,7 +468,10 @@ public class PathConfig {
|
||||
public static final String PATH_MODULE_COMMAND_ACTIVITY_INCIDENT_SEL_DEPT = "/modulecommand/activity/incidentDeptSel";//选择组织机构
|
||||
|
||||
/*=========================================部门端========================================*/
|
||||
public static final String PATH_MODULE_SUPERVISION_INCIDENT_DISTRIBUTION_LIST_ACTIVITY = "/modulesupervision/activity/incidentDistributionList";//事件分拨列表
|
||||
public static final String PATH_MODULE_SUPERVISION_INCIDENT_DISTRIBUTION_DETAIL_ACTIVITY = "/modulesupervision/activity/incidentDistributionDetail";//事件分拨详情
|
||||
public static final String PATH_MODULE_SUPERVISION_INCIDENT_DISTRIBUTION_LIST_ACTIVITY = "/modulesupervision/activity/incidentDeptDistributionList";//事件分拨列表
|
||||
public static final String PATH_MODULE_SUPERVISION_INCIDENT_DISTRIBUTION_DETAIL_ACTIVITY = "/modulesupervision/activity/incidentDeptDistributionDetail";//事件分拨详情
|
||||
|
||||
public static final String PATH_MODULE_SUPERVISION_INCIDENT_ACCEPT_LIST_ACTIVITY = "/modulesupervision/activity/incidentDeptAcceptList";//事件受理
|
||||
public static final String PATH_MODULE_SUPERVISION_INCIDENT_ACCEPT_DETAIL_ACTIVITY = "/modulesupervision/activity/incidentDeptAcceptDetail";//事件受理详情
|
||||
|
||||
}
|
||||
|
@ -10,14 +10,15 @@ 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.111:8081/";/* 正式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/";/*事件部件*/
|
||||
public static final String SYS_HOUSE = "systemhouse/";/*房屋系统*/
|
||||
public static final String SYS_SECURITY = "systembase/";/*社会治安*/
|
||||
public static final String TEMP_IP = "http://192.168.0.111:8081/";
|
||||
public static final String TEMP_IP = "http://192.168.0.120:8080/";
|
||||
|
||||
public static final String BASE_MAIN_IP = IP + SYS_SECURITY;
|
||||
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;
|
||||
@ -25,7 +26,7 @@ public class BaseUrlApi {
|
||||
|
||||
public static final String BASE_URL = BASE_MAIN_IP;//基础URL
|
||||
|
||||
public static final String SOCKET_IP = IP + "websocket";/*SocketIP*/
|
||||
public static final String SOCKET_IP = "http://192.168.0.120:8081/websocket";/*SocketIP*/
|
||||
|
||||
//地图页面展示类型
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.tenlionsoft.baselib.core.widget.base;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -20,6 +21,7 @@ import java.util.List;
|
||||
*/
|
||||
public class ConditionAdapter extends BaseRecyclerAdapter<ConditionBean, ConditionHolder> {
|
||||
public List<ConditionBean> mSelBeans = new ArrayList<>();
|
||||
|
||||
public ConditionAdapter(Context ctx, List<ConditionBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
@ -35,6 +37,7 @@ public class ConditionAdapter extends BaseRecyclerAdapter<ConditionBean, Conditi
|
||||
ConditionBean bean = mData.get(i);
|
||||
holder.mTvName.setText(bean.getName());
|
||||
holder.mCbCheck.setOnCheckedChangeListener(null);
|
||||
holder.mTvName.setTextColor(bean.isCheck() ? Color.parseColor("#1296db") : Color.BLACK);
|
||||
holder.mCbCheck.setChecked(bean.isCheck());
|
||||
holder.mCbCheck.setOnCheckedChangeListener((buttonView, isChecked) -> mLis.onItemCheckChange(bean, isChecked, i));
|
||||
holder.itemView.setOnClickListener(v -> mLis.onItemCheckChange(bean, !bean.isCheck(), i));
|
||||
|
@ -37,7 +37,7 @@ public class FragmentUtils {
|
||||
}
|
||||
|
||||
public static BaseFragment getUserCenterFragment() {
|
||||
BaseFragment fragment = (BaseFragment) ARouter.getInstance().build(PathConfig.PATH_MODULE_MAIN_FRAGMENT_USER).navigation();
|
||||
BaseFragment fragment = (BaseFragment) ARouter.getInstance().build(PathConfig.PATH_MODULE_COMMON_FRAGMENT_USER_CENTER).navigation();
|
||||
return fragment;
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ public class AreaChooseDialog extends Dialog {
|
||||
private AreaBean mSelArea5;
|
||||
|
||||
private AreaChooseDialog(Context context, boolean isCancelable, boolean isBackCancelable, int gravity, boolean isShow, boolean isShowOther, boolean isDefault) {
|
||||
super(context, R.style.Dialog_ChoseFile);
|
||||
super(context, R.style.dialog_center_alpha);
|
||||
this.context = context;
|
||||
this.gravity = gravity;
|
||||
this.iscancelable = isCancelable;
|
||||
@ -122,7 +122,7 @@ public class AreaChooseDialog extends Dialog {
|
||||
DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
|
||||
Window window = this.getWindow();
|
||||
window.setGravity(Gravity.CENTER);
|
||||
window.setWindowAnimations(R.style.Dialog_ChoseFile);
|
||||
window.setWindowAnimations(R.style.dialog_center_alpha);
|
||||
WindowManager.LayoutParams params = window.getAttributes();
|
||||
params.width = (int) (displayMetrics.widthPixels * 0.9);
|
||||
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
@ -163,15 +163,15 @@ public class AreaChooseDialog extends Dialog {
|
||||
*/
|
||||
private boolean checkParams() {
|
||||
if (mSelArea1 == null) {
|
||||
ToastUtils.show("请选择省");
|
||||
ToastUtils.show("请选择省、自治区");
|
||||
return false;
|
||||
}
|
||||
if (mSelArea2 == null) {
|
||||
ToastUtils.show("请选择市");
|
||||
ToastUtils.show("请选择盟市");
|
||||
return false;
|
||||
}
|
||||
if (mSelArea3 == null) {
|
||||
ToastUtils.show("请选择区县");
|
||||
ToastUtils.show("请选择旗县区");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -225,7 +225,7 @@ public class AreaChooseDialog extends Dialog {
|
||||
private void onShowArea2() {
|
||||
if (null == mArea2List || mArea2List.size() <= 0) {
|
||||
if (mSelArea1 == null) {
|
||||
ToastUtils.show("请选择省");
|
||||
ToastUtils.show("请选择省、自治区");
|
||||
} else {
|
||||
getAreaList(2, mSelArea1.getAreaId());
|
||||
}
|
||||
@ -264,7 +264,7 @@ public class AreaChooseDialog extends Dialog {
|
||||
private void onShowArea3() {
|
||||
if (null == mArea3List || mArea3List.size() <= 0) {
|
||||
if (mSelArea2 == null) {
|
||||
ToastUtils.show("请选择市");
|
||||
ToastUtils.show("请选择盟市");
|
||||
} else {
|
||||
getAreaList(3, mSelArea2.getAreaId());
|
||||
}
|
||||
@ -299,7 +299,7 @@ public class AreaChooseDialog extends Dialog {
|
||||
private void onShowArea4() {
|
||||
if (null == mArea4List || mArea4List.size() <= 0) {
|
||||
if (mSelArea3 == null) {
|
||||
ToastUtils.show("请选择区县");
|
||||
ToastUtils.show("请选择旗县区");
|
||||
} else {
|
||||
getAreaList(4, mSelArea3.getAreaId());
|
||||
}
|
||||
|
@ -0,0 +1,191 @@
|
||||
package com.tenlionsoft.baselib.core.widget.views;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.Selection;
|
||||
import android.text.TextUtils;
|
||||
import android.text.method.HideReturnsTransformationMethod;
|
||||
import android.text.method.PasswordTransformationMethod;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.tenlionsoft.baselib.R;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.beans.AreaBean;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.api.BaseApiService;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
|
||||
|
||||
/**
|
||||
* 作者 : Adam on 2018/7/23.
|
||||
* 邮箱 : itgaojian@163.com
|
||||
* 描述 : 修改密码dialog
|
||||
*/
|
||||
public class ChangePwdDialog extends Dialog {
|
||||
|
||||
private View view;
|
||||
private Context context;
|
||||
private EditText mEtOriginPwd;
|
||||
private EditText mEtNewPwd;
|
||||
private EditText mEtNewConfirmPwd;
|
||||
private boolean isShowOrgPwd;
|
||||
private boolean isShowNewPwd;
|
||||
private boolean isShowNewConfirmPwd;
|
||||
private OnChangeListener mChangeListener;
|
||||
|
||||
private ChangePwdDialog(Context context) {
|
||||
super(context, R.style.Dialog_ChoseFile);
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
view = LayoutInflater.from(context).inflate(R.layout.change_pwd_dialog, null);
|
||||
setContentView(view);
|
||||
setCancelable(false);
|
||||
setCanceledOnTouchOutside(false);
|
||||
|
||||
mEtOriginPwd = view.findViewById(R.id.et_origin_pwd);
|
||||
mEtNewPwd = view.findViewById(R.id.et_new_pwd);
|
||||
mEtNewConfirmPwd = view.findViewById(R.id.et_new_confirm_pwd);
|
||||
ImageView ivShowOriPwd = view.findViewById(R.id.iv_show_pwd_origin);
|
||||
ImageView ivShowNewPwd = view.findViewById(R.id.iv_show_new_pwd);
|
||||
ImageView ivShowNewConfirmPwd = view.findViewById(R.id.iv_pwd_new_confirm);
|
||||
|
||||
|
||||
ivShowOriPwd.setOnClickListener(v -> {
|
||||
Editable etext = mEtOriginPwd.getText();
|
||||
Selection.setSelection(etext, etext.length());
|
||||
if (isShowOrgPwd) {
|
||||
isShowOrgPwd = false;
|
||||
mEtOriginPwd.setTransformationMethod(PasswordTransformationMethod.getInstance());
|
||||
ivShowOriPwd.setBackgroundResource(R.drawable.ic_hide_pwd);
|
||||
} else {
|
||||
isShowOrgPwd = true;
|
||||
ivShowOriPwd.setBackgroundResource(R.drawable.ic_show_pwd);
|
||||
mEtOriginPwd.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
ivShowNewPwd.setOnClickListener(v -> {
|
||||
Editable etext = mEtNewPwd.getText();
|
||||
Selection.setSelection(etext, etext.length());
|
||||
if (isShowNewPwd) {
|
||||
isShowNewPwd = false;
|
||||
mEtNewPwd.setTransformationMethod(PasswordTransformationMethod.getInstance());
|
||||
ivShowNewPwd.setBackgroundResource(R.drawable.ic_hide_pwd);
|
||||
} else {
|
||||
isShowNewPwd = true;
|
||||
mEtNewPwd.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
|
||||
ivShowNewPwd.setBackgroundResource(R.drawable.ic_show_pwd);
|
||||
}
|
||||
});
|
||||
|
||||
ivShowNewConfirmPwd.setOnClickListener(v -> {
|
||||
Editable etext = mEtNewConfirmPwd.getText();
|
||||
Selection.setSelection(etext, etext.length());
|
||||
if (isShowNewConfirmPwd) {
|
||||
isShowNewConfirmPwd = false;
|
||||
mEtNewConfirmPwd.setTransformationMethod(PasswordTransformationMethod.getInstance());
|
||||
ivShowNewConfirmPwd.setBackgroundResource(R.drawable.ic_hide_pwd);
|
||||
} else {
|
||||
isShowNewConfirmPwd = true;
|
||||
mEtNewConfirmPwd.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
|
||||
ivShowNewConfirmPwd.setBackgroundResource(R.drawable.ic_show_pwd);
|
||||
}
|
||||
});
|
||||
|
||||
view.findViewById(R.id.tv_cancel).setOnClickListener(v -> this.dismiss());
|
||||
view.findViewById(R.id.tv_confirm).setOnClickListener(v -> doConfirm());
|
||||
DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
|
||||
Window window = this.getWindow();
|
||||
window.setGravity(Gravity.CENTER);
|
||||
window.setWindowAnimations(R.style.Dialog_ChoseFile);
|
||||
WindowManager.LayoutParams params = window.getAttributes();
|
||||
params.width = (int) (displayMetrics.widthPixels * 0.9);
|
||||
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
window.setAttributes(params);
|
||||
window.setBackgroundDrawable(new ColorDrawable());
|
||||
}
|
||||
|
||||
private void doConfirm() {
|
||||
if (checkParams()) {
|
||||
if (mChangeListener != null) {
|
||||
String orgPwd = mEtOriginPwd.getText().toString().trim();
|
||||
String newPwd = mEtNewPwd.getText().toString().trim();
|
||||
String confirmPwd = mEtNewConfirmPwd.getText().toString().trim();
|
||||
mChangeListener.doChange(orgPwd, newPwd, confirmPwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void addOnChangeListener(OnChangeListener listener) {
|
||||
this.mChangeListener = listener;
|
||||
}
|
||||
|
||||
public interface OnChangeListener {
|
||||
void doChange(String org, String nPwd, String nCPwd);
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验参数
|
||||
*/
|
||||
private boolean checkParams() {
|
||||
String originPwd = mEtOriginPwd.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(originPwd)) {
|
||||
ToastUtils.show("请输入原始密码");
|
||||
return false;
|
||||
}
|
||||
String newPwd = mEtNewPwd.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(newPwd)) {
|
||||
ToastUtils.show("请输入新密码");
|
||||
}
|
||||
String newConfirmPwd = mEtNewConfirmPwd.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(newConfirmPwd) || !newPwd.equals(newConfirmPwd)) {
|
||||
ToastUtils.show("请确认新密码是否一致");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public static class DialogBuilder {
|
||||
private Context mContext;
|
||||
|
||||
public DialogBuilder(Context context) {
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
|
||||
public ChangePwdDialog build() {
|
||||
return new ChangePwdDialog(mContext);
|
||||
}
|
||||
}
|
||||
}
|
@ -21,7 +21,7 @@ import razerdp.basepopup.BasePopupWindow;
|
||||
* 作者: adam
|
||||
* 日期: 2021/9/30 - 2:58 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
* 描述: 条件选择
|
||||
*/
|
||||
public class ConditionPopup extends BasePopupWindow {
|
||||
private ConditionAdapter mAdapter;
|
||||
@ -40,6 +40,8 @@ public class ConditionPopup extends BasePopupWindow {
|
||||
rlvCondition.setLayoutManager(new LinearLayoutManager(context));
|
||||
rlvCondition.setAdapter(mAdapter);
|
||||
setContentView(view);
|
||||
|
||||
setBackgroundColor(Color.parseColor("#11000000"));
|
||||
setPopupGravity(Gravity.BOTTOM | Gravity.CENTER);
|
||||
mAdapter.addOnitemCheckChange((bean, isCheck, pos) -> {
|
||||
if (isCheck) {
|
||||
|
14
baselib/src/main/res/anim/anim_dialog_alpha_enter.xml
Normal file
14
baselib/src/main/res/anim/anim_dialog_alpha_enter.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="300">
|
||||
<scale
|
||||
android:fromXScale="1.2"
|
||||
android:fromYScale="1.2"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%"
|
||||
android:toXScale="1.0"
|
||||
android:toYScale="1.0" />
|
||||
<alpha
|
||||
android:fromAlpha="0.0"
|
||||
android:toAlpha="1.0" />
|
||||
</set>
|
14
baselib/src/main/res/anim/anim_dialog_alpha_out.xml
Normal file
14
baselib/src/main/res/anim/anim_dialog_alpha_out.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="300">
|
||||
<scale
|
||||
android:fromXScale="1.0"
|
||||
android:fromYScale="1.0"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%"
|
||||
android:toXScale="1.2"
|
||||
android:toYScale="1.2" />
|
||||
<alpha
|
||||
android:fromAlpha="1.0"
|
||||
android:toAlpha="0.0" />
|
||||
</set>
|
BIN
baselib/src/main/res/drawable-xhdpi/ic_dept_icon.png
Normal file
BIN
baselib/src/main/res/drawable-xhdpi/ic_dept_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 352 B |
BIN
baselib/src/main/res/drawable-xhdpi/ic_hook_blue.png
Normal file
BIN
baselib/src/main/res/drawable-xhdpi/ic_hook_blue.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 454 B |
BIN
baselib/src/main/res/drawable-xhdpi/ic_popup_arrow.png
Normal file
BIN
baselib/src/main/res/drawable-xhdpi/ic_popup_arrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 692 B |
5
baselib/src/main/res/drawable/sel_check_item_hook.xml
Normal file
5
baselib/src/main/res/drawable/sel_check_item_hook.xml
Normal 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/ic_hook_blue" android:state_checked="true" />
|
||||
<item android:drawable="@drawable/shp_rectangle_white" android:state_checked="false" />
|
||||
</selector>
|
62
baselib/src/main/res/drawable/shp_bottom_shadow_white.xml
Normal file
62
baselib/src/main/res/drawable/shp_bottom_shadow_white.xml
Normal file
@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<padding android:bottom="1dp" />
|
||||
<solid android:color="#00CCCCCC" />
|
||||
<corners
|
||||
android:bottomLeftRadius="8dp"
|
||||
android:bottomRightRadius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<padding android:bottom="1dp" />
|
||||
<solid android:color="#10CCCCCC" />
|
||||
<corners
|
||||
android:bottomLeftRadius="8dp"
|
||||
android:bottomRightRadius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<padding android:bottom="1dp" />
|
||||
<solid android:color="#20CCCCCC" />
|
||||
<corners
|
||||
android:bottomLeftRadius="8dp"
|
||||
android:bottomRightRadius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<padding android:bottom="1dp" />
|
||||
<solid android:color="#30CCCCCC" />
|
||||
<corners
|
||||
android:bottomLeftRadius="8dp"
|
||||
android:bottomRightRadius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<padding android:bottom="1dp" />
|
||||
<solid android:color="#50CCCCCC" />
|
||||
<corners
|
||||
android:bottomLeftRadius="8dp"
|
||||
android:bottomRightRadius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!-- 中心背景 -->
|
||||
<item>
|
||||
<shape
|
||||
android:shape="rectangle"
|
||||
android:useLevel="false">
|
||||
<!-- 实心 -->
|
||||
<solid android:color="#ffffff" />
|
||||
<corners
|
||||
android:bottomLeftRadius="8dp"
|
||||
android:bottomRightRadius="8dp" />
|
||||
<padding android:bottom="5dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
6
baselib/src/main/res/drawable/shp_rectangle_white_5.xml
Executable file
6
baselib/src/main/res/drawable/shp_rectangle_white_5.xml
Executable file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/white" />
|
||||
<corners android:radius="5dp" />
|
||||
</shape>
|
157
baselib/src/main/res/layout/change_pwd_dialog.xml
Executable file
157
baselib/src/main/res/layout/change_pwd_dialog.xml
Executable file
@ -0,0 +1,157 @@
|
||||
<?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:layout_margin="20dp"
|
||||
android:background="@drawable/shp_rectangle_white_5"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:text="密码修改"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_gray"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="原密码" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_origin_pwd"
|
||||
style="@style/item_content"
|
||||
android:gravity="left"
|
||||
android:hint="请输入原密码"
|
||||
android:inputType="textPassword" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_show_pwd_origin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@drawable/ic_hide_pwd" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_gray"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="新密码" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_new_pwd"
|
||||
style="@style/item_content"
|
||||
android:gravity="left"
|
||||
android:hint="请输入新密码"
|
||||
android:inputType="textPassword" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_show_new_pwd"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@drawable/ic_hide_pwd" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_gray"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="确认密码" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_new_confirm_pwd"
|
||||
style="@style/item_content"
|
||||
android:gravity="left"
|
||||
android:hint="请输入新密码"
|
||||
android:inputType="textPassword" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_pwd_new_confirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@drawable/ic_hide_pwd" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:gravity="right"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="20dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="10dp"
|
||||
android:text="取消"
|
||||
android:textColor="@color/gray_text" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_confirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="10dp"
|
||||
android:text="确定"
|
||||
android:textColor="@color/text_blue" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -4,7 +4,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"
|
||||
android:background="@drawable/shp_rectangle_white"
|
||||
android:background="@drawable/shp_rectangle_white_5"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_gray"
|
||||
android:layout_marginTop="5dp">
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
@ -36,7 +36,9 @@
|
||||
android:hint="请选择省、自治区" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
<LinearLayout
|
||||
style="@style/item_gray"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
@ -54,7 +56,9 @@
|
||||
android:hint="请选择盟市、地区" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
<LinearLayout
|
||||
style="@style/item_gray"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
@ -62,17 +66,19 @@
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="区、县、旗" />
|
||||
android:text="旗、县、区" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area3"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择区、县、旗" />
|
||||
android:hint="请选择旗、县、区" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
<LinearLayout
|
||||
style="@style/item_gray"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
@ -90,7 +96,9 @@
|
||||
android:hint="请选择乡镇、街道" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
<LinearLayout
|
||||
style="@style/item_gray"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
@ -98,14 +106,14 @@
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="村、嘎查" />
|
||||
android:text="嘎查、村、社区" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area5"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择村、嘎查" />
|
||||
android:hint="请选择嘎查、村、社区" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?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:id="@+id/ll_base_search_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
@ -8,6 +9,21 @@
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_search_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_down_circle_32"
|
||||
android:drawablePadding="5dp"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:text="筛选"
|
||||
android:textColor="@color/black"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
@ -48,4 +64,6 @@
|
||||
android:paddingBottom="5dp"
|
||||
android:text="搜索"
|
||||
android:textColor="@color/col_verify_text" />
|
||||
|
||||
|
||||
</LinearLayout>
|
@ -27,6 +27,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="10dp"
|
||||
android:button="@drawable/sel_check_item_cir" />
|
||||
android:button="@drawable/sel_check_item_hook"
|
||||
tools:checked="true" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -1,13 +1,14 @@
|
||||
<?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="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_rectangle_white"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_conditions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_rectangle_white"
|
||||
android:padding="5dp" />
|
||||
</LinearLayout>
|
@ -141,6 +141,16 @@
|
||||
<item name="android:windowExitAnimation">@anim/anim_dialog_exit</item>
|
||||
</style>
|
||||
|
||||
<style name="dialog_center_alpha" parent="@android:style/Theme.Dialog">
|
||||
<!-- 是否有边框 -->
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<item name="android:windowBackground">@android:color/white</item>
|
||||
<!--标题 -->
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowEnterAnimation">@anim/anim_dialog_alpha_enter</item>
|
||||
<item name="android:windowExitAnimation">@anim/anim_dialog_alpha_out</item>
|
||||
</style>
|
||||
|
||||
<style name="dialog_center" parent="@android:style/Theme.Dialog">
|
||||
<!-- 是否有边框 -->
|
||||
<item name="android:windowFrame">@null</item>
|
||||
|
@ -129,7 +129,7 @@ public class BusinessService extends Service {
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
startSocketService();
|
||||
//TODO startSocketService();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -374,7 +374,6 @@ public class BusinessService extends Service {
|
||||
//用户主动给系统发送已办
|
||||
String system = intent.getStringExtra("system");
|
||||
String serviceId = intent.getStringExtra("serviceId");
|
||||
LogUtils.e(serviceId);
|
||||
String msg = buildSocketMsg(PathConfig.MSG_DONE, system, serviceId);
|
||||
sendSocketNoticeMsg(msg);
|
||||
break;
|
||||
|
@ -41,6 +41,7 @@ import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseShowPhotoAdapter;
|
||||
import com.tenlionsoft.baselib.core.widget.videorecord.MediaManager;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.LogUtils;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
|
||||
@ -133,6 +134,7 @@ public class IncidentAcceptDetailActivity extends BaseActivity {
|
||||
mId = getIntent().getStringExtra("id");
|
||||
mTaskId = getIntent().getStringExtra("taskId");
|
||||
int level = getIntent().getIntExtra("level", -4);
|
||||
LogUtils.e(level);
|
||||
if (level > 1) {
|
||||
mBtnReport.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
|
@ -102,7 +102,7 @@ public class IncidentAcceptListActivity extends BaseActivity {
|
||||
.build(PathConfig.PATH_MODULE_COMMAND_ACTIVITY_INCIDENT_ACCEPT_DETAIL)
|
||||
.withString("id", v.getReportId())
|
||||
.withString("taskId", v.getTaskId())
|
||||
.withInt("leve", v.getTaskLevel())
|
||||
.withInt("level", v.getTaskLevel())
|
||||
.navigation(mActivity, 12));
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.tengshisoft.commandmodule.activitys.incident;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
@ -32,9 +33,11 @@ import com.hjq.toast.ToastUtils;
|
||||
import com.tengshisoft.commandmodule.R;
|
||||
import com.tengshisoft.commandmodule.R2;
|
||||
import com.tengshisoft.commonmodule.beans.DeptBean;
|
||||
import com.tengshisoft.commonmodule.beans.DispatchBean;
|
||||
import com.tengshisoft.commonmodule.beans.SaveDispatchBean;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.SuccessBean;
|
||||
import com.tengshisoft.commonmodule.nets.Apis;
|
||||
import com.tengshisoft.commonmodule.nets.CenterApis;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
@ -42,6 +45,7 @@ import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseShowPhotoAdapter;
|
||||
import com.tenlionsoft.baselib.core.widget.videorecord.MediaManager;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -232,6 +236,47 @@ public class IncidentDispatchDetailActivity extends BaseActivity {
|
||||
.build(PathConfig.PATH_MODULE_COMMAND_ACTIVITY_INCIDENT_SEL_DEPT)
|
||||
.withBoolean("isSingle", false)
|
||||
.navigation(mActivity, 15));
|
||||
|
||||
mBtnSubmit.setOnClickListener(v -> doConfirm());
|
||||
}
|
||||
|
||||
private void doConfirm() {
|
||||
hideSoftKeyboard();
|
||||
if (checkParams()) {
|
||||
RequestBody body = buildParams();
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(CenterApis.class)
|
||||
.doSaveDistribution(mId, body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull SuccessBean successBean) {
|
||||
dialog.dismiss();
|
||||
ToastUtils.show("派遣成功");
|
||||
setResult(13);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -465,7 +510,7 @@ public class IncidentDispatchDetailActivity extends BaseActivity {
|
||||
* 构建提交参数
|
||||
*/
|
||||
private RequestBody buildParams() {
|
||||
DispatchBean bean = new DispatchBean();
|
||||
SaveDispatchBean bean = new SaveDispatchBean();
|
||||
String summary = mEtSummary.getText().toString().trim();
|
||||
bean.setDistributionSummary(summary);
|
||||
bean.setDistributionType(mSelScope);
|
||||
@ -474,14 +519,22 @@ public class IncidentDispatchDetailActivity extends BaseActivity {
|
||||
if ("special".equals(mSelType)) {
|
||||
//专办
|
||||
bean.setSpecialDeptId(mSelDeptId);
|
||||
String name = mTvSpecDept.getText().toString().trim();
|
||||
bean.setSpecialDeptName(name);
|
||||
} else if ("ma".equals(mSelType)) {
|
||||
//主协办
|
||||
String sponsorDept = mTvSponsorDept.getText().toString().trim();
|
||||
bean.setMasterDeptId(mSelDeptId);
|
||||
bean.setMasterDeptName(sponsorDept);
|
||||
//协办单位
|
||||
String assistDept = mTvAssistDept.getText().toString().trim();
|
||||
bean.setAssistDeptId(mSelAssistDeptId);
|
||||
|
||||
bean.setAssistDeptName(assistDept);
|
||||
} else {
|
||||
//多部门
|
||||
bean.setDeptsDeptId(mSelDeptId);
|
||||
String multiDept = mTvMultiDept.getText().toString().trim();
|
||||
bean.setDeptsDeptName(multiDept);
|
||||
}
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(bean);
|
||||
|
@ -378,7 +378,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:text="立案"
|
||||
android:text="受理"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<Button
|
||||
@ -398,7 +398,7 @@
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/sel_btn_activity_sign_up"
|
||||
android:text="废除"
|
||||
android:text="不予受理"
|
||||
android:textColor="@color/white" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
@ -3,7 +3,10 @@
|
||||
package="com.tengshisoft.commonmodule">
|
||||
|
||||
<application>
|
||||
<activity android:name=".activitys.checkwork.MapDemoActivity"></activity>
|
||||
<activity android:name=".activitys.department.ChoosePersonActivity"></activity>
|
||||
<activity android:name=".activitys.department.ChooseDeptActivity" />
|
||||
<activity android:name=".activitys.usercenter.UserCenterActivity" />
|
||||
<activity android:name=".activitys.checkwork.MapDemoActivity" />
|
||||
<activity android:name=".activitys.checkwork.CheckWorkActivity" />
|
||||
</application>
|
||||
|
||||
|
@ -0,0 +1,237 @@
|
||||
package com.tengshisoft.commonmodule.activitys.department;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
import com.scwang.smart.refresh.layout.api.RefreshLayout;
|
||||
import com.scwang.smart.refresh.layout.listener.OnLoadMoreListener;
|
||||
import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
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.nets.Apis;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.LogUtils;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
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.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2021年10月23日16:25:43
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 部门选择
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_COMMON_ACTIVITY_SEL_DEPT)
|
||||
public class ChooseDeptActivity extends BaseActivity {
|
||||
|
||||
@BindView(R2.id.rlv_choose_items)
|
||||
RecyclerView mRlvChooseItems;
|
||||
@BindView(R2.id.rlv_content)
|
||||
RecyclerView mRlvContent;
|
||||
@BindView(R2.id.srl_content)
|
||||
SmartRefreshLayout mSrlContent;
|
||||
@BindView(R2.id.tv_current)
|
||||
TextView mTvCurrent;
|
||||
@BindView(R2.id.pb_loading)
|
||||
ProgressBar mPbLoading;
|
||||
@BindView(R2.id.iv_empty_data)
|
||||
ImageView mIvEmptyData;
|
||||
@BindView(R2.id.tv_error_hint)
|
||||
TextView mTvErrorHint;
|
||||
private Unbinder mBind;
|
||||
|
||||
private String mDeptId;//当前选中的部门
|
||||
private String mDeptName;//当前选中的部门名称
|
||||
private List<DepartmentListBean> mSelBeans = new ArrayList<>();
|
||||
private List<DepartmentListBean> mDepartments = new ArrayList<>();
|
||||
private SelDeptAdapter mSelAdapter;
|
||||
private ChooseDeptAdapter mAdapter;
|
||||
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_choose_dept;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mDeptId = getIntent().getStringExtra("deptId");
|
||||
mDeptName = getIntent().getStringExtra("deptName");
|
||||
mTvBaseTitle.setText("选择部门");
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
mTvPublish.setText("确定");
|
||||
mTvPublish.setOnClickListener(v -> doConfirm());
|
||||
if (TextUtils.isEmpty(mDeptId)) {
|
||||
ToastUtils.show("数据有误");
|
||||
finish();
|
||||
} else {
|
||||
initViews();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认选择
|
||||
*/
|
||||
private void doConfirm() {
|
||||
if (mSelBeans != null && mSelBeans.size() > 0) {
|
||||
DepartmentListBean bean = mSelBeans.get(mSelBeans.size() - 1);
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("bean", bean);
|
||||
setResult(15, intent);
|
||||
finish();
|
||||
} else {
|
||||
ToastUtils.show("请选择部门");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化视图
|
||||
*/
|
||||
private void initViews() {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
setStateView(13);
|
||||
DepartmentListBean bean = new DepartmentListBean();
|
||||
bean.setName(mDeptName);
|
||||
bean.setId(mDeptId);
|
||||
mSelBeans.add(bean);
|
||||
mSelAdapter = new SelDeptAdapter(mActivity, mSelBeans);
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(mActivity);
|
||||
linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
|
||||
mRlvChooseItems.setLayoutManager(linearLayoutManager);
|
||||
mRlvChooseItems.setAdapter(mSelAdapter);
|
||||
mAdapter = new ChooseDeptAdapter(mActivity, mDepartments);
|
||||
mRlvContent.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvContent.setAdapter(mAdapter);
|
||||
|
||||
mAdapter.addOnitemCheckChange((bean1, isCheck, pos) -> {
|
||||
//添加到当前选中的集合中
|
||||
mSelBeans.add(bean1);
|
||||
mSelAdapter.setData(mSelBeans);
|
||||
mDeptId = bean1.getId();
|
||||
mDeptName = bean1.getName();
|
||||
setStateView(13);
|
||||
getDepartmentList();
|
||||
//获取当前选中的下一级
|
||||
mRlvChooseItems.scrollToPosition(mSelBeans.size() - 1);
|
||||
});
|
||||
mSelAdapter.setOnItemChoose((bean12, pos) -> {
|
||||
List<DepartmentListBean> departmentListBeans = mSelBeans.subList(0, pos + 1);
|
||||
mSelBeans = departmentListBeans;
|
||||
mSelAdapter.setData(mSelBeans);
|
||||
mRlvChooseItems.scrollToPosition(mSelBeans.size() - 1);
|
||||
mDeptName = bean12.getName();
|
||||
mDeptId = bean12.getId();
|
||||
mDepartments.clear();
|
||||
setStateView(13);
|
||||
getDepartmentList();
|
||||
});
|
||||
getDepartmentList();
|
||||
mSrlContent.setEnableLoadMore(false);
|
||||
mSrlContent.setOnRefreshListener(refreshLayout -> {
|
||||
mDepartments.clear();
|
||||
setStateView(13);
|
||||
getDepartmentList();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void getDepartmentList() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.getDeptList(mDeptId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<DepartmentListBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull List<DepartmentListBean> departmentListBeans) {
|
||||
mSrlContent.finishRefresh();
|
||||
if (departmentListBeans.size() > 0) {
|
||||
setStateView(14);
|
||||
mDepartments = departmentListBeans;
|
||||
mAdapter.setData(mDepartments);
|
||||
} else {
|
||||
setStateView(12);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mSrlContent.finishRefresh();
|
||||
setStateView(16);
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setStateView(int state) {
|
||||
switch (state) {
|
||||
case 12://默认
|
||||
case 15://默认
|
||||
mPbLoading.setVisibility(View.GONE);
|
||||
mRlvContent.setVisibility(View.GONE);
|
||||
mIvEmptyData.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setText("暂无数据");
|
||||
break;
|
||||
case 13://搜索中
|
||||
mPbLoading.setVisibility(View.VISIBLE);
|
||||
mRlvContent.setVisibility(View.GONE);
|
||||
mIvEmptyData.setVisibility(View.GONE);
|
||||
mTvErrorHint.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setText("加载中...");
|
||||
break;
|
||||
case 14://搜索完成有数据
|
||||
mPbLoading.setVisibility(View.GONE);
|
||||
mRlvContent.setVisibility(View.VISIBLE);
|
||||
mIvEmptyData.setVisibility(View.GONE);
|
||||
mTvErrorHint.setVisibility(View.GONE);
|
||||
break;
|
||||
case 16://搜索失败
|
||||
mPbLoading.setVisibility(View.GONE);
|
||||
mRlvContent.setVisibility(View.GONE);
|
||||
mIvEmptyData.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setText("加载失败,请稍后重试");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,293 @@
|
||||
package com.tengshisoft.commonmodule.activitys.department;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
import com.tengshisoft.commonmodule.R2;
|
||||
import com.tengshisoft.commonmodule.adapters.PersonSelAdapter;
|
||||
import com.tengshisoft.commonmodule.beans.ChoosePersonListBean;
|
||||
import com.tengshisoft.commonmodule.nets.Apis;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
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.UIUtil;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
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.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2021年10月23日18:02:45
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 人员选择
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_COMMON_ACTIVITY_SEL_PERSON)
|
||||
public class ChoosePersonActivity extends BaseActivity {
|
||||
@BindView(R2.id.et_base_search_content)
|
||||
EditText mEtSearch;
|
||||
@BindView(R2.id.iv_base_clear)
|
||||
ImageView mIvClear;
|
||||
@BindView(R2.id.btn_base_search)
|
||||
Button mBtnSearch;
|
||||
@BindView(R2.id.ll_base_search_content)
|
||||
LinearLayout mLlBaseSearchContent;
|
||||
@BindView(R2.id.rlv_dics)
|
||||
RecyclerView mRlvDics;
|
||||
@BindView(R2.id.srl_content)
|
||||
SmartRefreshLayout mSrlContent;
|
||||
@BindView(R2.id.pb_loading)
|
||||
ProgressBar mPbLoading;
|
||||
@BindView(R2.id.iv_empty_data)
|
||||
ImageView mIvEmptyData;
|
||||
@BindView(R2.id.tv_error_hint)
|
||||
TextView mTvErrorHint;
|
||||
private PersonSelAdapter mAdapter;
|
||||
private boolean mIsSingle;
|
||||
private List<ChoosePersonListBean> mDatas;
|
||||
private int mCurrentPage = 1;
|
||||
private String mKeywords = "";
|
||||
private String mId;
|
||||
|
||||
private Unbinder mBind;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_choose_person;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("人员选择");
|
||||
mDatas = new ArrayList<>();
|
||||
mTvPublish.setText("确定");
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
mTvPublish.setOnClickListener(v -> doConfirm());
|
||||
mIsSingle = getIntent().getBooleanExtra("isSingle", true);
|
||||
mId = getIntent().getStringExtra("id");
|
||||
mAdapter = new PersonSelAdapter(mActivity, mDatas);
|
||||
mAdapter.addOnitemCheckChange((bean, isCheck, pos) -> {
|
||||
if (isCheck) {
|
||||
if (mIsSingle) {
|
||||
mAdapter.mSelBeans.clear();
|
||||
mAdapter.mSelBeans.add(bean);
|
||||
} else {
|
||||
mAdapter.mSelBeans.add(bean);
|
||||
}
|
||||
} else {
|
||||
mAdapter.mSelBeans.remove(bean);
|
||||
}
|
||||
bean.setCheck(isCheck);
|
||||
if (isCheck) {
|
||||
if (mIsSingle) {
|
||||
for (int i = 0; i < mAdapter.getData().size(); i++) {
|
||||
if (mAdapter.getData().get(i).getUserId().equals(bean.getUserId())) {
|
||||
continue;
|
||||
} else {
|
||||
mAdapter.getData().get(i).setCheck(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mAdapter.notifyDataSetChanged();
|
||||
});
|
||||
mRlvDics.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvDics.setAdapter(mAdapter);
|
||||
mSrlContent.setEnableLoadMore(false);
|
||||
mSrlContent.setEnableRefresh(false);
|
||||
mBtnSearch.setOnClickListener(v -> doSearch());
|
||||
mIvClear.setOnClickListener(v -> {
|
||||
mEtSearch.setText("");
|
||||
for (int i = 0; i < mAdapter.mSelBeans.size(); i++) {
|
||||
for (int j = 0; j < mDatas.size(); j++) {
|
||||
ChoosePersonListBean bean = mAdapter.mSelBeans.get(i);
|
||||
ChoosePersonListBean bean1 = mDatas.get(j);
|
||||
if (bean.getUserId().equals(bean1.getUserId())) {
|
||||
bean.setCheck(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
mAdapter.setData(mDatas);
|
||||
});
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
setStateView(13);
|
||||
getDepartmentList(1, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新
|
||||
*/
|
||||
private void doRefresh() {
|
||||
mDatas.clear();
|
||||
mAdapter.setData(mDatas);
|
||||
getDepartmentList(1, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载更多
|
||||
*/
|
||||
private void doLoadMore() {
|
||||
getDepartmentList(mCurrentPage, null);
|
||||
}
|
||||
|
||||
private void doSearch() {
|
||||
hideSoftKeyboard();
|
||||
String searchContent = mEtSearch.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(searchContent)) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "搜索中...");
|
||||
dialog.show();
|
||||
hideSoftKeyboard();
|
||||
setStateView(13);
|
||||
mKeywords = searchContent;
|
||||
mCurrentPage = 1;
|
||||
getDepartmentList(mCurrentPage, dialog);
|
||||
} else {
|
||||
ToastUtils.show("请输入要查询的内容");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认选择
|
||||
*/
|
||||
private void doConfirm() {
|
||||
if (mAdapter.mSelBeans != null && mAdapter.mSelBeans.size() > 0) {
|
||||
Intent intent = new Intent();
|
||||
if (mIsSingle) {
|
||||
intent.putExtra("bean", mAdapter.mSelBeans.get(0));
|
||||
} else {
|
||||
String temp = "";
|
||||
String ids = "";
|
||||
for (int i = 0; i < mAdapter.mSelBeans.size(); i++) {
|
||||
temp += mAdapter.mSelBeans.get(i).getUserName() + ",";
|
||||
ids += mAdapter.mSelBeans.get(i).getUserId() + ",";
|
||||
}
|
||||
temp = temp.substring(0, temp.length() - 1);
|
||||
ids = ids.substring(0, ids.length() - 1);
|
||||
intent.putExtra("bean", temp);
|
||||
intent.putExtra("ids", ids);
|
||||
}
|
||||
setResult(13, intent);
|
||||
finish();
|
||||
} else {
|
||||
ToastUtils.show("请选择");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取组织机构列表
|
||||
*/
|
||||
private void getDepartmentList(int currentPage, ProgressDialog dialog) {
|
||||
mCurrentPage = currentPage;
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.getPersonListByDeptId(mId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<ChoosePersonListBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull List<ChoosePersonListBean> communityListBean) {
|
||||
if (communityListBean.size() > 0) {
|
||||
setStateView(14);
|
||||
mDatas = communityListBean;
|
||||
mAdapter.setData(mDatas);
|
||||
} else {
|
||||
setStateView(15);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.finishRefresh();
|
||||
ExceptionHandler.handleException(e);
|
||||
setStateView(16);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据状态显示
|
||||
* 12 默认
|
||||
* 13 搜索中
|
||||
* 14 搜索完成有数据
|
||||
* 15 搜索完成没有数据
|
||||
* 16 搜索失败
|
||||
*
|
||||
* @param state
|
||||
*/
|
||||
private void setStateView(int state) {
|
||||
switch (state) {
|
||||
case 12://默认
|
||||
mPbLoading.setVisibility(View.GONE);
|
||||
mSrlContent.setVisibility(View.GONE);
|
||||
mIvEmptyData.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setText("请输入要查询的人员名称");
|
||||
break;
|
||||
case 13://搜索中
|
||||
mPbLoading.setVisibility(View.VISIBLE);
|
||||
mSrlContent.setVisibility(View.GONE);
|
||||
mIvEmptyData.setVisibility(View.GONE);
|
||||
mTvErrorHint.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setText("加载中...");
|
||||
break;
|
||||
case 14://搜索完成有数据
|
||||
mPbLoading.setVisibility(View.GONE);
|
||||
mSrlContent.setVisibility(View.VISIBLE);
|
||||
mIvEmptyData.setVisibility(View.GONE);
|
||||
mTvErrorHint.setVisibility(View.GONE);
|
||||
break;
|
||||
case 15://搜索完成没有数据
|
||||
mPbLoading.setVisibility(View.GONE);
|
||||
mSrlContent.setVisibility(View.GONE);
|
||||
mIvEmptyData.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setText("没有搜索到数据");
|
||||
break;
|
||||
case 16://搜索失败
|
||||
mPbLoading.setVisibility(View.GONE);
|
||||
mSrlContent.setVisibility(View.GONE);
|
||||
mIvEmptyData.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setText("加载失败,请稍后重试");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,408 @@
|
||||
package com.tengshisoft.commonmodule.activitys.usercenter;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Environment;
|
||||
import android.provider.MediaStore;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.resource.bitmap.CircleCrop;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
import com.tengshisoft.commonmodule.R2;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.beans.BaseSuccessBean;
|
||||
import com.tenlionsoft.baselib.core.network.update.CheckUpdateUtils;
|
||||
import com.tenlionsoft.baselib.core.network.update.service.DownloadService;
|
||||
import com.tenlionsoft.baselib.core.network.update.utils.Constants;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.api.BaseApiService;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.bean.VersionBean;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
import com.tenlionsoft.baselib.core.widget.views.ButtomDialogView;
|
||||
import com.tenlionsoft.baselib.core.widget.views.ChangePwdDialog;
|
||||
import com.tenlionsoft.baselib.utils.AppUtils;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.FileUtils;
|
||||
import com.tenlionsoft.baselib.utils.ProiderUtil;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import androidx.core.content.FileProvider;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.MultipartBody;
|
||||
import okhttp3.RequestBody;
|
||||
import top.zibin.luban.Luban;
|
||||
import top.zibin.luban.OnCompressListener;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2021年10月22日19:11:49
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 用户中心Activity
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_COMMON_ACTIVITY_USER_CENTER)
|
||||
public class UserCenterActivity extends BaseActivity {
|
||||
|
||||
@BindView(R2.id.iv_user_icon)
|
||||
ImageView mIvUserIcon;
|
||||
@BindView(R2.id.tv_user_name)
|
||||
TextView mTvUserName;
|
||||
@BindView(R2.id.rl_change_pwd)
|
||||
RelativeLayout mRlChangePwd;
|
||||
@BindView(R2.id.tv_cache_num)
|
||||
TextView mTvCacheNum;
|
||||
@BindView(R2.id.rl_clear_cache)
|
||||
RelativeLayout mRlClearCache;
|
||||
@BindView(R2.id.tv_version_num)
|
||||
TextView mTvVersionNum;
|
||||
@BindView(R2.id.rl_check_version)
|
||||
RelativeLayout mRlCheckVersion;
|
||||
@BindView(R2.id.ll_functions)
|
||||
LinearLayout mLlFunctions;
|
||||
@BindView(R2.id.btn_login_out)
|
||||
Button mBtnLoginOut;
|
||||
private String mPicPath;
|
||||
private Unbinder mBind;
|
||||
private String mCachePath;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_user_center;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mBtnLoginOut.setOnClickListener(v -> doLoginOut());
|
||||
mRlCheckVersion.setOnClickListener(v -> checkVersion());
|
||||
mRlClearCache.setOnClickListener(v -> doClearCache());
|
||||
mIvUserIcon.setOnClickListener(v -> chooseUserIcon());
|
||||
mRlChangePwd.setOnClickListener(v -> doChangePwd());
|
||||
initContentView();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改密码
|
||||
*/
|
||||
private void doChangePwd() {
|
||||
ChangePwdDialog dialog = new ChangePwdDialog.DialogBuilder(mActivity).build();
|
||||
dialog.addOnChangeListener((org, nPwd, nCPwd) -> {
|
||||
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化视图
|
||||
*/
|
||||
private void initContentView() {
|
||||
mCachePath = getExternalFilesDir(Environment.DIRECTORY_PICTURES).getAbsolutePath() + File.separator;
|
||||
mTvCacheNum.setText(FileUtils.getDirSize(mCachePath));
|
||||
mTvVersionNum.setText("v " + AppUtils.getAppVersionName());
|
||||
mTvUserName.setText(UserLgUtils.getName());
|
||||
Glide.with(mActivity)
|
||||
.load(BaseUrlApi.BASE_IMG_URL + UserLgUtils.getAvatar())
|
||||
.apply(RequestOptions.bitmapTransform(new CircleCrop())
|
||||
.error(R.drawable.ic_user_default)
|
||||
.placeholder(R.drawable.ic_user_default))
|
||||
.into(mIvUserIcon);
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除缓存
|
||||
*/
|
||||
private void doClearCache() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
|
||||
builder.setTitle("提示")
|
||||
.setMessage("确认要清除缓存文件吗?")
|
||||
.setPositiveButton("确定", (dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
boolean b = FileUtils.deleteFilesInDir(mCachePath);
|
||||
if (b) {
|
||||
ToastUtils.show("清除成功");
|
||||
mTvCacheNum.setText("0.00MB");
|
||||
}
|
||||
})
|
||||
.setNegativeButton("取消", (dialog, which) -> dialog.dismiss());
|
||||
builder.create().show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查版本
|
||||
*/
|
||||
private void checkVersion() {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "检查中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.doCheckAppVersion(PathConfig.APP_VERSION_ID)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<VersionBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(VersionBean successBean) {
|
||||
dialog.dismiss();
|
||||
if (successBean != null && successBean.getData() > 0) {
|
||||
if (CheckUpdateUtils.checkcode(mActivity, successBean.getData() + "")) {
|
||||
startDownloadApk();
|
||||
} else {
|
||||
ToastUtils.show("已经是最新版本");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 开始下载Apk
|
||||
*/
|
||||
private void startDownloadApk() {
|
||||
ToastUtils.show("检测到新版本,开始下载,请在通知栏查看下载进度");
|
||||
Intent intent = new Intent(mActivity, DownloadService.class);
|
||||
intent.putExtra(Constants.APK_DOWNLOAD_URL, BaseUrlApi.APP_DOWNLOAD_URL);
|
||||
mActivity.startService(intent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出登录
|
||||
*/
|
||||
private void doLoginOut() {
|
||||
UserLgUtils.setToken("");
|
||||
UserLgUtils.setPassword("");
|
||||
UserLgUtils.setCheckRemember(false);
|
||||
Intent intent = new Intent();
|
||||
intent.setAction(PathConfig.ACTION_PUSH_STOP_SOCKET);
|
||||
sendBroadcast(intent);
|
||||
this.reStartApp();
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择上传的图片
|
||||
*/
|
||||
private void chooseUserIcon() {
|
||||
ButtomDialogView buttomDialogView = new ButtomDialogView.DialogBuilder(mActivity)
|
||||
.setIsBackCancelable(true)
|
||||
.setIscancelable(true)
|
||||
.setShowLocation(Gravity.BOTTOM)
|
||||
.setIsShowFile(false)
|
||||
.build();
|
||||
buttomDialogView.addOnChoseListener(new ButtomDialogView.OnChoseListener() {
|
||||
@Override
|
||||
public void choseFile() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void choseAlbum() {
|
||||
Intent intent = new Intent(Intent.ACTION_PICK, null);
|
||||
intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
|
||||
"image/*");
|
||||
startActivityForResult(intent, BaseUrlApi.PHOTO_REQUEST);
|
||||
buttomDialogView.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void choseShoot() {
|
||||
mPicPath = mCachePath + System.currentTimeMillis() + ".jpg";
|
||||
File file = new File(mPicPath);
|
||||
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
// 下面这句指定调用相机拍照后的照片存储的路径
|
||||
Uri uri;
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
|
||||
uri = Uri.fromFile(file);
|
||||
} else {
|
||||
uri = FileProvider.getUriForFile(mActivity, ProiderUtil.getFileProviderName(mActivity), file);
|
||||
}
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
|
||||
startActivityForResult(intent, BaseUrlApi.CAMERA_REQUEST);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loginOut() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changePwd() {
|
||||
|
||||
}
|
||||
});
|
||||
buttomDialogView.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (resultCode == RESULT_OK) {
|
||||
switch (requestCode) {
|
||||
case BaseUrlApi.CAMERA_REQUEST://相机
|
||||
uploadImg(mPicPath, 1);
|
||||
break;
|
||||
case BaseUrlApi.PHOTO_REQUEST://相册
|
||||
try {
|
||||
if (data == null) return;
|
||||
Uri uri = data.getData();
|
||||
String[] proj = {MediaStore.Images.Media.DATA};
|
||||
Cursor cursor = managedQuery(uri, proj, null, null, null);
|
||||
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
||||
cursor.moveToFirst();
|
||||
String srcPath = cursor.getString(column_index);
|
||||
uploadImg(srcPath, 2);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
private void uploadImg(String picPath, int i) {
|
||||
File file = new File(picPath);
|
||||
if (!file.exists()) {
|
||||
ToastUtils.show("图片路径错误.");
|
||||
return;
|
||||
}
|
||||
doUploaddImg(picPath);
|
||||
}
|
||||
|
||||
private void doUploaddImg(String picPath) {
|
||||
ProgressDialog progressDialog = UIUtil.initDialog(mActivity, "头像修改中...");
|
||||
progressDialog.show();
|
||||
Luban.with(mActivity)
|
||||
.load(picPath)
|
||||
.ignoreBy(100)
|
||||
.setTargetDir(mCachePath)
|
||||
.filter(path -> !(TextUtils.isEmpty(path) || path.toLowerCase().endsWith(".gif")))
|
||||
.setCompressListener(new OnCompressListener() {
|
||||
@Override
|
||||
public void onStart() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(File file) {
|
||||
RequestBody requestFile = RequestBody.create(MediaType.parse("multipart/form-data"), file);
|
||||
MultipartBody.Part body = MultipartBody.Part.createFormData("image", file.getName(), requestFile);
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.uploadImage(body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseSuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(BaseSuccessBean baseUserBean) {
|
||||
changeUserInfo(baseUserBean.getData(), progressDialog);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
if (progressDialog != null && progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
ToastUtils.show("头像修改失败,请稍后重试.");
|
||||
if (file.exists()) {
|
||||
file.delete();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
if (progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
ToastUtils.show("头像修改失败,请稍后重试");
|
||||
}
|
||||
})
|
||||
.launch();
|
||||
}
|
||||
|
||||
private void changeUserInfo(String id, ProgressDialog dialog) {
|
||||
// ChangeUserInfoBean bean = new ChangeUserInfoBean();
|
||||
// bean.setAvatar(id);
|
||||
// bean.setEmail(UserLgUtils.getEmail());
|
||||
// bean.setPhone(UserLgUtils.getPhone());
|
||||
// bean.setName(UserLgUtils.getName());
|
||||
// Gson gson = new Gson();
|
||||
// String obj = gson.toJson(bean);
|
||||
// RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
// RetrofitManager.getInstance()
|
||||
// .create(GridApi.class)
|
||||
// .doChangeUserInfo(body, UserLgUtils.getToken())
|
||||
// .subscribeOn(Schedulers.io())
|
||||
// .observeOn(AndroidSchedulers.mainThread())
|
||||
// .subscribe(new Observer<SuccessBean>() {
|
||||
// @Override
|
||||
// public void onSubscribe(Disposable d) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onNext(SuccessBean successBean) {
|
||||
// doLoginApp(UserLgUtils.getUserName(), UserLgUtils.getPassword(), dialog);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(Throwable e) {
|
||||
// dialog.dismiss();
|
||||
// ExceptionHandler.handleException(e);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onComplete() {
|
||||
//
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.tengshisoft.mainmodule.fragments;
|
||||
package com.tengshisoft.commonmodule.activitys.usercenter;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -17,12 +18,12 @@ import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.load.resource.bitmap.CircleCrop;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
import com.tengshisoft.commonmodule.R2;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.beans.BaseSuccessBean;
|
||||
import com.tenlionsoft.baselib.core.network.update.CheckUpdateUtils;
|
||||
@ -32,21 +33,16 @@ import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.api.BaseApiService;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.bean.VersionBean;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
|
||||
import com.tenlionsoft.baselib.core.widget.views.ButtomDialogView;
|
||||
import com.tenlionsoft.baselib.core.widget.views.ChangePwdDialog;
|
||||
import com.tenlionsoft.baselib.utils.AppUtils;
|
||||
import com.tenlionsoft.baselib.utils.EncryptUtils;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.FileUtils;
|
||||
import com.tenlionsoft.baselib.utils.ProiderUtil;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
import com.tengshisoft.mainmodule.R;
|
||||
import com.tengshisoft.mainmodule.R2;
|
||||
import com.tengshisoft.mainmodule.base.HomeActivity;
|
||||
import com.tengshisoft.mainmodule.beans.BaseUserBean;
|
||||
import com.tengshisoft.mainmodule.beans.LoginUser;
|
||||
import com.tengshisoft.mainmodule.net.MainApi;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@ -73,7 +69,7 @@ import static android.app.Activity.RESULT_OK;
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 首页-个人中心
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_MAIN_FRAGMENT_USER)
|
||||
@Route(path = PathConfig.PATH_MODULE_COMMON_FRAGMENT_USER_CENTER)
|
||||
public class UserCenterFragment extends BaseFragment {
|
||||
@BindView(R2.id.iv_user_icon)
|
||||
ImageView mIvUserIcon;
|
||||
@ -89,10 +85,12 @@ public class UserCenterFragment extends BaseFragment {
|
||||
RelativeLayout mRlCheckVersion;
|
||||
@BindView(R2.id.rl_clear_cache)
|
||||
RelativeLayout mRlClearCache;
|
||||
@BindView(R2.id.rl_change_pwd)
|
||||
RelativeLayout mRlChangePwd;
|
||||
private String mPicPath;
|
||||
private Unbinder mBind;
|
||||
private String mCachePath;
|
||||
private HomeActivity mHomeActivity;
|
||||
private BaseActivity mHomeActivity;
|
||||
|
||||
@Override
|
||||
protected int getContentViewId() {
|
||||
@ -110,9 +108,21 @@ public class UserCenterFragment extends BaseFragment {
|
||||
mRlCheckVersion.setOnClickListener(v -> checkVersion());
|
||||
mRlClearCache.setOnClickListener(v -> doClearCache());
|
||||
mIvUserIcon.setOnClickListener(v -> chooseUserIcon());
|
||||
mRlChangePwd.setOnClickListener(v -> doChangePwd());
|
||||
initContentView();
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示修改密码dialog
|
||||
*/
|
||||
private void doChangePwd() {
|
||||
ChangePwdDialog dialog = new ChangePwdDialog.DialogBuilder(mHomeActivity).build();
|
||||
dialog.addOnChangeListener((org, nPwd, nCPwd) -> {
|
||||
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户头像
|
||||
*/
|
||||
@ -227,7 +237,7 @@ public class UserCenterFragment extends BaseFragment {
|
||||
RequestBody requestFile = RequestBody.create(MediaType.parse("multipart/form-data"), file);
|
||||
MultipartBody.Part body = MultipartBody.Part.createFormData("image", file.getName(), requestFile);
|
||||
RetrofitManager.getInstance()
|
||||
.create(MainApi.class)
|
||||
.create(BaseApiService.class)
|
||||
.uploadImage(body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@ -313,99 +323,27 @@ public class UserCenterFragment extends BaseFragment {
|
||||
* 登录
|
||||
*/
|
||||
private void doLoginApp(String name, String pwd, ProgressDialog dialog) {
|
||||
String md5Pwd = EncryptUtils.encryptMD5ToStringTimes(pwd, 3);
|
||||
String deviceId = AppUtils.getDeviceId(mHomeActivity.getApplication());
|
||||
LoginUser info = new LoginUser();
|
||||
info.setAppVersion(AppUtils.getAppVersionCode());
|
||||
info.setAppId(PathConfig.APP_VERSION_ID);
|
||||
info.setPassword(md5Pwd);
|
||||
info.setUsername(name);
|
||||
info.setDeviceNo(deviceId);
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(info);
|
||||
RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
RetrofitManager.getInstance()
|
||||
.create(MainApi.class)
|
||||
.doLogin(body)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseUserBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(BaseUserBean baseUserBean) {
|
||||
// dialog.dismiss();
|
||||
// if (!TextUtils.isEmpty(baseUserBean.getData())) {
|
||||
// byte[] decode = Base64.decode(baseUserBean.getData(), Base64.DEFAULT);
|
||||
// try {
|
||||
// String loginUserInfo = AesUtil.aesCommonDecoder(PathConfig.SECRET, new String(decode, "UTF-8"));
|
||||
// LogUtils.e(loginUserInfo);
|
||||
// if (!TextUtils.isEmpty(loginUserInfo)) {
|
||||
// AppTokenUser appTokenUser = gson.fromJson(loginUserInfo, AppTokenUser.class);
|
||||
// UserLgUtils.setLoginInfo(loginUserInfo);
|
||||
// UserLgUtils.setAvatar(appTokenUser.getAvatar());
|
||||
// UserLgUtils.setEmail(appTokenUser.getEmail());
|
||||
// UserLgUtils.setId(appTokenUser.getId());
|
||||
// UserLgUtils.setName(appTokenUser.getName());
|
||||
// UserLgUtils.setUserName(appTokenUser.getUsername());
|
||||
// UserLgUtils.setPhone(appTokenUser.getPhone());
|
||||
// UserLgUtils.setToken(baseUserBean.getData());
|
||||
// GlobalProvider.save(mActivity, "token", baseUserBean.getData());
|
||||
// UserLgUtils.setPassword(pwd);
|
||||
// Glide.with(mActivity)
|
||||
// .load(BaseUrlApi.BASE_IMG_URL + appTokenUser.getAvatar())
|
||||
// .apply(RequestOptions.bitmapTransform(new CircleCrop())
|
||||
// .error(R.drawable.ic_user_default)
|
||||
// .placeholder(R.drawable.ic_user_default))
|
||||
// .into(mIvUserIcon);
|
||||
// ToastUtils.showShort("头像修改成功.");
|
||||
// } else {
|
||||
// ToastUtils.showShort("头像修改失败,请稍后重试.");
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// ToastUtils.showShort("头像修改失败,请稍后重试.");
|
||||
// }
|
||||
// } else {
|
||||
// ToastUtils.showShort("头像修改失败,请稍后重试.");
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除缓存
|
||||
*/
|
||||
private void doClearCache() {
|
||||
//测试聊天
|
||||
ARouter.getInstance().build(PathConfig.PATH_MODULE_CHAT_CHAT).navigation();
|
||||
// AlertDialog.Builder builder = new AlertDialog.Builder(mHomeActivity);
|
||||
// builder.setTitle("提示")
|
||||
// .setMessage("确认要清除缓存文件吗?")
|
||||
// .setPositiveButton("确定", (dialog, which) -> {
|
||||
// dialog.dismiss();
|
||||
// boolean b = FileUtils.deleteFilesInDir(mCachePath);
|
||||
// if (b) {
|
||||
// ToastUtils.showShort("清除成功");
|
||||
// mTvCacheNum.setText("0.00MB");
|
||||
// }
|
||||
// })
|
||||
// .setNegativeButton("取消", (dialog, which) -> dialog.dismiss());
|
||||
// builder.create().show();
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mHomeActivity);
|
||||
builder.setTitle("提示")
|
||||
.setMessage("确认要清除缓存文件吗?")
|
||||
.setPositiveButton("确定", (dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
boolean b = FileUtils.deleteFilesInDir(mCachePath);
|
||||
if (b) {
|
||||
ToastUtils.show("清除成功");
|
||||
mTvCacheNum.setText("0.00MB");
|
||||
}
|
||||
})
|
||||
.setNegativeButton("取消", (dialog, which) -> dialog.dismiss());
|
||||
builder.create().show();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -441,7 +379,7 @@ public class UserCenterFragment extends BaseFragment {
|
||||
@Override
|
||||
public void onAttach(@NonNull Context context) {
|
||||
super.onAttach(context);
|
||||
mHomeActivity = (HomeActivity) getActivity();
|
||||
mHomeActivity = (BaseActivity) getActivity();
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,58 @@
|
||||
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.DepartmentListBean;
|
||||
import com.tengshisoft.commonmodule.beans.DeptBean;
|
||||
import com.tengshisoft.commonmodule.holders.ChooseDeptHolder;
|
||||
import com.tengshisoft.commonmodule.holders.DeptSelHolder;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/11/24 - 9:16 AM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 部门选择
|
||||
*/
|
||||
public class ChooseDeptAdapter extends BaseRecyclerAdapter<DepartmentListBean, ChooseDeptHolder> {
|
||||
public List<DeptBean> mSelBeans = new ArrayList<>();
|
||||
|
||||
public ChooseDeptAdapter(Context ctx, List<DepartmentListBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChooseDeptHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_dept_choose, parent, false);
|
||||
return new ChooseDeptHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(ChooseDeptHolder holder, int i) {
|
||||
DepartmentListBean bean = mData.get(i);
|
||||
holder.mTvName.setText(bean.getName());
|
||||
if (bean.isIsParent()) {
|
||||
holder.mIvArrow.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
holder.mIvArrow.setVisibility(View.GONE);
|
||||
}
|
||||
holder.itemView.setOnClickListener(v -> mLis.onItemCheckChange(bean, !bean.isChecked(), i));
|
||||
}
|
||||
|
||||
private OnItemCheckChange mLis;
|
||||
|
||||
public void addOnitemCheckChange(OnItemCheckChange lis) {
|
||||
this.mLis = lis;
|
||||
}
|
||||
|
||||
public interface OnItemCheckChange {
|
||||
void onItemCheckChange(DepartmentListBean bean, boolean isCheck, int pos);
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
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.IncidentAcceptListBean;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentHandleListBean;
|
||||
import com.tengshisoft.commonmodule.holders.IncidentAcceptHolder;
|
||||
import com.tengshisoft.commonmodule.holders.IncidentHandleListHolder;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/11/17 - 1:22 PM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 事件处理列表
|
||||
*/
|
||||
public class IncidentAcceptListAdapter extends BaseRecyclerAdapter<IncidentAcceptListBean.RowsBean, IncidentAcceptHolder> {
|
||||
public IncidentAcceptListAdapter(Context ctx, List<IncidentAcceptListBean.RowsBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IncidentAcceptHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_incident_accept_list, parent, false);
|
||||
return new IncidentAcceptHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(IncidentAcceptHolder holder, int i) {
|
||||
IncidentAcceptListBean.RowsBean bean = mData.get(i);
|
||||
holder.mTvUserType.setText("处理类型:" + bean.getUserTypeText());
|
||||
holder.mTvState.setText(bean.getUserStatusText());
|
||||
holder.mTvUser.setText("分拨人员:" + bean.getUserName());
|
||||
holder.mTvTime.setText("分拨时间:" + bean.getGmtCreate());
|
||||
holder.mTvDept.setText("分拨单位:" + bean.getUserDeptName());
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
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.IncidentAcceptListBean;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentDisDeptListBean;
|
||||
import com.tengshisoft.commonmodule.holders.IncidentAcceptHolder;
|
||||
import com.tengshisoft.commonmodule.holders.IncidentDisDeptHolder;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/11/17 - 1:22 PM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 事件处理列表
|
||||
*/
|
||||
public class IncidentDisDeptListAdapter extends BaseRecyclerAdapter<IncidentDisDeptListBean.RowsBean, IncidentDisDeptHolder> {
|
||||
public IncidentDisDeptListAdapter(Context ctx, List<IncidentDisDeptListBean.RowsBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IncidentDisDeptHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_incident_distribution_dept_list, parent, false);
|
||||
return new IncidentDisDeptHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(IncidentDisDeptHolder holder, int i) {
|
||||
IncidentDisDeptListBean.RowsBean bean = mData.get(i);
|
||||
holder.mTvSummary.setText("指派类型:" + bean.getUserTypeText());
|
||||
holder.mTvTime.setText("指派时间:" + bean.getGmtCreate());
|
||||
holder.mTvDept.setText("指派单位:" + bean.getUserDeptName());
|
||||
holder.mTvState.setText(bean.getUserStatusText());
|
||||
holder.mTvUser.setText("派遣人员:" + bean.getUserName());
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
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.ChoosePersonListBean;
|
||||
import com.tengshisoft.commonmodule.beans.DeptBean;
|
||||
import com.tengshisoft.commonmodule.holders.DeptSelHolder;
|
||||
import com.tengshisoft.commonmodule.holders.PersonSelHolder;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/11/24 - 9:16 AM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 人员选择
|
||||
*/
|
||||
public class PersonSelAdapter extends BaseRecyclerAdapter<ChoosePersonListBean, PersonSelHolder> {
|
||||
public List<ChoosePersonListBean> mSelBeans = new ArrayList<>();
|
||||
|
||||
public PersonSelAdapter(Context ctx, List<ChoosePersonListBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PersonSelHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_person_sel, parent, false);
|
||||
return new PersonSelHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(PersonSelHolder holder, int i) {
|
||||
ChoosePersonListBean bean = mData.get(i);
|
||||
holder.mTvName.setText(bean.getUserName());
|
||||
holder.mCbSel.setOnCheckedChangeListener(null);
|
||||
holder.mCbSel.setChecked(bean.isCheck());
|
||||
holder.mCbSel.setOnCheckedChangeListener((buttonView, isChecked) -> mLis.onItemCheckChange(bean, isChecked, i));
|
||||
holder.itemView.setOnClickListener(v -> mLis.onItemCheckChange(bean, !bean.isCheck(), i));
|
||||
}
|
||||
|
||||
private OnItemCheckChange mLis;
|
||||
|
||||
public void addOnitemCheckChange(OnItemCheckChange lis) {
|
||||
this.mLis = lis;
|
||||
}
|
||||
|
||||
public interface OnItemCheckChange {
|
||||
void onItemCheckChange(ChoosePersonListBean bean, boolean isCheck, int pos);
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
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.DepartmentListBean;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentAcceptListBean;
|
||||
import com.tengshisoft.commonmodule.holders.IncidentAcceptHolder;
|
||||
import com.tengshisoft.commonmodule.holders.SelDeptHolder;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
|
||||
import com.tenlionsoft.baselib.core.widget.views.EditOrDelPopup;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/11/17 - 1:22 PM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 选中的部门
|
||||
*/
|
||||
public class SelDeptAdapter extends BaseRecyclerAdapter<DepartmentListBean, SelDeptHolder> {
|
||||
public SelDeptAdapter(Context ctx, List<DepartmentListBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SelDeptHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_dept_sel_layout, parent, false);
|
||||
return new SelDeptHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(SelDeptHolder holder, int i) {
|
||||
DepartmentListBean bean = mData.get(i);
|
||||
holder.mTvName.setText(bean.getName());
|
||||
if (i == (mData.size() - 1)) {
|
||||
holder.mIvArrow.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
holder.mIvArrow.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (mOnItemChoose != null) {
|
||||
holder.itemView.setOnClickListener(v -> mOnItemChoose.onItemChoose(bean, i));
|
||||
}
|
||||
}
|
||||
|
||||
private OnItemChoose mOnItemChoose;
|
||||
|
||||
public void setOnItemChoose(OnItemChoose onItemChoose) {
|
||||
this.mOnItemChoose = onItemChoose;
|
||||
}
|
||||
|
||||
public interface OnItemChoose {
|
||||
void onItemChoose(DepartmentListBean bean, int pos);
|
||||
}
|
||||
}
|
@ -0,0 +1,131 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/23 - 5:46 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 人员选择
|
||||
*/
|
||||
public class ChoosePersonListBean implements Serializable {
|
||||
|
||||
private String departmentId;
|
||||
private String departmentName;
|
||||
private int loginType;
|
||||
private String userAvatar;
|
||||
private String userEmail;
|
||||
private String userId;
|
||||
private String userName;
|
||||
private String userPhone;
|
||||
private String userSort;
|
||||
private int userState;
|
||||
private int userType;
|
||||
private String userUsername;
|
||||
|
||||
private boolean isCheck;
|
||||
|
||||
public boolean isCheck() {
|
||||
return isCheck;
|
||||
}
|
||||
|
||||
public void setCheck(boolean check) {
|
||||
isCheck = check;
|
||||
}
|
||||
|
||||
public String getDepartmentId() {
|
||||
return departmentId;
|
||||
}
|
||||
|
||||
public void setDepartmentId(String departmentId) {
|
||||
this.departmentId = departmentId;
|
||||
}
|
||||
|
||||
public String getDepartmentName() {
|
||||
return departmentName;
|
||||
}
|
||||
|
||||
public void setDepartmentName(String departmentName) {
|
||||
this.departmentName = departmentName;
|
||||
}
|
||||
|
||||
public int getLoginType() {
|
||||
return loginType;
|
||||
}
|
||||
|
||||
public void setLoginType(int loginType) {
|
||||
this.loginType = loginType;
|
||||
}
|
||||
|
||||
public String getUserAvatar() {
|
||||
return userAvatar;
|
||||
}
|
||||
|
||||
public void setUserAvatar(String userAvatar) {
|
||||
this.userAvatar = userAvatar;
|
||||
}
|
||||
|
||||
public String getUserEmail() {
|
||||
return userEmail;
|
||||
}
|
||||
|
||||
public void setUserEmail(String userEmail) {
|
||||
this.userEmail = userEmail;
|
||||
}
|
||||
|
||||
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 getUserPhone() {
|
||||
return userPhone;
|
||||
}
|
||||
|
||||
public void setUserPhone(String userPhone) {
|
||||
this.userPhone = userPhone;
|
||||
}
|
||||
|
||||
public String getUserSort() {
|
||||
return userSort;
|
||||
}
|
||||
|
||||
public void setUserSort(String userSort) {
|
||||
this.userSort = userSort;
|
||||
}
|
||||
|
||||
public int getUserState() {
|
||||
return userState;
|
||||
}
|
||||
|
||||
public void setUserState(int userState) {
|
||||
this.userState = userState;
|
||||
}
|
||||
|
||||
public int getUserType() {
|
||||
return userType;
|
||||
}
|
||||
|
||||
public void setUserType(int userType) {
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
public String getUserUsername() {
|
||||
return userUsername;
|
||||
}
|
||||
|
||||
public void setUserUsername(String userUsername) {
|
||||
this.userUsername = userUsername;
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/23 - 4:31 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 部门
|
||||
*/
|
||||
public class DepartmentListBean implements Serializable {
|
||||
|
||||
private boolean checked;
|
||||
private String icon;
|
||||
private String id;
|
||||
private boolean isParent;
|
||||
private String name;
|
||||
private String pId;
|
||||
private String target;
|
||||
private String title;
|
||||
private String url;
|
||||
|
||||
public boolean isChecked() {
|
||||
return checked;
|
||||
}
|
||||
|
||||
public void setChecked(boolean checked) {
|
||||
this.checked = checked;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public boolean isIsParent() {
|
||||
return isParent;
|
||||
}
|
||||
|
||||
public void setIsParent(boolean isParent) {
|
||||
this.isParent = isParent;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPId() {
|
||||
return pId;
|
||||
}
|
||||
|
||||
public void setPId(String pId) {
|
||||
this.pId = pId;
|
||||
}
|
||||
|
||||
public String getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
public void setTarget(String target) {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
}
|
@ -0,0 +1,187 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/23 - 2:46 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 事件分拨确认列表
|
||||
*/
|
||||
public class IncidentAcceptListBean {
|
||||
|
||||
private int page;
|
||||
private int total;
|
||||
private List<RowsBean> rows;
|
||||
|
||||
public int getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(int page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public int getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(int total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public List<RowsBean> getRows() {
|
||||
return rows;
|
||||
}
|
||||
|
||||
public void setRows(List<RowsBean> rows) {
|
||||
this.rows = rows;
|
||||
}
|
||||
|
||||
public static class RowsBean {
|
||||
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,187 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/23 - 3:29 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:部门 事件派遣
|
||||
*/
|
||||
public class IncidentDisDeptListBean {
|
||||
|
||||
private int page;
|
||||
private int total;
|
||||
private List<RowsBean> rows;
|
||||
|
||||
public int getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(int page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public int getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(int total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public List<RowsBean> getRows() {
|
||||
return rows;
|
||||
}
|
||||
|
||||
public void setRows(List<RowsBean> rows) {
|
||||
this.rows = rows;
|
||||
}
|
||||
|
||||
public static class RowsBean {
|
||||
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,74 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/23 - 4:12 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 部门 事件派遣
|
||||
*/
|
||||
public class SaveDeptDisBean {
|
||||
|
||||
private String dispatchHandleTime;
|
||||
private String dispatchSummary;
|
||||
private String dispatchUserDeptId;
|
||||
private String dispatchUserId;
|
||||
private String dispatchUserName;
|
||||
private String reportId;
|
||||
private String taskId;
|
||||
|
||||
public String getDispatchHandleTime() {
|
||||
return dispatchHandleTime;
|
||||
}
|
||||
|
||||
public void setDispatchHandleTime(String dispatchHandleTime) {
|
||||
this.dispatchHandleTime = dispatchHandleTime;
|
||||
}
|
||||
|
||||
public String getDispatchSummary() {
|
||||
return dispatchSummary;
|
||||
}
|
||||
|
||||
public void setDispatchSummary(String dispatchSummary) {
|
||||
this.dispatchSummary = dispatchSummary;
|
||||
}
|
||||
|
||||
public String getDispatchUserDeptId() {
|
||||
return dispatchUserDeptId;
|
||||
}
|
||||
|
||||
public void setDispatchUserDeptId(String dispatchUserDeptId) {
|
||||
this.dispatchUserDeptId = dispatchUserDeptId;
|
||||
}
|
||||
|
||||
public String getDispatchUserId() {
|
||||
return dispatchUserId;
|
||||
}
|
||||
|
||||
public void setDispatchUserId(String dispatchUserId) {
|
||||
this.dispatchUserId = dispatchUserId;
|
||||
}
|
||||
|
||||
public String getDispatchUserName() {
|
||||
return dispatchUserName;
|
||||
}
|
||||
|
||||
public void setDispatchUserName(String dispatchUserName) {
|
||||
this.dispatchUserName = dispatchUserName;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
@ -4,28 +4,25 @@ package com.tengshisoft.commonmodule.beans;
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/19 - 4:09 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
* 描述: 派遣 -分拨保存
|
||||
*/
|
||||
public class DispatchBean {
|
||||
public class SaveDispatchBean {
|
||||
|
||||
|
||||
private String areaId;
|
||||
private String areaName;
|
||||
private String assistDeptId;
|
||||
private String assistUserId;
|
||||
private String assistUserName;
|
||||
private String assistDeptName;
|
||||
private String deptsDeptId;
|
||||
private String deptsUserId;
|
||||
private String deptsUserName;
|
||||
private String deptsDeptName;
|
||||
private String distributionDeptType;
|
||||
private String distributionSummary;
|
||||
private String distributionType;
|
||||
private String masterDeptId;
|
||||
private String masterUserId;
|
||||
private String masterUserName;
|
||||
private String masterDeptName;
|
||||
private String reportId;
|
||||
private String specialDeptId;
|
||||
private String specialUserId;
|
||||
private String specialUserName;
|
||||
private String specialDeptName;
|
||||
private String taskId;
|
||||
|
||||
public String getAreaId() {
|
||||
@ -52,20 +49,12 @@ public class DispatchBean {
|
||||
this.assistDeptId = assistDeptId;
|
||||
}
|
||||
|
||||
public String getAssistUserId() {
|
||||
return assistUserId;
|
||||
public String getAssistDeptName() {
|
||||
return assistDeptName;
|
||||
}
|
||||
|
||||
public void setAssistUserId(String assistUserId) {
|
||||
this.assistUserId = assistUserId;
|
||||
}
|
||||
|
||||
public String getAssistUserName() {
|
||||
return assistUserName;
|
||||
}
|
||||
|
||||
public void setAssistUserName(String assistUserName) {
|
||||
this.assistUserName = assistUserName;
|
||||
public void setAssistDeptName(String assistDeptName) {
|
||||
this.assistDeptName = assistDeptName;
|
||||
}
|
||||
|
||||
public String getDeptsDeptId() {
|
||||
@ -76,20 +65,12 @@ public class DispatchBean {
|
||||
this.deptsDeptId = deptsDeptId;
|
||||
}
|
||||
|
||||
public String getDeptsUserId() {
|
||||
return deptsUserId;
|
||||
public String getDeptsDeptName() {
|
||||
return deptsDeptName;
|
||||
}
|
||||
|
||||
public void setDeptsUserId(String deptsUserId) {
|
||||
this.deptsUserId = deptsUserId;
|
||||
}
|
||||
|
||||
public String getDeptsUserName() {
|
||||
return deptsUserName;
|
||||
}
|
||||
|
||||
public void setDeptsUserName(String deptsUserName) {
|
||||
this.deptsUserName = deptsUserName;
|
||||
public void setDeptsDeptName(String deptsDeptName) {
|
||||
this.deptsDeptName = deptsDeptName;
|
||||
}
|
||||
|
||||
public String getDistributionDeptType() {
|
||||
@ -124,20 +105,12 @@ public class DispatchBean {
|
||||
this.masterDeptId = masterDeptId;
|
||||
}
|
||||
|
||||
public String getMasterUserId() {
|
||||
return masterUserId;
|
||||
public String getMasterDeptName() {
|
||||
return masterDeptName;
|
||||
}
|
||||
|
||||
public void setMasterUserId(String masterUserId) {
|
||||
this.masterUserId = masterUserId;
|
||||
}
|
||||
|
||||
public String getMasterUserName() {
|
||||
return masterUserName;
|
||||
}
|
||||
|
||||
public void setMasterUserName(String masterUserName) {
|
||||
this.masterUserName = masterUserName;
|
||||
public void setMasterDeptName(String masterDeptName) {
|
||||
this.masterDeptName = masterDeptName;
|
||||
}
|
||||
|
||||
public String getReportId() {
|
||||
@ -156,20 +129,12 @@ public class DispatchBean {
|
||||
this.specialDeptId = specialDeptId;
|
||||
}
|
||||
|
||||
public String getSpecialUserId() {
|
||||
return specialUserId;
|
||||
public String getSpecialDeptName() {
|
||||
return specialDeptName;
|
||||
}
|
||||
|
||||
public void setSpecialUserId(String specialUserId) {
|
||||
this.specialUserId = specialUserId;
|
||||
}
|
||||
|
||||
public String getSpecialUserName() {
|
||||
return specialUserName;
|
||||
}
|
||||
|
||||
public void setSpecialUserName(String specialUserName) {
|
||||
this.specialUserName = specialUserName;
|
||||
public void setSpecialDeptName(String specialDeptName) {
|
||||
this.specialDeptName = specialDeptName;
|
||||
}
|
||||
|
||||
public String getTaskId() {
|
@ -0,0 +1,28 @@
|
||||
package com.tengshisoft.commonmodule.holders;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/11/24 - 9:10 AM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 组织部门选择
|
||||
*/
|
||||
public class ChooseDeptHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvName;
|
||||
public ImageView mIvArrow;
|
||||
|
||||
public ChooseDeptHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mTvName = itemView.findViewById(R.id.tv_name);
|
||||
mIvArrow = itemView.findViewById(R.id.iv_arrow);
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.tengshisoft.commonmodule.holders;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021年10月18日14:19:22
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 事件分拨列表
|
||||
*/
|
||||
public class IncidentAcceptHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvState;//状态
|
||||
public TextView mTvUserType;//类型
|
||||
public TextView mTvTime;//分拨时间
|
||||
public TextView mTvUser;//分拨用户
|
||||
public TextView mTvDept;//派遣部门
|
||||
|
||||
public IncidentAcceptHolder(@NonNull @NotNull View itemView) {
|
||||
super(itemView);
|
||||
mTvState = itemView.findViewById(R.id.tv_state);
|
||||
mTvUserType = itemView.findViewById(R.id.tv_user_type);
|
||||
mTvTime = itemView.findViewById(R.id.tv_time);
|
||||
mTvDept = itemView.findViewById(R.id.tv_dept);
|
||||
mTvUser = itemView.findViewById(R.id.tv_user);
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.tengshisoft.commonmodule.holders;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/23 - 3:26 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 部门 事件派遣
|
||||
*/
|
||||
public class IncidentDisDeptHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvSummary;
|
||||
public TextView mTvDept;
|
||||
public TextView mTvUser;
|
||||
public TextView mTvState;
|
||||
public TextView mTvTime;
|
||||
|
||||
|
||||
public IncidentDisDeptHolder(@NonNull @NotNull View itemView) {
|
||||
super(itemView);
|
||||
mTvSummary = itemView.findViewById(R.id.tv_summary);
|
||||
mTvDept = itemView.findViewById(R.id.tv_dept);
|
||||
mTvUser = itemView.findViewById(R.id.tv_user);
|
||||
mTvState = itemView.findViewById(R.id.tv_state);
|
||||
mTvTime = itemView.findViewById(R.id.tv_time);
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.tengshisoft.commonmodule.holders;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/11/24 - 9:10 AM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 人员选择
|
||||
*/
|
||||
public class PersonSelHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvName;
|
||||
public CheckBox mCbSel;
|
||||
|
||||
public PersonSelHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mTvName = itemView.findViewById(R.id.tv_name);
|
||||
mCbSel = itemView.findViewById(R.id.cb_check);
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.tengshisoft.commonmodule.holders;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/23 - 4:49 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class SelDeptHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvName;
|
||||
public ImageView mIvArrow;
|
||||
|
||||
public SelDeptHolder(@NonNull @NotNull View itemView) {
|
||||
super(itemView);
|
||||
mTvName = itemView.findViewById(R.id.tv_name);
|
||||
mIvArrow = itemView.findViewById(R.id.iv_arrow);
|
||||
}
|
||||
}
|
@ -11,12 +11,14 @@ import com.tengshisoft.commonmodule.beans.CensusCrimeDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.CensusPersonBean;
|
||||
import com.tengshisoft.commonmodule.beans.CensusRearDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.CensusRegisterDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.ChoosePersonListBean;
|
||||
import com.tengshisoft.commonmodule.beans.CommunityListBean;
|
||||
import com.tengshisoft.commonmodule.beans.ComponentDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.ComponentListBean;
|
||||
import com.tengshisoft.commonmodule.beans.ComponentTypeBean;
|
||||
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.DrugDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.ExpressDetailBean;
|
||||
@ -105,6 +107,20 @@ public interface Apis {
|
||||
@GET("app/departmentbase/listpage-unit")
|
||||
Observable<DepartmentBean> getDepartmentList(@Query("keywords") String key, @Query("page") String page, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 根据部门Id获取部门下下级部门
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/dispatch/list-dispatchdepttree/{deptId}")
|
||||
Observable<List<DepartmentListBean>> getDeptList(@Path("deptId") String deptId, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 根据部门Id获取部门下所有人员
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/dispatch/list-dispatchdeptuser/{deptId}")
|
||||
Observable<List<ChoosePersonListBean>> getPersonListByDeptId(@Path("deptId") String deptId, @Header("token") String token);
|
||||
|
||||
/*======================================================网格员========================================================================================*/
|
||||
|
||||
/**
|
||||
@ -184,7 +200,7 @@ public interface Apis {
|
||||
*/
|
||||
@Headers({"base_url_name:house", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/buildinghouse/listpagebuildinghouse")
|
||||
Observable<HouseListBean> getHouseList(@Query("keywords") String keywords, @Query("page") String page, @Header("token") String token);
|
||||
Observable<HouseListBean> getHouseList(@Query("houseStatus") String status, @Query("keywords") String keywords, @Query("page") String page, @Header("token") String token);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -12,6 +12,7 @@ import retrofit2.http.Body;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Header;
|
||||
import retrofit2.http.Headers;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.PUT;
|
||||
import retrofit2.http.Path;
|
||||
import retrofit2.http.Query;
|
||||
@ -27,35 +28,35 @@ public interface CenterApis {
|
||||
* 获取未受理案件列表
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/report/listpage-unaccepted")
|
||||
@GET("app/taskbase/listpage-task-accept")
|
||||
Observable<IncidentListBean> getIncidentUnAcceptList(@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/report/update-abolish/{reportId}")
|
||||
@PUT("app/taskcompetebase/update-noaccept/{reportId}")
|
||||
Observable<SuccessBean> doIncidentAbolish(@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/report/update-caseregister/{reportId}")
|
||||
@PUT("app/taskcompetebase/update-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/report/update-upreport/{reportId}")
|
||||
@PUT("app/taskcompetebase/update-report/{reportId}")
|
||||
Observable<SuccessBean> doIncidentReport(@Path("reportId") String id, @Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 事件派遣列表
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/distribution/listpage-pending")
|
||||
@GET("app/taskbase/listpage-task-allocate")
|
||||
Observable<IncidentListBean> getIncidentUnDispatchList(@Query("keywords") String key, @Query("page") String page, @Header("token") String token);
|
||||
|
||||
/**
|
||||
@ -64,4 +65,11 @@ public interface CenterApis {
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/distribution/listdept-duty")
|
||||
Observable<List<DeptBean>> getDepartmentList(@Header("token") String token);
|
||||
|
||||
/**
|
||||
* 事件派遣--分拨
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@POST("app/taskcompetebase/save-allocate/{reportId}")
|
||||
Observable<SuccessBean> doSaveDistribution(@Path("reportId") String id, @Body RequestBody body, @Header("token") String token);
|
||||
}
|
||||
|
@ -1,11 +1,20 @@
|
||||
package com.tengshisoft.commonmodule.nets;
|
||||
|
||||
import com.tengshisoft.commonmodule.adapters.IncidentAcceptListAdapter;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentAcceptListBean;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentDisDeptListBean;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentListBean;
|
||||
import com.tengshisoft.commonmodule.beans.SuccessBean;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import okhttp3.RequestBody;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Header;
|
||||
import retrofit2.http.Headers;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.PUT;
|
||||
import retrofit2.http.Path;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
/**
|
||||
@ -16,10 +25,39 @@ import retrofit2.http.Query;
|
||||
*/
|
||||
public interface DeptApis {
|
||||
/**
|
||||
* 事件分拨列表
|
||||
* 事件派遣
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/distribution/listpage-pending")
|
||||
Observable<IncidentListBean> getIncidentDistributionList(@Query("keywords") String key, @Query("page") String page, @Header("token") String token);
|
||||
@GET("app/taskbase/listpage-dispatch")
|
||||
Observable<IncidentDisDeptListBean> 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);
|
||||
|
||||
|
||||
/**
|
||||
* 事件分拨-确认受理
|
||||
*/
|
||||
@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);
|
||||
|
||||
/**
|
||||
* 事件分拨-不予受理
|
||||
*/
|
||||
@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);
|
||||
|
||||
/**
|
||||
* 事件派遣保存
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@POST("app/taskcompetebase/save-dispatch/{distributionUserId}")
|
||||
Observable<SuccessBean> doSaveDistribution(@Path("distributionUserId") String id, @Body RequestBody body, @Header("token") String token);
|
||||
|
||||
}
|
||||
|
BIN
commonmodule/src/main/res/drawable-xhdpi/ic_pwd_cir.png
Normal file
BIN
commonmodule/src/main/res/drawable-xhdpi/ic_pwd_cir.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
commonmodule/src/main/res/drawable-xhdpi/ic_user_center_bg.png
Normal file
BIN
commonmodule/src/main/res/drawable-xhdpi/ic_user_center_bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
80
commonmodule/src/main/res/layout/activity_choose_dept.xml
Normal file
80
commonmodule/src/main/res/layout/activity_choose_dept.xml
Normal file
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/gray_bg"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activitys.department.ChooseDeptActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_bottom_shadow_white"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_current"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="当前选择:"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_choose_items"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/srl_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="5dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pb_loading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminateBehavior="repeat"
|
||||
android:indeterminateDrawable="@drawable/anim_loading" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_empty_data"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/ic_empty_data" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_error_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:clickable="true"
|
||||
android:textColor="@color/black"
|
||||
tools:text="加载数据失败" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
</LinearLayout>
|
58
commonmodule/src/main/res/layout/activity_choose_person.xml
Normal file
58
commonmodule/src/main/res/layout/activity_choose_person.xml
Normal file
@ -0,0 +1,58 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/gray_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/item_base_search" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/srl_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="5dp">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_dics"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pb_loading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminateBehavior="repeat"
|
||||
android:indeterminateDrawable="@drawable/anim_loading" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_empty_data"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/ic_empty_data" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_error_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:clickable="true"
|
||||
android:textColor="@color/black"
|
||||
tools:text="加载数据失败" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
161
commonmodule/src/main/res/layout/activity_user_center.xml
Normal file
161
commonmodule/src/main/res/layout/activity_user_center.xml
Normal file
@ -0,0 +1,161 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/gray_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="220dp"
|
||||
android:background="@drawable/ic_user_center_bg"
|
||||
android:padding="20dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_user_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:background="@drawable/ic_user_default" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:drawablePadding="5dp"
|
||||
android:gravity="center"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="18sp"
|
||||
tools:text="王丽霞" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_functions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="170dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_change_pwd"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/sel_rectangle_btn_white_gray"
|
||||
android:orientation="horizontal"
|
||||
android:padding="14dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_pwd_cir"
|
||||
android:drawableRight="@drawable/ic_arrow_cir"
|
||||
android:drawablePadding="10dp"
|
||||
android:text="修改密码"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@color/gray_bg" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_clear_cache"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/sel_rectangle_btn_white_gray"
|
||||
android:orientation="horizontal"
|
||||
android:padding="14dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_clear_cache"
|
||||
android:drawablePadding="10dp"
|
||||
android:text="清除缓存"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cache_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="3dp"
|
||||
android:textColor="@color/text_80_gray"
|
||||
tools:text="10MB" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@color/gray_bg" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_check_version"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/sel_rectangle_btn_white_gray"
|
||||
android:orientation="horizontal"
|
||||
android:padding="14dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_check_versionl"
|
||||
android:drawablePadding="10dp"
|
||||
android:text="版本更新"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_version_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="3dp"
|
||||
android:textColor="@color/text_80_gray"
|
||||
tools:text="v1.0.1" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_login_out"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/ll_functions"
|
||||
android:layout_margin="30dp"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:text="退出登录"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp" />
|
||||
</RelativeLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
@ -41,9 +41,30 @@
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="170dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:background="@drawable/shp_radius"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_change_pwd"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/sel_rectangle_btn_white_gray"
|
||||
android:orientation="horizontal"
|
||||
android:padding="14dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_pwd_cir"
|
||||
android:drawableRight="@drawable/ic_arrow_cir"
|
||||
android:drawablePadding="10dp"
|
||||
android:text="修改密码"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_clear_cache"
|
||||
android:layout_width="match_parent"
|
||||
@ -74,13 +95,6 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@color/gray_bg" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_check_version"
|
||||
android:layout_width="match_parent"
|
||||
@ -119,8 +133,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/ll_functions"
|
||||
android:layout_margin="30dp"
|
||||
android:background="@drawable/sel_btn_submit_white"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:text="退出登录"
|
||||
android:textColor="@color/black"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp" />
|
||||
</RelativeLayout>
|
37
commonmodule/src/main/res/layout/item_dept_choose.xml
Normal file
37
commonmodule/src/main/res/layout/item_dept_choose.xml
Normal file
@ -0,0 +1,37 @@
|
||||
<?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:layout_margin="5dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:drawableLeft="@drawable/ic_dept_icon"
|
||||
android:drawablePadding="10dp"
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="15sp"
|
||||
tools:text="测试" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_arrow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:src="@drawable/ic_arrow_down_circle_32" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
25
commonmodule/src/main/res/layout/item_dept_sel_layout.xml
Normal file
25
commonmodule/src/main/res/layout/item_dept_sel_layout.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<?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="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/shape_rectangle_white"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#ff353535"
|
||||
android:textSize="18sp"
|
||||
tools:text="部门名称" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_arrow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_arrow_right" />
|
||||
</LinearLayout>
|
@ -0,0 +1,85 @@
|
||||
<?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:layout_margin="5dp"
|
||||
android:background="@drawable/shape_rectangle_white"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#ff353535"
|
||||
android:textSize="14sp"
|
||||
tools:text="派遣描述息" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_dept"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp"
|
||||
tools:text="派遣部门:测试" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp"
|
||||
tools:text="分拨用户:2021-12-21 2:1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_state"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_status_blue"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/text_blue"
|
||||
tools:text="未受理" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_line_dotted"
|
||||
android:layerType="software" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:drawableLeft="@drawable/ic_clock_blue"
|
||||
android:drawablePadding="5dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textColor="#ff1189ff"
|
||||
android:textSize="12sp"
|
||||
tools:text="分拨时间:2021-12-12 20:33:33" />
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,85 @@
|
||||
<?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:layout_margin="5dp"
|
||||
android:background="@drawable/shape_rectangle_white"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_summary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#ff353535"
|
||||
android:textSize="14sp"
|
||||
tools:text="派遣描述息" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_dept"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp"
|
||||
tools:text="派遣部门:测试" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp"
|
||||
tools:text="分拨用户:2021-12-21 2:1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_state"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_status_blue"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/text_blue"
|
||||
tools:text="未受理" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_line_dotted"
|
||||
android:layerType="software" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:drawableLeft="@drawable/ic_clock_blue"
|
||||
android:drawablePadding="5dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textColor="#ff1189ff"
|
||||
android:textSize="12sp"
|
||||
tools:text="分拨时间:2021-12-12 20:33:33" />
|
||||
|
||||
</LinearLayout>
|
37
commonmodule/src/main/res/layout/item_person_sel.xml
Normal file
37
commonmodule/src/main/res/layout/item_person_sel.xml
Normal file
@ -0,0 +1,37 @@
|
||||
<?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:layout_margin="5dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_rectangle_white"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="15sp"
|
||||
tools:text="测试" />
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_check"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="10dp"
|
||||
android:button="@drawable/sel_check_item_cir"
|
||||
tools:checked="false" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -22,8 +22,10 @@ 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.core.beans.ConditionBean;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
import com.tenlionsoft.baselib.core.widget.views.ConditionPopup;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
|
||||
@ -44,9 +46,9 @@ import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2021-9-29
|
||||
* 日期: 2021年10月22日17:21:23
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 房屋列表
|
||||
* 描述: 房屋列表 houseStatus
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_GRID_ACTIVITY_HOUSE_LIST)
|
||||
public class HouseListActivity extends BaseActivity {
|
||||
@ -69,7 +71,8 @@ public class HouseListActivity extends BaseActivity {
|
||||
ImageView mIvEmptyData;
|
||||
@BindView(R2.id.tv_error_hint)
|
||||
TextView mTvErrorHint;
|
||||
|
||||
@BindView(R2.id.tv_search_type)
|
||||
TextView mTvSearchType;
|
||||
private Unbinder mBind;
|
||||
private int mCurrentPage = 1;//当前页数
|
||||
private int mTotalSize;//总数
|
||||
@ -77,7 +80,8 @@ public class HouseListActivity extends BaseActivity {
|
||||
private HouseListAdapter mAdapter;
|
||||
private String mKeywords = "";
|
||||
private int mType;
|
||||
|
||||
private String mSelCondition;
|
||||
private List<ConditionBean> mConditionBeans;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
@ -89,12 +93,17 @@ public class HouseListActivity extends BaseActivity {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("房屋管理");
|
||||
mDatas = new ArrayList<>();
|
||||
initViews();
|
||||
mAdapter = new HouseListAdapter(mActivity, mDatas, 1);
|
||||
mSrlContent.setOnLoadMoreListener(refreshLayout -> loadMore());
|
||||
mSrlContent.setOnRefreshListener(refreshLayout -> doRefresh());
|
||||
mRlvHouses.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvHouses.setAdapter(mAdapter);
|
||||
mAdapter.addOnItemClickListener(this::showDetail);
|
||||
mTvSearchType.setVisibility(View.VISIBLE);
|
||||
mTvSearchType.setOnClickListener(v -> showConditionPop());
|
||||
|
||||
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
setStateView(13);
|
||||
getCommunityList(1);
|
||||
@ -106,6 +115,49 @@ public class HouseListActivity extends BaseActivity {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
private void initViews() {
|
||||
mConditionBeans = new ArrayList<>();
|
||||
ConditionBean bean1 = new ConditionBean();
|
||||
bean1.setName("自住");
|
||||
bean1.setId("1");
|
||||
ConditionBean bean2 = new ConditionBean();
|
||||
bean2.setName("出租");
|
||||
bean2.setId("2");
|
||||
ConditionBean bean3 = new ConditionBean();
|
||||
bean3.setName("闲置");
|
||||
bean3.setId("3");
|
||||
ConditionBean bean4 = new ConditionBean();
|
||||
bean4.setName("待查");
|
||||
bean4.setId("4");
|
||||
mConditionBeans.add(bean1);
|
||||
mConditionBeans.add(bean2);
|
||||
mConditionBeans.add(bean3);
|
||||
mConditionBeans.add(bean4);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 显示条件选择
|
||||
*/
|
||||
private void showConditionPop() {
|
||||
ConditionPopup popup = new ConditionPopup(this, mConditionBeans);
|
||||
popup.addOnCheckChange((bean, ischeck) -> {
|
||||
if (ischeck) {
|
||||
mSelCondition = bean.getName();
|
||||
mTvSearchType.setText(mSelCondition);
|
||||
} else {
|
||||
mSelCondition = "";
|
||||
mTvSearchType.setText("筛选");
|
||||
}
|
||||
doRefresh();
|
||||
popup.dismiss();
|
||||
});
|
||||
popup.showPopupWindow(mTvSearchType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示详情
|
||||
*/
|
||||
@ -140,7 +192,7 @@ public class HouseListActivity extends BaseActivity {
|
||||
mCurrentPage = currentPage;
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.getHouseList(mKeywords, mCurrentPage + "", UserLgUtils.getToken())
|
||||
.getHouseList(mSelCondition, mKeywords, mCurrentPage + "", UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<HouseListBean>() {
|
||||
@ -190,6 +242,7 @@ public class HouseListActivity extends BaseActivity {
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.finishRefresh();
|
||||
setStateView(16);
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ public class SearchHouseByPersonActivity extends BaseActivity {
|
||||
mCurrentPage = currentPage;
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.getHouseList(mKeywords, mCurrentPage + "", UserLgUtils.getToken())
|
||||
.getHouseList("", mKeywords, mCurrentPage + "", UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<HouseListBean>() {
|
||||
|
@ -57,6 +57,7 @@ import com.tenlionsoft.baselib.core.widget.base.AddPhotoAdapter;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
import com.tenlionsoft.baselib.core.widget.videorecord.AudioRecordButton;
|
||||
import com.tenlionsoft.baselib.core.widget.videorecord.MediaManager;
|
||||
import com.tenlionsoft.baselib.core.widget.views.AreaChooseDialog;
|
||||
import com.tenlionsoft.baselib.core.widget.views.ButtomDialogView;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
@ -104,10 +105,6 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
SwitchCompat mSwIsSelf;
|
||||
@BindView(R2.id.tv_area_3)
|
||||
TextView mTvArea3;
|
||||
@BindView(R2.id.tv_area_4)
|
||||
TextView mTvArea4;
|
||||
@BindView(R2.id.tv_area_5)
|
||||
TextView mTvArea5;
|
||||
@BindView(R2.id.tv_address_sel)
|
||||
TextView mTvAddressSel;
|
||||
@BindView(R2.id.tmv_map)
|
||||
@ -155,17 +152,7 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
private AddPhotoBean mCurrentBean;
|
||||
private String mPhotoIds = "";//相片Id
|
||||
private String mPicPath;
|
||||
private OptionsPickerView mArea3Picker;
|
||||
private OptionsPickerView mArea4Picker;
|
||||
private OptionsPickerView mArea5Picker;
|
||||
|
||||
private AreaBean mSelArea3;//三级地区
|
||||
private AreaBean mSelArea4;//四级地区
|
||||
private AreaBean mSelArea5;//五级地区
|
||||
|
||||
private List<AreaBean> mArea3;
|
||||
private List<AreaBean> mArea4;
|
||||
private List<AreaBean> mArea5;
|
||||
private String mAudioPath;//录音文件路径
|
||||
private String mAudioId = "";//录音ID
|
||||
|
||||
@ -174,6 +161,9 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
private String mSelGridId = "123";//网格ID
|
||||
private int mIsSelf = 0;//是否自处理
|
||||
private CaseComponentListBean.RowsBean mSelComponentBean;//部件
|
||||
private String mSelAreaCode;
|
||||
private String mSelAreaId;
|
||||
private String mSelAreaName;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
@ -213,9 +203,7 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
}
|
||||
});
|
||||
mTvType.setOnClickListener(v -> onShowType());
|
||||
mTvArea3.setOnClickListener(v -> onShowArea3());
|
||||
mTvArea4.setOnClickListener(v -> onShowArea4());
|
||||
mTvArea5.setOnClickListener(v -> onShowArea5());
|
||||
mTvArea3.setOnClickListener(v -> onShowArea());
|
||||
mIvDelVideo.setVisibility(View.GONE);
|
||||
mIvDelVideo.setOnClickListener(v -> {
|
||||
mVideoPath = "";
|
||||
@ -325,6 +313,24 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示地区选择
|
||||
*/
|
||||
private void onShowArea() {
|
||||
AreaChooseDialog dialog = new AreaChooseDialog
|
||||
.DialogBuilder(mActivity)
|
||||
.setDefault(true)
|
||||
.build();
|
||||
dialog.addOnChoseListener((names, id, code) -> {
|
||||
mSelAreaCode = code;
|
||||
mSelAreaId = id;
|
||||
mSelAreaName = names;
|
||||
mTvArea3.setText(names);
|
||||
dialog.dismiss();
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验参数
|
||||
*/
|
||||
@ -341,8 +347,8 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
ToastUtils.show("请选择事件类型");
|
||||
return false;
|
||||
}
|
||||
if (mSelArea3 == null) {
|
||||
ToastUtils.show("请选择三级地区");
|
||||
if (TextUtils.isEmpty(mSelAreaCode)) {
|
||||
ToastUtils.show("请选择事发地区");
|
||||
return false;
|
||||
}
|
||||
String address = mEtAddress.getText().toString().trim();
|
||||
@ -371,22 +377,8 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
bean.setCaseTypeCode2(mSelType2);
|
||||
bean.setCaseTypeName2(mSelType2Name);
|
||||
bean.setIsSelf(mIsSelf + "");
|
||||
String area = PathConfig.DEFAULT_AREA_1_Name + " / " + PathConfig.DEFAULT_AREA_2_Name + " / ";
|
||||
if (mSelArea3 != null) {
|
||||
area += mSelArea3.getAreaName() + " / ";
|
||||
bean.setReportAreaCode(mSelArea3.getAreaCode());
|
||||
bean.setReportAreaName(area);
|
||||
}
|
||||
if (mSelArea4 != null) {
|
||||
area += mSelArea4.getAreaName() + " / ";
|
||||
bean.setReportAreaCode(mSelArea4.getAreaCode());
|
||||
bean.setReportAreaName(area);
|
||||
}
|
||||
if (mSelArea5 != null) {
|
||||
area += mSelArea5.getAreaName();
|
||||
bean.setReportAreaCode(mSelArea5.getAreaCode());
|
||||
bean.setReportAreaName(area);
|
||||
}
|
||||
bean.setReportAreaCode(mSelAreaCode);
|
||||
bean.setReportAreaName(mSelAreaName.replaceAll(",", " / "));
|
||||
String reportAreaName = bean.getReportAreaName();
|
||||
if (reportAreaName.endsWith(" / ")) {
|
||||
reportAreaName = reportAreaName.substring(0, reportAreaName.length() - 3);
|
||||
@ -730,146 +722,6 @@ public class IncidentReportActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 三级地区
|
||||
*/
|
||||
private void onShowArea3() {
|
||||
hideSoftKeyboard();
|
||||
if (mArea3 != null && mArea3.size() > 0) {
|
||||
if (mArea3Picker == null) {
|
||||
mArea3Picker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
|
||||
mSelArea3 = mArea3.get(o1);
|
||||
mTvArea3.setText(mSelArea3.getAreaName());
|
||||
|
||||
mTvArea4.setText("");
|
||||
mSelArea4 = null;
|
||||
mArea4 = null;
|
||||
|
||||
mTvArea5.setText("");
|
||||
mSelArea5 = null;
|
||||
mArea5 = null;
|
||||
})
|
||||
.setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
|
||||
}
|
||||
mArea3Picker.setPicker(mArea3);
|
||||
mArea3Picker.show();
|
||||
} else {
|
||||
getAreaDicList(PathConfig.DEFAULT_AREA_2, 3);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 四级地区
|
||||
*/
|
||||
private void onShowArea4() {
|
||||
hideSoftKeyboard();
|
||||
if (mSelArea3 == null) {
|
||||
ToastUtils.show("请选择三级地区");
|
||||
} else {
|
||||
if (mArea4 != null && mArea4.size() > 0) {
|
||||
if (mArea4Picker == null) {
|
||||
mArea4Picker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
|
||||
mSelArea4 = mArea4.get(o1);
|
||||
mTvArea4.setText(mSelArea4.getAreaName());
|
||||
mTvArea5.setText("");
|
||||
mSelArea5 = null;
|
||||
mArea5 = null;
|
||||
})
|
||||
.setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
}
|
||||
mArea4Picker.setPicker(mArea4);
|
||||
mArea4Picker.show();
|
||||
} else {
|
||||
getAreaDicList(mSelArea3.getAreaId(), 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 五级地区
|
||||
*/
|
||||
private void onShowArea5() {
|
||||
hideSoftKeyboard();
|
||||
if (mSelArea4 == null) {
|
||||
ToastUtils.show("请选择四级地区");
|
||||
} else {
|
||||
if (mArea5 != null && mArea5.size() > 0) {
|
||||
if (mArea5Picker == null) {
|
||||
mArea5Picker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
|
||||
mSelArea5 = mArea5.get(o1);
|
||||
mTvArea5.setText(mSelArea5.getAreaName());
|
||||
})
|
||||
.setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
}
|
||||
mArea5Picker.setPicker(mArea5);
|
||||
mArea5Picker.show();
|
||||
} else {
|
||||
getAreaDicList(mSelArea4.getAreaId(), 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取地区数据
|
||||
*/
|
||||
private void getAreaDicList(String pId, int type) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.getAreaListByPid(pId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<AreaBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<AreaBean> areaList) {
|
||||
dialog.dismiss();
|
||||
if (areaList.size() > 0) {
|
||||
if (type == 3) {
|
||||
//三级地区
|
||||
mArea3 = areaList;
|
||||
onShowArea3();
|
||||
} else if (type == 4) {
|
||||
mArea4 = areaList;
|
||||
onShowArea4();
|
||||
} else if (type == 5) {
|
||||
mArea5 = areaList;
|
||||
onShowArea5();
|
||||
}
|
||||
} else {
|
||||
ToastUtils.show("暂无数据");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
|
@ -130,51 +130,16 @@
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="三级地区" />
|
||||
android:text="事发地区" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area_3"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择三级地区" />
|
||||
android:hint="请选择事发地区" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="四级地区" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area_4"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择四级地区" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="五级地区" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area_5"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择五级地区" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
|
@ -40,6 +40,7 @@ dependencies {
|
||||
implementation project(':baselib')
|
||||
implementation project(':modulemap')
|
||||
implementation project(':chatmodule')
|
||||
implementation project(':commonmodule')
|
||||
implementation 'androidx.appcompat:appcompat:1.3.1'
|
||||
implementation 'com.google.android.material:material:1.2.1'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
|
@ -52,12 +52,12 @@ public class SupervisionMainFragment extends BaseFragment {
|
||||
LinearLayout mLlPlan;
|
||||
private Unbinder mBind;
|
||||
private List<FuncBean> mFuncs = new ArrayList<>();
|
||||
private String[] mBtnStrs = new String[]{"部门处理", "下派跟踪", "知识库", "统计分析"};
|
||||
private String[] mBtnStrs = new String[]{"事件派遣", "下派跟踪", "知识库", "统计分析", "事件受理"};
|
||||
private int[] mBtnIds = new int[]{
|
||||
R.drawable.ic_case_report,
|
||||
R.drawable.ic_case_record,
|
||||
R.drawable.ic_case_dispose,
|
||||
R.drawable.ic_work_path};
|
||||
R.drawable.ic_work_path, R.drawable.ic_case_dispose};
|
||||
private FunctionNumAdapter mNumAdapter;
|
||||
|
||||
@Override
|
||||
@ -170,11 +170,16 @@ public class SupervisionMainFragment extends BaseFragment {
|
||||
*/
|
||||
private void choosePage(String text) {
|
||||
switch (text) {
|
||||
case "部门处理":
|
||||
case "事件派遣":
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_SUPERVISION_INCIDENT_DISTRIBUTION_LIST_ACTIVITY)
|
||||
.navigation();
|
||||
break;
|
||||
case "事件受理":
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_SUPERVISION_INCIDENT_ACCEPT_LIST_ACTIVITY)
|
||||
.navigation();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -3,8 +3,10 @@
|
||||
package="com.tengshisoft.supervisionmodule">
|
||||
|
||||
<application>
|
||||
<activity android:name=".activitys.IncidentDistributionDetailActivity"></activity>
|
||||
<activity android:name=".activitys.IncidentDistributionListActivity" />
|
||||
<activity android:name=".activitys.IncidentAcceptDeptDetailActivity"/>
|
||||
<activity android:name=".activitys.IncidentAcceptDeptListActivity" />
|
||||
<activity android:name=".activitys.IncidentDistributionDeptDetailActivity" />
|
||||
<activity android:name=".activitys.IncidentDistributionDeptListActivity" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -1,7 +1,7 @@
|
||||
package com.tengshisoft.supervisionmodule.activitys;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.app.ProgressDialog;
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
@ -11,8 +11,6 @@ import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ZoomControls;
|
||||
|
||||
@ -29,10 +27,11 @@ import com.baidu.mapapi.map.TextureMapView;
|
||||
import com.baidu.mapapi.model.LatLng;
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.tengshisoft.commonmodule.beans.DeptBean;
|
||||
import com.tengshisoft.commonmodule.beans.DispatchBean;
|
||||
import com.tengshisoft.commonmodule.beans.AcceptSaveBean;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.SuccessBean;
|
||||
import com.tengshisoft.commonmodule.nets.Apis;
|
||||
import com.tengshisoft.commonmodule.nets.DeptApis;
|
||||
import com.tengshisoft.supervisionmodule.R;
|
||||
import com.tengshisoft.supervisionmodule.R2;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
@ -42,11 +41,11 @@ import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseShowPhotoAdapter;
|
||||
import com.tenlionsoft.baselib.core.widget.videorecord.MediaManager;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import androidx.core.widget.NestedScrollView;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
@ -64,17 +63,17 @@ import okhttp3.RequestBody;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2021年10月19日17:13:15
|
||||
* 日期: 2021年10月23日14:23:47
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 事件分拨详情
|
||||
* 描述: 事件受理详情
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_SUPERVISION_INCIDENT_DISTRIBUTION_DETAIL_ACTIVITY)
|
||||
public class IncidentDistributionDetailActivity extends BaseActivity {
|
||||
@Route(path = PathConfig.PATH_MODULE_SUPERVISION_INCIDENT_ACCEPT_DETAIL_ACTIVITY)
|
||||
public class IncidentAcceptDeptDetailActivity extends BaseActivity {
|
||||
@BindView(R2.id.tv_grid)
|
||||
TextView mTvGrid;
|
||||
@BindView(R2.id.tv_component)
|
||||
TextView mTvComponent;
|
||||
@BindView(R2.id.tv_type)
|
||||
@BindView(com.tenlionsoft.baselib.R2.id.tv_type)
|
||||
TextView mTvType;
|
||||
@BindView(R2.id.sw_is_self)
|
||||
SwitchCompat mSwIsSelf;
|
||||
@ -104,38 +103,144 @@ public class IncidentDistributionDetailActivity extends BaseActivity {
|
||||
LinearLayout mLlVoice;
|
||||
@BindView(R2.id.nsv_content)
|
||||
NestedScrollView mNsvContent;
|
||||
@BindView(R2.id.et_content)
|
||||
EditText mEtContent;
|
||||
@BindView(R2.id.btn_confirm)
|
||||
Button mBtnConfirm;
|
||||
@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;
|
||||
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_incident_distribution_detail;
|
||||
return R.layout.activity_incident_accept_dept_detail;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("事件派遣");
|
||||
mTvBaseTitle.setText("事件受理");
|
||||
mId = getIntent().getStringExtra("id");
|
||||
mTaskId = getIntent().getStringExtra("taskId");
|
||||
mLevel = getIntent().getIntExtra("level", -4);
|
||||
mReportId = getIntent().getStringExtra("reportId");
|
||||
initMap();
|
||||
initViews();
|
||||
getDetailData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化视图
|
||||
*/
|
||||
private void initViews() {
|
||||
mBtnAbolish.setOnClickListener(v -> doAbolish());
|
||||
mBtnConfirm.setOnClickListener(v -> doConfirm());
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认受理
|
||||
*/
|
||||
private void doConfirm() {
|
||||
if (checkParams()) {
|
||||
RequestBody body = buildParams();
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "处理中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(DeptApis.class)
|
||||
.doIncidentAccept(mId, body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable @org.jetbrains.annotations.Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
public void onNext(@NonNull SuccessBean successBean) {
|
||||
dialog.dismiss();
|
||||
ToastUtils.show("处理成功");
|
||||
setResult(13);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 不予受理
|
||||
*/
|
||||
private void doAbolish() {
|
||||
if (checkParams()) {
|
||||
RequestBody body = buildParams();
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "处理中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(DeptApis.class)
|
||||
.doIncidentAbolish(mId, body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull SuccessBean successBean) {
|
||||
dialog.dismiss();
|
||||
ToastUtils.show("处理成功");
|
||||
setResult(13);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private boolean checkParams() {
|
||||
String content = mEtContent.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
ToastUtils.show("请输入分拨描述");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private RequestBody buildParams() {
|
||||
AcceptSaveBean bean = new AcceptSaveBean();
|
||||
bean.setTaskId(mTaskId);
|
||||
String content = mEtContent.getText().toString().trim();
|
||||
bean.setSummary(content);
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(bean);
|
||||
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
return requestBody;
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
@ -166,7 +271,7 @@ public class IncidentDistributionDetailActivity extends BaseActivity {
|
||||
private void getDetailData() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.getIncidentDetailById(mId, UserLgUtils.getToken())
|
||||
.getIncidentDetailById(mReportId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<IncidentDetailBean>() {
|
||||
@ -297,21 +402,4 @@ public class IncidentDistributionDetailActivity extends BaseActivity {
|
||||
MapStatusUpdate u = MapStatusUpdateFactory.newMapStatus(ms);
|
||||
mBaiduMap.setMapStatus(u);
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验参数
|
||||
*/
|
||||
private boolean checkParams() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建提交参数
|
||||
*/
|
||||
private RequestBody buildParams() {
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(null);
|
||||
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
return requestBody;
|
||||
}
|
||||
}
|
@ -0,0 +1,260 @@
|
||||
package com.tengshisoft.supervisionmodule.activitys;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
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.beans.IncidentAcceptListBean;
|
||||
import com.tengshisoft.commonmodule.nets.DeptApis;
|
||||
import com.tengshisoft.supervisionmodule.R;
|
||||
import com.tengshisoft.supervisionmodule.R2;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
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.UserLgUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
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.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2021年10月23日14:17:06
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:部门端-事件受理
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_SUPERVISION_INCIDENT_ACCEPT_LIST_ACTIVITY)
|
||||
public class IncidentAcceptDeptListActivity extends BaseActivity {
|
||||
@BindView(R2.id.et_base_search_content)
|
||||
EditText mEtBaseSearchContent;
|
||||
@BindView(R2.id.iv_base_clear)
|
||||
ImageView mIvBaseClear;
|
||||
@BindView(R2.id.btn_base_search)
|
||||
Button mBtnBaseSearch;
|
||||
@BindView(R2.id.ll_base_search_content)
|
||||
LinearLayout mLlBaseSearchContent;
|
||||
@BindView(R2.id.rlv_components)
|
||||
RecyclerView mRlvComponents;
|
||||
@BindView(R2.id.srl_content)
|
||||
SmartRefreshLayout mSrlContent;
|
||||
@BindView(R2.id.pb_loading)
|
||||
ProgressBar mPbLoading;
|
||||
@BindView(R2.id.iv_empty_data)
|
||||
ImageView mIvEmptyData;
|
||||
@BindView(R2.id.tv_error_hint)
|
||||
TextView mTvErrorHint;
|
||||
private Unbinder mBind;
|
||||
private List<IncidentAcceptListBean.RowsBean> mDatas;
|
||||
private IncidentAcceptListAdapter mAdapter;
|
||||
private int mCurrentPage = 1;
|
||||
private String mKeywords = "";
|
||||
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_incident_accept_dept_list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("事件受理");
|
||||
mEtBaseSearchContent.setHint("请输入事件编码(分类名称)");
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mDatas = new ArrayList<>();
|
||||
mAdapter = new IncidentAcceptListAdapter(mActivity, mDatas);
|
||||
mRlvComponents.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvComponents.setAdapter(mAdapter);
|
||||
mSrlContent.setOnRefreshListener(v -> doRefresh());
|
||||
mSrlContent.setOnLoadMoreListener(v -> doLoadMore());
|
||||
setStateView(13);
|
||||
getIncidentAcceptList(mCurrentPage);
|
||||
mBtnBaseSearch.setOnClickListener(v -> doSearch());
|
||||
mIvBaseClear.setOnClickListener(v -> {
|
||||
mKeywords = "";
|
||||
mEtBaseSearchContent.setText("");
|
||||
doRefresh();
|
||||
});
|
||||
mAdapter.addOnItemClickListener(v -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_SUPERVISION_INCIDENT_ACCEPT_DETAIL_ACTIVITY)
|
||||
.withString("reportId", v.getReportId())
|
||||
.withString("taskId", v.getTaskId())
|
||||
.withString("id", v.getDistributionUserId())
|
||||
.navigation(mActivity, 12));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取待派遣的事件
|
||||
*/
|
||||
private void getIncidentAcceptList(int currentPage) {
|
||||
mCurrentPage = currentPage;
|
||||
RetrofitManager.getInstance()
|
||||
.create(DeptApis.class)
|
||||
.getIncidentAcceptList(mKeywords, mCurrentPage + "", UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<IncidentAcceptListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull IncidentAcceptListBean communityListBean) {
|
||||
if (communityListBean.getRows() != null && communityListBean.getRows().size() > 0) {
|
||||
++mCurrentPage;
|
||||
if (currentPage == 1) {
|
||||
mDatas.clear();
|
||||
mDatas.addAll(communityListBean.getRows());
|
||||
} else {
|
||||
mDatas.addAll(communityListBean.getRows());
|
||||
}
|
||||
setStateView(14);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mSrlContent.finishRefresh();
|
||||
if (mDatas.size() >= communityListBean.getTotal()) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(true);
|
||||
} else {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(false);
|
||||
}
|
||||
} else {
|
||||
if (currentPage > 1) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(true);
|
||||
setStateView(14);
|
||||
} else {
|
||||
if (TextUtils.isEmpty(mKeywords)) {
|
||||
//无数据
|
||||
setStateView(15);
|
||||
} else {
|
||||
setStateView(15);
|
||||
ToastUtils.show("未查询到相关内容");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.finishRefresh();
|
||||
ExceptionHandler.handleException(e);
|
||||
setStateView(16);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable @org.jetbrains.annotations.Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == 12) {
|
||||
if (resultCode == 13) {
|
||||
doRefresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//加载更多
|
||||
private void doLoadMore() {
|
||||
getIncidentAcceptList(mCurrentPage);
|
||||
}
|
||||
|
||||
//刷新
|
||||
private void doRefresh() {
|
||||
mDatas.clear();
|
||||
mAdapter.setData(mDatas);
|
||||
getIncidentAcceptList(1);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private void doSearch() {
|
||||
String searchContent = mEtBaseSearchContent.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(searchContent)) {
|
||||
hideSoftKeyboard();
|
||||
setStateView(13);
|
||||
mKeywords = searchContent;
|
||||
mCurrentPage = 1;
|
||||
getIncidentAcceptList(mCurrentPage);
|
||||
|
||||
} else {
|
||||
ToastUtils.show("请输入要查询的内容");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据状态显示
|
||||
* 12 默认
|
||||
* 13 搜索中
|
||||
* 14 搜索完成有数据
|
||||
* 15 搜索完成没有数据
|
||||
* 16 搜索失败
|
||||
*
|
||||
* @param state
|
||||
*/
|
||||
private void setStateView(int state) {
|
||||
switch (state) {
|
||||
case 12://默认
|
||||
case 15://默认
|
||||
mPbLoading.setVisibility(View.GONE);
|
||||
mSrlContent.setVisibility(View.GONE);
|
||||
mIvEmptyData.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setText("暂无数据");
|
||||
break;
|
||||
case 13://搜索中
|
||||
mPbLoading.setVisibility(View.VISIBLE);
|
||||
mSrlContent.setVisibility(View.GONE);
|
||||
mIvEmptyData.setVisibility(View.GONE);
|
||||
mTvErrorHint.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setText("加载中...");
|
||||
break;
|
||||
case 14://搜索完成有数据
|
||||
mPbLoading.setVisibility(View.GONE);
|
||||
mSrlContent.setVisibility(View.VISIBLE);
|
||||
mIvEmptyData.setVisibility(View.GONE);
|
||||
mTvErrorHint.setVisibility(View.GONE);
|
||||
break;
|
||||
case 16://搜索失败
|
||||
mPbLoading.setVisibility(View.GONE);
|
||||
mSrlContent.setVisibility(View.GONE);
|
||||
mIvEmptyData.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setVisibility(View.VISIBLE);
|
||||
mTvErrorHint.setText("加载失败,请稍后重试");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,468 @@
|
||||
package com.tengshisoft.supervisionmodule.activitys;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ZoomControls;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.baidu.mapapi.map.BaiduMap;
|
||||
import com.baidu.mapapi.map.BitmapDescriptor;
|
||||
import com.baidu.mapapi.map.BitmapDescriptorFactory;
|
||||
import com.baidu.mapapi.map.MapStatus;
|
||||
import com.baidu.mapapi.map.MapStatusUpdate;
|
||||
import com.baidu.mapapi.map.MapStatusUpdateFactory;
|
||||
import com.baidu.mapapi.map.MarkerOptions;
|
||||
import com.baidu.mapapi.map.TextureMapView;
|
||||
import com.baidu.mapapi.model.LatLng;
|
||||
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
||||
import com.bigkoo.pickerview.view.TimePickerView;
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.tengshisoft.commonmodule.beans.ChoosePersonListBean;
|
||||
import com.tengshisoft.commonmodule.beans.DepartmentListBean;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.SaveDeptDisBean;
|
||||
import com.tengshisoft.commonmodule.beans.SuccessBean;
|
||||
import com.tengshisoft.commonmodule.nets.Apis;
|
||||
import com.tengshisoft.commonmodule.nets.DeptApis;
|
||||
import com.tengshisoft.supervisionmodule.R;
|
||||
import com.tengshisoft.supervisionmodule.R2;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseShowPhotoAdapter;
|
||||
import com.tenlionsoft.baselib.core.widget.videorecord.MediaManager;
|
||||
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 org.aspectj.lang.annotation.Around;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import androidx.core.widget.NestedScrollView;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
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.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2021年10月19日17:13:15
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 事件分拨详情
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_SUPERVISION_INCIDENT_DISTRIBUTION_DETAIL_ACTIVITY)
|
||||
public class IncidentDistributionDeptDetailActivity extends BaseActivity {
|
||||
@BindView(R2.id.tv_grid)
|
||||
TextView mTvGrid;
|
||||
@BindView(R2.id.tv_component)
|
||||
TextView mTvComponent;
|
||||
@BindView(R2.id.tv_type)
|
||||
TextView mTvType;
|
||||
@BindView(R2.id.sw_is_self)
|
||||
SwitchCompat mSwIsSelf;
|
||||
@BindView(R2.id.tv_area_5)
|
||||
TextView mTvArea5;
|
||||
@BindView(R2.id.tv_address)
|
||||
TextView mTvAddress;
|
||||
@BindView(R2.id.tmv_map)
|
||||
TextureMapView mTmvMap;
|
||||
@BindView(R2.id.tv_content)
|
||||
TextView mTvContent;
|
||||
@BindView(R2.id.rlv_photos)
|
||||
RecyclerView mRlvPhotos;
|
||||
@BindView(R2.id.tv_photo_hint)
|
||||
TextView mTvPhotoHint;
|
||||
@BindView(R2.id.iv_play_video)
|
||||
ImageView mIvPlayVideo;
|
||||
@BindView(R2.id.ll_video)
|
||||
LinearLayout mLlVideo;
|
||||
@BindView(R2.id.tv_video_hint)
|
||||
TextView mTvVideoHint;
|
||||
@BindView(R2.id.tv_voice)
|
||||
TextView mTvVoice;
|
||||
@BindView(R2.id.tv_voice_anim)
|
||||
TextView mTvVoiceAnim;
|
||||
@BindView(R2.id.ll_voice)
|
||||
LinearLayout mLlVoice;
|
||||
@BindView(R2.id.nsv_content)
|
||||
NestedScrollView mNsvContent;
|
||||
@BindView(R2.id.et_summary)
|
||||
EditText mEtSummary;
|
||||
@BindView(R2.id.tv_time)
|
||||
TextView mTvTime;
|
||||
@BindView(R2.id.tv_dept)
|
||||
TextView mTvDept;
|
||||
@BindView(R2.id.tv_user)
|
||||
TextView mTvUser;
|
||||
@BindView(R2.id.btn_submit)
|
||||
Button mBtnSubmit;
|
||||
private Unbinder mBind;
|
||||
private String mId;
|
||||
private String mTaskId;
|
||||
private BaiduMap mBaiduMap;
|
||||
private BitmapDescriptor mBitMap;
|
||||
|
||||
private String mSelDeptId;
|
||||
private String mSelDeptName;
|
||||
private String mSelUserId;
|
||||
private String mSelUserName;
|
||||
private String mDeptId;
|
||||
private String mDeptName;
|
||||
private DepartmentListBean mSelDeptBean;
|
||||
private ChoosePersonListBean mSelUser;
|
||||
private String mReportId;
|
||||
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_incident_distribution_detail;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("事件派遣");
|
||||
mReportId = getIntent().getStringExtra("reportId");
|
||||
mTaskId = getIntent().getStringExtra("taskId");
|
||||
mId = getIntent().getStringExtra("id");
|
||||
mDeptId = getIntent().getStringExtra("deptId");
|
||||
mDeptName = getIntent().getStringExtra("deptName");
|
||||
initMap();
|
||||
initViews();
|
||||
getDetailData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化视图
|
||||
*/
|
||||
private void initViews() {
|
||||
mTvTime.setOnClickListener(v -> onShowTime());
|
||||
//部门选择
|
||||
mTvDept.setOnClickListener(v -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_SEL_DEPT)
|
||||
.withString("deptId", mDeptId)
|
||||
.withString("deptName", mDeptName)
|
||||
.navigation(mActivity, 12));
|
||||
|
||||
//人员选择
|
||||
mTvUser.setOnClickListener(v -> {
|
||||
if (TextUtils.isEmpty(mSelDeptId)) {
|
||||
ToastUtils.show("请选择处理部门");
|
||||
} else {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_SEL_PERSON)
|
||||
.withString("id", mSelDeptId)
|
||||
.withBoolean("isSingle", true)
|
||||
.navigation(mActivity, 13);
|
||||
}
|
||||
});
|
||||
mBtnSubmit.setOnClickListener(v -> doConfirm());
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
private void doConfirm() {
|
||||
if (checkParams()) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中...");
|
||||
dialog.show();
|
||||
RequestBody body = buildParams();
|
||||
RetrofitManager.getInstance()
|
||||
.create(DeptApis.class)
|
||||
.doSaveDistribution(mId, body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull SuccessBean successBean) {
|
||||
dialog.dismiss();
|
||||
ToastUtils.show("派遣成功");
|
||||
setResult(13);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void onShowTime() {
|
||||
hideSoftKeyboard();
|
||||
TimePickerView mTimePickerView = new TimePickerBuilder(mActivity, (date, v) -> mTvTime.setText(TimeUtils.date2String(date)))
|
||||
.setTitleText("请选日期")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setType(new boolean[]{true, true, true, true, true, true})
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mTimePickerView.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable @org.jetbrains.annotations.Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode == 12) {
|
||||
//部门选择
|
||||
if (resultCode == 15) {
|
||||
mSelDeptBean = (DepartmentListBean) data.getSerializableExtra("bean");
|
||||
mTvDept.setText(mSelDeptBean.getName());
|
||||
mSelDeptId = mSelDeptBean.getId();
|
||||
mSelDeptName = mSelDeptBean.getName();
|
||||
}
|
||||
} else if (requestCode == 13) {
|
||||
//人员选择
|
||||
if (resultCode == 13) {
|
||||
mSelUser = (ChoosePersonListBean) data.getSerializableExtra("bean");
|
||||
mSelUserId = mSelUser.getUserId();
|
||||
mSelUserName = mSelUser.getUserName();
|
||||
mTvUser.setText(mSelUserName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
private void initMap() {
|
||||
mTmvMap.showZoomControls(false);//缩放控件
|
||||
mTmvMap.showScaleControl(false);//比例尺
|
||||
mBaiduMap = mTmvMap.getMap();
|
||||
mBaiduMap.setMapType(BaiduMap.MAP_TYPE_NORMAL);
|
||||
mBaiduMap.setMyLocationEnabled(true);
|
||||
View childAt = mTmvMap.getChildAt(1);
|
||||
if (childAt != null && (childAt instanceof ImageView || childAt instanceof ZoomControls)) {
|
||||
childAt.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
mTmvMap.getChildAt(0).setOnTouchListener((View v, MotionEvent event) -> {
|
||||
if (event.getAction() == MotionEvent.ACTION_UP) {
|
||||
mNsvContent.requestDisallowInterceptTouchEvent(false);
|
||||
} else {
|
||||
mNsvContent.requestDisallowInterceptTouchEvent(true);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
moveMapToCenter(new LatLng(PathConfig.LA, PathConfig.LO), 14);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
*/
|
||||
private void getDetailData() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.getIncidentDetailById(mReportId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<IncidentDetailBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull IncidentDetailBean incidentListBean) {
|
||||
setDataToView(incidentListBean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
ExceptionHandler.handleException(e);
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 回显
|
||||
*/
|
||||
private void setDataToView(IncidentDetailBean b) {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mTvGrid.setText(b.getBGId());
|
||||
mTvComponent.setText(b.getCasePartsObjName());
|
||||
mTvType.setText(b.getCaseTypeName1() + "/" + b.getCaseTypeName2());
|
||||
if (b.getIsSelf() == 0) {
|
||||
mSwIsSelf.setChecked(false);
|
||||
} else {
|
||||
mSwIsSelf.setChecked(true);
|
||||
}
|
||||
mTvArea5.setText(b.getReportAreaName());
|
||||
mTvAddress.setText(b.getReportAddress());
|
||||
mTvContent.setText(b.getReportContent());
|
||||
double lat = Double.parseDouble(b.getReportLat());
|
||||
double lng = Double.parseDouble(b.getReportLng());
|
||||
|
||||
moveMapToCenter(new LatLng(lat, lng), 18);
|
||||
if (mBitMap == null) {
|
||||
mBitMap = BitmapDescriptorFactory.fromResource(R.drawable.ic_map_location_marker);
|
||||
}
|
||||
MarkerOptions markerOptions = new MarkerOptions()
|
||||
.position(new LatLng(lat, lng))//mark出现的位置
|
||||
.icon(mBitMap) //mark图标
|
||||
.draggable(false)//mark可拖拽
|
||||
.animateType(MarkerOptions.MarkerAnimateType.none);
|
||||
mBaiduMap.addOverlay(markerOptions);
|
||||
if (!TextUtils.isEmpty(b.getReportPhotos())) {
|
||||
//有图片
|
||||
mTvPhotoHint.setVisibility(View.GONE);
|
||||
mRlvPhotos.setVisibility(View.VISIBLE);
|
||||
|
||||
mRlvPhotos.setVisibility(View.VISIBLE);
|
||||
mTvPhotoHint.setVisibility(View.GONE);
|
||||
String[] doorIds = b.getReportPhotos().split(",");
|
||||
ArrayList<String> paths = new ArrayList<>();
|
||||
BaseShowPhotoAdapter mAdapter = new BaseShowPhotoAdapter(mActivity, paths);
|
||||
mRlvPhotos.setLayoutManager(new GridLayoutManager(mActivity, 4));
|
||||
mRlvPhotos.setAdapter(mAdapter);
|
||||
mAdapter.setOnItemClickListener((data, pos) -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_BASELIB_SHOW_IMG)
|
||||
.withStringArrayList("imgUrls", paths)
|
||||
.withInt("curItem", pos)
|
||||
.navigation());
|
||||
for (String doorId : doorIds) {
|
||||
if (!TextUtils.isEmpty(doorId)) {
|
||||
paths.add(BaseUrlApi.BASE_IMG_URL + doorId);
|
||||
}
|
||||
}
|
||||
mAdapter.setData(paths);
|
||||
} else {
|
||||
//没有图片
|
||||
mTvPhotoHint.setVisibility(View.VISIBLE);
|
||||
mRlvPhotos.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(b.getReportVideo())) {
|
||||
//有视频
|
||||
mLlVideo.setVisibility(View.VISIBLE);
|
||||
mTvVideoHint.setVisibility(View.GONE);
|
||||
mLlVideo.setOnClickListener(v -> //播放视频
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_PLAYER_SIMPLE_VIDEO)
|
||||
.withString("url", BaseUrlApi.BASE_IMG_URL + b.getReportVideo())
|
||||
.withString("title", "事件视频")
|
||||
.navigation());
|
||||
} else {
|
||||
//没有视频
|
||||
mLlVideo.setVisibility(View.GONE);
|
||||
mTvVideoHint.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (!TextUtils.isEmpty(b.getReportAudio())) {
|
||||
Drawable drawable = getResources().getDrawable(R.drawable.anim_yuyin_sign);
|
||||
mTvVoiceAnim.setBackground(drawable);
|
||||
String path = BaseUrlApi.BASE_IMG_URL + b.getReportAudio();
|
||||
mLlVoice.setOnClickListener(v -> {
|
||||
if (!TextUtils.isEmpty(path)) {
|
||||
AnimationDrawable animationDrawable = (AnimationDrawable) mTvVoiceAnim.getBackground();
|
||||
animationDrawable.start();
|
||||
MediaManager.playSound(path,
|
||||
mp -> {
|
||||
animationDrawable.selectDrawable(0);//显示动画第一帧
|
||||
animationDrawable.stop();
|
||||
MediaManager.destroy();
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
mTvVoiceAnim.setHint("未录入");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将地图移动到定位中心
|
||||
*
|
||||
* @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 boolean checkParams() {
|
||||
String summary = mEtSummary.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(summary)) {
|
||||
ToastUtils.show("请输入派遣描述");
|
||||
return false;
|
||||
}
|
||||
String time = mTvTime.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(time)) {
|
||||
ToastUtils.show("请选择处理截止时间");
|
||||
return false;
|
||||
}
|
||||
if (TextUtils.isEmpty(mSelDeptId)) {
|
||||
ToastUtils.show("请选择处理部门");
|
||||
return false;
|
||||
}
|
||||
if (TextUtils.isEmpty(mSelUserId)) {
|
||||
ToastUtils.show("请选择处理人员");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建提交参数
|
||||
*/
|
||||
private RequestBody buildParams() {
|
||||
SaveDeptDisBean bean = new SaveDeptDisBean();
|
||||
String summary = mEtSummary.getText().toString().trim();
|
||||
bean.setDispatchSummary(summary);
|
||||
String time = mTvTime.getText().toString().trim();
|
||||
bean.setDispatchHandleTime(time);
|
||||
bean.setDispatchUserName(mSelUserName);
|
||||
bean.setDispatchUserId(mSelUserId);
|
||||
bean.setDispatchUserDeptId(mSelDeptId);
|
||||
bean.setTaskId(mTaskId);
|
||||
bean.setReportId(mReportId);
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(bean);
|
||||
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
return requestBody;
|
||||
}
|
||||
}
|
@ -14,7 +14,9 @@ import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
import com.tengshisoft.commonmodule.adapters.IncidentDisDeptListAdapter;
|
||||
import com.tengshisoft.commonmodule.adapters.IncidentListAdapter;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentDisDeptListBean;
|
||||
import com.tengshisoft.commonmodule.beans.IncidentListBean;
|
||||
import com.tengshisoft.commonmodule.nets.CenterApis;
|
||||
import com.tengshisoft.commonmodule.nets.DeptApis;
|
||||
@ -48,7 +50,7 @@ import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
* 描述: 事件分拨
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_SUPERVISION_INCIDENT_DISTRIBUTION_LIST_ACTIVITY)
|
||||
public class IncidentDistributionListActivity extends BaseActivity {
|
||||
public class IncidentDistributionDeptListActivity extends BaseActivity {
|
||||
|
||||
|
||||
@BindView(R2.id.et_base_search_content)
|
||||
@ -70,8 +72,8 @@ public class IncidentDistributionListActivity extends BaseActivity {
|
||||
@BindView(R2.id.tv_error_hint)
|
||||
TextView mTvErrorHint;
|
||||
private Unbinder mBind;
|
||||
private List<IncidentListBean.RowsBean> mDatas;
|
||||
private IncidentListAdapter mAdapter;
|
||||
private List<IncidentDisDeptListBean.RowsBean> mDatas;
|
||||
private IncidentDisDeptListAdapter mAdapter;
|
||||
private int mCurrentPage = 1;
|
||||
private String mKeywords = "";
|
||||
|
||||
@ -87,7 +89,7 @@ public class IncidentDistributionListActivity extends BaseActivity {
|
||||
mEtBaseSearchContent.setHint("请输入事件编码(分类名称)");
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mDatas = new ArrayList<>();
|
||||
mAdapter = new IncidentListAdapter(mActivity, mDatas);
|
||||
mAdapter = new IncidentDisDeptListAdapter(mActivity, mDatas);
|
||||
mRlvComponents.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvComponents.setAdapter(mAdapter);
|
||||
mSrlContent.setOnRefreshListener(v -> doRefresh());
|
||||
@ -102,9 +104,11 @@ public class IncidentDistributionListActivity extends BaseActivity {
|
||||
});
|
||||
mAdapter.addOnItemClickListener(v -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_SUPERVISION_INCIDENT_DISTRIBUTION_DETAIL_ACTIVITY)
|
||||
.withString("id", v.getReportId())
|
||||
.withString("reportId", v.getReportId())
|
||||
.withString("taskId", v.getTaskId())
|
||||
.withInt("leve", v.getTaskLevel())
|
||||
.withString("deptId", v.getUserDeptId())
|
||||
.withString("deptName", v.getUserDeptName())
|
||||
.withString("id", v.getDistributionUserId())
|
||||
.navigation(mActivity, 12));
|
||||
}
|
||||
|
||||
@ -118,14 +122,14 @@ public class IncidentDistributionListActivity extends BaseActivity {
|
||||
.getIncidentDistributionList(mKeywords, mCurrentPage + "", UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<IncidentListBean>() {
|
||||
.subscribe(new Observer<IncidentDisDeptListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull IncidentListBean communityListBean) {
|
||||
public void onNext(@NonNull IncidentDisDeptListBean communityListBean) {
|
||||
if (communityListBean.getRows() != null && communityListBean.getRows().size() > 0) {
|
||||
++mCurrentPage;
|
||||
if (currentPage == 1) {
|
@ -0,0 +1,357 @@
|
||||
<?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"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nsv_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="155dp"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardPreventCornerOverlap="true"
|
||||
app:cardUseCompatPadding="false"
|
||||
tools:visibility="visible">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.ExpandableLinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:defaultItemCount="5"
|
||||
app:expandText="点击展开"
|
||||
app:hideText="点击收起"
|
||||
app:useDefaultBottom="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_issue_base_info"
|
||||
style="@style/issue_report_title"
|
||||
android:padding="8dp"
|
||||
android:text="基本信息"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="所在网格" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_grid"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="部件" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_component"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="事件类型" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_type"
|
||||
style="@style/item_content"
|
||||
android:hint="未录入" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_gray"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="是否自处理" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/sw_is_self"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/switch_ios_track_selector"
|
||||
android:enabled="false"
|
||||
android:switchMinWidth="40dp"
|
||||
android:switchPadding="0dp"
|
||||
android:textOff=""
|
||||
android:textOn=""
|
||||
app:showText="false"
|
||||
app:splitTrack="false"
|
||||
app:theme="@style/scstyle"
|
||||
app:thumbTint="#00000000"
|
||||
app:trackTint="#00000000" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="事发地区" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area_5"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="事发位置" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.baidu.mapapi.map.TextureMapView
|
||||
android:id="@+id/tmv_map"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="220dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="-5dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="5dp" />
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_vertical"
|
||||
android:text="事件说明" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_content"
|
||||
style="@style/item_content_ver" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_vertical"
|
||||
android:text="事件图片" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_photos"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_photo_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:padding="15dp"
|
||||
android:text="未上传" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_vertical"
|
||||
android:text="视频" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_video"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/shp_rectangle_black"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_play_video"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_play_white_icon" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_video_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:padding="15dp"
|
||||
android:text="未上传" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_voice"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_voice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_record_video"
|
||||
android:drawablePadding="8dp"
|
||||
android:gravity="left"
|
||||
android:padding="5dp"
|
||||
android:text="录音"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_voice_anim"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.tenlionsoft.baselib.core.widget.views.ExpandableLinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/shp_rectangle_white_01"
|
||||
android:gravity="left"
|
||||
android:hint="请输入处理描述"
|
||||
android:minLines="5"
|
||||
android:padding="5dp"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:text="受理"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_abolish"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/sel_btn_activity_sign_up"
|
||||
android:text="不予受理"
|
||||
android:textColor="@color/white" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/gray_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/item_base_search" />
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="5dp">
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/srl_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_components"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pb_loading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminateBehavior="repeat"
|
||||
android:indeterminateDrawable="@drawable/anim_loading" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_empty_data"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/ic_empty_data" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_error_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:clickable="true"
|
||||
android:textColor="@color/black"
|
||||
tools:text="加载数据失败" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
@ -46,7 +46,7 @@
|
||||
android:id="@+id/tv_issue_base_info"
|
||||
style="@style/issue_report_title"
|
||||
android:padding="8dp"
|
||||
android:text="基本信息"
|
||||
android:text="事件基本信息"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
@ -306,24 +306,92 @@
|
||||
</com.tenlionsoft.baselib.core.widget.views.ExpandableLinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
<!--派遣详情-->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardPreventCornerOverlap="true"
|
||||
app:cardUseCompatPadding="false">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_vertical"
|
||||
android:drawableLeft="@drawable/ic_start_hint"
|
||||
android:text="派遣说明" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_summary"
|
||||
style="@style/item_content_edit"
|
||||
android:gravity="left"
|
||||
android:hint="请输入派遣说明"
|
||||
android:minLines="5"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView style="@style/style_hint_star" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="截止时间" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择处理截止时间" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView style="@style/style_hint_star" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="处理部门" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_dept"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择处理部门" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView style="@style/style_hint_star" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="处理人员" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择处理人员" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_submit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:text="派遣"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</RelativeLayout>
|
Loading…
Reference in New Issue
Block a user