人口、房屋
@ -49,3 +49,11 @@
|
||||
1.请假 类型跟换数据字典 添加上传假条
|
||||
|
||||
```
|
||||
|
||||
## 2023-11-16
|
||||
```
|
||||
> 1.5.0
|
||||
|
||||
1.人口房屋录入
|
||||
|
||||
```
|
||||
|
@ -48,6 +48,22 @@
|
||||
android:theme="@style/AppTheme"
|
||||
android:usesCleartextTraffic="true"
|
||||
tools:ignore="GoogleAppIndexingWarning">
|
||||
<activity
|
||||
android:name=".activitys.census.newhouse.activitys.NewRuleHouseAddActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden"
|
||||
tools:ignore="LockedOrientationActivity" />
|
||||
|
||||
<activity
|
||||
android:name=".activitys.census.normal.CensusClaimListActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden"
|
||||
tools:ignore="LockedOrientationActivity" />
|
||||
<activity
|
||||
android:name=".activitys.census.newhouse.activitys.NewGroupHouseAddActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden"
|
||||
tools:ignore="LockedOrientationActivity" />
|
||||
<activity
|
||||
android:name=".activitys.census.newhouse.activitys.NewHireHouseDetailActivity"
|
||||
android:screenOrientation="portrait"
|
||||
|
@ -40,7 +40,6 @@ import com.sucstepsoft.cm_utils.core.network.update.CheckUpdateUtils;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.CenterFuncDialogView;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.CustomStateView;
|
||||
import com.sucstepsoft.cm_utils.utils.AppUtils;
|
||||
@ -55,12 +54,12 @@ import com.sucstepsoft.realtimelocation.R;
|
||||
import com.sucstepsoft.realtimelocation.ScreenManager;
|
||||
import com.sucstepsoft.realtimelocation.activitys.addresslist.AddressListMainActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.hire.CensusHireListActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.house.SearchHouseByPersonActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.house.SearchPersonByHouseActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys.BuildingViewPageActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys.NewHouseManageActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys.NewGroupHouseAddActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys.NewRuleHouseAddActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.normal.CensusClaimListActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.normal.CensusRegisterListActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.outbound.CensusOutboundListActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.common.WorkSignActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.issue.IssueCheckActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.issue.IssueMineActivity;
|
||||
@ -76,7 +75,6 @@ import com.sucstepsoft.realtimelocation.activitys.notice.NoticeActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.notice.NoticeDetailActivity;
|
||||
import com.sucstepsoft.realtimelocation.adapters.FunctionNumAdapter;
|
||||
import com.sucstepsoft.realtimelocation.adapters.NewNoticeAdapter;
|
||||
import com.sucstepsoft.realtimelocation.adapters.NoticeAdapter;
|
||||
import com.sucstepsoft.realtimelocation.beans.AppTokenUser;
|
||||
import com.sucstepsoft.realtimelocation.beans.BaseUserBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.CheckSignBean;
|
||||
@ -468,22 +466,23 @@ public class MainActivity extends BaseActivity {
|
||||
build.addOnChoseListener(new CenterFuncDialogView.OnChoseListener() {
|
||||
@Override
|
||||
public void choseFile() {
|
||||
//境外人员
|
||||
startActivity(new Intent(mActivity, CensusOutboundListActivity.class));
|
||||
//人口认领
|
||||
startActivity(new Intent(mActivity, CensusClaimListActivity.class));
|
||||
build.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void choseAlbum() {
|
||||
//户籍人口
|
||||
//人口
|
||||
startActivity(new Intent(mActivity, CensusRegisterListActivity.class));
|
||||
build.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void choseShoot() {
|
||||
//出租
|
||||
startActivity(new Intent(mActivity, CensusHireListActivity.class));
|
||||
//规则房屋录入
|
||||
|
||||
startActivity(new Intent(mActivity, NewRuleHouseAddActivity.class));
|
||||
build.dismiss();
|
||||
}
|
||||
|
||||
@ -499,11 +498,13 @@ public class MainActivity extends BaseActivity {
|
||||
build.dismiss();
|
||||
}
|
||||
|
||||
//以人找房
|
||||
@Override
|
||||
public void searchPerson() {
|
||||
startActivity(new Intent(mActivity, SearchHouseByPersonActivity.class));
|
||||
//不规则房屋录入
|
||||
startActivity(new Intent(mActivity, NewGroupHouseAddActivity.class));
|
||||
build.dismiss();
|
||||
// startActivity(new Intent(mActivity, SearchHouseByPersonActivity.class));
|
||||
// build.dismiss();
|
||||
}
|
||||
|
||||
//以房找人
|
||||
|
@ -172,11 +172,12 @@ public class NewCommunityDetailActivity extends BaseActivity {
|
||||
}
|
||||
mPhotoAdapter.setData(mPhotos);
|
||||
}
|
||||
if (UserLgUtils.getUserId().equals(bean.getCreator())) {
|
||||
mLlBtns.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mLlBtns.setVisibility(View.GONE);
|
||||
}
|
||||
// if (UserLgUtils.getUserId().equals(bean.getCreator())) {
|
||||
// mLlBtns.setVisibility(View.VISIBLE);
|
||||
// } else {
|
||||
//
|
||||
// }
|
||||
mLlBtns.setVisibility(View.GONE);
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentStatePagerAdapter;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.view.View;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.LazyFragment;
|
||||
@ -35,8 +36,8 @@ public class BuildingViewPageActivity extends BaseActivity {
|
||||
ViewPager mVpContent;
|
||||
|
||||
private Unbinder mBind;
|
||||
// private String[] mTitles = new String[]{"小区", "楼/排", "房屋"};
|
||||
private String[] mTitles = new String[]{"小区", "楼/排", "房屋", "出租房"};
|
||||
private String[] mTitles = new String[]{"小区", "楼/排", "房屋"};
|
||||
// private String[] mTitles = new String[]{"小区", "楼/排", "房屋", "出租房"};
|
||||
private List<LazyFragment> mFragments = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
@ -49,22 +50,41 @@ public class BuildingViewPageActivity extends BaseActivity {
|
||||
ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("房屋管理");
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mTvPublish.setVisibility(ViewPager.VISIBLE);
|
||||
mTvPublish.setText("新增");
|
||||
CommunityManageFragment communityFragment = new CommunityManageFragment();
|
||||
BuildingManageFragment buildingManageFragment = new BuildingManageFragment();
|
||||
HouseManageNewFragment houseManageNewFragment = new HouseManageNewFragment();
|
||||
HireHouseManageFragment hireHouseManageFragment = new HireHouseManageFragment();
|
||||
// HireHouseManageFragment hireHouseManageFragment = new HireHouseManageFragment();
|
||||
mFragments.add(communityFragment);
|
||||
mFragments.add(buildingManageFragment);
|
||||
mFragments.add(houseManageNewFragment);
|
||||
mFragments.add(hireHouseManageFragment);
|
||||
|
||||
// mFragments.add(hireHouseManageFragment);
|
||||
mTvPublish.setVisibility(View.GONE);
|
||||
VpNoticeAdapter adapter = new VpNoticeAdapter(getSupportFragmentManager());
|
||||
mVpContent.setAdapter(adapter);
|
||||
mTablayout.setxTabDisplayNum(4);
|
||||
mTablayout.setxTabDisplayNum(3);
|
||||
mTablayout.setupWithViewPager(mVpContent);
|
||||
mTvPublish.setOnClickListener(v -> onAddPage());
|
||||
mVpContent.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||
@Override
|
||||
public void onPageScrolled(int i, float v, int i1) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int i) {
|
||||
if (i == 2 || i == 3) {
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mTvPublish.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int i) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,24 +1,34 @@
|
||||
package com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
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.google.android.flexbox.FlexDirection;
|
||||
import com.google.android.flexbox.FlexWrap;
|
||||
import com.google.android.flexbox.FlexboxLayoutManager;
|
||||
import com.google.gson.Gson;
|
||||
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.TimeUtils;
|
||||
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.normal.CensusRegisterAddActivity;
|
||||
import com.sucstepsoft.realtimelocation.adapters.PersonBaseHouseLiveSelAdapter;
|
||||
import com.sucstepsoft.realtimelocation.adapters.SelectedHousePersonAdapter;
|
||||
import com.sucstepsoft.realtimelocation.beans.SaveBindLiveHousePerson;
|
||||
import com.sucstepsoft.realtimelocation.beans.SuccessBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.PersonBaseListBean;
|
||||
@ -68,6 +78,14 @@ public class HouseLivePersonBindActivity extends BaseActivity {
|
||||
Button mBtnConfirm;
|
||||
@BindView(R.id.ll_content)
|
||||
LinearLayout mLlContent;
|
||||
@BindView(R.id.rlv_select)
|
||||
RecyclerView mRlvSelect;
|
||||
@BindView(R.id.ll_person)
|
||||
LinearLayout mLlPerson;
|
||||
@BindView(R.id.ll_single)
|
||||
LinearLayout mLlSingle;
|
||||
@BindView(R.id.tv_hint)
|
||||
TextView mTvHint;
|
||||
private Unbinder mBind;
|
||||
private String mId;//房屋ID
|
||||
private String mKeywords = "";
|
||||
@ -75,6 +93,8 @@ public class HouseLivePersonBindActivity extends BaseActivity {
|
||||
private PersonBaseHouseLiveSelAdapter mAdapter;
|
||||
private List<PersonBaseListBean.RowsBean> mDatas = new ArrayList<>();
|
||||
private PersonBaseListBean.RowsBean mSelBean;
|
||||
private ArrayList<PersonBaseListBean.RowsBean> mSelBeans;
|
||||
private SelectedHousePersonAdapter mSelAdapter;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
@ -88,11 +108,13 @@ public class HouseLivePersonBindActivity extends BaseActivity {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mId = getIntent().getStringExtra("id");
|
||||
if (TextUtils.isEmpty(mId)) {
|
||||
ToastUtils.showShort("数据有误");
|
||||
finish();
|
||||
mLlSingle.setVisibility(View.GONE);
|
||||
mLlPerson.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
initPersonList();
|
||||
mLlSingle.setVisibility(View.VISIBLE);
|
||||
mLlPerson.setVisibility(View.GONE);
|
||||
}
|
||||
initPersonList();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -105,12 +127,71 @@ public class HouseLivePersonBindActivity extends BaseActivity {
|
||||
mEtSearchIdCard.setText("");
|
||||
refreshData();
|
||||
});
|
||||
//选择
|
||||
FlexboxLayoutManager manage = new FlexboxLayoutManager(mActivity, FlexDirection.ROW, FlexWrap.WRAP) {
|
||||
@Override
|
||||
public boolean canScrollHorizontally() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
mSelBeans = new ArrayList<>();
|
||||
mSelAdapter = new SelectedHousePersonAdapter(mActivity, mSelBeans);
|
||||
mRlvSelect.setLayoutManager(manage);
|
||||
mRlvSelect.setAdapter(mSelAdapter);
|
||||
mSelAdapter.addOnDelListener((bean, pos) -> {
|
||||
for (PersonBaseListBean.RowsBean p : mDatas) {
|
||||
if (p.getPopulationInfoId().equals(bean.getPopulationInfoId())) {
|
||||
p.setCheck(false);
|
||||
}
|
||||
}
|
||||
mSelBeans.remove(bean);
|
||||
mSelAdapter.setData(mSelBeans);
|
||||
mAdapter.setData(mDatas);
|
||||
if (mSelBeans.size() == 0) {
|
||||
mTvHint.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mTvHint.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
mAdapter = new PersonBaseHouseLiveSelAdapter(mActivity, mDatas);
|
||||
LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity);
|
||||
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
|
||||
mXrlvContent.setLayoutManager(layoutManager);
|
||||
mXrlvContent.setAdapter(mAdapter);
|
||||
mAdapter.addOnItemClickListener(bean -> doSetCheckBean(bean));
|
||||
mAdapter.addOnitemCheckChange((bean, isCheck, pos) -> {
|
||||
if (TextUtils.isEmpty(mId)) {
|
||||
if (isCheck) {
|
||||
mSelBeans.add(bean);
|
||||
} else {
|
||||
mSelBeans.remove(bean);
|
||||
}
|
||||
mSelAdapter.setData(mSelBeans);
|
||||
bean.setCheck(isCheck);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
if (mSelBeans.size() == 0) {
|
||||
mTvHint.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mTvHint.setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
//单选
|
||||
mSelBean = bean;
|
||||
mEtName.setText(bean.getName());
|
||||
mEtIdCard.setText(bean.getIdcard());
|
||||
mEtPhone.setText(bean.getPhone());
|
||||
for (int i = 0; i < mDatas.size(); i++) {
|
||||
if (mDatas.get(i).getPopulationInfoId().equals(bean.getPopulationInfoId())) {
|
||||
mDatas.get(i).setCheck(true);
|
||||
|
||||
} else {
|
||||
mDatas.get(i).setCheck(false);
|
||||
}
|
||||
}
|
||||
mAdapter.setData(mDatas);
|
||||
}
|
||||
});
|
||||
mXrlvContent.setRefreshProgressStyle(ProgressStyle.BallGridBeat);
|
||||
mXrlvContent.setLoadingMoreProgressStyle(ProgressStyle.Pacman);
|
||||
mXrlvContent.setPullRefreshEnabled(true);
|
||||
@ -126,10 +207,86 @@ public class HouseLivePersonBindActivity extends BaseActivity {
|
||||
getPersonList(mCurPage);
|
||||
}
|
||||
});
|
||||
mBtnConfirm.setOnClickListener(v -> doSubmit());
|
||||
mBtnConfirm.setOnClickListener(v -> doConfirm());
|
||||
getPersonList(mCurPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交
|
||||
*/
|
||||
private void doConfirm() {
|
||||
if (!TextUtils.isEmpty(mId)) {
|
||||
if (mSelBean == null) {
|
||||
ToastUtils.showShort("请选择人员");
|
||||
} else {
|
||||
getPersonInfo(mSelBean.getPopulationInfoId());
|
||||
}
|
||||
} else {
|
||||
if (mSelBeans == null || mSelBeans.size() <= 0) {
|
||||
ToastUtils.showShort("请选择人员");
|
||||
} else {
|
||||
String ids = "";
|
||||
for (int i = 0; i < mSelBeans.size(); i++) {
|
||||
ids += mSelBeans.get(i).getPopulationInfoId() + "_";
|
||||
}
|
||||
if (ids.endsWith("_")) {
|
||||
ids = ids.substring(0, ids.length() - 1);
|
||||
}
|
||||
getPersonInfo(ids);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取未脱敏的信息
|
||||
*/
|
||||
private void getPersonInfo(String id) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getListByIds(id, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<PersonBaseListBean.RowsBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<PersonBaseListBean.RowsBean> rowsBeans) {
|
||||
dialog.dismiss();
|
||||
if (rowsBeans != null && rowsBeans.size() > 0) {
|
||||
if (!TextUtils.isEmpty(mId)) {
|
||||
mSelBean = rowsBeans.get(0);
|
||||
doSubmit();
|
||||
} else {
|
||||
mSelBeans = new ArrayList<>(rowsBeans);
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("beans", mSelBeans);
|
||||
setResult(RESULT_OK, intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
} else {
|
||||
ToastUtils.showShort("未查询到人员信息");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置选中的Bean
|
||||
@ -137,18 +294,43 @@ public class HouseLivePersonBindActivity extends BaseActivity {
|
||||
* @param bean
|
||||
*/
|
||||
private void doSetCheckBean(PersonBaseListBean.RowsBean bean) {
|
||||
mSelBean = bean;
|
||||
mEtName.setText(bean.getName());
|
||||
mEtIdCard.setText(bean.getIdcard());
|
||||
mEtPhone.setText(bean.getPhone());
|
||||
for (int i = 0; i < mDatas.size(); i++) {
|
||||
if (mDatas.get(i).getPopulationInfoId().equals(bean.getPopulationInfoId())) {
|
||||
mDatas.get(i).setCheck(true);
|
||||
if (!TextUtils.isEmpty(mId)) {
|
||||
mSelBean = bean;
|
||||
mEtName.setText(bean.getName());
|
||||
mEtIdCard.setText(bean.getIdcard());
|
||||
mEtPhone.setText(bean.getPhone());
|
||||
for (int i = 0; i < mDatas.size(); i++) {
|
||||
if (mDatas.get(i).getPopulationInfoId().equals(bean.getPopulationInfoId())) {
|
||||
mDatas.get(i).setCheck(true);
|
||||
|
||||
} else {
|
||||
mDatas.get(i).setCheck(false);
|
||||
}
|
||||
}
|
||||
mAdapter.setData(mDatas);
|
||||
} else {
|
||||
//多选
|
||||
boolean isExist = false;
|
||||
for (int i = 0; i < mSelBeans.size(); i++) {
|
||||
if (mSelBeans.get(i).getPopulationInfoId().equals(bean.getPopulationInfoId())) {
|
||||
isExist = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isExist) {
|
||||
mSelBeans.remove(bean);
|
||||
} else {
|
||||
mDatas.get(i).setCheck(false);
|
||||
mSelBeans.add(bean);
|
||||
}
|
||||
mSelAdapter.setData(mSelBeans);
|
||||
for (int i = 0; i < mDatas.size(); i++) {
|
||||
for (int j = 0; j < mSelBeans.size(); j++) {
|
||||
if (mDatas.get(i).getPopulationInfoId().equals(mSelBeans.get(j).getPopulationInfoId())) {
|
||||
mDatas.get(i).setCheck(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mAdapter.setData(mDatas);
|
||||
}
|
||||
|
||||
private void refreshData() {
|
||||
@ -189,6 +371,16 @@ public class HouseLivePersonBindActivity extends BaseActivity {
|
||||
public void onNext(PersonBaseListBean leaveListBean) {
|
||||
if (leaveListBean != null && leaveListBean.getRows() != null && leaveListBean.getRows().size() > 0) {
|
||||
++mCurPage;
|
||||
if (TextUtils.isEmpty(mId)) {
|
||||
for (int i = 0; i < mSelBeans.size(); i++) {
|
||||
PersonBaseListBean.RowsBean rowsBean = mSelBeans.get(i);
|
||||
for (int j = 0; j < leaveListBean.getRows().size(); j++) {
|
||||
if (rowsBean.getPopulationInfoId().equals(leaveListBean.getRows().get(j).getPopulationInfoId())) {
|
||||
leaveListBean.getRows().get(j).setCheck(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (page == 1) {
|
||||
mDatas.clear();
|
||||
mDatas.addAll(leaveListBean.getRows());
|
||||
@ -222,6 +414,7 @@ public class HouseLivePersonBindActivity extends BaseActivity {
|
||||
//无数据
|
||||
} else {
|
||||
ToastUtils.showShort("未查询到相关内容");
|
||||
showAddAlter();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -239,6 +432,33 @@ public class HouseLivePersonBindActivity extends BaseActivity {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 没有搜索到人员,提示新增
|
||||
*/
|
||||
private void showAddAlter() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
|
||||
builder.setTitle("提示")
|
||||
.setMessage("未搜索到该人员信息,现在要去新增吗?")
|
||||
.setPositiveButton("确定", (dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
Intent intent = new Intent(mActivity, CensusRegisterAddActivity.class);
|
||||
intent.putExtra("title", "基础信息录入");
|
||||
startActivityForResult(intent, 12345);
|
||||
})
|
||||
.setNegativeButton("取消", (dialog, which) -> dialog.dismiss())
|
||||
.create()
|
||||
.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
if (resultCode == RESULT_OK) {
|
||||
if (requestCode == 12345) {
|
||||
doSearch();
|
||||
}
|
||||
}
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交参数
|
||||
@ -264,8 +484,8 @@ public class HouseLivePersonBindActivity extends BaseActivity {
|
||||
public void onNext(@NonNull SuccessBean successBean) {
|
||||
dialog.dismiss();
|
||||
ToastUtils.showShort("保存成功");
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
showConfirmDialog();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -282,19 +502,43 @@ public class HouseLivePersonBindActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 继续绑定
|
||||
*/
|
||||
private void showConfirmDialog() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
|
||||
builder.setTitle("提示")
|
||||
.setMessage("需要继续添加入住人员吗?")
|
||||
.setPositiveButton("确定", (dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
for (int i = 0; i < mDatas.size(); i++) {
|
||||
if (mSelBean.getPopulationInfoId().equals(mDatas.get(i).getPopulationInfoId())) {
|
||||
mDatas.get(i).setCheck(false);
|
||||
}
|
||||
}
|
||||
mAdapter.setData(mDatas);
|
||||
mSelBean = null;
|
||||
mEtName.setText("");
|
||||
mEtPhone.setText("");
|
||||
mEtIdCard.setText("");
|
||||
})
|
||||
.setNegativeButton("取消", (dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
})
|
||||
.create()
|
||||
.show();
|
||||
}
|
||||
|
||||
private RequestBody buildParams() {
|
||||
SaveBindLiveHousePerson bean = new SaveBindLiveHousePerson();
|
||||
String name = mEtName.getText().toString().trim();
|
||||
bean.setName(name);
|
||||
String phone = mEtPhone.getText().toString().trim();
|
||||
bean.setPhone(phone);
|
||||
String idCard = mEtIdCard.getText().toString().trim();
|
||||
bean.setCardNum(idCard);
|
||||
bean.setName(mSelBean.getName());
|
||||
bean.setPhone(mSelBean.getPhone());
|
||||
bean.setCardNum(mSelBean.getIdcard());
|
||||
bean.setHouseId(mId);
|
||||
bean.setBindTime(TimeUtils.getNowTime());
|
||||
if (mSelBean != null) {
|
||||
bean.setPopulationInfoId(mSelBean.getPopulationInfoId());
|
||||
}
|
||||
bean.setOutHouse("0");
|
||||
bean.setPopulationInfoId(mSelBean.getPopulationInfoId());
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(bean);
|
||||
RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
|
@ -180,11 +180,11 @@ public class NewBuildingDetailActivity extends BaseActivity {
|
||||
}
|
||||
mPhotoAdapter.setData(mPhotos);
|
||||
}
|
||||
if (UserLgUtils.getUserId().equals(bean.getCreator())){
|
||||
mLlBtns.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mLlBtns.setVisibility(View.GONE);
|
||||
}
|
||||
// if (UserLgUtils.getUserId().equals(bean.getCreator())){
|
||||
// mLlBtns.setVisibility(View.VISIBLE);
|
||||
// } else {
|
||||
// }
|
||||
mLlBtns.setVisibility(View.GONE);
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
}
|
||||
|
||||
@ -271,10 +271,10 @@ public class NewBuildingDetailActivity extends BaseActivity {
|
||||
}
|
||||
mMpView.showZoomControls(false);
|
||||
mBaiduMap.animateMapStatus(u);
|
||||
mTvLocLng.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(mActivity, TakePointActivity.class);
|
||||
startActivityForResult(intent, 1234);
|
||||
});
|
||||
// mTvLocLng.setOnClickListener(v -> {
|
||||
// Intent intent = new Intent(mActivity, TakePointActivity.class);
|
||||
// startActivityForResult(intent, 1234);
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,8 +1,13 @@
|
||||
package com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
@ -21,6 +26,7 @@ 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.HouseLiveAddPersonAdapter;
|
||||
import com.sucstepsoft.realtimelocation.beans.CommunityBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.DicBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.NewBuildingBean;
|
||||
@ -30,6 +36,7 @@ import com.sucstepsoft.realtimelocation.beans.NewHouseDetailBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.SaveNewHouseBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.StreetBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.SuccessBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.PersonBaseListBean;
|
||||
import com.sucstepsoft.realtimelocation.net.LocationApiService;
|
||||
import com.sucstepsoft.realtimelocation.utils.ExceptionHandler;
|
||||
|
||||
@ -122,6 +129,14 @@ public class NewHouseAddActivity extends BaseActivity {
|
||||
Button mBtnConfirm;
|
||||
@BindView(R.id.ll_content)
|
||||
LinearLayout mLlContent;
|
||||
@BindView(R.id.btn_add_person)
|
||||
Button mBtnAddPerson;
|
||||
@BindView(R.id.tv_hint)
|
||||
TextView mTvHint;
|
||||
@BindView(R.id.rlv_live_person)
|
||||
RecyclerView mRlvLivePerson;
|
||||
@BindView(R.id.ll_live_person)
|
||||
LinearLayout mLlLivePerson;
|
||||
private Unbinder mBind;
|
||||
|
||||
private OptionsPickerView<StreetBean> mArea4Picker;
|
||||
@ -158,6 +173,8 @@ public class NewHouseAddActivity extends BaseActivity {
|
||||
private DicBean mSelRentingType;
|
||||
private DicBean mSelOwner;
|
||||
private DicBean mSelManage;
|
||||
private HouseLiveAddPersonAdapter mLiveAddPersonAdapter;
|
||||
private List<PersonBaseListBean.RowsBean> mSelLivePerson;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
@ -172,8 +189,10 @@ public class NewHouseAddActivity extends BaseActivity {
|
||||
mId = getIntent().getStringExtra("id");
|
||||
if (!TextUtils.isEmpty(mId)) {
|
||||
refreshView(STATE_LOAD_LOADING);
|
||||
mLlLivePerson.setVisibility(View.GONE);
|
||||
getDetailById();
|
||||
} else {
|
||||
mLlLivePerson.setVisibility(View.VISIBLE);
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
}
|
||||
|
||||
@ -249,9 +268,55 @@ public class NewHouseAddActivity extends BaseActivity {
|
||||
mTvOwnerIdCardType.setOnClickListener(v -> onShowDicPicker(PathConfig.DIC_CARD_TYPE, 2, 9));
|
||||
mTvManageIdCardType.setOnClickListener(v -> onShowDicPicker(PathConfig.DIC_CARD_TYPE, 2, 10));
|
||||
mTvRegisterDate.setOnClickListener(v -> onShowDate(mTvRegisterDate));
|
||||
mSelLivePerson = new ArrayList<>();
|
||||
mLiveAddPersonAdapter = new HouseLiveAddPersonAdapter(mActivity, mSelLivePerson);
|
||||
mRlvLivePerson.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvLivePerson.setAdapter(mLiveAddPersonAdapter);
|
||||
mLiveAddPersonAdapter.setCanEdit(true);
|
||||
if (mSelLivePerson.size() >= 1) {
|
||||
mTvHint.setVisibility(View.GONE);
|
||||
} else {
|
||||
mTvHint.setVisibility(View.VISIBLE);
|
||||
}
|
||||
mLiveAddPersonAdapter.addOnEditListener(new HouseLiveAddPersonAdapter.OnEditListener() {
|
||||
@Override
|
||||
public void onDel(PersonBaseListBean.RowsBean bean, int pos) {
|
||||
mSelLivePerson.remove(bean);
|
||||
mLiveAddPersonAdapter.setData(mSelLivePerson);
|
||||
if (mSelLivePerson.size() >= 1) {
|
||||
mTvHint.setVisibility(View.GONE);
|
||||
} else {
|
||||
mTvHint.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEdit(PersonBaseListBean.RowsBean b, int pos) {
|
||||
|
||||
}
|
||||
});
|
||||
mBtnAddPerson.setOnClickListener(v -> {
|
||||
startActivityForResult(new Intent(mActivity, HouseLivePersonBindActivity.class), 12345);
|
||||
});
|
||||
mBtnConfirm.setOnClickListener(v -> doSubmit());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
if (resultCode == RESULT_OK) {
|
||||
if (requestCode == 12345) {
|
||||
mSelLivePerson = (List<PersonBaseListBean.RowsBean>) data.getSerializableExtra("beans");
|
||||
mLiveAddPersonAdapter.setData(mSelLivePerson);
|
||||
if (mSelLivePerson != null && mSelLivePerson.size() > 0) {
|
||||
mTvHint.setVisibility(View.GONE);
|
||||
} else {
|
||||
mTvHint.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
private void onShowDate(TextView tvItem) {
|
||||
hideSoftKeyboard();
|
||||
TimePickerView mTimePickerView = new TimePickerBuilder(mActivity, (date, v) -> {
|
||||
@ -278,7 +343,7 @@ public class NewHouseAddActivity extends BaseActivity {
|
||||
} else {
|
||||
mBuildingPicker = new OptionsPickerBuilder(mActivity, (options1, options2, options3, v) -> {
|
||||
mSelBuilding = mBuildingList.get(options1);
|
||||
mTvBuildingNum.setText(mSelCommunity.getName());
|
||||
mTvBuildingNum.setText(mSelBuilding.getName());
|
||||
|
||||
mSelUnit = null;
|
||||
mUnitList = null;
|
||||
@ -443,34 +508,34 @@ public class NewHouseAddActivity extends BaseActivity {
|
||||
ToastUtils.showShort("请选择所在楼/排");
|
||||
return false;
|
||||
}
|
||||
if (mSelHouseType == null) {
|
||||
ToastUtils.showShort("请选择房屋类别");
|
||||
return false;
|
||||
}
|
||||
if (mHouseProperty == null) {
|
||||
ToastUtils.showShort("请选择房屋性质");
|
||||
return false;
|
||||
}
|
||||
if (mSelHouseKind == null) {
|
||||
ToastUtils.showShort("请选择房屋种类");
|
||||
return false;
|
||||
}
|
||||
if (mSelHouseFrame == null) {
|
||||
ToastUtils.showShort("请选择房屋结构");
|
||||
return false;
|
||||
}
|
||||
if (mSelBuildUse == null) {
|
||||
ToastUtils.showShort("请选择建筑用途");
|
||||
return false;
|
||||
}
|
||||
if (mSelHouseUse == null) {
|
||||
ToastUtils.showShort("请选择房屋用途");
|
||||
return false;
|
||||
}
|
||||
if (mSelTrouble == null) {
|
||||
ToastUtils.showShort("请选择隐患类型");
|
||||
return false;
|
||||
}
|
||||
// if (mSelHouseType == null) {
|
||||
// ToastUtils.showShort("请选择房屋类别");
|
||||
// return false;
|
||||
// }
|
||||
// if (mHouseProperty == null) {
|
||||
// ToastUtils.showShort("请选择房屋性质");
|
||||
// return false;
|
||||
// }
|
||||
// if (mSelHouseKind == null) {
|
||||
// ToastUtils.showShort("请选择房屋种类");
|
||||
// return false;
|
||||
// }
|
||||
// if (mSelHouseFrame == null) {
|
||||
// ToastUtils.showShort("请选择房屋结构");
|
||||
// return false;
|
||||
// }
|
||||
// if (mSelBuildUse == null) {
|
||||
// ToastUtils.showShort("请选择建筑用途");
|
||||
// return false;
|
||||
// }
|
||||
// if (mSelHouseUse == null) {
|
||||
// ToastUtils.showShort("请选择房屋用途");
|
||||
// return false;
|
||||
// }
|
||||
// if (mSelTrouble == null) {
|
||||
// ToastUtils.showShort("请选择隐患类型");
|
||||
// return false;
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1120,30 +1185,38 @@ public class NewHouseAddActivity extends BaseActivity {
|
||||
String unitNum = mTvUnitNum.getText().toString().trim();
|
||||
bean.setAffiliationUnit(Integer.parseInt(unitNum));
|
||||
String floorNum = mTvFloorNum.getText().toString().trim();
|
||||
bean.setAffiliationFloors(Integer.parseInt(floorNum));
|
||||
bean.setAffiliationFloors(floorNum);
|
||||
String door = mEtDoor.getText().toString().trim();
|
||||
bean.setHouseNum(Integer.parseInt(door));
|
||||
bean.setHouseNum(door);
|
||||
if (mSelHouseType != null) {
|
||||
bean.setCategoryId(mSelHouseType.getDictionaryId());
|
||||
bean.setCategoryName(mSelHouseType.getDictionaryName());
|
||||
}
|
||||
if (mHouseProperty != null) {
|
||||
bean.setNatureId(mHouseProperty.getDictionaryId());
|
||||
bean.setNatureName(mHouseProperty.getDictionaryName());
|
||||
}
|
||||
if (mSelHouseFrame != null) {
|
||||
bean.setStructureId(mSelHouseFrame.getDictionaryId());
|
||||
bean.setStructureName(mSelHouseFrame.getDictionaryName());
|
||||
}
|
||||
if (mSelHouseKind != null) {
|
||||
bean.setTypeId(mSelHouseKind.getDictionaryId());
|
||||
bean.setTypeName(mSelHouseKind.getDictionaryName());
|
||||
}
|
||||
if (mSelBuildUse != null) {
|
||||
bean.setBuildingPurposeId(mSelBuildUse.getDictionaryId());
|
||||
bean.setBuildingPurposeName(mSelBuildUse.getDictionaryName());
|
||||
}
|
||||
if (mSelHouseUse != null) {
|
||||
bean.setRoomUseId(mSelHouseUse.getDictionaryId());
|
||||
bean.setRoomUseName(mSelHouseUse.getDictionaryName());
|
||||
}
|
||||
|
||||
bean.setCategoryId(mSelHouseType.getDictionaryId());
|
||||
bean.setCategoryName(mSelHouseType.getDictionaryName());
|
||||
|
||||
bean.setNatureId(mHouseProperty.getDictionaryId());
|
||||
bean.setNatureName(mHouseProperty.getDictionaryName());
|
||||
|
||||
bean.setStructureId(mSelHouseFrame.getDictionaryId());
|
||||
bean.setStructureName(mSelHouseFrame.getDictionaryName());
|
||||
|
||||
bean.setTypeId(mSelHouseKind.getDictionaryId());
|
||||
bean.setTypeName(mSelHouseKind.getDictionaryName());
|
||||
|
||||
bean.setBuildingPurposeId(mSelBuildUse.getDictionaryId());
|
||||
bean.setBuildingPurposeName(mSelBuildUse.getDictionaryName());
|
||||
|
||||
bean.setRoomUseId(mSelHouseUse.getDictionaryId());
|
||||
bean.setRoomUseName(mSelHouseUse.getDictionaryName());
|
||||
|
||||
bean.setDangerId(mSelTrouble.getDictionaryId());
|
||||
bean.setDangerName(mSelTrouble.getDictionaryName());
|
||||
if (mSelTrouble != null) {
|
||||
bean.setDangerId(mSelTrouble.getDictionaryId());
|
||||
bean.setDangerName(mSelTrouble.getDictionaryName());
|
||||
}
|
||||
String houseNumber = mEtHouseNumber.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(houseNumber)) {
|
||||
bean.setRoomNum(Integer.parseInt(houseNumber));
|
||||
@ -1187,6 +1260,21 @@ public class NewHouseAddActivity extends BaseActivity {
|
||||
bean.setCustodianPhone(managePhone);
|
||||
String relation = mEtManageRelation.getText().toString().trim();
|
||||
bean.setRelationshipHomeowner(relation);
|
||||
|
||||
if (mSelLivePerson != null && mSelLivePerson.size() > 0) {
|
||||
List<SaveNewHouseBean.PopulationVOListBean> list = new ArrayList<>();
|
||||
for (int i = 0; i < mSelLivePerson.size(); i++) {
|
||||
PersonBaseListBean.RowsBean b1 = mSelLivePerson.get(i);
|
||||
SaveNewHouseBean.PopulationVOListBean b = new SaveNewHouseBean.PopulationVOListBean();
|
||||
b.setName(b1.getName());
|
||||
b.setCardNum(b1.getIdcard());
|
||||
b.setPopulationInfoId(b1.getPopulationInfoId());
|
||||
b.setPhone(b1.getPhone());
|
||||
b.setOutHouse("0");
|
||||
list.add(b);
|
||||
}
|
||||
bean.setPopulationVOList(list);
|
||||
}
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(bean);
|
||||
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
|
@ -12,6 +12,7 @@ import android.widget.LinearLayout;
|
||||
import android.widget.Switch;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
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;
|
||||
@ -21,6 +22,7 @@ import com.sucstepsoft.realtimelocation.R;
|
||||
import com.sucstepsoft.realtimelocation.adapters.HouseLivePersonAdapter;
|
||||
import com.sucstepsoft.realtimelocation.beans.HouseLivePersonBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.NewHouseDetailBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.SaveBindLiveHousePerson;
|
||||
import com.sucstepsoft.realtimelocation.beans.SuccessBean;
|
||||
import com.sucstepsoft.realtimelocation.net.LocationApiService;
|
||||
import com.sucstepsoft.realtimelocation.utils.ExceptionHandler;
|
||||
@ -36,6 +38,8 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.annotations.NonNull;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
@ -217,9 +221,11 @@ public class NewHouseDetailActivity extends BaseActivity {
|
||||
mLlBtns.setVisibility(View.VISIBLE);
|
||||
mBtnAddPerson.setVisibility(View.VISIBLE);
|
||||
mAdapter.setCanEdit(true);
|
||||
mAdapter.setEncrypt(false);
|
||||
} else {
|
||||
mLlBtns.setVisibility(View.GONE);
|
||||
mBtnAddPerson.setVisibility(View.GONE);
|
||||
mAdapter.setEncrypt(true);
|
||||
mAdapter.setCanEdit(false);
|
||||
}
|
||||
getBindPersonList();
|
||||
@ -238,7 +244,7 @@ public class NewHouseDetailActivity extends BaseActivity {
|
||||
|
||||
|
||||
mPersons = new ArrayList<>();
|
||||
mAdapter = new HouseLivePersonAdapter(mActivity, mPersons);
|
||||
mAdapter = new HouseLivePersonAdapter(mActivity, mPersons, false);
|
||||
mRlvLivePerson.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvLivePerson.setAdapter(mAdapter);
|
||||
mAdapter.addOnEditListener(new HouseLivePersonAdapter.OnEditListener() {
|
||||
@ -249,14 +255,14 @@ public class NewHouseDetailActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void onEdit(HouseLivePersonBean b, int pos) {
|
||||
|
||||
doLeavePerson(b, pos);
|
||||
}
|
||||
});
|
||||
mAdapter.addOnItemClickListener(bean -> {
|
||||
Intent intent = new Intent(mActivity, EditHouseLivePersonBindActivity.class);
|
||||
intent.putExtra("id", bean.getPopulationId());
|
||||
startActivityForResult(intent, 12);
|
||||
});
|
||||
// mAdapter.addOnItemClickListener(bean -> {
|
||||
// Intent intent = new Intent(mActivity, EditHouseLivePersonBindActivity.class);
|
||||
// intent.putExtra("id", bean.getPopulationId());
|
||||
// startActivityForResult(intent, 12);
|
||||
// });
|
||||
mBtnAddPerson.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(mActivity, HouseLivePersonBindActivity.class);
|
||||
intent.putExtra("id", mId);
|
||||
@ -266,6 +272,70 @@ public class NewHouseDetailActivity extends BaseActivity {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员离开
|
||||
*
|
||||
* @param b outHouse 0正常 1离开
|
||||
* @param pos
|
||||
*/
|
||||
private void doLeavePerson(HouseLivePersonBean b, int pos) {
|
||||
new AlertDialog.Builder(mActivity)
|
||||
.setTitle("警告")
|
||||
.setMessage("确定要将该人员移除该房屋吗?")
|
||||
.setPositiveButton("确定", (dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
ProgressDialog s = UIUtil.initDialog(mActivity, "移除中...");
|
||||
s.dismiss();
|
||||
RequestBody body = buildLeaveBody(b);
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.doEditHouseLivePerson(b.getPopulationId(), body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(SuccessBean successBean) {
|
||||
s.dismiss();
|
||||
ToastUtils.showShort("移除成功");
|
||||
getBindPersonList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
s.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
})
|
||||
.setNegativeButton("取消", (dialog, which) -> dialog.dismiss())
|
||||
.create().show();
|
||||
}
|
||||
|
||||
|
||||
private RequestBody buildLeaveBody(HouseLivePersonBean b) {
|
||||
SaveBindLiveHousePerson bean = new SaveBindLiveHousePerson();
|
||||
bean.setName(b.getName());
|
||||
bean.setPhone(b.getPhone());
|
||||
bean.setCardNum(b.getCardNum());
|
||||
bean.setHouseId(b.getHouseId());
|
||||
bean.setOutHouse("1");
|
||||
bean.setPopulationInfoId(b.getPopulationInfoId());
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(bean);
|
||||
RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
return body;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除居住人员
|
||||
*/
|
||||
|
@ -0,0 +1,511 @@
|
||||
package com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.graphics.Color;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||
import com.google.gson.Gson;
|
||||
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.beans.CommunityBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.NewBuildingBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.NewCommunityDetailBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.SaveGroupHouse;
|
||||
import com.sucstepsoft.realtimelocation.beans.StreetBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.SuccessBean;
|
||||
import com.sucstepsoft.realtimelocation.net.LocationApiService;
|
||||
import com.sucstepsoft.realtimelocation.utils.ExceptionHandler;
|
||||
|
||||
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;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
/**
|
||||
* 房屋添加-批量添加-规则
|
||||
*/
|
||||
public class NewRuleHouseAddActivity extends BaseActivity {
|
||||
|
||||
|
||||
@BindView(R.id.tv_street)
|
||||
TextView mTvStreet;
|
||||
@BindView(R.id.tv_community)
|
||||
TextView mTvCommunity;
|
||||
@BindView(R.id.tv_community_area)
|
||||
TextView mTvCommunityArea;
|
||||
@BindView(R.id.tv_building_num)
|
||||
TextView mTvBuildingNum;
|
||||
|
||||
@BindView(R.id.btn_confirm)
|
||||
Button mBtnConfirm;
|
||||
@BindView(R.id.et_room)
|
||||
EditText mEtRoom;
|
||||
|
||||
private Unbinder mBind;
|
||||
|
||||
private OptionsPickerView<StreetBean> mArea4Picker;
|
||||
private OptionsPickerView<CommunityBean> mArea5Picker;
|
||||
private List<StreetBean> mArea4List;
|
||||
private List<CommunityBean> mArea5List;
|
||||
private StreetBean mSelArea4;
|
||||
private CommunityBean mSelArea5;
|
||||
|
||||
private List<NewCommunityDetailBean> mCommunityList;
|
||||
private OptionsPickerView<NewCommunityDetailBean> mCommunityPicker;
|
||||
private NewCommunityDetailBean mSelCommunity;
|
||||
|
||||
private NewBuildingBean.RowsBean mSelBuilding;
|
||||
private List<NewBuildingBean.RowsBean> mBuildingList;
|
||||
private OptionsPickerView<NewBuildingBean.RowsBean> mBuildingPicker;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_add_new_group_rule_house;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("快速建房");
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
initContentView();
|
||||
}
|
||||
|
||||
private void doSubmit() {
|
||||
if (checkParams()) {
|
||||
doSave();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存编辑
|
||||
*/
|
||||
|
||||
|
||||
private void initContentView() {
|
||||
mTvStreet.setOnClickListener(v -> onShowArea4());
|
||||
mTvCommunity.setOnClickListener(v -> onShowArea5());
|
||||
mTvCommunityArea.setOnClickListener(v -> onShowCommunity());
|
||||
mTvBuildingNum.setOnClickListener(v -> onShowBuildNum());//楼排
|
||||
mBtnConfirm.setOnClickListener(v -> doSubmit());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 显示楼排选择
|
||||
*/
|
||||
private void onShowBuildNum() {
|
||||
if (mSelCommunity == null) {
|
||||
ToastUtils.showShort("请选择所在小区");
|
||||
} else {
|
||||
if (mBuildingList == null) {
|
||||
getAllUnitNum(mSelCommunity.getResidentialId());
|
||||
} else {
|
||||
mBuildingPicker = new OptionsPickerBuilder(mActivity, (options1, options2, options3, v) -> {
|
||||
mSelBuilding = mBuildingList.get(options1);
|
||||
mTvBuildingNum.setText(mSelBuilding.getName());
|
||||
})
|
||||
.setTitleText("楼/排")
|
||||
.isDialog(false)
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mBuildingPicker.setPicker(mBuildingList);
|
||||
mBuildingPicker.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据小区获取楼
|
||||
*
|
||||
* @param residentialId
|
||||
*/
|
||||
private void getAllUnitNum(String residentialId) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getAllBuilding(residentialId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<NewBuildingBean.RowsBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<NewBuildingBean.RowsBean> newCommunityDetailBeans) {
|
||||
if (dialog != null && dialog.isShowing()) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
if (newCommunityDetailBeans != null && newCommunityDetailBeans.size() > 0) {
|
||||
mBuildingList = newCommunityDetailBeans;
|
||||
onShowBuildNum();
|
||||
} else {
|
||||
ToastUtils.showShort("所选小区下,暂无楼/排信息");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
if (dialog != null && dialog.isShowing()) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private boolean checkParams() {
|
||||
if (mSelArea4 == null) {
|
||||
ToastUtils.showShort("请选择所在街道");
|
||||
return false;
|
||||
}
|
||||
if (mSelArea5 == null) {
|
||||
ToastUtils.showShort("请选择所在社区");
|
||||
return false;
|
||||
}
|
||||
if (mSelCommunity == null) {
|
||||
ToastUtils.showShort("请选择所在小区");
|
||||
return false;
|
||||
}
|
||||
if (mSelBuilding == null) {
|
||||
ToastUtils.showShort("请选择所在楼/排");
|
||||
return false;
|
||||
}
|
||||
String roomCount = mEtRoom.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(roomCount)) {
|
||||
ToastUtils.showShort("请输入每单元每层户数");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* area4
|
||||
*/
|
||||
private void onShowArea4() {
|
||||
if (null == mArea4List || mArea4List.size() <= 0) {
|
||||
getStreetList();
|
||||
} else {
|
||||
mArea4Picker = new OptionsPickerBuilder(mActivity, (options1, options2, options3, v) -> {
|
||||
StreetBean bean = mArea4List.get(options1);
|
||||
mTvStreet.setText(bean.getName());
|
||||
mSelArea4 = bean;
|
||||
|
||||
mSelArea5 = null;
|
||||
mTvCommunity.setText("");
|
||||
mArea5List = null;
|
||||
|
||||
mSelCommunity = null;
|
||||
mCommunityList = null;
|
||||
mTvCommunityArea.setText("");
|
||||
|
||||
mSelBuilding = null;
|
||||
mBuildingList = null;
|
||||
mTvBuildingNum.setText("");
|
||||
|
||||
|
||||
})
|
||||
.setTitleText("请选择区域")
|
||||
.isDialog(false)
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mArea4Picker.setPicker(mArea4List);
|
||||
mArea4Picker.show();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取街道
|
||||
*/
|
||||
private void getStreetList() {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getStreetList(UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<StreetBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<StreetBean> streetBeans) {
|
||||
if (dialog != null && dialog.isShowing()) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
if (streetBeans != null && streetBeans.size() > 0) {
|
||||
mArea4List = streetBeans;
|
||||
onShowArea4();
|
||||
} else {
|
||||
ToastUtils.showShort("暂无街道数据");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
if (dialog != null && dialog.isShowing()) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* area5
|
||||
*/
|
||||
private void onShowArea5() {
|
||||
if (null == mArea5List || mArea5List.size() <= 0) {
|
||||
if (mSelArea4 == null) {
|
||||
ToastUtils.showShort("请选择乡镇街道");
|
||||
} else {
|
||||
getCommunity(mSelArea4.getId());
|
||||
}
|
||||
} else {
|
||||
mArea5Picker = new OptionsPickerBuilder(mActivity, (options1, options2, options3, v) -> {
|
||||
CommunityBean bean = mArea5List.get(options1);
|
||||
mTvCommunity.setText(bean.getCommunityName());
|
||||
mSelArea5 = bean;
|
||||
|
||||
mSelCommunity = null;
|
||||
mCommunityList = null;
|
||||
mTvCommunityArea.setText("");
|
||||
|
||||
mSelBuilding = null;
|
||||
mBuildingList = null;
|
||||
mTvBuildingNum.setText("");
|
||||
|
||||
|
||||
})
|
||||
.setTitleText("请选择社区")
|
||||
.isDialog(false)
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mArea5Picker.setPicker(mArea5List);
|
||||
mArea5Picker.show();
|
||||
}
|
||||
}
|
||||
|
||||
private void getCommunity(String areaId) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getCommunityList(areaId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<CommunityBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<CommunityBean> communityBeans) {
|
||||
dialog.dismiss();
|
||||
if (null != communityBeans && communityBeans.size() > 0) {
|
||||
mArea5List = communityBeans;
|
||||
onShowArea5();
|
||||
} else {
|
||||
ToastUtils.showShort("暂无社区数据");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
dialog.dismiss();
|
||||
ToastUtils.showShort("获取区域失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 小区选择
|
||||
*/
|
||||
private void onShowCommunity() {
|
||||
if (mSelArea5 == null) {
|
||||
ToastUtils.showShort("请选择所在社区");
|
||||
} else {
|
||||
if (mCommunityList == null) {
|
||||
getAllCommunity(mSelArea5.getCommunityId());
|
||||
} else {
|
||||
mCommunityPicker = new OptionsPickerBuilder(mActivity, (options1, options2, options3, v) -> {
|
||||
mSelCommunity = mCommunityList.get(options1);
|
||||
mTvCommunityArea.setText(mSelCommunity.getName());
|
||||
|
||||
mSelBuilding = null;
|
||||
mBuildingList = null;
|
||||
mTvBuildingNum.setText("");
|
||||
|
||||
|
||||
})
|
||||
.setTitleText("请选择小区")
|
||||
.isDialog(false)
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mCommunityPicker.setPicker(mCommunityList);
|
||||
mCommunityPicker.show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 社区下全部小区
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
private void getAllCommunity(String id) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getNewCommunityListAll(id, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<NewCommunityDetailBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<NewCommunityDetailBean> newCommunityDetailBeans) {
|
||||
if (dialog != null && dialog.isShowing()) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
if (newCommunityDetailBeans != null && newCommunityDetailBeans.size() > 0) {
|
||||
mCommunityList = newCommunityDetailBeans;
|
||||
onShowCommunity();
|
||||
} else {
|
||||
ToastUtils.showShort("所选社区下暂无小区");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
if (dialog != null && dialog.isShowing()) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
private void doSave() {
|
||||
hideSoftKeyboard();
|
||||
RequestBody bean = buildParams();
|
||||
ProgressDialog progressDialog = UIUtil.initDialog(NewRuleHouseAddActivity.this, "生成中...");
|
||||
progressDialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.doSaveNewHouseAuto(bean, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(SuccessBean s) {
|
||||
progressDialog.dismiss();
|
||||
ToastUtils.showShort("生成成功");
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
progressDialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 构建提交参数
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private RequestBody buildParams() {
|
||||
SaveGroupHouse bean = new SaveGroupHouse();
|
||||
bean.setBuildingId(mSelBuilding.getBuildingId());
|
||||
String roomCount = mEtRoom.getText().toString().trim();
|
||||
bean.setFloorUnitHouseCount(roomCount);
|
||||
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(bean);
|
||||
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
return requestBody;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -104,7 +104,7 @@ public class BuildingManageFragment extends LazyFragment {
|
||||
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
|
||||
mRlvItems.setLayoutManager(layoutManager);
|
||||
mRlvItems.setAdapter(mAdapter);
|
||||
mAdapter.addOnItemClickListener(bean -> showIssueDetail(bean));
|
||||
mAdapter.addOnItemClickListener(this::showIssueDetail);
|
||||
mRlvItems.setNoMore(true);
|
||||
mRlvItems.setRefreshProgressStyle(ProgressStyle.BallGridBeat);
|
||||
mRlvItems.setLoadingMoreProgressStyle(ProgressStyle.Pacman);
|
||||
@ -119,6 +119,12 @@ public class BuildingManageFragment extends LazyFragment {
|
||||
loadMore();
|
||||
}
|
||||
});
|
||||
mKeywords = "";
|
||||
mSelBuilding = null;
|
||||
mSelCommunityArea = null;
|
||||
mSelStreet = null;
|
||||
mSelCommunity = null;
|
||||
mEtSearchKey.setText("");
|
||||
getBuildingList(1);
|
||||
initSearchView();
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ public class CommunityManageFragment extends LazyFragment {
|
||||
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
|
||||
mRlvItems.setLayoutManager(layoutManager);
|
||||
mRlvItems.setAdapter(mAdapter);
|
||||
mAdapter.addOnItemClickListener(bean -> showIssueDetail(bean));
|
||||
mAdapter.addOnItemClickListener(this::showIssueDetail);
|
||||
mRlvItems.setNoMore(true);
|
||||
mRlvItems.setRefreshProgressStyle(ProgressStyle.BallGridBeat);
|
||||
mRlvItems.setLoadingMoreProgressStyle(ProgressStyle.Pacman);
|
||||
@ -117,8 +117,15 @@ public class CommunityManageFragment extends LazyFragment {
|
||||
loadMore();
|
||||
}
|
||||
});
|
||||
mKeywords = "";
|
||||
mSelBuilding = null;
|
||||
mSelCommunityArea = null;
|
||||
mSelStreet = null;
|
||||
mSelCommunity = null;
|
||||
mEtSearchKey.setText("");
|
||||
getCommunityList(1);
|
||||
initSearchView();
|
||||
LogUtils.e("刷新页面");
|
||||
}
|
||||
|
||||
|
||||
@ -170,7 +177,7 @@ public class CommunityManageFragment extends LazyFragment {
|
||||
});
|
||||
mEtSearchKey.setOnEditorActionListener((v, actionId, event) -> {
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH) {
|
||||
hideSoftKeyboard(mEtSearchKey,mActivity);
|
||||
hideSoftKeyboard(mEtSearchKey, mActivity);
|
||||
mEtSearchKey.clearFocus();
|
||||
mKeywords = v.getText().toString();
|
||||
refresh();
|
||||
|
@ -61,7 +61,7 @@ public class HireHouseManageFragment extends LazyFragment {
|
||||
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
|
||||
mRlvItems.setLayoutManager(layoutManager);
|
||||
mRlvItems.setAdapter(mAdapter);
|
||||
mAdapter.addOnItemClickListener(bean -> showIssueDetail(bean));
|
||||
mAdapter.addOnItemClickListener(this::showIssueDetail);
|
||||
mRlvItems.setNoMore(true);
|
||||
mRlvItems.setRefreshProgressStyle(ProgressStyle.BallGridBeat);
|
||||
mRlvItems.setLoadingMoreProgressStyle(ProgressStyle.Pacman);
|
||||
|
@ -106,7 +106,7 @@ public class HouseManageNewFragment extends LazyFragment {
|
||||
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
|
||||
mRlvItems.setLayoutManager(layoutManager);
|
||||
mRlvItems.setAdapter(mAdapter);
|
||||
mAdapter.addOnItemClickListener(bean -> showIssueDetail(bean));
|
||||
mAdapter.addOnItemClickListener(this::showIssueDetail);
|
||||
mRlvItems.setNoMore(true);
|
||||
mRlvItems.setRefreshProgressStyle(ProgressStyle.BallGridBeat);
|
||||
mRlvItems.setLoadingMoreProgressStyle(ProgressStyle.Pacman);
|
||||
@ -122,6 +122,12 @@ public class HouseManageNewFragment extends LazyFragment {
|
||||
}
|
||||
});
|
||||
mCsvState.setState(CustomStateView.STATE_LOAD);
|
||||
mKeywords = "";
|
||||
mSelBuilding = null;
|
||||
mSelCommunityArea = null;
|
||||
mSelStreet = null;
|
||||
mSelCommunity = null;
|
||||
mEtSearchKey.setText("");
|
||||
getHouseList(1);
|
||||
initSearchView();
|
||||
}
|
||||
|
@ -0,0 +1,410 @@
|
||||
package com.sucstepsoft.realtimelocation.activitys.census.normal;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RadioGroup;
|
||||
|
||||
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.core.widget.views.CustomStateView;
|
||||
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.PersonBaseClaimAdapter;
|
||||
import com.sucstepsoft.realtimelocation.beans.SuccessBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.PersonBaseListBean;
|
||||
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 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;
|
||||
|
||||
/**
|
||||
* 人口认领
|
||||
*/
|
||||
public class CensusClaimListActivity extends BaseActivity {
|
||||
@BindView(R.id.iv_clear)
|
||||
ImageView mIvClear;
|
||||
@BindView(R.id.et_search_centent)
|
||||
EditText mEtSearchContent;
|
||||
@BindView(R.id.btn_search)
|
||||
Button mBtnSearch;
|
||||
@BindView(R.id.xlv_content)
|
||||
XRecyclerView mXlvItems;
|
||||
@BindView(R.id.rg_type)
|
||||
RadioGroup mRGType;
|
||||
@BindView(R.id.csv_state)
|
||||
CustomStateView mCsvState;
|
||||
private Unbinder mBind;
|
||||
private String mRows = "20";
|
||||
private int mCurPage = 1;
|
||||
private boolean mIsSelf = true;
|
||||
private PersonBaseClaimAdapter mAdapter;
|
||||
private List<PersonBaseListBean.RowsBean> mDatas = new ArrayList<>();
|
||||
private Disposable mDisposable;
|
||||
|
||||
private String mKeywords = "";
|
||||
private Disposable mListDis;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_census_claim_list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("人口认领");
|
||||
mCsvState.setState(CustomStateView.STATE_LOAD);
|
||||
mBtnSearch.setOnClickListener(v -> doSearch());
|
||||
mIvClear.setOnClickListener(v -> {
|
||||
mKeywords = "";
|
||||
mEtSearchContent.setText("");
|
||||
refreshData();
|
||||
});
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mAdapter = new PersonBaseClaimAdapter(mActivity, mDatas);
|
||||
LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity);
|
||||
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
|
||||
mXlvItems.setLayoutManager(layoutManager);
|
||||
mXlvItems.setAdapter(mAdapter);
|
||||
mAdapter.addOnItemClickListener(bean -> showDetail(bean));
|
||||
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() {
|
||||
if (mIsSelf) {
|
||||
getMineList(mCurPage);
|
||||
} else {
|
||||
getUpcomingList(mCurPage);
|
||||
}
|
||||
}
|
||||
});
|
||||
mAdapter.addOnEditListener(new PersonBaseClaimAdapter.OnEditListener() {
|
||||
@Override
|
||||
public void onDel(PersonBaseListBean.RowsBean bean, int pos) {
|
||||
doDelBean(bean, pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEdit(PersonBaseListBean.RowsBean bean, int pos) {
|
||||
doEditBean(bean, pos);
|
||||
}
|
||||
});
|
||||
mRGType.setOnCheckedChangeListener((group, checkedId) -> {
|
||||
if (checkedId == R.id.rb_mine) {
|
||||
mIsSelf = true;
|
||||
} else {
|
||||
mIsSelf = false;
|
||||
}
|
||||
refreshData();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
private void doSearch() {
|
||||
String searchContent = mEtSearchContent.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(searchContent)) {
|
||||
hideSoftKeyboard();
|
||||
mKeywords = searchContent;
|
||||
mCurPage = 1;
|
||||
if (mIsSelf) {
|
||||
getMineList(mCurPage);
|
||||
} else {
|
||||
getUpcomingList(mCurPage);
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort("请输入要查询的内容");
|
||||
}
|
||||
}
|
||||
|
||||
private void getMineList(int page) {
|
||||
mCurPage = page;
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getCensusRegisterList(page + "", mKeywords, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<PersonBaseListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
mListDis = d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(PersonBaseListBean 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);
|
||||
}
|
||||
mCsvState.setState(CustomStateView.STATE_SUCCESS);
|
||||
} else {
|
||||
mXlvItems.refreshComplete();
|
||||
if (page > 1) {
|
||||
mXlvItems.loadMoreComplete();
|
||||
mXlvItems.setNoMore(true);
|
||||
} else {
|
||||
if (TextUtils.isEmpty(mKeywords)) {
|
||||
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
||||
} else {
|
||||
ToastUtils.showShort("未查询到相关内容");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
mCsvState.setState(CustomStateView.STATE_ERROR);
|
||||
ToastUtils.showShort("数据加载失,请稍后重试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param bean
|
||||
* @param pos
|
||||
*/
|
||||
private void doDelBean(PersonBaseListBean.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)
|
||||
.doDelBaseRegister(bean.getPopulationInfoId(), 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(PersonBaseListBean.RowsBean bean, int pos) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "保存中...");
|
||||
dialog.show();
|
||||
RetrofitManager
|
||||
.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.doClaimPerson(bean.getPopulationInfoId(), 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("认领成功");
|
||||
refreshData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示详情
|
||||
*
|
||||
* @param bean
|
||||
*/
|
||||
private void showDetail(PersonBaseListBean.RowsBean bean) {
|
||||
Intent intent = new Intent(mActivity, CensusRegisterDetailActivity.class);
|
||||
intent.putExtra("id", bean.getPopulationInfoId());
|
||||
intent.putExtra("idCard", bean.getIdcard());
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
private void refreshData() {
|
||||
mDatas.clear();
|
||||
mAdapter.setData(mDatas);
|
||||
mCsvState.setState(CustomStateView.STATE_LOAD);
|
||||
if (mIsSelf) {
|
||||
getMineList(1);
|
||||
} else {
|
||||
getUpcomingList(1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
refreshData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取列表
|
||||
*/
|
||||
private void getUpcomingList(int page) {
|
||||
mCurPage = page;
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getCensusRegisterListAll(page + "", mKeywords, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<PersonBaseListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
mListDis = d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(PersonBaseListBean 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());
|
||||
}
|
||||
mCsvState.setState(CustomStateView.STATE_SUCCESS);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mXlvItems.refreshComplete();
|
||||
if (mDatas.size() >= leaveListBean.getTotal()) {
|
||||
mXlvItems.loadMoreComplete();
|
||||
mXlvItems.setNoMore(true);
|
||||
} else {
|
||||
mXlvItems.loadMoreComplete();
|
||||
mXlvItems.setNoMore(false);
|
||||
}
|
||||
} else {
|
||||
if (page > 1) {
|
||||
mXlvItems.loadMoreComplete();
|
||||
mXlvItems.setNoMore(true);
|
||||
mCsvState.setState(CustomStateView.STATE_SUCCESS);
|
||||
} else {
|
||||
if (TextUtils.isEmpty(mKeywords)) {
|
||||
//无数据
|
||||
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
||||
} else {
|
||||
ToastUtils.showShort("未查询到相关内容");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
ToastUtils.showShort("数据加载失,请稍后重试");
|
||||
mCsvState.setState(CustomStateView.STATE_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
if (mListDis != null && !mListDis.isDisposed()) {
|
||||
mListDis.dispose();
|
||||
}
|
||||
if (mDisposable != null && !mDisposable.isDisposed()) {
|
||||
mDisposable.dispose();
|
||||
}
|
||||
mXlvItems.destroy();
|
||||
mXlvItems = null;
|
||||
if (mBind != null) {
|
||||
mBind.unbind();
|
||||
}
|
||||
super.onDestroy();
|
||||
}
|
||||
}
|
@ -871,6 +871,7 @@ public class CensusRegisterAddActivity extends BaseActivity {
|
||||
public void onNext(@NonNull SuccessBean successBean) {
|
||||
dialog.dismiss();
|
||||
ToastUtils.showShort("录入成功");
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
|
||||
@ -1129,9 +1130,9 @@ public class CensusRegisterAddActivity extends BaseActivity {
|
||||
LogUtils.e(data);
|
||||
String tags = "";
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
if(data.get(i).isCheck()){
|
||||
tags += data.get(i).getId() + ",";
|
||||
}
|
||||
if (data.get(i).isCheck()) {
|
||||
tags += data.get(i).getId() + ",";
|
||||
}
|
||||
}
|
||||
if (tags.endsWith(",")) {
|
||||
tags = tags.substring(0, tags.length() - 1);
|
||||
|
@ -11,6 +11,8 @@ import android.widget.TextView;
|
||||
import com.beloo.widget.chipslayoutmanager.ChipsLayoutManager;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.utils.DesensitizationUtil;
|
||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.special.CensusCorrctListActivity;
|
||||
@ -241,7 +243,7 @@ public class CensusRegisterDetailActivity extends BaseActivity {
|
||||
ChipsLayoutManager chipsLayoutManager = ChipsLayoutManager.newBuilder(mActivity)
|
||||
.setOrientation(ChipsLayoutManager.HORIZONTAL)
|
||||
.build();
|
||||
mTagAdapter = new PersonTagAdapter(mActivity, mTags,false);
|
||||
mTagAdapter = new PersonTagAdapter(mActivity, mTags, false);
|
||||
mRlvTags.setLayoutManager(chipsLayoutManager);
|
||||
mRlvTags.setAdapter(mTagAdapter);
|
||||
|
||||
@ -345,10 +347,12 @@ public class CensusRegisterDetailActivity extends BaseActivity {
|
||||
* 户籍信息
|
||||
*/
|
||||
private void setRegisterInfo() {
|
||||
mTvName.setText(mRegisterDetailBean.getName());//姓名
|
||||
mTvCardNumber.setText(mRegisterDetailBean.getIdcard());//证件号码
|
||||
boolean isSelf = UserLgUtils.getUserId().equals(mRegisterDetailBean.getCreator());
|
||||
LogUtils.e("是否自己录入:"+isSelf);
|
||||
mTvName.setText(isSelf ? mRegisterDetailBean.getName() : DesensitizationUtil.chineseName(mRegisterDetailBean.getName()));//姓名
|
||||
mTvCardNumber.setText(isSelf?mRegisterDetailBean.getIdcard():DesensitizationUtil.idCardNum(mRegisterDetailBean.getIdcard()));//证件号码
|
||||
mTvCardType.setText(mRegisterDetailBean.getIdcardType());//证件类型
|
||||
mTvBirth.setText(mRegisterDetailBean.getBirthday());//出生日期
|
||||
mTvBirth.setText(isSelf?mRegisterDetailBean.getBirthday():DesensitizationUtil.birthDate(mRegisterDetailBean.getBirthday()));//出生日期
|
||||
mTvGender.setText(mRegisterDetailBean.getSex());//性别
|
||||
mTvNation.setText(mRegisterDetailBean.getNation());//民族
|
||||
mTvDegree.setText(mRegisterDetailBean.getEducation());//文化程度
|
||||
@ -357,7 +361,7 @@ public class CensusRegisterDetailActivity extends BaseActivity {
|
||||
mTvRelation.setText(mRegisterDetailBean.getRelationship());
|
||||
// String phone = mEtPhone.getText().toString().trim();
|
||||
// bean.setPhone(phone);//联系电话
|
||||
mTvPhone.setText(mRegisterDetailBean.getPhone());
|
||||
mTvPhone.setText(isSelf?mRegisterDetailBean.getPhone():DesensitizationUtil.mobilePhone(mRegisterDetailBean.getPhone()));
|
||||
// String academy = mEtAcademy.getText().toString().trim();
|
||||
// bean.setDescription(academy);//就读院校及专业
|
||||
mTvAcademy.setText(mRegisterDetailBean.getDescription());
|
||||
|
@ -0,0 +1,49 @@
|
||||
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.HouseFloorHolder;
|
||||
import com.sucstepsoft.realtimelocation.beans.ResultListBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/11/24 - 9:16 AM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 楼层信息
|
||||
*/
|
||||
public class HouseFloorAdapter extends BaseRecyclerAdapter<ResultListBean.FloorBean, HouseFloorHolder> {
|
||||
public HouseFloorAdapter(Context ctx, List<ResultListBean.FloorBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HouseFloorHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_floor_item, parent, false);
|
||||
return new HouseFloorHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(HouseFloorHolder holder, int i) {
|
||||
ResultListBean.FloorBean bean = mData.get(i);
|
||||
// holder.mRlvItems.setLayoutManager(new LinearLayoutManager(mContext));
|
||||
// HouseFloorInputAdapter adapter = new HouseFloorInputAdapter(mContext, mData,this,i);
|
||||
// holder.mRlvItems.setAdapter(adapter);
|
||||
// holder.mBtnAdd.setOnClickListener(v -> {
|
||||
// LogUtils.e("添加楼层");
|
||||
|
||||
// });
|
||||
|
||||
}
|
||||
public void doDelBean(int pos){
|
||||
mData.remove(pos);
|
||||
this.setData(mData);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.sucstepsoft.realtimelocation.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.text.Editable;
|
||||
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.HouseFloorInputHolder;
|
||||
import com.sucstepsoft.realtimelocation.beans.ResultListBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.SaveGroupHouse;
|
||||
import com.sucstepsoft.realtimelocation.widget.SimpleTextWatch;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/11/24 - 9:16 AM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 楼层信息
|
||||
*/
|
||||
public class HouseFloorInputAdapter extends BaseRecyclerAdapter<SaveGroupHouse.ResultListBean.FloorListBean, HouseFloorInputHolder> {
|
||||
|
||||
public HouseFloorInputAdapter(Context ctx, List<SaveGroupHouse.ResultListBean.FloorListBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HouseFloorInputHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_floor_input, parent, false);
|
||||
return new HouseFloorInputHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(HouseFloorInputHolder holder, int i) {
|
||||
SaveGroupHouse.ResultListBean.FloorListBean bean = mData.get(i);
|
||||
holder.mEtNum.setTag(i);
|
||||
holder.mEtNum.setText(bean.getFloorValue());
|
||||
holder.mRlvItems.setLayoutManager(new LinearLayoutManager(mContext));
|
||||
HouseRoomInputAdapter itemAdapter = new HouseRoomInputAdapter(mContext, bean.getHouseList());
|
||||
holder.mRlvItems.setAdapter(itemAdapter);
|
||||
holder.mEtNum.addTextChangedListener(new SimpleTextWatch() {
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
if ((int) holder.mEtNum.getTag() == i) {
|
||||
bean.setFloorValue(s.toString());
|
||||
}
|
||||
}
|
||||
});
|
||||
holder.mBtnDel.setOnClickListener(v -> {
|
||||
if (mData.size() > 1) {
|
||||
mData.remove(i);
|
||||
HouseFloorInputAdapter.this.setData(mData);
|
||||
}
|
||||
});
|
||||
holder.mBtnAdd.setOnClickListener(v -> {
|
||||
//添加房屋
|
||||
List<SaveGroupHouse.ResultListBean.FloorListBean.HouseListBean> data = itemAdapter.getData();
|
||||
SaveGroupHouse.ResultListBean.FloorListBean.HouseListBean roomBean = new SaveGroupHouse.ResultListBean.FloorListBean.HouseListBean();
|
||||
data.add(roomBean);
|
||||
itemAdapter.notifyDataSetChanged();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
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.HousePersonHolder;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.PersonBaseListBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/11/17 - 1:22 PM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 人口adapter
|
||||
*/
|
||||
public class HouseLiveAddPersonAdapter extends BaseRecyclerAdapter<PersonBaseListBean.RowsBean, HousePersonHolder> {
|
||||
private boolean canEdit = false;
|
||||
|
||||
public HouseLiveAddPersonAdapter(Context ctx, List<PersonBaseListBean.RowsBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HousePersonHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_person_tenement, parent, false);
|
||||
return new HousePersonHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(HousePersonHolder holder, int i) {
|
||||
PersonBaseListBean.RowsBean bean = mData.get(i);
|
||||
holder.mTvName.setText(bean.getName());
|
||||
holder.mTvPhone.setText("联系方式:" + bean.getPhone());
|
||||
holder.mTvShip.setText("证件号码:" + bean.getIdcard());
|
||||
holder.mBtnLeave.setVisibility(View.GONE);
|
||||
if (canEdit) {
|
||||
holder.mBtnUnbind.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
holder.mBtnUnbind.setVisibility(View.GONE);
|
||||
}
|
||||
holder.mBtnUnbind.setOnClickListener(v -> mEditListener.onDel(bean, i));
|
||||
}
|
||||
|
||||
public void setCanEdit(boolean isCan) {
|
||||
canEdit = isCan;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
private OnEditListener mEditListener;
|
||||
|
||||
public void addOnEditListener(OnEditListener mListener) {
|
||||
this.mEditListener = mListener;
|
||||
}
|
||||
|
||||
public interface OnEditListener {
|
||||
void onDel(PersonBaseListBean.RowsBean bean, int pos);
|
||||
|
||||
void onEdit(PersonBaseListBean.RowsBean b, int pos);
|
||||
}
|
||||
}
|
@ -6,6 +6,7 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
|
||||
import com.sucstepsoft.cm_utils.utils.DesensitizationUtil;
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
import com.sucstepsoft.realtimelocation.adapters.holders.HousePersonHolder;
|
||||
import com.sucstepsoft.realtimelocation.beans.HouseLivePersonBean;
|
||||
@ -20,9 +21,12 @@ import java.util.List;
|
||||
*/
|
||||
public class HouseLivePersonAdapter extends BaseRecyclerAdapter<HouseLivePersonBean, HousePersonHolder> {
|
||||
private boolean canEdit = false;
|
||||
private boolean isEncrypt = false;
|
||||
|
||||
public HouseLivePersonAdapter(Context ctx, List<HouseLivePersonBean> list) {
|
||||
public HouseLivePersonAdapter(Context ctx, List<HouseLivePersonBean> list, boolean isEncrypt) {
|
||||
super(ctx, list);
|
||||
this.isEncrypt = isEncrypt;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -35,14 +39,17 @@ public class HouseLivePersonAdapter extends BaseRecyclerAdapter<HouseLivePersonB
|
||||
public void bindHolder(HousePersonHolder holder, int i) {
|
||||
HouseLivePersonBean bean = mData.get(i);
|
||||
holder.mTvName.setText(bean.getName());
|
||||
holder.mTvPhone.setText(bean.getPhone());
|
||||
holder.mTvShip.setVisibility(View.GONE);
|
||||
holder.mTvPhone.setText("联系方式:" + (isEncrypt ? DesensitizationUtil.mobilePhone(bean.getPhone()) : bean.getPhone()));
|
||||
holder.mTvShip.setText("证件号码:" + (isEncrypt ? DesensitizationUtil.idCardNum(bean.getCardNum()) : bean.getCardNum()));
|
||||
if (canEdit) {
|
||||
holder.mBtnUnbind.setVisibility(View.VISIBLE);
|
||||
holder.mBtnLeave.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
holder.mBtnUnbind.setVisibility(View.GONE);
|
||||
holder.mBtnLeave.setVisibility(View.GONE);
|
||||
}
|
||||
holder.mBtnUnbind.setOnClickListener(v -> mEditListener.onDel(bean, i));
|
||||
holder.mBtnLeave.setOnClickListener(v -> mEditListener.onEdit(bean, i));
|
||||
}
|
||||
|
||||
public void setCanEdit(boolean isCan) {
|
||||
@ -50,6 +57,11 @@ public class HouseLivePersonAdapter extends BaseRecyclerAdapter<HouseLivePersonB
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void setEncrypt(boolean isCan) {
|
||||
this.isEncrypt = isCan;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
private OnEditListener mEditListener;
|
||||
|
||||
public void addOnEditListener(OnEditListener mListener) {
|
||||
|
@ -0,0 +1,56 @@
|
||||
package com.sucstepsoft.realtimelocation.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.Editable;
|
||||
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.HouseRoomInputHolder;
|
||||
import com.sucstepsoft.realtimelocation.beans.SaveGroupHouse;
|
||||
import com.sucstepsoft.realtimelocation.widget.SimpleTextWatch;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/11/24 - 9:16 AM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 楼层信息
|
||||
*/
|
||||
public class HouseRoomInputAdapter extends BaseRecyclerAdapter<SaveGroupHouse.ResultListBean.FloorListBean.HouseListBean, HouseRoomInputHolder> {
|
||||
public HouseRoomInputAdapter(Context ctx, List<SaveGroupHouse.ResultListBean.FloorListBean.HouseListBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HouseRoomInputHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_room_input, parent, false);
|
||||
return new HouseRoomInputHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(HouseRoomInputHolder holder, int i) {
|
||||
SaveGroupHouse.ResultListBean.FloorListBean.HouseListBean bean = mData.get(i);
|
||||
holder.mEtNum.setTag(i);
|
||||
holder.mEtNum.setText(bean.getHouseValue());
|
||||
holder.mEtNum.addTextChangedListener(new SimpleTextWatch() {
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
if ((int) holder.mEtNum.getTag() == i) {
|
||||
bean.setHouseValue(s.toString());
|
||||
}
|
||||
}
|
||||
});
|
||||
holder.mBtnDel.setOnClickListener(v -> {
|
||||
if (mData.size() > 1) {
|
||||
mData.remove(i);
|
||||
HouseRoomInputAdapter.this.setData(mData);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.sucstepsoft.realtimelocation.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
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.HouseRoomItemHolder;
|
||||
import com.sucstepsoft.realtimelocation.beans.ResultListBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/11/24 - 9:16 AM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 楼层信息
|
||||
*/
|
||||
public class HouseRoomItemAdapter extends BaseRecyclerAdapter<ResultListBean.RoomBean, HouseRoomItemHolder> {
|
||||
public HouseRoomItemAdapter(Context ctx, List<ResultListBean.RoomBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HouseRoomItemHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_room_item, parent, false);
|
||||
return new HouseRoomItemHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(HouseRoomItemHolder holder, int i) {
|
||||
ResultListBean.RoomBean bean = mData.get(i);
|
||||
holder.mRlvItems.setLayoutManager(new LinearLayoutManager(mContext));
|
||||
// holder.mBtnAdd.setOnClickListener(v -> {
|
||||
// //添加楼层
|
||||
// AddGroupHouseBean.RoomBean roomBean = new AddGroupHouseBean.RoomBean();
|
||||
// List<AddGroupHouseBean.RoomBean> data = adapter.getData();
|
||||
// data.add(roomBean);
|
||||
// adapter.setData(data);
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package com.sucstepsoft.realtimelocation.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.text.Editable;
|
||||
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.HouseUnitHolder;
|
||||
import com.sucstepsoft.realtimelocation.beans.ResultListBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.SaveGroupHouse;
|
||||
import com.sucstepsoft.realtimelocation.widget.SimpleTextWatch;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/11/24 - 9:16 AM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 单元信息
|
||||
*/
|
||||
public class HouseUnitAdapter extends BaseRecyclerAdapter<SaveGroupHouse.ResultListBean, HouseUnitHolder> {
|
||||
public HouseUnitAdapter(Context ctx, List<SaveGroupHouse.ResultListBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HouseUnitHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_unit_item, parent, false);
|
||||
return new HouseUnitHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(HouseUnitHolder holder, int i) {
|
||||
SaveGroupHouse.ResultListBean bean = mData.get(i);
|
||||
holder.mEtNum.setTag(i);
|
||||
holder.mEtNum.setText(bean.getUnitValue());
|
||||
holder.mBtnDel.setOnClickListener(v -> {
|
||||
if (mOnDelListener != null) {
|
||||
mOnDelListener.doDelUnit(bean, i);
|
||||
}
|
||||
});
|
||||
holder.mEtNum.addTextChangedListener(new SimpleTextWatch() {
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
if ((int) holder.mEtNum.getTag() == i) {
|
||||
bean.setUnitValue(s.toString());
|
||||
}
|
||||
}
|
||||
});
|
||||
holder.mRlvItems.setLayoutManager(new LinearLayoutManager(mContext));
|
||||
HouseFloorInputAdapter adapter = new HouseFloorInputAdapter(mContext, bean.getFloorList());
|
||||
holder.mRlvItems.setAdapter(adapter);
|
||||
holder.mBtnAdd.setOnClickListener(v -> {
|
||||
//添加楼层
|
||||
List<SaveGroupHouse.ResultListBean.FloorListBean> data = adapter.getData();
|
||||
SaveGroupHouse.ResultListBean.FloorListBean floorBean = new SaveGroupHouse.ResultListBean.FloorListBean();
|
||||
List<SaveGroupHouse.ResultListBean.FloorListBean.HouseListBean> roomList = new ArrayList<>();
|
||||
floorBean.setHouseList(roomList);
|
||||
SaveGroupHouse.ResultListBean.FloorListBean.HouseListBean roomBean = new SaveGroupHouse.ResultListBean.FloorListBean.HouseListBean();
|
||||
roomList.add(roomBean);
|
||||
data.add(floorBean);
|
||||
adapter.notifyDataSetChanged();
|
||||
});
|
||||
}
|
||||
|
||||
private OnDelListener mOnDelListener;
|
||||
|
||||
public void setDelListener(OnDelListener listener) {
|
||||
this.mOnDelListener = listener;
|
||||
}
|
||||
|
||||
public interface OnDelListener {
|
||||
void doDelUnit(SaveGroupHouse.ResultListBean bean, int pos);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除楼层
|
||||
*
|
||||
* @param pos
|
||||
*/
|
||||
public void doDelBean(int pos) {
|
||||
mData.remove(pos);
|
||||
this.setData(mData);
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
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.cm_utils.utils.UserLgUtils;
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
import com.sucstepsoft.realtimelocation.adapters.holders.CensusPersonClaimHolder;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.PersonBaseListBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/11/17 - 1:22 PM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 人口认领
|
||||
*/
|
||||
public class PersonBaseClaimAdapter extends BaseRecyclerAdapter<PersonBaseListBean.RowsBean, CensusPersonClaimHolder> {
|
||||
public PersonBaseClaimAdapter(Context ctx, List<PersonBaseListBean.RowsBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CensusPersonClaimHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_person_claim, parent, false);
|
||||
return new CensusPersonClaimHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(CensusPersonClaimHolder censusPersonHolder, int i) {
|
||||
PersonBaseListBean.RowsBean bean = mData.get(i);
|
||||
censusPersonHolder.mTvName.setText(bean.getName());
|
||||
censusPersonHolder.mTvLocation.setText("户籍地址:" + bean.getDomicileAreaName() + "/" + bean.getDomicileAddress());//现在住地
|
||||
censusPersonHolder.mTvNative.setText("性别:" + bean.getSex());
|
||||
censusPersonHolder.mTvPhone.setText("联系电话:" + bean.getPhone());
|
||||
if (!UserLgUtils.getUserId().equals(bean.getCreator())) {
|
||||
censusPersonHolder.mLlBtns.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
censusPersonHolder.mLlBtns.setVisibility(View.GONE);
|
||||
}
|
||||
censusPersonHolder.mBtnClaim.setOnClickListener(v -> mEditListener.onEdit(bean, i));
|
||||
}
|
||||
|
||||
private OnEditListener mEditListener;
|
||||
|
||||
public void addOnEditListener(OnEditListener mListener) {
|
||||
this.mEditListener = mListener;
|
||||
}
|
||||
|
||||
public interface OnEditListener {
|
||||
void onDel(PersonBaseListBean.RowsBean bean, int pos);
|
||||
|
||||
void onEdit(PersonBaseListBean.RowsBean bean, int pos);
|
||||
}
|
||||
}
|
@ -5,6 +5,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.bean.BindPersonBean;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
import com.sucstepsoft.realtimelocation.adapters.holders.CensusPersonLiveHouseHolder;
|
||||
@ -38,7 +39,17 @@ public class PersonBaseHouseLiveSelAdapter extends BaseRecyclerAdapter<PersonBas
|
||||
censusPersonHolder.mTvPhone.setText("联系电话:" + bean.getPhone());
|
||||
censusPersonHolder.mCb.setOnCheckedChangeListener(null);
|
||||
censusPersonHolder.mCb.setChecked(bean.isCheck());
|
||||
censusPersonHolder.mCb.setOnCheckedChangeListener((buttonView, isChecked) -> mLis.onItemCheckChange(bean, isChecked, i));
|
||||
censusPersonHolder.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(PersonBaseListBean.RowsBean bean, boolean isCheck, int pos);
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,8 @@ package com.sucstepsoft.realtimelocation.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.GradientDrawable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -37,12 +39,21 @@ public class PersonTagAdapter extends BaseRecyclerAdapter<PersonTag, PersonTagHo
|
||||
public void bindHolder(PersonTagHolder holder, int i) {
|
||||
holder.mTvName.setText(mData.get(i).getName());
|
||||
holder.mTvName.setChecked(mData.get(i).isCheck());
|
||||
holder.mTvName.setTextColor(Color.parseColor(mData.get(i).getColor()));
|
||||
holder.mTvName.setTextColor(Color.WHITE);
|
||||
GradientDrawable backDrawable = (GradientDrawable) mContext.getResources().getDrawable(R.drawable.shp_status_tag);
|
||||
backDrawable.setColor(Color.parseColor(mData.get(i).getColor()));
|
||||
holder.mTvName.setBackground(backDrawable);
|
||||
holder.mTvName.setEnabled(isEdit);
|
||||
if (isEdit) {
|
||||
Drawable drawable = mContext.getResources().getDrawable(R.drawable.sel_radio_white);
|
||||
drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
|
||||
holder.mTvName.setCompoundDrawables(drawable, null, null, null);
|
||||
holder.mTvName.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
holder.mTvName.setChecked(isChecked);
|
||||
mData.get(i).setCheck(isChecked);
|
||||
});
|
||||
} else {
|
||||
holder.mTvName.setCompoundDrawables(null, null, null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,52 @@
|
||||
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.retrofit_net.bean.BindPersonBean;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
import com.sucstepsoft.realtimelocation.adapters.holders.SelPersonHolder;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.PersonBaseListBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/11/24 - 9:16 AM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 选中的人员
|
||||
*/
|
||||
public class SelectedHousePersonAdapter extends BaseRecyclerAdapter<PersonBaseListBean.RowsBean, SelPersonHolder> {
|
||||
public List<PersonBaseListBean.RowsBean> mSelBeans = new ArrayList<>();
|
||||
|
||||
public SelectedHousePersonAdapter(Context ctx, List<PersonBaseListBean.RowsBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SelPersonHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_dept_selected, parent, false);
|
||||
return new SelPersonHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(SelPersonHolder holder, int i) {
|
||||
PersonBaseListBean.RowsBean bean = mData.get(i);
|
||||
holder.mTvName.setText(bean.getName());
|
||||
holder.mIvDel.setOnClickListener(v -> mOnDelListener.onDel(bean, i));
|
||||
}
|
||||
|
||||
private OnDelListener mOnDelListener;
|
||||
|
||||
public void addOnDelListener(OnDelListener listener) {
|
||||
this.mOnDelListener = listener;
|
||||
}
|
||||
|
||||
public interface OnDelListener {
|
||||
void onDel(PersonBaseListBean.RowsBean bean, int pos);
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
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.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/11/17 - 1:19 PM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class CensusPersonClaimHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvName;
|
||||
public TextView mTvLocation;
|
||||
public TextView mTvPhone;
|
||||
public TextView mTvNative;
|
||||
public View mLine;
|
||||
|
||||
public Button mBtnClaim;
|
||||
public LinearLayout mLlBtns;
|
||||
|
||||
public CensusPersonClaimHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mTvName = itemView.findViewById(R.id.tv_name);
|
||||
mTvLocation = itemView.findViewById(R.id.tv_location);
|
||||
mBtnClaim = itemView.findViewById(R.id.btn_claim);
|
||||
mTvNative = itemView.findViewById(R.id.tv_native);
|
||||
mTvPhone = itemView.findViewById(R.id.tv_phone);
|
||||
mLine= itemView.findViewById(R.id.line);
|
||||
mLlBtns= itemView.findViewById(R.id.ll_btns);
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.sucstepsoft.realtimelocation.adapters.holders;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
|
||||
/**
|
||||
* 单元信息
|
||||
*/
|
||||
public class HouseFloorHolder extends RecyclerView.ViewHolder {
|
||||
// public ImageView mBtnAdd;
|
||||
// public RecyclerView mRlvItems;
|
||||
public HouseFloorHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
// mRlvItems = itemView.findViewById(R.id.rlv_items);
|
||||
// mBtnAdd = itemView.findViewById(R.id.btn_add);
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.sucstepsoft.realtimelocation.adapters.holders;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
|
||||
/**
|
||||
* 单元信息
|
||||
*/
|
||||
public class HouseFloorInputHolder extends RecyclerView.ViewHolder {
|
||||
public EditText mEtNum;
|
||||
public RecyclerView mRlvItems;
|
||||
public ImageView mBtnDel;
|
||||
public ImageView mBtnAdd;
|
||||
|
||||
public HouseFloorInputHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mEtNum = itemView.findViewById(R.id.et_num);
|
||||
mRlvItems = itemView.findViewById(R.id.rlv_items);
|
||||
mBtnDel = itemView.findViewById(R.id.btn_del);
|
||||
mBtnAdd = itemView.findViewById(R.id.btn_add);
|
||||
}
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
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;
|
||||
@ -19,6 +18,7 @@ public class HousePersonHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvPhone;
|
||||
public Button mBtnUnbind;
|
||||
public TextView mTvShip;
|
||||
public Button mBtnLeave;
|
||||
|
||||
public HousePersonHolder(View itemView) {
|
||||
super(itemView);
|
||||
@ -26,5 +26,6 @@ public class HousePersonHolder extends RecyclerView.ViewHolder {
|
||||
mTvPhone = itemView.findViewById(R.id.tv_phone);
|
||||
mBtnUnbind = itemView.findViewById(R.id.btn_unbind);
|
||||
mTvShip = itemView.findViewById(R.id.tv_ship);
|
||||
mBtnLeave = itemView.findViewById(R.id.btn_leave);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,24 @@
|
||||
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.EditText;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
|
||||
/**
|
||||
* 房间信息
|
||||
*/
|
||||
public class HouseRoomInputHolder extends RecyclerView.ViewHolder {
|
||||
public EditText mEtNum;
|
||||
public ImageView mBtnDel;
|
||||
|
||||
public HouseRoomInputHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mEtNum = itemView.findViewById(R.id.et_num);
|
||||
mBtnDel = itemView.findViewById(R.id.btn_del);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
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.ImageView;
|
||||
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
|
||||
/**
|
||||
* 房间信息
|
||||
*/
|
||||
public class HouseRoomItemHolder extends RecyclerView.ViewHolder {
|
||||
public RecyclerView mRlvItems;
|
||||
|
||||
public HouseRoomItemHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mRlvItems = itemView.findViewById(R.id.rlv_items);
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.sucstepsoft.realtimelocation.adapters.holders;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
|
||||
/**
|
||||
* 单元信息
|
||||
*/
|
||||
public class HouseUnitHolder extends RecyclerView.ViewHolder {
|
||||
public EditText mEtNum;
|
||||
public RecyclerView mRlvItems;
|
||||
public ImageView mBtnDel;
|
||||
public ImageView mBtnAdd;
|
||||
|
||||
public HouseUnitHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mEtNum = itemView.findViewById(R.id.et_num);
|
||||
mRlvItems = itemView.findViewById(R.id.rlv_items);
|
||||
mBtnDel = itemView.findViewById(R.id.btn_del);
|
||||
mBtnAdd = itemView.findViewById(R.id.btn_add);
|
||||
}
|
||||
}
|
@ -30,7 +30,7 @@ public class NewHouseDetailBean {
|
||||
private String gmtModified;
|
||||
private String homeowner;
|
||||
private String houseId;
|
||||
private int houseNum;
|
||||
private String houseNum;
|
||||
private String houseType;
|
||||
private int isDelete;
|
||||
private int isRental;
|
||||
@ -282,11 +282,11 @@ public class NewHouseDetailBean {
|
||||
this.houseId = houseId;
|
||||
}
|
||||
|
||||
public int getHouseNum() {
|
||||
public String getHouseNum() {
|
||||
return houseNum;
|
||||
}
|
||||
|
||||
public void setHouseNum(int houseNum) {
|
||||
public void setHouseNum(String houseNum) {
|
||||
this.houseNum = houseNum;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,57 @@
|
||||
package com.sucstepsoft.realtimelocation.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ResultListBean {
|
||||
private List<FloorBean> floorList;
|
||||
private String unitValue;
|
||||
|
||||
public List<FloorBean> getFloorList() {
|
||||
return floorList;
|
||||
}
|
||||
|
||||
public void setFloorList(List<FloorBean> floorList) {
|
||||
this.floorList = floorList;
|
||||
}
|
||||
|
||||
public String getUnitValue() {
|
||||
return unitValue;
|
||||
}
|
||||
|
||||
public void setUnitValue(String unitValue) {
|
||||
this.unitValue = unitValue;
|
||||
}
|
||||
|
||||
public static class FloorBean {
|
||||
private String floorValue;
|
||||
private List<RoomBean> houseList;
|
||||
|
||||
public String getFloorValue() {
|
||||
return floorValue;
|
||||
}
|
||||
|
||||
public void setFloorValue(String floorValue) {
|
||||
this.floorValue = floorValue;
|
||||
}
|
||||
|
||||
public List<RoomBean> getHouseList() {
|
||||
return houseList;
|
||||
}
|
||||
|
||||
public void setHouseList(List<RoomBean> houseList) {
|
||||
this.houseList = houseList;
|
||||
}
|
||||
}
|
||||
|
||||
public static class RoomBean {
|
||||
private String houseValue;
|
||||
|
||||
public String getHouseValue() {
|
||||
return houseValue;
|
||||
}
|
||||
|
||||
public void setHouseValue(String houseValue) {
|
||||
this.houseValue = houseValue;
|
||||
}
|
||||
}
|
||||
}
|
@ -6,7 +6,9 @@ public class SaveBindLiveHousePerson {
|
||||
private String cardNum;
|
||||
private String houseId;
|
||||
private String name;
|
||||
private String outHouse;
|
||||
private String phone;
|
||||
private String populationId;
|
||||
private String populationInfoId;
|
||||
|
||||
public String getBindTime() {
|
||||
@ -41,6 +43,14 @@ public class SaveBindLiveHousePerson {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getOutHouse() {
|
||||
return outHouse;
|
||||
}
|
||||
|
||||
public void setOutHouse(String outHouse) {
|
||||
this.outHouse = outHouse;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
@ -49,6 +59,14 @@ public class SaveBindLiveHousePerson {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getPopulationId() {
|
||||
return populationId;
|
||||
}
|
||||
|
||||
public void setPopulationId(String populationId) {
|
||||
this.populationId = populationId;
|
||||
}
|
||||
|
||||
public String getPopulationInfoId() {
|
||||
return populationInfoId;
|
||||
}
|
||||
|
@ -0,0 +1,224 @@
|
||||
package com.sucstepsoft.realtimelocation.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SaveGroupHouse {
|
||||
|
||||
private String address;
|
||||
private int buildNum;
|
||||
private String community;
|
||||
private String communityName;
|
||||
private int floorsNum;
|
||||
private String image;
|
||||
private String latitude;
|
||||
private String longitude;
|
||||
private String name;
|
||||
private String residentialId;
|
||||
private String residentialName;
|
||||
private List<ResultListBean> resultList;
|
||||
private String buildingId;
|
||||
private String buildingName;
|
||||
private String street;
|
||||
private String streetName;
|
||||
private int unitNum;
|
||||
|
||||
private String floorUnitHouseCount;
|
||||
|
||||
public String getFloorUnitHouseCount() {
|
||||
return floorUnitHouseCount;
|
||||
}
|
||||
|
||||
public void setFloorUnitHouseCount(String floorUnitHouseCount) {
|
||||
this.floorUnitHouseCount = floorUnitHouseCount;
|
||||
}
|
||||
|
||||
public String getBuildingName() {
|
||||
return buildingName;
|
||||
}
|
||||
|
||||
public void setBuildingName(String buildingName) {
|
||||
this.buildingName = buildingName;
|
||||
}
|
||||
|
||||
public String getBuildingId() {
|
||||
return buildingId;
|
||||
}
|
||||
|
||||
public void setBuildingId(String buildingId) {
|
||||
this.buildingId = buildingId;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public int getBuildNum() {
|
||||
return buildNum;
|
||||
}
|
||||
|
||||
public void setBuildNum(int buildNum) {
|
||||
this.buildNum = buildNum;
|
||||
}
|
||||
|
||||
public String getCommunity() {
|
||||
return community;
|
||||
}
|
||||
|
||||
public void setCommunity(String community) {
|
||||
this.community = community;
|
||||
}
|
||||
|
||||
public String getCommunityName() {
|
||||
return communityName;
|
||||
}
|
||||
|
||||
public void setCommunityName(String communityName) {
|
||||
this.communityName = communityName;
|
||||
}
|
||||
|
||||
public int getFloorsNum() {
|
||||
return floorsNum;
|
||||
}
|
||||
|
||||
public void setFloorsNum(int floorsNum) {
|
||||
this.floorsNum = floorsNum;
|
||||
}
|
||||
|
||||
public String getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(String image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public String getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public void setLatitude(String latitude) {
|
||||
this.latitude = latitude;
|
||||
}
|
||||
|
||||
public String getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public void setLongitude(String longitude) {
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getResidentialId() {
|
||||
return residentialId;
|
||||
}
|
||||
|
||||
public void setResidentialId(String residentialId) {
|
||||
this.residentialId = residentialId;
|
||||
}
|
||||
|
||||
public String getResidentialName() {
|
||||
return residentialName;
|
||||
}
|
||||
|
||||
public void setResidentialName(String residentialName) {
|
||||
this.residentialName = residentialName;
|
||||
}
|
||||
|
||||
public List<ResultListBean> getResultList() {
|
||||
return resultList;
|
||||
}
|
||||
|
||||
public void setResultList(List<ResultListBean> resultList) {
|
||||
this.resultList = resultList;
|
||||
}
|
||||
|
||||
public String getStreet() {
|
||||
return street;
|
||||
}
|
||||
|
||||
public void setStreet(String street) {
|
||||
this.street = street;
|
||||
}
|
||||
|
||||
public String getStreetName() {
|
||||
return streetName;
|
||||
}
|
||||
|
||||
public void setStreetName(String streetName) {
|
||||
this.streetName = streetName;
|
||||
}
|
||||
|
||||
public int getUnitNum() {
|
||||
return unitNum;
|
||||
}
|
||||
|
||||
public void setUnitNum(int unitNum) {
|
||||
this.unitNum = unitNum;
|
||||
}
|
||||
|
||||
public static class ResultListBean {
|
||||
private List<FloorListBean> floorList;
|
||||
private String unitValue;
|
||||
|
||||
public List<FloorListBean> getFloorList() {
|
||||
return floorList;
|
||||
}
|
||||
|
||||
public void setFloorList(List<FloorListBean> floorList) {
|
||||
this.floorList = floorList;
|
||||
}
|
||||
|
||||
public String getUnitValue() {
|
||||
return unitValue;
|
||||
}
|
||||
|
||||
public void setUnitValue(String unitValue) {
|
||||
this.unitValue = unitValue;
|
||||
}
|
||||
|
||||
public static class FloorListBean {
|
||||
private String floorValue;
|
||||
private List<HouseListBean> houseList;
|
||||
|
||||
public String getFloorValue() {
|
||||
return floorValue;
|
||||
}
|
||||
|
||||
public void setFloorValue(String floorValue) {
|
||||
this.floorValue = floorValue;
|
||||
}
|
||||
|
||||
public List<HouseListBean> getHouseList() {
|
||||
return houseList;
|
||||
}
|
||||
|
||||
public void setHouseList(List<HouseListBean> houseList) {
|
||||
this.houseList = houseList;
|
||||
}
|
||||
|
||||
public static class HouseListBean {
|
||||
private String houseValue;
|
||||
|
||||
public String getHouseValue() {
|
||||
return houseValue;
|
||||
}
|
||||
|
||||
public void setHouseValue(String houseValue) {
|
||||
this.houseValue = houseValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +1,11 @@
|
||||
package com.sucstepsoft.realtimelocation.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SaveNewHouseBean {
|
||||
|
||||
private String affiliatedUnit;
|
||||
private int affiliationFloors;
|
||||
private String affiliationFloors;
|
||||
private int affiliationUnit;
|
||||
private String buildingId;
|
||||
private String buildingName;
|
||||
@ -25,7 +27,8 @@ public class SaveNewHouseBean {
|
||||
private String documentName;
|
||||
private String documentNum;
|
||||
private String homeowner;
|
||||
private int houseNum;
|
||||
private String houseNum;
|
||||
private String houseValue;
|
||||
private int isRental;
|
||||
private int isVacant;
|
||||
private String lodgeTypeId;
|
||||
@ -33,6 +36,7 @@ public class SaveNewHouseBean {
|
||||
private String natureId;
|
||||
private String natureName;
|
||||
private String phone;
|
||||
private List<PopulationVOListBean> populationVOList;
|
||||
private String registrationDate;
|
||||
private String relationshipHomeowner;
|
||||
private String rentalPurposes;
|
||||
@ -57,11 +61,11 @@ public class SaveNewHouseBean {
|
||||
this.affiliatedUnit = affiliatedUnit;
|
||||
}
|
||||
|
||||
public int getAffiliationFloors() {
|
||||
public String getAffiliationFloors() {
|
||||
return affiliationFloors;
|
||||
}
|
||||
|
||||
public void setAffiliationFloors(int affiliationFloors) {
|
||||
public void setAffiliationFloors(String affiliationFloors) {
|
||||
this.affiliationFloors = affiliationFloors;
|
||||
}
|
||||
|
||||
@ -233,14 +237,22 @@ public class SaveNewHouseBean {
|
||||
this.homeowner = homeowner;
|
||||
}
|
||||
|
||||
public int getHouseNum() {
|
||||
public String getHouseNum() {
|
||||
return houseNum;
|
||||
}
|
||||
|
||||
public void setHouseNum(int houseNum) {
|
||||
public void setHouseNum(String houseNum) {
|
||||
this.houseNum = houseNum;
|
||||
}
|
||||
|
||||
public String getHouseValue() {
|
||||
return houseValue;
|
||||
}
|
||||
|
||||
public void setHouseValue(String houseValue) {
|
||||
this.houseValue = houseValue;
|
||||
}
|
||||
|
||||
public int getIsRental() {
|
||||
return isRental;
|
||||
}
|
||||
@ -297,6 +309,14 @@ public class SaveNewHouseBean {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public List<PopulationVOListBean> getPopulationVOList() {
|
||||
return populationVOList;
|
||||
}
|
||||
|
||||
public void setPopulationVOList(List<PopulationVOListBean> populationVOList) {
|
||||
this.populationVOList = populationVOList;
|
||||
}
|
||||
|
||||
public String getRegistrationDate() {
|
||||
return registrationDate;
|
||||
}
|
||||
@ -416,4 +436,79 @@ public class SaveNewHouseBean {
|
||||
public void setTypeName(String typeName) {
|
||||
this.typeName = typeName;
|
||||
}
|
||||
|
||||
public static class PopulationVOListBean {
|
||||
private String bindTime;
|
||||
private String cardNum;
|
||||
private String houseId;
|
||||
private String name;
|
||||
private String outHouse;
|
||||
private String phone;
|
||||
private String populationId;
|
||||
private String populationInfoId;
|
||||
|
||||
public String getBindTime() {
|
||||
return bindTime;
|
||||
}
|
||||
|
||||
public void setBindTime(String bindTime) {
|
||||
this.bindTime = bindTime;
|
||||
}
|
||||
|
||||
public String getCardNum() {
|
||||
return cardNum;
|
||||
}
|
||||
|
||||
public void setCardNum(String cardNum) {
|
||||
this.cardNum = cardNum;
|
||||
}
|
||||
|
||||
public String getHouseId() {
|
||||
return houseId;
|
||||
}
|
||||
|
||||
public void setHouseId(String houseId) {
|
||||
this.houseId = houseId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getOutHouse() {
|
||||
return outHouse;
|
||||
}
|
||||
|
||||
public void setOutHouse(String outHouse) {
|
||||
this.outHouse = outHouse;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getPopulationId() {
|
||||
return populationId;
|
||||
}
|
||||
|
||||
public void setPopulationId(String populationId) {
|
||||
this.populationId = populationId;
|
||||
}
|
||||
|
||||
public String getPopulationInfoId() {
|
||||
return populationInfoId;
|
||||
}
|
||||
|
||||
public void setPopulationInfoId(String populationInfoId) {
|
||||
this.populationInfoId = populationInfoId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.sucstepsoft.realtimelocation.beans.person;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class PersonBaseListBean {
|
||||
@ -32,7 +33,7 @@ public class PersonBaseListBean {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public static class RowsBean {
|
||||
public static class RowsBean implements Serializable {
|
||||
private String populationInfoId;
|
||||
private String name;
|
||||
private String idcard;
|
||||
|
@ -825,6 +825,13 @@ public interface LocationApiService {
|
||||
@POST("app/populationinfo/save")
|
||||
Observable<SuccessBean> doSaveCensusRegister(@Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 未脱敏的人员信息
|
||||
*/
|
||||
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/populationinfo/list")
|
||||
Observable<List<PersonBaseListBean.RowsBean>> getListByIds(@Query("populationInfoIds") String ids, @Header("token") String token);
|
||||
|
||||
|
||||
/**
|
||||
* 基础信息人员列表-新
|
||||
@ -848,6 +855,8 @@ public interface LocationApiService {
|
||||
@DELETE("app/populationinfo/remove/{ids}")
|
||||
Observable<SuccessBean> doDelBaseRegister(@Path("ids") String id, @Header("token") String token);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
@ -1618,7 +1627,14 @@ public interface LocationApiService {
|
||||
/*==================================TODO=========房屋===========================================*/
|
||||
|
||||
/**
|
||||
* 保存楼宇信息
|
||||
* 批量建房
|
||||
*/
|
||||
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
|
||||
@POST("app/house/saveAuto")
|
||||
Observable<SuccessBean> doSaveNewHouseAuto(@Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 保存房屋信息
|
||||
*/
|
||||
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
|
||||
@POST("app/house/save")
|
||||
@ -1781,6 +1797,13 @@ public interface LocationApiService {
|
||||
@POST("app/buildinghouse/save")
|
||||
Observable<SuccessBean> doSaveHouse(@Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 批量信息房屋
|
||||
*/
|
||||
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
|
||||
@POST("app/house/saveBatch")
|
||||
Observable<SuccessBean> doSaveGroupHouse(@Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 获取房屋详情
|
||||
*/
|
||||
@ -1816,6 +1839,13 @@ public interface LocationApiService {
|
||||
@POST("app/buildinghouseuser/save")
|
||||
Observable<SuccessBean> doBindPerson(@Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 认领人员
|
||||
*/
|
||||
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
|
||||
@POST("app/populationlog/save/{populationInfoIds}")
|
||||
Observable<SuccessBean> doClaimPerson(@Path("populationInfoIds") String ids, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 绑定人员
|
||||
*/
|
||||
|
@ -45,7 +45,7 @@ public class BuildingPopup extends BasePopupWindow {
|
||||
if (isCheck) {
|
||||
if (true) {
|
||||
for (int i = 0; i < adapter.getData().size(); i++) {
|
||||
if (!adapter.getData().get(i).getResidentialId().equals(bean.getResidentialId())) {
|
||||
if (!adapter.getData().get(i).getBuildingId().equals(bean.getBuildingId())) {
|
||||
adapter.getData().get(i).setCheck(false);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,33 @@
|
||||
package com.sucstepsoft.realtimelocation.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import com.sucstepsoft.cm_utils.utils.ConvertUtils;
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
|
||||
public class CustomLinearLayout extends LinearLayout {
|
||||
public CustomLinearLayout(Context context) {
|
||||
super(context);
|
||||
initView();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
|
||||
this.setBackgroundResource(R.color.white);
|
||||
this.setOrientation(VERTICAL);
|
||||
this.setPadding(ConvertUtils.dp2px(20), 0, ConvertUtils.dp2px(20), ConvertUtils.dp2px(10));
|
||||
this.setLayoutParams(params);
|
||||
}
|
||||
|
||||
public CustomLinearLayout(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public CustomLinearLayout(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.sucstepsoft.realtimelocation.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import com.sucstepsoft.cm_utils.utils.ConvertUtils;
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
|
||||
public class InputOriContent extends LinearLayout {
|
||||
public InputOriContent(Context context) {
|
||||
super(context);
|
||||
initView(context);
|
||||
}
|
||||
|
||||
private void initView(Context context) {
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
|
||||
this.setBackgroundResource(R.drawable.shp_rectangle_bottom_border);
|
||||
this.setOrientation(HORIZONTAL);
|
||||
this.setPadding(0, ConvertUtils.dp2px(5), 0, ConvertUtils.dp2px(5));
|
||||
}
|
||||
|
||||
public InputOriContent(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public InputOriContent(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.sucstepsoft.realtimelocation.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.Gravity;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import com.sucstepsoft.cm_utils.utils.ConvertUtils;
|
||||
|
||||
public class InputView extends android.support.v7.widget.AppCompatEditText {
|
||||
public InputView(Context context) {
|
||||
super(context);
|
||||
initView(context);
|
||||
}
|
||||
|
||||
private void initView(Context ctx) {
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1.0f);
|
||||
this.setBackground(null);
|
||||
this.setGravity(Gravity.RIGHT);
|
||||
int padding = ConvertUtils.dp2px(5);
|
||||
this.setPadding(padding, padding, padding, padding);
|
||||
this.setTextSize(14);
|
||||
this.setLayoutParams(params);
|
||||
}
|
||||
|
||||
public InputView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.sucstepsoft.realtimelocation.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import com.sucstepsoft.cm_utils.utils.ConvertUtils;
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
|
||||
public class SecondContent extends LinearLayout {
|
||||
public SecondContent(Context context) {
|
||||
super(context);
|
||||
initView();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
|
||||
this.setBackgroundResource(R.color.white);
|
||||
this.setOrientation(VERTICAL);
|
||||
this.setPadding(ConvertUtils.dp2px(10), ConvertUtils.dp2px(5), 0, ConvertUtils.dp2px(5));
|
||||
this.setLayoutParams(params);
|
||||
}
|
||||
|
||||
public SecondContent(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public SecondContent(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.sucstepsoft.realtimelocation.widget;
|
||||
|
||||
import android.text.TextWatcher;
|
||||
|
||||
public abstract class SimpleTextWatch implements TextWatcher {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.sucstepsoft.realtimelocation.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
|
||||
public class TitleContent extends RelativeLayout {
|
||||
public TitleContent(Context context) {
|
||||
super(context);
|
||||
initView();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
|
||||
this.setLayoutParams(params);
|
||||
}
|
||||
|
||||
public TitleContent(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public TitleContent(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.sucstepsoft.realtimelocation.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import com.sucstepsoft.cm_utils.utils.ConvertUtils;
|
||||
|
||||
public class TitleTextView extends android.support.v7.widget.AppCompatTextView {
|
||||
public TitleTextView(Context context) {
|
||||
super(context);
|
||||
initView(context);
|
||||
}
|
||||
|
||||
private void initView(Context context) {
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||
int padding = ConvertUtils.dp2px(2);
|
||||
this.setPadding(padding, padding, padding, padding);
|
||||
this.setTextColor(Color.BLACK);
|
||||
this.setTextSize(14);
|
||||
this.setLayoutParams(params);
|
||||
}
|
||||
|
||||
public TitleTextView(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public TitleTextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
}
|
BIN
app/src/main/res/drawable-xhdpi/ic_add_floor_icon.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_add_icon.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_del_icon.png
Normal file
After Width: | Height: | Size: 590 B |
BIN
app/src/main/res/drawable-xhdpi/ic_floor_add_icon.png
Normal file
After Width: | Height: | Size: 715 B |
BIN
app/src/main/res/drawable-xhdpi/ic_floor_del_icon.png
Normal file
After Width: | Height: | Size: 624 B |
BIN
app/src/main/res/drawable-xhdpi/ic_house_add_icon.png
Normal file
After Width: | Height: | Size: 610 B |
BIN
app/src/main/res/drawable-xhdpi/ic_house_del_icon.png
Normal file
After Width: | Height: | Size: 1016 B |
BIN
app/src/main/res/drawable-xhdpi/ic_scroll_bar_line.png
Normal file
After Width: | Height: | Size: 162 B |
5
app/src/main/res/drawable/sel_radio_white.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/ic_radio_circle_normal" android:state_checked="false" />
|
||||
<item android:drawable="@drawable/ic_radio_circle_sel" android:state_checked="true" />
|
||||
</selector>
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/text_blue" />
|
||||
<solid android:color="@color/titleBar" />
|
||||
|
||||
</shape>
|
6
app/src/main/res/drawable/shp_scroll_bar.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/blue_title_bg" />
|
||||
<corners android:radius="72dp" />
|
||||
</shape>
|
@ -141,7 +141,7 @@
|
||||
android:drawableLeft="@drawable/ic_item_title_icon_rec"
|
||||
android:drawablePadding="5dp"
|
||||
android:padding="8dp"
|
||||
android:text="基础信息"
|
||||
android:text="地理信息"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
@ -197,7 +197,7 @@
|
||||
android:drawableLeft="@drawable/ic_item_title_icon_rec"
|
||||
android:drawablePadding="5dp"
|
||||
android:padding="8dp"
|
||||
android:text="基础信息"
|
||||
android:text="照片信息"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
|
366
app/src/main/res/layout/activity_add_new_group_house.xml
Normal file
@ -0,0 +1,366 @@
|
||||
<?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.support.v4.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="80dp"
|
||||
android:orientation="vertical"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/issue_report_title"
|
||||
android:drawableLeft="@drawable/ic_item_title_icon_rec"
|
||||
android:drawablePadding="5dp"
|
||||
android:padding="8dp"
|
||||
android:text="基础信息"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp">
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:text="街道" />
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_street"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择所在街道" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:text="社区" />
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_community"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择所在社区" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:text="小区" />
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_community_area"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择所在小区" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:text="楼/排" />
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_building"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择所在楼/排" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_white_bottom_border"
|
||||
android:visibility="gone">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="楼排名称" />
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:visibility="gone" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_building_name"
|
||||
style="@style/item_content_match"
|
||||
android:hint="请输入楼排名称" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_white_bottom_border"
|
||||
android:visibility="gone">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="楼/排号" />
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:visibility="gone" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_building_num"
|
||||
style="@style/item_content_match"
|
||||
android:hint="请输入楼排号" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_white_bottom_border"
|
||||
android:visibility="gone">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="楼层数" />
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_floor_num"
|
||||
style="@style/item_content_match"
|
||||
android:hint="请输入楼层数"
|
||||
android:inputType="number" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_white_bottom_border"
|
||||
android:visibility="gone">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="单元/排数" />
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_unit_num"
|
||||
style="@style/item_content_match"
|
||||
android:hint="请输入单元/排数"
|
||||
android:inputType="number" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/issue_report_title"
|
||||
android:drawableLeft="@drawable/ic_item_title_icon_rec"
|
||||
android:drawablePadding="5dp"
|
||||
android:padding="8dp"
|
||||
android:visibility="gone"
|
||||
android:text="地理信息"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:visibility="gone"
|
||||
android:paddingRight="20dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_white_ver">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_loc_lng"
|
||||
style="@style/item_title_wrap"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:drawableRight="@drawable/ic_arrow_sort_gray"
|
||||
android:text="地图位置(点击进行地图选址)" />
|
||||
|
||||
|
||||
<com.sucstepsoft.realtimelocation.widget.NoScrollMapView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:layout_marginTop="5dp">
|
||||
|
||||
<com.baidu.mapapi.map.TextureMapView
|
||||
android:id="@+id/mp_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp" />
|
||||
|
||||
|
||||
</com.sucstepsoft.realtimelocation.widget.NoScrollMapView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_point"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/gray_fa"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
tools:text="坐标:22222223413241234" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="详细地址" />
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:visibility="gone" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_address"
|
||||
style="@style/item_content_match"
|
||||
android:hint="请输入详细地址" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/issue_report_title"
|
||||
android:drawableLeft="@drawable/ic_item_title_icon_rec"
|
||||
android:drawablePadding="5dp"
|
||||
android:visibility="gone"
|
||||
android:padding="8dp"
|
||||
android:text="照片信息"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_white_ver">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="照片" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_photo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_rectangle_gray_5" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp">
|
||||
|
||||
<TextView
|
||||
style="@style/issue_report_title"
|
||||
android:drawableLeft="@drawable/ic_item_title_icon_rec"
|
||||
android:drawablePadding="5dp"
|
||||
android:padding="8dp"
|
||||
android:text="单元/房屋信息"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_add_unit"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="20dp"
|
||||
android:src="@drawable/ic_add_icon" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_units"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:itemCount="1"
|
||||
tools:layoutManager="LinearLayoutManager"
|
||||
tools:listitem="@layout/item_unit_item" />
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:minHeight="0dp"
|
||||
android:padding="10dp"
|
||||
android:text="保    存"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
171
app/src/main/res/layout/activity_add_new_group_rule_house.xml
Normal file
@ -0,0 +1,171 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="80dp"
|
||||
android:orientation="vertical"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/issue_report_title"
|
||||
android:drawableLeft="@drawable/ic_item_title_icon_rec"
|
||||
android:drawablePadding="5dp"
|
||||
android:padding="8dp"
|
||||
android:text="基础信息"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp">
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:text="街道" />
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_street"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择所在街道" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:text="社区" />
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_community"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择所在社区" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:text="小区" />
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_community_area"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择所在小区" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:text="楼/排" />
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_building_num"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择所在楼/排" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp">
|
||||
|
||||
<TextView
|
||||
style="@style/issue_report_title"
|
||||
android:drawableLeft="@drawable/ic_item_title_icon_rec"
|
||||
android:drawablePadding="5dp"
|
||||
android:padding="8dp"
|
||||
android:text="单元/房屋信息"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp">
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:text="户数" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_room"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:inputType="number"
|
||||
android:hint="请输入每单元每层有多少户" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:minHeight="0dp"
|
||||
android:padding="10dp"
|
||||
android:text="保    存"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
@ -1,24 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_content"
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="80dp"
|
||||
android:orientation="vertical"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/issue_report_title"
|
||||
android:drawableLeft="@drawable/ic_item_title_icon_rec"
|
||||
@ -144,8 +144,7 @@
|
||||
android:id="@+id/et_door"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:hint="请输入门牌号"
|
||||
android:inputType="number" />
|
||||
android:hint="请输入门牌号" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@ -158,7 +157,8 @@
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical" />
|
||||
android:layout_gravity="center_vertical"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_house_type"
|
||||
@ -176,7 +176,8 @@
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical" />
|
||||
android:layout_gravity="center_vertical"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_house_property"
|
||||
@ -193,7 +194,8 @@
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical" />
|
||||
android:layout_gravity="center_vertical"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_house_kind"
|
||||
@ -210,7 +212,8 @@
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical" />
|
||||
android:layout_gravity="center_vertical"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_house_frame"
|
||||
@ -227,7 +230,8 @@
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical" />
|
||||
android:layout_gravity="center_vertical"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_build_use"
|
||||
@ -244,7 +248,8 @@
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical" />
|
||||
android:layout_gravity="center_vertical"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_house_use"
|
||||
@ -261,7 +266,8 @@
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:layout_gravity="center_vertical" />
|
||||
android:layout_gravity="center_vertical"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_trouble"
|
||||
@ -408,8 +414,8 @@
|
||||
|
||||
<ImageView
|
||||
style="@style/style_hint_star"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center_vertical" />
|
||||
android:layout_gravity="center_vertical"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_renting_type"
|
||||
@ -651,18 +657,90 @@
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_confirm"
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_live_person"
|
||||
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="保    存"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp" />
|
||||
</LinearLayout>
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
style="@style/issue_report_title"
|
||||
android:drawableLeft="@drawable/ic_item_title_icon_rec"
|
||||
android:drawablePadding="5dp"
|
||||
android:padding="8dp"
|
||||
android:text="居住人"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_add_person"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@drawable/sel_btn_blue_gray"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:text="人员入住"
|
||||
android:textColor="@color/col_white_black"
|
||||
android:textSize="14dp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="2dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:text="添加居住人员" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_live_person"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_margin="15dp"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:minHeight="0dp"
|
||||
android:padding="10dp"
|
||||
android:text="保    存"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
63
app/src/main/res/layout/activity_census_claim_list.xml
Normal file
@ -0,0 +1,63 @@
|
||||
<?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">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_mine"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/sel_btn_submit_gray_left_no_ra"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="40dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="40dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="我的"
|
||||
android:textColor="@drawable/sel_btn_text_white_black" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_all"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/sel_btn_submit_gray_left_no_ra"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="40dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="40dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:text="全部人口"
|
||||
android:textColor="@drawable/sel_btn_text_white_black" />
|
||||
</RadioGroup>
|
||||
|
||||
<include layout="@layout/item_search" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.jcodecraeer.xrecyclerview.XRecyclerView
|
||||
android:id="@+id/xlv_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp" />
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.CustomStateView
|
||||
android:id="@+id/csv_state"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
@ -178,7 +178,6 @@
|
||||
style="@style/item_title_wrap"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:drawableRight="@drawable/ic_arrow_sort_gray"
|
||||
android:text="地图位置" />
|
||||
|
||||
|
||||
|
@ -26,6 +26,36 @@
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_person"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_select"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="30dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="请选择人员" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_single"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
@ -48,7 +78,8 @@
|
||||
android:id="@+id/et_name"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:hint="请输入姓名"
|
||||
android:enabled="false"
|
||||
android:hint="请选择人员姓名"
|
||||
android:inputType="textMultiLine" />
|
||||
</LinearLayout>
|
||||
|
||||
@ -67,7 +98,8 @@
|
||||
<EditText
|
||||
android:id="@+id/et_id_card"
|
||||
style="@style/item_content_match"
|
||||
android:hint="请输入证件号码" />
|
||||
android:enabled="false"
|
||||
android:hint="请选择证件号码" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -87,7 +119,8 @@
|
||||
<EditText
|
||||
android:id="@+id/et_phone"
|
||||
style="@style/item_content_match"
|
||||
android:hint="请输入联系方式" />
|
||||
android:enabled="false"
|
||||
android:hint="请选择联系方式" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -42,6 +42,7 @@
|
||||
android:id="@+id/et_name"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:enabled="false"
|
||||
android:hint="请输入姓名"
|
||||
android:inputType="textMultiLine" />
|
||||
</LinearLayout>
|
||||
@ -61,6 +62,7 @@
|
||||
<EditText
|
||||
android:id="@+id/et_id_card"
|
||||
style="@style/item_content_match"
|
||||
android:enabled="false"
|
||||
android:hint="请输入证件号码" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -81,6 +83,7 @@
|
||||
<EditText
|
||||
android:id="@+id/et_phone"
|
||||
style="@style/item_content_match"
|
||||
android:enabled="false"
|
||||
android:hint="请输入联系方式" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -97,11 +100,16 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_margin="15dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:minHeight="0dp"
|
||||
android:padding="10dp"
|
||||
android:text="保    存"
|
||||
android:text="人员离开"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp" />
|
||||
</RelativeLayout>
|
62
app/src/main/res/layout/item_floor_input.xml
Normal file
@ -0,0 +1,62 @@
|
||||
<?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:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="10dp">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_white_bottom_border"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="层/院号" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_num"
|
||||
style="@style/item_content_match"
|
||||
android:imeOptions="actionNext"
|
||||
android:singleLine="true"
|
||||
android:hint="请输入层/院号" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_del"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:src="@drawable/ic_floor_del_icon" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout style="@style/item_white_bottom_border" android:paddingLeft="10dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="门牌号"
|
||||
android:textColor="@color/blue_title_bg"
|
||||
android:textSize="@dimen/text_16" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_add"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_house_add_icon" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_items"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:paddingLeft="10dp"
|
||||
tools:itemCount="1"
|
||||
tools:layoutManager="LinearLayoutManager"
|
||||
tools:listitem="@layout/item_room_input" />
|
||||
</LinearLayout>
|
13
app/src/main/res/layout/item_floor_item.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?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="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="楼层" />
|
||||
</LinearLayout>
|
@ -81,5 +81,10 @@
|
||||
android:textSize="12dp"
|
||||
tools:text="中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067(包哈公里)" />
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/shp_line_dotted"
|
||||
android:layerType="software" />
|
||||
</LinearLayout>
|
95
app/src/main/res/layout/item_person_claim.xml
Normal file
@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/shape_rectangle_white"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_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>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_btns"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_claim"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="认领"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/line"
|
||||
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>
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
@ -10,12 +10,15 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/sel_service_type"
|
||||
android:button="@null"
|
||||
android:paddingLeft="4dp"
|
||||
android:drawableRight="@drawable/sel_radio_white"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingRight="4dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14dp"
|
||||
tools:background="@drawable/shp_status_tag"
|
||||
tools:text="帮扶老人" />
|
||||
</LinearLayout>
|
@ -58,21 +58,47 @@
|
||||
android:textSize="12sp"
|
||||
tools:text="联系电话" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_unbind"
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/sel_btn_gray_white"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingBottom="3dp"
|
||||
android:text="删除"
|
||||
android:textColor="@color/col_gray_black"
|
||||
android:visibility="visible" />
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_leave"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/sel_rectangle_btn_blue_gray"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingBottom="3dp"
|
||||
android:text="离开"
|
||||
android:textColor="@color/col_white_black"
|
||||
android:visibility="visible" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_unbind"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@drawable/sel_btn_gray_white"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingBottom="3dp"
|
||||
android:text="删除"
|
||||
android:textColor="@color/col_gray_black"
|
||||
android:visibility="visible" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
30
app/src/main/res/layout/item_room_input.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<?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="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_white_bottom_border"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="门牌号" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_num"
|
||||
style="@style/item_content_match"
|
||||
android:imeOptions="actionNext"
|
||||
android:singleLine="true"
|
||||
android:hint="请输入门牌号" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_del"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:src="@drawable/ic_house_del_icon" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
17
app/src/main/res/layout/item_room_item.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?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:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_items"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:itemCount="1"
|
||||
tools:layoutManager="LinearLayoutManager"
|
||||
tools:listitem="@layout/item_room_input" />
|
||||
</LinearLayout>
|
64
app/src/main/res/layout/item_unit_item.xml
Normal file
@ -0,0 +1,64 @@
|
||||
<?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_marginTop="10dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_white_bottom_border"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="单元/列" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_num"
|
||||
style="@style/item_content_match"
|
||||
android:imeOptions="actionNext"
|
||||
android:singleLine="true"
|
||||
android:hint="请输入单元/列号" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_del"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:src="@drawable/ic_del_icon" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout style="@style/item_white_bottom_border">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="层/院"
|
||||
android:textColor="@color/blue_title_bg"
|
||||
android:textSize="@dimen/text_16" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_add"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_floor_add_icon" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_items"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
tools:itemCount="1"
|
||||
tools:layoutManager="LinearLayoutManager"
|
||||
tools:listitem="@layout/item_floor_input" />
|
||||
</LinearLayout>
|
@ -9,5 +9,10 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_rectangle_white_nora"
|
||||
android:padding="5dp" />
|
||||
android:padding="5dp"
|
||||
android:scrollbarStyle="insideOverlay"
|
||||
android:scrollbarThumbVertical="@drawable/shp_scroll_bar"
|
||||
android:fadeScrollbars="false"
|
||||
android:scrollbarFadeDuration="0"
|
||||
android:scrollbars="vertical" />
|
||||
</LinearLayout>
|
@ -241,4 +241,14 @@
|
||||
<item name="android:textColor">@color/white</item>
|
||||
<item name="android:textSize">17sp</item>
|
||||
</style>
|
||||
|
||||
<style name="item_group_unit">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:background">@color/white</item>
|
||||
<item name="android:orientation">vertical</item>
|
||||
<item name="android:paddingLeft">20dp</item>
|
||||
<item name="android:paddingRight">20dp</item>
|
||||
<item name="android:paddingBottom">10dp</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
@ -61,8 +61,8 @@ ext {
|
||||
gTargetSdkVersion = 28
|
||||
// gVersionCode = 3
|
||||
// gVersionName = '1.0.3'
|
||||
gVersionCode=49
|
||||
gVersionName='1.4.9'
|
||||
gVersionCode=50
|
||||
gVersionName='1.5.0'
|
||||
//Router编译版本
|
||||
gRouterApiVersion = '1.4.1'
|
||||
gRouterCompileVersion = '1.2.2'
|
||||
|
@ -9,8 +9,8 @@ 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.15:7021/usercenter/"; /*测试统一用户*/
|
||||
public static final String IP = "http://219.147.99.164:8082/usercenter/"; /*正式统一用户*/
|
||||
// public static final String IP = "http://192.168.0.15:7021/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";
|
||||
@ -18,13 +18,13 @@ public class BaseUrlApi {
|
||||
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://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.15:7022/"; /*测试IP*/
|
||||
public static final String BASE_IP = BASE_IP_P + "servicecity/";/*网格系统*/
|
||||
// public static final String BASE_IP = "http://192.168.0.109:8083/servicecity/";/*测试网格系统*/
|
||||
// public static final String BASE_POPULATION_IP = BASE_IP_P + "population/";/*人口系统*/
|
||||
public static final String BASE_POPULATION_IP = "http://192.168.0.115:7023/population/";/*人口系统 测试*/
|
||||
public static final String BASE_POPULATION_IP = BASE_IP_P + "population/";/*人口系统*/
|
||||
// public static final String BASE_POPULATION_IP = "http://192.168.0.9:7023/population/";/*人口系统 测试*/
|
||||
// public static final String BASE_POPULATION_IP = "http://192.168.0.15:7023/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*/
|
||||
|
@ -50,11 +50,11 @@ public class CenterFuncDialogView extends Dialog {
|
||||
setContentView(view);
|
||||
setCancelable(iscancelable);
|
||||
setCanceledOnTouchOutside(isBackCancelable);
|
||||
view.findViewById(R.id.ll_base).setOnClickListener(v -> choseType(1));
|
||||
view.findViewById(R.id.ll_outbound).setOnClickListener(v -> choseType(2));
|
||||
view.findViewById(R.id.ll_hire).setOnClickListener(v -> choseType(3));
|
||||
view.findViewById(R.id.ll_build).setOnClickListener(v -> choseType(4));
|
||||
view.findViewById(R.id.ll_person).setOnClickListener(v -> choseType(5));
|
||||
view.findViewById(R.id.ll_base).setOnClickListener(v -> choseType(1));//人口信息
|
||||
view.findViewById(R.id.ll_outbound).setOnClickListener(v -> choseType(2));//人口认领
|
||||
view.findViewById(R.id.ll_house_add_rule).setOnClickListener(v -> choseType(3));//规则房屋
|
||||
view.findViewById(R.id.ll_build).setOnClickListener(v -> choseType(4));//房屋管理
|
||||
view.findViewById(R.id.ll_house_add_n_rule).setOnClickListener(v -> choseType(5));//不规则房屋
|
||||
view.findViewById(R.id.ll_house).setOnClickListener(v -> choseType(6));
|
||||
DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
|
||||
Window window = this.getWindow();
|
||||
|
@ -0,0 +1,197 @@
|
||||
package com.sucstepsoft.cm_utils.utils;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
public class DesensitizationUtil {
|
||||
/**
|
||||
* [中文姓名] 如果长度为2,后一位隐藏为星号<例子:李*>,如果长度>2,中间隐藏为星号<例子:李*星>
|
||||
*
|
||||
* @param fullName 姓名
|
||||
* @return
|
||||
*/
|
||||
public static String chineseName(String fullName) {
|
||||
if (TextUtils.isEmpty(fullName)) {
|
||||
return "";
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(fullName.subSequence(0, 1));
|
||||
for (int i = 0; i < fullName.length() - 2; i++) {
|
||||
sb.append("*");
|
||||
}
|
||||
if (fullName.length() > 2) {
|
||||
sb.append(fullName.substring(fullName.length() - 1));
|
||||
} else {
|
||||
sb.append("*");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* [身份证号] 显示最后四位,其他隐藏。共计18位或者15位。<例子:*************5762>
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public static String idCardNum(String id) {
|
||||
if (TextUtils.isEmpty(id)) {
|
||||
return "";
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < id.length() - 4; i++) {
|
||||
sb.append("*");
|
||||
}
|
||||
sb.append(id.substring(id.length() - 4));
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 出生日期 2022-22-22
|
||||
* @param date
|
||||
* @return
|
||||
*/
|
||||
public static String birthDate(String date) {
|
||||
if (TextUtils.isEmpty(date)) {
|
||||
return "";
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(date.subSequence(0, 2));
|
||||
for (int i = 0; i < date.length() - 2; i++) {
|
||||
sb.append("*");
|
||||
}
|
||||
sb.append(date.substring(date.length() - 1));
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* [身份证号] 前六位,后四位,其他用星号隐藏每位1个星号<例子:451002********1647>
|
||||
*
|
||||
* @param cardId
|
||||
* @return
|
||||
*/
|
||||
public static String idCard(String cardId) {
|
||||
if (TextUtils.isEmpty(cardId)) {
|
||||
return "";
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(cardId.subSequence(0, 6));
|
||||
for (int i = 0; i < cardId.length() - 10; i++) {
|
||||
sb.append("*");
|
||||
}
|
||||
sb.append(cardId.substring(cardId.length() - 4));
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* [固定电话] 后四位,其他隐藏<例子:****1234>
|
||||
*
|
||||
* @param num
|
||||
* @return
|
||||
*/
|
||||
public static String fixedPhone(String num) {
|
||||
if (TextUtils.isEmpty(num)) {
|
||||
return "";
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < num.length() - 4; i++) {
|
||||
sb.append("*");
|
||||
}
|
||||
sb.append(num.substring(num.length() - 4));
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* [手机号码] 前三位,后两位,其他隐藏<例子:138********34>
|
||||
*
|
||||
* @param num
|
||||
* @return
|
||||
*/
|
||||
public static String mobilePhone(String num) {
|
||||
if (TextUtils.isEmpty(num)) {
|
||||
return "";
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(num.subSequence(0, 3));
|
||||
for (int i = 0; i < num.length() - 5; i++) {
|
||||
sb.append("*");
|
||||
}
|
||||
sb.append(num.substring(num.length() - 2));
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* [地址] 只显示到地区,不显示详细地址;我们要对个人信息增强保护<例子:北京市海淀区****>
|
||||
*
|
||||
* @param address
|
||||
* @param sensitiveSize 敏感信息长度
|
||||
* @return
|
||||
*/
|
||||
public static String address(String address, int sensitiveSize) {
|
||||
if (TextUtils.isEmpty(address)) {
|
||||
return "";
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < address.length() - sensitiveSize; i++) {
|
||||
sb.append("*");
|
||||
}
|
||||
sb.append(address.substring(address.length() - sensitiveSize));
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* [电子邮箱] 邮箱前缀仅显示第一个字母,前缀其他隐藏,用星号代替,@及后面的地址显示<例子:g**@163.com>
|
||||
*
|
||||
* @param email
|
||||
* @return
|
||||
*/
|
||||
public static String email(String email) {
|
||||
if (TextUtils.isEmpty(email)) {
|
||||
return "";
|
||||
}
|
||||
int index = email.indexOf("@");
|
||||
String end = email.substring(index);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(email.subSequence(0, 1));
|
||||
for (int i = 0; i < email.length() - end.length() - 1; i++) {
|
||||
sb.append("*");
|
||||
}
|
||||
sb.append(end);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* [银行卡号] 前六位,后四位,其他用星号隐藏每位1个星号<例子:6222600**********1234>
|
||||
*
|
||||
* @param cardNum
|
||||
* @return
|
||||
*/
|
||||
public static String bankCard(String cardNum) {
|
||||
if (TextUtils.isEmpty(cardNum)) {
|
||||
return "";
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(cardNum.subSequence(0, 6));
|
||||
for (int i = 0; i < cardNum.length() - 10; i++) {
|
||||
sb.append("*");
|
||||
}
|
||||
sb.append(cardNum.substring(cardNum.length() - 4));
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* [公司开户银行联号] 公司开户银行联行号,显示前两位,其他用星号隐藏,每位1个星号<例子:12********>
|
||||
*
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
public static String cnapsCode(String code) {
|
||||
if (TextUtils.isEmpty(code)) {
|
||||
return "";
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(code.subSequence(0, 2));
|
||||
for (int i = 0; i < code.length() - 2; i++) {
|
||||
sb.append("*");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
BIN
cm_utils/src/main/res/drawable-xhdpi/ic_radio_circle_normal.png
Normal file
After Width: | Height: | Size: 262 B |
BIN
cm_utils/src/main/res/drawable-xhdpi/ic_radio_circle_sel.png
Normal file
After Width: | Height: | Size: 344 B |
9
cm_utils/src/main/res/drawable/shp_status_tag.xml
Executable file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#de0e0e" />
|
||||
<corners android:radius="16dp" />
|
||||
<size
|
||||
android:width="58dp"
|
||||
android:height="21dp" />
|
||||
</shape>
|
@ -37,6 +37,7 @@
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_build"
|
||||
android:layout_width="0dp"
|
||||
@ -70,22 +71,23 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_weight="1"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
android:padding="10dp"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/ic_outbound" />
|
||||
android:src="@drawable/ic_census" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="境外人员"
|
||||
android:gravity="center"
|
||||
android:text="人口认领"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp" />
|
||||
|
||||
@ -96,9 +98,9 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:visibility="gone"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_person"
|
||||
@ -162,9 +164,9 @@
|
||||
android:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_house_add_rule"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
@ -181,7 +183,7 @@
|
||||
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" />
|
||||
|
||||
@ -189,7 +191,7 @@
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_hire"
|
||||
android:id="@+id/ll_house_add_n_rule"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
@ -197,19 +199,18 @@
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp"
|
||||
android:visibility="gone">
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/ic_hire" />
|
||||
android:src="@drawable/ic_build" />
|
||||
|
||||
<TextView
|
||||
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>
|
||||
|