人口信息添加标签、退休选项
This commit is contained in:
parent
a2a96ad388
commit
9abdef8350
@ -107,5 +107,7 @@ dependencies {
|
||||
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.1'
|
||||
testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.1'
|
||||
|
||||
//流布局
|
||||
implementation "com.beloo.widget:ChipsLayoutManager:0.3.7@aar"
|
||||
|
||||
}
|
||||
|
@ -48,7 +48,16 @@
|
||||
android:theme="@style/AppTheme"
|
||||
android:usesCleartextTraffic="true"
|
||||
tools:ignore="GoogleAppIndexingWarning">
|
||||
|
||||
<activity
|
||||
android:name=".activitys.census.newhouse.activitys.NewHireHouseDetailActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden"
|
||||
tools:ignore="LockedOrientationActivity" />
|
||||
<activity
|
||||
android:name=".activitys.census.newhouse.activitys.NewHireHouseAddActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden"
|
||||
tools:ignore="LockedOrientationActivity" />
|
||||
<activity
|
||||
android:name=".activitys.census.newhouse.activitys.EditHouseLivePersonBindActivity"
|
||||
android:screenOrientation="portrait"
|
||||
|
@ -12,6 +12,7 @@ import com.sucstepsoft.cm_utils.core.widget.xtablayout.XTabLayout;
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.newhouse.fragments.BuildingManageFragment;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.newhouse.fragments.CommunityManageFragment;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.newhouse.fragments.HireHouseManageFragment;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.newhouse.fragments.HouseManageNewFragment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -34,8 +35,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
|
||||
@ -53,20 +54,17 @@ public class BuildingViewPageActivity extends BaseActivity {
|
||||
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);
|
||||
|
||||
VpNoticeAdapter adapter = new VpNoticeAdapter(getSupportFragmentManager());
|
||||
mVpContent.setAdapter(adapter);
|
||||
mTablayout.setxTabDisplayNum(4);
|
||||
mTablayout.setupWithViewPager(mVpContent);
|
||||
mTvPublish.setOnClickListener(v -> onAddPage());
|
||||
// if (!TextUtils.isEmpty("type")) {
|
||||
// mVpContent.setCurrentItem(2);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,760 @@
|
||||
package com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Environment;
|
||||
import android.provider.MediaStore;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.content.FileProvider;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ZoomControls;
|
||||
|
||||
import com.baidu.mapapi.map.BaiduMap;
|
||||
import com.baidu.mapapi.map.BitmapDescriptor;
|
||||
import com.baidu.mapapi.map.BitmapDescriptorFactory;
|
||||
import com.baidu.mapapi.map.MapStatus;
|
||||
import com.baidu.mapapi.map.MapStatusUpdate;
|
||||
import com.baidu.mapapi.map.MapStatusUpdateFactory;
|
||||
import com.baidu.mapapi.map.MarkerOptions;
|
||||
import com.baidu.mapapi.map.OverlayOptions;
|
||||
import com.baidu.mapapi.map.TextureMapView;
|
||||
import com.baidu.mapapi.model.LatLng;
|
||||
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||
import com.bigkoo.pickerview.view.TimePickerView;
|
||||
import com.google.gson.Gson;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.core.beans.AddPhotoBean;
|
||||
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.AddPhotoAdapter;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.ButtomDialogView;
|
||||
import com.sucstepsoft.cm_utils.utils.ProiderUtil;
|
||||
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.common.PhotoActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.issue.TakePointActivity;
|
||||
import com.sucstepsoft.realtimelocation.beans.BaseUserBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.DicBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.HireHouseDetailBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.SaveHireHouseBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.SuccessBean;
|
||||
import com.sucstepsoft.realtimelocation.net.LocationApiService;
|
||||
import com.sucstepsoft.realtimelocation.utils.ExceptionHandler;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
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;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.MultipartBody;
|
||||
import okhttp3.RequestBody;
|
||||
import top.zibin.luban.Luban;
|
||||
import top.zibin.luban.OnCompressListener;
|
||||
|
||||
/**
|
||||
* 房屋添加
|
||||
*/
|
||||
public class NewHireHouseAddActivity extends BaseActivity {
|
||||
|
||||
|
||||
@BindView(R.id.et_owner_name)
|
||||
EditText mEtOwnerName;
|
||||
@BindView(R.id.et_owner_phone)
|
||||
EditText mEtOwnerPhone;
|
||||
@BindView(R.id.et_house_count)
|
||||
EditText mEtHouseCount;
|
||||
@BindView(R.id.tv_house_frame)
|
||||
TextView mTvHouseFrame;
|
||||
@BindView(R.id.tv_register_date)
|
||||
TextView mTvRegisterDate;
|
||||
@BindView(R.id.tv_hire_type)
|
||||
TextView mTvHireType;
|
||||
@BindView(R.id.tv_manage_level)
|
||||
TextView mTvManageLevel;
|
||||
@BindView(R.id.et_hire_area)
|
||||
EditText mEtHireArea;
|
||||
@BindView(R.id.tv_lend_date)
|
||||
TextView mTvLendDate;
|
||||
@BindView(R.id.tv_loc_lng)
|
||||
TextView mTvLocLng;
|
||||
@BindView(R.id.mp_view)
|
||||
TextureMapView mMpView;
|
||||
@BindView(R.id.tv_point)
|
||||
TextView mTvPoint;
|
||||
@BindView(R.id.rlv_photo)
|
||||
RecyclerView mRlvPhoto;
|
||||
@BindView(R.id.ll_content)
|
||||
LinearLayout mLlContent;
|
||||
@BindView(R.id.btn_confirm)
|
||||
Button mBtnConfirm;
|
||||
@BindView(R.id.et_address)
|
||||
EditText mEtAddress;
|
||||
private Unbinder mBind;
|
||||
|
||||
private OptionsPickerView<DicBean> mDicPicker;
|
||||
private List<DicBean> mDicBeanList;
|
||||
|
||||
|
||||
private SimpleDateFormat mDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
private String mId = "";
|
||||
private BaiduMap mBaiduMap;
|
||||
private LatLng mDefaultPoint;
|
||||
private BitmapDescriptor mBitmapDescriptor;
|
||||
private List<AddPhotoBean> mPhotos = new ArrayList<>();
|
||||
private AddPhotoBean mCurrentBean;
|
||||
private String mPicPath;
|
||||
private String mPhotoIds = "";//相片Id
|
||||
private AddPhotoAdapter mPhotoAdapter;
|
||||
private String mSelLat;
|
||||
private String mSelLng;
|
||||
private DicBean mSelFrame;
|
||||
private DicBean mSelType;
|
||||
private DicBean mSelLevel;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_add_new_hire_house;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
String title = getIntent().getStringExtra("title");
|
||||
mTvBaseTitle.setText(title);
|
||||
mId = getIntent().getStringExtra("id");
|
||||
if (!TextUtils.isEmpty(mId)) {
|
||||
refreshView(STATE_LOAD_LOADING);
|
||||
getDetailById();
|
||||
} else {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
}
|
||||
initContentView();
|
||||
initPhoto();
|
||||
initBaiduMap();
|
||||
}
|
||||
|
||||
private void doSubmit() {
|
||||
if (checkParams()) {
|
||||
if (!TextUtils.isEmpty(mId)) {
|
||||
doEdit();
|
||||
} else {
|
||||
doSave();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存编辑
|
||||
*/
|
||||
private void doEdit() {
|
||||
hideSoftKeyboard();
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "修改中...");
|
||||
dialog.show();
|
||||
RequestBody body = buildParams();
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.doEditHireHouse(mId, body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull SuccessBean successBean) {
|
||||
dialog.dismiss();
|
||||
ToastUtils.showShort("修改成功");
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initContentView() {
|
||||
mTvHouseFrame.setOnClickListener(v -> onShowDicPicker(PathConfig.DIC_BUILDING_HOUSE_FRAME, 2, 1));//结构类型
|
||||
mTvRegisterDate.setOnClickListener(v -> onShowDate(mTvRegisterDate));//登记日期
|
||||
mTvHireType.setOnClickListener(v -> onShowDicPicker(PathConfig.DIC_HIRE_TYPE, 2, 2));//群租房类型
|
||||
mTvManageLevel.setOnClickListener(v -> onShowDicPicker(PathConfig.DIC_MANAGE_TYPE, 2, 3));//管理级别
|
||||
mTvLendDate.setOnClickListener(v -> onShowDate(mTvLendDate));//出租日期
|
||||
mBtnConfirm.setOnClickListener(v -> doSubmit());
|
||||
}
|
||||
|
||||
private void onShowDate(TextView tvItem) {
|
||||
hideSoftKeyboard();
|
||||
TimePickerView mTimePickerView = new TimePickerBuilder(mActivity, (date, v) -> {
|
||||
tvItem.setText(mDateFormat.format(date));
|
||||
})
|
||||
.setTitleText("请选日期")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setType(new boolean[]{true, true, true, false, false, false})
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mTimePickerView.show();
|
||||
}
|
||||
|
||||
|
||||
private void initBaiduMap() {
|
||||
mDefaultPoint = new LatLng(PathConfig.LA, PathConfig.LO);
|
||||
mBaiduMap = mMpView.getMap();
|
||||
MapStatus ms = new MapStatus.Builder().zoom(14).target(mDefaultPoint).build();
|
||||
MapStatusUpdate u = MapStatusUpdateFactory.newMapStatus(ms);
|
||||
View child = mMpView.getChildAt(1);
|
||||
if (child != null && (child instanceof ImageView || child instanceof ZoomControls)) {
|
||||
child.setVisibility(View.GONE);
|
||||
}
|
||||
mMpView.showZoomControls(false);
|
||||
mBaiduMap.animateMapStatus(u);
|
||||
mTvLocLng.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(mActivity, TakePointActivity.class);
|
||||
startActivityForResult(intent, 1234);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加marker
|
||||
*
|
||||
* @param latLng
|
||||
*/
|
||||
private void addMarker(LatLng latLng) {
|
||||
mBaiduMap.clear();
|
||||
mBitmapDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.ic_map_marker);
|
||||
OverlayOptions option = new MarkerOptions()
|
||||
.position(latLng)
|
||||
.icon(mBitmapDescriptor)
|
||||
.animateType(MarkerOptions.MarkerAnimateType.drop);
|
||||
mBaiduMap.addOverlay(option);
|
||||
MapStatus ms = new MapStatus.Builder().zoom(14).target(latLng).build();
|
||||
MapStatusUpdate u = MapStatusUpdateFactory.newMapStatus(ms);
|
||||
mBaiduMap.animateMapStatus(u);
|
||||
}
|
||||
|
||||
|
||||
private void initPhoto() {
|
||||
mPhotos.add(new AddPhotoBean());
|
||||
mPhotoAdapter = new AddPhotoAdapter(mActivity, mPhotos);
|
||||
mRlvPhoto.setLayoutManager(new GridLayoutManager(mActivity, 4));
|
||||
mRlvPhoto.setAdapter(mPhotoAdapter);
|
||||
//删除上传的相片
|
||||
mPhotoAdapter.addOnDeleteListener(((bean, i) -> {
|
||||
mPhotoAdapter.removeItem(bean);
|
||||
mPhotoIds = mPhotoIds.replace(bean.getId() + ",", "");
|
||||
}));
|
||||
mPhotoAdapter.addOnItemClickListener(bean -> {
|
||||
if (TextUtils.isEmpty(bean.getPath())) {
|
||||
//空数据
|
||||
showSelectPhoto(bean);
|
||||
} else {
|
||||
//预览
|
||||
ArrayList<String> list = new ArrayList<>();
|
||||
list.add(bean.getPath());
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra(PhotoActivity.TAG_IMGURL, list);
|
||||
intent.setClass(mActivity, PhotoActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示选择图片
|
||||
*
|
||||
* @param bean
|
||||
*/
|
||||
private void showSelectPhoto(AddPhotoBean bean) {
|
||||
hideSoftKeyboard();
|
||||
ButtomDialogView buttomDialogView = new ButtomDialogView.DialogBuilder(mActivity)
|
||||
.setIsBackCancelable(true)
|
||||
.setIscancelable(true)
|
||||
.setShowLocation(Gravity.BOTTOM)
|
||||
.setIsShowFile(false)
|
||||
.build();
|
||||
buttomDialogView.addOnChoseListener(new ButtomDialogView.OnChoseListener() {
|
||||
@Override
|
||||
public void choseFile() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void choseAlbum() {
|
||||
mCurrentBean = bean;
|
||||
Intent intent = new Intent(Intent.ACTION_PICK, null);
|
||||
intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
|
||||
"image/*");
|
||||
startActivityForResult(intent, BaseUrlApi.PHOTO_REQUEST);
|
||||
buttomDialogView.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void choseShoot() {
|
||||
mCurrentBean = bean;
|
||||
String pathStr = getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath() + PathConfig.CATCH_PATH;
|
||||
mPicPath = pathStr + System.currentTimeMillis() + ".jpg";
|
||||
File file = new File(mPicPath);
|
||||
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
// 下面这句指定调用相机拍照后的照片存储的路径
|
||||
Uri uri;
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
|
||||
uri = Uri.fromFile(file);
|
||||
} else {
|
||||
uri = FileProvider.getUriForFile(mActivity, ProiderUtil.getFileProviderName(mActivity), file);
|
||||
}
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
|
||||
startActivityForResult(intent, BaseUrlApi.CAMERA_REQUEST);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loginOut() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changePwd() {
|
||||
|
||||
}
|
||||
});
|
||||
buttomDialogView.show();
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*
|
||||
* @param picPath
|
||||
*/
|
||||
private void uploadImg(String picPath, int src) {
|
||||
File file = new File(picPath);
|
||||
if (!file.exists()) {
|
||||
showToast("图片路径错误.");
|
||||
return;
|
||||
}
|
||||
ProgressDialog progressDialog = UIUtil.initDialog(mActivity, "正在上传...");
|
||||
progressDialog.show();
|
||||
String pathStr = getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath() + PathConfig.CATCH_PATH;
|
||||
Luban.with(mActivity)
|
||||
.load(picPath)
|
||||
.ignoreBy(100)
|
||||
.setTargetDir(pathStr)
|
||||
.filter(path -> !(TextUtils.isEmpty(path) || path.toLowerCase().endsWith(".gif")))
|
||||
.setCompressListener(new OnCompressListener() {
|
||||
@Override
|
||||
public void onStart() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(File file) {
|
||||
RequestBody requestFile = RequestBody.create(MediaType.parse("multipart/form-data"), file);
|
||||
MultipartBody.Part body = MultipartBody.Part.createFormData("image", file.getName(), requestFile);
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.uploadImage(body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseUserBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(BaseUserBean baseUserBean) {
|
||||
if (progressDialog != null && progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
ToastUtils.showShort("上传成功");
|
||||
mPhotoIds += (baseUserBean.getData() + ",");
|
||||
mCurrentBean.setId(baseUserBean.getData());
|
||||
mCurrentBean.setPath(picPath);
|
||||
if (mPhotos.size() < 4) {
|
||||
mPhotos.add(new AddPhotoBean());
|
||||
}
|
||||
mPhotoAdapter.notifyDataSetChanged();
|
||||
mCurrentBean = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
if (progressDialog != null && progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
ToastUtils.showShort("上传失败,请稍后重试.");
|
||||
if (file.exists()) {
|
||||
file.delete();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
if (progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
ToastUtils.showShort("图片上传失败,请稍后重试");
|
||||
}
|
||||
})
|
||||
.launch();
|
||||
}
|
||||
|
||||
|
||||
private boolean checkParams() {
|
||||
String name = mEtOwnerName.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
ToastUtils.showShort("请输入房主姓名");
|
||||
return false;
|
||||
}
|
||||
String phone = mEtOwnerPhone.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(phone)) {
|
||||
ToastUtils.showShort("请输入房主联系方式");
|
||||
return false;
|
||||
}
|
||||
if (mSelFrame == null) {
|
||||
ToastUtils.showShort("请选择房屋结构");
|
||||
return false;
|
||||
}
|
||||
if (mSelType == null) {
|
||||
ToastUtils.showShort("请选择群租房类型");
|
||||
return false;
|
||||
}
|
||||
if (mSelLevel == null) {
|
||||
ToastUtils.showShort("请选择管理级别");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
if (resultCode == RESULT_OK) {
|
||||
switch (requestCode) {
|
||||
case BaseUrlApi.CAMERA_REQUEST://相机
|
||||
uploadImg(mPicPath, 1);
|
||||
break;
|
||||
case BaseUrlApi.PHOTO_REQUEST://相册
|
||||
try {
|
||||
if (data == null) return;
|
||||
Uri uri = data.getData();
|
||||
String[] proj = {MediaStore.Images.Media.DATA};
|
||||
Cursor cursor = managedQuery(uri, proj, null, null, null);
|
||||
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
||||
cursor.moveToFirst();
|
||||
String srcPath = cursor.getString(column_index);
|
||||
uploadImg(srcPath, 2);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
case 1234:
|
||||
String lo = data.getStringExtra("lo");
|
||||
String la = data.getStringExtra("la");
|
||||
String address = data.getStringExtra("address");
|
||||
mSelLat = la;
|
||||
mSelLng = lo;
|
||||
mTvPoint.setText("经纬度:" + mSelLat + "-" + mSelLng);
|
||||
Double laD = Double.parseDouble(la);
|
||||
Double loD = Double.parseDouble(lo);
|
||||
addMarker(new LatLng(laD, loD));
|
||||
mEtAddress.setText(address);
|
||||
break;
|
||||
}
|
||||
}
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
|
||||
private void onShowDicPicker(String id, int type, int source) {
|
||||
hideSoftKeyboard();
|
||||
if (type == 1) {
|
||||
mDicPicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
|
||||
DicBean bean = mDicBeanList.get(o1);
|
||||
chooseDic(bean, source);
|
||||
})
|
||||
.setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mDicPicker.setPicker(mDicBeanList);
|
||||
mDicPicker.show();
|
||||
} else {
|
||||
getDicListByType(id, type, source);
|
||||
}
|
||||
}
|
||||
|
||||
private void chooseDic(DicBean bean, int source) {
|
||||
switch (source) {
|
||||
case 1://房屋结构
|
||||
mSelFrame = bean;
|
||||
mTvHouseFrame.setText(bean.getDictionaryName());
|
||||
break;
|
||||
case 2://类型
|
||||
mSelType = bean;
|
||||
mTvHireType.setText(bean.getDictionaryName());
|
||||
break;
|
||||
case 3://级别
|
||||
mSelLevel = bean;
|
||||
mTvManageLevel.setText(bean.getDictionaryName());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void getDicListByType(String pId, int i, int source) {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getDictListAllByPid(pId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<DicBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull List<DicBean> l) {
|
||||
dialog.dismiss();
|
||||
if (l != null && l.size() > 0) {
|
||||
mDicBeanList = l;
|
||||
onShowDicPicker(pId, 1, source);
|
||||
} else {
|
||||
ToastUtils.showShort("暂无数据");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
private void doSave() {
|
||||
hideSoftKeyboard();
|
||||
RequestBody bean = buildParams();
|
||||
ProgressDialog progressDialog = UIUtil.initDialog(NewHireHouseAddActivity.this, "添加中...");
|
||||
progressDialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.doSaveHireHouse(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() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void getDetailById() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getHireHouseDetail(mId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<HireHouseDetailBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(HireHouseDetailBean newCommunityDetailBean) {
|
||||
setDataToView(newCommunityDetailBean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setDataToView(HireHouseDetailBean bean) {
|
||||
mEtOwnerName.setText(bean.getHomeowner());
|
||||
mEtOwnerPhone.setText(bean.getPhone());
|
||||
mEtHouseCount.setText(bean.getRoomCount() + "");
|
||||
if (!TextUtils.isEmpty(bean.getStructureId())) {
|
||||
mSelFrame = new DicBean();
|
||||
mSelFrame.setDictionaryId(bean.getStructureId());
|
||||
mSelFrame.setDictionaryName(bean.getStructureName());
|
||||
mTvHouseFrame.setText(bean.getStructureName());
|
||||
}
|
||||
mTvRegisterDate.setText(bean.getRegistrationDate());
|
||||
if (!TextUtils.isEmpty(bean.getManageLevelId())) {
|
||||
mSelLevel = new DicBean();
|
||||
mSelLevel.setDictionaryId(bean.getManageLevelId());
|
||||
mSelLevel.setDictionaryName(bean.getManageLevelName());
|
||||
mTvManageLevel.setText(bean.getManageLevelName());
|
||||
}
|
||||
if (!TextUtils.isEmpty(bean.getGroupTypeId())) {
|
||||
mSelType = new DicBean();
|
||||
mSelType.setDictionaryId(bean.getGroupTypeId());
|
||||
mSelType.setDictionaryName(bean.getGroupTypeName());
|
||||
mTvHireType.setText(bean.getGroupTypeName());
|
||||
}
|
||||
mEtHireArea.setText(bean.getRentalArea());
|
||||
mTvLendDate.setText(bean.getRentalDate());
|
||||
mEtAddress.setText(bean.getAddress());
|
||||
if (!TextUtils.isEmpty(bean.getLatitude()) && !TextUtils.isEmpty(bean.getLongitude())) {
|
||||
mSelLat = bean.getLatitude();
|
||||
mSelLng = bean.getLongitude();
|
||||
Double lat = Double.parseDouble(bean.getLatitude());
|
||||
Double lng = Double.parseDouble(bean.getLongitude());
|
||||
mTvPoint.setText("经纬度:" + mSelLat + "-" + mSelLng);
|
||||
addMarker(new LatLng(lat, lng));
|
||||
}
|
||||
if (!TextUtils.isEmpty(bean.getImage())) {
|
||||
String[] photos = bean.getImage().split(",");
|
||||
mPhotos.clear();
|
||||
for (int i = 0; i < photos.length; i++) {
|
||||
AddPhotoBean pBean = new AddPhotoBean();
|
||||
pBean.setId(photos[i]);
|
||||
pBean.setPath(BaseUrlApi.BASE_IMG_URL + photos[i]);
|
||||
mPhotos.add(pBean);
|
||||
}
|
||||
if (mPhotos.size() < 9) {
|
||||
mPhotos.add(new AddPhotoBean());
|
||||
}
|
||||
mPhotoAdapter.setData(mPhotos);
|
||||
}
|
||||
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 构建提交参数
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private RequestBody buildParams() {
|
||||
SaveHireHouseBean bean = new SaveHireHouseBean();
|
||||
String name = mEtOwnerName.getText().toString().trim();
|
||||
bean.setHomeowner(name);
|
||||
String phone = mEtOwnerPhone.getText().toString().trim();
|
||||
bean.setPhone(phone);
|
||||
String count = mEtHouseCount.getText().toString().trim();
|
||||
bean.setRoomCount(TextUtils.isEmpty(count) ? 0 : Integer.parseInt(count));
|
||||
|
||||
bean.setStructureId(mSelFrame.getDictionaryId());
|
||||
bean.setStructureName(mSelFrame.getDictionaryName());
|
||||
String registerDate = mTvRegisterDate.getText().toString().trim();
|
||||
bean.setRegistrationDate(registerDate);
|
||||
bean.setManageLevelId(mSelLevel.getDictionaryId());
|
||||
bean.setManageLevelName(mSelLevel.getDictionaryName());
|
||||
bean.setGroupTypeId(mSelType.getDictionaryId());
|
||||
bean.setGroupTypeName(mSelType.getDictionaryName());
|
||||
String hireArea = mEtHireArea.getText().toString().trim();
|
||||
bean.setRentalArea(hireArea);
|
||||
String lendDate = mTvLendDate.getText().toString().trim();
|
||||
bean.setRentalDate(lendDate);
|
||||
String addres = mEtAddress.getText().toString().trim();
|
||||
bean.setAddress(addres);
|
||||
bean.setLatitude(mSelLat);
|
||||
bean.setLongitude(mSelLng);
|
||||
String ids = "";
|
||||
for (int i = 0; i < mPhotoAdapter.getData().size(); i++) {
|
||||
if (!TextUtils.isEmpty(mPhotoAdapter.getData().get(i).getId())) {
|
||||
ids += mPhotoAdapter.getData().get(i).getId() + ",";
|
||||
}
|
||||
}
|
||||
if (ids.endsWith(",")) {
|
||||
ids = ids.substring(0, ids.length() - 1);
|
||||
}
|
||||
bean.setImage(ids);
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(bean);
|
||||
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
return requestBody;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,309 @@
|
||||
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.GridLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ZoomControls;
|
||||
|
||||
import com.baidu.mapapi.map.BaiduMap;
|
||||
import com.baidu.mapapi.map.BitmapDescriptor;
|
||||
import com.baidu.mapapi.map.BitmapDescriptorFactory;
|
||||
import com.baidu.mapapi.map.MapStatus;
|
||||
import com.baidu.mapapi.map.MapStatusUpdate;
|
||||
import com.baidu.mapapi.map.MapStatusUpdateFactory;
|
||||
import com.baidu.mapapi.map.MarkerOptions;
|
||||
import com.baidu.mapapi.map.OverlayOptions;
|
||||
import com.baidu.mapapi.map.TextureMapView;
|
||||
import com.baidu.mapapi.model.LatLng;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.core.beans.AddPhotoBean;
|
||||
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.AddPhotoAdapter;
|
||||
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.activitys.common.PhotoActivity;
|
||||
import com.sucstepsoft.realtimelocation.beans.HireHouseDetailBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.SuccessBean;
|
||||
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 NewHireHouseDetailActivity extends BaseActivity {
|
||||
|
||||
|
||||
@BindView(R.id.tv_owner_name)
|
||||
TextView mTvOwnerName;
|
||||
@BindView(R.id.tv_owner_phone)
|
||||
TextView mTvOwnerPhone;
|
||||
@BindView(R.id.tv_house_count)
|
||||
TextView mTvHouseCount;
|
||||
@BindView(R.id.tv_house_frame)
|
||||
TextView mTvHouseFrame;
|
||||
@BindView(R.id.tv_register_date)
|
||||
TextView mTvRegisterDate;
|
||||
@BindView(R.id.tv_hire_type)
|
||||
TextView mTvHireType;
|
||||
@BindView(R.id.tv_manage_level)
|
||||
TextView mTvManageLevel;
|
||||
|
||||
@BindView(R.id.tv_lend_date)
|
||||
TextView mTvLendDate;
|
||||
@BindView(R.id.tv_loc_lng)
|
||||
TextView mTvLocLng;
|
||||
@BindView(R.id.mp_view)
|
||||
TextureMapView mMpView;
|
||||
@BindView(R.id.tv_point)
|
||||
TextView mTvPoint;
|
||||
@BindView(R.id.rlv_photo)
|
||||
RecyclerView mRlvPhoto;
|
||||
@BindView(R.id.btn_del)
|
||||
Button mBtnDel;
|
||||
@BindView(R.id.btn_edit)
|
||||
Button mBtnEdit;
|
||||
@BindView(R.id.ll_btns)
|
||||
LinearLayout mLlBtns;
|
||||
@BindView(R.id.tv_hire_area)
|
||||
TextView mTvHireArea;
|
||||
@BindView(R.id.tv_address)
|
||||
TextView mTvAddress;
|
||||
|
||||
private Unbinder mBind;
|
||||
|
||||
|
||||
private BaiduMap mBaiduMap;
|
||||
private LatLng mDefaultPoint;
|
||||
private BitmapDescriptor mBitmapDescriptor;
|
||||
private List<AddPhotoBean> mPhotos = new ArrayList<>();
|
||||
private AddPhotoAdapter mPhotoAdapter;
|
||||
|
||||
private String mId;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_detail_new_hire_house;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("详情");
|
||||
refreshView(STATE_LOAD_LOADING);
|
||||
mId = getIntent().getStringExtra("id");
|
||||
initContentView();
|
||||
initBaiduMap();
|
||||
getDetailById();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
*/
|
||||
private void getDetailById() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getHireHouseDetail(mId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<HireHouseDetailBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(HireHouseDetailBean newCommunityDetailBean) {
|
||||
setDataToView(newCommunityDetailBean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示内容
|
||||
*/
|
||||
private void setDataToView(HireHouseDetailBean bean) {
|
||||
mTvOwnerName.setText(bean.getHomeowner());
|
||||
mTvOwnerPhone.setText(bean.getPhone());
|
||||
mTvHouseCount.setText(bean.getRoomCount() + "");
|
||||
mTvHouseFrame.setText(bean.getStructureName());
|
||||
mTvRegisterDate.setText(bean.getRegistrationDate());
|
||||
mTvManageLevel.setText(bean.getManageLevelName());
|
||||
mTvHireType.setText(bean.getGroupTypeName());
|
||||
mTvHireArea.setText(bean.getRentalArea());
|
||||
mTvLendDate.setText(bean.getRentalDate());
|
||||
mTvAddress.setText(bean.getAddress());
|
||||
|
||||
if (!TextUtils.isEmpty(bean.getLatitude())) {
|
||||
Double lat = Double.parseDouble(bean.getLatitude());
|
||||
Double lng = Double.parseDouble(bean.getLongitude());
|
||||
mTvPoint.setText("经纬度:" + bean.getLatitude() + "-" + bean.getLongitude());
|
||||
addMarker(new LatLng(lat, lng));
|
||||
}
|
||||
if (!TextUtils.isEmpty(bean.getImage())) {
|
||||
String[] photos = bean.getImage().split(",");
|
||||
mPhotos.clear();
|
||||
for (int i = 0; i < photos.length; i++) {
|
||||
AddPhotoBean pBean = new AddPhotoBean();
|
||||
pBean.setId(photos[i]);
|
||||
pBean.setPath(BaseUrlApi.BASE_IMG_URL + photos[i]);
|
||||
mPhotos.add(pBean);
|
||||
}
|
||||
mPhotoAdapter.setData(mPhotos);
|
||||
}
|
||||
if (UserLgUtils.getUserId().equals(bean.getCreator())) {
|
||||
mLlBtns.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mLlBtns.setVisibility(View.GONE);
|
||||
}
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
}
|
||||
|
||||
private void initContentView() {
|
||||
mPhotoAdapter = new AddPhotoAdapter(mActivity, mPhotos);
|
||||
mRlvPhoto.setLayoutManager(new GridLayoutManager(mActivity, 4));
|
||||
mRlvPhoto.setAdapter(mPhotoAdapter);
|
||||
|
||||
mPhotoAdapter.addOnItemClickListener(bean -> {
|
||||
if (TextUtils.isEmpty(bean.getPath())) {
|
||||
//空数据
|
||||
} else {
|
||||
//预览
|
||||
ArrayList<String> list = new ArrayList<>();
|
||||
list.add(bean.getPath());
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra(PhotoActivity.TAG_IMGURL, list);
|
||||
intent.setClass(mActivity, PhotoActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
mBtnEdit.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(mActivity, NewHireHouseAddActivity.class);
|
||||
intent.putExtra("id", mId);
|
||||
intent.putExtra("title", "出租房信息编辑");
|
||||
startActivityForResult(intent, 1234);
|
||||
});
|
||||
mBtnDel.setOnClickListener(v -> doDel());
|
||||
}
|
||||
|
||||
private void doDel() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
|
||||
builder.setTitle("提示")
|
||||
.setMessage("确定要删除该小区信息吗?")
|
||||
.setPositiveButton("确定", (dialog, which) -> {
|
||||
dialog.dismiss();
|
||||
ProgressDialog dialog1 = UIUtil.initDialog(mActivity, "删除中...");
|
||||
dialog1.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.doDelHireHouse(mId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull SuccessBean successBean) {
|
||||
ToastUtils.showShort("删除成功");
|
||||
dialog1.dismiss();
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
dialog1.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
})
|
||||
.setNegativeButton("取消", (dialog, which) -> dialog.dismiss())
|
||||
.create()
|
||||
.show();
|
||||
}
|
||||
|
||||
|
||||
private void initBaiduMap() {
|
||||
mDefaultPoint = new LatLng(PathConfig.LA, PathConfig.LO);
|
||||
mBaiduMap = mMpView.getMap();
|
||||
MapStatus ms = new MapStatus.Builder().zoom(14).target(mDefaultPoint).build();
|
||||
MapStatusUpdate u = MapStatusUpdateFactory.newMapStatus(ms);
|
||||
View child = mMpView.getChildAt(1);
|
||||
if (child != null && (child instanceof ImageView || child instanceof ZoomControls)) {
|
||||
child.setVisibility(View.GONE);
|
||||
}
|
||||
mMpView.showZoomControls(false);
|
||||
mBaiduMap.animateMapStatus(u);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加marker
|
||||
*
|
||||
* @param latLng
|
||||
*/
|
||||
private void addMarker(LatLng latLng) {
|
||||
mBaiduMap.clear();
|
||||
mBitmapDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.ic_map_marker);
|
||||
OverlayOptions option = new MarkerOptions()
|
||||
.position(latLng)
|
||||
.icon(mBitmapDescriptor)
|
||||
.animateType(MarkerOptions.MarkerAnimateType.drop);
|
||||
mBaiduMap.addOverlay(option);
|
||||
MapStatus ms = new MapStatus.Builder().zoom(14).target(latLng).build();
|
||||
MapStatusUpdate u = MapStatusUpdateFactory.newMapStatus(ms);
|
||||
mBaiduMap.animateMapStatus(u);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
if (resultCode == RESULT_OK) {
|
||||
refreshView(STATE_LOAD_LOADING);
|
||||
getDetailById();
|
||||
}
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package com.sucstepsoft.realtimelocation.activitys.census.newhouse.fragments;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
@ -15,12 +14,11 @@ import com.sucstepsoft.cm_utils.core.widget.base.LazyFragment;
|
||||
import com.sucstepsoft.cm_utils.utils.ToastUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys.NewHouseAddActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys.NewHireHouseAddActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys.NewHireHouseDetailActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.newhouse.activitys.NewHouseDetailActivity;
|
||||
import com.sucstepsoft.realtimelocation.adapters.HireHouseAdapter;
|
||||
import com.sucstepsoft.realtimelocation.adapters.NewHouseAdapter;
|
||||
import com.sucstepsoft.realtimelocation.beans.HireHouseBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.NewHouseBean;
|
||||
import com.sucstepsoft.realtimelocation.net.LocationApiService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -89,7 +87,7 @@ public class HireHouseManageFragment extends LazyFragment {
|
||||
private void showIssueDetail(HireHouseBean.RowsBean bean) {
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("id", bean.getRentalId());
|
||||
intent.setClass(mActivity, NewHouseDetailActivity.class);
|
||||
intent.setClass(mActivity, NewHireHouseDetailActivity.class);
|
||||
startActivityForResult(intent, 1234);
|
||||
}
|
||||
|
||||
@ -129,8 +127,8 @@ public class HireHouseManageFragment extends LazyFragment {
|
||||
|
||||
@Override
|
||||
public void startAddActivity(String id) {
|
||||
Intent intent = new Intent(mActivity, NewHouseAddActivity.class);
|
||||
intent.putExtra("title", "房屋信息录入");
|
||||
Intent intent = new Intent(mActivity, NewHireHouseAddActivity.class);
|
||||
intent.putExtra("title", "出租房信息录入");
|
||||
startActivityForResult(intent, 1234);
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package com.sucstepsoft.realtimelocation.activitys.census.normal;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.graphics.Color;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
@ -10,6 +11,7 @@ import android.widget.RadioGroup;
|
||||
import android.widget.Switch;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.beloo.widget.chipslayoutmanager.ChipsLayoutManager;
|
||||
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||
@ -19,12 +21,15 @@ import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.AreaChooseDialog;
|
||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.RegexUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.ToastUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UIUtil;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
import com.sucstepsoft.realtimelocation.adapters.PersonTagAdapter;
|
||||
import com.sucstepsoft.realtimelocation.beans.DicBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.PersonTag;
|
||||
import com.sucstepsoft.realtimelocation.beans.SuccessBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.BaseRegisterDetailBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.CensusmsgBean;
|
||||
@ -32,6 +37,7 @@ import com.sucstepsoft.realtimelocation.net.LocationApiService;
|
||||
import com.sucstepsoft.realtimelocation.utils.ExceptionHandler;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
@ -189,6 +195,10 @@ public class CensusRegisterAddActivity extends BaseActivity {
|
||||
EditText mEtDangqitashuoming;
|
||||
@BindView(R.id.btn_confirm)
|
||||
Button mBtnConfirm;
|
||||
@BindView(R.id.rlv_tags)
|
||||
RecyclerView mRlvTags;
|
||||
@BindView(R.id.rb_retire)
|
||||
RadioButton mRbRetire;
|
||||
private Unbinder mBind;
|
||||
private SimpleDateFormat mDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
private int mCurrentHealthType = -1;//当前选择的那个健康状况
|
||||
@ -288,6 +298,7 @@ public class CensusRegisterAddActivity extends BaseActivity {
|
||||
private String mSelAreaName = "";
|
||||
private String mSelAreaCode = "";
|
||||
private String mId;
|
||||
private PersonTagAdapter mTagAdapter;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
@ -299,6 +310,7 @@ public class CensusRegisterAddActivity extends BaseActivity {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mId = getIntent().getStringExtra("id");
|
||||
String title = getIntent().getStringExtra("title");
|
||||
getPersonTags();
|
||||
if (!TextUtils.isEmpty(mId)) {
|
||||
//编辑
|
||||
refreshView(STATE_LOAD_LOADING);
|
||||
@ -311,6 +323,43 @@ public class CensusRegisterAddActivity extends BaseActivity {
|
||||
initContentView();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取人员信息标签
|
||||
*/
|
||||
private void getPersonTags() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getPersonTags(UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<PersonTag>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<PersonTag> tags) {
|
||||
if (tags != null && tags.size() > 0) {
|
||||
mTags = tags;
|
||||
mTagAdapter.setData(mTags);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private String mSelGetJob = "已就业";
|
||||
|
||||
/**
|
||||
@ -358,11 +407,21 @@ public class CensusRegisterAddActivity extends BaseActivity {
|
||||
} else if (checkedId == R.id.rb_so) {
|
||||
//灵活就业
|
||||
mSelGetJob = "灵活就业";
|
||||
} else if (checkedId == R.id.rb_retire) {
|
||||
mSelGetJob = "退休";
|
||||
}
|
||||
});
|
||||
mBtnConfirm.setOnClickListener(v -> doSubmit());
|
||||
ChipsLayoutManager chipsLayoutManager = ChipsLayoutManager.newBuilder(mActivity)
|
||||
.setOrientation(ChipsLayoutManager.HORIZONTAL)
|
||||
.build();
|
||||
mTagAdapter = new PersonTagAdapter(mActivity, mTags, true);
|
||||
mRlvTags.setLayoutManager(chipsLayoutManager);
|
||||
mRlvTags.setAdapter(mTagAdapter);
|
||||
}
|
||||
|
||||
private List<PersonTag> mTags = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 显示字典选项
|
||||
*/
|
||||
@ -631,6 +690,8 @@ public class CensusRegisterAddActivity extends BaseActivity {
|
||||
mRbDiss2.setChecked(true);
|
||||
} else if ("灵活就业".equals(bean.getDepartmentType())) {
|
||||
mRbSo.setChecked(true);
|
||||
} else if ("退休".equals(bean.getDepartmentType())) {
|
||||
mRbRetire.setChecked(true);
|
||||
}
|
||||
// String workplace = mEtWorkplace.getText().toString().trim();
|
||||
// bean.setDepartment(workplace);//工作单位
|
||||
@ -768,6 +829,12 @@ public class CensusRegisterAddActivity extends BaseActivity {
|
||||
// String qitashuoming = mEtDangqitashuoming.getText().toString().trim();
|
||||
// bean.setOthertext(qitashuoming);//其他说明
|
||||
mEtDangqitashuoming.setText(bean.getOthertext());
|
||||
for (int i = 0; i < mTags.size(); i++) {
|
||||
if (bean.getLabel().contains(mTags.get(i).getId())) {
|
||||
mTags.get(i).setCheck(true);
|
||||
}
|
||||
}
|
||||
mTagAdapter.setData(mTags);
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
}
|
||||
|
||||
@ -1058,6 +1125,18 @@ public class CensusRegisterAddActivity extends BaseActivity {
|
||||
bean.setPartyTime(rudangshijian);//入党时间
|
||||
String qitashuoming = mEtDangqitashuoming.getText().toString().trim();
|
||||
bean.setOthertext(qitashuoming);//其他说明
|
||||
List<PersonTag> data = mTagAdapter.getData();
|
||||
LogUtils.e(data);
|
||||
String tags = "";
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
if(data.get(i).isCheck()){
|
||||
tags += data.get(i).getId() + ",";
|
||||
}
|
||||
}
|
||||
if (tags.endsWith(",")) {
|
||||
tags = tags.substring(0, tags.length() - 1);
|
||||
}
|
||||
bean.setLabel(tags);
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(bean);
|
||||
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
|
@ -1,13 +1,14 @@
|
||||
package com.sucstepsoft.realtimelocation.activitys.census.normal;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.Switch;
|
||||
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.UserLgUtils;
|
||||
@ -19,7 +20,9 @@ import com.sucstepsoft.realtimelocation.activitys.census.special.CensusHeresyLis
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.special.CensusPetitionListActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.special.CensusSecurityListActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.special.CensusSpecialCriminalListActivity;
|
||||
import com.sucstepsoft.realtimelocation.adapters.PersonTagAdapter;
|
||||
import com.sucstepsoft.realtimelocation.beans.OperateBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.PersonTag;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.BaseRegisterDetailBean;
|
||||
import com.sucstepsoft.realtimelocation.net.LocationApiService;
|
||||
import com.sucstepsoft.realtimelocation.utils.ExceptionHandler;
|
||||
@ -81,8 +84,8 @@ public class CensusRegisterDetailActivity extends BaseActivity {
|
||||
RadioButton mRbDiss2;
|
||||
@BindView(R.id.rb_so)
|
||||
RadioButton mRbSo;
|
||||
@BindView(R.id.rg_gtv_job)
|
||||
RadioGroup mRgGtvJob;
|
||||
@BindView(R.id.rb_retire)
|
||||
RadioButton mRbRetire;
|
||||
@BindView(R.id.tv_workplace)
|
||||
TextView mTvWorkplace;
|
||||
@BindView(R.id.tv_job_title)
|
||||
@ -177,6 +180,8 @@ public class CensusRegisterDetailActivity extends BaseActivity {
|
||||
TextView mTvRudangshijian;
|
||||
@BindView(R.id.tv_dangqitashuoming)
|
||||
TextView mTvDangqitashuoming;
|
||||
@BindView(R.id.rlv_tags)
|
||||
RecyclerView mRlvTags;
|
||||
@BindView(R.id.ll_into_content)
|
||||
LinearLayout mLlIntoContent;
|
||||
private Unbinder mBind;
|
||||
@ -233,9 +238,20 @@ public class CensusRegisterDetailActivity extends BaseActivity {
|
||||
mControls.add(b5);
|
||||
mControls.add(b6);
|
||||
mControls.add(b7);
|
||||
ChipsLayoutManager chipsLayoutManager = ChipsLayoutManager.newBuilder(mActivity)
|
||||
.setOrientation(ChipsLayoutManager.HORIZONTAL)
|
||||
.build();
|
||||
mTagAdapter = new PersonTagAdapter(mActivity, mTags,false);
|
||||
mRlvTags.setLayoutManager(chipsLayoutManager);
|
||||
mRlvTags.setAdapter(mTagAdapter);
|
||||
|
||||
getDetailData(id);
|
||||
|
||||
}
|
||||
|
||||
private PersonTagAdapter mTagAdapter;
|
||||
private List<PersonTag> mTags = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 操作
|
||||
*/
|
||||
@ -373,6 +389,8 @@ public class CensusRegisterDetailActivity extends BaseActivity {
|
||||
mRbDiss2.setChecked(true);
|
||||
} else if ("灵活就业".equals(mRegisterDetailBean.getDepartmentType())) {
|
||||
mRbSo.setChecked(true);
|
||||
} else if ("退休".equals(mRegisterDetailBean.getDepartmentType())) {
|
||||
mRbRetire.setChecked(true);
|
||||
}
|
||||
// String workplace = mEtWorkplace.getText().toString().trim();
|
||||
// bean.setDepartment(workplace);//工作单位
|
||||
@ -501,6 +519,13 @@ public class CensusRegisterDetailActivity extends BaseActivity {
|
||||
mTvRudangshijian.setText(mRegisterDetailBean.getPartyTime());
|
||||
// bean.setOthertext(qitashuoming);//其他说明
|
||||
mTvDangqitashuoming.setText(mRegisterDetailBean.getOthertext());
|
||||
mTags = mRegisterDetailBean.getLabelList();
|
||||
if (mTags != null && mTags.size() > 0) {
|
||||
for (int i = 0; i < mTags.size(); i++) {
|
||||
mTags.get(i).setCheck(true);
|
||||
}
|
||||
}
|
||||
mTagAdapter.setData(mTags);
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,48 @@
|
||||
package com.sucstepsoft.realtimelocation.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
import com.sucstepsoft.realtimelocation.adapters.holders.PersonTagHolder;
|
||||
import com.sucstepsoft.realtimelocation.beans.PersonTag;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2019/8/14 - 16:01
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class PersonTagAdapter extends BaseRecyclerAdapter<PersonTag, PersonTagHolder> {
|
||||
private boolean isEdit = false;
|
||||
|
||||
public PersonTagAdapter(Context ctx, List<PersonTag> list, boolean edit) {
|
||||
super(ctx, list);
|
||||
this.isEdit = edit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PersonTagHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_person_tag, parent, false);
|
||||
return new PersonTagHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
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()));
|
||||
if (isEdit) {
|
||||
holder.mTvName.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
holder.mTvName.setChecked(isChecked);
|
||||
mData.get(i).setCheck(isChecked);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.sucstepsoft.realtimelocation.adapters.holders;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2022/8/11 - 10:54
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class PersonTagHolder extends RecyclerView.ViewHolder {
|
||||
public CheckBox mTvName;
|
||||
|
||||
|
||||
public PersonTagHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mTvName = itemView.findViewById(R.id.tv_type_name);
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.sucstepsoft.realtimelocation.beans;
|
||||
|
||||
public class PersonTag {
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private String color;
|
||||
private String order;
|
||||
private boolean isCheck;
|
||||
|
||||
public boolean isCheck() {
|
||||
return isCheck;
|
||||
}
|
||||
|
||||
public void setCheck(boolean check) {
|
||||
isCheck = check;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public String getOrder() {
|
||||
return order;
|
||||
}
|
||||
|
||||
public void setOrder(String order) {
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PersonTag{" +
|
||||
"id='" + id + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", color='" + color + '\'' +
|
||||
", order='" + order + '\'' +
|
||||
", isCheck=" + isCheck +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -1,5 +1,9 @@
|
||||
package com.sucstepsoft.realtimelocation.beans.person;
|
||||
|
||||
import com.sucstepsoft.realtimelocation.beans.PersonTag;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/11/25 - 9:34 AM
|
||||
@ -8,9 +12,10 @@ package com.sucstepsoft.realtimelocation.beans.person;
|
||||
*/
|
||||
public class BaseRegisterDetailBean {
|
||||
|
||||
|
||||
private String populationInfoId;
|
||||
private String name;
|
||||
private String label;
|
||||
private List<PersonTag> labelList;
|
||||
private String idcard;
|
||||
private String idcardType;
|
||||
private String birthday;
|
||||
@ -102,6 +107,22 @@ public class BaseRegisterDetailBean {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public List<PersonTag> getLabelList() {
|
||||
return labelList;
|
||||
}
|
||||
|
||||
public void setLabelList(List<PersonTag> labelList) {
|
||||
this.labelList = labelList;
|
||||
}
|
||||
|
||||
public String getIdcard() {
|
||||
return idcard;
|
||||
}
|
||||
@ -693,4 +714,6 @@ public class BaseRegisterDetailBean {
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -83,6 +83,15 @@ public class CensusmsgBean {
|
||||
private String succourDifficulty;
|
||||
private String succourHelp;
|
||||
private String succourSubsidy;
|
||||
private String label;
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String getBirthday() {
|
||||
return birthday;
|
||||
|
@ -37,6 +37,7 @@ import com.sucstepsoft.realtimelocation.beans.PenLineBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.PenNewLineBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.PersonBaseInfoBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.PersonBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.PersonTag;
|
||||
import com.sucstepsoft.realtimelocation.beans.SearchBaseInfoBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.SearchHouseBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.SignDataBean;
|
||||
@ -325,6 +326,14 @@ public interface LocationApiService {
|
||||
@POST("app/file/uploadimage")
|
||||
Observable<BaseUserBean> uploadImage(@Part MultipartBody.Part file, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 上传图片 到 人口系统
|
||||
*/
|
||||
@Headers({"base_url_name:person"})
|
||||
@Multipart
|
||||
@POST("app/file/uploadimage")
|
||||
Observable<BaseUserBean> uploadImageToPerson(@Part MultipartBody.Part file, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 修改个人信息
|
||||
*
|
||||
@ -800,6 +809,13 @@ public interface LocationApiService {
|
||||
@GET("app/populationinfo/query/{idcard}")
|
||||
Observable<PersonBaseInfoBean> getBaseInfoByIdCard(@Path("idcard") String idCard, @Header("token") String token);
|
||||
/*===========================================户籍信息===========================================*/
|
||||
|
||||
/**
|
||||
* 获取人口标签
|
||||
*/
|
||||
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/populationinfo/labelrelease")
|
||||
Observable<List<PersonTag>> getPersonTags(@Header("token") String token);
|
||||
//================新版基础人员信息====================
|
||||
|
||||
/**
|
||||
@ -1509,7 +1525,7 @@ public interface LocationApiService {
|
||||
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/residential/listpage")
|
||||
Observable<NewCommunityBean> getNewCommunityList(
|
||||
@Query("street")String streetId,
|
||||
@Query("street") String streetId,
|
||||
@Query("community") String community,
|
||||
@Query("page") String page,
|
||||
@Query("keywords") String keywords,
|
||||
@ -1625,7 +1641,7 @@ public interface LocationApiService {
|
||||
@Query("street") String street,
|
||||
@Query("community") String community,
|
||||
@Query("residentialId") String rId,
|
||||
@Query("buildingId")String bId,
|
||||
@Query("buildingId") String bId,
|
||||
@Query("page") String page,
|
||||
@Query("keywords") String keywords,
|
||||
@Header("token") String token);
|
||||
@ -1677,9 +1693,9 @@ public interface LocationApiService {
|
||||
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/building/listpage")
|
||||
Observable<NewBuildingBean> getNewBuildingList(
|
||||
@Query("street")String streetId,
|
||||
@Query("community")String community,
|
||||
@Query("residentialId")String rId,
|
||||
@Query("street") String streetId,
|
||||
@Query("community") String community,
|
||||
@Query("residentialId") String rId,
|
||||
@Query("page") String page,
|
||||
@Query("keywords") String keywords,
|
||||
@Header("token") String token);
|
||||
|
6
app/src/main/res/color/col_red_yellow.xml
Executable file
6
app/src/main/res/color/col_red_yellow.xml
Executable file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/gray_text" android:state_checked="false" />
|
||||
<item android:color="@color/blue_title_bg" android:state_checked="true" />
|
||||
|
||||
</selector>
|
5
app/src/main/res/drawable/sel_service_type.xml
Executable file
5
app/src/main/res/drawable/sel_service_type.xml
Executable 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/shape_service_type_unselected" android:state_checked="false" />
|
||||
<item android:drawable="@drawable/shape_service_type_selected" android:state_checked="true" />
|
||||
</selector>
|
9
app/src/main/res/drawable/shape_service_type_selected.xml
Executable file
9
app/src/main/res/drawable/shape_service_type_selected.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">
|
||||
<corners android:radius="2dp" />
|
||||
<solid android:color="@color/white" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@color/blue_title_bg" />
|
||||
</shape>
|
9
app/src/main/res/drawable/shape_service_type_unselected.xml
Executable file
9
app/src/main/res/drawable/shape_service_type_unselected.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">
|
||||
<corners android:radius="2dp" />
|
||||
<solid android:color="@color/white" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@color/gray_fa" />
|
||||
</shape>
|
340
app/src/main/res/layout/activity_add_new_hire_house.xml
Normal file
340
app/src/main/res/layout/activity_add_new_hire_house.xml
Normal file
@ -0,0 +1,340 @@
|
||||
<?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:id="@+id/ll_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android: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" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_owner_name"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
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" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_owner_phone"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:hint="请输入房主联系电话" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:text="房屋数量" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_house_count"
|
||||
style="@style/item_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:inputType="number"
|
||||
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_house_frame"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择房屋结构" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:text="登记日期" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_register_date"
|
||||
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_hire_type"
|
||||
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_manage_level"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择管理级别" />
|
||||
</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_hire_area"
|
||||
style="@style/item_content_match"
|
||||
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"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_lend_date"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择出租日期" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<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"
|
||||
android:paddingBottom="10dp">
|
||||
<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 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>
|
||||
|
||||
|
||||
<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"
|
||||
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>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/white">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="15dp"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:minHeight="0dp"
|
||||
android:padding="10dp"
|
||||
android:text="保    存"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="17sp" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
@ -209,6 +209,22 @@
|
||||
android:inputType="number" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<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_tags"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
@ -357,7 +373,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_white_bottom_border"
|
||||
style="@style/item_white_ver"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
@ -368,7 +384,7 @@
|
||||
android:id="@+id/rg_get_job"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical|right"
|
||||
android:gravity="left"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
@ -397,6 +413,13 @@
|
||||
android:button="@drawable/sel_radio_cir"
|
||||
android:text="灵活就业"
|
||||
android:textColor="@color/col_blue_black" />
|
||||
<RadioButton
|
||||
android:id="@+id/rb_retire"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:button="@drawable/sel_radio_cir"
|
||||
android:text="退休"
|
||||
android:textColor="@color/col_blue_black" />
|
||||
|
||||
|
||||
</RadioGroup>
|
||||
|
@ -164,6 +164,23 @@
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<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_tags"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
@ -289,7 +306,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/item_white_bottom_border"
|
||||
style="@style/item_white_ver"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
@ -297,10 +314,10 @@
|
||||
android:text="就业状况" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_gtv_job"
|
||||
android:id="@+id/rg_get_job"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical|right"
|
||||
android:gravity="left"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
@ -333,6 +350,15 @@
|
||||
android:text="灵活就业"
|
||||
android:textColor="@color/col_blue_black" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_retire"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:button="@drawable/sel_radio_cir"
|
||||
android:enabled="false"
|
||||
android:text="退休"
|
||||
android:textColor="@color/col_blue_black" />
|
||||
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
@ -591,8 +617,8 @@
|
||||
|
||||
<Switch
|
||||
android:id="@+id/sw_is_old"
|
||||
android:enabled="false"
|
||||
style="@style/item_switch" />
|
||||
style="@style/item_switch"
|
||||
android:enabled="false" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@ -694,8 +720,8 @@
|
||||
|
||||
<Switch
|
||||
android:id="@+id/sw_is_deformity"
|
||||
android:enabled="false"
|
||||
style="@style/item_switch" />
|
||||
style="@style/item_switch"
|
||||
android:enabled="false" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@ -859,8 +885,8 @@
|
||||
|
||||
<Switch
|
||||
android:id="@+id/sw_is_soldier"
|
||||
android:enabled="false"
|
||||
style="@style/item_switch" />
|
||||
style="@style/item_switch"
|
||||
android:enabled="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
@ -916,8 +942,8 @@
|
||||
|
||||
<Switch
|
||||
android:id="@+id/sw_is_salvation"
|
||||
android:enabled="false"
|
||||
style="@style/item_switch" />
|
||||
style="@style/item_switch"
|
||||
android:enabled="false" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@ -931,8 +957,8 @@
|
||||
|
||||
<Switch
|
||||
android:id="@+id/sw_is_low"
|
||||
android:enabled="false"
|
||||
style="@style/item_switch" />
|
||||
style="@style/item_switch"
|
||||
android:enabled="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
@ -945,8 +971,8 @@
|
||||
|
||||
<Switch
|
||||
android:id="@+id/sw_is_yiliao"
|
||||
android:enabled="false"
|
||||
style="@style/item_switch" />
|
||||
style="@style/item_switch"
|
||||
android:enabled="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
@ -959,8 +985,8 @@
|
||||
|
||||
<Switch
|
||||
android:id="@+id/sw_is_kongnan"
|
||||
android:enabled="false"
|
||||
style="@style/item_switch" />
|
||||
style="@style/item_switch"
|
||||
android:enabled="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
@ -973,8 +999,8 @@
|
||||
|
||||
<Switch
|
||||
android:id="@+id/sw_is_laoling"
|
||||
android:enabled="false"
|
||||
style="@style/item_switch" />
|
||||
style="@style/item_switch"
|
||||
android:enabled="false" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@ -1005,8 +1031,8 @@
|
||||
|
||||
<Switch
|
||||
android:id="@+id/sw_is_dangyuan"
|
||||
android:enabled="false"
|
||||
style="@style/item_switch" />
|
||||
style="@style/item_switch"
|
||||
android:enabled="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
317
app/src/main/res/layout/activity_detail_new_hire_house.xml
Normal file
317
app/src/main/res/layout/activity_detail_new_hire_house.xml
Normal file
@ -0,0 +1,317 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android: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="房主姓名" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_owner_name"
|
||||
style="@style/sel_text_arrow_text"
|
||||
android:layout_gravity="center_vertical" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:text="联系电话" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_owner_phone"
|
||||
style="@style/sel_text_arrow_text"
|
||||
android:layout_gravity="center_vertical" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:text="房屋数量" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_house_count"
|
||||
style="@style/sel_text_arrow_text"
|
||||
android:layout_gravity="center_vertical" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:text="房屋结构" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_house_frame"
|
||||
style="@style/sel_text_arrow_text" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:text="登记日期" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_register_date"
|
||||
style="@style/sel_text_arrow_text" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:text="群租房类型" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hire_type"
|
||||
style="@style/sel_text_arrow_text" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:text="管理级别" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_manage_level"
|
||||
style="@style/sel_text_arrow_text" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="出租面积" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hire_area"
|
||||
style="@style/sel_text_arrow_text" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:text="出租日期" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_lend_date"
|
||||
style="@style/sel_text_arrow_text" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<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"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<LinearLayout style="@style/item_white_bottom_border">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_wrap"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="详细地址" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address"
|
||||
style="@style/sel_text_arrow_text" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<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: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>
|
||||
|
||||
|
||||
<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"
|
||||
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
|
||||
android:id="@+id/ll_btns"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_del"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/sel_btn_gray_white"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:padding="5dp"
|
||||
android:text="删除"
|
||||
android:textColor="@color/col_gray_black" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_edit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/sel_btn_blue_gray"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:padding="5dp"
|
||||
android:text="编辑"
|
||||
android:textColor="@color/col_white_black" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
21
app/src/main/res/layout/item_person_tag.xml
Executable file
21
app/src/main/res/layout/item_person_tag.xml
Executable file
@ -0,0 +1,21 @@
|
||||
<?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_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/tv_type_name"
|
||||
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:paddingTop="2dp"
|
||||
android:paddingRight="4dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:textSize="14sp"
|
||||
tools:text="帮扶老人" />
|
||||
</LinearLayout>
|
@ -304,4 +304,6 @@ public class PathConfig {
|
||||
public static final String DIC_BUILDING_HOUSE_TROUBLE = "34950d66-88dc-4028-9c40-8e580bf24f1a";//隐患类型
|
||||
|
||||
public static final String DIC_RENTING_TYPE = "df35f694-dc5d-4224-b64a-a381249b325d";//租住类型
|
||||
public static final String DIC_HIRE_TYPE = "dd58f6fd-1144-4e8a-a38e-2fcc70733b9b";
|
||||
public static final String DIC_MANAGE_TYPE = "e4c205d5-0617-4726-8b90-565f54a3a3f0";
|
||||
}
|
||||
|
@ -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.15:7023/population/";/*人口系统 测试*/
|
||||
// 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 = "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*/
|
||||
|
Loading…
Reference in New Issue
Block a user