人口、房屋修改

This commit is contained in:
adam 2022-07-28 09:16:53 +08:00
parent fa14565968
commit 5bf578906e
50 changed files with 3799 additions and 766 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="1.8" />
<bytecodeTargetLevel target="11" />
</component>
</project>

View File

@ -5,7 +5,7 @@
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
</configurations>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View File

@ -48,6 +48,23 @@
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".activitys.census.newhouse.activitys.NewHouseListActivity"></activity>
<activity android:name=".activitys.census.newhouse.activitys.NewBuildingManageActivity" />
<activity
android:name=".activitys.census.newhouse.activitys.NewHouseManageActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden"
tools:ignore="LockedOrientationActivity" />
<activity
android:name=".activitys.census.PopulationAddActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden"
tools:ignore="LockedOrientationActivity" />
<activity
android:name=".activitys.census.PopulationListActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden"
tools:ignore="LockedOrientationActivity" />
<activity
android:name=".activitys.census.house.EditBindPersonActivity"
android:screenOrientation="portrait"

View File

@ -55,6 +55,7 @@ import com.sucstepsoft.realtimelocation.activitys.census.hire.CensusHireListActi
import com.sucstepsoft.realtimelocation.activitys.census.house.HouseManageListActivity;
import com.sucstepsoft.realtimelocation.activitys.census.house.SearchHouseByPersonActivity;
import com.sucstepsoft.realtimelocation.activitys.census.house.SearchPersonByHouseActivity;
import com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys.NewHouseManageActivity;
import com.sucstepsoft.realtimelocation.activitys.census.outbound.CensusOutboundListActivity;
import com.sucstepsoft.realtimelocation.activitys.issue.IssueCheckActivity;
import com.sucstepsoft.realtimelocation.activitys.issue.IssueMineActivity;
@ -504,7 +505,7 @@ public class MainActivity extends BaseActivity {
@Override
public void changePwd() {
//房屋管理
startActivity(new Intent(mActivity, HouseManageListActivity.class));
startActivity(new Intent(mActivity, NewHouseManageActivity.class));
build.dismiss();
}
@ -1709,8 +1710,43 @@ public class MainActivity extends BaseActivity {
}
private void checkPointIsLegal(BDLocation bdLocation) {
if (PathConfig.mDefaultCityCode.equals(bdLocation.getCityCode())) {
if (bdLocation != null && bdLocation.getLatitude() != 0 && bdLocation.getLongitude() != 0) {
if (PathConfig.IS_LIMIT) {
if (PathConfig.mDefaultCityCode.equals(bdLocation.getCityCode())) {
if (bdLocation.getLatitude() != 0 && bdLocation.getLongitude() != 0) {
if (mPrecision >= mPrecMax) {
mPrecision = mPrecisionDefault;
if (mGpsWeakDialog == null) {
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
builder.setMessage("当前GPS信号较弱请调整当前所在位置,或检查手机GPS是否开启,将Wifi与蓝牙打开会提高定位精度.")
.setTitle("提示")
.setNegativeButton("确定", (dialog, which) -> dialog.dismiss());
mGpsWeakDialog = builder.create();
}
if (!mGpsWeakDialog.isShowing()) {
mGpsWeakDialog.show();
}
} else {
if (bdLocation.getRadius() <= mPrecision) {
mPrecision = mPrecisionDefault;
if (bdLocation.getLatitude() != Double.MIN_VALUE && bdLocation.getLongitude() != Double.MIN_VALUE) {
mCurrentLocation = bdLocation;
if (mGpsDis != null && !mGpsDis.isDisposed()) {
mGpsDis.dispose();
}
if (TextUtils.isEmpty(mCurrentLocation.getAddrStr())) {
mTvCurrentTime.setText("当前地址:未知");
} else {
mTvCurrentTime.setText("当前地址:" + mCurrentLocation.getAddrStr());
}
}
} else {
mPrecision += 10;
}
}
}
}
} else {
if (bdLocation.getLatitude() != 0 && bdLocation.getLongitude() != 0) {
if (mPrecision >= mPrecMax) {
mPrecision = mPrecisionDefault;
if (mGpsWeakDialog == null) {

View File

@ -15,7 +15,6 @@ import android.widget.TextView;
import com.jcodecraeer.xrecyclerview.ProgressStyle;
import com.jcodecraeer.xrecyclerview.XRecyclerView;
import com.sucstepsoft.cm_utils.constant.PathConfig;
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
import com.sucstepsoft.cm_utils.utils.ToastUtils;
@ -23,7 +22,7 @@ import com.sucstepsoft.cm_utils.utils.UIUtil;
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
import com.sucstepsoft.realtimelocation.R;
import com.sucstepsoft.realtimelocation.adapters.CensusPersonAdapter;
import com.sucstepsoft.realtimelocation.beans.DicBean;
import com.sucstepsoft.realtimelocation.beans.ConditionDicBean;
import com.sucstepsoft.realtimelocation.beans.SuccessBean;
import com.sucstepsoft.realtimelocation.beans.person.CensusPersonBean;
import com.sucstepsoft.realtimelocation.net.LocationApiService;
@ -81,20 +80,20 @@ public class CensusBaseActivity extends BaseActivity {
private String mKeywords = "";
private List<DicBean> mNations = new ArrayList<>();
private DicBean mSelNation;
private List<ConditionDicBean> mNations = new ArrayList<>();
private ConditionDicBean mSelNation;
private List<DicBean> mFaiths;
private DicBean mSelFaith;
private List<ConditionDicBean> mFaiths;
private ConditionDicBean mSelFaith;
private List<DicBean> mPoliticals;
private DicBean mSelPolitical;
private List<ConditionDicBean> mPoliticals;
private ConditionDicBean mSelPolitical;
private List<DicBean> mMarrays;
private DicBean mSelMarray;
private List<ConditionDicBean> mMarrays;
private ConditionDicBean mSelMarray;
private List<DicBean> mEdus;
private DicBean mSelEdu;
private List<ConditionDicBean> mEdus;
private ConditionDicBean mSelEdu;
@Override
@ -158,35 +157,35 @@ public class CensusBaseActivity extends BaseActivity {
if (mNations != null && mNations.size() > 0) {
onShowNationPopup();
} else {
getDicListByType(PathConfig.DIC_NATION, 2);
getNationConditionList();
}
});//民族
mTvFaith.setOnClickListener(v -> {
if (mFaiths != null && mFaiths.size() > 0) {
onShowFaith();
} else {
getDicListByType(PathConfig.DIC_FAITH, 6);
getFaithConditionList();
}
});//宗教
mTvPolitical.setOnClickListener(v -> {
if (mPoliticals != null && mPoliticals.size() > 0) {
onShowPolitical();
} else {
getDicListByType(PathConfig.DIC_POLITICS, 4);
getPoliticalConditionList();
}
});//政治
mTvMarr.setOnClickListener(v -> {
if (mMarrays != null && mMarrays.size() > 0) {
onShowMarray();
} else {
getDicListByType(PathConfig.DIC_MARRIAGE, 3);
getMarryConditionList();
}
});//婚姻
mTvEdu.setOnClickListener(v -> {
if (mEdus != null && mEdus.size() > 0) {
onShowEdu();
} else {
getDicListByType(PathConfig.DIC_EDU, 5);
getEduConditionList();
}
});//学历
}
@ -200,12 +199,13 @@ public class CensusBaseActivity extends BaseActivity {
if (isCheck) {
//选中了
mSelNation = bean;
mTvNation.setText(mSelNation.getDictionaryName());
mTvNation.setText(mSelNation.getName());
} else {
//清除了选项
mSelNation = null;
mTvNation.setText("民族");
}
refreshData();
conditionPopup.dismiss();
});
conditionPopup.showPopupWindow(mTvNation);
@ -221,12 +221,13 @@ public class CensusBaseActivity extends BaseActivity {
if (isCheck) {
//选中了
mSelFaith = bean;
mTvFaith.setText(mSelFaith.getDictionaryName());
mTvFaith.setText(mSelFaith.getName());
} else {
//清除了选项
mSelFaith = null;
mTvFaith.setText("宗教信仰");
}
refreshData();
conditionPopup.dismiss();
});
conditionPopup.showPopupWindow(mTvFaith);
@ -241,12 +242,13 @@ public class CensusBaseActivity extends BaseActivity {
if (isCheck) {
//选中了
mSelPolitical = bean;
mTvPolitical.setText(mSelPolitical.getDictionaryName());
mTvPolitical.setText(mSelPolitical.getName());
} else {
//清除了选项
mSelPolitical = null;
mTvPolitical.setText("政治面貌");
}
refreshData();
conditionPopup.dismiss();
});
conditionPopup.showPopupWindow(mTvPolitical);
@ -261,12 +263,13 @@ public class CensusBaseActivity extends BaseActivity {
if (isCheck) {
//选中了
mSelMarray = bean;
mTvMarr.setText(mSelMarray.getDictionaryName());
mTvMarr.setText(mSelMarray.getName());
} else {
//清除了选项
mSelMarray = null;
mTvMarr.setText("婚姻状况");
}
refreshData();
conditionPopup.dismiss();
});
conditionPopup.showPopupWindow(mTvMarr);
@ -281,78 +284,18 @@ public class CensusBaseActivity extends BaseActivity {
if (isCheck) {
//选中了
mSelEdu = bean;
mTvEdu.setText(mSelEdu.getDictionaryName());
mTvEdu.setText(mSelEdu.getName());
} else {
//清除了选项
mSelEdu = null;
mTvEdu.setText("学历");
}
refreshData();
conditionPopup.dismiss();
});
conditionPopup.showPopupWindow(mTvEdu);
}
/**
* 字典
*/
private void getDicListByType(String pId, int i) {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
dialog.show();
RetrofitManager.getInstance()
.create(LocationApiService.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 2://名族
mNations = typeListBeans;
onShowNationPopup();
break;
case 3://婚姻状况
mMarrays = typeListBeans;
onShowMarray();
break;
case 4://政治面貌
mPoliticals = typeListBeans;
onShowPolitical();
break;
case 5://学历
mEdus = typeListBeans;
onShowEdu();
break;
case 6://宗教信仰
mFaiths = typeListBeans;
onShowFaith();
break;
}
} else {
ToastUtils.showShort("暂无数据");
}
}
@Override
public void onError(@NonNull Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
/**
* 搜索
@ -449,19 +392,228 @@ public class CensusBaseActivity extends BaseActivity {
refreshData();
}
/**
* 获取名族筛选条件
*/
private void getNationConditionList() {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "加载中...");
dialog.show();
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getNationDic(UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<List<ConditionDicBean>>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(List<ConditionDicBean> conditionDicBeans) {
dialog.dismiss();
if (conditionDicBeans != null && conditionDicBeans.size() > 0) {
mNations = conditionDicBeans;
onShowNationPopup();
} else {
ToastUtils.showShort("暂无筛选条件");
}
}
@Override
public void onError(Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
/**
* 获取宗教筛选条件
*/
private void getFaithConditionList() {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "加载中...");
dialog.show();
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getConditionReligion(UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<List<ConditionDicBean>>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(List<ConditionDicBean> conditionDicBeans) {
dialog.dismiss();
if (conditionDicBeans != null && conditionDicBeans.size() > 0) {
mFaiths = conditionDicBeans;
onShowFaith();
} else {
ToastUtils.showShort("暂无筛选条件");
}
}
@Override
public void onError(Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
/**
* 学历
*/
private void getEduConditionList() {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "加载中...");
dialog.show();
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getConditionEdu(UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<List<ConditionDicBean>>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(List<ConditionDicBean> conditionDicBeans) {
dialog.dismiss();
if (conditionDicBeans != null && conditionDicBeans.size() > 0) {
mEdus = conditionDicBeans;
onShowEdu();
} else {
ToastUtils.showShort("暂无筛选条件");
}
}
@Override
public void onError(Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
/**
* 婚姻状况
*/
private void getMarryConditionList() {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "加载中...");
dialog.show();
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getConditionMarry(UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<List<ConditionDicBean>>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(List<ConditionDicBean> conditionDicBeans) {
dialog.dismiss();
if (conditionDicBeans != null && conditionDicBeans.size() > 0) {
mMarrays = conditionDicBeans;
onShowMarray();
} else {
ToastUtils.showShort("暂无筛选条件");
}
}
@Override
public void onError(Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
/**
* 政治面貌
*/
private void getPoliticalConditionList() {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "加载中...");
dialog.show();
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getConditionPolitical(UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<List<ConditionDicBean>>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(List<ConditionDicBean> conditionDicBeans) {
dialog.dismiss();
if (conditionDicBeans != null && conditionDicBeans.size() > 0) {
mPoliticals = conditionDicBeans;
onShowPolitical();
} else {
ToastUtils.showShort("暂无筛选条件");
}
}
@Override
public void onError(Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
/**
* 获取列表
*/
private void getUpcomingList(int page) {
mCurPage = page;
String nation = mSelNation == null ? "" : mSelNation.getDictionaryId();
String faith = mSelFaith == null ? "" : mSelFaith.getDictionaryId();
String polition = mSelPolitical == null ? "" : mSelPolitical.getDictionaryId();
String marry = mSelMarray == null ? "" : mSelMarray.getDictionaryId();
String edu = mSelEdu == null ? "" : mSelEdu.getDictionaryId();
String nation = mSelNation == null ? "" : mSelNation.getName();
String faith = mSelFaith == null ? "" : mSelFaith.getName();
String polition = mSelPolitical == null ? "" : mSelPolitical.getName();
String marry = mSelMarray == null ? "" : mSelMarray.getName();
String edu = mSelEdu == null ? "" : mSelEdu.getName();
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getBaseInfoList(page + "", mKeywords, nation, faith, polition, marry, edu, UserLgUtils.getToken())
.getBaseInfoList(page + "", mKeywords, nation, faith, polition, marry, edu, "", UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<CensusPersonBean>() {

View File

@ -114,14 +114,14 @@ public class CensusBaseDetailActivity extends BaseActivity {
mEtIdentity.setText(bean.getIdCardNumber());//身份证号码
mEtName.setText(bean.getFullName());//姓名
mEtOnceName.setText(bean.getNameUsedBefore());//曾用名---
mTvGender.setText(bean.getGenderDictionaryName());//性别
mTvGender.setText(bean.getGender());//性别
mTvBirth.setText(bean.getBirthDate());//生日
mTvNation.setText(bean.getNationDictionaryName());//民族
mTvNation.setText(bean.getNation());//民族
mTvNative.setText(bean.getNativePlaceAddr());//籍贯
mTvMarry.setText(bean.getMaritalStatusDictionaryName());//婚姻
mTvPolitical.setText(bean.getPoliticalStatusDictionaryName());//政治面貌
mTvEdu.setText(bean.getEducationDictionaryName());//学历
mTvReligion.setText(bean.getReligionDictionaryName());//宗教
mTvMarry.setText(bean.getMaritalStatus());//婚姻
mTvPolitical.setText(bean.getPoliticalStatus());//政治面貌
mTvEdu.setText(bean.getEducation());//学历
mTvReligion.setText(bean.getReligion());//宗教
mTvWork.setText(bean.getOccupation());//职业
mEtWorkSpace.setText(bean.getServiceSpace());//服务处所-----
mEtPhone.setText(bean.getTelephone());//联系方式

View File

@ -243,7 +243,7 @@ public class CensusEnterActivity extends BaseActivity {
}
String nation = mTvNation.getText().toString().trim();
if (mSelNation != null) {
bean.setNation(mSelNation.getDictionaryId());
bean.setNation(mSelNation.getDictionaryName());
}
String nativeStr = mEtNative.getText().toString().trim();
@ -251,19 +251,19 @@ public class CensusEnterActivity extends BaseActivity {
String marry = mTvMarry.getText().toString().trim();
if (mSelMarry != null) {
bean.setMaritalStatus(mSelMarry.getDictionaryId());
bean.setMaritalStatus(mSelMarry.getDictionaryName());
}
String political = mTvPolitical.getText().toString().trim();
if (mSelPolitical != null) {
bean.setPoliticalStatus(mSelPolitical.getDictionaryId());
bean.setPoliticalStatus(mSelPolitical.getDictionaryName());
}
String edu = mTvEdu.getText().toString().trim();
if (mSelEdu != null) {
bean.setEducation(mSelEdu.getDictionaryId());
bean.setEducation(mSelEdu.getDictionaryName());
}
String religion = mTvReligion.getText().toString().trim();
if (!TextUtils.isEmpty(religion)) {
bean.setReligion(mSelReligion.getDictionaryId());
bean.setReligion(mSelReligion.getDictionaryName());
}
String work = mTvWork.getText().toString().trim();
bean.setOccupation(work);
@ -295,7 +295,7 @@ public class CensusEnterActivity extends BaseActivity {
mEtOnceName.setText(bean.getNameUsedBefore());//曾用名---
// mTvGender.setText(bean.getGender());//性别
// mTvBirth.setText(bean.getBirthDate());//生日
mTvNation.setText(bean.getNationDictionaryName());//民族
mTvNation.setText(bean.getNation());//民族
if (!TextUtils.isEmpty(bean.getNation())) {
mSelNation = new DicBean();
mSelNation.setDictionaryId(bean.getNation());
@ -303,25 +303,25 @@ public class CensusEnterActivity extends BaseActivity {
}
// mTvNative.setText(bean.getNativePlace());//籍贯
mEtNative.setText(bean.getNativePlaceAddr());
mTvMarry.setText(bean.getMaritalStatusDictionaryName());//婚姻
mTvMarry.setText(bean.getMaritalStatus());//婚姻
if (!TextUtils.isEmpty(bean.getMaritalStatus())) {
mSelMarry = new DicBean();
mSelMarry.setDictionaryName(bean.getMaritalStatusDictionaryName());
mSelMarry.setDictionaryId(bean.getMaritalStatus());
}
mTvPolitical.setText(bean.getPoliticalStatusDictionaryName());//政治面貌
mTvPolitical.setText(bean.getPoliticalStatus());//政治面貌
if (!TextUtils.isEmpty(bean.getPoliticalStatus())) {
mSelPolitical = new DicBean();
mSelPolitical.setDictionaryId(bean.getPoliticalStatus());
mSelPolitical.setDictionaryName(bean.getPoliticalStatusDictionaryName());
}
mTvEdu.setText(bean.getEducationDictionaryName());//学历
mTvEdu.setText(bean.getEducation());//学历
if (!TextUtils.isEmpty(bean.getEducation())) {
mSelEdu = new DicBean();
mSelEdu.setDictionaryId(bean.getEducation());
mSelEdu.setDictionaryName(bean.getEducationDictionaryName());
}
mTvReligion.setText(bean.getReligionDictionaryName());//宗教
mTvReligion.setText(bean.getReligion());//宗教
if (!TextUtils.isEmpty(bean.getReligion())) {
mSelReligion = new DicBean();
mSelReligion.setDictionaryId(bean.getReligion());

View File

@ -5,14 +5,6 @@ import android.widget.TextView;
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
import com.sucstepsoft.realtimelocation.R;
import com.sucstepsoft.realtimelocation.activitys.census.normal.CensusNmigrantListActivity;
import com.sucstepsoft.realtimelocation.activitys.census.normal.CensusRegisterListActivity;
import com.sucstepsoft.realtimelocation.activitys.census.normal.CensusResrPersonListActivity;
import com.sucstepsoft.realtimelocation.activitys.census.special.CensusAidsListActivity;
import com.sucstepsoft.realtimelocation.activitys.census.special.CensusCorrctListActivity;
import com.sucstepsoft.realtimelocation.activitys.census.special.CensusDrugListActivity;
import com.sucstepsoft.realtimelocation.activitys.census.special.CensusSpecialCriminalListActivity;
import com.sucstepsoft.realtimelocation.activitys.census.special.CensusTroubleListActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
@ -43,6 +35,16 @@ public class CensusExpandableMainActivity extends BaseActivity {
TextView mTvAids;
@BindView(R.id.tv_young)
TextView mTvYoung;
@BindView(R.id.tv_soldier)
TextView mTvSoldier;
@BindView(R.id.tv_poor_5)
TextView mTvPoor5;
@BindView(R.id.tv_poor_1)
TextView mTvPoor1;
@BindView(R.id.tv_handicapped)
TextView mTvHandicapped;
@BindView(R.id.tv_petition)
TextView mTvPetition;
private Unbinder mBind;
@Override
@ -56,17 +58,35 @@ public class CensusExpandableMainActivity extends BaseActivity {
mTvBaseTitle.setText("户籍人口");
refreshView(STATE_LOAD_SUCCESS);
mTvBase.setOnClickListener(v -> startActivity(new Intent(mActivity, CensusBaseActivity.class)));//基础信息
mTvRegister.setOnClickListener(v -> startActivity(new Intent(mActivity, CensusRegisterListActivity.class)));//户籍信息
mTvFloat.setOnClickListener(v -> startActivity(new Intent(mActivity, CensusNmigrantListActivity.class)));//流动人员
mTvRear.setOnClickListener(v -> startActivity(new Intent(mActivity, CensusResrPersonListActivity.class)));//留守人员
mTvCrime.setOnClickListener(v -> startActivity(new Intent(mActivity, CensusSpecialCriminalListActivity.class)));//刑满释放
mTvTrouble.setOnClickListener(v -> startActivity(new Intent(mActivity, CensusTroubleListActivity.class)));//肇事
mTvDrug.setOnClickListener(v -> startActivity(new Intent(mActivity, CensusDrugListActivity.class)));//吸毒
mTvCorrct.setOnClickListener(v -> startActivity(new Intent(mActivity, CensusCorrctListActivity.class)));//社区矫正
mTvAids.setOnClickListener(v -> startActivity(new Intent(mActivity, CensusAidsListActivity.class)));//艾滋
// mTvYoung.setOnClickListener(v -> startActivity(new Intent(mActivity, CensusYoungListActivity.class)));//重点青少年
// mTvRegister.setOnClickListener(v -> startActivity(new Intent(mActivity, CensusRegisterListActivity.class)));//户籍信息
// mTvFloat.setOnClickListener(v -> startActivity(new Intent(mActivity, CensusNmigrantListActivity.class)));//流动人员
// mTvRear.setOnClickListener(v -> startActivity(new Intent(mActivity, CensusResrPersonListActivity.class)));//留守人员
// mTvCrime.setOnClickListener(v -> startActivity(new Intent(mActivity, CensusSpecialCriminalListActivity.class)));//刑满释放
// mTvTrouble.setOnClickListener(v -> startActivity(new Intent(mActivity, CensusTroubleListActivity.class)));//肇事
// mTvDrug.setOnClickListener(v -> startActivity(new Intent(mActivity, CensusDrugListActivity.class)));//吸毒
// mTvCorrct.setOnClickListener(v -> startActivity(new Intent(mActivity, CensusCorrctListActivity.class)));//社区矫正
// mTvAids.setOnClickListener(v -> startActivity(new Intent(mActivity, CensusAidsListActivity.class)));//艾滋
mTvFloat.setOnClickListener(v -> openPage("1", "流动人口"));
mTvRear.setOnClickListener(v -> openPage("2", "留守人口"));
mTvSoldier.setOnClickListener(v -> openPage("3", "退伍军人"));
mTvPoor5.setOnClickListener(v -> openPage("4", "五保户"));
mTvPoor1.setOnClickListener(v -> openPage("5", "低保户"));
mTvHandicapped.setOnClickListener(v -> openPage("6", "残疾人"));
mTvPetition.setOnClickListener(v -> openPage("7", "重点信访户"));
mTvCrime.setOnClickListener(v -> openPage("8", "刑满释放人员"));
mTvCorrct.setOnClickListener(v -> openPage("9", "社区矫正人员"));
mTvTrouble.setOnClickListener(v -> openPage("10", "肇事肇祸等严重精神..."));
mTvDrug.setOnClickListener(v -> openPage("11", "吸毒人员"));
mTvAids.setOnClickListener(v -> openPage("12", "艾滋病危险人员"));
}
private void openPage(String type, String title) {
Intent intent = new Intent(mActivity, PopulationListActivity.class);
intent.putExtra("type", type);
intent.putExtra("title", title);
startActivity(intent);
}
}

View File

@ -640,7 +640,7 @@ public class CensusYoungAddActivity extends BaseActivity {
mBaseInfoBean = o;
mLlContent.setVisibility(View.VISIBLE);
mTvBaseName.setText(o.getFullName());
mTvBaseGender.setText(o.getGenderDictionaryName());
mTvBaseGender.setText(o.getGender());
mTvBasePhone.setText(o.getTelephone());
mTvBaseNative.setText(o.getNativePlaceAddr());
mTvBaseCurLoc.setText(o.getCurrentResidenceAddr());

View File

@ -0,0 +1,199 @@
package com.sucstepsoft.realtimelocation.activitys.census;
import android.app.ProgressDialog;
import android.support.v7.widget.CardView;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
import com.sucstepsoft.cm_utils.utils.RegexUtils;
import com.sucstepsoft.cm_utils.utils.ToastUtils;
import com.sucstepsoft.cm_utils.utils.UIUtil;
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
import com.sucstepsoft.realtimelocation.R;
import com.sucstepsoft.realtimelocation.beans.SearchBaseInfoBean;
import com.sucstepsoft.realtimelocation.beans.SuccessBean;
import com.sucstepsoft.realtimelocation.net.LocationApiService;
import com.sucstepsoft.realtimelocation.utils.ExceptionHandler;
import butterknife.BindView;
import butterknife.ButterKnife;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
/**
* 作者: Adam
* 日期: 2022年07月26日10:53:13
* 邮箱: itgaojian@163.com
* 描述: 各类人员添加标记
*/
public class PopulationAddActivity extends BaseActivity {
@BindView(R.id.et_search_id_card)
EditText mEtSearchIdCard;
@BindView(R.id.iv_clear)
ImageView mIvClear;
@BindView(R.id.btn_search)
Button mBtnSearch;
@BindView(R.id.ll_search_content)
LinearLayout mLlSearchContent;
//基础信息
@BindView(R.id.tv_base_name)
TextView mTvBaseName;
@BindView(R.id.tv_base_gender)
TextView mTvBaseGender;
@BindView(R.id.tv_base_phone)
TextView mTvBasePhone;
@BindView(R.id.tv_base_native)
TextView mTvBaseNative;
@BindView(R.id.tv_base_cur_loc)
TextView mTvBaseCurLoc;
@BindView(R.id.cv_base_info)
CardView mCvBaseInfo;
@BindView(R.id.btn_confirm)
Button mBtnConfirm;
@BindView(R.id.ll_content)
LinearLayout mLlContent;
private String mType;
private String mTitle;
private SearchBaseInfoBean mBaseInfoBean;
@Override
protected int setLayoutId() {
return R.layout.activity_population_add;
}
@Override
public void initData() {
ButterKnife.bind(this);
mType = getIntent().getStringExtra("type");
mTitle = getIntent().getStringExtra("title");
mTvBaseTitle.setText(mTitle);
refreshView(STATE_LOAD_SUCCESS);
mLlContent.setVisibility(View.GONE);
mBtnSearch.setOnClickListener(v -> doSearchPerson());
mIvClear.setOnClickListener(v -> mEtSearchIdCard.setText(""));
mBtnConfirm.setOnClickListener(v -> doSubmit());
}
/**
* 搜索人员基础信息
*/
private void doSearchPerson() {
String searchIdCard = mEtSearchIdCard.getText().toString().trim();
if (TextUtils.isEmpty(searchIdCard) || !RegexUtils.isIDNumber(searchIdCard)) {
ToastUtils.showShort("请输入合法的身份证号码");
return;
} else {
hideSoftKeyboard();
ProgressDialog dialog = UIUtil.initDialog(mActivity, "查询中...");
dialog.show();
RetrofitManager.getInstance()
.create(LocationApiService.class)
.doSearchBaseInfoByIdCard(searchIdCard, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<SearchBaseInfoBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(SearchBaseInfoBean searchBaseInfoBean) {
//设置基础信息
dialog.dismiss();
if (!TextUtils.isEmpty(searchBaseInfoBean.getIdCardNumber())) {
setBaseInfo(searchBaseInfoBean);
} else {
ToastUtils.showLong("未查询到改人员的基础信息,请完善基础信息");
mTvBaseName.setText("");
mTvBaseGender.setText("");
mTvBasePhone.setText("");
mTvBaseNative.setText("");
mTvBaseCurLoc.setText("");
mLlContent.setVisibility(View.GONE);
}
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
});
}
}
/**
* 设置基础信息
*/
private void setBaseInfo(SearchBaseInfoBean o) {
mBaseInfoBean = o;
mLlContent.setVisibility(View.VISIBLE);
mTvBaseName.setText(o.getFullName());
mTvBaseGender.setText(o.getGender());
mTvBasePhone.setText(o.getTelephone());
mTvBaseNative.setText(o.getNativePlaceAddr());
mTvBaseCurLoc.setText(o.getCurrentResidenceAddr());
}
/**
* 提交
*/
private void doSubmit() {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "添加中...");
dialog.show();
RetrofitManager.getInstance()
.create(LocationApiService.class)
.doUpdateBasePerson(mBaseInfoBean.getBasePopulationInfoId(), mType, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<SuccessBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(SuccessBean successBean) {
dialog.dismiss();
ToastUtils.showShort("添加成功");
mTvBaseName.setText("");
mTvBaseGender.setText("");
mTvBasePhone.setText("");
mTvBaseNative.setText("");
mTvBaseCurLoc.setText("");
mLlContent.setVisibility(View.GONE);
mBaseInfoBean = null;
mEtSearchIdCard.setText("");
}
@Override
public void onError(Throwable e) {
e.printStackTrace();
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
}

View File

@ -0,0 +1,749 @@
package com.sucstepsoft.realtimelocation.activitys.census;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Intent;
import android.support.v7.widget.LinearLayoutManager;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.jcodecraeer.xrecyclerview.ProgressStyle;
import com.jcodecraeer.xrecyclerview.XRecyclerView;
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
import com.sucstepsoft.cm_utils.utils.ToastUtils;
import com.sucstepsoft.cm_utils.utils.UIUtil;
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
import com.sucstepsoft.realtimelocation.R;
import com.sucstepsoft.realtimelocation.adapters.CensusPersonNewAdapter;
import com.sucstepsoft.realtimelocation.beans.ConditionDicBean;
import com.sucstepsoft.realtimelocation.beans.SuccessBean;
import com.sucstepsoft.realtimelocation.beans.person.CensusPersonBean;
import com.sucstepsoft.realtimelocation.net.LocationApiService;
import com.sucstepsoft.realtimelocation.utils.ExceptionHandler;
import com.sucstepsoft.realtimelocation.widget.ConditionPopup;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.annotations.NonNull;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
/**
* 作者: Adam
* 日期: 2022年07月26日10:33:44
* 邮箱: itgaojian@163.com
* 描述: 人口信息列表
*/
public class PopulationListActivity extends BaseActivity {
@BindView(R.id.tv_nation)
TextView mTvNation;
@BindView(R.id.tv_faith)
TextView mTvFaith;
@BindView(R.id.tv_political)
TextView mTvPolitical;
@BindView(R.id.tv_marr)
TextView mTvMarr;
@BindView(R.id.tv_edu)
TextView mTvEdu;
@BindView(R.id.et_search_centent)
EditText mEtSearchContent;
@BindView(R.id.iv_clear)
ImageView mIvClear;
@BindView(R.id.btn_search)
Button mBtnSearch;
@BindView(R.id.ll_search_content)
LinearLayout mLlSearchContent;
@BindView(R.id.ll_condition)
LinearLayout mLlCondition;
@BindView(R.id.xlv_content)
XRecyclerView mXlvItems;
@BindView(R.id.iv_page_empty)
ImageView mIvAEmpty;
@BindView(R.id.pb_page_loading)
ProgressBar mPbALoading;
@BindView(R.id.tv_page_hint)
TextView mTvAHint;
@BindView(R.id.ll_page_empty)
LinearLayout mLlAEmpty;
/**
* 1 流动人口
* 2 留守人员
* 3 退伍军人
* 4 五保户
* 5 低保户
* 6 残疾人
* 7 重点信访户
* 8 刑满释放人员
* 9 社区矫正人员
* 10 肇事肇祸
* 11 吸毒人员
* 12 艾滋病人员
*/
private String mType;
private String title;//页面标题
private Unbinder mBind;
private String mTitle;
private String mRows = "20";
private int mCurPage = 1;
private CensusPersonNewAdapter mAdapter;
private List<CensusPersonBean.RowsBean> mDatas = new ArrayList<>();
private Disposable mDisposable;
private String mKeywords = "";
private List<ConditionDicBean> mNations = new ArrayList<>();
private ConditionDicBean mSelNation;
private List<ConditionDicBean> mFaiths;
private ConditionDicBean mSelFaith;
private List<ConditionDicBean> mPoliticals;
private ConditionDicBean mSelPolitical;
private List<ConditionDicBean> mMarrays;
private ConditionDicBean mSelMarray;
private List<ConditionDicBean> mEdus;
private ConditionDicBean mSelEdu;
@Override
protected int setLayoutId() {
return R.layout.activity_population_list;
}
@Override
public void initData() {
mBind = ButterKnife.bind(this);
mType = getIntent().getStringExtra("type");
mTitle = getIntent().getStringExtra("title");
mTvBaseTitle.setText(mTitle);
mTvPublish.setVisibility(View.VISIBLE);
mTvPublish.setText("新增");
mTvPublish.setOnClickListener(v -> {
Intent intent = new Intent(mActivity, PopulationAddActivity.class);
String title = mTitle.equals("肇事肇祸等严重精神...") ? (mTitle.substring(0, 5) + "人员录入") : (mTitle + "录入");
intent.putExtra("title", title);
intent.putExtra("type", mType);
startActivity(intent);
});
refreshView(STATE_LOAD_SUCCESS);
mEtSearchContent.setHint("请输入要查询的关键字");
mBtnSearch.setOnClickListener(v -> doSearch());
mIvClear.setOnClickListener(v -> {
mKeywords = "";
mEtSearchContent.setText("");
refreshData();
});
mAdapter = new CensusPersonNewAdapter(mActivity, mDatas);
LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity);
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mXlvItems.setLayoutManager(layoutManager);
mXlvItems.setAdapter(mAdapter);
mAdapter.addOnItemClickListener(this::showDetail);
mXlvItems.setRefreshProgressStyle(ProgressStyle.BallGridBeat);
mXlvItems.setLoadingMoreProgressStyle(ProgressStyle.Pacman);
mXlvItems.setPullRefreshEnabled(true);
mXlvItems.setLoadingMoreEnabled(true);
mXlvItems.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
refreshData();
}
@Override
public void onLoadMore() {
getUpcomingList(mCurPage);
}
});
mAdapter.addOnEditListener(new CensusPersonNewAdapter.OnEditListener() {
@Override
public void onDel(CensusPersonBean.RowsBean bean, int pos) {
doDelBean(bean, pos);
}
@Override
public void onEdit(CensusPersonBean.RowsBean bean, int pos) {
doEditBean(bean, pos);
}
});
mTvNation.setOnClickListener(v -> {
if (mNations != null && mNations.size() > 0) {
onShowNationPopup();
} else {
getNationConditionList();
}
});//民族
mTvFaith.setOnClickListener(v -> {
if (mFaiths != null && mFaiths.size() > 0) {
onShowFaith();
} else {
getFaithConditionList();
}
});//宗教
mTvPolitical.setOnClickListener(v -> {
if (mPoliticals != null && mPoliticals.size() > 0) {
onShowPolitical();
} else {
getPoliticalConditionList();
}
});//政治
mTvMarr.setOnClickListener(v -> {
if (mMarrays != null && mMarrays.size() > 0) {
onShowMarray();
} else {
getMarryConditionList();
}
});//婚姻
mTvEdu.setOnClickListener(v -> {
if (mEdus != null && mEdus.size() > 0) {
onShowEdu();
} else {
getEduConditionList();
}
});//学历
}
/**
* 名族弹窗
*/
private void onShowNationPopup() {
ConditionPopup conditionPopup = new ConditionPopup(mActivity, mNations);
conditionPopup.setOnListPopupItemClickListener((bean, isCheck, pos) -> {
if (isCheck) {
//选中了
mSelNation = bean;
mTvNation.setText(mSelNation.getName());
} else {
//清除了选项
mSelNation = null;
mTvNation.setText("民族");
}
refreshData();
conditionPopup.dismiss();
});
conditionPopup.showPopupWindow(mTvNation);
}
/**
* 宗教信仰
*/
private void onShowFaith() {
ConditionPopup conditionPopup = new ConditionPopup(mActivity, mFaiths);
conditionPopup.setOnListPopupItemClickListener((bean, isCheck, pos) -> {
if (isCheck) {
//选中了
mSelFaith = bean;
mTvFaith.setText(mSelFaith.getName());
} else {
//清除了选项
mSelFaith = null;
mTvFaith.setText("宗教信仰");
}
refreshData();
conditionPopup.dismiss();
});
conditionPopup.showPopupWindow(mTvFaith);
}
/**
* 政治面貌
*/
private void onShowPolitical() {
ConditionPopup conditionPopup = new ConditionPopup(mActivity, mPoliticals);
conditionPopup.setOnListPopupItemClickListener((bean, isCheck, pos) -> {
if (isCheck) {
//选中了
mSelPolitical = bean;
mTvPolitical.setText(mSelPolitical.getName());
} else {
//清除了选项
mSelPolitical = null;
mTvPolitical.setText("政治面貌");
}
refreshData();
conditionPopup.dismiss();
});
conditionPopup.showPopupWindow(mTvPolitical);
}
/**
* 婚姻状况
*/
private void onShowMarray() {
ConditionPopup conditionPopup = new ConditionPopup(mActivity, mMarrays);
conditionPopup.setOnListPopupItemClickListener((bean, isCheck, pos) -> {
if (isCheck) {
//选中了
mSelMarray = bean;
mTvMarr.setText(mSelMarray.getName());
} else {
//清除了选项
mSelMarray = null;
mTvMarr.setText("婚姻状况");
}
refreshData();
conditionPopup.dismiss();
});
conditionPopup.showPopupWindow(mTvMarr);
}
/**
* 学历
*/
private void onShowEdu() {
ConditionPopup conditionPopup = new ConditionPopup(mActivity, mEdus);
conditionPopup.setOnListPopupItemClickListener((bean, isCheck, pos) -> {
if (isCheck) {
//选中了
mSelEdu = bean;
mTvEdu.setText(mSelEdu.getName());
} else {
//清除了选项
mSelEdu = null;
mTvEdu.setText("学历");
}
refreshData();
conditionPopup.dismiss();
});
conditionPopup.showPopupWindow(mTvEdu);
}
/**
* 搜索
*/
private void doSearch() {
String searchContent = mEtSearchContent.getText().toString().trim();
hideSoftKeyboard();
mKeywords = searchContent;
mCurPage = 1;
getUpcomingList(mCurPage);
}
/**
* 删除数据
*
* @param bean
* @param pos
*/
private void doDelBean(CensusPersonBean.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(LocationApiService.class)
.doDelBasePersonByType(bean.getBasePopulationInfoId(), mType, 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.showShort("删除成功");
mDatas.remove(bean);
mAdapter.notifyDataSetChanged();
dialog1.dismiss();
}
@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(CensusPersonBean.RowsBean bean, int pos) {
Intent intent = new Intent(mActivity, CensusEnterActivity.class);
intent.putExtra("title", "人员基础信息编辑");
intent.putExtra("id", bean.getBasePopulationInfoId());
startActivity(intent);
}
/**
* 显示详情
*
* @param bean
*/
private void showDetail(CensusPersonBean.RowsBean bean) {
Intent intent = new Intent(mActivity, CensusBaseDetailActivity.class);
intent.putExtra("id", bean.getBasePopulationInfoId());
startActivity(intent);
}
private void refreshData() {
getUpcomingList(1);
}
@Override
protected void onResume() {
super.onResume();
refreshData();
}
/**
* 获取名族筛选条件
*/
private void getNationConditionList() {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "加载中...");
dialog.show();
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getNationDic(UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<List<ConditionDicBean>>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(List<ConditionDicBean> conditionDicBeans) {
dialog.dismiss();
if (conditionDicBeans != null && conditionDicBeans.size() > 0) {
mNations = conditionDicBeans;
onShowNationPopup();
} else {
ToastUtils.showShort("暂无筛选条件");
}
}
@Override
public void onError(Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
/**
* 获取宗教筛选条件
*/
private void getFaithConditionList() {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "加载中...");
dialog.show();
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getConditionReligion(UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<List<ConditionDicBean>>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(List<ConditionDicBean> conditionDicBeans) {
dialog.dismiss();
if (conditionDicBeans != null && conditionDicBeans.size() > 0) {
mFaiths = conditionDicBeans;
onShowFaith();
} else {
ToastUtils.showShort("暂无筛选条件");
}
}
@Override
public void onError(Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
/**
* 学历
*/
private void getEduConditionList() {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "加载中...");
dialog.show();
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getConditionEdu(UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<List<ConditionDicBean>>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(List<ConditionDicBean> conditionDicBeans) {
dialog.dismiss();
if (conditionDicBeans != null && conditionDicBeans.size() > 0) {
mEdus = conditionDicBeans;
onShowEdu();
} else {
ToastUtils.showShort("暂无筛选条件");
}
}
@Override
public void onError(Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
/**
* 婚姻状况
*/
private void getMarryConditionList() {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "加载中...");
dialog.show();
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getConditionMarry(UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<List<ConditionDicBean>>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(List<ConditionDicBean> conditionDicBeans) {
dialog.dismiss();
if (conditionDicBeans != null && conditionDicBeans.size() > 0) {
mMarrays = conditionDicBeans;
onShowMarray();
} else {
ToastUtils.showShort("暂无筛选条件");
}
}
@Override
public void onError(Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
/**
* 政治面貌
*/
private void getPoliticalConditionList() {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "加载中...");
dialog.show();
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getConditionPolitical(UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<List<ConditionDicBean>>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(List<ConditionDicBean> conditionDicBeans) {
dialog.dismiss();
if (conditionDicBeans != null && conditionDicBeans.size() > 0) {
mPoliticals = conditionDicBeans;
onShowPolitical();
} else {
ToastUtils.showShort("暂无筛选条件");
}
}
@Override
public void onError(Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
/**
* 获取列表
*/
private void getUpcomingList(int page) {
mCurPage = page;
String nation = mSelNation == null ? "" : mSelNation.getName();
String faith = mSelFaith == null ? "" : mSelFaith.getName();
String polition = mSelPolitical == null ? "" : mSelPolitical.getName();
String marry = mSelMarray == null ? "" : mSelMarray.getName();
String edu = mSelEdu == null ? "" : mSelEdu.getName();
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getBaseInfoList(page + "", mKeywords, nation, faith, polition, marry, edu, mType, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<CensusPersonBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(CensusPersonBean leaveListBean) {
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());
}
mAdapter.notifyDataSetChanged();
mXlvItems.refreshComplete();
if (mDatas.size() >= leaveListBean.getTotal()) {
mXlvItems.loadMoreComplete();
mXlvItems.setNoMore(true);
} else {
mXlvItems.loadMoreComplete();
mXlvItems.setNoMore(false);
}
setStateView(STATE_LOAD_SUCCESS);
} else {
if (page > 1) {
mXlvItems.loadMoreComplete();
mXlvItems.setNoMore(true);
setStateView(STATE_LOAD_SUCCESS);
} else {
//无数据
if (!TextUtils.isEmpty(mKeywords) || mSelFaith != null || mSelEdu != null || mSelMarray != null || mSelNation != null || mSelPolitical != null) {
ToastUtils.showShort("未查询到相关内容");
} else {
setStateView(STATE_LOAD_EMPTY);
}
}
}
}
@Override
public void onError(Throwable e) {
ToastUtils.showShort("数据加载失,请稍后重试");
setStateView(STATE_LOAD_ERROR);
}
@Override
public void onComplete() {
}
});
}
private void setStateView(int state) {
switch (state) {
case STATE_LOAD_LOADING://加载中
mPbALoading.setVisibility(View.VISIBLE);
mIvAEmpty.setVisibility(View.GONE);
mTvAHint.setVisibility(View.VISIBLE);
mTvAHint.setText(getResources().getString(com.sucstepsoft.cm_utils.R.string.loading));
mXlvItems.setVisibility(View.INVISIBLE);
break;
case STATE_LOAD_SUCCESS://加载成功
mPbALoading.setVisibility(View.GONE);
mIvAEmpty.setVisibility(View.GONE);
mTvAHint.setVisibility(View.GONE);
mXlvItems.setVisibility(View.VISIBLE);
break;
case STATE_LOAD_EMPTY://空数据
mPbALoading.setVisibility(View.GONE);
mIvAEmpty.setVisibility(View.VISIBLE);
mTvAHint.setVisibility(View.VISIBLE);
mTvAHint.setText(getResources().getString(com.sucstepsoft.cm_utils.R.string.empty_data));
mXlvItems.setVisibility(View.INVISIBLE);
break;
case STATE_LOAD_ERROR:
mPbALoading.setVisibility(View.GONE);
mIvAEmpty.setVisibility(View.VISIBLE);
mTvAHint.setVisibility(View.VISIBLE);
mTvAHint.setText(getResources().getString(com.sucstepsoft.cm_utils.R.string.loading_error));
mXlvItems.setVisibility(View.INVISIBLE);
break;
}
}
@Override
protected void onDestroy() {
if (mDisposable != null && !mDisposable.isDisposed()) {
mDisposable.dispose();
}
mXlvItems.destroy();
mXlvItems = null;
if (mBind != null) {
mBind.unbind();
}
super.onDestroy();
}
}

View File

@ -230,7 +230,7 @@ public class SearchHouseActivity extends BaseActivity {
mCurPage = page;
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getBuildingList(mCurPage + "", mKeywords, UserLgUtils.getToken())
.getBuildingList(mCurPage + "", mKeywords, "",UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BuildingListBean>() {

View File

@ -0,0 +1,173 @@
package com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys;
import android.content.Intent;
import android.support.v7.widget.LinearLayoutManager;
import android.widget.TextView;
import com.jcodecraeer.xrecyclerview.ProgressStyle;
import com.jcodecraeer.xrecyclerview.XRecyclerView;
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
import com.sucstepsoft.cm_utils.utils.ToastUtils;
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
import com.sucstepsoft.realtimelocation.R;
import com.sucstepsoft.realtimelocation.adapters.BuildingAdapter;
import com.sucstepsoft.realtimelocation.beans.BuildingListBean;
import com.sucstepsoft.realtimelocation.net.LocationApiService;
import com.sucstepsoft.realtimelocation.utils.ExceptionHandler;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
/**
* 作者: Adam
* 日期: 2022年07月27日09:04:35
* 邮箱: itgaojian@163.com
* 描述: 楼宇管理
*/
public class NewBuildingManageActivity extends BaseActivity {
@BindView(R.id.tv_community_name)
TextView mTvCommunityName;
@BindView(R.id.rlv_items)
XRecyclerView mRlvItems;
private String mId;
private String mTitle;
private List<BuildingListBean.RowsBean> mDatas;
private BuildingAdapter mAdapter;
private String mRows = "20";
private int mCurPage = 1;
private String mArea;
@Override
protected int setLayoutId() {
return R.layout.activity_new_building_manage;
}
@Override
public void initData() {
ButterKnife.bind(this);
mId = getIntent().getStringExtra("id");
mTitle = getIntent().getStringExtra("title");
mArea = getIntent().getStringExtra("area");
mTvCommunityName.setText(mArea);
mTvBaseTitle.setText(mTitle);
mDatas = new ArrayList<>();
refreshView(STATE_LOAD_LOADING);
mAdapter = new BuildingAdapter(mActivity, mDatas, "1");
LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity);
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mRlvItems.setLayoutManager(layoutManager);
mRlvItems.setAdapter(mAdapter);
mAdapter.addOnItemClickListener(this::showDetail);
mRlvItems.setNoMore(true);
mRlvItems.setRefreshProgressStyle(ProgressStyle.BallGridBeat);
mRlvItems.setLoadingMoreProgressStyle(ProgressStyle.Pacman);
mRlvItems.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
refresh();
}
@Override
public void onLoadMore() {
loadMore();
}
});
getHouse(mCurPage);
}
/**
* 显示详情
*/
private void showDetail(BuildingListBean.RowsBean bean) {
Intent intent = new Intent(mActivity, NewHouseListActivity.class);
intent.putExtra("id", bean.getCityBuildingId());
intent.putExtra("title", bean.getBuildingName());
intent.putExtra("area", mArea + " >> " + bean.getBuildingName());
startActivity(intent);
}
private void refresh() {
getHouse(1);
}
private void loadMore() {
getHouse(mCurPage);
}
/**
* 获取房屋
*/
private void getHouse(int page) {
mCurPage = page;
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getBuildingList(mCurPage + "", "", mId, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BuildingListBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(BuildingListBean issueSubBean) {
if (issueSubBean != null && issueSubBean.getRows() != null && issueSubBean.getRows().size() > 0) {
++mCurPage;
if (page == 1) {
refreshView(STATE_LOAD_SUCCESS);
mDatas.clear();
mDatas.addAll(issueSubBean.getRows());
} else {
mDatas.addAll(issueSubBean.getRows());
}
mAdapter.notifyDataSetChanged();
mRlvItems.refreshComplete();
if (mDatas.size() >= issueSubBean.getTotal()) {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(true);
} else {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(false);
}
} else {
if (page > 1) {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(true);
} else {
//无数据
refreshView(STATE_LOAD_EMPTY);
mRlvItems.refreshComplete();
mRlvItems.setNoMore(true);
ToastUtils.showShort("暂无数据");
}
}
}
@Override
public void onError(Throwable e) {
mRlvItems.refreshComplete();
mRlvItems.loadMoreComplete();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
}

View File

@ -0,0 +1,172 @@
package com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys;
import android.content.Intent;
import android.support.v7.widget.LinearLayoutManager;
import android.widget.TextView;
import com.jcodecraeer.xrecyclerview.ProgressStyle;
import com.jcodecraeer.xrecyclerview.XRecyclerView;
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
import com.sucstepsoft.cm_utils.utils.ToastUtils;
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
import com.sucstepsoft.realtimelocation.R;
import com.sucstepsoft.realtimelocation.activitys.census.house.HouseDetailActivity;
import com.sucstepsoft.realtimelocation.adapters.BuildingAdapter;
import com.sucstepsoft.realtimelocation.beans.BuildingListBean;
import com.sucstepsoft.realtimelocation.net.LocationApiService;
import com.sucstepsoft.realtimelocation.utils.ExceptionHandler;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
/**
* 作者: Adam
* 日期: 2022年07月27日10:11:01
* 邮箱: itgaojian@163.com
* 描述: 房屋列表
*/
public class NewHouseListActivity extends BaseActivity {
@BindView(R.id.tv_community_name)
TextView mTvCommunityName;
@BindView(R.id.rlv_items)
XRecyclerView mRlvItems;
private String mId; //楼宇ID
private String mArea;
private List<BuildingListBean.RowsBean> mDatas;
private BuildingAdapter mAdapter;
private String mRows = "20";
private int mCurPage = 1;
@Override
protected int setLayoutId() {
return R.layout.activity_new_house_list;
}
@Override
public void initData() {
ButterKnife.bind(this);
mId = getIntent().getStringExtra("id");
mArea = getIntent().getStringExtra("area");
String title = getIntent().getStringExtra("title");
mTvBaseTitle.setText(title);
mTvCommunityName.setText(mArea);
mDatas = new ArrayList<>();
refreshView(STATE_LOAD_LOADING);
mAdapter = new BuildingAdapter(mActivity, mDatas, "4");
LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity);
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mRlvItems.setLayoutManager(layoutManager);
mRlvItems.setAdapter(mAdapter);
mAdapter.addOnItemClickListener(this::showDetail);
mRlvItems.setNoMore(true);
mRlvItems.setRefreshProgressStyle(ProgressStyle.BallGridBeat);
mRlvItems.setLoadingMoreProgressStyle(ProgressStyle.Pacman);
mRlvItems.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
refresh();
}
@Override
public void onLoadMore() {
loadMore();
}
});
getHouse(mCurPage);
}
/**
* 显示详情
*/
private void showDetail(BuildingListBean.RowsBean bean) {
//显示房屋详情
Intent intent = new Intent(mActivity, HouseDetailActivity.class);
intent.putExtra("id", bean.getBuildingHouseId());
intent.putExtra("title", bean.getDistrictName());
startActivityForResult(intent, 12);
}
private void refresh() {
getHouse(1);
}
private void loadMore() {
getHouse(mCurPage);
}
/**
* 获取房屋
*/
private void getHouse(int page) {
mCurPage = page;
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getHouse(mCurPage + "", "", mId, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BuildingListBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(BuildingListBean issueSubBean) {
if (issueSubBean != null && issueSubBean.getRows() != null && issueSubBean.getRows().size() > 0) {
++mCurPage;
if (page == 1) {
refreshView(STATE_LOAD_SUCCESS);
mDatas.clear();
mDatas.addAll(issueSubBean.getRows());
} else {
mDatas.addAll(issueSubBean.getRows());
}
mAdapter.notifyDataSetChanged();
mRlvItems.refreshComplete();
if (mDatas.size() >= issueSubBean.getTotal()) {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(true);
} else {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(false);
}
} else {
if (page > 1) {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(true);
} else {
//无数据
refreshView(STATE_LOAD_EMPTY);
mRlvItems.refreshComplete();
mRlvItems.setNoMore(true);
ToastUtils.showShort("暂无数据");
}
}
}
@Override
public void onError(Throwable e) {
mRlvItems.refreshComplete();
mRlvItems.loadMoreComplete();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
}

View File

@ -0,0 +1,351 @@
package com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys;
import android.app.ProgressDialog;
import android.content.Intent;
import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.jcodecraeer.xrecyclerview.ProgressStyle;
import com.jcodecraeer.xrecyclerview.XRecyclerView;
import com.sucstepsoft.cm_utils.constant.PathConfig;
import com.sucstepsoft.cm_utils.core.beans.AreaBean;
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
import com.sucstepsoft.cm_utils.utils.ToastUtils;
import com.sucstepsoft.cm_utils.utils.UIUtil;
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
import com.sucstepsoft.realtimelocation.R;
import com.sucstepsoft.realtimelocation.adapters.CommunityAdapter;
import com.sucstepsoft.realtimelocation.beans.person.CommunityListBean;
import com.sucstepsoft.realtimelocation.net.LocationApiService;
import com.sucstepsoft.realtimelocation.utils.ExceptionHandler;
import com.sucstepsoft.realtimelocation.widget.ConditionAreaPopup;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
/**
* 作者: Adam
* 日期: 2022年07月26日16:02:07
* 邮箱: itgaojian@163.com
* 描述: 房屋管理
*/
public class NewHouseManageActivity extends BaseActivity {
@BindView(R.id.tv_street)
TextView mTvStreet;//街道
@BindView(R.id.tv_community)
TextView mTvCommunity;//社区
@BindView(R.id.xlv_content)
XRecyclerView mXlvContent;
@BindView(R.id.iv_page_empty)
ImageView mIvPageEmpty;
@BindView(R.id.pb_page_loading)
ProgressBar mPbPageLoading;
@BindView(R.id.tv_page_hint)
TextView mTvPageHint;
@BindView(R.id.ll_page_empty)
LinearLayout mLlPageEmpty;
private Unbinder mBind;
private List<AreaBean> mStreetList = new ArrayList<>();
private AreaBean mSelStreet;
private List<AreaBean> mCommunityList = new ArrayList<>();
private AreaBean mSelCommunity;
private int mCurPage = 1;
private String mKeywords = "";
private List<CommunityListBean.RowsBean> mDatas = new ArrayList<>();
private CommunityAdapter mAdapter;
@Override
protected int setLayoutId() {
return R.layout.activity_new_house_manage;
}
@Override
public void initData() {
mBind = ButterKnife.bind(this);
mTvBaseTitle.setText("房屋管理");
mTvPublish.setVisibility(View.GONE);
refreshView(STATE_LOAD_LOADING);
mTvStreet.setOnClickListener(v -> onShowStreet());
mTvCommunity.setOnClickListener(v -> onShowCommunity());
getStreetList(PathConfig.DIC_STREET_ID, 1);
mAdapter = new CommunityAdapter(mActivity, mDatas, 2);
LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity);
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mXlvContent.setLayoutManager(layoutManager);
mXlvContent.setAdapter(mAdapter);
mXlvContent.setRefreshProgressStyle(ProgressStyle.BallGridBeat);
mXlvContent.setLoadingMoreProgressStyle(ProgressStyle.Pacman);
mXlvContent.setPullRefreshEnabled(true);
mXlvContent.setLoadingMoreEnabled(true);
mXlvContent.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
doRefresh();
}
@Override
public void onLoadMore() {
getCommunityList(mCurPage);
}
});
mAdapter.addOnItemClickListener(this::showBuildingList);
}
/**
* 显示小区下楼宇列表
*/
private void showBuildingList(CommunityListBean.RowsBean rowsBean) {
Intent intent = new Intent(mActivity, NewBuildingManageActivity.class);
String area = rowsBean.getAreaName() + " >> " + rowsBean.getCommunityName() + " >> " + rowsBean.getDistrictName();
intent.putExtra("area", area);
intent.putExtra("id", rowsBean.getCityDistrictId());
intent.putExtra("title", rowsBean.getDistrictName());
startActivity(intent);
}
/**
* 显示街道
*/
private void onShowStreet() {
if (mStreetList != null && mStreetList.size() > 0) {
ConditionAreaPopup conditionPopup = new ConditionAreaPopup(mActivity, mStreetList);
conditionPopup.setOnListPopupItemClickListener((bean, isCheck, pos) -> {
if (isCheck) {
//选中了
mSelStreet = bean;
mTvStreet.setText(mSelStreet.getAreaName());
} else {
//清除了选项
mSelStreet = null;
mTvStreet.setText("街道");
}
conditionPopup.dismiss();
doRefresh();
});
conditionPopup.showPopupWindow(mTvStreet);
} else {
getStreetList(PathConfig.DIC_STREET_ID, 2);
}
}
/**
* 显示社区
*/
private void onShowCommunity() {
if (mCommunityList != null && mCommunityList.size() > 0) {
ConditionAreaPopup conditionPopup = new ConditionAreaPopup(mActivity, mCommunityList);
conditionPopup.setOnListPopupItemClickListener((bean, isCheck, pos) -> {
if (isCheck) {
//选中了
mSelCommunity = bean;
mTvCommunity.setText(mSelCommunity.getAreaName());
} else {
//清除了选项
mSelCommunity = null;
mTvCommunity.setText("社区");
}
conditionPopup.dismiss();
doRefresh();
});
conditionPopup.showPopupWindow(mTvCommunity);
} else {
if (mSelStreet != null) {
getStreetList(mSelStreet.getAreaId(), 3);
} else {
ToastUtils.showShort("请选择街道");
}
}
}
/**
* 获取街道
*/
private void getStreetList(String pid, int type) {
ProgressDialog dialog = UIUtil.initDialog(mActivity, "加载中...");
dialog.show();
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getConditionHouseList(pid, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<List<AreaBean>>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(List<AreaBean> conditionDicBeans) {
dialog.dismiss();
if (type == 2) {
mStreetList = conditionDicBeans;
onShowStreet();
} else if (type == 1) {
mStreetList = conditionDicBeans;
if (mStreetList != null && mStreetList.size() > 0) {
mStreetList.get(0).setCheck(true);
mSelStreet = mStreetList.get(0);
mTvStreet.setText(mSelStreet.getAreaName());
refreshView(STATE_LOAD_SUCCESS);
doRefresh();
} else {
refreshView(STATE_LOAD_EMPTY);
}
} else if (type == 3) {
mCommunityList = conditionDicBeans;
onShowCommunity();
}
}
@Override
public void onError(Throwable e) {
dialog.dismiss();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
}
});
}
/**
* 刷新页面
*/
private void doRefresh() {
setStateView(STATE_LOAD_LOADING);
mDatas.clear();
mAdapter.notifyDataSetChanged();
getCommunityList(1);
}
/**
* 获取小区列表
*/
private void getCommunityList(int page) {
mCurPage = page;
String streetId = mSelStreet == null ? "" : mSelStreet.getAreaId();
String communityId = mSelCommunity == null ? "" : mSelCommunity.getAreaId();
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getCommunityNewList(page + "", streetId, communityId, mKeywords, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<CommunityListBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(CommunityListBean leaveListBean) {
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());
}
mAdapter.notifyDataSetChanged();
mXlvContent.refreshComplete();
if (mDatas.size() >= leaveListBean.getTotal()) {
mXlvContent.loadMoreComplete();
mXlvContent.setNoMore(true);
} else {
mXlvContent.loadMoreComplete();
mXlvContent.setNoMore(false);
}
setStateView(STATE_LOAD_SUCCESS);
} else {
if (page > 1) {
mXlvContent.loadMoreComplete();
mXlvContent.setNoMore(true);
setStateView(STATE_LOAD_SUCCESS);
} else {
setStateView(STATE_LOAD_EMPTY);
if (mSelCommunity != null) {
ToastUtils.showShort("未查询到相关内容");
}
}
}
}
@Override
public void onError(Throwable e) {
ToastUtils.showShort("数据加载失,请稍后重试");
setStateView(STATE_LOAD_ERROR);
}
@Override
public void onComplete() {
}
});
}
private void setStateView(int state) {
switch (state) {
case STATE_LOAD_LOADING://加载中
mPbPageLoading.setVisibility(View.VISIBLE);
mIvPageEmpty.setVisibility(View.GONE);
mTvPageHint.setVisibility(View.VISIBLE);
mTvPageHint.setText(getResources().getString(R.string.loading));
mXlvContent.setVisibility(View.INVISIBLE);
break;
case STATE_LOAD_SUCCESS://加载成功
mPbPageLoading.setVisibility(View.GONE);
mIvPageEmpty.setVisibility(View.GONE);
mTvPageHint.setVisibility(View.GONE);
mXlvContent.setVisibility(View.VISIBLE);
break;
case STATE_LOAD_EMPTY://空数据
mPbPageLoading.setVisibility(View.GONE);
mIvPageEmpty.setVisibility(View.VISIBLE);
mTvPageHint.setVisibility(View.VISIBLE);
mTvPageHint.setText(getResources().getString(R.string.empty_data));
mXlvContent.setVisibility(View.INVISIBLE);
break;
case STATE_LOAD_ERROR://加载失败
mPbPageLoading.setVisibility(View.GONE);
mIvPageEmpty.setVisibility(View.VISIBLE);
mTvPageHint.setVisibility(View.VISIBLE);
mTvPageHint.setText(getResources().getString(R.string.loading_error));
mXlvContent.setVisibility(View.INVISIBLE);
break;
}
}
@Override
protected void onDestroy() {
if (mBind != null) {
mBind.unbind();
}
super.onDestroy();
}
}

View File

@ -0,0 +1,38 @@
package com.sucstepsoft.realtimelocation.activitys.census.newhouse.fragments;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import com.sucstepsoft.cm_utils.core.widget.base.LazyFragment;
import com.sucstepsoft.realtimelocation.R;
import butterknife.ButterKnife;
import butterknife.Unbinder;
/**
* 作者: adam
* 日期: 2022/7/26 - 16:17
* 邮箱: itgaojian@163.com
* 描述: 楼宇管理
*/
public class BuildingManageFragment extends LazyFragment {
private Activity mActivity;
private Unbinder mBind;
@Override
protected void onCreateViewLazy(Bundle savedInstanceState) {
super.onCreateViewLazy(savedInstanceState);
View view = LayoutInflater.from(mActivity).inflate(R.layout.fragment_building_manage, null);
setContentView(view);
mBind = ButterKnife.bind(this, view);
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
this.mActivity = getActivity();
}
}

View File

@ -0,0 +1,37 @@
package com.sucstepsoft.realtimelocation.activitys.census.newhouse.fragments;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import com.sucstepsoft.cm_utils.core.widget.base.LazyFragment;
import com.sucstepsoft.realtimelocation.R;
import butterknife.ButterKnife;
import butterknife.Unbinder;
/**
* 作者: adam
* 日期: 2022/7/26 - 16:17
* 邮箱: itgaojian@163.com
* 描述: 小区管理
*/
public class CommunityManageFragment extends LazyFragment {
private Activity mActivity;
private Unbinder mBind;
@Override
protected void onCreateViewLazy(Bundle savedInstanceState) {
super.onCreateViewLazy(savedInstanceState);
View view = LayoutInflater.from(mActivity).inflate(R.layout.fragment_community_manage, null);
setContentView(view);
mBind = ButterKnife.bind(this, view);
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
this.mActivity = getActivity();
}
}

View File

@ -0,0 +1,39 @@
package com.sucstepsoft.realtimelocation.activitys.census.newhouse.fragments;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import com.sucstepsoft.cm_utils.core.widget.base.LazyFragment;
import com.sucstepsoft.realtimelocation.R;
import butterknife.ButterKnife;
import butterknife.Unbinder;
/**
* 作者: adam
* 日期: 2022/7/26 - 16:17
* 邮箱: itgaojian@163.com
* 描述: 房屋管理
*/
public class HouseManageNewFragment extends LazyFragment {
private Activity mActivity;
private Unbinder mBind;
@Override
protected void onCreateViewLazy(Bundle savedInstanceState) {
super.onCreateViewLazy(savedInstanceState);
View view = LayoutInflater.from(mActivity).inflate(R.layout.fragment_house_manage_new, null);
setContentView(view);
mBind = ButterKnife.bind(this, view);
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
this.mActivity = getActivity();
}
}

View File

@ -550,7 +550,7 @@ public class CensusNmigrantAddActivity extends BaseActivity {
mBaseInfoBean = o;
mLlContent.setVisibility(View.VISIBLE);
mTvBaseName.setText(o.getFullName());
mTvBaseGender.setText(o.getGenderDictionaryName());
mTvBaseGender.setText(o.getGender());
mTvBasePhone.setText(o.getTelephone());
mTvBaseNative.setText(o.getNativePlaceAddr());
mTvBaseCurLoc.setText(o.getAreaNames() + "/" + o.getCurrentResidenceAddr());

View File

@ -297,15 +297,34 @@ public class TakePointActivity extends BaseActivity {
}
private void checkPointIsLegal(BDLocation bdLocation) {
if (PathConfig.mDefaultCityCode.equals(bdLocation.getCityCode())) {
if(PathConfig.IS_LIMIT){
if (PathConfig.mDefaultCityCode.equals(bdLocation.getCityCode())) {
if (bdLocation != null && bdLocation.getLatitude() != 0 && bdLocation.getLongitude() != 0) {
if (bdLocation.getRadius() <= 150) {
if (bdLocation != null && bdLocation.getLatitude() != Double.MIN_VALUE && bdLocation.getLongitude() != Double.MIN_VALUE) {
mBaiduMap.setMyLocationEnabled(true);
MyLocationData locData = new MyLocationData.Builder()
.accuracy(bdLocation.getRadius())
.latitude(bdLocation.getLatitude())
.longitude(bdLocation.getLongitude()).build();
mBaiduMap.setMyLocationData(locData);
if (mCurrentLocation == null) {
mCurrentLocation = bdLocation;
moveMapToCenter(new LatLng(mCurrentLocation.getLatitude(), mCurrentLocation.getLongitude()));
}
}
}
}
}
}else{
if (bdLocation != null && bdLocation.getLatitude() != 0 && bdLocation.getLongitude() != 0) {
if (bdLocation.getRadius() <= 150) {
if (bdLocation != null && bdLocation.getLatitude() != Double.MIN_VALUE && bdLocation.getLongitude() != Double.MIN_VALUE) {
mBaiduMap.setMyLocationEnabled(true);
MyLocationData locData = new MyLocationData.Builder()
.accuracy(bdLocation.getRadius())
.latitude(bdLocation.getLatitude())
.longitude(bdLocation.getLongitude()).build();
.accuracy(bdLocation.getRadius())
.latitude(bdLocation.getLatitude())
.longitude(bdLocation.getLongitude()).build();
mBaiduMap.setMyLocationData(locData);
if (mCurrentLocation == null) {
mCurrentLocation = bdLocation;

View File

@ -1000,14 +1000,39 @@ public class LocusMapActivity extends BaseActivity {
}
private void checkPointIsLegal(BDLocation bdLocation) {
if (PathConfig.mDefaultCityCode.equals(bdLocation.getCityCode())) {
if(PathConfig.IS_LIMIT){
if (PathConfig.mDefaultCityCode.equals(bdLocation.getCityCode())) {
if (bdLocation != null && bdLocation.getLatitude() != Double.MIN_VALUE && bdLocation.getLongitude() != Double.MIN_VALUE) {
if (bdLocation.getRadius() <= 150) {
mBaiduMap.setMyLocationEnabled(true);
MyLocationData locData = new MyLocationData.Builder()
.accuracy(bdLocation.getRadius())
.latitude(bdLocation.getLatitude())
.longitude(bdLocation.getLongitude()).build();
mBaiduMap.setMyLocationData(locData);
if (mCurrent == null) {
mCurrent = bdLocation;
moveMapToCenter(new LatLng(mCurrent.getLatitude(), mCurrent.getLongitude()));
}
if (mPenLineBeans != null && mPenLineBeans.size() > 0) {
boolean isIn = getPointIsIn(bdLocation, mPenLineBeans);
if (!isIn) {
setDisToView(bdLocation);
} else {
mTvDistance.setText("已在片区内");
}
}
}
}
}
}else{
if (bdLocation != null && bdLocation.getLatitude() != Double.MIN_VALUE && bdLocation.getLongitude() != Double.MIN_VALUE) {
if (bdLocation.getRadius() <= 150) {
mBaiduMap.setMyLocationEnabled(true);
MyLocationData locData = new MyLocationData.Builder()
.accuracy(bdLocation.getRadius())
.latitude(bdLocation.getLatitude())
.longitude(bdLocation.getLongitude()).build();
.accuracy(bdLocation.getRadius())
.latitude(bdLocation.getLatitude())
.longitude(bdLocation.getLongitude()).build();
mBaiduMap.setMyLocationData(locData);
if (mCurrent == null) {
mCurrent = bdLocation;
@ -1024,6 +1049,7 @@ public class LocusMapActivity extends BaseActivity {
}
}
}
//显示定位图标
}

View File

@ -7,10 +7,8 @@ import android.view.ViewGroup;
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
import com.sucstepsoft.realtimelocation.R;
import com.sucstepsoft.realtimelocation.adapters.holders.CensusHouseHolder;
import com.sucstepsoft.realtimelocation.adapters.holders.HouseHolder;
import com.sucstepsoft.realtimelocation.beans.BuildingListBean;
import com.sucstepsoft.realtimelocation.beans.person.HouseListBean;
import java.util.List;
@ -48,13 +46,13 @@ public class BuildingAdapter extends BaseRecyclerAdapter<BuildingListBean.RowsBe
holder.mBtnBind.setVisibility(View.GONE);
} else if ("1".equals(type)) {
holder.mIvIcon.setBackgroundResource(R.drawable.ic_house_icon);
holder.mTvCommunityName.setText(bean.getDistrictName());
holder.mTvBuildingNum.setText(bean.getHouseNumber());
holder.mTvCommunityName.setText(bean.getBuildingName());
holder.mTvBuildingNum.setText(bean.getDistrictName());
holder.mBtnBind.setVisibility(View.GONE);
} else {
holder.mIvIcon.setBackgroundResource(R.drawable.ic_house_icon);
holder.mTvCommunityName.setText(bean.getDistrictName());
holder.mTvBuildingNum.setText(bean.getHouseNumber());
holder.mTvCommunityName.setText(bean.getBuildingName());
holder.mTvBuildingNum.setText(bean.getDistrictName());
holder.mBtnBind.setVisibility(View.VISIBLE);
holder.mBtnBind.setText("租住记录");
}

View File

@ -0,0 +1,54 @@
package com.sucstepsoft.realtimelocation.adapters;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
import com.sucstepsoft.realtimelocation.R;
import com.sucstepsoft.realtimelocation.adapters.holders.CensusPersonHolder;
import com.sucstepsoft.realtimelocation.adapters.holders.CensusPersonNewHolder;
import com.sucstepsoft.realtimelocation.beans.person.CensusPersonBean;
import java.util.List;
/**
* 作者: adam
* 日期: 2020/11/17 - 1:22 PM
* 邮箱: itgaojian@163.com
* 描述: 人口adapter
*/
public class CensusPersonNewAdapter extends BaseRecyclerAdapter<CensusPersonBean.RowsBean, CensusPersonNewHolder> {
public CensusPersonNewAdapter(Context ctx, List<CensusPersonBean.RowsBean> list) {
super(ctx, list);
}
@Override
public CensusPersonNewHolder createHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_person_new, parent, false);
return new CensusPersonNewHolder(itemView);
}
@Override
public void bindHolder(CensusPersonNewHolder censusPersonHolder, int i) {
CensusPersonBean.RowsBean bean = mData.get(i);
censusPersonHolder.mTvName.setText(bean.getFullName());
censusPersonHolder.mTvLocation.setText("现住地:" + bean.getAreaNames() + "/" + bean.getCurrentResidenceAddr());//现在住地
censusPersonHolder.mTvNative.setText("籍贯:" + bean.getNativePlaceAddr());
censusPersonHolder.mTvPhone.setText("联系电话:" + bean.getTelephone());
censusPersonHolder.mBtnDel.setOnClickListener(v -> mEditListener.onDel(bean, i));
}
private OnEditListener mEditListener;
public void addOnEditListener(OnEditListener mListener) {
this.mEditListener = mListener;
}
public interface OnEditListener {
void onDel(CensusPersonBean.RowsBean bean, int pos);
void onEdit(CensusPersonBean.RowsBean bean, int pos);
}
}

View File

@ -7,9 +7,7 @@ import android.view.ViewGroup;
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
import com.sucstepsoft.realtimelocation.R;
import com.sucstepsoft.realtimelocation.adapters.holders.CensusPersonHolder;
import com.sucstepsoft.realtimelocation.adapters.holders.CommunityHolder;
import com.sucstepsoft.realtimelocation.beans.person.CensusPersonBean;
import com.sucstepsoft.realtimelocation.beans.person.CommunityListBean;
import java.util.List;
@ -21,10 +19,18 @@ import java.util.List;
* 描述: 人口adapter
*/
public class CommunityAdapter extends BaseRecyclerAdapter<CommunityListBean.RowsBean, CommunityHolder> {
private int mType = 1;
public CommunityAdapter(Context ctx, List<CommunityListBean.RowsBean> list) {
super(ctx, list);
}
public CommunityAdapter(Context ctx, List<CommunityListBean.RowsBean> list, int type) {
super(ctx, list);
this.mType = type;
}
@Override
public CommunityHolder createHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_community_sel, parent, false);
@ -37,7 +43,12 @@ public class CommunityAdapter extends BaseRecyclerAdapter<CommunityListBean.Rows
censusPersonHolder.mTvAreaName.setText(bean.getAreaName());
censusPersonHolder.mTvDistrictName.setText(bean.getDistrictName());
censusPersonHolder.mTvCommunityName.setText(bean.getCommunityName());
censusPersonHolder.mBtnConfirm.setOnClickListener(v -> mEditListener.onEdit(bean, i));
if (mType == 1) {
censusPersonHolder.mBtnConfirm.setVisibility(View.VISIBLE);
censusPersonHolder.mBtnConfirm.setOnClickListener(v -> mEditListener.onEdit(bean, i));
} else {
censusPersonHolder.mBtnConfirm.setVisibility(View.GONE);
}
}
private OnEditListener mEditListener;

View File

@ -9,6 +9,7 @@ import android.view.ViewGroup;
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
import com.sucstepsoft.realtimelocation.R;
import com.sucstepsoft.realtimelocation.adapters.holders.ConditionViewHolder;
import com.sucstepsoft.realtimelocation.beans.ConditionDicBean;
import com.sucstepsoft.realtimelocation.beans.DicBean;
import java.util.ArrayList;
@ -20,9 +21,9 @@ import java.util.List;
* 邮箱: itgaojian@163.com
* 描述:
*/
public class ConditionAdapter extends BaseRecyclerAdapter<DicBean, ConditionViewHolder> {
public List<DicBean> mSelBeans = new ArrayList<>();
public ConditionAdapter(Context ctx, List<DicBean> list) {
public class ConditionAdapter extends BaseRecyclerAdapter<ConditionDicBean, ConditionViewHolder> {
public List<ConditionDicBean> mSelBeans = new ArrayList<>();
public ConditionAdapter(Context ctx, List<ConditionDicBean> list) {
super(ctx, list);
}
@ -34,8 +35,8 @@ public class ConditionAdapter extends BaseRecyclerAdapter<DicBean, ConditionView
@Override
public void bindHolder(ConditionViewHolder holder, int i) {
DicBean bean = mData.get(i);
holder.mTvName.setText(bean.getDictionaryName());
ConditionDicBean bean = mData.get(i);
holder.mTvName.setText(bean.getName());
holder.mTvName.setTextColor(bean.isCheck() ? Color.parseColor("#1296db") : Color.BLACK);
if (bean.isCheck()) {
holder.mIvCheck.setVisibility(View.VISIBLE);
@ -53,6 +54,6 @@ public class ConditionAdapter extends BaseRecyclerAdapter<DicBean, ConditionView
}
public interface OnItemCheckChange {
void onItemCheckChange(DicBean bean, boolean isCheck, int pos);
void onItemCheckChange(ConditionDicBean bean, boolean isCheck, int pos);
}
}

View File

@ -0,0 +1,59 @@
package com.sucstepsoft.realtimelocation.adapters;
import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.sucstepsoft.cm_utils.core.beans.AreaBean;
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
import com.sucstepsoft.realtimelocation.R;
import com.sucstepsoft.realtimelocation.adapters.holders.ConditionViewHolder;
import java.util.ArrayList;
import java.util.List;
/**
* 作者: adam
* 日期: 2022/3/30 - 11:00 上午
* 邮箱: itgaojian@163.com
* 描述:
*/
public class ConditionAreaAdapter extends BaseRecyclerAdapter<AreaBean, ConditionViewHolder> {
public List<AreaBean> mSelBeans = new ArrayList<>();
public ConditionAreaAdapter(Context ctx, List<AreaBean> list) {
super(ctx, list);
}
@Override
public ConditionViewHolder createHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_condition_dic, parent, false);
return new ConditionViewHolder(itemView);
}
@Override
public void bindHolder(ConditionViewHolder holder, int i) {
AreaBean bean = mData.get(i);
holder.mTvName.setText(bean.getAreaName());
holder.mTvName.setTextColor(bean.isCheck() ? Color.parseColor("#1296db") : Color.BLACK);
if (bean.isCheck()) {
holder.mIvCheck.setVisibility(View.VISIBLE);
holder.mIvCheck.setImageResource(R.drawable.ic_check_blue);
} else {
holder.mIvCheck.setVisibility(View.INVISIBLE);
}
holder.itemView.setOnClickListener(v -> mLis.onItemCheckChange(bean, !bean.isCheck(), i));
}
private OnItemCheckChange mLis;
public void addOnitemCheckChange(OnItemCheckChange lis) {
this.mLis = lis;
}
public interface OnItemCheckChange {
void onItemCheckChange(AreaBean bean, boolean isCheck, int pos);
}
}

View File

@ -0,0 +1,35 @@
package com.sucstepsoft.realtimelocation.adapters.holders;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import com.sucstepsoft.realtimelocation.R;
/**
* 作者: adam
* 日期: 2020/11/17 - 1:19 PM
* 邮箱: itgaojian@163.com
* 描述:
*/
public class CensusPersonNewHolder extends RecyclerView.ViewHolder {
public TextView mTvName;
public TextView mTvLocation;
public TextView mTvPhone;
public TextView mTvNative;
public Button mBtnDel;
public Button mBtnEdit;
public CensusPersonNewHolder(@NonNull View itemView) {
super(itemView);
mTvName = itemView.findViewById(R.id.tv_name);
mTvLocation = itemView.findViewById(R.id.tv_location);
mBtnDel = itemView.findViewById(R.id.btn_del);
mBtnEdit = itemView.findViewById(R.id.btn_edit);
mTvNative = itemView.findViewById(R.id.tv_native);
mTvPhone = itemView.findViewById(R.id.tv_phone);
}
}

View File

@ -0,0 +1,38 @@
package com.sucstepsoft.realtimelocation.beans;
/**
* 作者: adam
* 日期: 2022/7/26 - 14:35
* 邮箱: itgaojian@163.com
* 描述:
*/
public class ConditionDicBean {
private String name;
private String counts;
private boolean isCheck;
public boolean isCheck() {
return isCheck;
}
public void setCheck(boolean check) {
isCheck = check;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCounts() {
return counts;
}
public void setCounts(String counts) {
this.counts = counts;
}
}

View File

@ -1,7 +1,6 @@
package com.sucstepsoft.realtimelocation.fragments.house;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
@ -12,21 +11,14 @@ import android.view.View;
import com.jcodecraeer.xrecyclerview.ProgressStyle;
import com.jcodecraeer.xrecyclerview.XRecyclerView;
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
import com.sucstepsoft.cm_utils.core.widget.base.LazyFragment;
import com.sucstepsoft.cm_utils.utils.ToastUtils;
import com.sucstepsoft.cm_utils.utils.UIUtil;
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
import com.sucstepsoft.realtimelocation.R;
import com.sucstepsoft.realtimelocation.activitys.census.house.BuildingListActivity;
import com.sucstepsoft.realtimelocation.activitys.census.house.HouseDetailActivity;
import com.sucstepsoft.realtimelocation.activitys.issue.IssueSpecialDetailActivity;
import com.sucstepsoft.realtimelocation.adapters.BuildingAdapter;
import com.sucstepsoft.realtimelocation.adapters.IssueSubAdapter;
import com.sucstepsoft.realtimelocation.beans.BuildHouseListBean;
import com.sucstepsoft.realtimelocation.beans.BuildingListBean;
import com.sucstepsoft.realtimelocation.beans.IssueSubBean;
import com.sucstepsoft.realtimelocation.beans.person.HouseListBean;
import com.sucstepsoft.realtimelocation.net.LocationApiService;
import com.sucstepsoft.realtimelocation.utils.ExceptionHandler;
@ -137,60 +129,60 @@ public class HouseManageFragment extends LazyFragment {
private void getBuild(int page) {
mCurPage = page;
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getBuildingList(mCurPage + "", "", UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BuildingListBean>() {
@Override
public void onSubscribe(Disposable d) {
.create(LocationApiService.class)
.getBuildingList(mCurPage + "", "", "", UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BuildingListBean>() {
@Override
public void onSubscribe(Disposable d) {
}
}
@Override
public void onNext(BuildingListBean issueSubBean) {
if (issueSubBean != null && issueSubBean.getRows() != null && issueSubBean.getRows().size() > 0) {
++mCurPage;
if (page == 1) {
mDatas.clear();
mDatas.addAll(issueSubBean.getRows());
} else {
mDatas.addAll(issueSubBean.getRows());
}
mAdapter.notifyDataSetChanged();
mRlvItems.refreshComplete();
if (mDatas.size() >= issueSubBean.getTotal()) {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(true);
} else {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(false);
}
@Override
public void onNext(BuildingListBean issueSubBean) {
if (issueSubBean != null && issueSubBean.getRows() != null && issueSubBean.getRows().size() > 0) {
++mCurPage;
if (page == 1) {
mDatas.clear();
mDatas.addAll(issueSubBean.getRows());
} else {
if (page > 1) {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(true);
} else {
//无数据
mRlvItems.refreshComplete();
mRlvItems.setNoMore(true);
ToastUtils.showShort("暂无数据");
}
mDatas.addAll(issueSubBean.getRows());
}
mAdapter.notifyDataSetChanged();
mRlvItems.refreshComplete();
if (mDatas.size() >= issueSubBean.getTotal()) {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(true);
} else {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(false);
}
} else {
if (page > 1) {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(true);
} else {
//无数据
mRlvItems.refreshComplete();
mRlvItems.setNoMore(true);
ToastUtils.showShort("暂无数据");
}
}
}
@Override
public void onError(Throwable e) {
mRlvItems.refreshComplete();
mRlvItems.loadMoreComplete();
ExceptionHandler.handleException(e);
}
@Override
public void onError(Throwable e) {
mRlvItems.refreshComplete();
mRlvItems.loadMoreComplete();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
@Override
public void onComplete() {
}
});
}
});
}
@ -200,60 +192,60 @@ public class HouseManageFragment extends LazyFragment {
private void getHouse(int page) {
mCurPage = page;
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getHouse(mCurPage + "", "", "", UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BuildingListBean>() {
@Override
public void onSubscribe(Disposable d) {
.create(LocationApiService.class)
.getHouse(mCurPage + "", "", "", UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BuildingListBean>() {
@Override
public void onSubscribe(Disposable d) {
}
}
@Override
public void onNext(BuildingListBean issueSubBean) {
if (issueSubBean != null && issueSubBean.getRows() != null && issueSubBean.getRows().size() > 0) {
++mCurPage;
if (page == 1) {
mDatas.clear();
mDatas.addAll(issueSubBean.getRows());
} else {
mDatas.addAll(issueSubBean.getRows());
}
mAdapter.notifyDataSetChanged();
mRlvItems.refreshComplete();
if (mDatas.size() >= issueSubBean.getTotal()) {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(true);
} else {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(false);
}
@Override
public void onNext(BuildingListBean issueSubBean) {
if (issueSubBean != null && issueSubBean.getRows() != null && issueSubBean.getRows().size() > 0) {
++mCurPage;
if (page == 1) {
mDatas.clear();
mDatas.addAll(issueSubBean.getRows());
} else {
if (page > 1) {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(true);
} else {
//无数据
mRlvItems.refreshComplete();
mRlvItems.setNoMore(true);
ToastUtils.showShort("暂无数据");
}
mDatas.addAll(issueSubBean.getRows());
}
mAdapter.notifyDataSetChanged();
mRlvItems.refreshComplete();
if (mDatas.size() >= issueSubBean.getTotal()) {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(true);
} else {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(false);
}
} else {
if (page > 1) {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(true);
} else {
//无数据
mRlvItems.refreshComplete();
mRlvItems.setNoMore(true);
ToastUtils.showShort("暂无数据");
}
}
}
@Override
public void onError(Throwable e) {
mRlvItems.refreshComplete();
mRlvItems.loadMoreComplete();
ExceptionHandler.handleException(e);
}
@Override
public void onError(Throwable e) {
mRlvItems.refreshComplete();
mRlvItems.loadMoreComplete();
ExceptionHandler.handleException(e);
}
@Override
public void onComplete() {
@Override
public void onComplete() {
}
});
}
});
}

View File

@ -1,6 +1,7 @@
package com.sucstepsoft.realtimelocation.net;
import com.sucstepsoft.cm_utils.core.beans.AreaBean;
import com.sucstepsoft.realtimelocation.beans.AddressListBean;
import com.sucstepsoft.realtimelocation.beans.AreaListBean;
import com.sucstepsoft.realtimelocation.beans.BaseUserBean;
@ -11,6 +12,7 @@ import com.sucstepsoft.realtimelocation.beans.CaseFlowBean;
import com.sucstepsoft.realtimelocation.beans.CheckSignBean;
import com.sucstepsoft.realtimelocation.beans.CheckSignOffBean;
import com.sucstepsoft.realtimelocation.beans.CommunityBean;
import com.sucstepsoft.realtimelocation.beans.ConditionDicBean;
import com.sucstepsoft.realtimelocation.beans.DepartmentBean;
import com.sucstepsoft.realtimelocation.beans.DicBean;
import com.sucstepsoft.realtimelocation.beans.HousePersonListBean;
@ -1224,7 +1226,7 @@ public interface LocationApiService {
*/
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@GET("app/citybuilding/listpagecitybuilding")
Observable<BuildingListBean> getBuildingList(@Query("page") String page, @Query("keywords") String keywords, @Header("token") String token);
Observable<BuildingListBean> getBuildingList(@Query("page") String page, @Query("keywords") String keywords, @Query("districtId") String id, @Header("token") String token);
/**
* 获取房屋列表
@ -1392,7 +1394,89 @@ public interface LocationApiService {
@Query("politicalStatus") String political,
@Query("maritalStatus") String marry,
@Query("education") String edu,
@Query("otherPeopleType") String type,
@Header("token") String token);
/**
* 更新基础信息 标签 流动留守
*/
//
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@PUT("app/basepopulationinfo/update-other-people-type/{basePopulationInfoId}/{otherPeopleType}")
Observable<SuccessBean> doUpdateBasePerson(
@Path("basePopulationInfoId") String id,
@Path("otherPeopleType") String type,
@Header("token") String token);
/**
* 删除 特殊人群标签
*/
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@PUT("app/basepopulationinfo/delete-other-people-type/{basePopulationInfoId}/{otherPeopleType}")
Observable<SuccessBean> doDelBasePersonByType(
@Path("basePopulationInfoId") String id,
@Path("otherPeopleType") String type,
@Header("token") String token);
/**
* 名族筛选条件
*/
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@GET("app/sys-basic-info/release/list-population-info-nation-app")
Observable<List<ConditionDicBean>> getNationDic(@Header("token") String token);
/**
* 宗教筛选条件
*/
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@GET("app/sys-basic-info/release/list-population-info-religion-app")
Observable<List<ConditionDicBean>> getConditionReligion(@Header("token") String token);
/**
* 学历筛选条件
*/
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@GET("app/sys-basic-info/release/list-population-info-education-app")
Observable<List<ConditionDicBean>> getConditionEdu(@Header("token") String token);
/**
* 政治面貌
*/
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@GET("app/sys-basic-info/release/list-population-info-political-app")
Observable<List<ConditionDicBean>> getConditionPolitical(@Header("token") String token);
/**
* 婚姻状况
*/
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@GET("app/sys-basic-info/release/list-population-info-marital-app")
Observable<List<ConditionDicBean>> getConditionMarry(@Header("token") String token);
/**
* 获取街道社区列表
*/
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@GET("app/sys-basic-info/release/list-area-info-app")
Observable<List<AreaBean>> getConditionHouseList(@Query("areaParentId") String pId, @Header("token") String token);
/**
* 根据街道社区获取小区列表
*/
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
@GET("app/citydistrict/listpagecitydistrict")
Observable<CommunityListBean> getCommunityNewList(
@Query("page") String page,
@Query("areaId") String streetId,
@Query("communityId") String communityid,
@Query("keywords") String keywords,
@Header("token") String token);
/*===========================================工作日志===========================================*/
/**

View File

@ -0,0 +1,72 @@
package com.sucstepsoft.realtimelocation.widget;
import android.content.Context;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import com.sucstepsoft.cm_utils.core.beans.AreaBean;
import com.sucstepsoft.realtimelocation.R;
import com.sucstepsoft.realtimelocation.adapters.ConditionAreaAdapter;
import java.util.List;
import razerdp.basepopup.BasePopupWindow;
/**
* 作者: adam
* 日期: 2022/3/30 - 10:12 上午
* 邮箱: itgaojian@163.com
* 描述: 地区筛选
*/
public class ConditionAreaPopup extends BasePopupWindow {
private List<AreaBean> mDatas;
private final RecyclerView mRlvConditions;
private OnListPopupItemClickListener mOnListPopupItemClickListener;
public ConditionAreaPopup(Context context, List<AreaBean> data) {
super(context);
this.mDatas = data;
mRlvConditions = findViewById(R.id.rlv_conditions);
mRlvConditions.setLayoutManager(new LinearLayoutManager(context));
ConditionAreaAdapter adapter = new ConditionAreaAdapter(context, mDatas);
mRlvConditions.setAdapter(adapter);
adapter.addOnitemCheckChange((bean, isCheck, pos) -> {
if (isCheck) {
adapter.mSelBeans.clear();
adapter.mSelBeans.add(bean);
} else {
adapter.mSelBeans.remove(bean);
}
bean.setCheck(isCheck);
mOnListPopupItemClickListener.onItemClick(bean, isCheck, pos);
if (isCheck) {
if (true) {
for (int i = 0; i < adapter.getData().size(); i++) {
if (!adapter.getData().get(i).getAreaId().equals(bean.getAreaId())) {
adapter.getData().get(i).setCheck(false);
}
}
}
}
adapter.notifyDataSetChanged();
});
}
@Override
public View onCreateContentView() {
return createPopupById(R.layout.popup_condition_layout);
}
public OnListPopupItemClickListener getOnListPopupItemClickListener() {
return mOnListPopupItemClickListener;
}
public void setOnListPopupItemClickListener(OnListPopupItemClickListener onListPopupItemClickListener) {
mOnListPopupItemClickListener = onListPopupItemClickListener;
}
public interface OnListPopupItemClickListener {
void onItemClick(AreaBean bean, boolean isCheck, int pos);
}
}

View File

@ -7,6 +7,7 @@ import android.view.View;
import com.sucstepsoft.realtimelocation.R;
import com.sucstepsoft.realtimelocation.adapters.ConditionAdapter;
import com.sucstepsoft.realtimelocation.beans.ConditionDicBean;
import com.sucstepsoft.realtimelocation.beans.DicBean;
import java.util.List;
@ -20,11 +21,11 @@ import razerdp.basepopup.BasePopupWindow;
* 描述:
*/
public class ConditionPopup extends BasePopupWindow {
private List<DicBean> mDatas;
private List<ConditionDicBean> mDatas;
private final RecyclerView mRlvConditions;
private OnListPopupItemClickListener mOnListPopupItemClickListener;
public ConditionPopup(Context context, List<DicBean> data) {
public ConditionPopup(Context context, List<ConditionDicBean> data) {
super(context);
this.mDatas = data;
mRlvConditions = findViewById(R.id.rlv_conditions);
@ -43,7 +44,7 @@ public class ConditionPopup extends BasePopupWindow {
if (isCheck) {
if (true) {
for (int i = 0; i < adapter.getData().size(); i++) {
if (!adapter.getData().get(i).getDictionaryId().equals(bean.getDictionaryId())) {
if (!adapter.getData().get(i).getName().equals(bean.getName())) {
adapter.getData().get(i).setCheck(false);
}
}
@ -67,6 +68,6 @@ public class ConditionPopup extends BasePopupWindow {
}
public interface OnListPopupItemClickListener {
void onItemClick(DicBean bean, boolean isCheck, int pos);
void onItemClick(ConditionDicBean bean, boolean isCheck, int pos);
}
}

View File

@ -42,7 +42,7 @@
android:drawablePadding="10dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="正常人群"
android:text="一般群体"
android:textColor="@color/black"
android:textSize="18sp" />
@ -72,7 +72,8 @@
android:paddingBottom="8dp"
android:text="户籍信息"
android:textColor="@color/black"
android:textSize="18sp" />
android:textSize="18sp"
android:visibility="gone" />
<View
android:layout_width="match_parent"
@ -134,7 +135,7 @@
android:drawablePadding="10dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="特殊群"
android:text="特殊群"
android:textColor="@color/black"
android:textSize="18sp" />
@ -151,6 +152,116 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/tv_soldier"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:clickable="true"
android:drawableLeft="@drawable/ic_person_icon"
android:drawableRight="@drawable/ic_arrow_gray_right"
android:drawablePadding="10dp"
android:focusable="true"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="退伍军人"
android:textColor="@color/black"
android:textSize="18sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="center_horizontal"
android:background="@color/gray_bg" />
<TextView
android:id="@+id/tv_poor_5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:clickable="true"
android:drawableLeft="@drawable/ic_person_icon"
android:drawableRight="@drawable/ic_arrow_gray_right"
android:drawablePadding="10dp"
android:focusable="true"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="五保户"
android:textColor="@color/black"
android:textSize="18sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="center_horizontal"
android:background="@color/gray_bg" />
<TextView
android:id="@+id/tv_poor_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:clickable="true"
android:drawableLeft="@drawable/ic_person_icon"
android:drawableRight="@drawable/ic_arrow_gray_right"
android:drawablePadding="10dp"
android:focusable="true"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="低保户"
android:textColor="@color/black"
android:textSize="18sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="center_horizontal"
android:background="@color/gray_bg" />
<TextView
android:id="@+id/tv_handicapped"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:clickable="true"
android:drawableLeft="@drawable/ic_person_icon"
android:drawableRight="@drawable/ic_arrow_gray_right"
android:drawablePadding="10dp"
android:focusable="true"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="残疾人"
android:textColor="@color/black"
android:textSize="18sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="center_horizontal"
android:background="@color/gray_bg" />
<TextView
android:id="@+id/tv_petition"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:clickable="true"
android:drawableLeft="@drawable/ic_person_icon"
android:drawableRight="@drawable/ic_arrow_gray_right"
android:drawablePadding="10dp"
android:focusable="true"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="重点信访户"
android:textColor="@color/black"
android:textSize="18sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="center_horizontal"
android:background="@color/gray_bg" />
<TextView
android:id="@+id/tv_crime"
android:layout_width="match_parent"

View File

@ -0,0 +1,26 @@
<?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:orientation="vertical">
<TextView
android:id="@+id/tv_community_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:padding="8dp"
android:textColor="@color/black"
android:textSize="@dimen/text_16"
android:textStyle="bold"
tools:text="街道名称 >> 社区名称 >> 小区名称" />
<com.jcodecraeer.xrecyclerview.XRecyclerView
android:id="@+id/rlv_items"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv_community_name"
tools:layoutManager="LinearLayoutManager"
tools:listitem="@layout/item_house" />
</RelativeLayout>

View File

@ -0,0 +1,25 @@
<?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:orientation="vertical">
<TextView
android:id="@+id/tv_community_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:padding="8dp"
android:textColor="@color/black"
android:textSize="@dimen/text_16"
tools:text="街道名称 >> 社区名称 >> 小区名称 >> 楼宇编号" />
<com.jcodecraeer.xrecyclerview.XRecyclerView
android:id="@+id/rlv_items"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv_community_name"
tools:layoutManager="LinearLayoutManager"
tools:listitem="@layout/item_house" />
</RelativeLayout>

View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="5dp">
<TextView
android:id="@+id/tv_street"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:clickable="true"
android:drawableRight="@drawable/ic_arrow_sort_gray"
android:focusable="true"
android:gravity="center"
android:maxLines="1"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="街道"
android:textColor="@color/black"
android:textSize="14sp" />
<View
android:layout_width="1dp"
android:layout_height="15dp"
android:background="@color/gray_line" />
<TextView
android:id="@+id/tv_community"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:clickable="true"
android:drawableRight="@drawable/ic_arrow_sort_gray"
android:focusable="true"
android:gravity="center"
android:maxLines="1"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:text="社区"
android:textColor="@color/black"
android:textSize="14sp" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/ll_condition"
android:layout_marginTop="5dp">
<com.jcodecraeer.xrecyclerview.XRecyclerView
android:id="@+id/xlv_content"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<LinearLayout
android:id="@+id/ll_page_empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_page_empty"
android:layout_width="70dp"
android:layout_height="70dp"
android:src="@drawable/ic_empty_data" />
<ProgressBar
android:id="@+id/pb_page_loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminateBehavior="repeat"
android:indeterminateDrawable="@drawable/anim_loading" />
<TextView
android:id="@+id/tv_page_hint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="暂无数据"
android:textColor="@color/gray_text" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView 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:orientation="vertical"
android:overScrollMode="never"
android:scrollbars="none"
tools:context=".activitys.census.CensusEnterActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include layout="@layout/layout_search" />
<include layout="@layout/layout_base_info" />
<LinearLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<Button
android:id="@+id/btn_confirm"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:background="@drawable/sel_btn_submit"
android:minHeight="0dp"
android:padding="10dp"
android:text="添&#160;&#160;&#160;&#160;加"
android:textColor="@color/white"
android:textSize="17sp" />
</LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>

View File

@ -0,0 +1,168 @@
<?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">
<LinearLayout
android:id="@+id/ll_condition"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="5dp">
<TextView
android:id="@+id/tv_nation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:clickable="true"
android:drawableRight="@drawable/ic_arrow_sort_gray"
android:focusable="true"
android:gravity="center"
android:maxLines="1"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:text="民族"
android:textColor="@color/black"
android:textSize="12sp" />
<View
android:layout_width="1dp"
android:layout_height="15dp"
android:background="@color/gray_line" />
<TextView
android:id="@+id/tv_faith"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:clickable="true"
android:drawableRight="@drawable/ic_arrow_sort_gray"
android:focusable="true"
android:gravity="center"
android:maxLines="1"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:text="宗教信仰"
android:textColor="@color/black"
android:textSize="12sp" />
<View
android:layout_width="1dp"
android:layout_height="15dp"
android:background="@color/gray_line" />
<TextView
android:id="@+id/tv_political"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:clickable="true"
android:drawableRight="@drawable/ic_arrow_sort_gray"
android:focusable="true"
android:gravity="center"
android:maxLines="1"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:text="政治面貌"
android:textColor="@color/black"
android:textSize="12sp" />
<View
android:layout_width="1dp"
android:layout_height="15dp"
android:background="@color/gray_line" />
<TextView
android:id="@+id/tv_marr"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:clickable="true"
android:drawableRight="@drawable/ic_arrow_sort_gray"
android:focusable="true"
android:gravity="center"
android:maxLines="1"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:text="婚姻情况"
android:textColor="@color/black"
android:textSize="12sp" />
<View
android:layout_width="1dp"
android:layout_height="15dp"
android:background="@color/gray_line" />
<TextView
android:id="@+id/tv_edu"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:clickable="true"
android:drawableRight="@drawable/ic_arrow_sort_gray"
android:focusable="true"
android:gravity="center"
android:maxLines="1"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:text="学历"
android:textColor="@color/black"
android:textSize="12sp" />
</LinearLayout>
<include layout="@layout/item_search" />
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/ll_condition"
android:layout_marginTop="5dp">
<com.jcodecraeer.xrecyclerview.XRecyclerView
android:id="@+id/xlv_content"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:id="@+id/ll_page_empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/iv_page_empty"
android:layout_width="70dp"
android:layout_height="70dp"
android:src="@drawable/ic_empty_data" />
<ProgressBar
android:id="@+id/pb_page_loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminateBehavior="repeat"
android:indeterminateDrawable="@drawable/anim_loading" />
<TextView
android:id="@+id/tv_page_hint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="暂无数据"
android:textColor="@color/gray_text" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>

View File

@ -0,0 +1,14 @@
<?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:orientation="vertical">
<com.jcodecraeer.xrecyclerview.XRecyclerView
android:id="@+id/rlv_items"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layoutManager="LinearLayoutManager"
tools:listitem="@layout/item_house" />
</RelativeLayout>

View File

@ -0,0 +1,14 @@
<?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:orientation="vertical">
<com.jcodecraeer.xrecyclerview.XRecyclerView
android:id="@+id/rlv_items"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layoutManager="LinearLayoutManager"
tools:listitem="@layout/item_house" />
</RelativeLayout>

View File

@ -0,0 +1,14 @@
<?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:orientation="vertical">
<com.jcodecraeer.xrecyclerview.XRecyclerView
android:id="@+id/rlv_items"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layoutManager="LinearLayoutManager"
tools:listitem="@layout/item_house" />
</RelativeLayout>

View File

@ -0,0 +1,88 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:background="@drawable/shape_rectangle_white"
android:orientation="vertical"
android:padding="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/tv_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#ff353535"
android:textSize="18sp"
tools:text="姓名" />
<TextView
android:id="@+id/tv_native"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@color/black"
android:textSize="12sp"
tools:text="籍贯" />
<TextView
android:id="@+id/tv_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@color/black"
android:textSize="12sp"
tools:text="联系电话" />
</LinearLayout>
<Button
android:id="@+id/btn_del"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/sel_btn_submit"
android:minWidth="0dp"
android:minHeight="0dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:text="删除"
android:textColor="@color/white" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_marginTop="5dp"
android:background="@drawable/shp_line_dotted"
android:layerType="software" />
<TextView
android:id="@+id/tv_location"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:drawableLeft="@drawable/ic_location_blue"
android:drawablePadding="5dp"
android:ellipsize="end"
android:maxLines="2"
android:textColor="#ff1189ff"
android:textSize="12sp"
tools:text="中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067(包哈公里)" />
</LinearLayout>

View File

@ -13,7 +13,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:defaultItemCount="3"
app:defaultItemCount="6"
app:expandText="点击展开"
app:hideText="点击收起"
app:useDefaultBottom="true">

View File

@ -77,17 +77,20 @@ public class PathConfig {
public static final String DIC_GROUP = "b30da878-2576-4e70-8a39-4eeee5ad9983";//小组组成
public static final String DEFAULT_AREA_CODE = "0";//地区
public static final String APP_VERSION_ID = "402e60d8-8270-4bb9-8850-83d30a39a53f";/* 包头版本一 */
// public static final String APP_VERSION_ID = "791e93a9-609f-4867-b5bb-5ab522825c5d";/* 包头测试 */
// public static final String APP_VERSION_ID = "402e60d8-8270-4bb9-8850-83d30a39a53f";/* 包头版本一 */
// public static final String APP_VERSION_ID = "f5bb95d4-b65b-4361-9abd-c7098ea50e0b";/* 演示版本一 */
public static final String APP_VERSION_ID = "791e93a9-609f-4867-b5bb-5ab522825c5d";/* 包头测试 */
// public static final String APP_VERSION_ID = "04f35ca3-a269-445a-b39f-9146c9b6bfde";/*集宁*/
//包头坐标 109.926934,40.574501
//呼市坐标 40.823879 111.771815
public static final double LA = 40.574501;
public static final double LO = 109.926934;
// public static final double LA = 40.984219;
// public static final double LO = 113.0972;
//演示坐标
// public static final double LA = 44.570948;
// public static final double LO = 120.923725;
//呼市坐标 40.823879 111.771815
//public static final double LA = 40.984219;
//public static final double LO = 113.0972;
//113.0972,40.984219 集宁区环保
/*============Socket信息码====================*/
public static final int MSG_REGISTER = 100;
@ -100,8 +103,9 @@ public class PathConfig {
public static final int MSG_NOTICE_GROUP = 107;
public static final int MSG_NOTICE_TARGET = 108;
public static final int MSG_SEND_STATUS = 1100;
public static final String mDefaultCityCode = "229";//TODO 包头 229
// public static final String mDefaultCityCode = "321";//TODO 呼和浩特 321
// public static final String mDefaultCityCode = "229";//TODO 包头 229
public static final boolean IS_LIMIT = false;//是否判断城市代码
public static final String mDefaultCityCode = "321";//TODO 呼和浩特 321
// public static final String mDefaultCityCode = "168";//TODO 乌兰察布 168
// 区直领导b01dac8e-c516-4974-b513-f1352ca40202
// 片长e483f019-d971-49ac-b5fa-3314220da703
@ -112,6 +116,8 @@ public class PathConfig {
public static final String VIDEO_PATH = File.separator + PROJECT_NAME + File.separator + "videoCache" + File.separator;
public static final String PROJECT_CATCH_PATH = Environment.getExternalStorageDirectory().getPath() + File.separator + PROJECT_NAME;//项目缓存目录
public static final String IDENTITY_FILE = VIDEO_PATH + "identity.txt";
public static final String DIC_STREET_ID = "752234";//街道 pId
/**
* ====================================主模块===================================
*/

View File

@ -46,6 +46,16 @@ public class AreaBean implements IPickerViewData {
private String areaShortName;
private String areaZipCode;
private boolean parent;
private boolean isCheck;
public boolean isCheck() {
return isCheck;
}
public void setCheck(boolean check) {
isCheck = check;
}
/**
* areaCityCode :
* areaCode :

View File

@ -9,18 +9,22 @@ import com.sucstepsoft.cm_utils.constant.PathConfig;
*/
public class BaseUrlApi {
public static final String IP = "http://219.147.99.164:8082/usercenter/"; /*正式统一用户*/
// public static final String IP = "http://192.168.0.109:7001/usercenter/"; /*测试统一用户*/
// public static final String IP = "http://219.147.99.164:8082/usercenter/"; /*正式统一用户*/
public static final String IP = "http://192.168.0.109:7001/usercenter/"; /*测试统一用户*/
// public static final String IP = "http://175.24.42.217:7000/usercenter/"; /*测试统一用户*/
public static final String BASE_URL = IP;
public static final String APP_VERSION = BASE_URL + "appCmVersionManagement/getAppVersion";
public static final String PRISON_PLAN = BASE_URL + "appPlan/goPlan";
public static final String FIELD_SAFETY = BASE_URL + "appFieldSafety/goFloorPlan";
public static final int PHOTO_REQUEST = 233;
public static final int CAMERA_REQUEST = 123;
public static final String BASE_IP_P = "http://219.147.99.164:8082/"; /*正式IP*/
// public static final String BASE_IP_P = "http://192.168.0.109:8080/"; /*测试IP*/
// public static final String BASE_IP_P = "http://219.147.99.164:8082/"; /*正式IP*/
// public static final String BASE_IP_P = "http://175.24.42.217"; /*演示IP*/
public static final String BASE_IP_P = "http://192.168.0.109:8080/"; /*测试IP*/
public static final String BASE_IP = BASE_IP_P + "servicecity/";/*网格系统*/
// public static final String BASE_IP = BASE_IP_P + ":7001/servicecity/";/*演示网格系统*/
public static final String BASE_POPULATION_IP = BASE_IP_P + "population/";/*人口系统*/
// public static final String BASE_POPULATION_IP = BASE_IP_P + ":7002/population/";/*人口系统*/
public static final String BASE_IMG_URL = BASE_IP + "route/file/downloadfile/true/";
public static final String SOCKET_IP = BASE_IP_P + "social/appws";/*SocketIP*/

View File

@ -117,11 +117,16 @@ public class CenterChooseAreaDialogView extends Dialog {
private List<AreaBean> mArea3List;
private List<AreaBean> mArea4List;
private List<AreaBean> mArea5List;
private String mSelArea3 = "752234";
private String mSelArea4;
private String mSelArea5;
//演示系统-扎鲁特旗
// private String mSelCode = "150526000000";
// private String mSelArea3 = "106746";
// private String mSelId = "106746";
private String mSelArea4;
//正式包头
private String mSelCode = "150271000000";
private String mSelId = "752234";
private String mSelArea3 = "752234";
/**

View File

@ -66,6 +66,10 @@
android:id="@+id/tv_area3"
style="@style/sel_text_arrow"
android:text="包头稀土高新技术产业开发区"/>
<!-- <TextView-->
<!-- android:id="@+id/tv_area3"-->
<!-- style="@style/sel_text_arrow"-->
<!-- android:text="扎鲁特旗"/>-->
</LinearLayout>
<LinearLayout style="@style/item_gray">

View File

@ -32,70 +32,12 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="户籍人口"
android:text="人口信息"
android:textColor="@color/black"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_build"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@drawable/shp_rectangle_gray"
android:gravity="center"
android:orientation="vertical"
android:padding="10dp">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/ic_build" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="房屋管理"
android:textColor="@color/black"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/ll_hire"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@drawable/shp_rectangle_gray"
android:gravity="center"
android:orientation="vertical"
android:padding="10dp">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/ic_hire" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="出租房"
android:textColor="@color/black"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_outbound"
@ -125,6 +67,7 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -183,4 +126,63 @@
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/ll_build"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@drawable/shp_rectangle_gray"
android:gravity="center"
android:orientation="vertical"
android:padding="10dp">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/ic_build" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="房屋管理"
android:textColor="@color/black"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_hire"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_weight="1"
android:background="@drawable/shp_rectangle_gray"
android:gravity="center"
android:orientation="vertical"
android:padding="10dp"
android:visibility="gone">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/ic_hire" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="出租房"
android:textColor="@color/black"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>