学校管理、涉及师生案件
This commit is contained in:
parent
6a535f615d
commit
0686296e2f
@ -66,8 +66,8 @@ public class PathConfig {
|
||||
public static final String DIC_RELATION = "4c21d91a-d5e1-4cfc-a18a-d63272763cdb";//与户主关系
|
||||
public static final String DIC_RELATION_YOUNG = "b12834a4-88d3-402c-8685-460dbb397b73";//与户主关系
|
||||
public static final String DIC_ACCORD = "2156b4da-0be5-46d5-81c5-f1dcf0b30359";//人户是否一致
|
||||
public static final String DIC_CARD_TYPE = "76c5044f-805a-4313-b1e8-79e966b97c0d";//证件类型
|
||||
// public static final String DIC_CARD_TYPE = "35c6e331-9dd4-425c-be0c-ce570a0a768d";//TODO 证件类型
|
||||
// public static final String DIC_CARD_TYPE = "76c5044f-805a-4313-b1e8-79e966b97c0d";//证件类型
|
||||
public static final String DIC_CARD_TYPE = "35c6e331-9dd4-425c-be0c-ce570a0a768d";//TODO 证件类型
|
||||
public static final String DIC_HOUSE_TYPE = "bd3ceeb7-a523-4532-901d-5ab4046ebae3";//住所类型
|
||||
public static final String DIC_HEALTH = "6152d370-a809-4e32-8af9-e3c5f606e7f1";//健康状况
|
||||
public static final String DIC_REAR_TYPE = "40660752-9d0f-47fc-834f-5eb8e2668209";//留守人员类型
|
||||
@ -128,7 +128,9 @@ public class PathConfig {
|
||||
public static final String DIC_FAMILY_STATE = "4bc7e70d-e431-40f1-af55-aee3a3467035";//家庭情况
|
||||
public static final String DIC_PERSON_TYPE = "eda39bf4-078d-4d12-8fbe-aa0648cb723e";//主要当事人人员类型(编码表-5.57)
|
||||
|
||||
|
||||
public static final String DIC_SCHOOL_TYPE = "e5624543-4f8e-4550-a8e8-49235f23b287";//学校办学类型
|
||||
public static final String DIC_HARM_LEVEL = "ac006130-7403-40ef-b647-e89bb8cce631";//周边重点人员危害程度
|
||||
public static final String DIC_CASE_NATURE = "28794721-09bb-4f64-920f-4d8eed02fbb3";//案件性质
|
||||
//=============================主页按钮模块类型===========================
|
||||
public static final String MODULE_CALL = "call";
|
||||
public static final String MODULE_PRISON = "prison";
|
||||
@ -156,7 +158,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 = "444a0289-65fc-4cbb-9972-c9569c24f42b";/*测试App下载码*/
|
||||
public static final String APP_VERSION_ID = "96aee0e5-2b4e-4b4a-a13c-9c71052b9ad7";/*测试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
|
||||
@ -430,6 +432,19 @@ public class PathConfig {
|
||||
public static final String PATH_MODULE_GRID_ACTIVITY_EXPRESS_POI_EDIT = "/modulegrid/activity/expressPoiEdit";//快递点编辑
|
||||
public static final String PATH_MODULE_GRID_ACTIVITY_EXPRESS_POI_DETAIL = "/modulegrid/activity/expressPoiDetail";//快递点详情
|
||||
|
||||
public static final String PATH_MODULE_GRID_ACTIVITY_SCHOOL_MANAGE_LIST = "/modulegrid/activity/schoolManageList";//学校管理
|
||||
public static final String PATH_MODULE_GRID_ACTIVITY_SCHOOL_MANAGE_ADD = "/modulegrid/activity/schoolManageAdd";//学校管理添加
|
||||
public static final String PATH_MODULE_GRID_ACTIVITY_SCHOOL_MANAGE_DETAIL = "/modulegrid/activity/schoolManageDetail";//学校管理详情
|
||||
|
||||
public static final String PATH_MODULE_GRID_ACTIVITY_SCHOOL_EMPHASES_PERSON_LIST = "/modulegrid/activity/schoolEmphasesPersonList";//学校周边重点人员列表
|
||||
public static final String PATH_MODULE_GRID_ACTIVITY_SCHOOL_EMPHASES_PERSON_ADD = "/modulegrid/activity/schoolEmphasesPersonAdd";//学校周边重点人员列表
|
||||
public static final String PATH_MODULE_GRID_ACTIVITY_SCHOOL_EMPHASES_PERSON_DETAIL = "/modulegrid/activity/schoolEmphasesPersonDetail";//学校周边重点人员列表
|
||||
|
||||
|
||||
public static final String PATH_MODULE_GRID_ACTIVITY_SCHOOL_CASE_LIST = "/modulegrid/activity/schoolCaseList";//学校案件列表
|
||||
public static final String PATH_MODULE_GRID_ACTIVITY_SCHOOL_CASE_ADD = "/modulegrid/activity/schoolCaseAdd";//学校案件添加
|
||||
public static final String PATH_MODULE_GRID_ACTIVITY_SCHOOL_CASE_DETAIL = "/modulegrid/activity/schoolCaseDetail";//学校案件详情
|
||||
|
||||
public static final String PATH_MODULE_GRID_ACTIVITY_DIC_SEL = "/modulegrid/activity/dicSel";//字典多选、单选
|
||||
|
||||
//巡查巡检
|
||||
@ -486,4 +501,5 @@ public class PathConfig {
|
||||
public static final String PATH_MODULE_SUPERVISION_INCIDENT_CHECK_LIST = "/modulesupervision/activity/incidentDeptList";//事件核查
|
||||
public static final String PATH_MODULE_SUPERVISION_INCIDENT_CHECK_DETAIL = "/modulesupervision/activity/incidentDeptListDetail";//事件核查详情
|
||||
|
||||
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
public class BaseUrlApi {
|
||||
|
||||
// public static final String IP = "http://192.168.0.109:8080/";/* 正式IP */
|
||||
public static final String IP = "http://192.168.0.109:8080/";/* 正式IP */
|
||||
public static final String IP = "http://192.168.0.111:8081/";/* 正式IP */
|
||||
public static final String SYS_USERCENTER = "usercenter/";
|
||||
public static final String SYS_POPULATION = "population/";/*人口系统*/
|
||||
public static final String SYS_CASE = "case/";/*事件部件*/
|
||||
@ -18,7 +18,7 @@ public class BaseUrlApi {
|
||||
public static final String SYS_SECURITY = "systembase/";/*社会治安*/
|
||||
public static final String TEMP_IP = "http://192.168.0.109:8080/";
|
||||
|
||||
public static final String BASE_MAIN_IP = IP + SYS_POPULATION;
|
||||
public static final String BASE_MAIN_IP = IP + SYS_SECURITY;
|
||||
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;
|
||||
@ -26,7 +26,7 @@ public class BaseUrlApi {
|
||||
|
||||
public static final String BASE_URL = BASE_MAIN_IP;//基础URL
|
||||
|
||||
public static final String SOCKET_IP = "http://192.168.0.109:8080/websocket";/*SocketIP*/
|
||||
public static final String SOCKET_IP = "http://192.168.0.111:8081/websocket";/*SocketIP*/
|
||||
|
||||
//地图页面展示类型
|
||||
|
||||
|
@ -19,7 +19,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:defaultItemCount="3"
|
||||
android:paddingBottom="10dp"
|
||||
app:defaultItemCount="5"
|
||||
app:expandText="点击展开"
|
||||
app:hideText="点击收起"
|
||||
app:useDefaultBottom="true">
|
||||
|
@ -355,6 +355,7 @@
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:gravity">left</item>
|
||||
<item name="android:padding">5dp</item>
|
||||
<item name="android:textColor">@color/black</item>
|
||||
<item name="android:textSize">13sp</item>
|
||||
<item name="android:hint">未录入</item>
|
||||
</style>
|
||||
|
@ -0,0 +1,59 @@
|
||||
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.SchoolCaseListBean;
|
||||
import com.tengshisoft.commonmodule.beans.SchoolListBean;
|
||||
import com.tengshisoft.commonmodule.holders.SchoolCaseHolder;
|
||||
import com.tengshisoft.commonmodule.holders.SchoolListHolder;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021年10月26日10:14:59
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 学校管理-涉及案件
|
||||
*/
|
||||
public class SchoolCaseAdapter extends BaseRecyclerAdapter<SchoolCaseListBean.RowsBean, SchoolCaseHolder> {
|
||||
public SchoolCaseAdapter(Context ctx, List<SchoolCaseListBean.RowsBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SchoolCaseHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_school_case, parent, false);
|
||||
return new SchoolCaseHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(SchoolCaseHolder holder, int i) {
|
||||
SchoolCaseListBean.RowsBean bean = mData.get(i);
|
||||
holder.mTvName.setText(bean.getCaseName());
|
||||
holder.mTvNumber.setText("是否破案:" + (bean.getIsSolve() == 1 ? "已破案" : "未破案"));
|
||||
holder.mTvTime.setText("发生日期:" + bean.getHappenTime());
|
||||
holder.mTvType.setText(bean.getCaseNatureName());
|
||||
holder.mTvAddress.setText("案发地:" + bean.getHappenLocationName() + bean.getHappenAddress());
|
||||
if (mEditListener != null) {
|
||||
holder.mBtnEdit.setOnClickListener(v -> mEditListener.onEdit(bean, i));
|
||||
holder.mBtnDel.setOnClickListener(v -> mEditListener.onDel(bean, i));
|
||||
}
|
||||
}
|
||||
|
||||
private OnEditListener mEditListener;
|
||||
|
||||
public void addOnEditListener(OnEditListener mListener) {
|
||||
this.mEditListener = mListener;
|
||||
}
|
||||
|
||||
public interface OnEditListener {
|
||||
void onEdit(SchoolCaseListBean.RowsBean bean, int pos);
|
||||
|
||||
void onDel(SchoolCaseListBean.RowsBean bean, int pos);
|
||||
}
|
||||
}
|
@ -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.SchoolEmphasesPersonListBean;
|
||||
import com.tengshisoft.commonmodule.beans.SchoolListBean;
|
||||
import com.tengshisoft.commonmodule.holders.SchoolEmphasesPersonHolder;
|
||||
import com.tengshisoft.commonmodule.holders.SchoolListHolder;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021年10月26日10:14:59
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 学校管理 周边重点人员
|
||||
*/
|
||||
public class SchoolEmphasesPersonAdapter extends BaseRecyclerAdapter<SchoolEmphasesPersonListBean.RowsBean, SchoolEmphasesPersonHolder> {
|
||||
public SchoolEmphasesPersonAdapter(Context ctx, List<SchoolEmphasesPersonListBean.RowsBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SchoolEmphasesPersonHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_school_emphases_person, parent, false);
|
||||
return new SchoolEmphasesPersonHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(SchoolEmphasesPersonHolder holder, int i) {
|
||||
SchoolEmphasesPersonListBean.RowsBean bean = mData.get(i);
|
||||
holder.mTvHarm.setText("危害程度:" + bean.getDegreeOfHarmName());
|
||||
holder.mTvAttention.setText("是否重点关注:" + (bean.getIsFollow() == 0 ? "否" : "是"));
|
||||
if (mEditListener != null) {
|
||||
holder.mBtnEdit.setOnClickListener(v -> mEditListener.onEdit(bean, i));
|
||||
holder.mBtnDel.setOnClickListener(v -> mEditListener.onDel(bean, i));
|
||||
}
|
||||
}
|
||||
|
||||
private OnEditListener mEditListener;
|
||||
|
||||
public void addOnEditListener(OnEditListener mListener) {
|
||||
this.mEditListener = mListener;
|
||||
}
|
||||
|
||||
public interface OnEditListener {
|
||||
void onEdit(SchoolEmphasesPersonListBean.RowsBean bean, int pos);
|
||||
|
||||
void onDel(SchoolEmphasesPersonListBean.RowsBean bean, int pos);
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
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.CensusAidsListBean;
|
||||
import com.tengshisoft.commonmodule.beans.SchoolListBean;
|
||||
import com.tengshisoft.commonmodule.holders.CensusAidsHolder;
|
||||
import com.tengshisoft.commonmodule.holders.SchoolListHolder;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
|
||||
import com.tenlionsoft.baselib.utils.IDCard;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021年10月26日10:14:59
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 学校管理
|
||||
*/
|
||||
public class SchoolListAdapter extends BaseRecyclerAdapter<SchoolListBean.RowsBean, SchoolListHolder> {
|
||||
public SchoolListAdapter(Context ctx, List<SchoolListBean.RowsBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SchoolListHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_school_list, parent, false);
|
||||
return new SchoolListHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(SchoolListHolder holder, int i) {
|
||||
SchoolListBean.RowsBean bean = mData.get(i);
|
||||
holder.mTvName.setText(bean.getSchoolName());
|
||||
holder.mTvType.setText(bean.getRunningTypeName());
|
||||
holder.mTvNumber.setText("在校人数:" + bean.getStuCount());
|
||||
holder.mTvSchoolMaster.setText("校长:" + bean.getPrincipalName());
|
||||
holder.mTvSchoolMasterPhone.setText("联系电话:" + bean.getPrincipalPhone());
|
||||
holder.mTvAddress.setText(bean.getBelongDeptName() + bean.getSchoolAddress());
|
||||
if (mEditListener != null) {
|
||||
holder.mBtnPerson.setOnClickListener(v -> mEditListener.onShowPerson(bean, i));
|
||||
holder.mBtnCase.setOnClickListener(v -> mEditListener.onShowCase(bean, i));
|
||||
}
|
||||
}
|
||||
|
||||
private OnEditListener mEditListener;
|
||||
|
||||
public void addOnEditListener(OnEditListener mListener) {
|
||||
this.mEditListener = mListener;
|
||||
}
|
||||
|
||||
public interface OnEditListener {
|
||||
void onShowPerson(SchoolListBean.RowsBean bean, int pos);
|
||||
|
||||
void onShowCase(SchoolListBean.RowsBean bean, int pos);
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/26 - 3:26 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class SaveEmphasesBean {
|
||||
|
||||
private String baseId;
|
||||
private String degreeOfHarm;
|
||||
private String degreeOfHarmCode;
|
||||
private String degreeOfHarmName;
|
||||
private int isFollow;
|
||||
private String schoolId;
|
||||
|
||||
public String getBaseId() {
|
||||
return baseId;
|
||||
}
|
||||
|
||||
public void setBaseId(String baseId) {
|
||||
this.baseId = baseId;
|
||||
}
|
||||
|
||||
public String getDegreeOfHarm() {
|
||||
return degreeOfHarm;
|
||||
}
|
||||
|
||||
public void setDegreeOfHarm(String degreeOfHarm) {
|
||||
this.degreeOfHarm = degreeOfHarm;
|
||||
}
|
||||
|
||||
public String getDegreeOfHarmCode() {
|
||||
return degreeOfHarmCode;
|
||||
}
|
||||
|
||||
public void setDegreeOfHarmCode(String degreeOfHarmCode) {
|
||||
this.degreeOfHarmCode = degreeOfHarmCode;
|
||||
}
|
||||
|
||||
public String getDegreeOfHarmName() {
|
||||
return degreeOfHarmName;
|
||||
}
|
||||
|
||||
public void setDegreeOfHarmName(String degreeOfHarmName) {
|
||||
this.degreeOfHarmName = degreeOfHarmName;
|
||||
}
|
||||
|
||||
public int getIsFollow() {
|
||||
return isFollow;
|
||||
}
|
||||
|
||||
public void setIsFollow(int isFollow) {
|
||||
this.isFollow = isFollow;
|
||||
}
|
||||
|
||||
public String getSchoolId() {
|
||||
return schoolId;
|
||||
}
|
||||
|
||||
public void setSchoolId(String schoolId) {
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
}
|
@ -0,0 +1,191 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/26 - 10:03 上午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 保存学校
|
||||
*/
|
||||
public class SaveSchoolBean {
|
||||
|
||||
private String belongDept;
|
||||
private String belongDeptCode;
|
||||
private String belongDeptName;
|
||||
private String defendName;
|
||||
private String defendPhone;
|
||||
private double latitude;
|
||||
private double longitude;
|
||||
private String principalName;
|
||||
private String principalPhone;
|
||||
private String runningType;
|
||||
private String runningTypeCode;
|
||||
private String runningTypeName;
|
||||
private String safeName;
|
||||
private String safePhone;
|
||||
private String schoolAddress;
|
||||
private String schoolName;
|
||||
private int securityCount;
|
||||
private String securityName;
|
||||
private String securityPhone;
|
||||
private int stuCount;
|
||||
|
||||
public String getBelongDept() {
|
||||
return belongDept;
|
||||
}
|
||||
|
||||
public void setBelongDept(String belongDept) {
|
||||
this.belongDept = belongDept;
|
||||
}
|
||||
|
||||
public String getBelongDeptCode() {
|
||||
return belongDeptCode;
|
||||
}
|
||||
|
||||
public void setBelongDeptCode(String belongDeptCode) {
|
||||
this.belongDeptCode = belongDeptCode;
|
||||
}
|
||||
|
||||
public String getBelongDeptName() {
|
||||
return belongDeptName;
|
||||
}
|
||||
|
||||
public void setBelongDeptName(String belongDeptName) {
|
||||
this.belongDeptName = belongDeptName;
|
||||
}
|
||||
|
||||
public String getDefendName() {
|
||||
return defendName;
|
||||
}
|
||||
|
||||
public void setDefendName(String defendName) {
|
||||
this.defendName = defendName;
|
||||
}
|
||||
|
||||
public String getDefendPhone() {
|
||||
return defendPhone;
|
||||
}
|
||||
|
||||
public void setDefendPhone(String defendPhone) {
|
||||
this.defendPhone = defendPhone;
|
||||
}
|
||||
|
||||
public double getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public void setLatitude(double latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public double getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public void setLongitude(double longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public String getPrincipalName() {
|
||||
return principalName;
|
||||
}
|
||||
|
||||
public void setPrincipalName(String principalName) {
|
||||
this.principalName = principalName;
|
||||
}
|
||||
|
||||
public String getPrincipalPhone() {
|
||||
return principalPhone;
|
||||
}
|
||||
|
||||
public void setPrincipalPhone(String principalPhone) {
|
||||
this.principalPhone = principalPhone;
|
||||
}
|
||||
|
||||
public String getRunningType() {
|
||||
return runningType;
|
||||
}
|
||||
|
||||
public void setRunningType(String runningType) {
|
||||
this.runningType = runningType;
|
||||
}
|
||||
|
||||
public String getRunningTypeCode() {
|
||||
return runningTypeCode;
|
||||
}
|
||||
|
||||
public void setRunningTypeCode(String runningTypeCode) {
|
||||
this.runningTypeCode = runningTypeCode;
|
||||
}
|
||||
|
||||
public String getRunningTypeName() {
|
||||
return runningTypeName;
|
||||
}
|
||||
|
||||
public void setRunningTypeName(String runningTypeName) {
|
||||
this.runningTypeName = runningTypeName;
|
||||
}
|
||||
|
||||
public String getSafeName() {
|
||||
return safeName;
|
||||
}
|
||||
|
||||
public void setSafeName(String safeName) {
|
||||
this.safeName = safeName;
|
||||
}
|
||||
|
||||
public String getSafePhone() {
|
||||
return safePhone;
|
||||
}
|
||||
|
||||
public void setSafePhone(String safePhone) {
|
||||
this.safePhone = safePhone;
|
||||
}
|
||||
|
||||
public String getSchoolAddress() {
|
||||
return schoolAddress;
|
||||
}
|
||||
|
||||
public void setSchoolAddress(String schoolAddress) {
|
||||
this.schoolAddress = schoolAddress;
|
||||
}
|
||||
|
||||
public String getSchoolName() {
|
||||
return schoolName;
|
||||
}
|
||||
|
||||
public void setSchoolName(String schoolName) {
|
||||
this.schoolName = schoolName;
|
||||
}
|
||||
|
||||
public int getSecurityCount() {
|
||||
return securityCount;
|
||||
}
|
||||
|
||||
public void setSecurityCount(int securityCount) {
|
||||
this.securityCount = securityCount;
|
||||
}
|
||||
|
||||
public String getSecurityName() {
|
||||
return securityName;
|
||||
}
|
||||
|
||||
public void setSecurityName(String securityName) {
|
||||
this.securityName = securityName;
|
||||
}
|
||||
|
||||
public String getSecurityPhone() {
|
||||
return securityPhone;
|
||||
}
|
||||
|
||||
public void setSecurityPhone(String securityPhone) {
|
||||
this.securityPhone = securityPhone;
|
||||
}
|
||||
|
||||
public int getStuCount() {
|
||||
return stuCount;
|
||||
}
|
||||
|
||||
public void setStuCount(int stuCount) {
|
||||
this.stuCount = stuCount;
|
||||
}
|
||||
}
|
@ -0,0 +1,209 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/26 - 4:40 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class SaveSchoolCaseBean {
|
||||
|
||||
private int arrestCount;
|
||||
private int atLargeCount;
|
||||
private String caseCode;
|
||||
private String caseName;
|
||||
private String caseNature;
|
||||
private String caseNatureCode;
|
||||
private String caseNatureName;
|
||||
private String caseSituation;
|
||||
private String caseSolve;
|
||||
private int crimeCount;
|
||||
private String happenAddress;
|
||||
private String happenLocation;
|
||||
private String happenLocationCode;
|
||||
private String happenLocationName;
|
||||
private String happenTime;
|
||||
private int isSolve;
|
||||
private String principalCardCode;
|
||||
private String principalCardCodeCode;
|
||||
private String principalCardCodeName;
|
||||
private String principalCardNum;
|
||||
private String principalName;
|
||||
private String schoolId;
|
||||
|
||||
public int getArrestCount() {
|
||||
return arrestCount;
|
||||
}
|
||||
|
||||
public void setArrestCount(int arrestCount) {
|
||||
this.arrestCount = arrestCount;
|
||||
}
|
||||
|
||||
public int getAtLargeCount() {
|
||||
return atLargeCount;
|
||||
}
|
||||
|
||||
public void setAtLargeCount(int atLargeCount) {
|
||||
this.atLargeCount = atLargeCount;
|
||||
}
|
||||
|
||||
public String getCaseCode() {
|
||||
return caseCode;
|
||||
}
|
||||
|
||||
public void setCaseCode(String caseCode) {
|
||||
this.caseCode = caseCode;
|
||||
}
|
||||
|
||||
public String getCaseName() {
|
||||
return caseName;
|
||||
}
|
||||
|
||||
public void setCaseName(String caseName) {
|
||||
this.caseName = caseName;
|
||||
}
|
||||
|
||||
public String getCaseNature() {
|
||||
return caseNature;
|
||||
}
|
||||
|
||||
public void setCaseNature(String caseNature) {
|
||||
this.caseNature = caseNature;
|
||||
}
|
||||
|
||||
public String getCaseNatureCode() {
|
||||
return caseNatureCode;
|
||||
}
|
||||
|
||||
public void setCaseNatureCode(String caseNatureCode) {
|
||||
this.caseNatureCode = caseNatureCode;
|
||||
}
|
||||
|
||||
public String getCaseNatureName() {
|
||||
return caseNatureName;
|
||||
}
|
||||
|
||||
public void setCaseNatureName(String caseNatureName) {
|
||||
this.caseNatureName = caseNatureName;
|
||||
}
|
||||
|
||||
public String getCaseSituation() {
|
||||
return caseSituation;
|
||||
}
|
||||
|
||||
public void setCaseSituation(String caseSituation) {
|
||||
this.caseSituation = caseSituation;
|
||||
}
|
||||
|
||||
public String getCaseSolve() {
|
||||
return caseSolve;
|
||||
}
|
||||
|
||||
public void setCaseSolve(String caseSolve) {
|
||||
this.caseSolve = caseSolve;
|
||||
}
|
||||
|
||||
public int getCrimeCount() {
|
||||
return crimeCount;
|
||||
}
|
||||
|
||||
public void setCrimeCount(int crimeCount) {
|
||||
this.crimeCount = crimeCount;
|
||||
}
|
||||
|
||||
public String getHappenAddress() {
|
||||
return happenAddress;
|
||||
}
|
||||
|
||||
public void setHappenAddress(String happenAddress) {
|
||||
this.happenAddress = happenAddress;
|
||||
}
|
||||
|
||||
public String getHappenLocation() {
|
||||
return happenLocation;
|
||||
}
|
||||
|
||||
public void setHappenLocation(String happenLocation) {
|
||||
this.happenLocation = happenLocation;
|
||||
}
|
||||
|
||||
public String getHappenLocationCode() {
|
||||
return happenLocationCode;
|
||||
}
|
||||
|
||||
public void setHappenLocationCode(String happenLocationCode) {
|
||||
this.happenLocationCode = happenLocationCode;
|
||||
}
|
||||
|
||||
public String getHappenLocationName() {
|
||||
return happenLocationName;
|
||||
}
|
||||
|
||||
public void setHappenLocationName(String happenLocationName) {
|
||||
this.happenLocationName = happenLocationName;
|
||||
}
|
||||
|
||||
public String getHappenTime() {
|
||||
return happenTime;
|
||||
}
|
||||
|
||||
public void setHappenTime(String happenTime) {
|
||||
this.happenTime = happenTime;
|
||||
}
|
||||
|
||||
public int getIsSolve() {
|
||||
return isSolve;
|
||||
}
|
||||
|
||||
public void setIsSolve(int isSolve) {
|
||||
this.isSolve = isSolve;
|
||||
}
|
||||
|
||||
public String getPrincipalCardCode() {
|
||||
return principalCardCode;
|
||||
}
|
||||
|
||||
public void setPrincipalCardCode(String principalCardCode) {
|
||||
this.principalCardCode = principalCardCode;
|
||||
}
|
||||
|
||||
public String getPrincipalCardCodeCode() {
|
||||
return principalCardCodeCode;
|
||||
}
|
||||
|
||||
public void setPrincipalCardCodeCode(String principalCardCodeCode) {
|
||||
this.principalCardCodeCode = principalCardCodeCode;
|
||||
}
|
||||
|
||||
public String getPrincipalCardCodeName() {
|
||||
return principalCardCodeName;
|
||||
}
|
||||
|
||||
public void setPrincipalCardCodeName(String principalCardCodeName) {
|
||||
this.principalCardCodeName = principalCardCodeName;
|
||||
}
|
||||
|
||||
public String getPrincipalCardNum() {
|
||||
return principalCardNum;
|
||||
}
|
||||
|
||||
public void setPrincipalCardNum(String principalCardNum) {
|
||||
this.principalCardNum = principalCardNum;
|
||||
}
|
||||
|
||||
public String getPrincipalName() {
|
||||
return principalName;
|
||||
}
|
||||
|
||||
public void setPrincipalName(String principalName) {
|
||||
this.principalName = principalName;
|
||||
}
|
||||
|
||||
public String getSchoolId() {
|
||||
return schoolId;
|
||||
}
|
||||
|
||||
public void setSchoolId(String schoolId) {
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
}
|
@ -0,0 +1,218 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/26 - 4:42 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class SchoolCaseDetailBean {
|
||||
|
||||
private int arrestCount;
|
||||
private int atLargeCount;
|
||||
private String caseCode;
|
||||
private String caseName;
|
||||
private String caseNature;
|
||||
private String caseNatureCode;
|
||||
private String caseNatureName;
|
||||
private String caseSituation;
|
||||
private String caseSolve;
|
||||
private int crimeCount;
|
||||
private String happenAddress;
|
||||
private String happenLocation;
|
||||
private String happenLocationCode;
|
||||
private String happenLocationName;
|
||||
private String happenTime;
|
||||
private int isSolve;
|
||||
private String principalCardCode;
|
||||
private String principalCardCodeCode;
|
||||
private String principalCardCodeName;
|
||||
private String principalCardNum;
|
||||
private String principalName;
|
||||
private String schoolId;
|
||||
private String stuTeaSafeId;
|
||||
|
||||
public int getArrestCount() {
|
||||
return arrestCount;
|
||||
}
|
||||
|
||||
public void setArrestCount(int arrestCount) {
|
||||
this.arrestCount = arrestCount;
|
||||
}
|
||||
|
||||
public int getAtLargeCount() {
|
||||
return atLargeCount;
|
||||
}
|
||||
|
||||
public void setAtLargeCount(int atLargeCount) {
|
||||
this.atLargeCount = atLargeCount;
|
||||
}
|
||||
|
||||
public String getCaseCode() {
|
||||
return caseCode;
|
||||
}
|
||||
|
||||
public void setCaseCode(String caseCode) {
|
||||
this.caseCode = caseCode;
|
||||
}
|
||||
|
||||
public String getCaseName() {
|
||||
return caseName;
|
||||
}
|
||||
|
||||
public void setCaseName(String caseName) {
|
||||
this.caseName = caseName;
|
||||
}
|
||||
|
||||
public String getCaseNature() {
|
||||
return caseNature;
|
||||
}
|
||||
|
||||
public void setCaseNature(String caseNature) {
|
||||
this.caseNature = caseNature;
|
||||
}
|
||||
|
||||
public String getCaseNatureCode() {
|
||||
return caseNatureCode;
|
||||
}
|
||||
|
||||
public void setCaseNatureCode(String caseNatureCode) {
|
||||
this.caseNatureCode = caseNatureCode;
|
||||
}
|
||||
|
||||
public String getCaseNatureName() {
|
||||
return caseNatureName;
|
||||
}
|
||||
|
||||
public void setCaseNatureName(String caseNatureName) {
|
||||
this.caseNatureName = caseNatureName;
|
||||
}
|
||||
|
||||
public String getCaseSituation() {
|
||||
return caseSituation;
|
||||
}
|
||||
|
||||
public void setCaseSituation(String caseSituation) {
|
||||
this.caseSituation = caseSituation;
|
||||
}
|
||||
|
||||
public String getCaseSolve() {
|
||||
return caseSolve;
|
||||
}
|
||||
|
||||
public void setCaseSolve(String caseSolve) {
|
||||
this.caseSolve = caseSolve;
|
||||
}
|
||||
|
||||
public int getCrimeCount() {
|
||||
return crimeCount;
|
||||
}
|
||||
|
||||
public void setCrimeCount(int crimeCount) {
|
||||
this.crimeCount = crimeCount;
|
||||
}
|
||||
|
||||
public String getHappenAddress() {
|
||||
return happenAddress;
|
||||
}
|
||||
|
||||
public void setHappenAddress(String happenAddress) {
|
||||
this.happenAddress = happenAddress;
|
||||
}
|
||||
|
||||
public String getHappenLocation() {
|
||||
return happenLocation;
|
||||
}
|
||||
|
||||
public void setHappenLocation(String happenLocation) {
|
||||
this.happenLocation = happenLocation;
|
||||
}
|
||||
|
||||
public String getHappenLocationCode() {
|
||||
return happenLocationCode;
|
||||
}
|
||||
|
||||
public void setHappenLocationCode(String happenLocationCode) {
|
||||
this.happenLocationCode = happenLocationCode;
|
||||
}
|
||||
|
||||
public String getHappenLocationName() {
|
||||
return happenLocationName;
|
||||
}
|
||||
|
||||
public void setHappenLocationName(String happenLocationName) {
|
||||
this.happenLocationName = happenLocationName;
|
||||
}
|
||||
|
||||
public String getHappenTime() {
|
||||
return happenTime;
|
||||
}
|
||||
|
||||
public void setHappenTime(String happenTime) {
|
||||
this.happenTime = happenTime;
|
||||
}
|
||||
|
||||
public int getIsSolve() {
|
||||
return isSolve;
|
||||
}
|
||||
|
||||
public void setIsSolve(int isSolve) {
|
||||
this.isSolve = isSolve;
|
||||
}
|
||||
|
||||
public String getPrincipalCardCode() {
|
||||
return principalCardCode;
|
||||
}
|
||||
|
||||
public void setPrincipalCardCode(String principalCardCode) {
|
||||
this.principalCardCode = principalCardCode;
|
||||
}
|
||||
|
||||
public String getPrincipalCardCodeCode() {
|
||||
return principalCardCodeCode;
|
||||
}
|
||||
|
||||
public void setPrincipalCardCodeCode(String principalCardCodeCode) {
|
||||
this.principalCardCodeCode = principalCardCodeCode;
|
||||
}
|
||||
|
||||
public String getPrincipalCardCodeName() {
|
||||
return principalCardCodeName;
|
||||
}
|
||||
|
||||
public void setPrincipalCardCodeName(String principalCardCodeName) {
|
||||
this.principalCardCodeName = principalCardCodeName;
|
||||
}
|
||||
|
||||
public String getPrincipalCardNum() {
|
||||
return principalCardNum;
|
||||
}
|
||||
|
||||
public void setPrincipalCardNum(String principalCardNum) {
|
||||
this.principalCardNum = principalCardNum;
|
||||
}
|
||||
|
||||
public String getPrincipalName() {
|
||||
return principalName;
|
||||
}
|
||||
|
||||
public void setPrincipalName(String principalName) {
|
||||
this.principalName = principalName;
|
||||
}
|
||||
|
||||
public String getSchoolId() {
|
||||
return schoolId;
|
||||
}
|
||||
|
||||
public void setSchoolId(String schoolId) {
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
|
||||
public String getStuTeaSafeId() {
|
||||
return stuTeaSafeId;
|
||||
}
|
||||
|
||||
public void setStuTeaSafeId(String stuTeaSafeId) {
|
||||
this.stuTeaSafeId = stuTeaSafeId;
|
||||
}
|
||||
}
|
@ -0,0 +1,250 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/26 - 4:20 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class SchoolCaseListBean {
|
||||
|
||||
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 int arrestCount;
|
||||
private int atLargeCount;
|
||||
private String caseCode;
|
||||
private String caseName;
|
||||
private String caseNature;
|
||||
private String caseNatureCode;
|
||||
private String caseNatureName;
|
||||
private String caseSituation;
|
||||
private String caseSolve;
|
||||
private int crimeCount;
|
||||
private String happenAddress;
|
||||
private String happenLocation;
|
||||
private String happenLocationCode;
|
||||
private String happenLocationName;
|
||||
private String happenTime;
|
||||
private int isSolve;
|
||||
private String principalCardCode;
|
||||
private String principalCardCodeCode;
|
||||
private String principalCardCodeName;
|
||||
private String principalCardNum;
|
||||
private String principalName;
|
||||
private String schoolId;
|
||||
private String stuTeaSafeId;
|
||||
|
||||
public int getArrestCount() {
|
||||
return arrestCount;
|
||||
}
|
||||
|
||||
public void setArrestCount(int arrestCount) {
|
||||
this.arrestCount = arrestCount;
|
||||
}
|
||||
|
||||
public int getAtLargeCount() {
|
||||
return atLargeCount;
|
||||
}
|
||||
|
||||
public void setAtLargeCount(int atLargeCount) {
|
||||
this.atLargeCount = atLargeCount;
|
||||
}
|
||||
|
||||
public String getCaseCode() {
|
||||
return caseCode;
|
||||
}
|
||||
|
||||
public void setCaseCode(String caseCode) {
|
||||
this.caseCode = caseCode;
|
||||
}
|
||||
|
||||
public String getCaseName() {
|
||||
return caseName;
|
||||
}
|
||||
|
||||
public void setCaseName(String caseName) {
|
||||
this.caseName = caseName;
|
||||
}
|
||||
|
||||
public String getCaseNature() {
|
||||
return caseNature;
|
||||
}
|
||||
|
||||
public void setCaseNature(String caseNature) {
|
||||
this.caseNature = caseNature;
|
||||
}
|
||||
|
||||
public String getCaseNatureCode() {
|
||||
return caseNatureCode;
|
||||
}
|
||||
|
||||
public void setCaseNatureCode(String caseNatureCode) {
|
||||
this.caseNatureCode = caseNatureCode;
|
||||
}
|
||||
|
||||
public String getCaseNatureName() {
|
||||
return caseNatureName;
|
||||
}
|
||||
|
||||
public void setCaseNatureName(String caseNatureName) {
|
||||
this.caseNatureName = caseNatureName;
|
||||
}
|
||||
|
||||
public String getCaseSituation() {
|
||||
return caseSituation;
|
||||
}
|
||||
|
||||
public void setCaseSituation(String caseSituation) {
|
||||
this.caseSituation = caseSituation;
|
||||
}
|
||||
|
||||
public String getCaseSolve() {
|
||||
return caseSolve;
|
||||
}
|
||||
|
||||
public void setCaseSolve(String caseSolve) {
|
||||
this.caseSolve = caseSolve;
|
||||
}
|
||||
|
||||
public int getCrimeCount() {
|
||||
return crimeCount;
|
||||
}
|
||||
|
||||
public void setCrimeCount(int crimeCount) {
|
||||
this.crimeCount = crimeCount;
|
||||
}
|
||||
|
||||
public String getHappenAddress() {
|
||||
return happenAddress;
|
||||
}
|
||||
|
||||
public void setHappenAddress(String happenAddress) {
|
||||
this.happenAddress = happenAddress;
|
||||
}
|
||||
|
||||
public String getHappenLocation() {
|
||||
return happenLocation;
|
||||
}
|
||||
|
||||
public void setHappenLocation(String happenLocation) {
|
||||
this.happenLocation = happenLocation;
|
||||
}
|
||||
|
||||
public String getHappenLocationCode() {
|
||||
return happenLocationCode;
|
||||
}
|
||||
|
||||
public void setHappenLocationCode(String happenLocationCode) {
|
||||
this.happenLocationCode = happenLocationCode;
|
||||
}
|
||||
|
||||
public String getHappenLocationName() {
|
||||
return happenLocationName;
|
||||
}
|
||||
|
||||
public void setHappenLocationName(String happenLocationName) {
|
||||
this.happenLocationName = happenLocationName;
|
||||
}
|
||||
|
||||
public String getHappenTime() {
|
||||
return happenTime;
|
||||
}
|
||||
|
||||
public void setHappenTime(String happenTime) {
|
||||
this.happenTime = happenTime;
|
||||
}
|
||||
|
||||
public int getIsSolve() {
|
||||
return isSolve;
|
||||
}
|
||||
|
||||
public void setIsSolve(int isSolve) {
|
||||
this.isSolve = isSolve;
|
||||
}
|
||||
|
||||
public String getPrincipalCardCode() {
|
||||
return principalCardCode;
|
||||
}
|
||||
|
||||
public void setPrincipalCardCode(String principalCardCode) {
|
||||
this.principalCardCode = principalCardCode;
|
||||
}
|
||||
|
||||
public String getPrincipalCardCodeCode() {
|
||||
return principalCardCodeCode;
|
||||
}
|
||||
|
||||
public void setPrincipalCardCodeCode(String principalCardCodeCode) {
|
||||
this.principalCardCodeCode = principalCardCodeCode;
|
||||
}
|
||||
|
||||
public String getPrincipalCardCodeName() {
|
||||
return principalCardCodeName;
|
||||
}
|
||||
|
||||
public void setPrincipalCardCodeName(String principalCardCodeName) {
|
||||
this.principalCardCodeName = principalCardCodeName;
|
||||
}
|
||||
|
||||
public String getPrincipalCardNum() {
|
||||
return principalCardNum;
|
||||
}
|
||||
|
||||
public void setPrincipalCardNum(String principalCardNum) {
|
||||
this.principalCardNum = principalCardNum;
|
||||
}
|
||||
|
||||
public String getPrincipalName() {
|
||||
return principalName;
|
||||
}
|
||||
|
||||
public void setPrincipalName(String principalName) {
|
||||
this.principalName = principalName;
|
||||
}
|
||||
|
||||
public String getSchoolId() {
|
||||
return schoolId;
|
||||
}
|
||||
|
||||
public void setSchoolId(String schoolId) {
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
|
||||
public String getStuTeaSafeId() {
|
||||
return stuTeaSafeId;
|
||||
}
|
||||
|
||||
public void setStuTeaSafeId(String stuTeaSafeId) {
|
||||
this.stuTeaSafeId = stuTeaSafeId;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,200 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/26 - 10:01 上午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 学校详情
|
||||
*/
|
||||
public class SchoolDetailBean {
|
||||
|
||||
private String belongDept;
|
||||
private String belongDeptCode;
|
||||
private String belongDeptName;
|
||||
private String defendName;
|
||||
private String defendPhone;
|
||||
private double latitude;
|
||||
private double longitude;
|
||||
private String principalName;
|
||||
private String principalPhone;
|
||||
private String runningType;
|
||||
private String runningTypeCode;
|
||||
private String runningTypeName;
|
||||
private String safeName;
|
||||
private String safePhone;
|
||||
private String schoolAddress;
|
||||
private String schoolId;
|
||||
private String schoolName;
|
||||
private int securityCount;
|
||||
private String securityName;
|
||||
private String securityPhone;
|
||||
private int stuCount;
|
||||
|
||||
public String getBelongDept() {
|
||||
return belongDept;
|
||||
}
|
||||
|
||||
public void setBelongDept(String belongDept) {
|
||||
this.belongDept = belongDept;
|
||||
}
|
||||
|
||||
public String getBelongDeptCode() {
|
||||
return belongDeptCode;
|
||||
}
|
||||
|
||||
public void setBelongDeptCode(String belongDeptCode) {
|
||||
this.belongDeptCode = belongDeptCode;
|
||||
}
|
||||
|
||||
public String getBelongDeptName() {
|
||||
return belongDeptName;
|
||||
}
|
||||
|
||||
public void setBelongDeptName(String belongDeptName) {
|
||||
this.belongDeptName = belongDeptName;
|
||||
}
|
||||
|
||||
public String getDefendName() {
|
||||
return defendName;
|
||||
}
|
||||
|
||||
public void setDefendName(String defendName) {
|
||||
this.defendName = defendName;
|
||||
}
|
||||
|
||||
public String getDefendPhone() {
|
||||
return defendPhone;
|
||||
}
|
||||
|
||||
public void setDefendPhone(String defendPhone) {
|
||||
this.defendPhone = defendPhone;
|
||||
}
|
||||
|
||||
public double getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public void setLatitude(double latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public double getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public void setLongitude(double longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public String getPrincipalName() {
|
||||
return principalName;
|
||||
}
|
||||
|
||||
public void setPrincipalName(String principalName) {
|
||||
this.principalName = principalName;
|
||||
}
|
||||
|
||||
public String getPrincipalPhone() {
|
||||
return principalPhone;
|
||||
}
|
||||
|
||||
public void setPrincipalPhone(String principalPhone) {
|
||||
this.principalPhone = principalPhone;
|
||||
}
|
||||
|
||||
public String getRunningType() {
|
||||
return runningType;
|
||||
}
|
||||
|
||||
public void setRunningType(String runningType) {
|
||||
this.runningType = runningType;
|
||||
}
|
||||
|
||||
public String getRunningTypeCode() {
|
||||
return runningTypeCode;
|
||||
}
|
||||
|
||||
public void setRunningTypeCode(String runningTypeCode) {
|
||||
this.runningTypeCode = runningTypeCode;
|
||||
}
|
||||
|
||||
public String getRunningTypeName() {
|
||||
return runningTypeName;
|
||||
}
|
||||
|
||||
public void setRunningTypeName(String runningTypeName) {
|
||||
this.runningTypeName = runningTypeName;
|
||||
}
|
||||
|
||||
public String getSafeName() {
|
||||
return safeName;
|
||||
}
|
||||
|
||||
public void setSafeName(String safeName) {
|
||||
this.safeName = safeName;
|
||||
}
|
||||
|
||||
public String getSafePhone() {
|
||||
return safePhone;
|
||||
}
|
||||
|
||||
public void setSafePhone(String safePhone) {
|
||||
this.safePhone = safePhone;
|
||||
}
|
||||
|
||||
public String getSchoolAddress() {
|
||||
return schoolAddress;
|
||||
}
|
||||
|
||||
public void setSchoolAddress(String schoolAddress) {
|
||||
this.schoolAddress = schoolAddress;
|
||||
}
|
||||
|
||||
public String getSchoolId() {
|
||||
return schoolId;
|
||||
}
|
||||
|
||||
public void setSchoolId(String schoolId) {
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
|
||||
public String getSchoolName() {
|
||||
return schoolName;
|
||||
}
|
||||
|
||||
public void setSchoolName(String schoolName) {
|
||||
this.schoolName = schoolName;
|
||||
}
|
||||
|
||||
public int getSecurityCount() {
|
||||
return securityCount;
|
||||
}
|
||||
|
||||
public void setSecurityCount(int securityCount) {
|
||||
this.securityCount = securityCount;
|
||||
}
|
||||
|
||||
public String getSecurityName() {
|
||||
return securityName;
|
||||
}
|
||||
|
||||
public void setSecurityName(String securityName) {
|
||||
this.securityName = securityName;
|
||||
}
|
||||
|
||||
public String getSecurityPhone() {
|
||||
return securityPhone;
|
||||
}
|
||||
|
||||
public void setSecurityPhone(String securityPhone) {
|
||||
this.securityPhone = securityPhone;
|
||||
}
|
||||
|
||||
public int getStuCount() {
|
||||
return stuCount;
|
||||
}
|
||||
|
||||
public void setStuCount(int stuCount) {
|
||||
this.stuCount = stuCount;
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/26 - 3:20 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class SchoolEmphasesPersonDetailBean {
|
||||
|
||||
private String baseId;
|
||||
private String degreeOfHarm;
|
||||
private String degreeOfHarmCode;
|
||||
private String degreeOfHarmName;
|
||||
private int isFollow;
|
||||
private String schoolId;
|
||||
private String schoolKeyId;
|
||||
|
||||
public String getBaseId() {
|
||||
return baseId;
|
||||
}
|
||||
|
||||
public void setBaseId(String baseId) {
|
||||
this.baseId = baseId;
|
||||
}
|
||||
|
||||
public String getDegreeOfHarm() {
|
||||
return degreeOfHarm;
|
||||
}
|
||||
|
||||
public void setDegreeOfHarm(String degreeOfHarm) {
|
||||
this.degreeOfHarm = degreeOfHarm;
|
||||
}
|
||||
|
||||
public String getDegreeOfHarmCode() {
|
||||
return degreeOfHarmCode;
|
||||
}
|
||||
|
||||
public void setDegreeOfHarmCode(String degreeOfHarmCode) {
|
||||
this.degreeOfHarmCode = degreeOfHarmCode;
|
||||
}
|
||||
|
||||
public String getDegreeOfHarmName() {
|
||||
return degreeOfHarmName;
|
||||
}
|
||||
|
||||
public void setDegreeOfHarmName(String degreeOfHarmName) {
|
||||
this.degreeOfHarmName = degreeOfHarmName;
|
||||
}
|
||||
|
||||
public int getIsFollow() {
|
||||
return isFollow;
|
||||
}
|
||||
|
||||
public void setIsFollow(int isFollow) {
|
||||
this.isFollow = isFollow;
|
||||
}
|
||||
|
||||
public String getSchoolId() {
|
||||
return schoolId;
|
||||
}
|
||||
|
||||
public void setSchoolId(String schoolId) {
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
|
||||
public String getSchoolKeyId() {
|
||||
return schoolKeyId;
|
||||
}
|
||||
|
||||
public void setSchoolKeyId(String schoolKeyId) {
|
||||
this.schoolKeyId = schoolKeyId;
|
||||
}
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/26 - 2:34 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:学校周边重点关注人员
|
||||
*/
|
||||
public class SchoolEmphasesPersonListBean {
|
||||
|
||||
|
||||
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 baseId;
|
||||
private String degreeOfHarm;
|
||||
private String degreeOfHarmCode;
|
||||
private String degreeOfHarmName;
|
||||
private int isFollow;
|
||||
private String schoolId;
|
||||
private String schoolKeyId;
|
||||
|
||||
public String getBaseId() {
|
||||
return baseId;
|
||||
}
|
||||
|
||||
public void setBaseId(String baseId) {
|
||||
this.baseId = baseId;
|
||||
}
|
||||
|
||||
public String getDegreeOfHarm() {
|
||||
return degreeOfHarm;
|
||||
}
|
||||
|
||||
public void setDegreeOfHarm(String degreeOfHarm) {
|
||||
this.degreeOfHarm = degreeOfHarm;
|
||||
}
|
||||
|
||||
public String getDegreeOfHarmCode() {
|
||||
return degreeOfHarmCode;
|
||||
}
|
||||
|
||||
public void setDegreeOfHarmCode(String degreeOfHarmCode) {
|
||||
this.degreeOfHarmCode = degreeOfHarmCode;
|
||||
}
|
||||
|
||||
public String getDegreeOfHarmName() {
|
||||
return degreeOfHarmName;
|
||||
}
|
||||
|
||||
public void setDegreeOfHarmName(String degreeOfHarmName) {
|
||||
this.degreeOfHarmName = degreeOfHarmName;
|
||||
}
|
||||
|
||||
public int getIsFollow() {
|
||||
return isFollow;
|
||||
}
|
||||
|
||||
public void setIsFollow(int isFollow) {
|
||||
this.isFollow = isFollow;
|
||||
}
|
||||
|
||||
public String getSchoolId() {
|
||||
return schoolId;
|
||||
}
|
||||
|
||||
public void setSchoolId(String schoolId) {
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
|
||||
public String getSchoolKeyId() {
|
||||
return schoolKeyId;
|
||||
}
|
||||
|
||||
public void setSchoolKeyId(String schoolKeyId) {
|
||||
this.schoolKeyId = schoolKeyId;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,232 @@
|
||||
package com.tengshisoft.commonmodule.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/10/26 - 10:00 上午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 学校列表
|
||||
*/
|
||||
public class SchoolListBean {
|
||||
|
||||
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 belongDept;
|
||||
private String belongDeptCode;
|
||||
private String belongDeptName;
|
||||
private String defendName;
|
||||
private String defendPhone;
|
||||
private double latitude;
|
||||
private double longitude;
|
||||
private String principalName;
|
||||
private String principalPhone;
|
||||
private String runningType;
|
||||
private String runningTypeCode;
|
||||
private String runningTypeName;
|
||||
private String safeName;
|
||||
private String safePhone;
|
||||
private String schoolAddress;
|
||||
private String schoolId;
|
||||
private String schoolName;
|
||||
private int securityCount;
|
||||
private String securityName;
|
||||
private String securityPhone;
|
||||
private int stuCount;
|
||||
|
||||
public String getBelongDept() {
|
||||
return belongDept;
|
||||
}
|
||||
|
||||
public void setBelongDept(String belongDept) {
|
||||
this.belongDept = belongDept;
|
||||
}
|
||||
|
||||
public String getBelongDeptCode() {
|
||||
return belongDeptCode;
|
||||
}
|
||||
|
||||
public void setBelongDeptCode(String belongDeptCode) {
|
||||
this.belongDeptCode = belongDeptCode;
|
||||
}
|
||||
|
||||
public String getBelongDeptName() {
|
||||
return belongDeptName;
|
||||
}
|
||||
|
||||
public void setBelongDeptName(String belongDeptName) {
|
||||
this.belongDeptName = belongDeptName;
|
||||
}
|
||||
|
||||
public String getDefendName() {
|
||||
return defendName;
|
||||
}
|
||||
|
||||
public void setDefendName(String defendName) {
|
||||
this.defendName = defendName;
|
||||
}
|
||||
|
||||
public String getDefendPhone() {
|
||||
return defendPhone;
|
||||
}
|
||||
|
||||
public void setDefendPhone(String defendPhone) {
|
||||
this.defendPhone = defendPhone;
|
||||
}
|
||||
|
||||
public double getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public void setLatitude(double latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public double getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public void setLongitude(double longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public String getPrincipalName() {
|
||||
return principalName;
|
||||
}
|
||||
|
||||
public void setPrincipalName(String principalName) {
|
||||
this.principalName = principalName;
|
||||
}
|
||||
|
||||
public String getPrincipalPhone() {
|
||||
return principalPhone;
|
||||
}
|
||||
|
||||
public void setPrincipalPhone(String principalPhone) {
|
||||
this.principalPhone = principalPhone;
|
||||
}
|
||||
|
||||
public String getRunningType() {
|
||||
return runningType;
|
||||
}
|
||||
|
||||
public void setRunningType(String runningType) {
|
||||
this.runningType = runningType;
|
||||
}
|
||||
|
||||
public String getRunningTypeCode() {
|
||||
return runningTypeCode;
|
||||
}
|
||||
|
||||
public void setRunningTypeCode(String runningTypeCode) {
|
||||
this.runningTypeCode = runningTypeCode;
|
||||
}
|
||||
|
||||
public String getRunningTypeName() {
|
||||
return runningTypeName;
|
||||
}
|
||||
|
||||
public void setRunningTypeName(String runningTypeName) {
|
||||
this.runningTypeName = runningTypeName;
|
||||
}
|
||||
|
||||
public String getSafeName() {
|
||||
return safeName;
|
||||
}
|
||||
|
||||
public void setSafeName(String safeName) {
|
||||
this.safeName = safeName;
|
||||
}
|
||||
|
||||
public String getSafePhone() {
|
||||
return safePhone;
|
||||
}
|
||||
|
||||
public void setSafePhone(String safePhone) {
|
||||
this.safePhone = safePhone;
|
||||
}
|
||||
|
||||
public String getSchoolAddress() {
|
||||
return schoolAddress;
|
||||
}
|
||||
|
||||
public void setSchoolAddress(String schoolAddress) {
|
||||
this.schoolAddress = schoolAddress;
|
||||
}
|
||||
|
||||
public String getSchoolId() {
|
||||
return schoolId;
|
||||
}
|
||||
|
||||
public void setSchoolId(String schoolId) {
|
||||
this.schoolId = schoolId;
|
||||
}
|
||||
|
||||
public String getSchoolName() {
|
||||
return schoolName;
|
||||
}
|
||||
|
||||
public void setSchoolName(String schoolName) {
|
||||
this.schoolName = schoolName;
|
||||
}
|
||||
|
||||
public int getSecurityCount() {
|
||||
return securityCount;
|
||||
}
|
||||
|
||||
public void setSecurityCount(int securityCount) {
|
||||
this.securityCount = securityCount;
|
||||
}
|
||||
|
||||
public String getSecurityName() {
|
||||
return securityName;
|
||||
}
|
||||
|
||||
public void setSecurityName(String securityName) {
|
||||
this.securityName = securityName;
|
||||
}
|
||||
|
||||
public String getSecurityPhone() {
|
||||
return securityPhone;
|
||||
}
|
||||
|
||||
public void setSecurityPhone(String securityPhone) {
|
||||
this.securityPhone = securityPhone;
|
||||
}
|
||||
|
||||
public int getStuCount() {
|
||||
return stuCount;
|
||||
}
|
||||
|
||||
public void setStuCount(int stuCount) {
|
||||
this.stuCount = stuCount;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.tengshisoft.commonmodule.holders;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021年10月26日10:12:26
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 学校案件
|
||||
*/
|
||||
public class SchoolCaseHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvName;
|
||||
public TextView mTvNumber;
|
||||
public TextView mTvTime;
|
||||
public TextView mTvType;
|
||||
public TextView mTvAddress;
|
||||
public Button mBtnDel;
|
||||
public Button mBtnEdit;
|
||||
|
||||
public SchoolCaseHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mTvName = itemView.findViewById(R.id.tv_name);
|
||||
mTvAddress = itemView.findViewById(R.id.tv_address);
|
||||
mTvNumber = itemView.findViewById(R.id.tv_number);
|
||||
mTvType = itemView.findViewById(R.id.tv_type);
|
||||
mBtnDel = itemView.findViewById(R.id.btn_del);
|
||||
mBtnEdit = itemView.findViewById(R.id.btn_edit);
|
||||
mTvTime = itemView.findViewById(R.id.tv_time);
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.tengshisoft.commonmodule.holders;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021年10月26日10:12:26
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 学校管理周边重点人员
|
||||
*/
|
||||
public class SchoolEmphasesPersonHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvHarm;
|
||||
public TextView mTvAttention;
|
||||
public Button mBtnDel;
|
||||
public Button mBtnEdit;
|
||||
|
||||
public SchoolEmphasesPersonHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mTvHarm = itemView.findViewById(R.id.tv_harm);
|
||||
mTvAttention = itemView.findViewById(R.id.tv_attention);
|
||||
mBtnDel = itemView.findViewById(R.id.btn_del);
|
||||
mBtnEdit = itemView.findViewById(R.id.btn_edit);
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.tengshisoft.commonmodule.holders;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tengshisoft.commonmodule.R;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021年10月26日10:12:26
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 学校管理
|
||||
*/
|
||||
public class SchoolListHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvName;
|
||||
public TextView mTvNumber;
|
||||
public TextView mTvSchoolMaster;
|
||||
public TextView mTvSchoolMasterPhone;
|
||||
public TextView mTvType;
|
||||
public TextView mTvAddress;
|
||||
public Button mBtnPerson;
|
||||
public Button mBtnCase;
|
||||
|
||||
public SchoolListHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mTvName = itemView.findViewById(R.id.tv_name);
|
||||
mTvAddress = itemView.findViewById(R.id.tv_address);
|
||||
mTvNumber = itemView.findViewById(R.id.tv_number);
|
||||
mTvSchoolMaster = itemView.findViewById(R.id.tv_schoolmaster);
|
||||
mTvSchoolMasterPhone = itemView.findViewById(R.id.tv_schoolmaster_phone);
|
||||
mTvType = itemView.findViewById(R.id.tv_type);
|
||||
mBtnCase = itemView.findViewById(R.id.btn_case);
|
||||
mBtnPerson = itemView.findViewById(R.id.btn_person);
|
||||
}
|
||||
}
|
@ -59,6 +59,12 @@ import com.tengshisoft.commonmodule.beans.PenalListBean;
|
||||
import com.tengshisoft.commonmodule.beans.PenalSuspicionDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.PenalSuspicionListBean;
|
||||
import com.tengshisoft.commonmodule.beans.RearListBean;
|
||||
import com.tengshisoft.commonmodule.beans.SchoolCaseDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.SchoolCaseListBean;
|
||||
import com.tengshisoft.commonmodule.beans.SchoolDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.SchoolEmphasesPersonDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.SchoolEmphasesPersonListBean;
|
||||
import com.tengshisoft.commonmodule.beans.SchoolListBean;
|
||||
import com.tengshisoft.commonmodule.beans.SuccessBean;
|
||||
import com.tengshisoft.commonmodule.beans.TaskListBean;
|
||||
import com.tengshisoft.commonmodule.beans.TroubleDetailBean;
|
||||
@ -331,6 +337,120 @@ public interface Apis {
|
||||
@Headers({"base_url_name:house", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/buildingleader/get/{buildingLeaderId}")
|
||||
Observable<BuildingManagerDetailBean> getBuildingManagerDetailById(@Path("buildingLeaderId") String id, @Header("token") String token);
|
||||
/*========================================学校管理=======================================*/
|
||||
|
||||
/**
|
||||
* 获取学校列表
|
||||
*/
|
||||
@Headers({"base_url_name:security", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/school/listpageschool")
|
||||
Observable<SchoolListBean> getSchoolList(@Query("keywords") String key, @Query("page") String page, @Header("token") String token);
|
||||
|
||||
|
||||
/**
|
||||
* 获取学校详情
|
||||
*/
|
||||
@Headers({"base_url_name:security", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/school/get/{schoolId}")
|
||||
Observable<SchoolDetailBean> getSchoolDetailById(@Path("schoolId") String id, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 新增学校
|
||||
*/
|
||||
@Headers({"base_url_name:security", "Content-Type: application/json", "Accept: application/json"})
|
||||
@POST("app/school/save")
|
||||
Observable<SuccessBean> doSaveSchool(@Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 修改学校
|
||||
*/
|
||||
@Headers({"base_url_name:security", "Content-Type: application/json", "Accept: application/json"})
|
||||
@PUT("app/school/updateschool/{schoolId}")
|
||||
Observable<SuccessBean> doEditSchool(@Path("schoolId") String id, @Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 删除学校
|
||||
*/
|
||||
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
|
||||
@DELETE("app/school/remove/{ids}")
|
||||
Observable<SuccessBean> doDelSchool(@Path("ids") String id, @Header("token") String token);
|
||||
|
||||
/*========================================学校管理周边重点人员=======================================*/
|
||||
|
||||
/**
|
||||
* 获取人员列表
|
||||
*/
|
||||
@Headers({"base_url_name:security", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/schoolkey/listpageschoolkey")
|
||||
Observable<SchoolEmphasesPersonListBean> getSchoolEmphasesPersonListById(@Query("schoolId") String id, @Query("keywords") String key, @Query("page") String page, @Header("token") String token);
|
||||
|
||||
|
||||
/**
|
||||
* 获取人员详情
|
||||
*/
|
||||
@Headers({"base_url_name:security", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/schoolkey/get/{schoolKeyId}")
|
||||
Observable<SchoolEmphasesPersonDetailBean> getSchoolEmphasesPersonDetailById(@Path("schoolKeyId") String id, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 保存重点人员
|
||||
*/
|
||||
@Headers({"base_url_name:security", "Content-Type: application/json", "Accept: application/json"})
|
||||
@POST("app/schoolkey/save")
|
||||
Observable<SuccessBean> doSaveSchoolEmphases(@Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 修改学校重点人员
|
||||
*/
|
||||
@Headers({"base_url_name:security", "Content-Type: application/json", "Accept: application/json"})
|
||||
@PUT("app/schoolkey/updateschoolkey/{schoolKeyId}")
|
||||
Observable<SuccessBean> doEditSchoolEmphases(@Path("schoolKeyId") String id, @Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 删除学校人员
|
||||
*/
|
||||
@Headers({"base_url_name:security", "Content-Type: application/json", "Accept: application/json"})
|
||||
@DELETE("app/schoolkey/remove/{ids}")
|
||||
Observable<SuccessBean> doDelSchoolEmphases(@Path("ids") String id, @Header("token") String token);
|
||||
|
||||
/*========================================学校管理==涉及师生安全案件=======================================*/
|
||||
|
||||
/**
|
||||
* 获取案件列表
|
||||
*/
|
||||
@Headers({"base_url_name:security", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/stuteasafe/listpagestuteasafe")
|
||||
Observable<SchoolCaseListBean> getSchoolCaseListById(@Query("schoolId") String id, @Query("keywords") String key, @Query("page") String page, @Header("token") String token);
|
||||
|
||||
|
||||
/**
|
||||
* 获取案件详情
|
||||
*/
|
||||
@Headers({"base_url_name:security", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/stuteasafe/get/{stuTeaSafeId}")
|
||||
Observable<SchoolCaseDetailBean> getSchoolCaseDetailById(@Path("stuTeaSafeId") String id, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 保存案件
|
||||
*/
|
||||
@Headers({"base_url_name:security", "Content-Type: application/json", "Accept: application/json"})
|
||||
@POST("app/stuteasafe/save")
|
||||
Observable<SuccessBean> doSaveSchoolCase(@Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 修改学校案件
|
||||
*/
|
||||
@Headers({"base_url_name:security", "Content-Type: application/json", "Accept: application/json"})
|
||||
@PUT("app/stuteasafe/updatestuteasafe/{stuTeaSafeId}")
|
||||
Observable<SuccessBean> doEditSchoolCase(@Path("stuTeaSafeId") String id, @Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 删除学校案件
|
||||
*/
|
||||
@Headers({"base_url_name:security", "Content-Type: application/json", "Accept: application/json"})
|
||||
@DELETE("app/stuteasafe/remove/{ids}")
|
||||
Observable<SuccessBean> doDelSchoolCase(@Path("ids") String id, @Header("token") String token);
|
||||
|
||||
/*========================================人口信息=======================================*/
|
||||
|
||||
/**
|
||||
@ -932,7 +1052,7 @@ public interface Apis {
|
||||
* 获取事件核查列表
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/check/listpage-pending")
|
||||
@GET("app/taskbase/listpage-task-examine")
|
||||
Observable<IncidentListBean> getIncidentCheckList(@Query("keywords") String key, @Query("page") String page, @Header("token") String token);
|
||||
|
||||
/**
|
||||
@ -942,6 +1062,19 @@ public interface Apis {
|
||||
@POST("app/check/save")
|
||||
Observable<SuccessBean> doSaveIncidentCheck(@Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 事件核查通过
|
||||
*/
|
||||
@Headers({"base_url_name:case", "Content-Type: application/json", "Accept: application/json"})
|
||||
@POST("app/taskcompetebase/save-examinepass/{reportId}")
|
||||
Observable<SuccessBean> doSaveIncidentCheckPass(@Path("reportId") 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-examinenopass/{reportId}")
|
||||
Observable<SuccessBean> doSaveIncidentCheckUnPass(@Path("reportId") String id, @Body RequestBody body, @Header("token") String token);
|
||||
/*=========================================任务=========================================*/
|
||||
|
||||
/**
|
||||
|
BIN
commonmodule/src/main/res/drawable-xhdpi/ic_school_icon.png
Normal file
BIN
commonmodule/src/main/res/drawable-xhdpi/ic_school_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
128
commonmodule/src/main/res/layout/item_school_case.xml
Normal file
128
commonmodule/src/main/res/layout/item_school_case.xml
Normal file
@ -0,0 +1,128 @@
|
||||
<?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">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_pic"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_school_icon" />
|
||||
|
||||
<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_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#ff353535"
|
||||
android:textSize="18sp"
|
||||
tools:text="案件名称" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_number"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp"
|
||||
tools:text="案件编号:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp"
|
||||
tools:text="发生日期:" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_edit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:text="编辑"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_del"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:text="删除"
|
||||
android:textColor="@color/white" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_line_dotted"
|
||||
android:layerType="software" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:drawableLeft="@drawable/ic_location_blue"
|
||||
android:drawablePadding="5dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textColor="#ff1189ff"
|
||||
android:textSize="12sp"
|
||||
tools:text="中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067(包哈公里)" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_status_red"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:textColor="@color/red_ff"
|
||||
android:textSize="12sp"
|
||||
tools:text="刑事案件" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -0,0 +1,99 @@
|
||||
<?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:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_harm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#ff353535"
|
||||
android:textSize="18sp"
|
||||
tools:text="危害程度" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_attention"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp"
|
||||
tools:text="是否重点关注" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_del"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:text="删除"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_edit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:text="编辑"
|
||||
android:textColor="@color/white" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_line_dotted"
|
||||
android:layerType="software"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:drawableLeft="@drawable/ic_type_icon"
|
||||
android:drawablePadding="5dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textColor="#ff1189ff"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone"
|
||||
tools:text="释放日期:2022-20-12" />
|
||||
|
||||
|
||||
</LinearLayout>
|
135
commonmodule/src/main/res/layout/item_school_list.xml
Normal file
135
commonmodule/src/main/res/layout/item_school_list.xml
Normal file
@ -0,0 +1,135 @@
|
||||
<?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">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_pic"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_school_icon" />
|
||||
|
||||
<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_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#ff353535"
|
||||
android:textSize="18sp"
|
||||
tools:text="内蒙古内蒙古内蒙古内蒙古内蒙古内蒙古" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_number"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp"
|
||||
tools:text="在校人数:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_schoolmaster"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp"
|
||||
tools:text="校长:22" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_schoolmaster_phone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp"
|
||||
tools:text="联系电话:2123" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_person"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:text="重点人员"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_case"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:text="涉及案件"
|
||||
android:textColor="@color/white" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_line_dotted"
|
||||
android:layerType="software" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:drawableLeft="@drawable/ic_location_blue"
|
||||
android:drawablePadding="5dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textColor="#ff1189ff"
|
||||
android:textSize="12sp"
|
||||
tools:text="中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067(包哈公里)" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_status_blue"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:textColor="@color/text_blue"
|
||||
android:textSize="12sp"
|
||||
tools:text="民办的其他高等教育机构" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -4,6 +4,15 @@
|
||||
package="com.tengshisoft.gridmodule">
|
||||
|
||||
<application>
|
||||
<activity android:name=".incident.activitys.schools.SchoolCaseDetailActivity"></activity>
|
||||
<activity android:name=".incident.activitys.schools.SchoolCaseAddActivity" />
|
||||
<activity android:name=".incident.activitys.schools.SchoolCaseListActivity" />
|
||||
<activity android:name=".incident.activitys.schools.SchoolEmphasesDetailActivity" />
|
||||
<activity android:name=".incident.activitys.schools.SchoolEmphasesAddActivity" />
|
||||
<activity android:name=".incident.activitys.schools.SchoolEmphasesListActivity" />
|
||||
<activity android:name=".incident.activitys.schools.SchoolManageDetailActivity" />
|
||||
<activity android:name=".incident.activitys.schools.SchoolManageAddActivity" />
|
||||
<activity android:name=".incident.activitys.schools.SchoolManageListActivity" />
|
||||
<activity android:name=".incident.activitys.patrols.ExpressPatrolEditActivity" />
|
||||
<activity android:name=".incident.activitys.patrols.ExpressPatrolDetailActivity" />
|
||||
<activity android:name=".incident.activitys.patrols.ExpressPatrolAddActivity" />
|
||||
@ -51,7 +60,6 @@
|
||||
<activity android:name=".incident.activitys.tasks.TaskDetailActivity" />
|
||||
<activity android:name=".incident.activitys.tasks.TaskReportActivity" />
|
||||
<activity android:name=".incident.activitys.tasks.TaskManageActivity" />
|
||||
|
||||
<activity
|
||||
android:name=".incident.activitys.populace.CensusYoungListActivity"
|
||||
android:screenOrientation="portrait"
|
||||
@ -77,37 +85,31 @@
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden"
|
||||
tools:ignore="LockedOrientationActivity" />
|
||||
|
||||
<activity
|
||||
android:name=".incident.activitys.populace.special.CensusTroubleListActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden"
|
||||
tools:ignore="LockedOrientationActivity" />
|
||||
|
||||
<activity
|
||||
android:name=".incident.activitys.populace.special.CensusDrugDetailActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden"
|
||||
tools:ignore="LockedOrientationActivity" />
|
||||
|
||||
<activity
|
||||
android:name=".incident.activitys.populace.special.CensusDrugAddActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden"
|
||||
tools:ignore="LockedOrientationActivity" />
|
||||
|
||||
<activity
|
||||
android:name=".incident.activitys.populace.special.CensusDrugListActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden"
|
||||
tools:ignore="LockedOrientationActivity" />
|
||||
|
||||
<activity
|
||||
android:name=".incident.activitys.populace.special.CensusSpecialCriminalListActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden"
|
||||
tools:ignore="LockedOrientationActivity" />
|
||||
|
||||
<activity
|
||||
android:name=".incident.activitys.populace.special.CensusSpecialCriminalAddActivity"
|
||||
android:screenOrientation="portrait"
|
||||
|
@ -205,22 +205,64 @@ public class IncidentCheckDetailActivity extends BaseActivity {
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
mBtnConfirm.setOnClickListener(v -> doConfirm("approved"));
|
||||
mBtnRollBack.setOnClickListener(v -> doConfirm("failed"));
|
||||
mBtnConfirm.setOnClickListener(v -> doConfirm());
|
||||
mBtnRollBack.setOnClickListener(v -> doUnPass());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交核查信息
|
||||
* 事件核查不通过
|
||||
*/
|
||||
private void doConfirm(String state) {
|
||||
private void doUnPass() {
|
||||
if (checkParams()) {
|
||||
RequestBody body = buildParams(state);
|
||||
RequestBody body = buildParams();
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.doSaveIncidentCheck(body, UserLgUtils.getToken())
|
||||
.doSaveIncidentCheckUnPass(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 doConfirm() {
|
||||
if (checkParams()) {
|
||||
RequestBody body = buildParams();
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.doSaveIncidentCheckPass(mId, body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
@ -286,14 +328,13 @@ public class IncidentCheckDetailActivity extends BaseActivity {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private RequestBody buildParams(String state) {
|
||||
private RequestBody buildParams() {
|
||||
SaveCheckBean bean = new SaveCheckBean();
|
||||
bean.setTaskId(mTaskId);
|
||||
bean.setReportId(mId);
|
||||
String trim = mEtContent.getText().toString().trim();
|
||||
bean.setCheckContent(trim);
|
||||
bean.setCheckPhotos(mPhotoIds);
|
||||
bean.setCheckStatus(state);
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(bean);
|
||||
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
|
@ -151,10 +151,10 @@ public class CensusMigrantDetailActivity extends BaseActivity {
|
||||
mTvBaseGender.setText(mBaseInfo.getGenderDictionaryName());
|
||||
mTvBaseIdCard.setText(mBaseInfo.getIdCardNumber());//身份证
|
||||
mTvBasePhone.setText(mBaseInfo.getTelephone());//联系电话
|
||||
mTvBaseNative.setText(mBaseInfo.getNativePlace());//籍贯
|
||||
mTvBaseNative.setText(mBaseInfo.getNativePlaceDictionaryName());//籍贯
|
||||
mTvBaseNation.setText(mBaseInfo.getNationDictionaryName());//名族
|
||||
mTvBaseRegisterLoc.setText(mBaseInfo.getRegisteredResidence());//户籍地
|
||||
mTvBaseCurLoc.setText(mBaseInfo.getCurrentResidence());//现住址
|
||||
mTvBaseRegisterLoc.setText(mBaseInfo.getRegisteredResidenceDictionaryName());//户籍地
|
||||
mTvBaseCurLoc.setText(mBaseInfo.getCurrentResidenceDictionaryName());//现住址
|
||||
mTvBaseCurAddress.setText(mBaseInfo.getCurrentResidenceAddr());//现住址详情
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,542 @@
|
||||
package com.tengshisoft.gridmodule.incident.activitys.schools;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.graphics.Color;
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||
import com.bigkoo.pickerview.view.TimePickerView;
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.tengshisoft.commonmodule.beans.SaveSchoolCaseBean;
|
||||
import com.tengshisoft.commonmodule.beans.SchoolCaseDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.SuccessBean;
|
||||
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.DicBean;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
import com.tenlionsoft.baselib.core.widget.views.AreaChooseDialog;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.TimeUtils;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import androidx.core.widget.NestedScrollView;
|
||||
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月26日16:28:13
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 涉及师生案件
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_CASE_ADD)
|
||||
public class SchoolCaseAddActivity extends BaseActivity {
|
||||
|
||||
|
||||
@BindView(R2.id.et_number)
|
||||
EditText mEtNumber;
|
||||
@BindView(R2.id.et_name)
|
||||
EditText mEtName;
|
||||
@BindView(R2.id.tv_date)
|
||||
TextView mTvDate;
|
||||
@BindView(R2.id.tv_area)
|
||||
TextView mTvArea;
|
||||
@BindView(R2.id.et_address)
|
||||
EditText mEtAddress;
|
||||
@BindView(R2.id.tv_nature_type)
|
||||
TextView mTvNatureType;
|
||||
@BindView(R2.id.et_info)
|
||||
EditText mEtInfo;
|
||||
@BindView(R2.id.tv_card_type)
|
||||
TextView mTvCardType;
|
||||
@BindView(R2.id.et_card_number)
|
||||
EditText mEtCardNumber;
|
||||
@BindView(R2.id.et_crimianl_name)
|
||||
EditText mEtCrimianlName;
|
||||
@BindView(R2.id.sw_is_crack)
|
||||
SwitchCompat mSwIsCrack;
|
||||
@BindView(R2.id.et_offence_count)
|
||||
EditText mEtOffenceCount;
|
||||
@BindView(R2.id.et_flee_count)
|
||||
EditText mEtFleeCount;
|
||||
@BindView(R2.id.et_catch_count)
|
||||
EditText mEtCatchCount;
|
||||
@BindView(R2.id.et_detect)
|
||||
EditText mEtDetect;
|
||||
@BindView(R2.id.btn_submit)
|
||||
Button mBtnSubmit;
|
||||
@BindView(R2.id.nsv_content)
|
||||
NestedScrollView mNsvContent;
|
||||
private Unbinder mBind;
|
||||
private String mId;
|
||||
private OptionsPickerView<DicBean> mCardTypePicker;
|
||||
private List<DicBean> mCardType;
|
||||
private DicBean mSelCardType;
|
||||
|
||||
private OptionsPickerView<DicBean> mNaturePicker;
|
||||
private List<DicBean> mNatureList;
|
||||
private DicBean mSelNature;
|
||||
|
||||
private String mSelAreaCode;
|
||||
private String mSelAreaId;
|
||||
private String mSelAreaName;
|
||||
private String mSchoolId;
|
||||
private SchoolCaseDetailBean mBean;
|
||||
private int mIsSw = 0;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_school_case_add;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mId = getIntent().getStringExtra("id");
|
||||
mSchoolId = getIntent().getStringExtra("schoolId");
|
||||
initViews();
|
||||
if (TextUtils.isEmpty(mId)) {
|
||||
mTvBaseTitle.setText("涉及师生安全案件信息录入");
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
} else {
|
||||
mTvBaseTitle.setText("涉及师生安全案件信息编辑");
|
||||
getDetailData();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
*/
|
||||
private void getDetailData() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.getSchoolCaseDetailById(mId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SchoolCaseDetailBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull SchoolCaseDetailBean schoolCaseDetailBean) {
|
||||
mBean = schoolCaseDetailBean;
|
||||
setDataToView();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 初始化视图
|
||||
*/
|
||||
private void initViews() {
|
||||
mTvCardType.setOnClickListener(v -> onShowCardType());
|
||||
mTvNatureType.setOnClickListener(v -> onShowNature());
|
||||
mTvArea.setOnClickListener(v -> onShowArea());
|
||||
mTvDate.setOnClickListener(v -> onShowDate());
|
||||
mBtnSubmit.setOnClickListener(v -> doConfirm());
|
||||
mSwIsCrack.setOnCheckedChangeListener((buttonView, isChecked) -> mIsSw = isChecked ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交
|
||||
*/
|
||||
private void doConfirm() {
|
||||
if (!TextUtils.isEmpty(mId)) {
|
||||
doEdit();
|
||||
} else {
|
||||
doSave();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
private void doSave() {
|
||||
if (checkParams()) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中...");
|
||||
dialog.show();
|
||||
RequestBody body = buildParams();
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.doSaveSchoolCase(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 doEdit() {
|
||||
if (checkParams()) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中...");
|
||||
dialog.show();
|
||||
RequestBody body = buildParams();
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.doEditSchoolCase(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 onShowNature() {
|
||||
hideSoftKeyboard();
|
||||
if (mNatureList != null && mNatureList.size() > 0) {
|
||||
if (mNaturePicker == null) {
|
||||
mNaturePicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
|
||||
mSelNature = mNatureList.get(o1);
|
||||
mTvNatureType.setText(mSelNature.getDataName());
|
||||
})
|
||||
.setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mNaturePicker.setPicker(mNatureList);
|
||||
}
|
||||
mNaturePicker.show();
|
||||
} else {
|
||||
getDicListByType(PathConfig.DIC_CASE_NATURE, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示证件类型
|
||||
*/
|
||||
private void onShowCardType() {
|
||||
hideSoftKeyboard();
|
||||
if (mCardType != null && mCardType.size() > 0) {
|
||||
if (mCardTypePicker == null) {
|
||||
mCardTypePicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
|
||||
mSelCardType = mCardType.get(o1);
|
||||
mTvCardType.setText(mSelCardType.getDataName());
|
||||
})
|
||||
.setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mCardTypePicker.setPicker(mCardType);
|
||||
}
|
||||
mCardTypePicker.show();
|
||||
} else {
|
||||
getDicListByType(PathConfig.DIC_CARD_TYPE, 2);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示地区选择
|
||||
*/
|
||||
private void onShowArea() {
|
||||
AreaChooseDialog dialog = new AreaChooseDialog
|
||||
.DialogBuilder(mActivity)
|
||||
.setDefault(true)
|
||||
.build();
|
||||
dialog.addOnChoseListener((names, id, code) -> {
|
||||
mSelAreaCode = code;
|
||||
mSelAreaId = id;
|
||||
mSelAreaName = names;
|
||||
mTvArea.setText(names);
|
||||
dialog.dismiss();
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
private void onShowDate() {
|
||||
hideSoftKeyboard();
|
||||
TimePickerView mTimePickerView = new TimePickerBuilder(mActivity, (date, v) -> mTvDate.setText(TimeUtils.dateToString(date)))
|
||||
.setTitleText("请选日期")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setType(new boolean[]{true, true, true, false, false, false})
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mTimePickerView.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典
|
||||
*/
|
||||
private void getDicListByType(String pId, int i) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.getDictListAllByPid(pId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<DicBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull List<DicBean> typeListBeans) {
|
||||
dialog.dismiss();
|
||||
if (typeListBeans.size() > 0) {
|
||||
switch (i) {
|
||||
case 1:
|
||||
mNatureList = typeListBeans;
|
||||
onShowNature();
|
||||
break;
|
||||
case 2:
|
||||
mCardType = typeListBeans;
|
||||
onShowCardType();
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
ToastUtils.show("暂无数据");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验参数
|
||||
*/
|
||||
private boolean checkParams() {
|
||||
String name = mEtName.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
ToastUtils.show("请输入案(事)件名称");
|
||||
return false;
|
||||
}
|
||||
String date = mTvDate.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(date)) {
|
||||
ToastUtils.show("请选择发生日期");
|
||||
return false;
|
||||
}
|
||||
if (TextUtils.isEmpty(mSelAreaId)) {
|
||||
ToastUtils.show("请选择案发地");
|
||||
return false;
|
||||
}
|
||||
String address = mEtAddress.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(address)) {
|
||||
ToastUtils.show("请输入案发地点详址");
|
||||
return false;
|
||||
}
|
||||
if (mSelNature == null) {
|
||||
ToastUtils.show("请选择案(事)件性质");
|
||||
return false;
|
||||
}
|
||||
String info = mEtInfo.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(info)) {
|
||||
ToastUtils.show("请输入案(事)件情况");
|
||||
return false;
|
||||
}
|
||||
if (mSelCardType == null) {
|
||||
ToastUtils.show("请选择主犯(嫌疑人)证件类型");
|
||||
return false;
|
||||
}
|
||||
String cardNum = mEtCardNumber.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(cardNum)) {
|
||||
ToastUtils.show("请输入主犯(嫌疑人)证件号码");
|
||||
return false;
|
||||
}
|
||||
String crimeName = mEtCrimianlName.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(crimeName)) {
|
||||
ToastUtils.show("请输入主犯(嫌疑人)姓名");
|
||||
return false;
|
||||
}
|
||||
String detect = mEtDetect.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(detect)) {
|
||||
ToastUtils.show("请输入案件侦破情况");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 回显数据
|
||||
*/
|
||||
private void setDataToView() {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mEtNumber.setText(mBean.getCaseCode());
|
||||
mEtName.setText(mBean.getCaseName());
|
||||
mTvDate.setText(mBean.getHappenTime());
|
||||
mSelAreaId = mBean.getHappenLocation();
|
||||
mSelAreaCode = mBean.getHappenLocationCode();
|
||||
mSelAreaName = mBean.getHappenLocationName();
|
||||
mTvArea.setText(mSelAreaName);
|
||||
mEtAddress.setText(mBean.getHappenAddress());
|
||||
mSelNature = new DicBean();
|
||||
mSelNature.setDataName(mBean.getCaseNatureName());
|
||||
mSelNature.setDataId(mBean.getCaseNature());
|
||||
mSelNature.setDataSummary(mBean.getCaseNatureCode());
|
||||
mTvNatureType.setText(mBean.getCaseNatureName());
|
||||
|
||||
mEtInfo.setText(Html.fromHtml(mBean.getCaseSituation()));
|
||||
mSelCardType = new DicBean();
|
||||
mSelCardType.setDataSummary(mBean.getPrincipalCardCodeCode());
|
||||
mSelCardType.setDataId(mBean.getPrincipalCardCode());
|
||||
mSelCardType.setDataName(mBean.getPrincipalCardCodeName());
|
||||
mTvCardType.setText(mBean.getPrincipalCardCodeName());
|
||||
|
||||
mEtCardNumber.setText(mBean.getPrincipalCardNum());
|
||||
mEtCrimianlName.setText(mBean.getPrincipalName());
|
||||
mSwIsCrack.setChecked(mBean.getIsSolve() == 1);
|
||||
mIsSw = mBean.getIsSolve();
|
||||
mEtOffenceCount.setText(mBean.getCrimeCount() + "");
|
||||
mEtFleeCount.setText(mBean.getAtLargeCount() + "");
|
||||
mEtCatchCount.setText(mBean.getArrestCount() + "");
|
||||
mEtDetect.setText(Html.fromHtml(mBean.getCaseSolve()));
|
||||
}
|
||||
|
||||
private RequestBody buildParams() {
|
||||
SaveSchoolCaseBean bean = new SaveSchoolCaseBean();
|
||||
bean.setSchoolId(mSchoolId);
|
||||
String number = mEtNumber.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(number)) {
|
||||
bean.setCaseCode(number);
|
||||
}
|
||||
String name = mEtName.getText().toString().trim();
|
||||
bean.setCaseName(name);
|
||||
String date = mTvDate.getText().toString().trim();
|
||||
bean.setHappenTime(date);
|
||||
bean.setHappenLocation(mSelAreaId);
|
||||
bean.setHappenLocationCode(mSelAreaCode);
|
||||
bean.setHappenLocationName(mSelAreaName);
|
||||
String addres = mEtAddress.getText().toString().trim();
|
||||
bean.setHappenAddress(addres);
|
||||
bean.setCaseNature(mSelNature.getDataId());
|
||||
bean.setCaseNatureCode(mSelNature.getDataSummary());
|
||||
bean.setCaseNatureName(mSelNature.getDataName());
|
||||
|
||||
String info = mEtInfo.getText().toString().trim();
|
||||
bean.setCaseSituation(info);
|
||||
bean.setPrincipalCardCode(mSelCardType.getDataId());
|
||||
bean.setPrincipalCardCodeCode(mSelCardType.getDataSummary());
|
||||
bean.setPrincipalCardCodeName(mSelCardType.getDataName());
|
||||
String cardNumber = mEtCardNumber.getText().toString().trim();
|
||||
bean.setPrincipalCardNum(cardNumber);
|
||||
String criminalName = mEtCrimianlName.getText().toString().trim();
|
||||
bean.setPrincipalName(criminalName);
|
||||
bean.setIsSolve(mIsSw);
|
||||
|
||||
String offenceCount = mEtOffenceCount.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(offenceCount)) {
|
||||
bean.setCrimeCount(Integer.parseInt(offenceCount));
|
||||
}
|
||||
String catchCount = mEtCatchCount.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(catchCount)) {
|
||||
bean.setArrestCount(Integer.parseInt(catchCount));
|
||||
}
|
||||
String fleeCount = mEtFleeCount.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(fleeCount)) {
|
||||
bean.setAtLargeCount(Integer.parseInt(fleeCount));
|
||||
}
|
||||
String detect = mEtDetect.getText().toString().trim();
|
||||
bean.setCaseSolve(detect);
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(bean);
|
||||
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
return requestBody;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,141 @@
|
||||
package com.tengshisoft.gridmodule.incident.activitys.schools;
|
||||
|
||||
import android.text.Html;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.tengshisoft.commonmodule.beans.SchoolCaseDetailBean;
|
||||
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.DicBean;
|
||||
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 androidx.appcompat.widget.SwitchCompat;
|
||||
import androidx.core.widget.NestedScrollView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
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月26日16:28:13
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 涉及师生案件
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_CASE_DETAIL)
|
||||
public class SchoolCaseDetailActivity extends BaseActivity {
|
||||
|
||||
|
||||
@BindView(R2.id.tv_number)
|
||||
TextView mTvNumber;
|
||||
@BindView(R2.id.tv_name)
|
||||
TextView mTvName;
|
||||
@BindView(R2.id.tv_date)
|
||||
TextView mTvDate;
|
||||
@BindView(R2.id.tv_area)
|
||||
TextView mTvArea;
|
||||
@BindView(R2.id.tv_address)
|
||||
TextView mTvAddress;
|
||||
@BindView(R2.id.tv_nature_type)
|
||||
TextView mTvNatureType;
|
||||
@BindView(R2.id.tv_info)
|
||||
TextView mTvInfo;
|
||||
@BindView(R2.id.tv_card_type)
|
||||
TextView mTvCardType;
|
||||
@BindView(R2.id.tv_card_number)
|
||||
TextView mTvCardNumber;
|
||||
@BindView(R2.id.tv_criminal_name)
|
||||
TextView mTvCriminalName;
|
||||
@BindView(R2.id.sw_is_crack)
|
||||
SwitchCompat mSwIsCrack;
|
||||
@BindView(R2.id.tv_offence_count)
|
||||
TextView mTvOffenceCount;
|
||||
@BindView(R2.id.tv_flee_count)
|
||||
TextView mTvFleeCount;
|
||||
@BindView(R2.id.tv_catch_count)
|
||||
TextView mTvCatchCount;
|
||||
@BindView(R2.id.tv_detect)
|
||||
TextView mTvDetect;
|
||||
@BindView(R2.id.nsv_content)
|
||||
NestedScrollView mNsvContent;
|
||||
private SchoolCaseDetailBean mBean;
|
||||
private String mId;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_school_case_detail;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("涉及师生安全案件详情");
|
||||
mId = getIntent().getStringExtra("id");
|
||||
getDetailData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
*/
|
||||
private void getDetailData() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.getSchoolCaseDetailById(mId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SchoolCaseDetailBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull SchoolCaseDetailBean schoolCaseDetailBean) {
|
||||
mBean = schoolCaseDetailBean;
|
||||
setDataToView();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 回显数据
|
||||
*/
|
||||
private void setDataToView() {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mTvNumber.setText(mBean.getCaseCode());
|
||||
mTvName.setText(mBean.getCaseName());
|
||||
mTvDate.setText(mBean.getHappenTime());
|
||||
mTvArea.setText(mBean.getHappenLocationName());
|
||||
mTvAddress.setText(mBean.getHappenAddress());
|
||||
mTvNatureType.setText(mBean.getCaseNatureName());
|
||||
mTvInfo.setText(Html.fromHtml(mBean.getCaseSituation()));
|
||||
mTvCardType.setText(mBean.getPrincipalCardCodeName());
|
||||
mTvCardNumber.setText(mBean.getPrincipalCardNum());
|
||||
mTvCriminalName.setText(mBean.getPrincipalName());
|
||||
mTvOffenceCount.setText(mBean.getCrimeCount() + "");
|
||||
mTvFleeCount.setText(mBean.getAtLargeCount() + "");
|
||||
mTvCatchCount.setText(mBean.getArrestCount() + "");
|
||||
mSwIsCrack.setChecked(mBean.getIsSolve() == 1);
|
||||
mTvDetect.setText(Html.fromHtml(mBean.getCaseSolve()));
|
||||
}
|
||||
}
|
@ -0,0 +1,353 @@
|
||||
package com.tengshisoft.gridmodule.incident.activitys.schools;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
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.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
import com.tengshisoft.commonmodule.adapters.SchoolCaseAdapter;
|
||||
import com.tengshisoft.commonmodule.adapters.SchoolEmphasesPersonAdapter;
|
||||
import com.tengshisoft.commonmodule.beans.SchoolCaseListBean;
|
||||
import com.tengshisoft.commonmodule.beans.SchoolEmphasesPersonListBean;
|
||||
import com.tengshisoft.commonmodule.beans.SuccessBean;
|
||||
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.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.nio.file.Path;
|
||||
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月26日16:28:13
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 涉及师生案件
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_CASE_LIST)
|
||||
public class SchoolCaseListActivity extends BaseActivity {
|
||||
|
||||
|
||||
@BindView(R2.id.srl_content)
|
||||
SmartRefreshLayout mSrlContent;
|
||||
@BindView(R2.id.rlv_buildings)
|
||||
RecyclerView mRlvBuildings;
|
||||
@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.pb_loading)
|
||||
ProgressBar mPbLoading;
|
||||
@BindView(R2.id.iv_empty_data)
|
||||
ImageView mIvEmptyData;
|
||||
@BindView(R2.id.tv_error_hint)
|
||||
TextView mTvErrorHint;
|
||||
|
||||
|
||||
private Unbinder mBind;
|
||||
private int mCurrentPage = 1;//当前页数
|
||||
private int mTotalSize;//总数
|
||||
private List<SchoolCaseListBean.RowsBean> mDatas;
|
||||
private SchoolCaseAdapter mAdapter;
|
||||
private String mKeywords = "";
|
||||
private int mType;
|
||||
private String mId;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_school_case_list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("涉及师生安全案件");
|
||||
mId = getIntent().getStringExtra("schoolId");
|
||||
mDatas = new ArrayList<>();
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
mTvPublish.setText("录入");
|
||||
mTvPublish.setOnClickListener(v -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_CASE_ADD)
|
||||
.withString("schoolId", mId)
|
||||
.navigation(mActivity, 12));
|
||||
mAdapter = new SchoolCaseAdapter(mActivity, mDatas);
|
||||
mSrlContent.setOnLoadMoreListener(refreshLayout -> loadMore());
|
||||
mSrlContent.setOnRefreshListener(refreshLayout -> doRefresh());
|
||||
mRlvBuildings.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvBuildings.setAdapter(mAdapter);
|
||||
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
setStateView(13);
|
||||
getSchoolEmphasesPersonList(1);
|
||||
mBtnBaseSearch.setOnClickListener(v -> doSearch());
|
||||
mIvBaseClear.setOnClickListener(v -> {
|
||||
mKeywords = "";
|
||||
mEtBaseSearchContent.setText("");
|
||||
doRefresh();
|
||||
});
|
||||
mAdapter.addOnItemClickListener(this::showDetail);
|
||||
mAdapter.addOnEditListener(new SchoolCaseAdapter.OnEditListener() {
|
||||
@Override
|
||||
public void onEdit(SchoolCaseListBean.RowsBean bean, int pos) {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_CASE_ADD)
|
||||
.withString("id", bean.getStuTeaSafeId())
|
||||
.withString("schoolId", bean.getSchoolId())
|
||||
.navigation(mActivity, 12);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDel(SchoolCaseListBean.RowsBean bean, int pos) {
|
||||
doDel(bean, pos);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除人员
|
||||
*/
|
||||
private void doDel(SchoolCaseListBean.RowsBean bean, int pos) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
|
||||
builder.setTitle("提示")
|
||||
.setMessage("确定要删除该条信息吗?")
|
||||
.setPositiveButton("确定", (dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
ProgressDialog dialog1 = UIUtil.initDialog(mActivity, "删除中...");
|
||||
dialog1.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.doDelSchoolCase(bean.getStuTeaSafeId(), 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) {
|
||||
dialog1.dismiss();
|
||||
ToastUtils.show("删除成功");
|
||||
doRefresh();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog1.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
})
|
||||
.setNegativeButton("取消", (dialog, which) -> dialog.dismiss())
|
||||
.create()
|
||||
.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示详情
|
||||
*/
|
||||
private void showDetail(SchoolCaseListBean.RowsBean b) {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_CASE_DETAIL)
|
||||
.withString("id", b.getStuTeaSafeId())
|
||||
.navigation();
|
||||
}
|
||||
|
||||
@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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学校列表
|
||||
*
|
||||
* @param currentPage
|
||||
*/
|
||||
private void getSchoolEmphasesPersonList(int currentPage) {
|
||||
mCurrentPage = currentPage;
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.getSchoolCaseListById(mId, mKeywords, mCurrentPage + "", UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SchoolCaseListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull SchoolCaseListBean communityListBean) {
|
||||
if (communityListBean != null && 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 {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(true);
|
||||
if (currentPage > 1) {
|
||||
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() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private void doSearch() {
|
||||
hideSoftKeyboard();
|
||||
String searchContent = mEtBaseSearchContent.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(searchContent)) {
|
||||
hideSoftKeyboard();
|
||||
setStateView(13);
|
||||
mKeywords = searchContent;
|
||||
mCurrentPage = 1;
|
||||
getSchoolEmphasesPersonList(mCurrentPage);
|
||||
|
||||
} else {
|
||||
ToastUtils.show("请输入要查询的内容");
|
||||
}
|
||||
}
|
||||
|
||||
//加载更多
|
||||
private void loadMore() {
|
||||
getSchoolEmphasesPersonList(mCurrentPage);
|
||||
}
|
||||
|
||||
//刷新
|
||||
private void doRefresh() {
|
||||
mDatas.clear();
|
||||
mAdapter.setData(mDatas);
|
||||
getSchoolEmphasesPersonList(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据状态显示
|
||||
* 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,465 @@
|
||||
package com.tengshisoft.gridmodule.incident.activitys.schools;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.graphics.Color;
|
||||
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.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.tengshisoft.commonmodule.beans.SaveEmphasesBean;
|
||||
import com.tengshisoft.commonmodule.beans.SchoolEmphasesPersonDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.SuccessBean;
|
||||
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.DicBean;
|
||||
import com.tenlionsoft.baselib.core.beans.PersonSearchBean;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.api.BaseApiService;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.RegexUtils;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2021年10月26日14:54:53
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 学校管理-周边重点人员
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_EMPHASES_PERSON_ADD)
|
||||
public class SchoolEmphasesAddActivity extends BaseActivity {
|
||||
|
||||
|
||||
@BindView(R2.id.et_search_centent)
|
||||
EditText mEtSearchCentent;
|
||||
@BindView(R2.id.iv_clear)
|
||||
ImageView mIvClear;
|
||||
@BindView(R2.id.btn_search)
|
||||
Button mBtnSearch;
|
||||
@BindView(R2.id.ll_search_content)
|
||||
LinearLayout mLlSearchContent;
|
||||
@BindView(R2.id.tv_base_name)
|
||||
TextView mTvBaseName;
|
||||
@BindView(R2.id.tv_base_former_name)
|
||||
TextView mTvBaseFormerName;
|
||||
@BindView(R2.id.tv_base_gender)
|
||||
TextView mTvBaseGender;
|
||||
@BindView(R2.id.tv_base_id_card)
|
||||
TextView mTvBaseIdCard;
|
||||
@BindView(R2.id.tv_base_phone)
|
||||
TextView mTvBasePhone;
|
||||
@BindView(R2.id.tv_base_native)
|
||||
TextView mTvBaseNative;
|
||||
@BindView(R2.id.tv_base_nation)
|
||||
TextView mTvBaseNation;
|
||||
@BindView(R2.id.tv_base_register_loc)
|
||||
TextView mTvBaseRegisterLoc;
|
||||
@BindView(R2.id.tv_base_cur_loc)
|
||||
TextView mTvBaseCurLoc;
|
||||
@BindView(R2.id.tv_base_cur_address)
|
||||
TextView mTvBaseCurAddress;
|
||||
@BindView(R2.id.cv_base_info_detail)
|
||||
CardView mCvBaseInfoDetail;
|
||||
@BindView(R2.id.tv_harm)
|
||||
TextView mTvHarm;
|
||||
@BindView(R2.id.sw_attention)
|
||||
SwitchCompat mSwAttention;
|
||||
@BindView(R2.id.btn_confirm)
|
||||
Button mBtnConfirm;
|
||||
@BindView(R2.id.ll_content)
|
||||
LinearLayout mLlContent;
|
||||
private Unbinder mBind;
|
||||
private String mPersonId;
|
||||
private String mId;
|
||||
private String mSchoolId;
|
||||
private PersonSearchBean mBaseInfo;
|
||||
private SchoolEmphasesPersonDetailBean mDetailBean;
|
||||
private int mIsAttention = 0;
|
||||
private OptionsPickerView<DicBean> mTypePicker;
|
||||
private List<DicBean> mTypeList;
|
||||
private DicBean mSelType;
|
||||
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_school_emphases_add;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mPersonId = getIntent().getStringExtra("personId");
|
||||
mId = getIntent().getStringExtra("id");
|
||||
mSchoolId = getIntent().getStringExtra("schoolId");
|
||||
initView();
|
||||
if (TextUtils.isEmpty(mId)) {
|
||||
//添加
|
||||
mLlSearchContent.setVisibility(View.VISIBLE);
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mTvBaseTitle.setText("学校周边重点人员录入");
|
||||
} else {
|
||||
//编辑
|
||||
mLlSearchContent.setVisibility(View.GONE);
|
||||
refreshView(STATE_LOAD_LOADING);
|
||||
getDetailData();
|
||||
mTvBaseTitle.setText("学校周边重点人员信息编辑");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
*/
|
||||
private void getDetailData() {
|
||||
Observable<PersonSearchBean> personBaseBean = RetrofitManager.getInstance().create(Apis.class).getBaseInfoDetailById(mPersonId, UserLgUtils.getToken());
|
||||
Observable<SchoolEmphasesPersonDetailBean> detailById = RetrofitManager.getInstance().create(Apis.class).getSchoolEmphasesPersonDetailById(mId, UserLgUtils.getToken());
|
||||
Observable.merge(personBaseBean, detailById)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<Object>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull Object o) {
|
||||
if (o instanceof PersonSearchBean) {
|
||||
mBaseInfo = (PersonSearchBean) o;
|
||||
setBaseInfo();
|
||||
} else if (o instanceof SchoolEmphasesPersonDetailBean) {
|
||||
mDetailBean = (SchoolEmphasesPersonDetailBean) o;
|
||||
setInfo();
|
||||
}
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
ExceptionHandler.handleException(e);
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 回显数据
|
||||
*/
|
||||
private void setInfo() {
|
||||
mSelType = new DicBean();
|
||||
mSelType.setDataSummary(mDetailBean.getDegreeOfHarmCode());
|
||||
mSelType.setDataId(mDetailBean.getDegreeOfHarm());
|
||||
mSelType.setDataName(mDetailBean.getDegreeOfHarmName());
|
||||
mTvHarm.setText(mDetailBean.getDegreeOfHarmName());
|
||||
mSwAttention.setChecked(mDetailBean.getIsFollow() == 1);
|
||||
mIsAttention = mDetailBean.getIsFollow();
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化视图
|
||||
*/
|
||||
private void initView() {
|
||||
mEtSearchCentent.setHint("请输入人员身份证号码");
|
||||
mBtnSearch.setOnClickListener(v -> doSearchPerson());
|
||||
mIvClear.setOnClickListener(v -> mEtSearchCentent.setText(""));
|
||||
mTvHarm.setOnClickListener(v -> onShowHarm());
|
||||
mSwAttention.setOnCheckedChangeListener((buttonView, isChecked) -> mIsAttention = isChecked ? 1 : 0);
|
||||
mBtnConfirm.setOnClickListener(v -> doConfirm());
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交
|
||||
*/
|
||||
private void doConfirm() {
|
||||
if (TextUtils.isEmpty(mId)) {
|
||||
//新增
|
||||
doSave();
|
||||
} else {
|
||||
//编辑
|
||||
doEdit();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
private void doEdit() {
|
||||
if (checkParams()) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中...");
|
||||
dialog.show();
|
||||
RequestBody body = buildParams();
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.doEditSchoolEmphases(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 doSave() {
|
||||
if (checkParams()) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中...");
|
||||
dialog.show();
|
||||
RequestBody body = buildParams();
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.doSaveSchoolEmphases(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() {
|
||||
if (mBaseInfo == null) {
|
||||
ToastUtils.show("请输入人员身份证号码进行搜索");
|
||||
return false;
|
||||
}
|
||||
if (mSelType == null) {
|
||||
ToastUtils.show("请选择危害程度");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建参数
|
||||
*/
|
||||
private RequestBody buildParams() {
|
||||
SaveEmphasesBean bean = new SaveEmphasesBean();
|
||||
bean.setBaseId(mBaseInfo.getBasePopulationInfoId());
|
||||
bean.setSchoolId(mSchoolId);
|
||||
bean.setDegreeOfHarm(mSelType.getDataId());
|
||||
bean.setDegreeOfHarmCode(mSelType.getDataSummary());
|
||||
bean.setDegreeOfHarmName(mSelType.getDataName());
|
||||
bean.setIsFollow(mIsAttention);
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(bean);
|
||||
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
return requestBody;
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示危害程度
|
||||
*/
|
||||
private void onShowHarm() {
|
||||
hideSoftKeyboard();
|
||||
if (mTypeList != null && mTypeList.size() > 0) {
|
||||
if (mTypePicker == null) {
|
||||
mTypePicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
|
||||
mSelType = mTypeList.get(o1);
|
||||
mTvHarm.setText(mSelType.getDataName());
|
||||
})
|
||||
.setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mTypePicker.setPicker(mTypeList);
|
||||
}
|
||||
mTypePicker.show();
|
||||
} else {
|
||||
getDicListByType(PathConfig.DIC_HARM_LEVEL, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典
|
||||
*/
|
||||
private void getDicListByType(String pId, int i) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.getDictListAllByPid(pId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<DicBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull List<DicBean> typeListBeans) {
|
||||
dialog.dismiss();
|
||||
if (typeListBeans.size() > 0) {
|
||||
switch (i) {
|
||||
case 1:
|
||||
mTypeList = typeListBeans;
|
||||
onShowHarm();
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
ToastUtils.show("暂无数据");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索人员基础信息
|
||||
*/
|
||||
private void doSearchPerson() {
|
||||
String searchIdCard = mEtSearchCentent.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(searchIdCard) || !RegexUtils.isIDNumber(searchIdCard)) {
|
||||
ToastUtils.show("请输入合法的身份证号码");
|
||||
return;
|
||||
} else {
|
||||
hideSoftKeyboard();
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "查询中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.doSearchPerson(searchIdCard, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<PersonSearchBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull PersonSearchBean infoBean1) {
|
||||
dialog.dismiss();
|
||||
if (!TextUtils.isEmpty(infoBean1.getIdCardNumber())) {
|
||||
//设置基础信息
|
||||
mBaseInfo = infoBean1;
|
||||
setBaseInfo();
|
||||
} else {
|
||||
ToastUtils.show("未查询到该人员的基础信息,请完善基础信息");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 基础信息
|
||||
*/
|
||||
private void setBaseInfo() {
|
||||
mTvBaseName.setText(mBaseInfo.getFullName());
|
||||
mTvBaseFormerName.setText(mBaseInfo.getNameUsedBefore());
|
||||
mTvBaseGender.setText(mBaseInfo.getGenderDictionaryName());
|
||||
mTvBaseIdCard.setText(mBaseInfo.getIdCardNumber());//身份证
|
||||
mTvBasePhone.setText(mBaseInfo.getTelephone());//联系电话
|
||||
mTvBaseNative.setText(mBaseInfo.getNativePlaceDictionaryName());//籍贯
|
||||
mTvBaseNation.setText(mBaseInfo.getNationDictionaryName());//名族
|
||||
mTvBaseRegisterLoc.setText(mBaseInfo.getRegisteredResidenceDictionaryName());//户籍地
|
||||
mTvBaseCurLoc.setText(mBaseInfo.getCurrentResidenceDictionaryName());//现住址
|
||||
mTvBaseCurAddress.setText(mBaseInfo.getCurrentResidenceAddr());//现住址详情
|
||||
}
|
||||
}
|
@ -0,0 +1,154 @@
|
||||
package com.tengshisoft.gridmodule.incident.activitys.schools;
|
||||
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.tengshisoft.commonmodule.beans.SchoolEmphasesPersonDetailBean;
|
||||
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.PersonSearchBean;
|
||||
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 androidx.appcompat.widget.SwitchCompat;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2021年10月26日16:06:30
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 学校管理---周边重点人员详情
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_EMPHASES_PERSON_DETAIL)
|
||||
public class SchoolEmphasesDetailActivity extends BaseActivity {
|
||||
|
||||
|
||||
@BindView(R2.id.tv_base_name)
|
||||
TextView mTvBaseName;
|
||||
@BindView(R2.id.tv_base_former_name)
|
||||
TextView mTvBaseFormerName;
|
||||
@BindView(R2.id.tv_base_gender)
|
||||
TextView mTvBaseGender;
|
||||
@BindView(R2.id.tv_base_id_card)
|
||||
TextView mTvBaseIdCard;
|
||||
@BindView(R2.id.tv_base_phone)
|
||||
TextView mTvBasePhone;
|
||||
@BindView(R2.id.tv_base_native)
|
||||
TextView mTvBaseNative;
|
||||
@BindView(R2.id.tv_base_nation)
|
||||
TextView mTvBaseNation;
|
||||
@BindView(R2.id.tv_base_register_loc)
|
||||
TextView mTvBaseRegisterLoc;
|
||||
@BindView(R2.id.tv_base_cur_loc)
|
||||
TextView mTvBaseCurLoc;
|
||||
@BindView(R2.id.tv_base_cur_address)
|
||||
TextView mTvBaseCurAddress;
|
||||
@BindView(R2.id.cv_base_info_detail)
|
||||
CardView mCvBaseInfoDetail;
|
||||
@BindView(R2.id.tv_harm)
|
||||
TextView mTvHarm;
|
||||
@BindView(R2.id.sw_attention)
|
||||
SwitchCompat mSwAttention;
|
||||
@BindView(R2.id.ll_content)
|
||||
LinearLayout mLlContent;
|
||||
private Unbinder mBind;
|
||||
private PersonSearchBean mBaseInfo;
|
||||
private SchoolEmphasesPersonDetailBean mDetailBean;
|
||||
private String mPersonId;
|
||||
private String mId;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_school_emphases_detail;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mPersonId = getIntent().getStringExtra("personId");
|
||||
mId = getIntent().getStringExtra("id");
|
||||
mTvBaseTitle.setText("学校周边重点人员信息");
|
||||
getDetailData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
*/
|
||||
private void getDetailData() {
|
||||
Observable<PersonSearchBean> personBaseBean = RetrofitManager.getInstance().create(Apis.class).getBaseInfoDetailById(mPersonId, UserLgUtils.getToken());
|
||||
Observable<SchoolEmphasesPersonDetailBean> detailById = RetrofitManager.getInstance().create(Apis.class).getSchoolEmphasesPersonDetailById(mId, UserLgUtils.getToken());
|
||||
Observable.merge(personBaseBean, detailById)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<Object>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull Object o) {
|
||||
if (o instanceof PersonSearchBean) {
|
||||
mBaseInfo = (PersonSearchBean) o;
|
||||
setBaseInfo();
|
||||
} else if (o instanceof SchoolEmphasesPersonDetailBean) {
|
||||
mDetailBean = (SchoolEmphasesPersonDetailBean) o;
|
||||
setInfo();
|
||||
}
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
ExceptionHandler.handleException(e);
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 回显数据
|
||||
*/
|
||||
private void setInfo() {
|
||||
mTvHarm.setText(mDetailBean.getDegreeOfHarmName());
|
||||
mSwAttention.setChecked(mDetailBean.getIsFollow() == 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 基础信息
|
||||
*/
|
||||
private void setBaseInfo() {
|
||||
mTvBaseName.setText(mBaseInfo.getFullName());
|
||||
mTvBaseFormerName.setText(mBaseInfo.getNameUsedBefore());
|
||||
mTvBaseGender.setText(mBaseInfo.getGenderDictionaryName());
|
||||
mTvBaseIdCard.setText(mBaseInfo.getIdCardNumber());//身份证
|
||||
mTvBasePhone.setText(mBaseInfo.getTelephone());//联系电话
|
||||
mTvBaseNative.setText(mBaseInfo.getNativePlaceDictionaryName());//籍贯
|
||||
mTvBaseNation.setText(mBaseInfo.getNationDictionaryName());//名族
|
||||
mTvBaseRegisterLoc.setText(mBaseInfo.getRegisteredResidenceDictionaryName());//户籍地
|
||||
mTvBaseCurLoc.setText(mBaseInfo.getCurrentResidenceDictionaryName());//现住址
|
||||
mTvBaseCurAddress.setText(mBaseInfo.getCurrentResidenceAddr());//现住址详情
|
||||
}
|
||||
}
|
@ -0,0 +1,349 @@
|
||||
package com.tengshisoft.gridmodule.incident.activitys.schools;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
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.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
||||
import com.tengshisoft.commonmodule.adapters.SchoolEmphasesPersonAdapter;
|
||||
import com.tengshisoft.commonmodule.beans.SchoolEmphasesPersonListBean;
|
||||
import com.tengshisoft.commonmodule.beans.SuccessBean;
|
||||
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.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.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月26日14:25:51
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 学校周边-重点人员列表
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_EMPHASES_PERSON_LIST)
|
||||
public class SchoolEmphasesListActivity extends BaseActivity {
|
||||
@BindView(R2.id.srl_content)
|
||||
SmartRefreshLayout mSrlContent;
|
||||
@BindView(R2.id.rlv_buildings)
|
||||
RecyclerView mRlvBuildings;
|
||||
@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.pb_loading)
|
||||
ProgressBar mPbLoading;
|
||||
@BindView(R2.id.iv_empty_data)
|
||||
ImageView mIvEmptyData;
|
||||
@BindView(R2.id.tv_error_hint)
|
||||
TextView mTvErrorHint;
|
||||
|
||||
|
||||
private Unbinder mBind;
|
||||
private int mCurrentPage = 1;//当前页数
|
||||
private int mTotalSize;//总数
|
||||
private List<SchoolEmphasesPersonListBean.RowsBean> mDatas;
|
||||
private SchoolEmphasesPersonAdapter mAdapter;
|
||||
private String mKeywords = "";
|
||||
private int mType;
|
||||
private String mId;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_school_emphases_list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("学校周边重点人员");
|
||||
mId = getIntent().getStringExtra("schoolId");
|
||||
mDatas = new ArrayList<>();
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
mTvPublish.setText("录入");
|
||||
mTvPublish.setOnClickListener(v -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_EMPHASES_PERSON_ADD)
|
||||
.withString("schoolId", mId)
|
||||
.navigation(mActivity, 12));
|
||||
mAdapter = new SchoolEmphasesPersonAdapter(mActivity, mDatas);
|
||||
mSrlContent.setOnLoadMoreListener(refreshLayout -> loadMore());
|
||||
mSrlContent.setOnRefreshListener(refreshLayout -> doRefresh());
|
||||
mRlvBuildings.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvBuildings.setAdapter(mAdapter);
|
||||
mAdapter.addOnItemClickListener(this::showDetail);
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
setStateView(13);
|
||||
getSchoolEmphasesPersonList(1);
|
||||
mBtnBaseSearch.setOnClickListener(v -> doSearch());
|
||||
mIvBaseClear.setOnClickListener(v -> {
|
||||
mKeywords = "";
|
||||
mEtBaseSearchContent.setText("");
|
||||
doRefresh();
|
||||
});
|
||||
mAdapter.addOnEditListener(new SchoolEmphasesPersonAdapter.OnEditListener() {
|
||||
@Override
|
||||
public void onEdit(SchoolEmphasesPersonListBean.RowsBean bean, int pos) {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_EMPHASES_PERSON_ADD)
|
||||
.withString("schoolId", bean.getSchoolId())
|
||||
.withString("id", bean.getSchoolKeyId())
|
||||
.withString("personId", bean.getBaseId())
|
||||
.navigation(mActivity, 12);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDel(SchoolEmphasesPersonListBean.RowsBean bean, int pos) {
|
||||
doDel(bean, pos);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除人员
|
||||
*/
|
||||
private void doDel(SchoolEmphasesPersonListBean.RowsBean bean, int pos) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
|
||||
builder.setTitle("提示")
|
||||
.setMessage("确定要删除该条信息吗?")
|
||||
.setPositiveButton("确定", (dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
ProgressDialog dialog1 = UIUtil.initDialog(mActivity, "删除中...");
|
||||
dialog1.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.doDelSchoolEmphases(bean.getSchoolKeyId(), 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) {
|
||||
dialog1.dismiss();
|
||||
ToastUtils.show("删除成功");
|
||||
doRefresh();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog1.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
})
|
||||
.setNegativeButton("取消", (dialog, which) -> dialog.dismiss())
|
||||
.create()
|
||||
.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示详情
|
||||
*/
|
||||
private void showDetail(SchoolEmphasesPersonListBean.RowsBean b) {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_EMPHASES_PERSON_DETAIL)
|
||||
.withString("personId", b.getBaseId())
|
||||
.withString("id", b.getSchoolKeyId())
|
||||
.navigation();
|
||||
}
|
||||
|
||||
@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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学校列表
|
||||
*
|
||||
* @param currentPage
|
||||
*/
|
||||
private void getSchoolEmphasesPersonList(int currentPage) {
|
||||
mCurrentPage = currentPage;
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.getSchoolEmphasesPersonListById(mId, mKeywords, mCurrentPage + "", UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SchoolEmphasesPersonListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull SchoolEmphasesPersonListBean communityListBean) {
|
||||
if (communityListBean != null && 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 {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(true);
|
||||
if (currentPage > 1) {
|
||||
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() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private void doSearch() {
|
||||
hideSoftKeyboard();
|
||||
String searchContent = mEtBaseSearchContent.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(searchContent)) {
|
||||
hideSoftKeyboard();
|
||||
setStateView(13);
|
||||
mKeywords = searchContent;
|
||||
mCurrentPage = 1;
|
||||
getSchoolEmphasesPersonList(mCurrentPage);
|
||||
|
||||
} else {
|
||||
ToastUtils.show("请输入要查询的内容");
|
||||
}
|
||||
}
|
||||
|
||||
//加载更多
|
||||
private void loadMore() {
|
||||
getSchoolEmphasesPersonList(mCurrentPage);
|
||||
}
|
||||
|
||||
//刷新
|
||||
private void doRefresh() {
|
||||
mDatas.clear();
|
||||
mAdapter.setData(mDatas);
|
||||
getSchoolEmphasesPersonList(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据状态显示
|
||||
* 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,580 @@
|
||||
package com.tengshisoft.gridmodule.incident.activitys.schools;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
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.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.OptionsPickerBuilder;
|
||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||
import com.google.gson.Gson;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.tengshisoft.commonmodule.beans.SaveSchoolBean;
|
||||
import com.tengshisoft.commonmodule.beans.SchoolDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.SuccessBean;
|
||||
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.DicBean;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
import com.tenlionsoft.baselib.core.widget.views.AreaChooseDialog;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.RegexUtils;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import androidx.core.widget.NestedScrollView;
|
||||
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月26日10:26:21
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 学校管理-添加与编辑
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_MANAGE_ADD)
|
||||
public class SchoolManageAddActivity extends BaseActivity {
|
||||
|
||||
|
||||
@BindView(R2.id.et_name)
|
||||
EditText mEtName;
|
||||
@BindView(R2.id.tv_area)
|
||||
TextView mTvArea;
|
||||
@BindView(R2.id.et_address)
|
||||
EditText mEtAddress;
|
||||
@BindView(R2.id.tv_school_type)
|
||||
TextView mTvSchoolType;
|
||||
@BindView(R2.id.tv_address_sel)
|
||||
TextView mTvAddressSel;
|
||||
@BindView(R2.id.tmv_map)
|
||||
TextureMapView mTmvMap;
|
||||
@BindView(R2.id.et_school_master)
|
||||
EditText mEtSchoolMaster;
|
||||
@BindView(R2.id.et_master_phone)
|
||||
EditText mEtMasterPhone;
|
||||
@BindView(R2.id.et_student_number)
|
||||
EditText mEtStudentNumber;
|
||||
@BindView(R2.id.et_branch_name)
|
||||
EditText mEtBranchName;
|
||||
@BindView(R2.id.et_branch_phone)
|
||||
EditText mEtBranchPhone;
|
||||
@BindView(R2.id.et_secuity_name)
|
||||
EditText mEtSecuityName;
|
||||
@BindView(R2.id.et_secuity_phone)
|
||||
EditText mEtSecuityPhone;
|
||||
@BindView(R2.id.et_order_name)
|
||||
EditText mEtOrderName;
|
||||
@BindView(R2.id.et_order_phone)
|
||||
EditText mEtOrderPhone;
|
||||
@BindView(R2.id.et_security_count)
|
||||
EditText mEtSecurityCount;
|
||||
@BindView(R2.id.btn_submit)
|
||||
Button mBtnSubmit;
|
||||
@BindView(R2.id.nsv_content)
|
||||
NestedScrollView mNsvContent;
|
||||
private BaiduMap mBaiduMap;
|
||||
private BitmapDescriptor mBitMap;
|
||||
private Unbinder mBind;
|
||||
private String mId;
|
||||
|
||||
private String mSelAreaCode;
|
||||
private String mSelAreaId;
|
||||
private String mSelAreaName;
|
||||
private double mLat;
|
||||
private double mLng;
|
||||
private OptionsPickerView<DicBean> mTypePicker;
|
||||
private List<DicBean> mTypeList;
|
||||
private DicBean mSelType;
|
||||
private @NonNull SchoolDetailBean mDetailBean;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_school_manage_add;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mId = getIntent().getStringExtra("id");
|
||||
initViews();
|
||||
initMap();
|
||||
if (TextUtils.isEmpty(mId)) {
|
||||
mTvBaseTitle.setText("学校信息录入");
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
} else {
|
||||
mTvBaseTitle.setText("学校信息编辑");
|
||||
getDetailById();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化视图
|
||||
*/
|
||||
private void initViews() {
|
||||
mTvArea.setOnClickListener(v -> onShowArea());
|
||||
mTvAddressSel.setOnClickListener(v -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MAP_SEL_POINT)
|
||||
.navigation(mActivity, 16));
|
||||
|
||||
mTvSchoolType.setOnClickListener(v -> onShowSchoolType());
|
||||
mBtnSubmit.setOnClickListener(v -> doSubmit());
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交
|
||||
*/
|
||||
private void doSubmit() {
|
||||
if (TextUtils.isEmpty(mId)) {
|
||||
doConfirm();
|
||||
} else {
|
||||
doEdit();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
private void doEdit() {
|
||||
if (checkParams()) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中...");
|
||||
dialog.show();
|
||||
RequestBody body = buildParams();
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.doEditSchool(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 doConfirm() {
|
||||
if (checkParams()) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中...");
|
||||
dialog.show();
|
||||
RequestBody body = buildParams();
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.doSaveSchool(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 name = mEtName.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
ToastUtils.show("请输入学校名称");
|
||||
return false;
|
||||
}
|
||||
if (TextUtils.isEmpty(mSelAreaCode)) {
|
||||
ToastUtils.show("请选择学校所属行政区域");
|
||||
return false;
|
||||
}
|
||||
String address = mEtAddress.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(address)) {
|
||||
ToastUtils.show("请输入学校地址");
|
||||
return false;
|
||||
}
|
||||
if (mSelType == null) {
|
||||
ToastUtils.show("请选择学校办学类型");
|
||||
return false;
|
||||
}
|
||||
String stuCount = mEtStudentNumber.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(stuCount)) {
|
||||
ToastUtils.show("请输入学校在校学生人数");
|
||||
return false;
|
||||
}
|
||||
String master = mEtSchoolMaster.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(master)) {
|
||||
ToastUtils.show("请输入校长姓名");
|
||||
return false;
|
||||
}
|
||||
String masterPhone = mEtMasterPhone.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(masterPhone) || !RegexUtils.isTel(masterPhone)) {
|
||||
ToastUtils.show("请输入合法的校长联系电话");
|
||||
return false;
|
||||
}
|
||||
String branchName = mEtBranchName.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(branchName)) {
|
||||
ToastUtils.show("请输入分管安全保卫负责人姓名");
|
||||
return false;
|
||||
}
|
||||
String branchPhone = mEtBranchPhone.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(branchPhone) || !RegexUtils.isTel(branchPhone)) {
|
||||
ToastUtils.show("请输入合法的分管安全保卫负责人联系方式");
|
||||
return false;
|
||||
}
|
||||
String secuityName = mEtSecuityName.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(secuityName)) {
|
||||
ToastUtils.show("请输入安全保卫负责人姓名");
|
||||
return false;
|
||||
}
|
||||
String secuityPhone = mEtSecuityPhone.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(secuityPhone) || !RegexUtils.isTel(secuityPhone)) {
|
||||
ToastUtils.show("请输入合法的安全保卫负责人联系方式");
|
||||
return false;
|
||||
}
|
||||
String orderName = mEtOrderName.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(orderName)) {
|
||||
ToastUtils.show("请输入治安负责人姓名");
|
||||
return false;
|
||||
}
|
||||
String orderPhone = mEtOrderPhone.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(orderPhone) || !RegexUtils.isTel(orderPhone)) {
|
||||
ToastUtils.show("请输入合法的治安负责人联系方式");
|
||||
return false;
|
||||
}
|
||||
String securityCount = mEtSecurityCount.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(securityCount)) {
|
||||
ToastUtils.show("请输入安全保卫人数");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private RequestBody buildParams() {
|
||||
SaveSchoolBean bean = new SaveSchoolBean();
|
||||
String name = mEtName.getText().toString().trim();
|
||||
bean.setSchoolName(name);
|
||||
bean.setBelongDept(mSelAreaId);
|
||||
bean.setBelongDeptCode(mSelAreaCode);
|
||||
bean.setBelongDeptName(mSelAreaName);
|
||||
String address = mEtAddress.getText().toString().trim();
|
||||
bean.setSchoolAddress(address);
|
||||
bean.setRunningType(mSelType.getDataId());
|
||||
bean.setRunningTypeCode(mSelType.getDataSummary());
|
||||
bean.setRunningTypeName(mSelType.getDataName());
|
||||
|
||||
String stuCount = mEtStudentNumber.getText().toString().trim();
|
||||
bean.setStuCount(Integer.parseInt(stuCount));
|
||||
String master = mEtSchoolMaster.getText().toString().trim();
|
||||
bean.setPrincipalName(master);
|
||||
String masterPhone = mEtMasterPhone.getText().toString().trim();
|
||||
bean.setPrincipalPhone(masterPhone);
|
||||
//分管安全
|
||||
String branchName = mEtBranchName.getText().toString().trim();
|
||||
bean.setDefendName(branchName);
|
||||
String branchPhone = mEtBranchPhone.getText().toString().trim();
|
||||
bean.setDefendPhone(branchPhone);
|
||||
//安全保卫
|
||||
String secuityName = mEtSecuityName.getText().toString().trim();
|
||||
String secuityPhone = mEtSecuityPhone.getText().toString().trim();
|
||||
bean.setSafeName(secuityName);
|
||||
bean.setSafePhone(secuityPhone);
|
||||
String orderName = mEtOrderName.getText().toString().trim();
|
||||
String orderPhone = mEtOrderPhone.getText().toString().trim();
|
||||
String securityCount = mEtSecurityCount.getText().toString().trim();
|
||||
//治安
|
||||
bean.setSecurityName(orderName);
|
||||
bean.setSecurityPhone(orderPhone);
|
||||
bean.setSecurityCount(Integer.parseInt(securityCount));
|
||||
bean.setLatitude(mLat);
|
||||
bean.setLongitude(mLng);
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(bean);
|
||||
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
return requestBody;
|
||||
}
|
||||
|
||||
/**
|
||||
* 办校类型
|
||||
*/
|
||||
private void onShowSchoolType() {
|
||||
hideSoftKeyboard();
|
||||
if (mTypeList != null && mTypeList.size() > 0) {
|
||||
if (mTypePicker == null) {
|
||||
mTypePicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
|
||||
mSelType = mTypeList.get(o1);
|
||||
mTvSchoolType.setText(mSelType.getDataName());
|
||||
})
|
||||
.setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mTypePicker.setPicker(mTypeList);
|
||||
}
|
||||
mTypePicker.show();
|
||||
} else {
|
||||
getDicListByType(PathConfig.DIC_SCHOOL_TYPE, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
*/
|
||||
private void getDetailById() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.getSchoolDetailById(mId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SchoolDetailBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull SchoolDetailBean schoolDetailBean) {
|
||||
mDetailBean = schoolDetailBean;
|
||||
setDataToView();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 回显数据
|
||||
*/
|
||||
private void setDataToView() {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mEtName.setText(mDetailBean.getSchoolName());
|
||||
|
||||
mTvArea.setText(mDetailBean.getBelongDeptName());
|
||||
mSelAreaCode = mDetailBean.getBelongDeptCode();
|
||||
mSelAreaId = mDetailBean.getBelongDept();
|
||||
mSelAreaName = mDetailBean.getBelongDeptName();
|
||||
mEtAddress.setText(mDetailBean.getSchoolAddress());
|
||||
mTvSchoolType.setText(mDetailBean.getRunningTypeName());
|
||||
mSelType = new DicBean();
|
||||
mSelType.setDataName(mDetailBean.getRunningTypeName());
|
||||
mSelType.setDataId(mDetailBean.getRunningType());
|
||||
mSelType.setDataSummary(mDetailBean.getRunningTypeCode());
|
||||
|
||||
mTvAddressSel.setText(mDetailBean.getLatitude() + "-" + mDetailBean.getLongitude());
|
||||
mLat = mDetailBean.getLatitude();
|
||||
mLng = mDetailBean.getLongitude();
|
||||
if (mDetailBean.getLatitude() != 0 && mDetailBean.getLongitude() != 0) {
|
||||
moveMapToCenter(new LatLng(mDetailBean.getLatitude(), mDetailBean.getLongitude()), 18);
|
||||
}
|
||||
mEtSchoolMaster.setText(mDetailBean.getPrincipalName());
|
||||
mEtMasterPhone.setText(mDetailBean.getPrincipalPhone());
|
||||
mEtStudentNumber.setText(mDetailBean.getStuCount() + "");
|
||||
//分管
|
||||
mEtBranchName.setText(mDetailBean.getDefendName());
|
||||
mEtBranchPhone.setText(mDetailBean.getDefendPhone());
|
||||
//安全保卫
|
||||
mEtSecuityName.setText(mDetailBean.getSafeName());
|
||||
mEtSecuityPhone.setText(mDetailBean.getSafePhone());
|
||||
//治安负责人
|
||||
mEtOrderName.setText(mDetailBean.getSecurityName());
|
||||
mEtOrderPhone.setText(mDetailBean.getSecurityPhone());
|
||||
mEtSecurityCount.setText(mDetailBean.getSecurityCount() + "");
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示地区选择
|
||||
*/
|
||||
private void onShowArea() {
|
||||
AreaChooseDialog dialog = new AreaChooseDialog
|
||||
.DialogBuilder(mActivity)
|
||||
.setDefault(true)
|
||||
.build();
|
||||
dialog.addOnChoseListener((names, id, code) -> {
|
||||
mSelAreaCode = code;
|
||||
mSelAreaId = id;
|
||||
mSelAreaName = names;
|
||||
mTvArea.setText(names);
|
||||
dialog.dismiss();
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典
|
||||
*/
|
||||
private void getDicListByType(String pId, int i) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.getDictListAllByPid(pId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<DicBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull List<DicBean> typeListBeans) {
|
||||
dialog.dismiss();
|
||||
if (typeListBeans.size() > 0) {
|
||||
switch (i) {
|
||||
case 1:
|
||||
mTypeList = typeListBeans;
|
||||
onShowSchoolType();
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
ToastUtils.show("暂无数据");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (resultCode == 22) {
|
||||
if (requestCode == 16) {
|
||||
mLat = data.getDoubleExtra("lat", -1);
|
||||
mLng = data.getDoubleExtra("lng", -1);
|
||||
mTvAddressSel.setText(mLat + "-" + mLng);
|
||||
mBaiduMap.clear();
|
||||
moveMapToCenter(new LatLng(mLat, mLng), 18);
|
||||
if (mBitMap == null) {
|
||||
mBitMap = BitmapDescriptorFactory.fromResource(R.drawable.ic_map_location_marker);
|
||||
}
|
||||
MarkerOptions markerOptions = new MarkerOptions()
|
||||
.position(new LatLng(mLat, mLng))//mark出现的位置
|
||||
.icon(mBitMap) //mark图标
|
||||
.draggable(false)//mark可拖拽
|
||||
.animateType(MarkerOptions.MarkerAnimateType.none);
|
||||
mBaiduMap.addOverlay(markerOptions);
|
||||
}
|
||||
}
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将地图移动到定位中心
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
}
|
@ -0,0 +1,290 @@
|
||||
package com.tengshisoft.gridmodule.incident.activitys.schools;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
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.hjq.toast.ToastUtils;
|
||||
import com.tengshisoft.commonmodule.beans.SchoolDetailBean;
|
||||
import com.tengshisoft.commonmodule.beans.SuccessBean;
|
||||
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.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 androidx.annotation.Nullable;
|
||||
import androidx.core.widget.NestedScrollView;
|
||||
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月26日11:01:10
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 学校管理-学校详情
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_MANAGE_DETAIL)
|
||||
public class SchoolManageDetailActivity extends BaseActivity {
|
||||
|
||||
|
||||
@BindView(R2.id.tv_name)
|
||||
TextView mTvName;
|
||||
@BindView(R2.id.tv_area)
|
||||
TextView mTvArea;
|
||||
@BindView(R2.id.tv_address)
|
||||
TextView mTvAddress;
|
||||
@BindView(R2.id.tv_school_type)
|
||||
TextView mTvSchoolType;
|
||||
@BindView(R2.id.tv_address_sel)
|
||||
TextView mTvAddressSel;
|
||||
@BindView(R2.id.tmv_map)
|
||||
TextureMapView mTmvMap;
|
||||
@BindView(R2.id.tv_school_master)
|
||||
TextView mTvSchoolMaster;
|
||||
@BindView(R2.id.tv_master_phone)
|
||||
TextView mTvMasterPhone;
|
||||
@BindView(R2.id.tv_student_number)
|
||||
TextView mTvStudentNumber;
|
||||
@BindView(R2.id.tv_branch_name)
|
||||
TextView mTvBranchName;
|
||||
@BindView(R2.id.tv_branch_phone)
|
||||
TextView mTvBranchPhone;
|
||||
@BindView(R2.id.tv_secuity_name)
|
||||
TextView mTvSecuityName;
|
||||
@BindView(R2.id.tv_secuity_phone)
|
||||
TextView mTvSecuityPhone;
|
||||
@BindView(R2.id.tv_order_name)
|
||||
TextView mTvOrderName;
|
||||
@BindView(R2.id.tv_order_phone)
|
||||
TextView mTvOrderPhone;
|
||||
@BindView(R2.id.tv_security_count)
|
||||
TextView mTvSecurityCount;
|
||||
@BindView(R2.id.nsv_content)
|
||||
NestedScrollView mNsvContent;
|
||||
@BindView(R2.id.btn_edit)
|
||||
Button mBtnEdit;
|
||||
@BindView(R2.id.btn_del)
|
||||
Button mBtnDel;
|
||||
private Unbinder mBind;
|
||||
private String mId;
|
||||
private SchoolDetailBean mDetailBean;
|
||||
private BaiduMap mBaiduMap;
|
||||
private BitmapDescriptor mBitMap;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_school_manage_detail;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("学校信息");
|
||||
mId = getIntent().getStringExtra("id");
|
||||
initMap();
|
||||
getDetailById();
|
||||
mBtnDel.setOnClickListener(v -> doDel());
|
||||
mBtnEdit.setOnClickListener(v -> doEdit());
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
private void doEdit() {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_MANAGE_ADD)
|
||||
.withString("id", mDetailBean.getSchoolId())
|
||||
.navigation(mActivity, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
private void doDel() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
|
||||
builder.setTitle("提示")
|
||||
.setMessage("确定要删除该条信息吗?")
|
||||
.setPositiveButton("确定", (dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
ProgressDialog dialog1 = UIUtil.initDialog(mActivity, "删除中...");
|
||||
dialog1.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.doDelSchool(mId, 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) {
|
||||
dialog1.dismiss();
|
||||
ToastUtils.show("删除成功");
|
||||
setResult(13);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog1.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
})
|
||||
.setNegativeButton("取消", (dialog, which) -> dialog.dismiss())
|
||||
.create()
|
||||
.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
*/
|
||||
private void getDetailById() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.getSchoolDetailById(mId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SchoolDetailBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull SchoolDetailBean schoolDetailBean) {
|
||||
mDetailBean = schoolDetailBean;
|
||||
setDataToView();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@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) {
|
||||
refreshView(STATE_LOAD_LOADING);
|
||||
getDetailById();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 回显数据
|
||||
*/
|
||||
private void setDataToView() {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mTvName.setText(mDetailBean.getSchoolName());
|
||||
mTvArea.setText(mDetailBean.getBelongDeptName());
|
||||
mTvAddress.setText(mDetailBean.getSchoolAddress());
|
||||
mTvSchoolType.setText(mDetailBean.getRunningTypeName());
|
||||
mTvAddressSel.setText(mDetailBean.getLatitude() + "-" + mDetailBean.getLongitude());
|
||||
if (mDetailBean.getLatitude() != 0 && mDetailBean.getLongitude() != 0) {
|
||||
moveMapToCenter(new LatLng(mDetailBean.getLatitude(), mDetailBean.getLongitude()), 18);
|
||||
if (mBitMap == null) {
|
||||
mBitMap = BitmapDescriptorFactory.fromResource(R.drawable.ic_map_location_marker);
|
||||
}
|
||||
MarkerOptions markerOptions = new MarkerOptions()
|
||||
.position(new LatLng(mDetailBean.getLatitude(), mDetailBean.getLongitude()))//mark出现的位置
|
||||
.icon(mBitMap) //mark图标
|
||||
.draggable(false)//mark可拖拽
|
||||
.animateType(MarkerOptions.MarkerAnimateType.none);
|
||||
mBaiduMap.addOverlay(markerOptions);
|
||||
}
|
||||
mTvSchoolMaster.setText(mDetailBean.getPrincipalName());
|
||||
mTvMasterPhone.setText(mDetailBean.getPrincipalPhone());
|
||||
mTvStudentNumber.setText(mDetailBean.getStuCount() + "");
|
||||
//分管
|
||||
mTvBranchName.setText(mDetailBean.getDefendName());
|
||||
mTvBranchPhone.setText(mDetailBean.getDefendPhone());
|
||||
//安全保卫
|
||||
mTvSecuityName.setText(mDetailBean.getSafeName());
|
||||
mTvSecuityPhone.setText(mDetailBean.getSafePhone());
|
||||
//治安负责人
|
||||
mTvOrderName.setText(mDetailBean.getSecurityName());
|
||||
mTvOrderPhone.setText(mDetailBean.getSecurityPhone());
|
||||
mTvSecurityCount.setText(mDetailBean.getSecurityCount() + "");
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将地图移动到定位中心
|
||||
*
|
||||
* @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);
|
||||
}
|
||||
}
|
@ -0,0 +1,298 @@
|
||||
package com.tengshisoft.gridmodule.incident.activitys.schools;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.health.PackageHealthStats;
|
||||
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.SchoolListAdapter;
|
||||
import com.tengshisoft.commonmodule.beans.BuildingListBean;
|
||||
import com.tengshisoft.commonmodule.beans.SchoolListBean;
|
||||
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.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月26日10:06:07
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 学校管理---学校列表
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_MANAGE_LIST)
|
||||
public class SchoolManageListActivity extends BaseActivity {
|
||||
@BindView(R2.id.srl_content)
|
||||
SmartRefreshLayout mSrlContent;
|
||||
@BindView(R2.id.rlv_buildings)
|
||||
RecyclerView mRlvBuildings;
|
||||
@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.pb_loading)
|
||||
ProgressBar mPbLoading;
|
||||
@BindView(R2.id.iv_empty_data)
|
||||
ImageView mIvEmptyData;
|
||||
@BindView(R2.id.tv_error_hint)
|
||||
TextView mTvErrorHint;
|
||||
|
||||
|
||||
private Unbinder mBind;
|
||||
private int mCurrentPage = 1;//当前页数
|
||||
private int mTotalSize;//总数
|
||||
private List<SchoolListBean.RowsBean> mDatas;
|
||||
private SchoolListAdapter mAdapter;
|
||||
private String mKeywords = "";
|
||||
private int mType;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_school_manage_list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("学校管理");
|
||||
mDatas = new ArrayList<>();
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
mTvPublish.setText("录入");
|
||||
mTvPublish.setOnClickListener(v -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_MANAGE_ADD)
|
||||
.navigation(mActivity, 12));
|
||||
mAdapter = new SchoolListAdapter(mActivity, mDatas);
|
||||
mSrlContent.setOnLoadMoreListener(refreshLayout -> loadMore());
|
||||
mSrlContent.setOnRefreshListener(refreshLayout -> doRefresh());
|
||||
mRlvBuildings.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvBuildings.setAdapter(mAdapter);
|
||||
mAdapter.addOnItemClickListener(this::showDetail);
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
setStateView(13);
|
||||
getSchoolList(1);
|
||||
mBtnBaseSearch.setOnClickListener(v -> doSearch());
|
||||
mIvBaseClear.setOnClickListener(v -> {
|
||||
mKeywords = "";
|
||||
mEtBaseSearchContent.setText("");
|
||||
doRefresh();
|
||||
});
|
||||
mAdapter.addOnEditListener(new SchoolListAdapter.OnEditListener() {
|
||||
@Override
|
||||
public void onShowPerson(SchoolListBean.RowsBean bean, int pos) {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_EMPHASES_PERSON_LIST)
|
||||
.withString("schoolId", bean.getSchoolId())
|
||||
.navigation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShowCase(SchoolListBean.RowsBean bean, int pos) {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_CASE_LIST)
|
||||
.withString("schoolId", bean.getSchoolId())
|
||||
.navigation();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示详情
|
||||
*/
|
||||
private void showDetail(SchoolListBean.RowsBean b) {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_MANAGE_DETAIL)
|
||||
.withString("id", b.getSchoolId())
|
||||
.navigation(mActivity, 12);
|
||||
}
|
||||
|
||||
@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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取学校列表
|
||||
*
|
||||
* @param currentPage
|
||||
*/
|
||||
private void getSchoolList(int currentPage) {
|
||||
mCurrentPage = currentPage;
|
||||
RetrofitManager.getInstance()
|
||||
.create(Apis.class)
|
||||
.getSchoolList(mKeywords, mCurrentPage + "", UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SchoolListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull SchoolListBean communityListBean) {
|
||||
if (communityListBean != null && 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 {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(true);
|
||||
if (currentPage > 1) {
|
||||
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() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private void doSearch() {
|
||||
hideSoftKeyboard();
|
||||
String searchContent = mEtBaseSearchContent.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(searchContent)) {
|
||||
hideSoftKeyboard();
|
||||
setStateView(13);
|
||||
mKeywords = searchContent;
|
||||
mCurrentPage = 1;
|
||||
getSchoolList(mCurrentPage);
|
||||
|
||||
} else {
|
||||
ToastUtils.show("请输入要查询的内容");
|
||||
}
|
||||
}
|
||||
|
||||
//加载更多
|
||||
private void loadMore() {
|
||||
getSchoolList(mCurrentPage);
|
||||
}
|
||||
|
||||
//刷新
|
||||
private void doRefresh() {
|
||||
mDatas.clear();
|
||||
mAdapter.setData(mDatas);
|
||||
getSchoolList(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据状态显示
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
}
|
361
gridmodule/src/main/res/layout/activity_school_case_add.xml
Normal file
361
gridmodule/src/main/res/layout/activity_school_case_add.xml
Normal file
@ -0,0 +1,361 @@
|
||||
<?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:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
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">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/issue_report_title"
|
||||
android:padding="8dp"
|
||||
android:text="案(事)件信息"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<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" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_number"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:hint="请输入案(事)件编号" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="案(事)件名称" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_name"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:hint="请输入案(事)件名称" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="发生日期" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_date"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择发生日期" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="案发地" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择案发地" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="案发地点" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_address"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:hint="请输入案发地点详址"
|
||||
android:inputType="text" />
|
||||
</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_nature_type"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择案(事)件性质" />
|
||||
</LinearLayout>
|
||||
|
||||
<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_info"
|
||||
style="@style/item_content_edit"
|
||||
android:hint="请输入案(事)件情况"
|
||||
android:minLines="3" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="主犯证件类型" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_card_type"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择主犯(嫌疑人)证件类型" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="主犯证件号码" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_card_number"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:digits="@string/limit_id_card"
|
||||
android:hint="请输入主犯(嫌疑人)证件号码" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="主犯姓名" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_crimianl_name"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:hint="请输入主犯(嫌疑人)姓名" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView style="@style/style_hint_star" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_gravity="center_vertical"
|
||||
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_crack"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/switch_ios_track_selector"
|
||||
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" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_offence_count"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:hint="请输入作案人数"
|
||||
android:inputType="number" />
|
||||
</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" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_flee_count"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:hint="请输入在逃人数"
|
||||
android:inputType="number" />
|
||||
</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" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_catch_count"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:hint="请输入抓捕人数"
|
||||
android:inputType="number" />
|
||||
</LinearLayout>
|
||||
|
||||
<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_detect"
|
||||
style="@style/item_content_edit"
|
||||
android:hint="请输入案(事)件侦破情况"
|
||||
android:minLines="3" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
app:cardCornerRadius="10dp"
|
||||
app:cardPreventCornerOverlap="true"
|
||||
app:cardUseCompatPadding="false">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_submit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:text="保存"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</RelativeLayout>
|
270
gridmodule/src/main/res/layout/activity_school_case_detail.xml
Normal file
270
gridmodule/src/main/res/layout/activity_school_case_detail.xml
Normal file
@ -0,0 +1,270 @@
|
||||
<?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:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
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">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/issue_report_title"
|
||||
android:padding="8dp"
|
||||
android:text="案(事)件信息"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="案(事)件编号" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_number"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="案(事)件名称" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="发生日期" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_date"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="案发地" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="案发地点" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="案(事)件性质" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nature_type"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_vertical"
|
||||
android:text="案(事)件情况" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_info"
|
||||
style="@style/item_content_ver"
|
||||
android:minLines="3" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="主犯证件类型" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_card_type"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="主犯证件号码" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_card_number"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="主犯姓名" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_criminal_name"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_gravity="center_vertical"
|
||||
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_crack"
|
||||
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">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="作案人数" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_offence_count"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="在逃人数" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_flee_count"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="抓捕人数" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_catch_count"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_vertical"
|
||||
android:text="案件侦破情况" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_detect"
|
||||
style="@style/item_content_ver"
|
||||
android:minLines="3" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</RelativeLayout>
|
60
gridmodule/src/main/res/layout/activity_school_case_list.xml
Normal file
60
gridmodule/src/main/res/layout/activity_school_case_list.xml
Normal file
@ -0,0 +1,60 @@
|
||||
<?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=".incident.activitys.building.CommunityManageActivity">
|
||||
|
||||
<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">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_buildings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:listitem="@layout/item_community_list" />
|
||||
</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>
|
110
gridmodule/src/main/res/layout/activity_school_emphases_add.xml
Normal file
110
gridmodule/src/main/res/layout/activity_school_emphases_add.xml
Normal file
@ -0,0 +1,110 @@
|
||||
<?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:orientation="vertical"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<include layout="@layout/item_search" />
|
||||
|
||||
<include layout="@layout/layout_base_info_detail" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
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">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/issue_report_title"
|
||||
android:padding="8dp"
|
||||
android:text="其他信息"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<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_harm"
|
||||
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:layout_gravity="center_vertical"
|
||||
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_attention"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/switch_ios_track_selector"
|
||||
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>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_confirm"
|
||||
style="@style/btn_save"
|
||||
android:text="保    存" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
@ -0,0 +1,102 @@
|
||||
<?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:orientation="vertical"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<include layout="@layout/layout_base_info_detail" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
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">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/issue_report_title"
|
||||
android:padding="8dp"
|
||||
android:text="其他信息"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="危害程度" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_harm"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_gravity="center_vertical"
|
||||
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_attention"
|
||||
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>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
@ -0,0 +1,60 @@
|
||||
<?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=".incident.activitys.building.CommunityManageActivity">
|
||||
|
||||
<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">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_buildings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:listitem="@layout/item_community_list" />
|
||||
</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>
|
349
gridmodule/src/main/res/layout/activity_school_manage_add.xml
Normal file
349
gridmodule/src/main/res/layout/activity_school_manage_add.xml
Normal file
@ -0,0 +1,349 @@
|
||||
<?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:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
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">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/issue_report_title"
|
||||
android:padding="8dp"
|
||||
android:text="基础信息"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="学校名称" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_name"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:hint="请输入学校名称"
|
||||
android:inputType="text" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="所属行政区域" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择学校所属行政区域" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="学校地址" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_address"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:hint="请输入学校地址"
|
||||
android:inputType="text" />
|
||||
</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_school_type"
|
||||
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_address_sel"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择学校经纬度" />
|
||||
</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>
|
||||
|
||||
</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">
|
||||
|
||||
<TextView
|
||||
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="visible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="校长" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_school_master"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:hint="请输入校长姓名"
|
||||
android:inputType="text" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="校长联系方式" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_master_phone"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:digits="@string/limit_phone"
|
||||
android:hint="请输入校长联系方式" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="在校学生人数" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_student_number"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:hint="请输入在校学生人数"
|
||||
android:inputType="number" />
|
||||
</LinearLayout>
|
||||
|
||||
<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_branch_name"
|
||||
style="@style/item_content_edit"
|
||||
android:hint="请输入分管安全保卫负责人"
|
||||
android:inputType="text" />
|
||||
</LinearLayout>
|
||||
|
||||
<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_branch_phone"
|
||||
style="@style/item_content_edit"
|
||||
android:digits="@string/limit_phone"
|
||||
android:hint="请输入分管安全保卫负责人联系方式" />
|
||||
</LinearLayout>
|
||||
|
||||
<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_secuity_name"
|
||||
style="@style/item_content_edit"
|
||||
android:hint="请输入分管安全保卫负责人"
|
||||
android:inputType="text" />
|
||||
</LinearLayout>
|
||||
|
||||
<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_secuity_phone"
|
||||
style="@style/item_content_edit"
|
||||
android:digits="@string/limit_phone"
|
||||
android:hint="请输入安全保卫负责人联系方式" />
|
||||
</LinearLayout>
|
||||
|
||||
<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_order_name"
|
||||
style="@style/item_content_edit"
|
||||
android:hint="请输入治安负责人"
|
||||
android:inputType="text" />
|
||||
</LinearLayout>
|
||||
|
||||
<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_order_phone"
|
||||
style="@style/item_content_edit"
|
||||
android:digits="@string/limit_phone"
|
||||
android:hint="请输入治安负责人联系方式" />
|
||||
</LinearLayout>
|
||||
|
||||
<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_security_count"
|
||||
style="@style/item_content_edit"
|
||||
android:hint="请输入安全保卫人数"
|
||||
android:inputType="number" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
app:cardCornerRadius="10dp"
|
||||
app:cardPreventCornerOverlap="true"
|
||||
app:cardUseCompatPadding="false">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_submit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:text="保存"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</RelativeLayout>
|
308
gridmodule/src/main/res/layout/activity_school_manage_detail.xml
Normal file
308
gridmodule/src/main/res/layout/activity_school_manage_detail.xml
Normal file
@ -0,0 +1,308 @@
|
||||
<?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:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
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">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/issue_report_title"
|
||||
android:padding="8dp"
|
||||
android:text="基础信息"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_edit"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/sel_btn_blue_gray_re_5"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="编辑"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_del"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:background="@drawable/sel_btn_red_gray_re_5"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="删除"
|
||||
android:textColor="@color/white" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="学校名称" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="所属行政区域" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="学习地址" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="办学类型" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_school_type"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="学校经纬度" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address_sel"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<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>
|
||||
|
||||
</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">
|
||||
|
||||
<TextView
|
||||
style="@style/issue_report_title"
|
||||
android:padding="8dp"
|
||||
android:text="人员信息"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="校长" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_school_master"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="校长联系方式" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_master_phone"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="在校学生人数" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_student_number"
|
||||
style="@style/item_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_vertical"
|
||||
android:text="分管安全保卫负责人" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_branch_name"
|
||||
style="@style/item_content_ver" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_vertical"
|
||||
android:text="分管安全保卫负责人联系方式" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_branch_phone"
|
||||
style="@style/item_content_ver" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_vertical"
|
||||
android:text="安全保卫负责人" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_secuity_name"
|
||||
style="@style/item_content_ver" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_vertical"
|
||||
android:text="安全保卫负责人联系方式" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_secuity_phone"
|
||||
style="@style/item_content_ver" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_vertical"
|
||||
android:text="治安负责人" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_order_name"
|
||||
style="@style/item_content_ver" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_vertical"
|
||||
android:text="安全保卫负责人联系方式" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_order_phone"
|
||||
style="@style/item_content_ver" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray_vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_vertical"
|
||||
android:text="安全保卫人数" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_security_count"
|
||||
style="@style/item_content_ver" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</RelativeLayout>
|
@ -0,0 +1,60 @@
|
||||
<?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=".incident.activitys.building.CommunityManageActivity">
|
||||
|
||||
<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">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_buildings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:listitem="@layout/item_community_list" />
|
||||
</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>
|
@ -60,6 +60,7 @@ public class GridMainFragment extends BaseFragment {
|
||||
"事件处理",
|
||||
"事件核实",
|
||||
"事件核查",
|
||||
"学校管理",
|
||||
"知识库",
|
||||
"部件采集",
|
||||
"巡查巡检",
|
||||
@ -73,6 +74,7 @@ public class GridMainFragment extends BaseFragment {
|
||||
R.drawable.ic_case_record,
|
||||
R.drawable.ic_case_dispose,
|
||||
R.drawable.ic_case_dispose,
|
||||
R.drawable.ic_case_dispose,
|
||||
R.drawable.ic_work_path,
|
||||
R.drawable.ic_address_list,
|
||||
R.drawable.ic_notify_ad,
|
||||
@ -193,6 +195,11 @@ public class GridMainFragment extends BaseFragment {
|
||||
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_EXPRESS_POI_LIST)
|
||||
.navigation();
|
||||
break;
|
||||
case "学校管理":
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_SCHOOL_MANAGE_LIST)
|
||||
.navigation();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
package="com.tengshisoft.supervisionmodule">
|
||||
|
||||
<application>
|
||||
<activity android:name=".activitys.IncidentCheckDetailActivity"></activity>
|
||||
<activity android:name=".activitys.IncidentCheckDeptDetailActivity"></activity>
|
||||
<activity android:name=".activitys.IncidentCheckDeptListActivity" />
|
||||
<activity android:name=".activitys.IncidentAcceptDeptDetailActivity" />
|
||||
<activity android:name=".activitys.IncidentAcceptDeptListActivity" />
|
||||
|
@ -116,6 +116,8 @@ public class IncidentAcceptDeptDetailActivity extends BaseActivity {
|
||||
private BitmapDescriptor mBitMap;
|
||||
private int mLevel;
|
||||
private String mReportId;
|
||||
private String mDeptId;
|
||||
private String mDeptName;
|
||||
|
||||
|
||||
@Override
|
||||
@ -131,6 +133,9 @@ public class IncidentAcceptDeptDetailActivity extends BaseActivity {
|
||||
mTaskId = getIntent().getStringExtra("taskId");
|
||||
mLevel = getIntent().getIntExtra("level", -4);
|
||||
mReportId = getIntent().getStringExtra("reportId");
|
||||
mDeptId = getIntent().getStringExtra("deptId");
|
||||
mDeptName = getIntent().getStringExtra("deptName");
|
||||
|
||||
initMap();
|
||||
initViews();
|
||||
getDetailData();
|
||||
|
@ -103,6 +103,8 @@ public class IncidentAcceptDeptListActivity extends BaseActivity {
|
||||
.withString("reportId", v.getReportId())
|
||||
.withString("taskId", v.getTaskId())
|
||||
.withString("id", v.getDistributionUserId())
|
||||
.withString("deptId", v.getUserDeptId())
|
||||
.withString("deptName", v.getUserDeptName())
|
||||
.navigation(mActivity, 12));
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ import okhttp3.RequestBody;
|
||||
* 描述: 部门端---事件核查详情
|
||||
*/
|
||||
@Route(path = PathConfig.PATH_MODULE_SUPERVISION_INCIDENT_CHECK_DETAIL)
|
||||
public class IncidentCheckDetailActivity extends BaseActivity {
|
||||
public class IncidentCheckDeptDetailActivity extends BaseActivity {
|
||||
|
||||
@BindView(R2.id.tv_issue_base_info)
|
||||
TextView mTvIssueBaseInfo;
|
Loading…
Reference in New Issue
Block a user