人口菜单名称、添加新类型

This commit is contained in:
itgaojian 2023-09-07 17:39:25 +08:00
parent 8b66cb3f68
commit 1af15f3958
50 changed files with 4166 additions and 295 deletions

View File

@ -10,8 +10,8 @@
{
"type": "SINGLE",
"filters": [],
"versionCode": 14,
"versionName": "1.1.3",
"versionCode": 16,
"versionName": "1.1.5",
"outputFile": "app-release.apk"
}
]

View File

@ -446,7 +446,20 @@ public class PathConfig {
public static final String PATH_MODULE_GRID_ACTIVITY_POPULACE_REAR_DETAIL = "/modulegrid/activity" +
"/censusRearDetail";//留守人员详情
public static final String PATH_MODULE_GRID_ACTIVITY_POPULACE_REAR_ADD = "/modulegrid/activity/censusRearAdd";
//留守人员添加与编辑
//涉稳重点
public static final String PATH_MODULE_GRID_ACTIVITY_POPULACE_CRIMINAL_ATTEN = "/modulegrid/activity" +
"/censusCriminalAtten";
public static final String PATH_MODULE_GRID_ACTIVITY_POPULACE_CRIMINAL_ATTEN_ADD = "/modulegrid/activity" +
"/censusCriminalAttenAdd";
public static final String PATH_MODULE_GRID_ACTIVITY_POPULACE_CRIMINAL_ATTEN_DETAIL = "/modulegrid/activity" +
"/censusCriminalAttenDetail";
//信教群众
public static final String PATH_MODULE_GRID_ACTIVITY_POPULACE_CULT = "/modulegrid/activity/censusCult";
public static final String PATH_MODULE_GRID_ACTIVITY_POPULACE_CULT_ADD = "/modulegrid/activity/censusCultAdd";
public static final String PATH_MODULE_GRID_ACTIVITY_POPULACE_CULT_DETAIL = "/modulegrid/activity/censusCultDetail";
public static final String PATH_MODULE_GRID_ACTIVITY_POPULACE_MIGRANT_LIST = "/modulegrid/activity" +
"/censusMigrantList";//流动人员列表

View File

@ -35,9 +35,9 @@ public class ExceptionHandler {
} else if (errBody.contains("404")) {
ToastUtils.show("无法连接到服务器,请检查网络连接后再试(404)");
} else if (errBody.contains("500")) {
ToastUtils.show("服务器发生错误(500)");
ToastUtils.show("系统错误(500)");
} else {
ToastUtils.show("服务器发生错误");
ToastUtils.show("系统错误");
}
}
} catch (Exception e1) {
@ -49,7 +49,7 @@ public class ExceptionHandler {
} else if (throwable instanceof SocketTimeoutException) {
ToastUtils.show("网络连接超时");
} else {
ToastUtils.show("服务器发生错误(500)");
ToastUtils.show("系统错误(500)");
}
}

View File

@ -58,8 +58,8 @@ ext {
gCompileSdkVersion = 30
gMinSdkVersion = 21
gTargetSdkVersion = 30
gVersionCode = 15
gVersionName = '1.1.4'
gVersionCode = 16
gVersionName = '1.1.5'
gBuildToolsVersion = "29.0.2"
// gVersionCode=26
// gVersionName='1.3.0'

View File

@ -121,7 +121,7 @@ public class IncidentReportActivity extends BaseActivity {
EditText mEtContent;
@BindView(R2.id.rlv_photos)
RecyclerView mRlvPhotos;
// @BindView(R2.id.tv_voice)
// @BindView(R2.id.tv_voice)
// TextView mTvVoice;
// @BindView(R2.id.tv_voice_anim)
// TextView mTvVoiceAnim;
@ -133,7 +133,7 @@ public class IncidentReportActivity extends BaseActivity {
Button mBtnSubmit;
@BindView(R2.id.et_address)
EditText mEtAddress;
// @BindView(R2.id.iv_del_audio)
// @BindView(R2.id.iv_del_audio)
// ImageView mIvDelAudio;
@BindView(R2.id.iv_play_video)
ImageView mIvPlayVideo;
@ -145,7 +145,7 @@ public class IncidentReportActivity extends BaseActivity {
TextureMapView mTmvMap;
@BindView(R2.id.iv_cover)
ImageView mIvCover;
// @BindView(R2.id.iv_voice)
// @BindView(R2.id.iv_voice)
// ImageView mIvVoice;
private Unbinder mBind;
private List<CaseTypeBean> mTypeList;
@ -220,7 +220,8 @@ public class IncidentReportActivity extends BaseActivity {
if (TextUtils.isEmpty(mSelAreaCode)) {
ToastUtils.show("请先选择所在地区");
} else {
ARouter.getInstance().build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_SEL_GRID).withString("areaCode", mSelAreaCode).navigation(mActivity, 15);
ARouter.getInstance().build(PathConfig.PATH_MODULE_COMMON_ACTIVITY_SEL_GRID).withString("areaCode",
mSelAreaCode).navigation(mActivity, 15);
}
});
mIvDelVideo.setVisibility(View.GONE);
@ -329,7 +330,8 @@ public class IncidentReportActivity extends BaseActivity {
* 校验权限
*/
private void checkAuthority() {
PermissionUtils.permission(PermissionConstants.STORAGE, PermissionConstants.LOCATION, PermissionConstants.CAMERA,
PermissionUtils.permission(PermissionConstants.STORAGE, PermissionConstants.LOCATION,
PermissionConstants.CAMERA,
PermissionConstants.MICROPHONE).callback(new PermissionUtils.SimpleCallback() {
@Override
public void onGranted() {
@ -906,7 +908,12 @@ public class IncidentReportActivity extends BaseActivity {
} else {
ToastUtils.show("详细类型数据未录入,无法选取");
}
}).setTitleText("请选择").setCancelColor(Color.parseColor("#1189FF")).setSubmitColor(Color.parseColor("#1189FF")).setTitleColor(Color.parseColor("#1189FF")).build();
})
.setTitleText("请选择")
.setCancelColor(Color.parseColor("#1189FF"))
.setSubmitColor(Color.parseColor("#1189FF"))
.setTitleColor(Color.parseColor("#1189FF"))
.build();
mTypePicker.setPicker(mTypeList, mTypeSubList);
}
mTypePicker.show();
@ -927,33 +934,33 @@ public class IncidentReportActivity extends BaseActivity {
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<List<CaseTypeBean>>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
@Override
public void onSubscribe(@NonNull Disposable d) {
}
}
@Override
public void onNext(@NonNull List<CaseTypeBean> componentTypeBeans) {
dialog.dismiss();
if (componentTypeBeans != null && componentTypeBeans.size() > 0) {
mTypeList = componentTypeBeans;
buildTypeSubBean();
} else {
ToastUtils.show("暂无数据");
}
}
@Override
public void onNext(@NonNull List<CaseTypeBean> componentTypeBeans) {
dialog.dismiss();
if (componentTypeBeans != null && componentTypeBeans.size() > 0) {
mTypeList = componentTypeBeans;
buildTypeSubBean();
} else {
ToastUtils.show("暂无数据");
}
}
@Override
public void onError(@NonNull Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onError(@NonNull Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
@Override
public void onComplete() {
}
});
}
});
}
private void buildTypeSubBean() {

View File

@ -6,9 +6,7 @@ import android.view.View;
import android.view.ViewGroup;
import com.tengshisoft.commonmodule.R;
import com.tengshisoft.commonmodule.beans.CensusCorrectListBean;
import com.tengshisoft.commonmodule.beans.CensusDrugListBean;
import com.tengshisoft.commonmodule.holders.CensusCorrectHolder;
import com.tengshisoft.commonmodule.holders.CensusDrugHolder;
import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
import com.tenlionsoft.baselib.utils.IDCard;
@ -22,8 +20,11 @@ import java.util.List;
* 描述: 人口 吸毒人员
*/
public class CensusDrugAdapter extends BaseRecyclerAdapter<CensusDrugListBean.RowsBean, CensusDrugHolder> {
public CensusDrugAdapter(Context ctx, List<CensusDrugListBean.RowsBean> list) {
private int mType = 1;// 1吸毒 2涉稳 3信教
public CensusDrugAdapter(Context ctx, List<CensusDrugListBean.RowsBean> list, int type) {
super(ctx, list);
mType = type;
}
@Override
@ -36,9 +37,20 @@ public class CensusDrugAdapter extends BaseRecyclerAdapter<CensusDrugListBean.Ro
public void bindHolder(CensusDrugHolder censusPersonHolder, int i) {
CensusDrugListBean.RowsBean bean = mData.get(i);
censusPersonHolder.mTvName.setText(bean.getFullName());
censusPersonHolder.mTvCharge.setText("吸毒原因:" + bean.getDrugReasonDict());
String title1;
String title2;
if (mType == 2 || mType == 3) {
title1 = "管控情况:";
title2 = "是否犯罪:";
censusPersonHolder.mTvCharge.setText(title1 + bean.getControlInfoDict());
censusPersonHolder.mTvTime.setText(title2 + ("1".equals(bean.getHasCrimeHis()) ? "" : ""));
} else {
title1 = "吸毒原因:";
title2 = "初次发现日期:";
censusPersonHolder.mTvCharge.setText(title1 + bean.getDrugReasonDict());
censusPersonHolder.mTvTime.setText(title2 + bean.getDiscoveryDate());
}
censusPersonHolder.mTvIdCard.setText("身份证号:" + IDCard.idMask(bean.getIdCardNumber(), 10, 4));
censusPersonHolder.mTvTime.setText("初次发现日期:" + bean.getDiscoveryDate());
censusPersonHolder.mBtnEdit.setOnClickListener(v -> mEditListener.onEdit(bean, i));
censusPersonHolder.mBtnDel.setOnClickListener(v -> mEditListener.onDel(bean, i));
}

View File

@ -38,7 +38,7 @@ public class CommunityListAdapter extends BaseRecyclerAdapter<CommunityListBean.
public void bindHolder(CommunityListHolder holder, int i) {
CommunityListBean.RowsBean rowsBean = mData.get(i);
holder.mTvCommunityName.setText(rowsBean.getResidentialName());
holder.mTvCommunity.setText(rowsBean.getCommunity());
holder.mTvCommunity.setText(rowsBean.getCommunityName());
holder.mTvCommunityAddress.setText(rowsBean.getLocation() + "-" + rowsBean.getResidentialAddress());
if (mType == 1) {

View File

@ -6,7 +6,7 @@ import java.util.List;
* 作者: adam
* 日期: 2021/10/25 - 4:35 下午
* 邮箱: itgaojian@163.com
* 描述: 吸毒人员列表
* 描述: 吸毒人员列表 涉稳重点 信教群众
*/
public class CensusDrugListBean {
@ -56,6 +56,25 @@ public class CensusDrugListBean {
private String helpUserName;
private String helpUserPhone;
private String idCardNumber;
private String keynoteId;
private String cultId;
public String getCultId() {
return cultId;
}
public void setCultId(String cultId) {
this.cultId = cultId;
}
public String getKeynoteId() {
return keynoteId;
}
public void setKeynoteId(String keynoteId) {
this.keynoteId = keynoteId;
}
public String getAddictsId() {
return addictsId;

View File

@ -4,7 +4,7 @@ package com.tengshisoft.commonmodule.beans;
* 作者: adam
* 日期: 2020/11/27 - 9:04 AM
* 邮箱: itgaojian@163.com
* 描述: 吸毒人员详情
* 描述: 吸毒人员详情 涉稳重点 信教群众
*/
public class DrugDetailBean {
@ -25,6 +25,24 @@ public class DrugDetailBean {
private String helpUserName;
private String helpUserPhone;
private String idCardNumber;
private String keynoteId;
private String cultId;
public String getCultId() {
return cultId;
}
public void setCultId(String cultId) {
this.cultId = cultId;
}
public String getKeynoteId() {
return keynoteId;
}
public void setKeynoteId(String keynoteId) {
this.keynoteId = keynoteId;
}
public String getAddictsId() {
return addictsId;

View File

@ -1,36 +1,20 @@
package com.tengshisoft.commonmodule.beans;
public class GridPopulaceStatisticsBean {
private String zhongDianQingShaoNianZhanBi;
private int zhongDianQingShaoNian;
private int liuDong;
private int xinJiao;
private int waiChuHuJi;
private int jingShen;
private int liuShou;
private int xingMan;
private int feiHuJi;
private String zhongDianQingShaoNianZhanBi;
private int liuShou;
private int sheWen;
private int jingWai;
private int xiDu;
private int aiZi;
private int huJi;
private int jiaoZheng;
private int jingWai;
public int getJingWai() {
return jingWai;
}
public void setJingWai(int jingWai) {
this.jingWai = jingWai;
}
public String getZhongDianQingShaoNianZhanBi() {
return zhongDianQingShaoNianZhanBi;
}
public void setZhongDianQingShaoNianZhanBi(String zhongDianQingShaoNianZhanBi) {
this.zhongDianQingShaoNianZhanBi = zhongDianQingShaoNianZhanBi;
}
public int getZhongDianQingShaoNian() {
return zhongDianQingShaoNian;
@ -40,12 +24,12 @@ public class GridPopulaceStatisticsBean {
this.zhongDianQingShaoNian = zhongDianQingShaoNian;
}
public int getLiuDong() {
return liuDong;
public int getXinJiao() {
return xinJiao;
}
public void setLiuDong(int liuDong) {
this.liuDong = liuDong;
public void setXinJiao(int xinJiao) {
this.xinJiao = xinJiao;
}
public int getWaiChuHuJi() {
@ -64,14 +48,6 @@ public class GridPopulaceStatisticsBean {
this.jingShen = jingShen;
}
public int getLiuShou() {
return liuShou;
}
public void setLiuShou(int liuShou) {
this.liuShou = liuShou;
}
public int getXingMan() {
return xingMan;
}
@ -88,6 +64,38 @@ public class GridPopulaceStatisticsBean {
this.feiHuJi = feiHuJi;
}
public String getZhongDianQingShaoNianZhanBi() {
return zhongDianQingShaoNianZhanBi;
}
public void setZhongDianQingShaoNianZhanBi(String zhongDianQingShaoNianZhanBi) {
this.zhongDianQingShaoNianZhanBi = zhongDianQingShaoNianZhanBi;
}
public int getLiuShou() {
return liuShou;
}
public void setLiuShou(int liuShou) {
this.liuShou = liuShou;
}
public int getSheWen() {
return sheWen;
}
public void setSheWen(int sheWen) {
this.sheWen = sheWen;
}
public int getJingWai() {
return jingWai;
}
public void setJingWai(int jingWai) {
this.jingWai = jingWai;
}
public int getXiDu() {
return xiDu;
}
@ -119,4 +127,124 @@ public class GridPopulaceStatisticsBean {
public void setJiaoZheng(int jiaoZheng) {
this.jiaoZheng = jiaoZheng;
}
//
// private String zhongDianQingShaoNianZhanBi;
// private int zhongDianQingShaoNian;
// private int liuDong;
// private int waiChuHuJi;
// private int jingShen;
// private int liuShou;
// private int xingMan;
// private int feiHuJi;
// private int xiDu;
// private int aiZi;
// private int huJi;
// private int jiaoZheng;
// private int jingWai;
//
// public int getJingWai() {
// return jingWai;
// }
//
// public void setJingWai(int jingWai) {
// this.jingWai = jingWai;
// }
//
// public String getZhongDianQingShaoNianZhanBi() {
// return zhongDianQingShaoNianZhanBi;
// }
//
// public void setZhongDianQingShaoNianZhanBi(String zhongDianQingShaoNianZhanBi) {
// this.zhongDianQingShaoNianZhanBi = zhongDianQingShaoNianZhanBi;
// }
//
// public int getZhongDianQingShaoNian() {
// return zhongDianQingShaoNian;
// }
//
// public void setZhongDianQingShaoNian(int zhongDianQingShaoNian) {
// this.zhongDianQingShaoNian = zhongDianQingShaoNian;
// }
//
// public int getLiuDong() {
// return liuDong;
// }
//
// public void setLiuDong(int liuDong) {
// this.liuDong = liuDong;
// }
//
// public int getWaiChuHuJi() {
// return waiChuHuJi;
// }
//
// public void setWaiChuHuJi(int waiChuHuJi) {
// this.waiChuHuJi = waiChuHuJi;
// }
//
// public int getJingShen() {
// return jingShen;
// }
//
// public void setJingShen(int jingShen) {
// this.jingShen = jingShen;
// }
//
// public int getLiuShou() {
// return liuShou;
// }
//
// public void setLiuShou(int liuShou) {
// this.liuShou = liuShou;
// }
//
// public int getXingMan() {
// return xingMan;
// }
//
// public void setXingMan(int xingMan) {
// this.xingMan = xingMan;
// }
//
// public int getFeiHuJi() {
// return feiHuJi;
// }
//
// public void setFeiHuJi(int feiHuJi) {
// this.feiHuJi = feiHuJi;
// }
//
// public int getXiDu() {
// return xiDu;
// }
//
// public void setXiDu(int xiDu) {
// this.xiDu = xiDu;
// }
//
// public int getAiZi() {
// return aiZi;
// }
//
// public void setAiZi(int aiZi) {
// this.aiZi = aiZi;
// }
//
// public int getHuJi() {
// return huJi;
// }
//
// public void setHuJi(int huJi) {
// this.huJi = huJi;
// }
//
// public int getJiaoZheng() {
// return jiaoZheng;
// }
//
// public void setJiaoZheng(int jiaoZheng) {
// this.jiaoZheng = jiaoZheng;
// }
}

View File

@ -0,0 +1,164 @@
package com.tengshisoft.commonmodule.beans;
/**
* 作者: adam
* 日期: 2020/11/27 - 10:12 AM
* 邮箱: itgaojian@163.com
* 描述:
*/
public class SaveKeynoteBean {
/**
* controlInfo : string
* controlUserName : string
* controlUserPhone : string
* crimeInfo : string
* discoveryDate : string
* drugReason : string
* drugResult : string
* fullName : string
* gender : string
* hasCrimeHis : string
* helpInfo : string
* helpUserName : string
* helpUserPhone : string
* idCardNumber : string
* telephone : string
*/
private String controlInfo;
private String controlUserName;
private String controlUserPhone;
private String crimeInfo;
private String discoveryDate;
private String drugReason;
private String drugResult;
private String fullName;
private String gender;
private String hasCrimeHis;
private String helpInfo;
private String helpUserName;
private String helpUserPhone;
private String idCardNumber;
private String telephone;
public String getControlInfo() {
return controlInfo;
}
public void setControlInfo(String controlInfo) {
this.controlInfo = controlInfo;
}
public String getControlUserName() {
return controlUserName;
}
public void setControlUserName(String controlUserName) {
this.controlUserName = controlUserName;
}
public String getControlUserPhone() {
return controlUserPhone;
}
public void setControlUserPhone(String controlUserPhone) {
this.controlUserPhone = controlUserPhone;
}
public String getCrimeInfo() {
return crimeInfo;
}
public void setCrimeInfo(String crimeInfo) {
this.crimeInfo = crimeInfo;
}
public String getDiscoveryDate() {
return discoveryDate;
}
public void setDiscoveryDate(String discoveryDate) {
this.discoveryDate = discoveryDate;
}
public String getDrugReason() {
return drugReason;
}
public void setDrugReason(String drugReason) {
this.drugReason = drugReason;
}
public String getDrugResult() {
return drugResult;
}
public void setDrugResult(String drugResult) {
this.drugResult = drugResult;
}
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getHasCrimeHis() {
return hasCrimeHis;
}
public void setHasCrimeHis(String hasCrimeHis) {
this.hasCrimeHis = hasCrimeHis;
}
public String getHelpInfo() {
return helpInfo;
}
public void setHelpInfo(String helpInfo) {
this.helpInfo = helpInfo;
}
public String getHelpUserName() {
return helpUserName;
}
public void setHelpUserName(String helpUserName) {
this.helpUserName = helpUserName;
}
public String getHelpUserPhone() {
return helpUserPhone;
}
public void setHelpUserPhone(String helpUserPhone) {
this.helpUserPhone = helpUserPhone;
}
public String getIdCardNumber() {
return idCardNumber;
}
public void setIdCardNumber(String idCardNumber) {
this.idCardNumber = idCardNumber;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
}

View File

@ -191,7 +191,7 @@ public class PopulaceGridStatisticsFragment extends BaseFragment {
xAxis.setTextSize(12f);
xAxis.setLabelCount(6);
xAxis.setGranularity(1f);//防止放大图后,标签错乱
final String label[] = {"刑满释放人员", "社区矫正人员", "吸毒人员", "艾滋病危险人员", "精神障碍患者", "境外人员"};
final String label[] = {"信教群众", "刑满释放", "社区矫正", "涉稳重点", "精神障碍", "管控吸毒"};
xAxis.setValueFormatter(new LargeValueFormatter() {
@Override
public String getFormattedValue(float value) {
@ -400,17 +400,18 @@ public class PopulaceGridStatisticsFragment extends BaseFragment {
mSrlView.setEnableLoadMore(false);
mSrlView.setEnableRefresh(true);
mTvEndTime.setText("截止时间:" + TimeUtils.getCurrentChineseDate());
mTvBaseRegister.setText(b.getHuJi() + "");//户籍人口
mTvRegisterOut.setText(b.getWaiChuHuJi() + "");//户籍人口外出
mTvBaseRegister.setText(b.getHuJi() + b.getWaiChuHuJi() + "");//户籍人口
// mTvRegisterOut.setText(b.getWaiChuHuJi() + "");//户籍人口外出
mTvNoRegister.setText(b.getFeiHuJi() + "");//非户籍人口
mTvFlowCount.setText(b.getLiuDong() + "");//流动人口
// mTvFlowCount.setText(b.getLiuDong() + "");//流动人口
mTvStayCount.setText(b.getLiuShou() + "");//留守人员
mTvYoungCount.setText(getYoungCount(b.getZhongDianQingShaoNian()));
if (b.getHuJi() > 0 || b.getFeiHuJi() > 0 || b.getWaiChuHuJi() > 0) {
setBasePopulace(b.getHuJi(), b.getFeiHuJi(), b.getWaiChuHuJi());
}
//特殊人群
setSpecialData(b.getXingMan(), b.getJiaoZheng(), b.getXiDu(), b.getAiZi(), b.getJingShen(), b.getJingWai());
// "管控吸毒", "精神病障碍", "涉稳重点", "社区矫正", "刑满释放", "信教群众"
setSpecialData(b.getXinJiao(), b.getXingMan(), b.getJiaoZheng(), b.getSheWen(), b.getJingShen(), b.getXiDu());
//重点青少年
setYoungData(b.getZhongDianQingShaoNianZhanBi());

View File

@ -1022,6 +1022,87 @@ public interface GridApis {
Observable<CensusDrugListBean> getDrugList(@Query("page") String page, @Query("keywords") String key, @Header(
"token") String token);
/*=======================================涉稳重点===================================================*/
/**
* 保存涉稳重点
*/
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@POST("app/keynote/savekeynote")
Observable<SuccessBean> doSaveKeynote(@Body RequestBody body, @Header("token") String token);
/**
* 编辑涉稳重点
*/
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@PUT("app/keynote/updatekeynote/{keynoteId}")
Observable<SuccessBean> doEditKeynote(@Path("keynoteId") String id, @Body RequestBody body,
@Header("token") String token);
/**
* 删除涉稳重点
*/
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@DELETE("app/keynote/removekeynote/{ids}")
Observable<SuccessBean> doDelKeynote(@Path("ids") String id, @Header("token") String token);
/**
* 根据ID获取详情涉稳重点
*/
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@GET("app/keynote/getkeynotebyid/{keynoteId}")
Observable<DrugDetailBean> getKeynoteDetailById(@Path("keynoteId") String id, @Header("token") String token);
/**
* 涉稳重点列表
*/
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@GET("app/keynote/listpagekeynotemydata")
Observable<CensusDrugListBean> getKeynoteList(@Query("page") String page, @Query("keywords") String key, @Header(
"token") String token);
/*=======================================信教群众===================================================*/
/**
* 保存信教群众
*/
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@POST("app/cult/savecult")
Observable<SuccessBean> doSaveCult(@Body RequestBody body, @Header("token") String token);
/**
* 编辑信教群众
*/
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@PUT("app/cult/updatecult/{cultId}")
Observable<SuccessBean> doEditCult(@Path("cultId") String id, @Body RequestBody body,
@Header("token") String token);
/**
* 删除信教群众
*/
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@DELETE("app/cult/removecult/{ids}")
Observable<SuccessBean> doDelCult(@Path("ids") String id, @Header("token") String token);
/**
* 根据ID获取详情信教群众
*/
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@GET("app/cult/getcultbyid/{cultId}")
Observable<DrugDetailBean> getCultDetailById(@Path("cultId") String id, @Header("token") String token);
/**
* 信教群众列表
*/
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@GET("app/cult/listpagecultmydata")
Observable<CensusDrugListBean> getCultList(@Query("page") String page, @Query("keywords") String key, @Header(
"token") String token);
/*============================================刑满释放===========================================*/
/**

View File

@ -100,7 +100,7 @@
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:text="户籍人口"
android:text="常住人口"
android:textColor="@color/gray_text_8A"
android:textSize="@dimen/text_12" />
</LinearLayout>
@ -119,6 +119,7 @@
<LinearLayout
android:layout_width="0dp"
android:visibility="gone"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
@ -186,7 +187,7 @@
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:text="非户籍人口"
android:text="外来人口"
android:textColor="@color/gray_text_8A"
android:textSize="@dimen/text_12" />
</LinearLayout>

View File

@ -1 +1,24 @@
<resources></resources>
<resources>
<string name="populace_census" translatable="false">常住人口</string>
<string name="populace_census_input" translatable="false">常住人口信息录入</string>
<string name="populace_census_edit" translatable="false">常住人口信息编辑</string>
<string name="populace_out" translatable="false">外来人口</string>
<string name="populace_out_input" translatable="false">外来人口信息录入</string>
<string name="populace_out_edit" translatable="false">外来人口信息编辑</string>
<string name="populace_drug" translatable="false">管控吸毒</string>
<string name="populace_drug_input" translatable="false">管控吸毒人员信息录入</string>
<string name="populace_drug_edit" translatable="false">管控吸毒人员信息编辑</string>
<string name="populace_mental" translatable="false">精神病障碍</string>
<string name="populace_mental_input" translatable="false">精神病障碍人员信息录入</string>
<string name="populace_mental_edit" translatable="false">精神病障碍人员信息编辑</string>
<string name="populace_criminal" translatable="false">涉稳重点</string>
<string name="populace_criminal_input" translatable="false">涉稳重点人员信息录入</string>
<string name="populace_criminal_edit" translatable="false">涉稳重点人员信息编辑</string>
<string name="populace_correct" translatable="false">社区矫正</string>
<string name="populace_release" translatable="false">刑满释放</string>
<string name="populace_religion" translatable="false">信教群众</string>
<string name="populace_religion_input" translatable="false">信教群众人员信息录入</string>
<string name="populace_religion_edit" translatable="false">信教群众人员信息编辑</string>
<string name="populace_aids" translatable="false">艾滋病危险人员</string>
</resources>

View File

@ -4,6 +4,36 @@
package="com.tengshisoft.gridmodule">
<application>
<activity
android:name=".incident.activitys.populace.special.CensusCultDetailActivity"
android:exported="false"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustPan|stateHidden" />
<activity
android:name=".incident.activitys.populace.special.CensusCultListActivity"
android:exported="false"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustPan|stateHidden" />
<activity
android:name=".incident.activitys.populace.special.CensusCultEnterActivity"
android:exported="false"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustPan|stateHidden" />
<activity
android:name=".incident.activitys.populace.special.CensusKeynoteDetailActivity"
android:exported="false"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustPan|stateHidden" />
<activity
android:name=".incident.activitys.populace.special.CensusKeynoteListActivity"
android:exported="false"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustPan|stateHidden" />
<activity
android:name=".incident.activitys.populace.special.CensusKeynoteEnterActivity"
android:exported="false"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustPan|stateHidden" />
<activity
android:name=".incident.activitys.building.activitys.HousePersonNewActivity"
android:exported="false"

View File

@ -4,13 +4,20 @@ import android.content.Intent;
import android.graphics.Color;
import android.text.TextUtils;
import android.view.View;
import android.view.inputmethod.EditorInfo;
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 androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.tenlionsoft.baselib.utils.ToastUtils;
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
import com.tengshisoft.commonmodule.adapters.CommunityListAdapter;
import com.tengshisoft.commonmodule.beans.CommunityListBean;
@ -22,14 +29,12 @@ import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
import com.tenlionsoft.baselib.core.widget.views.ItemSplitDivider;
import com.tenlionsoft.baselib.utils.ExceptionHandler;
import com.tenlionsoft.baselib.utils.ToastUtils;
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;
@ -58,6 +63,17 @@ public class CommunityManageActivity extends BaseActivity {
@BindView(R2.id.tv_error_hint)
TextView mTvErrorHint;
//搜索布局
//搜索布局
@BindView(R2.id.ll_search_content)
LinearLayout mLlSearchContent;
@BindView(R2.id.et_search_centent)
EditText mEtSearchIdCard;//搜索框
@BindView(R2.id.btn_search)
Button mBtnSearch;//收搜按钮
@BindView(R2.id.iv_clear)
ImageView mIvClear;
private Unbinder mBind;
private int mCurrentPage = 1;//当前页数
private int mTotalSize;//总数
@ -79,7 +95,7 @@ public class CommunityManageActivity extends BaseActivity {
@Override
protected void clearSearch() {
mKeywords = "";
doRefresh();
// doRefresh();
}
@Override
@ -91,14 +107,17 @@ public class CommunityManageActivity extends BaseActivity {
public void initData() {
mBind = ButterKnife.bind(this);
mTvPublish.setVisibility(View.VISIBLE);
mIvAppSearchIcon.setVisibility(View.VISIBLE);
mIvAppSearchIcon.setVisibility(View.GONE);
mType = getIntent().getIntExtra("type", 1);
if (mType == 2) {
mTvPublish.setText("确定");
mTvBaseTitle.setText("小区选择");
mLlSearchContent.setVisibility(View.VISIBLE);
} else {
mTvPublish.setText("新增");
mTvBaseTitle.setText("小区管理");
mLlSearchContent.setVisibility(View.GONE);
}
mTvPublish.setOnClickListener(v -> {
@ -115,8 +134,8 @@ public class CommunityManageActivity extends BaseActivity {
}
} else {
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_COMMUNITY_ADD)
.navigation(mActivity, 12);
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_COMMUNITY_ADD)
.navigation(mActivity, 12);
}
});
mDatas = new ArrayList<>();
@ -125,12 +144,32 @@ public class CommunityManageActivity extends BaseActivity {
mSrlContent.setOnRefreshListener(refreshLayout -> doRefresh());
mRlvCommunitys.setLayoutManager(new LinearLayoutManager(mActivity));
mRlvCommunitys.setAdapter(mAdapter);
mRlvCommunitys.addItemDecoration(new ItemSplitDivider(mActivity, LinearLayoutManager.VERTICAL, 1, Color.parseColor("#BFBFBF")));
mRlvCommunitys.addItemDecoration(new ItemSplitDivider(mActivity, LinearLayoutManager.VERTICAL, 1,
Color.parseColor("#BFBFBF")));
mAdapter.addOnItemClickListener(this::showDetail);
refreshView(STATE_LOAD_SUCCESS);
setStateView(13);
getCommunityList(1);
mEtSearchIdCard.setHint("请输入小区名称");
mEtSearchIdCard.setOnEditorActionListener((v, actionId, event) -> {
if (actionId == EditorInfo.IME_ACTION_SEARCH) {
mKeywords = mEtSearchIdCard.getText().toString().trim();
hideSoftKeyboard();
mEtSearchIdCard.clearFocus();
doRefresh();
return true;
} else {
return false;
}
});
mBtnSearch.setOnClickListener(v -> doRefresh());
mIvClear.setOnClickListener(v -> {
mKeywords = "";
mEtSearchIdCard.setText("");
doRefresh();
});
}
/**
@ -142,14 +181,15 @@ public class CommunityManageActivity extends BaseActivity {
mAdapter.notifyDataSetChanged();
} else {
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_COMMUNITY_DETAIL)
.withString("id", b.getResidentialId())
.navigation(mActivity, 12);
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_COMMUNITY_DETAIL)
.withString("id", b.getResidentialId())
.navigation(mActivity, 12);
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable @org.jetbrains.annotations.Nullable Intent data) {
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) {
@ -166,66 +206,66 @@ public class CommunityManageActivity extends BaseActivity {
private void getCommunityList(int currentPage) {
mCurrentPage = currentPage;
RetrofitManager.getInstance()
.create(GridApis.class)
.getCommunityList(mKeywords, mCurrentPage + "", UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<CommunityListBean>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
.create(GridApis.class)
.getCommunityList(mKeywords, mCurrentPage + "", UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<CommunityListBean>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
}
}
@Override
public void onNext(@NonNull CommunityListBean communityListBean) {
if (communityListBean.getRows() != null && communityListBean.getRows().size() > 0) {
++mCurrentPage;
if (currentPage == 1) {
mDatas.clear();
mDatas.addAll(communityListBean.getRows());
} else {
mDatas.addAll(communityListBean.getRows());
}
setStateView(14);
mAdapter.notifyDataSetChanged();
mSrlContent.finishRefresh();
if (mDatas.size() >= communityListBean.getTotal()) {
mSrlContent.finishLoadMore();
mSrlContent.setNoMoreData(true);
} else {
mSrlContent.finishLoadMore();
mSrlContent.setNoMoreData(false);
}
} else {
if (currentPage > 1) {
mSrlContent.finishLoadMore();
mSrlContent.setNoMoreData(true);
setStateView(14);
} else {
if (TextUtils.isEmpty(mKeywords)) {
//无数据
setStateView(15);
@Override
public void onNext(@NonNull CommunityListBean communityListBean) {
if (communityListBean.getRows() != null && communityListBean.getRows().size() > 0) {
++mCurrentPage;
if (currentPage == 1) {
mDatas.clear();
mDatas.addAll(communityListBean.getRows());
} else {
setStateView(15);
ToastUtils.show("未查询到相关内容");
mDatas.addAll(communityListBean.getRows());
}
setStateView(14);
mAdapter.notifyDataSetChanged();
mSrlContent.finishRefresh();
if (mDatas.size() >= communityListBean.getTotal()) {
mSrlContent.finishLoadMore();
mSrlContent.setNoMoreData(true);
} else {
mSrlContent.finishLoadMore();
mSrlContent.setNoMoreData(false);
}
} else {
if (currentPage > 1) {
mSrlContent.finishLoadMore();
mSrlContent.setNoMoreData(true);
setStateView(14);
} else {
if (TextUtils.isEmpty(mKeywords)) {
//无数据
setStateView(15);
} else {
setStateView(15);
ToastUtils.show("未查询到相关内容");
}
}
}
}
}
@Override
public void onError(@NonNull Throwable e) {
setStateView(16);
mSrlContent.finishLoadMore();
mSrlContent.finishRefresh();
ExceptionHandler.handleException(e);
}
@Override
public void onError(@NonNull Throwable e) {
setStateView(16);
mSrlContent.finishLoadMore();
mSrlContent.finishRefresh();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
@Override
public void onComplete() {
}
});
}
});
}
/**

View File

@ -32,7 +32,7 @@ public class PersonLibFragment extends BaseFragment {
TextView mTvBase;
@BindView(R2.id.tv_register)
TextView mTvRegister;
// @BindView(R2.id.tv_float)
// @BindView(R2.id.tv_float)
// TextView mTvFloat;
@BindView(R2.id.tv_rear)
TextView mTvRear;
@ -50,6 +50,10 @@ public class PersonLibFragment extends BaseFragment {
TextView mTvYoung;
@BindView(R2.id.tv_outbound)
TextView mTvOutbound;
@BindView(R2.id.tv_keynote)
TextView mTvKeyNote;
@BindView(R2.id.tv_cult)
TextView mTvCult;
private Unbinder mBind;
@Override
@ -59,8 +63,8 @@ public class PersonLibFragment extends BaseFragment {
mSrlView.setEnableRefresh(false);
mSrlView.setEnableLoadMore(false);
// mTvBase.setOnClickListener(v -> startPage(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_BASE_LIST));//基础信息
mTvRegisterPeople.setOnClickListener(v -> startPage(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_BASE_LIST));//户籍人口
mTvExtra.setOnClickListener(v -> startPage(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_MIGRANT_LIST));//非户籍人口 -> 流动人员
mTvRegisterPeople.setOnClickListener(v -> startPage(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_BASE_LIST));//常住人口
mTvExtra.setOnClickListener(v -> startPage(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_MIGRANT_LIST));//外来人口
mTvResid.setOnClickListener(v -> startPage(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_RESID_LIST));//户籍人口(外出)
// mTvRegister.setOnClickListener(v -> startPage(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_REGISTER_LIST))
// ;//户籍信息
@ -71,8 +75,14 @@ public class PersonLibFragment extends BaseFragment {
mTvDrug.setOnClickListener(v -> startPage(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_DRUG_LIST));//吸毒
mTvTrouble.setOnClickListener(v -> startPage(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_TROUBLE_LIST));//肇事
mTvAids.setOnClickListener(v -> startPage(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_AIDS_LIST));//艾滋
mTvKeyNote.setOnClickListener(v -> startPage(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_CRIMINAL_ATTEN));
//涉稳重点
mTvCult.setOnClickListener(v -> startPage(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_CULT));//信教群众
mTvYoung.setOnClickListener(v -> startPage(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_YOUNG_LIST));//重点青少年
mTvOutbound.setOnClickListener(v -> startPage(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_OUT_BOUND_LIST));
//境外人员
}

View File

@ -20,7 +20,6 @@ import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.tenlionsoft.baselib.utils.ToastUtils;
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
import com.tengshisoft.commonmodule.adapters.CensusPersonAdapter;
import com.tengshisoft.commonmodule.beans.AreaGridListBean;
@ -37,6 +36,7 @@ import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
import com.tenlionsoft.baselib.core.widget.views.CenterBaseInputView;
import com.tenlionsoft.baselib.core.widget.views.ItemSplitDivider;
import com.tenlionsoft.baselib.utils.ExceptionHandler;
import com.tenlionsoft.baselib.utils.ToastUtils;
import com.tenlionsoft.baselib.utils.UIUtil;
import com.tenlionsoft.baselib.utils.UserLgUtils;
@ -111,13 +111,13 @@ public class CensusBaseActivity extends BaseActivity {
@Override
public void initData() {
mBind = ButterKnife.bind(this);
mTvBaseTitle.setText("户籍人口");
mTvBaseTitle.setText(getString(R.string.populace_census));
mTvPublish.setVisibility(View.VISIBLE);
mIvAppSearchIcon.setVisibility(View.VISIBLE);
mTvPublish.setText("新增");
mTvPublish.setOnClickListener(v -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_BASE_ADD)
.withString("title", "人口基础信息录入")
.withString("title", getString(R.string.populace_census_input))
.navigation());
mAdapter = new CensusPersonAdapter(mActivity, mDatas);
@ -333,7 +333,7 @@ public class CensusBaseActivity extends BaseActivity {
private void doEditBean(CensusPersonBean.RowsBean bean, int pos) {
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_BASE_ADD)
.withString("title", "人口基础信息编辑")
.withString("title", getString(R.string.populace_census_edit))
.withString("id", bean.getBasePopulationInfoId())
.navigation(mActivity, 12);
}

View File

@ -21,7 +21,6 @@ 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.tenlionsoft.baselib.utils.ToastUtils;
import com.tengshisoft.commonmodule.beans.AreaGridListBean;
import com.tengshisoft.commonmodule.beans.SavePersonBean;
import com.tengshisoft.commonmodule.beans.SuccessBean;
@ -42,11 +41,11 @@ import com.tenlionsoft.baselib.interfaces.TextChange;
import com.tenlionsoft.baselib.utils.ExceptionHandler;
import com.tenlionsoft.baselib.utils.IDCard;
import com.tenlionsoft.baselib.utils.RegexUtils;
import com.tenlionsoft.baselib.utils.ToastUtils;
import com.tenlionsoft.baselib.utils.UIUtil;
import com.tenlionsoft.baselib.utils.UserLgUtils;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
@ -167,7 +166,7 @@ public class CensusBaseEnterActivity extends BaseActivity {
mId = getIntent().getStringExtra("id");
String title = getIntent().getStringExtra("title");
String idCard = getIntent().getStringExtra("idCard");
if(!TextUtils.isEmpty(idCard)){
if (!TextUtils.isEmpty(idCard)) {
mEtIdentity.setText(idCard);
}
if (!TextUtils.isEmpty(mId)) {
@ -221,17 +220,17 @@ public class CensusBaseEnterActivity extends BaseActivity {
mTvGrid.setText(mSelGridBean.getGridName());
}
// type 1户籍人口2户籍人口(外出)3非户籍人口
mTypeList = new ArrayList<>();
DicBean bean1 = new DicBean();
bean1.setDataName("户籍人口");
bean1.setDataId("1");
DicBean bean2 = new DicBean();
bean2.setDataName("户籍人口(外出)");
bean2.setDataId("2");
mTypeList.add(bean1);
mTypeList.add(bean2);
mTvType.setOnClickListener(v -> onShowType());
// mTypeList = new ArrayList<>();
// DicBean bean1 = new DicBean();
// bean1.setDataName("户籍人口");
// bean1.setDataId("1");
//
// DicBean bean2 = new DicBean();
// bean2.setDataName("户籍人口(外出)");
// bean2.setDataId("2");
// mTypeList.add(bean1);
// mTypeList.add(bean2);
// mTvType.setOnClickListener(v -> onShowType());
}
/**
@ -350,7 +349,8 @@ public class CensusBaseEnterActivity extends BaseActivity {
if (!TextUtils.isEmpty(onceName)) {
bean.setNameUsedBefore(onceName);
}
bean.setType(mSelTypeBean.getDataId());
// bean.setType(mSelTypeBean.getDataId());//设置人口类型
bean.setType("1");
String gender = mTvGender.getText().toString().trim();
bean.setGender(mSelGender.getDataId());
String birth = mTvBirth.getText().toString().trim();
@ -401,10 +401,10 @@ public class CensusBaseEnterActivity extends BaseActivity {
ToastUtils.show("请输入正确的身份证号码");
return false;
}
if (mSelTypeBean == null) {
ToastUtils.show("请选择人口类型");
return false;
}
// if (mSelTypeBean == null) {
// ToastUtils.show("请选择人口类型");
// return false;
// }
String name = mEtName.getText().toString().trim();
if (TextUtils.isEmpty(name)) {
ToastUtils.show("请输入姓名");
@ -540,26 +540,26 @@ public class CensusBaseEnterActivity extends BaseActivity {
mSelNation.setDataName(bean.getNationDictionaryName());
}
if (!TextUtils.isEmpty(bean.getType())) {
mSelTypeBean = new DicBean();
switch (bean.getType()) {
case "1":
mTvType.setText("户籍人口");
mSelTypeBean.setDataName("户籍人口");
mSelTypeBean.setDataId("1");
break;
case "2":
mTvType.setText("户籍人口(外出)");
mSelTypeBean.setDataName("户籍人口(外出)");
mSelTypeBean.setDataId("2");
break;
case "3":
mSelTypeBean.setDataName("流动人口");
mSelTypeBean.setDataId("3");
mTvType.setText("流动人口");
break;
}
}
// if (!TextUtils.isEmpty(bean.getType())) {
// mSelTypeBean = new DicBean();
// switch (bean.getType()) {
// case "1":
// mTvType.setText("户籍人口");
// mSelTypeBean.setDataName("户籍人口");
// mSelTypeBean.setDataId("1");
// break;
// case "2":
// mTvType.setText("户籍人口(外出)");
// mSelTypeBean.setDataName("户籍人口(外出)");
// mSelTypeBean.setDataId("2");
// break;
// case "3":
// mSelTypeBean.setDataName("流动人口");
// mSelTypeBean.setDataId("3");
// mTvType.setText("流动人口");
// break;
// }
// }
if (!TextUtils.isEmpty(bean.getMaritalStatus())) {
mTvMarry.setText(bean.getMaritalStatusDictionaryName());//婚姻

View File

@ -182,18 +182,18 @@ public class CensusBaseSearchActivity extends BaseActivity {
// showDetail();
// }
// });
mTypeList = new ArrayList<>();
DicBean bean1 = new DicBean();
bean1.setDataName("户籍人口");
bean1.setDataId("1");
DicBean bean2 = new DicBean();
bean2.setDataName("户籍人口(外出)");
bean2.setDataId("2");
mTypeList.add(bean1);
mTypeList.add(bean2);
// mTypeList = new ArrayList<>();
// DicBean bean1 = new DicBean();
// bean1.setDataName("常住人口");
// bean1.setDataId("1");
//
// DicBean bean2 = new DicBean();
// bean2.setDataName("外来人口");
// bean2.setDataId("3");
// mTypeList.add(bean1);
// mTypeList.add(bean2);
mTvGrid.setOnClickListener(v -> onShowGrid());
mTvType.setOnClickListener(v -> onShowType());
// mTvType.setOnClickListener(v -> onShowType());
mBtnSave.setOnClickListener(v -> doSaveEdit());
getMineGridList();
}
@ -204,7 +204,7 @@ public class CensusBaseSearchActivity extends BaseActivity {
dialog.show();
RetrofitManager.getInstance()
.create(GridApis.class)
.doEditPopulaceInfo(mBean.getBasePopulationInfoId(), mSelTypeBean.getDataId(),
.doEditPopulaceInfo(mBean.getBasePopulationInfoId(), "1",
mSelGrid.getGridId(), UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
@ -340,7 +340,7 @@ public class CensusBaseSearchActivity extends BaseActivity {
dialog.dismiss();
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_BASE_ADD)
.withString("title", "人口基础信息录入")
.withString("title", getString(R.string.populace_census_input))
.withString("idCard", mEtSearchCentent.getText().toString().trim())
.navigation();
})
@ -453,7 +453,7 @@ public class CensusBaseSearchActivity extends BaseActivity {
private void doEditBean() {
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_BASE_ADD)
.withString("title", "人口基础信息编辑")
.withString("title", getString(R.string.populace_census_edit))
.withString("id", mBean.getBasePopulationInfoId())
.navigation();
}
@ -548,16 +548,17 @@ public class CensusBaseSearchActivity extends BaseActivity {
mTvBaseGender.setText(mBaseInfo.getGenderDictionaryName());
mTvBaseIdCard.setText(mBaseInfo.getIdCardNumber());//身份证
mTvBasePhone.setText(mBaseInfo.getTelephone());//联系电话
mTvBaseType.setText(getString(R.string.populace_census));
if (!TextUtils.isEmpty(mBaseInfo.getType())) {
switch (mBaseInfo.getType()) {
case "1":
mTvBaseType.setText("户籍人口");
mTvBaseType.setText("常住人口");
break;
case "2":
mTvBaseType.setText("户籍人口(外出)");
mTvBaseType.setText("常住人口");
break;
case "3":
mTvBaseType.setText("非户籍人口");
mTvBaseType.setText("外来人口");
break;
}
}
@ -624,10 +625,10 @@ public class CensusBaseSearchActivity extends BaseActivity {
ToastUtils.show("请选择所属网格");
return false;
}
if (mSelTypeBean == null) {
ToastUtils.show("请选择人员类型");
return false;
}
// if (mSelTypeBean == null) {
// ToastUtils.show("请选择人员类型");
// return false;
// }
return true;
}
@ -635,7 +636,8 @@ public class CensusBaseSearchActivity extends BaseActivity {
SavePersonBean bean = new SavePersonBean();
bean.setGridName(mSelGrid.getGridName());
bean.setGridId(mSelGrid.getGridId());
bean.setType(mSelTypeBean.getDataId());
bean.setType("1");//默认常住人口
// bean.setType(mSelTypeBean.getDataId());
Gson gson = new Gson();
String obj = gson.toJson(bean);
RequestBody requestBody = RequestBody.create(obj, MediaType.parse("application/json; charset=utf-8"));

View File

@ -117,7 +117,7 @@ public class CensusExitrActivity extends BaseActivity {
mTvPublish.setText("新增");
mTvPublish.setOnClickListener(v -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_BASE_ADD)
.withString("title", "人口基础信息录入")
.withString("title", getString(R.string.populace_census_input))
.navigation());
mAdapter = new CensusPersonAdapter(mActivity, mDatas);
@ -265,7 +265,7 @@ public class CensusExitrActivity extends BaseActivity {
private void doEditBean(CensusPersonBean.RowsBean bean, int pos) {
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_BASE_ADD)
.withString("title", "人口基础信息编辑")
.withString("title", getString(R.string.populace_census_edit))
.withString("id", bean.getBasePopulationInfoId())
.navigation(mActivity,12);
}

View File

@ -117,7 +117,7 @@ public class CensusResidsActivity extends BaseActivity {
mTvPublish.setText("新增");
mTvPublish.setOnClickListener(v -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_BASE_ADD)
.withString("title", "人口基础信息录入")
.withString("title", getString(R.string.populace_census_input))
.navigation());
mAdapter = new CensusPersonAdapter(mActivity, mDatas);
@ -265,7 +265,7 @@ public class CensusResidsActivity extends BaseActivity {
private void doEditBean(CensusPersonBean.RowsBean bean, int pos) {
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_BASE_ADD)
.withString("title", "人口基础信息编辑")
.withString("title", getString(R.string.populace_census_edit))
.withString("id", bean.getBasePopulationInfoId())
.navigation(mActivity, 12);
}

View File

@ -86,13 +86,13 @@ public class CensusMigrantListActivity extends BaseActivity {
@Override
public void initData() {
mBind = ButterKnife.bind(this);
mTvBaseTitle.setText("非户籍人口");
mTvBaseTitle.setText(getString(R.string.populace_out));
mTvPublish.setVisibility(View.VISIBLE);
mIvAppSearchIcon.setVisibility(View.VISIBLE);
mTvPublish.setText("新增");
mTvPublish.setOnClickListener(v -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_MIGRANT_ADD)
.withString("title", "非户籍人口信息录入")
.withString("title", getString(R.string.populace_out_input))
.navigation());
mAdapter = new CensusMigrantAdapter(mActivity, mDatas);
@ -195,7 +195,7 @@ public class CensusMigrantListActivity extends BaseActivity {
private void doEditBean(MigrantListBean.RowsBean bean, int pos) {
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_MIGRANT_ADD)
.withString("title", "非户籍人口信息编辑")
.withString("title", getString(R.string.populace_out_edit))
.withString("id", bean.getFloatingPopulationId())
.navigation();
}

View File

@ -89,7 +89,7 @@ public class CensusCorrctListActivity extends BaseActivity {
@Override
public void initData() {
mBind = ButterKnife.bind(this);
mTvBaseTitle.setText("社区矫正人员");
mTvBaseTitle.setText(getString(R.string.populace_correct));
mTvPublish.setVisibility(View.VISIBLE);
mIvAppSearchIcon.setVisibility(View.VISIBLE);
mTvPublish.setText("新增");

View File

@ -0,0 +1,191 @@
package com.tengshisoft.gridmodule.incident.activitys.populace.special;
import android.widget.Switch;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.tengshisoft.commonmodule.beans.DrugDetailBean;
import com.tengshisoft.commonmodule.nets.GridApis;
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.retrofit_net.api.BaseApiService;
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
import com.tenlionsoft.baselib.utils.ExceptionHandler;
import com.tenlionsoft.baselib.utils.UserLgUtils;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.core.Observable;
import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.schedulers.Schedulers;
//信教群众
@Route(path = PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_CULT_DETAIL)
public class CensusCultDetailActivity 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_nation)
TextView mTvBaseNation;//名族
@BindView(R2.id.tv_base_register_loc)
TextView mTvBaseRegisterLoc;//户籍地
@BindView(R2.id.tv_base_cur_address)
TextView mTvBaseCurAddress;//现住址详情
//详情
@BindView(R2.id.tv_first_date)
TextView mTvFirstDate;//初次发现日期
@BindView(R2.id.tv_control_case)
TextView mTvControlCase;//管控情况
@BindView(R2.id.et_control_name)
TextView mEtControlName;//管控人姓名
@BindView(R2.id.et_control_phone)
TextView mEtControlPhone;//管控人联系方式
@BindView(R2.id.et_help_case)
TextView mEtHelpCase;//帮扶情况
@BindView(R2.id.et_help_name)
TextView mEtHelpName;//帮扶人姓名
@BindView(R2.id.et_help_phone)
TextView mEtHelpPhone;//帮扶人联系方式
@BindView(R2.id.sw_is_crime)
Switch mSwIsCrime;//有无犯罪历史
@BindView(R2.id.et_crime_case)
TextView mEtCrimeCase;//犯罪情况
@BindView(R2.id.tv_drug_case)
TextView mTvDrugCase;//吸毒原因
@BindView(R2.id.tv_drug_after)
TextView mTvDrugAfter;//吸毒后果
@BindView(R2.id.tv_base_area)
TextView mTvBaseArea;
@BindView(R2.id.tv_base_grid)
TextView mTvBaseGrid;
private Unbinder mBind;
private PersonSearchBean mBaseInfo;
private DrugDetailBean mDetailBean;
@Override
protected int setLayoutId() {
return R.layout.activity_census_cult_detail;
}
@Override
protected void doShowOptions() {
}
@Override
protected void clearSearch() {
}
@Override
protected void doSearchByTitle() {
}
@Override
public void initData() {
mBind = ButterKnife.bind(this);
mTvBaseTitle.setText("详情");
refreshView(STATE_LOAD_LOADING);
String id = getIntent().getStringExtra("id");
String idCard = getIntent().getStringExtra("idCard");
getDetailData(id, idCard);
}
/**
* 获取详细信息
*
* @param id
* @param idCard
*/
private void getDetailData(String id, String idCard) {
Observable<PersonSearchBean> baseInfo =
RetrofitManager.getInstance().create(BaseApiService.class).doSearchPerson(idCard,
UserLgUtils.getToken());
Observable<DrugDetailBean> registerInfo =
RetrofitManager.getInstance().create(GridApis.class).getCultDetailById(id, UserLgUtils.getToken());
Observable.mergeDelayError(baseInfo, registerInfo)
.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 DrugDetailBean) {
mDetailBean = (DrugDetailBean) o;
setDataToView();
}
refreshView(STATE_LOAD_SUCCESS);
}
@Override
public void onError(@NonNull Throwable e) {
ExceptionHandler.handleException(e);
refreshView(STATE_LOAD_ERROR);
}
@Override
public void onComplete() {
}
});
}
/**
* 基础信息
*/
private void setBaseInfo() {
mTvBaseArea.setText(mBaseInfo.getAreaNames());
mTvBaseGrid.setText(mBaseInfo.getGridName());
mTvBaseName.setText(mBaseInfo.getFullName());
mTvBaseFormerName.setText(mBaseInfo.getNameUsedBefore());
mTvBaseGender.setText(mBaseInfo.getGenderDictionaryName());
mTvBaseIdCard.setText(mBaseInfo.getIdCardNumber());//身份证
mTvBasePhone.setText(mBaseInfo.getTelephone());//联系电话
mTvBaseNation.setText(mBaseInfo.getNationDictionaryName());//名族
mTvBaseRegisterLoc.setText(mBaseInfo.getNativePlaceAddr());//户籍地
mTvBaseCurAddress.setText(mBaseInfo.getCurrentResidenceAddr());//现住址详情
}
/**
* 详细信息
*/
private void setDataToView() {
// mTvFirstDate.setText(mDetailBean.getDiscoveryDate());//初次发现日期
mTvControlCase.setText(mDetailBean.getControlInfoDict());//管控情况
mEtControlName.setText(mDetailBean.getControlUserName());//管控人姓名
mEtControlPhone.setText(mDetailBean.getControlUserPhone());//管控人联系方式
// mEtHelpCase.setText(mDetailBean.getHelpInfo());//帮扶情况
// mEtHelpName.setText(mDetailBean.getHelpUserName());//帮扶人姓名
// mEtHelpPhone.setText(mDetailBean.getHelpUserPhone());//帮扶人联系方式
mSwIsCrime.setChecked(mDetailBean.getHasCrimeHis().equals("1"));//有无犯罪历史
mEtCrimeCase.setText(mDetailBean.getCrimeInfo());//犯罪情况
// mTvDrugCase.setText(mDetailBean.getDrugReasonDict());//吸毒原因
// mTvDrugAfter.setText(mDetailBean.getDrugResultDict());//吸毒后果
}
}

View File

@ -0,0 +1,614 @@
package com.tengshisoft.gridmodule.incident.activitys.populace.special;
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.Switch;
import android.widget.TextView;
import androidx.annotation.NonNull;
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.tengshisoft.commonmodule.beans.DrugDetailBean;
import com.tengshisoft.commonmodule.beans.SaveKeynoteBean;
import com.tengshisoft.commonmodule.beans.SuccessBean;
import com.tengshisoft.commonmodule.nets.GridApis;
import com.tengshisoft.gridmodule.R;
import com.tengshisoft.gridmodule.R2;
import com.tenlionsoft.baselib.constant.DicIds;
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.LogUtils;
import com.tenlionsoft.baselib.utils.RegexUtils;
import com.tenlionsoft.baselib.utils.ToastUtils;
import com.tenlionsoft.baselib.utils.UIUtil;
import com.tenlionsoft.baselib.utils.UserLgUtils;
import java.text.SimpleDateFormat;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.schedulers.Schedulers;
import okhttp3.MediaType;
import okhttp3.RequestBody;
/**
* 信教群众录入
*/
@Route(path = PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_CULT_ADD)
public class CensusCultEnterActivity extends BaseActivity {
//搜索布局
@BindView(R2.id.ll_search_content)
LinearLayout mLlSearchContent;
@BindView(R2.id.et_search_centent)
EditText mEtSearchIdCard;//搜索框
@BindView(R2.id.btn_search)
Button mBtnSearch;//收搜按钮
@BindView(R2.id.iv_clear)
ImageView mIvClear;
//基础信息
@BindView(R2.id.cv_base_info)
LinearLayout mCvBaseInfo;//基础信息
@BindView(R2.id.tv_base_name)
TextView mTvBaseName;
@BindView(R2.id.tv_base_gender)
TextView mTvBaseGender;
@BindView(R2.id.tv_base_native)
TextView mTvBaseNative;
@BindView(R2.id.tv_base_phone)
TextView mTvBasePhone;
@BindView(R2.id.tv_base_cur_loc)
TextView mTvBaseCurLoc;
//详情
@BindView(R2.id.tv_first_date)
TextView mTvFirstDate;//初次发现日期
@BindView(R2.id.tv_control_case)
TextView mTvControlCase;//管控情况
@BindView(R2.id.et_control_name)
EditText mEtControlName;//管控人姓名
@BindView(R2.id.et_control_phone)
EditText mEtControlPhone;//管控人联系方式
@BindView(R2.id.et_help_case)
EditText mEtHelpCase;//帮扶情况
@BindView(R2.id.et_help_name)
EditText mEtHelpName;//帮扶人姓名
@BindView(R2.id.et_help_phone)
EditText mEtHelpPhone;//帮扶人联系方式
@BindView(R2.id.sw_is_crime)
Switch mSwIsCrime;//有无犯罪历史
@BindView(R2.id.et_crime_case)
EditText mEtCrimeCase;//犯罪情况
@BindView(R2.id.tv_drug_case)
TextView mTvDrugCase;//吸毒原因
@BindView(R2.id.tv_drug_after)
TextView mTvDrugAfter;//吸毒后果
@BindView(R2.id.btn_confirm)
Button mBtnConfirm;
@BindView(R2.id.ll_into_content)
LinearLayout mLlContent;
@BindView(R2.id.tv_base_area)
TextView mTvBaseArea;
@BindView(R2.id.tv_base_grid)
TextView mTvBaseGrid;
private SimpleDateFormat mDateFormat = new SimpleDateFormat("yyyy-MM-dd");
private Unbinder mBind;
private String mId;
private PersonSearchBean mBaseInfoBean;
private List<DicBean> mControlList;
private List<DicBean> mDrugCaseList;
private List<DicBean> mAfterDrugList;
private OptionsPickerView<DicBean> mControlPicker;
private OptionsPickerView<DicBean> mDrugCasePicker;
private OptionsPickerView<DicBean> mAfterDrugPicker;
private boolean mIsCrime = false;
private String mSelControlCase;
private String mSelDrugCase;
private String mSelDrugAfter;
@Override
protected int setLayoutId() {
return R.layout.activity_census_cult_add;
}
@Override
protected void doShowOptions() {
}
@Override
protected void clearSearch() {
}
@Override
protected void doSearchByTitle() {
}
@Override
public void initData() {
mBind = ButterKnife.bind(this);
mLlContent.setVisibility(View.INVISIBLE);
//主键
mId = getIntent().getStringExtra("id");
String title = getIntent().getStringExtra("title");
if (!TextUtils.isEmpty(mId)) {
//编辑
mLlSearchContent.setVisibility(View.GONE);
refreshView(STATE_LOAD_LOADING);
getDetailById(mId);
} else {
//新增
mLlSearchContent.setVisibility(View.VISIBLE);
refreshView(STATE_LOAD_SUCCESS);
}
mTvBaseTitle.setText(title);
mBtnSearch.setOnClickListener(v -> doSearchPerson());
mIvClear.setOnClickListener(v -> mEtSearchIdCard.setText(""));
mBtnConfirm.setOnClickListener(v -> doSubmit());
mTvControlCase.setOnClickListener(v -> onShowControlCase());
mTvDrugCase.setOnClickListener(v -> onShowDrugCase());
mTvDrugAfter.setOnClickListener(v -> onShowAfterDrug());
mTvFirstDate.setOnClickListener(v -> onShowDate(1));
mSwIsCrime.setOnCheckedChangeListener((buttonView, isChecked) -> mIsCrime = isChecked);
}
/**
* 管控情况
*/
private void onShowControlCase() {
hideSoftKeyboard();
if (mControlList != null && mControlList.size() > 0) {
if (mControlPicker == null) {
mControlPicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
DicBean bean = mControlList.get(o1);
mTvControlCase.setText(bean.getDataName());
mSelControlCase = bean.getDataId();
})
.setTitleText("请选择")
.setCancelColor(Color.parseColor("#1189FF"))
.setSubmitColor(Color.parseColor("#1189FF"))
.setTitleColor(Color.parseColor("#1189FF"))
.build();
mControlPicker.setPicker(mControlList);
}
mControlPicker.show();
} else {
getDicListByType(DicIds.DIC_CONTROL, 1);
}
}
/**
* 吸毒原因
*/
private void onShowDrugCase() {
hideSoftKeyboard();
if (mDrugCaseList != null && mDrugCaseList.size() > 0) {
if (mDrugCasePicker == null) {
mDrugCasePicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
DicBean bean = mDrugCaseList.get(o1);
mTvDrugCase.setText(bean.getDataName());
mSelDrugCase = bean.getDataId();
})
.setTitleText("请选择")
.setCancelColor(Color.parseColor("#1189FF"))
.setSubmitColor(Color.parseColor("#1189FF"))
.setTitleColor(Color.parseColor("#1189FF"))
.build();
mDrugCasePicker.setPicker(mDrugCaseList);
}
mDrugCasePicker.show();
} else {
getDicListByType(DicIds.DIC_DRUG_CAUSE, 2);
}
}
/**
* 吸毒后果
*/
private void onShowAfterDrug() {
hideSoftKeyboard();
if (mAfterDrugList != null && mAfterDrugList.size() > 0) {
if (mAfterDrugPicker == null) {
mAfterDrugPicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
DicBean bean = mAfterDrugList.get(o1);
mTvDrugAfter.setText(bean.getDataName());
mSelDrugAfter = bean.getDataId();
})
.setTitleText("请选择")
.setCancelColor(Color.parseColor("#1189FF"))
.setSubmitColor(Color.parseColor("#1189FF"))
.setTitleColor(Color.parseColor("#1189FF"))
.build();
mAfterDrugPicker.setPicker(mAfterDrugList);
}
mAfterDrugPicker.show();
} else {
getDicListByType(DicIds.DIC_DRUG_AFTER, 3);
}
}
private void doSubmit() {
if (checkParams()) {
if (!TextUtils.isEmpty(mId)) {
doEdit();
} else {
doAdd();
}
}
}
private void onShowDate(int i) {
hideSoftKeyboard();
TimePickerView mTimePickerView = new TimePickerBuilder(mActivity, (date, v) -> {
switch (i) {
case 1:
mTvFirstDate.setText(mDateFormat.format(date));
break;
}
})
.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(GridApis.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://管控情况
mControlList = typeListBeans;
onShowControlCase();
break;
case 2://吸毒原因
mDrugCaseList = typeListBeans;
onShowDrugCase();
break;
case 3://吸毒后果
mAfterDrugList = typeListBeans;
onShowAfterDrug();
break;
}
} else {
ToastUtils.show("暂无数据");
}
}
@Override
public void onError(@NonNull Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
/**
* 添加
*/
private void doAdd() {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "保存中...");
dialog.show();
RequestBody body = buildParams();
RetrofitManager.getInstance()
.create(GridApis.class)
.doSaveCult(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("新增成功");
finish();
}
@Override
public void onError(@NonNull Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
/**
* 编辑
*/
private void doEdit() {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "修改中...");
dialog.show();
RequestBody body = buildParams();
RetrofitManager.getInstance()
.create(GridApis.class)
.doEditCult(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("修改成功");
finish();
}
@Override
public void onError(@NonNull Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
private RequestBody buildParams() {
SaveKeynoteBean bean = new SaveKeynoteBean();
bean.setFullName(mBaseInfoBean.getFullName());
bean.setIdCardNumber(mBaseInfoBean.getIdCardNumber());
String firstDate = mTvFirstDate.getText().toString().trim();
bean.setDiscoveryDate(firstDate);
String controlCase = mTvControlCase.getText().toString().trim();
bean.setControlInfo(mSelControlCase);
String controlName = mEtControlName.getText().toString().trim();
bean.setControlUserName(controlName);
String controlPhone = mEtControlPhone.getText().toString().trim();
bean.setControlUserPhone(controlPhone);
bean.setHasCrimeHis(mIsCrime ? "1" : "0");
String crimeCase = mEtCrimeCase.getText().toString().trim();
if (!TextUtils.isEmpty(crimeCase)) {
bean.setCrimeInfo(crimeCase);
}
Gson gson = new Gson();
String obj = gson.toJson(bean);
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
return requestBody;
}
/**
* 校验参数
*/
private boolean checkParams() {
// String firstDate = mTvFirstDate.getText().toString().trim();
// if (TextUtils.isEmpty(firstDate)) {
// ToastUtils.show("请选择初次发现日期");
// return false;
// }
String controlCase = mTvControlCase.getText().toString().trim();
if (TextUtils.isEmpty(controlCase)) {
ToastUtils.show("请选择管控情况");
return false;
}
String controlName = mEtControlName.getText().toString().trim();
if (TextUtils.isEmpty(controlName)) {
ToastUtils.show("请输入管控人姓名");
return false;
}
String controlPhone = mEtControlPhone.getText().toString().trim();
if (TextUtils.isEmpty(controlPhone) || !RegexUtils.isTel(controlPhone)) {
ToastUtils.show("请输入正确的管控人联系电话");
return false;
}
// String helpName = mEtHelpName.getText().toString().trim();
// if (TextUtils.isEmpty(helpName)) {
// ToastUtils.show("请输入帮扶人姓名");
// return false;
// }
// String helpPhone = mEtHelpPhone.getText().toString().trim();
// if (TextUtils.isEmpty(helpPhone) || !RegexUtils.isTel(helpPhone)) {
// ToastUtils.show("请输入正确的帮扶人联系电话");
// return false;
// }
return true;
}
/**
* 获取详情
*/
private void getDetailById(String id) {
RetrofitManager.getInstance()
.create(GridApis.class)
.getCultDetailById(id, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<DrugDetailBean>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
}
@Override
public void onNext(@NonNull DrugDetailBean censusCrimeDetailBean) {
setDataToView(censusCrimeDetailBean, 0);
}
@Override
public void onError(@NonNull Throwable e) {
ExceptionHandler.handleException(e);
refreshView(STATE_LOAD_ERROR);
}
@Override
public void onComplete() {
}
});
}
/**
* 根据身份证号码收搜人员详细信息
*/
private void doSearchPerson() {
String searchIdCard = mEtSearchIdCard.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())) {
//设置基础信息
setBaseInfo(infoBean1);
} else {
ToastUtils.show("未查询到改人员的基础信息,请完善基础信息");
mTvBaseName.setText("");
mTvBaseGender.setText("");
mTvBasePhone.setText("");
mTvBaseNative.setText("");
mTvBaseCurLoc.setText("");
mLlContent.setVisibility(View.GONE);
}
}
@Override
public void onError(@NonNull Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
}
/**
* 回填数据
*/
private void setDataToView(DrugDetailBean bean, int type) {
mId = bean.getCultId();
// mTvFirstDate.setText(bean.getDiscoveryDate());//初次发现日期
mTvControlCase.setText(bean.getControlInfoDict());//管控情况
mSelControlCase = bean.getControlInfo();
mEtControlName.setText(bean.getControlUserName());//管控人姓名
mEtControlPhone.setText(bean.getControlUserPhone());//管控人联系方式
// mEtHelpCase.setText(bean.getHelpInfo());//帮扶情况
// mEtHelpName.setText(bean.getHelpUserName());//帮扶人姓名
// mEtHelpPhone.setText(bean.getHelpUserPhone());//帮扶人联系方式
mIsCrime = bean.getHasCrimeHis().equals("1");
mSwIsCrime.setChecked(mIsCrime);//有无犯罪历史
mEtCrimeCase.setText(bean.getCrimeInfo());//犯罪情况
// mTvDrugCase.setText(bean.getDrugReasonDict());//吸毒原因
// mSelDrugCase = bean.getDrugReason();
// mTvDrugAfter.setText(bean.getDrugResultDict());//吸毒后果
// mSelDrugAfter = bean.getDrugResult();
if (type == 0) {
mEtSearchIdCard.setText(bean.getIdCardNumber());
doSearchPerson();
}
refreshView(STATE_LOAD_SUCCESS);
}
/**
* 设置基础信息
*/
private void setBaseInfo(PersonSearchBean o) {
mBaseInfoBean = o;
mLlContent.setVisibility(View.VISIBLE);
mTvBaseArea.setText(o.getAreaNames());
mTvBaseGrid.setText(o.getGridName());
mTvBaseName.setText(o.getFullName());
mTvBaseGender.setText(o.getGenderDictionaryName());
mTvBasePhone.setText(o.getTelephone());
mTvBaseNative.setText(o.getNativePlaceAddr());
mTvBaseCurLoc.setText(o.getCurrentResidenceAddr());
}
@Override
protected void onDestroy() {
super.onDestroy();
if (mBind != null) {
mBind.unbind();
}
}
}

View File

@ -0,0 +1,290 @@
package com.tengshisoft.gridmodule.incident.activitys.populace.special;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.graphics.Color;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
import com.tengshisoft.commonmodule.adapters.CensusDrugAdapter;
import com.tengshisoft.commonmodule.beans.CensusDrugListBean;
import com.tengshisoft.commonmodule.beans.SuccessBean;
import com.tengshisoft.commonmodule.nets.GridApis;
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.core.widget.views.ItemSplitDivider;
import com.tenlionsoft.baselib.utils.ExceptionHandler;
import com.tenlionsoft.baselib.utils.ToastUtils;
import com.tenlionsoft.baselib.utils.UIUtil;
import com.tenlionsoft.baselib.utils.UserLgUtils;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.schedulers.Schedulers;
/**
* 信教群众
*/
@Route(path = PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_CULT)
public class CensusCultListActivity extends BaseActivity {
@BindView(R2.id.rlv_content)
RecyclerView mRlvContent;
@BindView(R2.id.srl_content)
SmartRefreshLayout mSrlContent;
@BindView(R2.id.tv_count)
TextView mTvCount;
private Unbinder mBind;
private String mRows = "20";
private int mCurPage = 1;
private CensusDrugAdapter mAdapter;
private List<CensusDrugListBean.RowsBean> mDatas = new ArrayList<>();
private String mKeywords = "";
@Override
protected int setLayoutId() {
return R.layout.activity_census_cult_list;
}
@Override
protected void doShowOptions() {
}
@Override
protected void clearSearch() {
mKeywords = "";
refreshData();
}
@Override
protected void doSearchByTitle() {
doSearch();
}
@Override
public void initData() {
mBind = ButterKnife.bind(this);
mTvBaseTitle.setText(getString(R.string.populace_religion));
mTvPublish.setVisibility(View.VISIBLE);
mIvAppSearchIcon.setVisibility(View.VISIBLE);
mEtAppSearchContent.setHint("请输入查询的内容(姓名或身份证号)");
mTvPublish.setText("新增");
mTvPublish.setOnClickListener(v -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_CULT_ADD)
.withString("title", getString(R.string.populace_religion_input))
.navigation());
mAdapter = new CensusDrugAdapter(mActivity, mDatas,3);
LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity);
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mRlvContent.setLayoutManager(layoutManager);
mRlvContent.setAdapter(mAdapter);
mAdapter.addOnItemClickListener(bean -> showDetail(bean));
mSrlContent.setOnLoadMoreListener(v -> getUpcomingList(mCurPage));
mSrlContent.setOnRefreshListener(v -> refreshData());
mRlvContent.addItemDecoration(new ItemSplitDivider(mActivity, LinearLayoutManager.VERTICAL, 1,
Color.parseColor("#BFBFBF")));
mAdapter.addOnEditListener(new CensusDrugAdapter.OnEditListener() {
@Override
public void onDel(CensusDrugListBean.RowsBean bean, int pos) {
doDelBean(bean, pos);
}
@Override
public void onEdit(CensusDrugListBean.RowsBean bean, int pos) {
doEditBean(bean, pos);
}
});
}
/**
* 搜索
*/
private void doSearch() {
String searchContent = mEtAppSearchContent.getText().toString().trim();
if (!TextUtils.isEmpty(searchContent)) {
hideSoftKeyboard();
mKeywords = searchContent;
mCurPage = 1;
getUpcomingList(mCurPage);
} else {
ToastUtils.show("请输入要查询的内容");
}
}
/**
* 删除数据
*
* @param bean
* @param pos
*/
private void doDelBean(CensusDrugListBean.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(GridApis.class)
.doDelCult(bean.getCultId(), 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) {
ToastUtils.show("删除成功");
dialog1.dismiss();
refreshData();
}
@Override
public void onError(@NonNull Throwable e) {
dialog1.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
})
.setNegativeButton("取消", (dialog, which) -> dialog.dismiss())
.create()
.show();
}
/**
* 编辑数据
*
* @param bean
* @param pos
*/
private void doEditBean(CensusDrugListBean.RowsBean bean, int pos) {
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_CULT_ADD)
.withString("title", getString(R.string.populace_religion_edit))
.withString("id", bean.getCultId())
.navigation();
}
/**
* 显示详情
*
* @param bean
*/
private void showDetail(CensusDrugListBean.RowsBean bean) {
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_CULT_DETAIL)
.withString("id", bean.getCultId())
.withString("idCard", bean.getIdCardNumber())
.navigation();
}
private void refreshData() {
refreshView(STATE_LOAD_LOADING);
getUpcomingList(1);
}
@Override
protected void onResume() {
super.onResume();
refreshData();
}
/**
* 获取列表
*/
private void getUpcomingList(int page) {
mCurPage = page;
RetrofitManager.getInstance()
.create(GridApis.class)
.getCultList(page + "", mKeywords, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<CensusDrugListBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(CensusDrugListBean leaveListBean) {
mSrlContent.finishLoadMore();
mSrlContent.finishRefresh();
mTvCount.setText("" + leaveListBean.getTotal() + "");
if (leaveListBean != null && leaveListBean.getRows() != null && leaveListBean.getRows().size() > 0) {
++mCurPage;
if (page == 1) {
mDatas.clear();
mDatas.addAll(leaveListBean.getRows());
} else {
mDatas.addAll(leaveListBean.getRows());
}
refreshView(STATE_LOAD_SUCCESS);
mAdapter.notifyDataSetChanged();
mSrlContent.finishRefresh();
if (mDatas.size() >= leaveListBean.getTotal()) {
mSrlContent.finishLoadMore();
mSrlContent.setNoMoreData(true);
} else {
mSrlContent.finishLoadMore();
mSrlContent.setNoMoreData(false);
}
} else {
if (page > 1) {
mSrlContent.finishLoadMore();
mSrlContent.setNoMoreData(false);
refreshView(STATE_LOAD_SUCCESS);
} else {
if (TextUtils.isEmpty(mKeywords)) {
//无数据
refreshView(STATE_LOAD_EMPTY);
} else {
ToastUtils.show("未查询到相关内容");
}
}
}
}
@Override
public void onError(Throwable e) {
refreshView(STATE_LOAD_ERROR);
ExceptionHandler.handleException(e);
mSrlContent.finishLoadMore();
mSrlContent.finishRefresh();
}
@Override
public void onComplete() {
}
});
}
}

View File

@ -87,16 +87,16 @@ public class CensusDrugListActivity extends BaseActivity {
@Override
public void initData() {
mBind = ButterKnife.bind(this);
mTvBaseTitle.setText("吸毒人员");
mTvBaseTitle.setText(getString(R.string.populace_drug));
mTvPublish.setVisibility(View.VISIBLE);
mIvAppSearchIcon.setVisibility(View.VISIBLE);
mEtAppSearchContent.setHint("请输入查询的内容(姓名或身份证号)");
mTvPublish.setText("新增");
mTvPublish.setOnClickListener(v -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_DRUG_ADD)
.withString("title", "吸毒人员信息录入")
.withString("title", getString(R.string.populace_drug_input))
.navigation());
mAdapter = new CensusDrugAdapter(mActivity, mDatas);
mAdapter = new CensusDrugAdapter(mActivity, mDatas,1);
LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity);
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mRlvContent.setLayoutManager(layoutManager);
@ -192,7 +192,7 @@ public class CensusDrugListActivity extends BaseActivity {
private void doEditBean(CensusDrugListBean.RowsBean bean, int pos) {
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_DRUG_ADD)
.withString("title", "吸毒人员信息编辑")
.withString("title", getString(R.string.populace_drug_edit))
.withString("id", bean.getAddictsId())
.navigation();
}

View File

@ -0,0 +1,188 @@
package com.tengshisoft.gridmodule.incident.activitys.populace.special;
import android.widget.Switch;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.tengshisoft.commonmodule.beans.DrugDetailBean;
import com.tengshisoft.commonmodule.nets.GridApis;
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.retrofit_net.api.BaseApiService;
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
import com.tenlionsoft.baselib.utils.ExceptionHandler;
import com.tenlionsoft.baselib.utils.UserLgUtils;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.core.Observable;
import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.schedulers.Schedulers;
//吸毒人员详情
@Route(path = PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_CRIMINAL_ATTEN_DETAIL)
public class CensusKeynoteDetailActivity 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_nation)
TextView mTvBaseNation;//名族
@BindView(R2.id.tv_base_register_loc)
TextView mTvBaseRegisterLoc;//户籍地
@BindView(R2.id.tv_base_cur_address)
TextView mTvBaseCurAddress;//现住址详情
//详情
@BindView(R2.id.tv_first_date)
TextView mTvFirstDate;//初次发现日期
@BindView(R2.id.tv_control_case)
TextView mTvControlCase;//管控情况
@BindView(R2.id.et_control_name)
TextView mEtControlName;//管控人姓名
@BindView(R2.id.et_control_phone)
TextView mEtControlPhone;//管控人联系方式
@BindView(R2.id.et_help_case)
TextView mEtHelpCase;//帮扶情况
@BindView(R2.id.et_help_name)
TextView mEtHelpName;//帮扶人姓名
@BindView(R2.id.et_help_phone)
TextView mEtHelpPhone;//帮扶人联系方式
@BindView(R2.id.sw_is_crime)
Switch mSwIsCrime;//有无犯罪历史
@BindView(R2.id.et_crime_case)
TextView mEtCrimeCase;//犯罪情况
@BindView(R2.id.tv_drug_case)
TextView mTvDrugCase;//吸毒原因
@BindView(R2.id.tv_drug_after)
TextView mTvDrugAfter;//吸毒后果
@BindView(R2.id.tv_base_area)
TextView mTvBaseArea;
@BindView(R2.id.tv_base_grid)
TextView mTvBaseGrid;
private Unbinder mBind;
private PersonSearchBean mBaseInfo;
private DrugDetailBean mDetailBean;
@Override
protected int setLayoutId() {
return R.layout.activity_census_keynote_detail;
}
@Override
protected void doShowOptions() {
}
@Override
protected void clearSearch() {
}
@Override
protected void doSearchByTitle() {
}
@Override
public void initData() {
mBind = ButterKnife.bind(this);
mTvBaseTitle.setText("详情");
refreshView(STATE_LOAD_LOADING);
String id = getIntent().getStringExtra("id");
String idCard = getIntent().getStringExtra("idCard");
getDetailData(id, idCard);
}
/**
* 获取详细信息
*
* @param id
* @param idCard
*/
private void getDetailData(String id, String idCard) {
Observable<PersonSearchBean> baseInfo = RetrofitManager.getInstance().create(BaseApiService.class).doSearchPerson(idCard, UserLgUtils.getToken());
Observable<DrugDetailBean> registerInfo = RetrofitManager.getInstance().create(GridApis.class).getKeynoteDetailById(id, UserLgUtils.getToken());
Observable.mergeDelayError(baseInfo, registerInfo)
.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 DrugDetailBean) {
mDetailBean = (DrugDetailBean) o;
setDataToView();
}
refreshView(STATE_LOAD_SUCCESS);
}
@Override
public void onError(@NonNull Throwable e) {
ExceptionHandler.handleException(e);
refreshView(STATE_LOAD_ERROR);
}
@Override
public void onComplete() {
}
});
}
/**
* 基础信息
*/
private void setBaseInfo() {
mTvBaseArea.setText(mBaseInfo.getAreaNames());
mTvBaseGrid.setText(mBaseInfo.getGridName());
mTvBaseName.setText(mBaseInfo.getFullName());
mTvBaseFormerName.setText(mBaseInfo.getNameUsedBefore());
mTvBaseGender.setText(mBaseInfo.getGenderDictionaryName());
mTvBaseIdCard.setText(mBaseInfo.getIdCardNumber());//身份证
mTvBasePhone.setText(mBaseInfo.getTelephone());//联系电话
mTvBaseNation.setText(mBaseInfo.getNationDictionaryName());//名族
mTvBaseRegisterLoc.setText(mBaseInfo.getNativePlaceAddr());//户籍地
mTvBaseCurAddress.setText(mBaseInfo.getCurrentResidenceAddr());//现住址详情
}
/**
* 详细信息
*/
private void setDataToView() {
// mTvFirstDate.setText(mDetailBean.getDiscoveryDate());//初次发现日期
mTvControlCase.setText(mDetailBean.getControlInfoDict());//管控情况
mEtControlName.setText(mDetailBean.getControlUserName());//管控人姓名
mEtControlPhone.setText(mDetailBean.getControlUserPhone());//管控人联系方式
// mEtHelpCase.setText(mDetailBean.getHelpInfo());//帮扶情况
// mEtHelpName.setText(mDetailBean.getHelpUserName());//帮扶人姓名
// mEtHelpPhone.setText(mDetailBean.getHelpUserPhone());//帮扶人联系方式
mSwIsCrime.setChecked(mDetailBean.getHasCrimeHis().equals("1"));//有无犯罪历史
mEtCrimeCase.setText(mDetailBean.getCrimeInfo());//犯罪情况
// mTvDrugCase.setText(mDetailBean.getDrugReasonDict());//吸毒原因
// mTvDrugAfter.setText(mDetailBean.getDrugResultDict());//吸毒后果
}
}

View File

@ -0,0 +1,615 @@
package com.tengshisoft.gridmodule.incident.activitys.populace.special;
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.Switch;
import android.widget.TextView;
import androidx.annotation.NonNull;
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.tengshisoft.commonmodule.beans.DrugDetailBean;
import com.tengshisoft.commonmodule.beans.SaveKeynoteBean;
import com.tengshisoft.commonmodule.beans.SuccessBean;
import com.tengshisoft.commonmodule.nets.GridApis;
import com.tengshisoft.gridmodule.R;
import com.tengshisoft.gridmodule.R2;
import com.tenlionsoft.baselib.constant.DicIds;
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.LogUtils;
import com.tenlionsoft.baselib.utils.RegexUtils;
import com.tenlionsoft.baselib.utils.ToastUtils;
import com.tenlionsoft.baselib.utils.UIUtil;
import com.tenlionsoft.baselib.utils.UserLgUtils;
import java.text.SimpleDateFormat;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.schedulers.Schedulers;
import okhttp3.MediaType;
import okhttp3.RequestBody;
/**
* 涉稳重点人口
*/
@Route(path = PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_CRIMINAL_ATTEN_ADD)
public class CensusKeynoteEnterActivity extends BaseActivity {
//搜索布局
@BindView(R2.id.ll_search_content)
LinearLayout mLlSearchContent;
@BindView(R2.id.et_search_centent)
EditText mEtSearchIdCard;//搜索框
@BindView(R2.id.btn_search)
Button mBtnSearch;//收搜按钮
@BindView(R2.id.iv_clear)
ImageView mIvClear;
//基础信息
@BindView(R2.id.cv_base_info)
LinearLayout mCvBaseInfo;//基础信息
@BindView(R2.id.tv_base_name)
TextView mTvBaseName;
@BindView(R2.id.tv_base_gender)
TextView mTvBaseGender;
@BindView(R2.id.tv_base_native)
TextView mTvBaseNative;
@BindView(R2.id.tv_base_phone)
TextView mTvBasePhone;
@BindView(R2.id.tv_base_cur_loc)
TextView mTvBaseCurLoc;
//详情
@BindView(R2.id.tv_first_date)
TextView mTvFirstDate;//初次发现日期
@BindView(R2.id.tv_control_case)
TextView mTvControlCase;//管控情况
@BindView(R2.id.et_control_name)
EditText mEtControlName;//管控人姓名
@BindView(R2.id.et_control_phone)
EditText mEtControlPhone;//管控人联系方式
@BindView(R2.id.et_help_case)
EditText mEtHelpCase;//帮扶情况
@BindView(R2.id.et_help_name)
EditText mEtHelpName;//帮扶人姓名
@BindView(R2.id.et_help_phone)
EditText mEtHelpPhone;//帮扶人联系方式
@BindView(R2.id.sw_is_crime)
Switch mSwIsCrime;//有无犯罪历史
@BindView(R2.id.et_crime_case)
EditText mEtCrimeCase;//犯罪情况
@BindView(R2.id.tv_drug_case)
TextView mTvDrugCase;//吸毒原因
@BindView(R2.id.tv_drug_after)
TextView mTvDrugAfter;//吸毒后果
@BindView(R2.id.btn_confirm)
Button mBtnConfirm;
@BindView(R2.id.ll_into_content)
LinearLayout mLlContent;
@BindView(R2.id.tv_base_area)
TextView mTvBaseArea;
@BindView(R2.id.tv_base_grid)
TextView mTvBaseGrid;
private SimpleDateFormat mDateFormat = new SimpleDateFormat("yyyy-MM-dd");
private Unbinder mBind;
private String mId;
private PersonSearchBean mBaseInfoBean;
private List<DicBean> mControlList;
private List<DicBean> mDrugCaseList;
private List<DicBean> mAfterDrugList;
private OptionsPickerView<DicBean> mControlPicker;
private OptionsPickerView<DicBean> mDrugCasePicker;
private OptionsPickerView<DicBean> mAfterDrugPicker;
private boolean mIsCrime = false;
private String mSelControlCase;
private String mSelDrugCase;
private String mSelDrugAfter;
@Override
protected int setLayoutId() {
return R.layout.activity_census_keynote_add;
}
@Override
protected void doShowOptions() {
}
@Override
protected void clearSearch() {
}
@Override
protected void doSearchByTitle() {
}
@Override
public void initData() {
mBind = ButterKnife.bind(this);
mLlContent.setVisibility(View.INVISIBLE);
//主键
mId = getIntent().getStringExtra("id");
LogUtils.e("涉稳重点:" + mId);
String title = getIntent().getStringExtra("title");
if (!TextUtils.isEmpty(mId)) {
//编辑
mLlSearchContent.setVisibility(View.GONE);
refreshView(STATE_LOAD_LOADING);
getDetailById(mId);
} else {
//新增
mLlSearchContent.setVisibility(View.VISIBLE);
refreshView(STATE_LOAD_SUCCESS);
}
mTvBaseTitle.setText(title);
mBtnSearch.setOnClickListener(v -> doSearchPerson());
mIvClear.setOnClickListener(v -> mEtSearchIdCard.setText(""));
mBtnConfirm.setOnClickListener(v -> doSubmit());
mTvControlCase.setOnClickListener(v -> onShowControlCase());
mTvDrugCase.setOnClickListener(v -> onShowDrugCase());
mTvDrugAfter.setOnClickListener(v -> onShowAfterDrug());
mTvFirstDate.setOnClickListener(v -> onShowDate(1));
mSwIsCrime.setOnCheckedChangeListener((buttonView, isChecked) -> mIsCrime = isChecked);
}
/**
* 管控情况
*/
private void onShowControlCase() {
hideSoftKeyboard();
if (mControlList != null && mControlList.size() > 0) {
if (mControlPicker == null) {
mControlPicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
DicBean bean = mControlList.get(o1);
mTvControlCase.setText(bean.getDataName());
mSelControlCase = bean.getDataId();
})
.setTitleText("请选择")
.setCancelColor(Color.parseColor("#1189FF"))
.setSubmitColor(Color.parseColor("#1189FF"))
.setTitleColor(Color.parseColor("#1189FF"))
.build();
mControlPicker.setPicker(mControlList);
}
mControlPicker.show();
} else {
getDicListByType(DicIds.DIC_CONTROL, 1);
}
}
/**
* 吸毒原因
*/
private void onShowDrugCase() {
hideSoftKeyboard();
if (mDrugCaseList != null && mDrugCaseList.size() > 0) {
if (mDrugCasePicker == null) {
mDrugCasePicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
DicBean bean = mDrugCaseList.get(o1);
mTvDrugCase.setText(bean.getDataName());
mSelDrugCase = bean.getDataId();
})
.setTitleText("请选择")
.setCancelColor(Color.parseColor("#1189FF"))
.setSubmitColor(Color.parseColor("#1189FF"))
.setTitleColor(Color.parseColor("#1189FF"))
.build();
mDrugCasePicker.setPicker(mDrugCaseList);
}
mDrugCasePicker.show();
} else {
getDicListByType(DicIds.DIC_DRUG_CAUSE, 2);
}
}
/**
* 吸毒后果
*/
private void onShowAfterDrug() {
hideSoftKeyboard();
if (mAfterDrugList != null && mAfterDrugList.size() > 0) {
if (mAfterDrugPicker == null) {
mAfterDrugPicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
DicBean bean = mAfterDrugList.get(o1);
mTvDrugAfter.setText(bean.getDataName());
mSelDrugAfter = bean.getDataId();
})
.setTitleText("请选择")
.setCancelColor(Color.parseColor("#1189FF"))
.setSubmitColor(Color.parseColor("#1189FF"))
.setTitleColor(Color.parseColor("#1189FF"))
.build();
mAfterDrugPicker.setPicker(mAfterDrugList);
}
mAfterDrugPicker.show();
} else {
getDicListByType(DicIds.DIC_DRUG_AFTER, 3);
}
}
private void doSubmit() {
if (checkParams()) {
if (!TextUtils.isEmpty(mId)) {
doEdit();
} else {
doAdd();
}
}
}
private void onShowDate(int i) {
hideSoftKeyboard();
TimePickerView mTimePickerView = new TimePickerBuilder(mActivity, (date, v) -> {
switch (i) {
case 1:
mTvFirstDate.setText(mDateFormat.format(date));
break;
}
})
.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(GridApis.class)
.getDictListAllByPid(pId, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<List<DicBean>>() {
@Override
public void onSubscribe(@androidx.annotation.NonNull Disposable d) {
}
@Override
public void onNext(@androidx.annotation.NonNull List<DicBean> typeListBeans) {
dialog.dismiss();
if (typeListBeans.size() > 0) {
switch (i) {
case 1://管控情况
mControlList = typeListBeans;
onShowControlCase();
break;
case 2://吸毒原因
mDrugCaseList = typeListBeans;
onShowDrugCase();
break;
case 3://吸毒后果
mAfterDrugList = typeListBeans;
onShowAfterDrug();
break;
}
} else {
ToastUtils.show("暂无数据");
}
}
@Override
public void onError(@androidx.annotation.NonNull Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
/**
* 添加
*/
private void doAdd() {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "保存中...");
dialog.show();
RequestBody body = buildParams();
RetrofitManager.getInstance()
.create(GridApis.class)
.doSaveKeynote(body, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<SuccessBean>() {
@Override
public void onSubscribe(@androidx.annotation.NonNull Disposable d) {
}
@Override
public void onNext(@androidx.annotation.NonNull SuccessBean successBean) {
dialog.dismiss();
ToastUtils.show("新增成功");
finish();
}
@Override
public void onError(@androidx.annotation.NonNull Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
/**
* 编辑
*/
private void doEdit() {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "修改中...");
dialog.show();
RequestBody body = buildParams();
RetrofitManager.getInstance()
.create(GridApis.class)
.doEditKeynote(mId, body, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<SuccessBean>() {
@Override
public void onSubscribe(@androidx.annotation.NonNull Disposable d) {
}
@Override
public void onNext(@androidx.annotation.NonNull SuccessBean successBean) {
dialog.dismiss();
ToastUtils.show("修改成功");
finish();
}
@Override
public void onError(@androidx.annotation.NonNull Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
private RequestBody buildParams() {
SaveKeynoteBean bean = new SaveKeynoteBean();
bean.setFullName(mBaseInfoBean.getFullName());
bean.setIdCardNumber(mBaseInfoBean.getIdCardNumber());
String firstDate = mTvFirstDate.getText().toString().trim();
bean.setDiscoveryDate(firstDate);
String controlCase = mTvControlCase.getText().toString().trim();
bean.setControlInfo(mSelControlCase);
String controlName = mEtControlName.getText().toString().trim();
bean.setControlUserName(controlName);
String controlPhone = mEtControlPhone.getText().toString().trim();
bean.setControlUserPhone(controlPhone);
bean.setHasCrimeHis(mIsCrime ? "1" : "0");
String crimeCase = mEtCrimeCase.getText().toString().trim();
if (!TextUtils.isEmpty(crimeCase)) {
bean.setCrimeInfo(crimeCase);
}
Gson gson = new Gson();
String obj = gson.toJson(bean);
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
return requestBody;
}
/**
* 校验参数
*/
private boolean checkParams() {
// String firstDate = mTvFirstDate.getText().toString().trim();
// if (TextUtils.isEmpty(firstDate)) {
// ToastUtils.show("请选择初次发现日期");
// return false;
// }
String controlCase = mTvControlCase.getText().toString().trim();
if (TextUtils.isEmpty(controlCase)) {
ToastUtils.show("请选择管控情况");
return false;
}
String controlName = mEtControlName.getText().toString().trim();
if (TextUtils.isEmpty(controlName)) {
ToastUtils.show("请输入管控人姓名");
return false;
}
String controlPhone = mEtControlPhone.getText().toString().trim();
if (TextUtils.isEmpty(controlPhone) || !RegexUtils.isTel(controlPhone)) {
ToastUtils.show("请输入正确的管控人联系电话");
return false;
}
// String helpName = mEtHelpName.getText().toString().trim();
// if (TextUtils.isEmpty(helpName)) {
// ToastUtils.show("请输入帮扶人姓名");
// return false;
// }
// String helpPhone = mEtHelpPhone.getText().toString().trim();
// if (TextUtils.isEmpty(helpPhone) || !RegexUtils.isTel(helpPhone)) {
// ToastUtils.show("请输入正确的帮扶人联系电话");
// return false;
// }
return true;
}
/**
* 获取详情
*/
private void getDetailById(String id) {
RetrofitManager.getInstance()
.create(GridApis.class)
.getKeynoteDetailById(id, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<DrugDetailBean>() {
@Override
public void onSubscribe(@androidx.annotation.NonNull Disposable d) {
}
@Override
public void onNext(@androidx.annotation.NonNull DrugDetailBean censusCrimeDetailBean) {
setDataToView(censusCrimeDetailBean, 0);
}
@Override
public void onError(@androidx.annotation.NonNull Throwable e) {
ExceptionHandler.handleException(e);
refreshView(STATE_LOAD_ERROR);
}
@Override
public void onComplete() {
}
});
}
/**
* 根据身份证号码收搜人员详细信息
*/
private void doSearchPerson() {
String searchIdCard = mEtSearchIdCard.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(@androidx.annotation.NonNull Disposable d) {
}
@Override
public void onNext(@androidx.annotation.NonNull PersonSearchBean infoBean1) {
dialog.dismiss();
if (!TextUtils.isEmpty(infoBean1.getIdCardNumber())) {
//设置基础信息
setBaseInfo(infoBean1);
} else {
ToastUtils.show("未查询到改人员的基础信息,请完善基础信息");
mTvBaseName.setText("");
mTvBaseGender.setText("");
mTvBasePhone.setText("");
mTvBaseNative.setText("");
mTvBaseCurLoc.setText("");
mLlContent.setVisibility(View.GONE);
}
}
@Override
public void onError(@NonNull Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
}
/**
* 回填数据
*/
private void setDataToView(DrugDetailBean bean, int type) {
mId = bean.getKeynoteId();
// mTvFirstDate.setText(bean.getDiscoveryDate());//初次发现日期
mTvControlCase.setText(bean.getControlInfoDict());//管控情况
mSelControlCase = bean.getControlInfo();
mEtControlName.setText(bean.getControlUserName());//管控人姓名
mEtControlPhone.setText(bean.getControlUserPhone());//管控人联系方式
// mEtHelpCase.setText(bean.getHelpInfo());//帮扶情况
// mEtHelpName.setText(bean.getHelpUserName());//帮扶人姓名
// mEtHelpPhone.setText(bean.getHelpUserPhone());//帮扶人联系方式
mIsCrime = bean.getHasCrimeHis().equals("1");
mSwIsCrime.setChecked(mIsCrime);//有无犯罪历史
mEtCrimeCase.setText(bean.getCrimeInfo());//犯罪情况
// mTvDrugCase.setText(bean.getDrugReasonDict());//吸毒原因
// mSelDrugCase = bean.getDrugReason();
// mTvDrugAfter.setText(bean.getDrugResultDict());//吸毒后果
// mSelDrugAfter = bean.getDrugResult();
if (type == 0) {
mEtSearchIdCard.setText(bean.getIdCardNumber());
doSearchPerson();
}
refreshView(STATE_LOAD_SUCCESS);
}
/**
* 设置基础信息
*/
private void setBaseInfo(PersonSearchBean o) {
mBaseInfoBean = o;
mLlContent.setVisibility(View.VISIBLE);
mTvBaseArea.setText(o.getAreaNames());
mTvBaseGrid.setText(o.getGridName());
mTvBaseName.setText(o.getFullName());
mTvBaseGender.setText(o.getGenderDictionaryName());
mTvBasePhone.setText(o.getTelephone());
mTvBaseNative.setText(o.getNativePlaceAddr());
mTvBaseCurLoc.setText(o.getCurrentResidenceAddr());
}
@Override
protected void onDestroy() {
super.onDestroy();
if (mBind != null) {
mBind.unbind();
}
}
}

View File

@ -0,0 +1,290 @@
package com.tengshisoft.gridmodule.incident.activitys.populace.special;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.graphics.Color;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
import com.tengshisoft.commonmodule.adapters.CensusDrugAdapter;
import com.tengshisoft.commonmodule.beans.CensusDrugListBean;
import com.tengshisoft.commonmodule.beans.SuccessBean;
import com.tengshisoft.commonmodule.nets.GridApis;
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.core.widget.views.ItemSplitDivider;
import com.tenlionsoft.baselib.utils.ExceptionHandler;
import com.tenlionsoft.baselib.utils.ToastUtils;
import com.tenlionsoft.baselib.utils.UIUtil;
import com.tenlionsoft.baselib.utils.UserLgUtils;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers;
import io.reactivex.rxjava3.core.Observer;
import io.reactivex.rxjava3.disposables.Disposable;
import io.reactivex.rxjava3.schedulers.Schedulers;
/**
* 涉稳重点
*/
@Route(path = PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_CRIMINAL_ATTEN)
public class CensusKeynoteListActivity extends BaseActivity {
@BindView(R2.id.rlv_content)
RecyclerView mRlvContent;
@BindView(R2.id.srl_content)
SmartRefreshLayout mSrlContent;
@BindView(R2.id.tv_count)
TextView mTvCount;
private Unbinder mBind;
private String mRows = "20";
private int mCurPage = 1;
private CensusDrugAdapter mAdapter;
private List<CensusDrugListBean.RowsBean> mDatas = new ArrayList<>();
private String mKeywords = "";
@Override
protected int setLayoutId() {
return R.layout.activity_census_keynote_list;
}
@Override
protected void doShowOptions() {
}
@Override
protected void clearSearch() {
mKeywords = "";
refreshData();
}
@Override
protected void doSearchByTitle() {
doSearch();
}
@Override
public void initData() {
mBind = ButterKnife.bind(this);
mTvBaseTitle.setText(getString(R.string.populace_criminal));
mTvPublish.setVisibility(View.VISIBLE);
mIvAppSearchIcon.setVisibility(View.VISIBLE);
mEtAppSearchContent.setHint("请输入查询的内容(姓名或身份证号)");
mTvPublish.setText("新增");
mTvPublish.setOnClickListener(v -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_CRIMINAL_ATTEN_ADD)
.withString("title", getString(R.string.populace_criminal_input))
.navigation());
mAdapter = new CensusDrugAdapter(mActivity, mDatas,2);
LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity);
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mRlvContent.setLayoutManager(layoutManager);
mRlvContent.setAdapter(mAdapter);
mAdapter.addOnItemClickListener(bean -> showDetail(bean));
mSrlContent.setOnLoadMoreListener(v -> getUpcomingList(mCurPage));
mSrlContent.setOnRefreshListener(v -> refreshData());
mRlvContent.addItemDecoration(new ItemSplitDivider(mActivity, LinearLayoutManager.VERTICAL, 1,
Color.parseColor("#BFBFBF")));
mAdapter.addOnEditListener(new CensusDrugAdapter.OnEditListener() {
@Override
public void onDel(CensusDrugListBean.RowsBean bean, int pos) {
doDelBean(bean, pos);
}
@Override
public void onEdit(CensusDrugListBean.RowsBean bean, int pos) {
doEditBean(bean, pos);
}
});
}
/**
* 搜索
*/
private void doSearch() {
String searchContent = mEtAppSearchContent.getText().toString().trim();
if (!TextUtils.isEmpty(searchContent)) {
hideSoftKeyboard();
mKeywords = searchContent;
mCurPage = 1;
getUpcomingList(mCurPage);
} else {
ToastUtils.show("请输入要查询的内容");
}
}
/**
* 删除数据
*
* @param bean
* @param pos
*/
private void doDelBean(CensusDrugListBean.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(GridApis.class)
.doDelKeynote(bean.getKeynoteId(), 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) {
ToastUtils.show("删除成功");
dialog1.dismiss();
refreshData();
}
@Override
public void onError(@NonNull Throwable e) {
dialog1.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
})
.setNegativeButton("取消", (dialog, which) -> dialog.dismiss())
.create()
.show();
}
/**
* 编辑数据
*
* @param bean
* @param pos
*/
private void doEditBean(CensusDrugListBean.RowsBean bean, int pos) {
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_CRIMINAL_ATTEN_ADD)
.withString("title", getString(R.string.populace_criminal_edit))
.withString("id", bean.getKeynoteId())
.navigation();
}
/**
* 显示详情
*
* @param bean
*/
private void showDetail(CensusDrugListBean.RowsBean bean) {
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_CRIMINAL_ATTEN_DETAIL)
.withString("id", bean.getKeynoteId())
.withString("idCard", bean.getIdCardNumber())
.navigation();
}
private void refreshData() {
refreshView(STATE_LOAD_LOADING);
getUpcomingList(1);
}
@Override
protected void onResume() {
super.onResume();
refreshData();
}
/**
* 获取列表
*/
private void getUpcomingList(int page) {
mCurPage = page;
RetrofitManager.getInstance()
.create(GridApis.class)
.getKeynoteList(page + "", mKeywords, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<CensusDrugListBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(CensusDrugListBean leaveListBean) {
mSrlContent.finishLoadMore();
mSrlContent.finishRefresh();
mTvCount.setText("" + leaveListBean.getTotal() + "");
if (leaveListBean != null && leaveListBean.getRows() != null && leaveListBean.getRows().size() > 0) {
++mCurPage;
if (page == 1) {
mDatas.clear();
mDatas.addAll(leaveListBean.getRows());
} else {
mDatas.addAll(leaveListBean.getRows());
}
refreshView(STATE_LOAD_SUCCESS);
mAdapter.notifyDataSetChanged();
mSrlContent.finishRefresh();
if (mDatas.size() >= leaveListBean.getTotal()) {
mSrlContent.finishLoadMore();
mSrlContent.setNoMoreData(true);
} else {
mSrlContent.finishLoadMore();
mSrlContent.setNoMoreData(false);
}
} else {
if (page > 1) {
mSrlContent.finishLoadMore();
mSrlContent.setNoMoreData(false);
refreshView(STATE_LOAD_SUCCESS);
} else {
if (TextUtils.isEmpty(mKeywords)) {
//无数据
refreshView(STATE_LOAD_EMPTY);
} else {
ToastUtils.show("未查询到相关内容");
}
}
}
}
@Override
public void onError(Throwable e) {
refreshView(STATE_LOAD_ERROR);
ExceptionHandler.handleException(e);
mSrlContent.finishLoadMore();
mSrlContent.finishRefresh();
}
@Override
public void onComplete() {
}
});
}
}

View File

@ -86,7 +86,7 @@ public class CensusSpecialCriminalListActivity extends BaseActivity {
@Override
public void initData() {
mBind = ButterKnife.bind(this);
mTvBaseTitle.setText("刑满释放人员");
mTvBaseTitle.setText(getString(R.string.populace_release));
mTvPublish.setVisibility(View.VISIBLE);
mIvAppSearchIcon.setVisibility(View.VISIBLE);
mEtAppSearchContent.setHint("请输入人员姓名或身份证号码");

View File

@ -5,15 +5,14 @@ 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.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.tenlionsoft.baselib.utils.ToastUtils;
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
import com.tengshisoft.commonmodule.adapters.CensusTroubleAdapter;
import com.tengshisoft.commonmodule.beans.CensusTroubleListBean;
@ -26,16 +25,12 @@ import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
import com.tenlionsoft.baselib.core.widget.views.ItemSplitDivider;
import com.tenlionsoft.baselib.utils.ExceptionHandler;
import com.tenlionsoft.baselib.utils.ToastUtils;
import com.tenlionsoft.baselib.utils.UIUtil;
import com.tenlionsoft.baselib.utils.UserLgUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
@ -89,13 +84,13 @@ public class CensusTroubleListActivity extends BaseActivity {
@Override
public void initData() {
mBind = ButterKnife.bind(this);
mTvBaseTitle.setText("肇事肇祸等精神障碍患者");
mTvBaseTitle.setText(getString(R.string.populace_mental));
mTvPublish.setVisibility(View.VISIBLE);
mIvAppSearchIcon.setVisibility(View.VISIBLE);
mTvPublish.setText("新增");
mTvPublish.setOnClickListener(v -> ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_TROUBLE_ADD)
.withString("title", "肇事肇祸等精神障碍患者信息录入")
.withString("title", getString(R.string.populace_mental_input))
.navigation());
mAdapter = new CensusTroubleAdapter(mActivity, mDatas);
LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity);
@ -193,7 +188,7 @@ public class CensusTroubleListActivity extends BaseActivity {
private void doEditBean(CensusTroubleListBean.RowsBean bean, int pos) {
ARouter.getInstance()
.build(PathConfig.PATH_MODULE_GRID_ACTIVITY_POPULACE_TROUBLE_ADD)
.withString("title", "肇事肇祸等精神障碍患者信息编辑")
.withString("title", getString(R.string.populace_mental_input))
.withString("id", bean.getMentalDisordersId())
.navigation();
}

View File

@ -71,7 +71,7 @@
android:id="@+id/et_identity"
style="@style/item_content_23" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<LinearLayout style="@style/item_white" android:visibility="gone">
<TextView

View File

@ -311,7 +311,7 @@
</LinearLayout>
<LinearLayout style="@style/item_white">
<LinearLayout style="@style/item_white" android:visibility="gone">
<ImageView style="@style/style_hint_star" />

View File

@ -0,0 +1,283 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<LinearLayout
android:id="@+id/ll_base_info"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/shape_blue_bg"
android:orientation="vertical"
android:padding="20dp">
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/ll_base_info"
android:layout_marginTop="-20dp"
android:layout_marginBottom="48dp"
android:background="@drawable/shape_rectangle_white_top">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="25dp"
android:scrollbars="none">
<LinearLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp">
<include layout="@layout/item_search" />
</LinearLayout>
<include layout="@layout/layout_base_info" />
<LinearLayout
android:id="@+id/ll_into_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:orientation="vertical">
<TextView
android:id="@+id/tv_issue_base_info"
style="@style/issue_report_title"
android:padding="8dp"
android:text="信教信息"
android:textStyle="bold" />
<LinearLayout style="@style/item_white" android:visibility="gone">
<ImageView style="@style/style_hint_star" />
<TextView
style="@style/item_title"
android:text="初次发现日期"
android:textSize="12dp" />
<TextView
android:id="@+id/tv_first_date"
style="@style/sel_text_arrow"
android:hint="请选择初次发现日期" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<ImageView style="@style/style_hint_star" />
<TextView
style="@style/item_title"
android:layout_gravity="center_vertical"
android:text="管控情况" />
<TextView
android:id="@+id/tv_control_case"
style="@style/sel_text_arrow"
android:hint="请选择管控情况" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<ImageView
style="@style/style_hint_star"
android:visibility="visible" />
<TextView
style="@style/item_title"
android:layout_gravity="center_vertical"
android:text="管控人姓名" />
<EditText
android:id="@+id/et_control_name"
style="@style/item_content"
android:layout_gravity="center_vertical"
android:hint="请输入管控人姓名"
android:inputType="text" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<ImageView
style="@style/style_hint_star"
android:visibility="visible" />
<TextView
style="@style/item_title"
android:layout_gravity="center_vertical"
android:text="管 控 人\n联系方式" />
<EditText
android:id="@+id/et_control_phone"
style="@style/item_content"
android:layout_gravity="center_vertical"
android:hint="请输入管控人联系方式"
android:inputType="number" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<ImageView
style="@style/style_hint_star"
android:visibility="invisible" />
<TextView
style="@style/item_title"
android:layout_gravity="center_vertical"
android:text="帮扶情况" />
<EditText
android:id="@+id/et_help_case"
style="@style/item_content"
android:layout_gravity="center_vertical"
android:hint="请输入帮扶情况"
android:inputType="textMultiLine" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<ImageView style="@style/style_hint_star" />
<TextView
style="@style/item_title"
android:layout_gravity="center_vertical"
android:text="帮扶人姓名" />
<EditText
android:id="@+id/et_help_name"
style="@style/item_content"
android:layout_gravity="center_vertical"
android:hint="请输入帮扶人姓名"
android:inputType="textMultiLine" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<ImageView style="@style/style_hint_star" />
<TextView
style="@style/item_title"
android:text="帮 扶 人\n联系方式" />
<EditText
android:id="@+id/et_help_phone"
style="@style/item_content"
android:layout_gravity="center_vertical"
android:hint="请输入帮扶人联系方式"
android:inputType="number" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<ImageView
style="@style/style_hint_star"
android:visibility="invisible" />
<TextView
style="@style/item_title"
android:layout_gravity="center_vertical"
android:text="有无犯罪史" />
<Switch
android:id="@+id/sw_is_crime"
style="@style/item_switch_have"
android:layout_gravity="center_vertical" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<ImageView
style="@style/style_hint_star"
android:visibility="invisible" />
<TextView
style="@style/item_title"
android:layout_gravity="center_vertical"
android:text="犯罪情况" />
<EditText
android:id="@+id/et_crime_case"
style="@style/item_content"
android:layout_gravity="center_vertical"
android:hint="请输入犯罪情况"
android:inputType="textMultiLine" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<ImageView
style="@style/style_hint_star"
android:visibility="invisible" />
<TextView
style="@style/item_title"
android:layout_gravity="center_vertical"
android:text="吸毒原因" />
<TextView
android:id="@+id/tv_drug_case"
style="@style/sel_text_arrow"
android:layout_gravity="center_vertical"
android:hint="请选择吸毒原因" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<ImageView
style="@style/style_hint_star"
android:visibility="invisible" />
<TextView
style="@style/item_title"
android:layout_gravity="center_vertical"
android:text="吸毒后果" />
<TextView
android:id="@+id/tv_drug_after"
style="@style/sel_text_arrow"
android:layout_gravity="center_vertical"
android:hint="请选择吸毒后果" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
<Button
android:id="@+id/btn_confirm"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@drawable/sel_btn_submit"
android:minHeight="0dp"
android:padding="10dp"
android:text="保&#160;&#160;&#160;&#160;存"
android:textColor="@color/white"
android:textSize="17dp" />
</RelativeLayout>

View File

@ -0,0 +1,220 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:clipChildren="true">
<LinearLayout
android:id="@+id/ll_base_info"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/shape_blue_bg"
android:orientation="vertical"
android:padding="20dp">
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/ll_base_info"
android:layout_marginTop="-20dp"
android:background="@drawable/shape_rectangle_white_top"
android:orientation="vertical"
android:paddingTop="15dp">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/layout_base_info_detail" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:background="@color/line_bg_EF" />
<TextView
style="@style/issue_report_title"
android:padding="8dp"
android:text="信教信息" />
<LinearLayout style="@style/item_white" android:visibility="gone">
<TextView
style="@style/item_title_23"
android:text="初次发现日期"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_first_date"
style="@style/item_content_23" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<TextView
style="@style/item_title_23"
android:layout_gravity="center_vertical"
android:text="管控情况" />
<TextView
android:id="@+id/tv_control_case"
style="@style/item_content_23" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<TextView
style="@style/item_title_23"
android:layout_gravity="center_vertical"
android:text="管控人姓名" />
<TextView
android:id="@+id/et_control_name"
style="@style/item_content_23"
android:layout_gravity="center_vertical" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<TextView
style="@style/item_title_23"
android:layout_gravity="center_vertical"
android:text="管 控 人\n联系方式" />
<TextView
android:id="@+id/et_control_phone"
style="@style/item_content_23"
android:layout_gravity="center_vertical" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<TextView
style="@style/item_title_23"
android:layout_gravity="center_vertical"
android:text="帮扶情况" />
<TextView
android:id="@+id/et_help_case"
style="@style/item_content_23"
android:layout_gravity="center_vertical" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<TextView
style="@style/item_title_23"
android:layout_gravity="center_vertical"
android:text="帮扶人姓名" />
<TextView
android:id="@+id/et_help_name"
style="@style/item_content_23"
android:layout_gravity="center_vertical" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<TextView
style="@style/item_title_23"
android:text="帮 扶 人\n联系方式" />
<TextView
android:id="@+id/et_help_phone"
style="@style/item_content_23"
android:layout_gravity="center_vertical" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<TextView
style="@style/item_title_23"
android:layout_gravity="center_vertical"
android:text="有无犯罪史" />
<Switch
android:id="@+id/sw_is_crime"
style="@style/item_switch_have"
android:layout_gravity="center_vertical"
android:enabled="false" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<TextView
style="@style/item_title_23"
android:layout_gravity="center_vertical"
android:text="犯罪情况" />
<TextView
android:id="@+id/et_crime_case"
style="@style/item_content_23"
android:layout_gravity="center_vertical" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<TextView
style="@style/item_title_23"
android:layout_gravity="center_vertical"
android:text="吸毒原因" />
<TextView
android:id="@+id/tv_drug_case"
style="@style/item_content_23"
android:layout_gravity="center_vertical" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<TextView
style="@style/item_title_23"
android:layout_gravity="center_vertical"
android:text="吸毒后果" />
<TextView
android:id="@+id/tv_drug_after"
style="@style/item_content_23" />
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
</RelativeLayout>

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<LinearLayout
android:id="@+id/ll_base_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_blue_bg"
android:orientation="vertical"
android:padding="20dp">
<TextView
android:id="@+id/tv_count"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingBottom="5dp"
android:textColor="@color/white"
android:textSize="@dimen/text_14"
android:textStyle="bold"
tools:text="共30人" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/ll_base_info"
android:layout_marginTop="-20dp"
android:background="@drawable/shape_rectangle_white_top">
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:itemCount="3"
tools:listitem="@layout/item_person_register" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout>
</RelativeLayout>

View File

@ -56,7 +56,7 @@
android:id="@+id/tv_issue_base_info"
style="@style/issue_report_title"
android:padding="8dp"
android:text="吸毒人员信息"
android:text="管控吸毒信息"
android:textStyle="bold" />
<LinearLayout style="@style/item_white">

View File

@ -47,7 +47,7 @@
<TextView
style="@style/issue_report_title"
android:padding="8dp"
android:text="吸毒人员信息" />
android:text="管控吸毒信息" />
<LinearLayout style="@style/item_white">

View File

@ -83,7 +83,7 @@
android:hint="请输入身份证号码" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<LinearLayout style="@style/item_white" android:visibility="gone">
<ImageView style="@style/style_hint_star" />

View File

@ -0,0 +1,283 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<LinearLayout
android:id="@+id/ll_base_info"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/shape_blue_bg"
android:orientation="vertical"
android:padding="20dp">
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/ll_base_info"
android:layout_marginTop="-20dp"
android:layout_marginBottom="48dp"
android:background="@drawable/shape_rectangle_white_top">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="25dp"
android:scrollbars="none">
<LinearLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp">
<include layout="@layout/item_search" />
</LinearLayout>
<include layout="@layout/layout_base_info" />
<LinearLayout
android:id="@+id/ll_into_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:orientation="vertical">
<TextView
android:id="@+id/tv_issue_base_info"
style="@style/issue_report_title"
android:padding="8dp"
android:text="涉稳重点信息"
android:textStyle="bold" />
<LinearLayout style="@style/item_white" android:visibility="gone">
<ImageView style="@style/style_hint_star" />
<TextView
style="@style/item_title"
android:text="初次发现日期"
android:textSize="12dp" />
<TextView
android:id="@+id/tv_first_date"
style="@style/sel_text_arrow"
android:hint="请选择初次发现日期" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<ImageView style="@style/style_hint_star" />
<TextView
style="@style/item_title"
android:layout_gravity="center_vertical"
android:text="管控情况" />
<TextView
android:id="@+id/tv_control_case"
style="@style/sel_text_arrow"
android:hint="请选择管控情况" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<ImageView
style="@style/style_hint_star"
android:visibility="visible" />
<TextView
style="@style/item_title"
android:layout_gravity="center_vertical"
android:text="管控人姓名" />
<EditText
android:id="@+id/et_control_name"
style="@style/item_content"
android:layout_gravity="center_vertical"
android:hint="请输入管控人姓名"
android:inputType="text" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<ImageView
style="@style/style_hint_star"
android:visibility="visible" />
<TextView
style="@style/item_title"
android:layout_gravity="center_vertical"
android:text="管 控 人\n联系方式" />
<EditText
android:id="@+id/et_control_phone"
style="@style/item_content"
android:layout_gravity="center_vertical"
android:hint="请输入管控人联系方式"
android:inputType="number" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<ImageView
style="@style/style_hint_star"
android:visibility="invisible" />
<TextView
style="@style/item_title"
android:layout_gravity="center_vertical"
android:text="帮扶情况" />
<EditText
android:id="@+id/et_help_case"
style="@style/item_content"
android:layout_gravity="center_vertical"
android:hint="请输入帮扶情况"
android:inputType="textMultiLine" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<ImageView style="@style/style_hint_star" />
<TextView
style="@style/item_title"
android:layout_gravity="center_vertical"
android:text="帮扶人姓名" />
<EditText
android:id="@+id/et_help_name"
style="@style/item_content"
android:layout_gravity="center_vertical"
android:hint="请输入帮扶人姓名"
android:inputType="textMultiLine" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<ImageView style="@style/style_hint_star" />
<TextView
style="@style/item_title"
android:text="帮 扶 人\n联系方式" />
<EditText
android:id="@+id/et_help_phone"
style="@style/item_content"
android:layout_gravity="center_vertical"
android:hint="请输入帮扶人联系方式"
android:inputType="number" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<ImageView
style="@style/style_hint_star"
android:visibility="invisible" />
<TextView
style="@style/item_title"
android:layout_gravity="center_vertical"
android:text="有无犯罪史" />
<Switch
android:id="@+id/sw_is_crime"
style="@style/item_switch_have"
android:layout_gravity="center_vertical" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<ImageView
style="@style/style_hint_star"
android:visibility="invisible" />
<TextView
style="@style/item_title"
android:layout_gravity="center_vertical"
android:text="犯罪情况" />
<EditText
android:id="@+id/et_crime_case"
style="@style/item_content"
android:layout_gravity="center_vertical"
android:hint="请输入犯罪情况"
android:inputType="textMultiLine" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<ImageView
style="@style/style_hint_star"
android:visibility="invisible" />
<TextView
style="@style/item_title"
android:layout_gravity="center_vertical"
android:text="吸毒原因" />
<TextView
android:id="@+id/tv_drug_case"
style="@style/sel_text_arrow"
android:layout_gravity="center_vertical"
android:hint="请选择吸毒原因" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<ImageView
style="@style/style_hint_star"
android:visibility="invisible" />
<TextView
style="@style/item_title"
android:layout_gravity="center_vertical"
android:text="吸毒后果" />
<TextView
android:id="@+id/tv_drug_after"
style="@style/sel_text_arrow"
android:layout_gravity="center_vertical"
android:hint="请选择吸毒后果" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
<Button
android:id="@+id/btn_confirm"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@drawable/sel_btn_submit"
android:minHeight="0dp"
android:padding="10dp"
android:text="保&#160;&#160;&#160;&#160;存"
android:textColor="@color/white"
android:textSize="17dp" />
</RelativeLayout>

View File

@ -0,0 +1,220 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:clipChildren="true">
<LinearLayout
android:id="@+id/ll_base_info"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/shape_blue_bg"
android:orientation="vertical"
android:padding="20dp">
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/ll_base_info"
android:layout_marginTop="-20dp"
android:background="@drawable/shape_rectangle_white_top"
android:orientation="vertical"
android:paddingTop="15dp">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/layout_base_info_detail" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:background="@color/line_bg_EF" />
<TextView
style="@style/issue_report_title"
android:padding="8dp"
android:text="涉稳重点信息" />
<LinearLayout style="@style/item_white" android:visibility="gone">
<TextView
style="@style/item_title_23"
android:text="初次发现日期"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_first_date"
style="@style/item_content_23" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<TextView
style="@style/item_title_23"
android:layout_gravity="center_vertical"
android:text="管控情况" />
<TextView
android:id="@+id/tv_control_case"
style="@style/item_content_23" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<TextView
style="@style/item_title_23"
android:layout_gravity="center_vertical"
android:text="管控人姓名" />
<TextView
android:id="@+id/et_control_name"
style="@style/item_content_23"
android:layout_gravity="center_vertical" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<TextView
style="@style/item_title_23"
android:layout_gravity="center_vertical"
android:text="管 控 人\n联系方式" />
<TextView
android:id="@+id/et_control_phone"
style="@style/item_content_23"
android:layout_gravity="center_vertical" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<TextView
style="@style/item_title_23"
android:layout_gravity="center_vertical"
android:text="帮扶情况" />
<TextView
android:id="@+id/et_help_case"
style="@style/item_content_23"
android:layout_gravity="center_vertical" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<TextView
style="@style/item_title_23"
android:layout_gravity="center_vertical"
android:text="帮扶人姓名" />
<TextView
android:id="@+id/et_help_name"
style="@style/item_content_23"
android:layout_gravity="center_vertical" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<TextView
style="@style/item_title_23"
android:text="帮 扶 人\n联系方式" />
<TextView
android:id="@+id/et_help_phone"
style="@style/item_content_23"
android:layout_gravity="center_vertical" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<TextView
style="@style/item_title_23"
android:layout_gravity="center_vertical"
android:text="有无犯罪史" />
<Switch
android:id="@+id/sw_is_crime"
style="@style/item_switch_have"
android:layout_gravity="center_vertical"
android:enabled="false" />
</LinearLayout>
<LinearLayout style="@style/item_white">
<TextView
style="@style/item_title_23"
android:layout_gravity="center_vertical"
android:text="犯罪情况" />
<TextView
android:id="@+id/et_crime_case"
style="@style/item_content_23"
android:layout_gravity="center_vertical" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<TextView
style="@style/item_title_23"
android:layout_gravity="center_vertical"
android:text="吸毒原因" />
<TextView
android:id="@+id/tv_drug_case"
style="@style/item_content_23"
android:layout_gravity="center_vertical" />
</LinearLayout>
<LinearLayout style="@style/item_white" android:visibility="gone">
<TextView
style="@style/item_title_23"
android:layout_gravity="center_vertical"
android:text="吸毒后果" />
<TextView
android:id="@+id/tv_drug_after"
style="@style/item_content_23" />
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
</RelativeLayout>

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<LinearLayout
android:id="@+id/ll_base_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_blue_bg"
android:orientation="vertical"
android:padding="20dp">
<TextView
android:id="@+id/tv_count"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingBottom="5dp"
android:textColor="@color/white"
android:textSize="@dimen/text_14"
android:textStyle="bold"
tools:text="共30人" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/ll_base_info"
android:layout_marginTop="-20dp"
android:background="@drawable/shape_rectangle_white_top">
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rlv_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:itemCount="3"
tools:listitem="@layout/item_person_register" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout>
</RelativeLayout>

View File

@ -55,7 +55,7 @@
<TextView
style="@style/issue_report_title"
android:padding="8dp"
android:text="肇事肇祸等严重精神障碍患者"
android:text="精神障碍"
android:textStyle="bold" />
<LinearLayout style="@style/item_white">

View File

@ -47,7 +47,7 @@
<TextView
style="@style/issue_report_title"
android:padding="8dp"
android:text="肇事肇祸等严重精神障碍患者信息" />
android:text="精神障碍" />
<LinearLayout style="@style/item_white">

View File

@ -1,6 +1,5 @@
<?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"
@ -8,6 +7,15 @@
android:orientation="vertical"
tools:context=".incident.activitys.building.activitys.CommunityManageActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_marginTop="8dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp">
<include layout="@layout/item_search" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"

View File

@ -41,7 +41,7 @@
android:drawablePadding="10dp"
android:focusable="true"
android:padding="10dp"
android:text="户籍人口"
android:text="@string/populace_census"
android:textColor="@color/black"
android:textSize="18dp" />
@ -64,7 +64,8 @@
android:padding="10dp"
android:text="户籍人口(外出)"
android:textColor="@color/black"
android:textSize="18dp" />
android:textSize="18dp"
android:visibility="gone" />
<View
android:layout_width="match_parent"
@ -84,7 +85,7 @@
android:drawablePadding="10dp"
android:focusable="true"
android:padding="10dp"
android:text="非户籍人口"
android:text="@string/populace_out"
android:textColor="@color/black"
android:textSize="18dp" />
</LinearLayout>
@ -135,20 +136,20 @@
android:visibility="gone" />
<!-- <TextView-->
<!-- android:id="@+id/tv_float"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginLeft="25dp"-->
<!-- android:clickable="true"-->
<!-- android:drawableLeft="@drawable/ic_lib_flow"-->
<!-- android:drawableRight="@drawable/ic_double_arrow"-->
<!-- android:drawablePadding="10dp"-->
<!-- android:focusable="true"-->
<!-- android:padding="10dp"-->
<!-- android:text="流动人口"-->
<!-- android:textColor="@color/black"-->
<!-- android:textSize="18dp" />-->
<!-- <TextView-->
<!-- android:id="@+id/tv_float"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginLeft="25dp"-->
<!-- android:clickable="true"-->
<!-- android:drawableLeft="@drawable/ic_lib_flow"-->
<!-- android:drawableRight="@drawable/ic_double_arrow"-->
<!-- android:drawablePadding="10dp"-->
<!-- android:focusable="true"-->
<!-- android:padding="10dp"-->
<!-- android:text="流动人口"-->
<!-- android:textColor="@color/black"-->
<!-- android:textSize="18dp" />-->
<TextView
@ -186,37 +187,20 @@
android:orientation="vertical">
<TextView
android:id="@+id/tv_crime"
android:id="@+id/tv_drug"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:clickable="true"
android:drawableLeft="@drawable/ic_lib_free"
android:drawableLeft="@drawable/ic_lib_drug"
android:drawableRight="@drawable/ic_double_arrow"
android:drawablePadding="10dp"
android:focusable="true"
android:padding="10dp"
android:text="刑满释放人员"
android:text="@string/populace_drug"
android:textColor="@color/black"
android:textSize="18dp" />
<TextView
android:id="@+id/tv_corrct"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:clickable="true"
android:drawableLeft="@drawable/ic_lib_correct"
android:drawableRight="@drawable/ic_double_arrow"
android:drawablePadding="10dp"
android:focusable="true"
android:padding="10dp"
android:text="社区矫正人员"
android:textColor="@color/black"
android:textSize="18dp" />
<TextView
android:id="@+id/tv_trouble"
android:layout_width="match_parent"
@ -228,23 +212,53 @@
android:drawablePadding="10dp"
android:focusable="true"
android:padding="10dp"
android:text="肇事肇祸等严重精神障碍患者"
android:text="@string/populace_mental"
android:textColor="@color/black"
android:textSize="18dp" />
<TextView
android:id="@+id/tv_keynote"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:clickable="true"
android:drawableLeft="@drawable/ic_lib_aids"
android:drawableRight="@drawable/ic_double_arrow"
android:drawablePadding="10dp"
android:focusable="true"
android:padding="10dp"
android:text="@string/populace_criminal"
android:textColor="@color/black"
android:textSize="18dp" />
<TextView
android:id="@+id/tv_corrct"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:clickable="true"
android:drawableLeft="@drawable/ic_lib_correct"
android:drawableRight="@drawable/ic_double_arrow"
android:drawablePadding="10dp"
android:focusable="true"
android:padding="10dp"
android:text="@string/populace_correct"
android:textColor="@color/black"
android:textSize="18dp" />
<TextView
android:id="@+id/tv_drug"
android:id="@+id/tv_crime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:clickable="true"
android:drawableLeft="@drawable/ic_lib_drug"
android:drawableLeft="@drawable/ic_lib_free"
android:drawableRight="@drawable/ic_double_arrow"
android:drawablePadding="10dp"
android:focusable="true"
android:padding="10dp"
android:text="吸毒人员"
android:text="@string/populace_release"
android:textColor="@color/black"
android:textSize="18dp" />
@ -260,7 +274,23 @@
android:drawablePadding="10dp"
android:focusable="true"
android:padding="10dp"
android:text="艾滋病危险人员"
android:text="@string/populace_aids"
android:textColor="@color/black"
android:textSize="18dp"
android:visibility="gone" />
<TextView
android:id="@+id/tv_cult"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:clickable="true"
android:drawableLeft="@drawable/ic_lib_aids"
android:drawableRight="@drawable/ic_double_arrow"
android:drawablePadding="10dp"
android:focusable="true"
android:padding="10dp"
android:text="@string/populace_religion"
android:textColor="@color/black"
android:textSize="18dp" />

View File

@ -1,3 +0,0 @@
<resources>
</resources>