bug修复,房屋管理
This commit is contained in:
parent
d6eaaab53e
commit
092d83ec72
@ -1 +1 @@
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":34,"versionName":"1.3.4","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":35,"versionName":"1.3.5","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
@ -48,6 +48,10 @@
|
||||
android:theme="@style/AppTheme"
|
||||
android:usesCleartextTraffic="true"
|
||||
tools:ignore="GoogleAppIndexingWarning">
|
||||
<activity android:name=".activitys.census.house.AddHouseActivity"></activity>
|
||||
<activity android:name=".activitys.census.house.SelCommunityActivity" />
|
||||
<activity android:name=".activitys.census.house.AddBuildingActivity" />
|
||||
<activity android:name=".activitys.census.house.HouseManageListActivity" />
|
||||
<activity
|
||||
android:name=".activitys.issue.IssueInspectActivity"
|
||||
android:screenOrientation="portrait"
|
||||
|
@ -1,18 +1,18 @@
|
||||
[
|
||||
{
|
||||
"dictionaryId": "01",
|
||||
"dictionaryId": "3d46697d-5d0e-4fff-8470-48d08c8a0b44",
|
||||
"dictionaryName": "未知的性别"
|
||||
},
|
||||
{
|
||||
"dictionaryId": "02",
|
||||
"dictionaryId": "46bec29f-2368-44f7-98d0-b33246e5e16d",
|
||||
"dictionaryName": "男性"
|
||||
},
|
||||
{
|
||||
"dictionaryId": "03",
|
||||
"dictionaryId": "4a5f549a-d339-4403-8d26-9058e80499b1",
|
||||
"dictionaryName": "女性"
|
||||
},
|
||||
{
|
||||
"dictionaryId": "04",
|
||||
"dictionaryId": "01fffb32-73ca-4872-9d2f-abb2158f0e07",
|
||||
"dictionaryName": "未说明的性别"
|
||||
}
|
||||
]
|
@ -55,7 +55,7 @@ public class PersonListActivity extends BaseActivity {
|
||||
mRlvPersons.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvPersons.setAdapter(mPersonAdapter);
|
||||
mPersonAdapter.addNextListener(bean -> {
|
||||
if (bean.getCommunityBossLevel() != 3) {
|
||||
if (bean.getCommunityBossLevel() != 4) {
|
||||
Intent intent = new Intent(mActivity, PersonListActivity.class);
|
||||
intent.putExtra("id", bean.getAreaId());
|
||||
intent.putExtra("bId", bean.getCommunityBossId());
|
||||
|
@ -55,6 +55,7 @@ import com.sucstepsoft.realtimelocation.activitys.census.CensusExpandableMainAct
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.CensusMainActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.hire.CensusHireAddActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.hire.CensusHireListActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.house.HouseManageListActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.outbound.CensusOutboundListActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.issue.IssueCheckActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.issue.IssueInspectActivity;
|
||||
@ -247,7 +248,6 @@ public class MainActivity extends BaseActivity {
|
||||
registerGpsSignal();
|
||||
// checkLocalText();
|
||||
registerGpsState();
|
||||
LogUtils.e("==重新启动=");
|
||||
String page = getIntent().getStringExtra("page");
|
||||
if (!TextUtils.isEmpty(page) && "uncheck".equals(page)) {
|
||||
startActivity(new Intent(MainActivity.this, IssueCheckActivity.class));
|
||||
@ -525,7 +525,9 @@ public class MainActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void changePwd() {
|
||||
|
||||
//房屋管理
|
||||
startActivity(new Intent(mActivity, HouseManageListActivity.class));
|
||||
build.dismiss();
|
||||
}
|
||||
});
|
||||
build.show();
|
||||
|
@ -110,7 +110,14 @@ public class CensusEnterActivity extends BaseActivity {
|
||||
private List<DicBean> mReligionList;
|
||||
private List<DicBean> mMarryList;
|
||||
|
||||
|
||||
private DicBean mSelGender;//性别
|
||||
private DicBean mSelNation;//名族
|
||||
private AreaBean mSelNative;//籍贯
|
||||
private DicBean mSelPolitical;//政治面貌
|
||||
private DicBean mSelEdu;//学历
|
||||
private DicBean mSelReligion;//信仰
|
||||
private DicBean mSelWorkType;//职业类别
|
||||
private DicBean mSelMarry;//婚姻状况
|
||||
private OptionsPickerView mGenderPicker;
|
||||
private OptionsPickerView mNationPicker;
|
||||
private OptionsPickerView mNativePicker;
|
||||
@ -122,6 +129,8 @@ public class CensusEnterActivity extends BaseActivity {
|
||||
private SimpleDateFormat mDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
private Unbinder mBind;
|
||||
private String mId;
|
||||
private String mSelCensusIds = "";
|
||||
private String mSelCurLoc = "";
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
@ -247,25 +256,25 @@ public class CensusEnterActivity extends BaseActivity {
|
||||
bean.setNameUsedBefore(onceName);
|
||||
}
|
||||
String gender = mTvGender.getText().toString().trim();
|
||||
bean.setGender(gender);
|
||||
bean.setGender(mSelGender.getDictionaryId());
|
||||
String birth = mTvBirth.getText().toString().trim();
|
||||
bean.setBirthDate(birth);
|
||||
String nation = mTvNation.getText().toString().trim();
|
||||
bean.setNation(nation);
|
||||
bean.setNation(mSelNation.getDictionaryId());
|
||||
String nativeStr = mTvNative.getText().toString().trim();
|
||||
bean.setNativePlace(nativeStr);
|
||||
bean.setNativePlace(mSelNative.getAreaId());
|
||||
String marry = mTvMarry.getText().toString().trim();
|
||||
bean.setMaritalStatus(marry);
|
||||
bean.setMaritalStatus(mSelMarry.getDictionaryId());
|
||||
String political = mTvPolitical.getText().toString().trim();
|
||||
bean.setPoliticalStatus(political);
|
||||
bean.setPoliticalStatus(mSelPolitical.getDictionaryId());
|
||||
String edu = mTvEdu.getText().toString().trim();
|
||||
bean.setEducation(edu);
|
||||
bean.setEducation(mSelEdu.getDictionaryId());
|
||||
String religion = mTvReligion.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(religion)) {
|
||||
bean.setReligion(religion);
|
||||
bean.setReligion(mSelReligion.getDictionaryId());
|
||||
}
|
||||
String workType = mTvWorkType.getText().toString().trim();
|
||||
bean.setOccupationCategory(workType);
|
||||
bean.setOccupationCategory(mSelWorkType.getDictionaryId());
|
||||
String work = mTvWork.getText().toString().trim();
|
||||
bean.setOccupation(work);
|
||||
String workSpace = mEtWorkSpace.getText().toString().trim();
|
||||
@ -275,11 +284,11 @@ public class CensusEnterActivity extends BaseActivity {
|
||||
String phone = mEtPhone.getText().toString().trim();
|
||||
bean.setTelephone(phone);
|
||||
String censusLoc = mTvCensusLoc.getText().toString().trim();
|
||||
bean.setRegisteredResidence(censusLoc);
|
||||
bean.setRegisteredResidence(mSelCensusIds);
|
||||
String censusDetail = mEtCensusDetail.getText().toString().trim();
|
||||
bean.setRegisteredResidenceAddr(censusDetail);
|
||||
String curLoc = mTvCurLoc.getText().toString().trim();
|
||||
bean.setCurrentResidence(curLoc);
|
||||
bean.setCurrentResidence(mSelCurLoc);
|
||||
String curDetail = mEtCurDetail.getText().toString().trim();
|
||||
bean.setCurrentResidenceAddr(curDetail);
|
||||
Gson gson = new Gson();
|
||||
@ -503,6 +512,7 @@ public class CensusEnterActivity extends BaseActivity {
|
||||
if (mMarryPicker == null) {
|
||||
mMarryPicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
|
||||
DicBean bean = mMarryList.get(o1);
|
||||
mSelMarry = bean;
|
||||
mTvMarry.setText(bean.getDictionaryName());
|
||||
})
|
||||
.setTitleText("请选择")
|
||||
@ -528,6 +538,7 @@ public class CensusEnterActivity extends BaseActivity {
|
||||
if (mGenderPicker == null) {
|
||||
mGenderPicker = new OptionsPickerBuilder(mActivity, (options1, options2, options3, v) -> {
|
||||
DicBean bean = mGenderList.get(options1);
|
||||
mSelGender = bean;
|
||||
mTvGender.setText(bean.getDictionaryName());
|
||||
}).setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
@ -590,6 +601,7 @@ public class CensusEnterActivity extends BaseActivity {
|
||||
if (mNationPicker == null) {
|
||||
mNationPicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
|
||||
DicBean bean = mNationList.get(o1);
|
||||
mSelNation = bean;
|
||||
mTvNation.setText(bean.getDictionaryName());
|
||||
})
|
||||
.setTitleText("请选择")
|
||||
@ -615,6 +627,7 @@ public class CensusEnterActivity extends BaseActivity {
|
||||
if (mNativePicker == null) {
|
||||
mNativePicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
|
||||
AreaBean bean = mNativeList.get(o1);
|
||||
mSelNative = bean;
|
||||
mTvNative.setText(bean.getAreaName());
|
||||
})
|
||||
.setTitleText("请选择")
|
||||
@ -678,6 +691,7 @@ public class CensusEnterActivity extends BaseActivity {
|
||||
if (mPoliticalPicker == null) {
|
||||
mPoliticalPicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
|
||||
DicBean bean = mPoliticalList.get(o1);
|
||||
mSelPolitical = bean;
|
||||
mTvPolitical.setText(bean.getDictionaryName());
|
||||
})
|
||||
.setTitleText("请选择")
|
||||
@ -702,6 +716,7 @@ public class CensusEnterActivity extends BaseActivity {
|
||||
if (mEduPicker == null) {
|
||||
mEduPicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
|
||||
DicBean bean = mEduList.get(o1);
|
||||
mSelEdu = bean;
|
||||
mTvEdu.setText(bean.getDictionaryName());
|
||||
})
|
||||
.setTitleText("请选择")
|
||||
@ -726,6 +741,7 @@ public class CensusEnterActivity extends BaseActivity {
|
||||
if (mReligionPicker == null) {
|
||||
mReligionPicker = new OptionsPickerBuilder(mActivity, (o1, o2, o3, v) -> {
|
||||
DicBean bean = mReligionList.get(o1);
|
||||
mSelReligion = bean;
|
||||
mTvReligion.setText(bean.getDictionaryName());
|
||||
})
|
||||
.setTitleText("请选择")
|
||||
@ -757,6 +773,7 @@ public class CensusEnterActivity extends BaseActivity {
|
||||
if (requestCode == 1234) {
|
||||
if (resultCode == 222) {
|
||||
DicBean bean = (DicBean) data.getSerializableExtra("bean");
|
||||
mSelWorkType = bean;
|
||||
mTvWorkType.setText(bean.getDictionaryName());
|
||||
}
|
||||
}
|
||||
@ -831,13 +848,15 @@ public class CensusEnterActivity extends BaseActivity {
|
||||
.setIsBackCancelable(false)
|
||||
.setIscancelable(false)
|
||||
.build();
|
||||
areaDialogView.addOnChoseListener(list -> {
|
||||
areaDialogView.addOnChoseListener((list, ids) -> {
|
||||
switch (type) {
|
||||
case 1://户籍地
|
||||
mTvCensusLoc.setText(list);
|
||||
mSelCensusIds = ids;
|
||||
break;
|
||||
case 2://现在住地
|
||||
mTvCurLoc.setText(list);
|
||||
mSelCurLoc = ids;
|
||||
break;
|
||||
}
|
||||
areaDialogView.dismiss();
|
||||
|
@ -0,0 +1,59 @@
|
||||
package com.sucstepsoft.realtimelocation.activitys.census.house;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
|
||||
/**
|
||||
* 添加楼宇
|
||||
*/
|
||||
public class AddBuildingActivity extends BaseActivity {
|
||||
@BindView(R.id.tv_community)
|
||||
TextView mTvCommunity;//小区名称
|
||||
@BindView(R.id.et_build_name)
|
||||
EditText mEtBuildName;//楼宇名称
|
||||
@BindView(R.id.et_build_num)
|
||||
EditText mEtBuildNum;//楼宇编号
|
||||
@BindView(R.id.et_build_unit)
|
||||
EditText mEtBuildUnit;//单元数
|
||||
@BindView(R.id.et_build_layer)
|
||||
EditText mEtBuildLayer;//层数
|
||||
@BindView(R.id.et_build_family)
|
||||
EditText mEtBuildFamily;//户数
|
||||
|
||||
private Unbinder mBind;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_add_building;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("楼宇添加");
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mTvCommunity.setOnClickListener(v -> startActivityForResult(new Intent(mActivity, SelCommunityActivity.class), 123));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
if (requestCode == 123) {
|
||||
if (resultCode == 333) {
|
||||
|
||||
}
|
||||
}
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.sucstepsoft.realtimelocation.activitys.census.house;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
|
||||
/**
|
||||
* 添加房屋
|
||||
*/
|
||||
public class AddHouseActivity extends BaseActivity {
|
||||
@BindView(R.id.tv_community)
|
||||
TextView mTvCommunity;//小区名称
|
||||
@BindView(R.id.et_build_name)
|
||||
EditText mEtBuildName;//楼宇名称
|
||||
@BindView(R.id.et_build_num)
|
||||
EditText mEtBuildNum;//楼宇编号
|
||||
@BindView(R.id.et_build_unit)
|
||||
EditText mEtBuildUnit;//单元数
|
||||
@BindView(R.id.et_build_layer)
|
||||
EditText mEtBuildLayer;//层数
|
||||
@BindView(R.id.et_build_family)
|
||||
EditText mEtBuildFamily;//户数
|
||||
private Unbinder mBind;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_add_house;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
|
||||
mTvBaseTitle.setText("房屋添加");
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mTvCommunity.setOnClickListener(v -> startActivityForResult(new Intent(mActivity, SelCommunityActivity.class), 123));
|
||||
}
|
||||
}
|
@ -0,0 +1,151 @@
|
||||
package com.sucstepsoft.realtimelocation.activitys.census.house;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentStatePagerAdapter;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.CenterBuildDialogView;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.CenterFuncDialogView;
|
||||
import com.sucstepsoft.cm_utils.core.widget.xtablayout.XTabLayout;
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.CensusExpandableMainActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.hire.CensusHireAddActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.hire.CensusHireListActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.census.outbound.CensusOutboundListActivity;
|
||||
import com.sucstepsoft.realtimelocation.activitys.issue.IssueSpecialRecordActivity;
|
||||
import com.sucstepsoft.realtimelocation.fragments.house.HouseManageFragment;
|
||||
import com.sucstepsoft.realtimelocation.fragments.issue.SpecialPendingFragment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
|
||||
/**
|
||||
* 房屋管理
|
||||
*/
|
||||
public class HouseManageListActivity extends BaseActivity {
|
||||
|
||||
@BindView(R.id.xtl_tabs)
|
||||
XTabLayout mTablayout;
|
||||
@BindView(R.id.vp_content)
|
||||
ViewPager mVpContent;
|
||||
@BindView(R.id.btn_add_house)
|
||||
Button mBtnAddHouse;
|
||||
private Unbinder mBind;
|
||||
private String[] mTitles = new String[]{"楼宇", "房子"};
|
||||
private List<Fragment> mFragments = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_house_manage_list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("楼宇房屋管理");
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mTvPublish.setText("搜索");
|
||||
mTvPublish.setOnClickListener(v -> {
|
||||
|
||||
});
|
||||
// for (int i = 0; i < mTitles.length; i++) {
|
||||
// HouseManageFragment fragment = new HouseManageFragment();
|
||||
// Bundle bundle = new Bundle();
|
||||
// bundle.putString("title", mTitles[i]);
|
||||
// bundle.putString("type", i + "");
|
||||
// fragment.setArguments(bundle);
|
||||
// mFragments.add(fragment);
|
||||
// }
|
||||
// VpRecordAdapter adapter = new VpRecordAdapter(getSupportFragmentManager());
|
||||
// mVpContent.setAdapter(adapter);
|
||||
// mTablayout.setxTabDisplayNum(2);
|
||||
// mTablayout.setupWithViewPager(mVpContent);
|
||||
mBtnAddHouse.setOnClickListener(v -> showTypeDialog());
|
||||
}
|
||||
|
||||
private void showTypeDialog() {
|
||||
CenterBuildDialogView build = new CenterBuildDialogView.DialogBuilder(mActivity)
|
||||
.setIscancelable(true)
|
||||
.setIsBackCancelable(true)
|
||||
.build();
|
||||
build.addOnChoseListener(new CenterBuildDialogView.OnChoseListener() {
|
||||
@Override
|
||||
public void choseFile() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void choseAlbum() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void choseShoot() {
|
||||
//添加房屋
|
||||
startActivity(new Intent(mActivity, AddHouseActivity.class));
|
||||
build.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loginOut() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changePwd() {
|
||||
//添加楼宇
|
||||
startActivity(new Intent(mActivity, AddBuildingActivity.class));
|
||||
build.dismiss();
|
||||
}
|
||||
});
|
||||
build.show();
|
||||
}
|
||||
|
||||
|
||||
private class VpRecordAdapter extends FragmentStatePagerAdapter {
|
||||
|
||||
public VpRecordAdapter(FragmentManager fm) {
|
||||
super(fm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Fragment getItem(int i) {
|
||||
return mFragments.get(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
if (mFragments != null) {
|
||||
return mFragments.size();
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public CharSequence getPageTitle(int position) {
|
||||
return mTitles[position];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
mFragments = null;
|
||||
if (mBind != null) {
|
||||
mBind.unbind();
|
||||
}
|
||||
super.onDestroy();
|
||||
}
|
||||
}
|
@ -0,0 +1,209 @@
|
||||
package com.sucstepsoft.realtimelocation.activitys.census.house;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
||||
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.utils.ToastUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
import com.sucstepsoft.realtimelocation.adapters.CensusPersonAdapter;
|
||||
import com.sucstepsoft.realtimelocation.adapters.CommunityAdapter;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.CensusPersonBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.CommunityListBean;
|
||||
import com.sucstepsoft.realtimelocation.net.LocationApiService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import io.reactivex.Observer;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
/**
|
||||
* 选择小区
|
||||
*/
|
||||
public class SelCommunityActivity extends BaseActivity {
|
||||
@BindView(R.id.iv_clear)
|
||||
ImageView mIvClear;
|
||||
@BindView(R.id.et_search_centent)
|
||||
EditText mEtSearchContent;
|
||||
@BindView(R.id.btn_search)
|
||||
Button mBtnSearch;
|
||||
@BindView(R.id.xlv_content)
|
||||
XRecyclerView mXlvItems;
|
||||
|
||||
private Unbinder mBind;
|
||||
private String mRows = "20";
|
||||
private int mCurPage = 1;
|
||||
private CommunityAdapter mAdapter;
|
||||
private List<CommunityListBean.RowsBean> mDatas = new ArrayList<>();
|
||||
private Disposable mDisposable;
|
||||
private String mKeywords = "";
|
||||
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_sel_community;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("小区选择");
|
||||
|
||||
|
||||
mBtnSearch.setOnClickListener(v -> doSearch());
|
||||
mIvClear.setOnClickListener(v -> {
|
||||
mKeywords = "";
|
||||
mEtSearchContent.setText("");
|
||||
refreshData();
|
||||
});
|
||||
|
||||
mAdapter = new CommunityAdapter(mActivity, mDatas);
|
||||
LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity);
|
||||
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
|
||||
mXlvItems.setLayoutManager(layoutManager);
|
||||
mXlvItems.setAdapter(mAdapter);
|
||||
mXlvItems.setRefreshProgressStyle(ProgressStyle.BallGridBeat);
|
||||
mXlvItems.setLoadingMoreProgressStyle(ProgressStyle.Pacman);
|
||||
mXlvItems.setPullRefreshEnabled(true);
|
||||
mXlvItems.setLoadingMoreEnabled(true);
|
||||
mXlvItems.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
refreshData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMore() {
|
||||
getCommunityList(mCurPage);
|
||||
}
|
||||
});
|
||||
mAdapter.addOnEditListener(new CommunityAdapter.OnEditListener() {
|
||||
@Override
|
||||
public void onDel(CommunityListBean.RowsBean bean, int pos) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEdit(CommunityListBean.RowsBean bean, int pos) {
|
||||
doSel(bean);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void refreshData() {
|
||||
getCommunityList(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
refreshData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
private void doSearch() {
|
||||
String searchContent = mEtSearchContent.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(searchContent)) {
|
||||
hideSoftKeyboard();
|
||||
mKeywords = searchContent;
|
||||
mCurPage = 1;
|
||||
getCommunityList(mCurPage);
|
||||
} else {
|
||||
ToastUtils.showShort("请输入要查询的内容");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交选择
|
||||
*
|
||||
* @param bean
|
||||
*/
|
||||
private void doSel(CommunityListBean.RowsBean bean) {
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("id", bean.getCityDistrictId());
|
||||
intent.putExtra("name", bean.getDistrictName());
|
||||
setResult(333, intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取列表
|
||||
*/
|
||||
private void getCommunityList(int page) {
|
||||
mCurPage = page;
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getCommunityList(page + "", mKeywords, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<CommunityListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(CommunityListBean leaveListBean) {
|
||||
if (leaveListBean != null && leaveListBean.getRows() != null && leaveListBean.getRows().size() > 0) {
|
||||
++mCurPage;
|
||||
if (page == 1) {
|
||||
mDatas.clear();
|
||||
mDatas.addAll(leaveListBean.getRows());
|
||||
} else {
|
||||
mDatas.addAll(leaveListBean.getRows());
|
||||
}
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mXlvItems.refreshComplete();
|
||||
if (mDatas.size() >= leaveListBean.getTotal()) {
|
||||
mXlvItems.loadMoreComplete();
|
||||
mXlvItems.setNoMore(true);
|
||||
} else {
|
||||
mXlvItems.loadMoreComplete();
|
||||
mXlvItems.setNoMore(false);
|
||||
}
|
||||
} else {
|
||||
if (page > 1) {
|
||||
mXlvItems.loadMoreComplete();
|
||||
mXlvItems.setNoMore(true);
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
} else {
|
||||
if (TextUtils.isEmpty(mKeywords)) {
|
||||
//无数据
|
||||
refreshView(STATE_LOAD_EMPTY);
|
||||
} else {
|
||||
ToastUtils.showShort("未查询到相关内容");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
ToastUtils.showShort("数据加载失,请稍后重试");
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
@ -164,7 +164,7 @@ public class CensusOutBoundAddActivity extends BaseActivity {
|
||||
.setIsBackCancelable(false)
|
||||
.setIscancelable(false)
|
||||
.build();
|
||||
areaDialogView.addOnChoseListener(list -> {
|
||||
areaDialogView.addOnChoseListener((list, ids) -> {
|
||||
mTvCurLoc.setText(list);
|
||||
mCurrentLoc = list;
|
||||
areaDialogView.dismiss();
|
||||
|
@ -9,6 +9,7 @@ import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
||||
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.ToastUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
|
@ -169,10 +169,10 @@ public class IssueDetailActivity extends BaseActivity {
|
||||
if (TextUtils.isEmpty(mCheck)) {
|
||||
mLlIssueDisDetail.setVisibility(View.GONE);
|
||||
mLlGrade.setVisibility(View.GONE);
|
||||
mBtnReturn.setVisibility(View.VISIBLE);
|
||||
mBtnReturn.setVisibility(View.GONE);
|
||||
} else {
|
||||
mLlGrade.setVisibility(View.VISIBLE);
|
||||
mBtnReturn.setVisibility(View.GONE);
|
||||
mBtnReturn.setVisibility(View.VISIBLE);
|
||||
mLlIssueDisDetail.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (!TextUtils.isEmpty(mine)) {
|
||||
|
@ -147,6 +147,7 @@ public class IssuePubReportActivity extends BaseActivity {
|
||||
private List<TypeUserBean> mUserBeans = new ArrayList<>();
|
||||
private OptionsPickerView<TypeUserBean> mPersonPicker;
|
||||
private String mSelPersonId;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_issue_pub_report;
|
||||
@ -177,7 +178,7 @@ public class IssuePubReportActivity extends BaseActivity {
|
||||
if (PathConfig.USER_TYPE_N.equals(appTokenUser.getRoles().get(i).getRoleId())) {
|
||||
//N员
|
||||
mSelSource = "3";
|
||||
mTvSourceContent.setText("N员上报");
|
||||
mTvSourceContent.setText("专管员上报");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -526,7 +527,6 @@ public class IssuePubReportActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 显示案件类别
|
||||
*/
|
||||
@ -564,7 +564,7 @@ public class IssuePubReportActivity extends BaseActivity {
|
||||
private void getCaseTypeList(int i) {
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getDictListAll("46d108b2-4ef9-4f6f-b30c-0c700e3ee852", UserLgUtils.getToken())
|
||||
.getDictListAllNew("46d108b2-4ef9-4f6f-b30c-0c700e3ee852", UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<TypeListBean>>() {
|
||||
|
@ -211,7 +211,7 @@ public class IssueReportActivity extends BaseActivity {
|
||||
if (PathConfig.USER_TYPE_N.equals(appTokenUser.getRoles().get(i).getRoleId())) {
|
||||
//N员
|
||||
mSelSource = "3";
|
||||
mTvSourceContent.setText("N员上报");
|
||||
mTvSourceContent.setText("专管员上报");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -278,11 +278,11 @@ public class IssueReportActivity extends BaseActivity {
|
||||
if (isSelf) {
|
||||
mLlCaseType.setVisibility(View.GONE);
|
||||
if ("3".equals(mSelSource)) {
|
||||
mTvSourceContent.setText("N员上报(自处理)");
|
||||
mTvSourceContent.setText("专管员上报(自处理)");
|
||||
}
|
||||
} else {
|
||||
if ("3".equals(mSelSource)) {
|
||||
mTvSourceContent.setText("N员上报");
|
||||
mTvSourceContent.setText("专管员上报");
|
||||
}
|
||||
mLlCaseType.setVisibility(View.VISIBLE);
|
||||
}
|
||||
@ -337,14 +337,14 @@ public class IssueReportActivity extends BaseActivity {
|
||||
bean1.setDictId("2");
|
||||
bean1.setDictName("街镇案件");
|
||||
|
||||
TypeListBean bean2 = new TypeListBean();
|
||||
bean2.setDictId("3");
|
||||
bean2.setDictName("其他类案件");
|
||||
// TypeListBean bean2 = new TypeListBean();
|
||||
// bean2.setDictId("3");
|
||||
// bean2.setDictName("其他类案件");
|
||||
|
||||
mCaseTypeList = new ArrayList<>();
|
||||
mCaseTypeList.add(bean);
|
||||
mCaseTypeList.add(bean1);
|
||||
mCaseTypeList.add(bean2);
|
||||
// mCaseTypeList.add(bean2);
|
||||
onShowCaseTypePicker();
|
||||
}
|
||||
}
|
||||
|
@ -113,8 +113,8 @@ public class UserActivity extends BaseActivity {
|
||||
RelativeLayout mRlLeave;
|
||||
@BindView(R.id.rl_leave_check)
|
||||
RelativeLayout mRlLeaveCheck;
|
||||
@BindView(R.id.ib_app_back)
|
||||
Button mIbBack;
|
||||
@BindView(R.id.btn_back)
|
||||
Button mBtnBack;
|
||||
private String mPicPath;
|
||||
private Unbinder mBind;
|
||||
|
||||
@ -130,7 +130,7 @@ public class UserActivity extends BaseActivity {
|
||||
mRlTitleBar.setVisibility(View.GONE);
|
||||
// mTvBaseTitle.setText("个人中心");
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mIbBack.setOnClickListener(v -> finish());
|
||||
mBtnBack.setOnClickListener(v -> finish());
|
||||
mLlChangePwd.setOnClickListener(v -> choosePage(1));
|
||||
mLlUserInfo.setOnClickListener(v -> choosePage(2));
|
||||
mBtnSubmit.setOnClickListener(v -> loginOut());
|
||||
@ -149,18 +149,18 @@ public class UserActivity extends BaseActivity {
|
||||
if (!TextUtils.isEmpty(loginInfo)) {
|
||||
Gson mGson = new Gson();
|
||||
AppTokenUser appTokenUser = mGson.fromJson(loginInfo, AppTokenUser.class);
|
||||
String type = "片长";
|
||||
String type = "网格员";
|
||||
if (appTokenUser.getRoles() != null && appTokenUser.getRoles().size() > 0) {
|
||||
for (int i = 0; i < appTokenUser.getRoles().size(); i++) {
|
||||
if (PathConfig.USER_TYPE_N.equals(appTokenUser.getRoles().get(i).getRoleId())) {
|
||||
type = "N员";
|
||||
type = "专管员";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
mTvDepart.setText(type);
|
||||
} else {
|
||||
mTvDepart.setText("片长");
|
||||
mTvDepart.setText("网格员");
|
||||
}
|
||||
Glide.with(mActivity)
|
||||
.load(BaseUrlApi.BASE_IMG_URL + UserLgUtils.getAvatar())
|
||||
@ -274,12 +274,13 @@ public class UserActivity extends BaseActivity {
|
||||
showToast("图片路径错误.");
|
||||
return;
|
||||
}
|
||||
int[] imageWidthHeight = getImageWidthHeight(picPath);
|
||||
if (imageWidthHeight[0] > 413 || imageWidthHeight[1] > 626) {
|
||||
ToastUtils.showShort("图片宽度必须小于等于413像素,高度必须小于626像素");
|
||||
} else {
|
||||
doUploaddImg(picPath);
|
||||
}
|
||||
// int[] imageWidthHeight = getImageWidthHeight(picPath);
|
||||
// if (imageWidthHeight[0] > 413 || imageWidthHeight[1] > 626) {
|
||||
// ToastUtils.showShort("图片宽度必须小于等于413像素,高度必须小于626像素");
|
||||
// } else {
|
||||
//
|
||||
// }
|
||||
doUploaddImg(picPath);
|
||||
}
|
||||
|
||||
private void doUploaddImg(String picPath) {
|
||||
@ -323,9 +324,9 @@ public class UserActivity extends BaseActivity {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
ToastUtils.showShort("头像修改失败,请稍后重试.");
|
||||
if (file.exists()) {
|
||||
file.delete();
|
||||
}
|
||||
// if (file.exists()) {
|
||||
// file.delete();
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -0,0 +1,54 @@
|
||||
package com.sucstepsoft.realtimelocation.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
import com.sucstepsoft.realtimelocation.adapters.holders.CensusPersonHolder;
|
||||
import com.sucstepsoft.realtimelocation.adapters.holders.CommunityHolder;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.CensusPersonBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.CommunityListBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/11/17 - 1:22 PM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 人口adapter
|
||||
*/
|
||||
public class CommunityAdapter extends BaseRecyclerAdapter<CommunityListBean.RowsBean, CommunityHolder> {
|
||||
public CommunityAdapter(Context ctx, List<CommunityListBean.RowsBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommunityHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_community_sel, parent, false);
|
||||
return new CommunityHolder(itemView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindHolder(CommunityHolder censusPersonHolder, int i) {
|
||||
CommunityListBean.RowsBean bean = mData.get(i);
|
||||
censusPersonHolder.mTvAreaName.setText(bean.getAreaName());
|
||||
censusPersonHolder.mTvDistrictName.setText(bean.getDistrictName());
|
||||
censusPersonHolder.mTvCommunityName.setText(bean.getCommunityName());
|
||||
censusPersonHolder.mBtnConfirm.setOnClickListener(v -> mEditListener.onEdit(bean, i));
|
||||
}
|
||||
|
||||
private OnEditListener mEditListener;
|
||||
|
||||
public void addOnEditListener(OnEditListener mListener) {
|
||||
this.mEditListener = mListener;
|
||||
}
|
||||
|
||||
public interface OnEditListener {
|
||||
void onDel(CommunityListBean.RowsBean bean, int pos);
|
||||
|
||||
void onEdit(CommunityListBean.RowsBean bean, int pos);
|
||||
}
|
||||
}
|
@ -42,16 +42,24 @@ public class PersonAdapter extends BaseRecyclerAdapter<PersonBean, PersonHolder>
|
||||
int le = mData.get(i).getCommunityBossLevel();
|
||||
if (le != 0) {
|
||||
switch (le) {
|
||||
case 0:
|
||||
personHolder.mTvUserName.setText(mData.get(i).getCommunityBossName() + "(一级网格长)");
|
||||
personHolder.mLlNext.setVisibility(View.VISIBLE);
|
||||
break;
|
||||
case 1:
|
||||
personHolder.mTvUserName.setText(mData.get(i).getCommunityBossName() + "(一级片长)");
|
||||
personHolder.mTvUserName.setText(mData.get(i).getCommunityBossName() + "(二级网格长)");
|
||||
personHolder.mLlNext.setVisibility(View.VISIBLE);
|
||||
break;
|
||||
case 2:
|
||||
personHolder.mTvUserName.setText(mData.get(i).getCommunityBossName() + "(二级片长)");
|
||||
personHolder.mTvUserName.setText(mData.get(i).getCommunityBossName() + "(三级网格长)");
|
||||
personHolder.mLlNext.setVisibility(View.VISIBLE);
|
||||
break;
|
||||
case 3:
|
||||
personHolder.mTvUserName.setText(mData.get(i).getCommunityBossName() + "(三级片长)");
|
||||
personHolder.mTvUserName.setText(mData.get(i).getCommunityBossName() + "(四级网格长)");
|
||||
personHolder.mLlNext.setVisibility(View.VISIBLE);
|
||||
break;
|
||||
case 4:
|
||||
personHolder.mTvUserName.setText(mData.get(i).getCommunityBossName() + "(五级网格员)");
|
||||
personHolder.mLlNext.setVisibility(View.GONE);
|
||||
break;
|
||||
}
|
||||
|
@ -0,0 +1,30 @@
|
||||
package com.sucstepsoft.realtimelocation.adapters.holders;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.sucstepsoft.realtimelocation.R;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/7/9 - 3:22 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class CommunityHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvAreaName;//街道名称
|
||||
public TextView mTvCommunityName;//社区名称
|
||||
public TextView mTvDistrictName;//小区名称
|
||||
public Button mBtnConfirm;//选择
|
||||
|
||||
public CommunityHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mTvAreaName = itemView.findViewById(R.id.tv_area);
|
||||
mTvCommunityName = itemView.findViewById(R.id.tv_community);
|
||||
mTvDistrictName = itemView.findViewById(R.id.tv_district);
|
||||
mBtnConfirm = itemView.findViewById(R.id.btn_confirm);
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.sucstepsoft.realtimelocation.adapters.holders;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/7/9 - 2:28 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class HouseHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
public HouseHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
}
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
package com.sucstepsoft.realtimelocation.beans.person;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/7/9 - 3:20 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class CommunityListBean {
|
||||
|
||||
private int page;
|
||||
private int total;
|
||||
private List<RowsBean> rows;
|
||||
|
||||
public int getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(int page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public int getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(int total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public List<RowsBean> getRows() {
|
||||
return rows;
|
||||
}
|
||||
|
||||
public void setRows(List<RowsBean> rows) {
|
||||
this.rows = rows;
|
||||
}
|
||||
|
||||
public static class RowsBean {
|
||||
private String areaId;
|
||||
private String areaName;
|
||||
private String cityDistrictId;
|
||||
private String communityBossId;
|
||||
private String communityId;
|
||||
private String communityName;
|
||||
private String districtName;
|
||||
private String districtRemark;
|
||||
|
||||
public String getAreaId() {
|
||||
return areaId;
|
||||
}
|
||||
|
||||
public void setAreaId(String areaId) {
|
||||
this.areaId = areaId;
|
||||
}
|
||||
|
||||
public String getAreaName() {
|
||||
return areaName;
|
||||
}
|
||||
|
||||
public void setAreaName(String areaName) {
|
||||
this.areaName = areaName;
|
||||
}
|
||||
|
||||
public String getCityDistrictId() {
|
||||
return cityDistrictId;
|
||||
}
|
||||
|
||||
public void setCityDistrictId(String cityDistrictId) {
|
||||
this.cityDistrictId = cityDistrictId;
|
||||
}
|
||||
|
||||
public String getCommunityBossId() {
|
||||
return communityBossId;
|
||||
}
|
||||
|
||||
public void setCommunityBossId(String communityBossId) {
|
||||
this.communityBossId = communityBossId;
|
||||
}
|
||||
|
||||
public String getCommunityId() {
|
||||
return communityId;
|
||||
}
|
||||
|
||||
public void setCommunityId(String communityId) {
|
||||
this.communityId = communityId;
|
||||
}
|
||||
|
||||
public String getCommunityName() {
|
||||
return communityName;
|
||||
}
|
||||
|
||||
public void setCommunityName(String communityName) {
|
||||
this.communityName = communityName;
|
||||
}
|
||||
|
||||
public String getDistrictName() {
|
||||
return districtName;
|
||||
}
|
||||
|
||||
public void setDistrictName(String districtName) {
|
||||
this.districtName = districtName;
|
||||
}
|
||||
|
||||
public String getDistrictRemark() {
|
||||
return districtRemark;
|
||||
}
|
||||
|
||||
public void setDistrictRemark(String districtRemark) {
|
||||
this.districtRemark = districtRemark;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,545 @@
|
||||
package com.sucstepsoft.realtimelocation.fragments.house;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
||||
import com.jcodecraeer.xrecyclerview.ProgressStyle;
|
||||
import com.jcodecraeer.xrecyclerview.XRecyclerView;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.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.issue.IssueSpecialDetailActivity;
|
||||
import com.sucstepsoft.realtimelocation.adapters.IssueSubAdapter;
|
||||
import com.sucstepsoft.realtimelocation.beans.IssueSubBean;
|
||||
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.disposables.Disposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
/**
|
||||
* 作者: Adam
|
||||
* 日期: 2021/7/9 - 14:21
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: 房屋管理
|
||||
*/
|
||||
public class HouseManageFragment extends LazyFragment {
|
||||
@BindView(R.id.rlv_items)
|
||||
XRecyclerView mRlvItems;
|
||||
private List<IssueSubBean.RowsBean> mDatas;
|
||||
private IssueSubAdapter mAdapter;
|
||||
private String mRows = "20";
|
||||
private int mCurPage = 1;
|
||||
private int mType = 3;
|
||||
private Unbinder mBind;
|
||||
private Activity mActivity;
|
||||
private String mTitle;
|
||||
private Disposable mDisFinish;
|
||||
private Disposable mDisWait;
|
||||
private Disposable mDisCheck;
|
||||
private Disposable mDisDis;
|
||||
private Disposable mDisAppoint;
|
||||
|
||||
@Override
|
||||
protected void onCreateViewLazy(Bundle savedInstanceState) {
|
||||
super.onCreateViewLazy(savedInstanceState);
|
||||
View view = LayoutInflater.from(mActivity).inflate(R.layout.fragment_house_manage, null);
|
||||
setContentView(view);
|
||||
mBind = ButterKnife.bind(this, view);
|
||||
mDatas = new ArrayList<>();
|
||||
mAdapter = new IssueSubAdapter(mActivity, mDatas, false);
|
||||
Bundle arguments = getArguments();
|
||||
mTitle = arguments.getString("title");
|
||||
LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity);
|
||||
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
|
||||
mRlvItems.setLayoutManager(layoutManager);
|
||||
mRlvItems.setAdapter(mAdapter);
|
||||
mAdapter.addOnItemClickListener(this::showIssueDetail);
|
||||
mRlvItems.setNoMore(true);
|
||||
mRlvItems.setRefreshProgressStyle(ProgressStyle.BallGridBeat);
|
||||
mRlvItems.setLoadingMoreProgressStyle(ProgressStyle.Pacman);
|
||||
mRlvItems.setLoadingListener(new XRecyclerView.LoadingListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
refresh();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMore() {
|
||||
loadMore();
|
||||
}
|
||||
});
|
||||
// 3"待处理", 4"待检查",6 "已归档"
|
||||
if (!TextUtils.isEmpty(mTitle)) {
|
||||
// "待下派", 3"待处理", 4"待检查", 6"已归档"
|
||||
switch (mTitle) {
|
||||
case "待检查":
|
||||
mType = 4;
|
||||
getDisposeList(1);
|
||||
break;
|
||||
case "已归档":
|
||||
mType = 6;
|
||||
getDisposeList(1);
|
||||
break;
|
||||
case "待处理":
|
||||
default:
|
||||
mType = 3;
|
||||
getDisposeList(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示详情
|
||||
*
|
||||
* @param bean
|
||||
*/
|
||||
private void showIssueDetail(IssueSubBean.RowsBean bean) {
|
||||
Intent intent = new Intent(mActivity, IssueSpecialDetailActivity.class);
|
||||
intent.putExtra("bean", bean);
|
||||
switch (bean.getCaseStatus()) {
|
||||
case "0"://待受理
|
||||
break;
|
||||
case "1"://待立案
|
||||
break;
|
||||
case "2"://待下派
|
||||
break;
|
||||
case "3"://待处理
|
||||
break;
|
||||
case "4":
|
||||
case "5":
|
||||
case "6"://已经归档
|
||||
intent.putExtra("check", "check");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFragmentStartLazy() {
|
||||
super.onFragmentStartLazy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(Activity activity) {
|
||||
super.onAttach(activity);
|
||||
this.mActivity = activity;
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新视图
|
||||
*
|
||||
* @param state
|
||||
*/
|
||||
private void refreshView(int state) {
|
||||
switch (state) {
|
||||
case 14://加载中
|
||||
break;
|
||||
case 15://加载成功
|
||||
break;
|
||||
case 16://加载失败
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroyViewLazy() {
|
||||
super.onDestroyViewLazy();
|
||||
if (mDisAppoint != null && !mDisAppoint.isDisposed()) {
|
||||
mDisAppoint.dispose();
|
||||
}
|
||||
if (mDisCheck != null && !mDisCheck.isDisposed()) {
|
||||
mDisCheck.dispose();
|
||||
}
|
||||
if (mDisDis != null && !mDisDis.isDisposed()) {
|
||||
mDisDis.dispose();
|
||||
}
|
||||
if (mDisFinish != null && !mDisFinish.isDisposed()) {
|
||||
mDisFinish.dispose();
|
||||
}
|
||||
if (mDisWait != null && !mDisWait.isDisposed()) {
|
||||
mDisWait.dispose();
|
||||
}
|
||||
mRlvItems.destroy();
|
||||
mRlvItems = null;
|
||||
mBind.unbind();
|
||||
mAdapter = null;
|
||||
mDatas = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 待下派
|
||||
*/
|
||||
private void getAppointList(int page) {
|
||||
mCurPage = page;
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getIssueSubList(mRows, mCurPage + "", UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<IssueSubBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
mDisAppoint = d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(IssueSubBean issueSubBean) {
|
||||
if (issueSubBean != null && issueSubBean.getRows() != null && issueSubBean.getRows().size() > 0) {
|
||||
++mCurPage;
|
||||
if (page == 1) {
|
||||
mDatas.clear();
|
||||
mDatas.addAll(issueSubBean.getRows());
|
||||
} else {
|
||||
mDatas.addAll(issueSubBean.getRows());
|
||||
}
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mRlvItems.refreshComplete();
|
||||
if (mDatas.size() >= issueSubBean.getTotal()) {
|
||||
mRlvItems.loadMoreComplete();
|
||||
mRlvItems.setNoMore(true);
|
||||
} else {
|
||||
mRlvItems.loadMoreComplete();
|
||||
mRlvItems.setNoMore(false);
|
||||
}
|
||||
} else {
|
||||
if (page > 1) {
|
||||
mRlvItems.loadMoreComplete();
|
||||
mRlvItems.setNoMore(true);
|
||||
} else {
|
||||
//无数据
|
||||
mRlvItems.refreshComplete();
|
||||
mRlvItems.setNoMore(true);
|
||||
ToastUtils.showShort("暂无数据");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
e.printStackTrace();
|
||||
mRlvItems.refreshComplete();
|
||||
mRlvItems.loadMoreComplete();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 待处理
|
||||
*/
|
||||
private void getDisposeList(int page) {
|
||||
mCurPage = page;
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getIssueNewDisList(mType + "", mRows, mCurPage + "", UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<IssueSubBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
mDisDis = d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(IssueSubBean issueSubBean) {
|
||||
if (issueSubBean != null && issueSubBean.getRows() != null && issueSubBean.getRows().size() > 0) {
|
||||
++mCurPage;
|
||||
if (page == 1) {
|
||||
mDatas.clear();
|
||||
mDatas.addAll(issueSubBean.getRows());
|
||||
} else {
|
||||
mDatas.addAll(issueSubBean.getRows());
|
||||
}
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mRlvItems.refreshComplete();
|
||||
if (mDatas.size() >= issueSubBean.getTotal()) {
|
||||
mRlvItems.loadMoreComplete();
|
||||
mRlvItems.setNoMore(true);
|
||||
} else {
|
||||
mRlvItems.loadMoreComplete();
|
||||
mRlvItems.setNoMore(false);
|
||||
}
|
||||
} else {
|
||||
if (page > 1) {
|
||||
mRlvItems.loadMoreComplete();
|
||||
mRlvItems.setNoMore(true);
|
||||
} else {
|
||||
//无数据
|
||||
mRlvItems.refreshComplete();
|
||||
mRlvItems.setNoMore(true);
|
||||
ToastUtils.showShort("暂无数据");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
ExceptionHandler.handleException(e);
|
||||
mRlvItems.refreshComplete();
|
||||
mRlvItems.loadMoreComplete();
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 待检查
|
||||
*/
|
||||
private void getCheckList(int page) {
|
||||
mCurPage = page;
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getIssueInspectList(mRows, mCurPage + "", UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<IssueSubBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
mDisCheck = d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(IssueSubBean issueSubBean) {
|
||||
if (issueSubBean != null && issueSubBean.getRows() != null && issueSubBean.getRows().size() > 0) {
|
||||
++mCurPage;
|
||||
if (page == 1) {
|
||||
mDatas.clear();
|
||||
mDatas.addAll(issueSubBean.getRows());
|
||||
} else {
|
||||
mDatas.addAll(issueSubBean.getRows());
|
||||
}
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mRlvItems.refreshComplete();
|
||||
if (mDatas.size() >= issueSubBean.getTotal()) {
|
||||
mRlvItems.loadMoreComplete();
|
||||
mRlvItems.setNoMore(true);
|
||||
} else {
|
||||
mRlvItems.loadMoreComplete();
|
||||
mRlvItems.setNoMore(false);
|
||||
}
|
||||
} else {
|
||||
if (page > 1) {
|
||||
mRlvItems.loadMoreComplete();
|
||||
mRlvItems.setNoMore(true);
|
||||
} else {
|
||||
//无数据
|
||||
mRlvItems.refreshComplete();
|
||||
mRlvItems.setNoMore(true);
|
||||
ToastUtils.showShort("暂无数据");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
ExceptionHandler.handleException(e);
|
||||
e.printStackTrace();
|
||||
mRlvItems.refreshComplete();
|
||||
mRlvItems.loadMoreComplete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 待结案
|
||||
*/
|
||||
private void getWaitFinishList(int page) {
|
||||
mCurPage = page;
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getIssueCloseList(mRows, mCurPage + "", UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<IssueSubBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
mDisWait = d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(IssueSubBean issueSubBean) {
|
||||
if (issueSubBean != null && issueSubBean.getRows() != null && issueSubBean.getRows().size() > 0) {
|
||||
++mCurPage;
|
||||
if (page == 1) {
|
||||
mDatas.clear();
|
||||
mDatas.addAll(issueSubBean.getRows());
|
||||
} else {
|
||||
mDatas.addAll(issueSubBean.getRows());
|
||||
}
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mRlvItems.refreshComplete();
|
||||
if (mDatas.size() >= issueSubBean.getTotal()) {
|
||||
mRlvItems.loadMoreComplete();
|
||||
mRlvItems.setNoMore(true);
|
||||
} else {
|
||||
mRlvItems.loadMoreComplete();
|
||||
mRlvItems.setNoMore(false);
|
||||
}
|
||||
} else {
|
||||
if (page > 1) {
|
||||
mRlvItems.loadMoreComplete();
|
||||
mRlvItems.setNoMore(true);
|
||||
} else {
|
||||
mRlvItems.refreshComplete();
|
||||
mRlvItems.setNoMore(true);
|
||||
ToastUtils.showShort("暂无数据");
|
||||
//无数据
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
ExceptionHandler.handleException(e);
|
||||
if (mRlvItems != null) {
|
||||
mRlvItems.refreshComplete();
|
||||
mRlvItems.loadMoreComplete();
|
||||
}
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 已归档
|
||||
* 参数中的status=6获取的是已经归档的列表
|
||||
*/
|
||||
private void getFinishList(int page) {
|
||||
mCurPage = page;
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getIssueFinishList("6", mRows, mCurPage + "", UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<IssueSubBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
mDisFinish = d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(IssueSubBean issueSubBean) {
|
||||
if (issueSubBean != null && issueSubBean.getRows() != null && issueSubBean.getRows().size() > 0) {
|
||||
++mCurPage;
|
||||
if (page == 1) {
|
||||
mDatas.clear();
|
||||
mDatas.addAll(issueSubBean.getRows());
|
||||
} else {
|
||||
mDatas.addAll(issueSubBean.getRows());
|
||||
}
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mRlvItems.refreshComplete();
|
||||
if (mDatas.size() >= issueSubBean.getTotal()) {
|
||||
mRlvItems.loadMoreComplete();
|
||||
mRlvItems.setNoMore(true);
|
||||
} else {
|
||||
mRlvItems.loadMoreComplete();
|
||||
mRlvItems.setNoMore(false);
|
||||
}
|
||||
} else {
|
||||
if (page > 1) {
|
||||
mRlvItems.loadMoreComplete();
|
||||
mRlvItems.setNoMore(true);
|
||||
} else {
|
||||
//无数据
|
||||
mRlvItems.refreshComplete();
|
||||
mRlvItems.setNoMore(true);
|
||||
ToastUtils.showShort("暂无数据");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
ExceptionHandler.handleException(e);
|
||||
mRlvItems.refreshComplete();
|
||||
mRlvItems.loadMoreComplete();
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void refresh() {
|
||||
if (!TextUtils.isEmpty(mTitle)) {
|
||||
switch (mTitle) {
|
||||
case "待检查":
|
||||
mType = 4;
|
||||
getDisposeList(1);
|
||||
break;
|
||||
case "已归档":
|
||||
mType = 6;
|
||||
getDisposeList(1);
|
||||
break;
|
||||
case "待处理":
|
||||
default:
|
||||
mType = 3;
|
||||
getDisposeList(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void loadMore() {
|
||||
if (!TextUtils.isEmpty(mTitle)) {
|
||||
switch (mTitle) {
|
||||
case "待检查":
|
||||
mType = 4;
|
||||
getDisposeList(mCurPage);
|
||||
break;
|
||||
case "已归档":
|
||||
mType = 6;
|
||||
getDisposeList(mCurPage);
|
||||
break;
|
||||
case "待处理":
|
||||
default:
|
||||
mType = 3;
|
||||
getDisposeList(mCurPage);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -39,6 +39,7 @@ import com.sucstepsoft.realtimelocation.beans.person.CensusPersonBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.CensusRearDetailBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.CensusRegisterDetailBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.CensusYoungDetailBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.CommunityListBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.CorrectDetailBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.DrugDetailBean;
|
||||
import com.sucstepsoft.realtimelocation.beans.person.HouseDetailBean;
|
||||
@ -202,6 +203,14 @@ public interface LocationApiService {
|
||||
@GET("app/dict/listdictall/{dictParentId}")
|
||||
Observable<List<TypeListBean>> getDictListAll(@Path("dictParentId") String pId, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 获取字典全部
|
||||
* 新 /list-bind-case-type-all/{dictParentId}
|
||||
*/
|
||||
@Headers({"base_url_name:dict"})
|
||||
@GET("app/dict/list-bind-case-type-all/{dictParentId}")
|
||||
Observable<List<TypeListBean>> getDictListAllNew(@Path("dictParentId") String pId, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 获取字典
|
||||
*
|
||||
@ -1181,10 +1190,27 @@ public interface LocationApiService {
|
||||
@GET("app/aids/listpageaids")
|
||||
Observable<CensusPersonBean> getAidsList(@Query("page") String page, @Query("keywords") String keywords, @Header("token") String token);
|
||||
|
||||
/*===========================================基础信息===========================================*/
|
||||
|
||||
/**
|
||||
* 保存楼宇信息
|
||||
*/
|
||||
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
|
||||
@POST("app/citybuilding/savecitybuilding")
|
||||
Observable<SuccessBean> doSaveBuilding(@Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 获取小区列表
|
||||
* citydistrict/listcitydistrict
|
||||
*/
|
||||
|
||||
@Headers({"base_url_name:person", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/citydistrict/listpagecitydistrict")
|
||||
Observable<CommunityListBean> getCommunityList(@Query("page") String page, @Query("keywords") String keywords, @Header("token") String token);
|
||||
|
||||
/*===========================================基础信息===========================================*/
|
||||
|
||||
|
||||
/**
|
||||
* 保存人员基础信息
|
||||
*/
|
||||
|
BIN
app/src/main/res/drawable-xhdpi/ic_build_icon.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_build_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 925 B |
BIN
app/src/main/res/drawable-xhdpi/ic_house_icon.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_house_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
163
app/src/main/res/layout/activity_add_building.xml
Normal file
163
app/src/main/res/layout/activity_add_building.xml
Normal file
@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardPreventCornerOverlap="true"
|
||||
app:cardUseCompatPadding="false">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/issue_report_title"
|
||||
android:padding="8dp"
|
||||
android:text="楼宇信息"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView style="@style/style_hint_star" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="小        区" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_community"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择小区" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView style="@style/style_hint_star" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="楼宇名称" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_build_name"
|
||||
style="@style/item_content"
|
||||
android:hint="请输入楼宇名称"
|
||||
android:inputType="text" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView style="@style/style_hint_star" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="楼宇编号" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_build_num"
|
||||
style="@style/item_content"
|
||||
android:digits="@string/id_number"
|
||||
android:hint="请输入楼宇编号"
|
||||
android:inputType="number" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView style="@style/style_hint_star" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="楼宇单元" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_build_unit"
|
||||
style="@style/item_content"
|
||||
android:digits="@string/id_number"
|
||||
android:hint="请输入楼宇单元数"
|
||||
android:inputType="number" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView style="@style/style_hint_star" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="楼宇层数" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_build_layer"
|
||||
style="@style/item_content"
|
||||
android:digits="@string/id_number"
|
||||
android:hint="请输入楼宇层数"
|
||||
android:inputType="number" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView style="@style/style_hint_star" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="每层户数" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_build_family"
|
||||
style="@style/item_content"
|
||||
android:digits="@string/id_number"
|
||||
android:hint="请输入每层户数"
|
||||
android:inputType="number" />
|
||||
</LinearLayout>
|
||||
|
||||
<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>
|
||||
</android.support.v7.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
163
app/src/main/res/layout/activity_add_house.xml
Normal file
163
app/src/main/res/layout/activity_add_house.xml
Normal file
@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardPreventCornerOverlap="true"
|
||||
app:cardUseCompatPadding="false">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/issue_report_title"
|
||||
android:padding="8dp"
|
||||
android:text="楼宇信息"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView style="@style/style_hint_star" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="小        区" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_community"
|
||||
style="@style/sel_text_arrow"
|
||||
android:hint="请选择小区" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView style="@style/style_hint_star" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="楼宇名称" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_build_name"
|
||||
style="@style/item_content"
|
||||
android:hint="请输入楼宇名称"
|
||||
android:inputType="text" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView style="@style/style_hint_star" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="楼宇编号" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_build_num"
|
||||
style="@style/item_content"
|
||||
android:digits="@string/id_number"
|
||||
android:hint="请输入楼宇编号"
|
||||
android:inputType="number" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView style="@style/style_hint_star" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="楼宇单元" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_build_unit"
|
||||
style="@style/item_content"
|
||||
android:digits="@string/id_number"
|
||||
android:hint="请输入楼宇单元数"
|
||||
android:inputType="number" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView style="@style/style_hint_star" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="楼宇层数" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_build_layer"
|
||||
style="@style/item_content"
|
||||
android:digits="@string/id_number"
|
||||
android:hint="请输入楼宇层数"
|
||||
android:inputType="number" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/item_gray">
|
||||
|
||||
<ImageView style="@style/style_hint_star" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:text="每层户数" />
|
||||
|
||||
<View style="@style/vertical_line" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_build_family"
|
||||
style="@style/item_content"
|
||||
android:digits="@string/id_number"
|
||||
android:hint="请输入每层户数"
|
||||
android:inputType="number" />
|
||||
</LinearLayout>
|
||||
|
||||
<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>
|
||||
</android.support.v7.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
@ -34,7 +34,7 @@
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_toRightOf="@id/iv_icon"
|
||||
android:gravity="center_vertical"
|
||||
android:text="片长"
|
||||
android:text="网格长"
|
||||
android:textColor="#ff353535"
|
||||
android:textSize="18sp" />
|
||||
|
||||
@ -87,7 +87,7 @@
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_toRightOf="@id/iv_n_icon"
|
||||
android:gravity="center_vertical"
|
||||
android:text="N 员"
|
||||
android:text="专管员"
|
||||
android:textColor="#ff353535"
|
||||
android:textSize="18sp" />
|
||||
|
||||
|
38
app/src/main/res/layout/activity_house_manage_list.xml
Normal file
38
app/src/main/res/layout/activity_house_manage_list.xml
Normal file
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.xtablayout.XTabLayout
|
||||
android:id="@+id/xtl_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/white"
|
||||
app:xTabIndicatorColor="@color/text_blue1"
|
||||
app:xTabIndicatorHeight="4dp"
|
||||
app:xTabIndicatorWidth="15dp"
|
||||
app:xTabMode="scrollable"
|
||||
app:xTabSelectedTextColor="@color/text_blue1"
|
||||
app:xTabSelectedTextSize="20sp"
|
||||
app:xTabTextColor="#000"
|
||||
app:xTabTextSize="15sp" />
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/vp_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_add_house"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/sel_btn_submit_round"
|
||||
android:text="添加房屋(楼宇)"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
@ -457,7 +457,8 @@
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:text="回退"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
android:textSize="16sp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_issue_dis"
|
||||
|
@ -7,13 +7,13 @@
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_margin="20dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="300dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:background="@drawable/shp_radius"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="20dp">
|
||||
android:paddingRight="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
16
app/src/main/res/layout/activity_sel_community.xml
Normal file
16
app/src/main/res/layout/activity_sel_community.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<include layout="@layout/item_search_outbound" />
|
||||
|
||||
<com.jcodecraeer.xrecyclerview.XRecyclerView
|
||||
android:id="@+id/xlv_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/ll_search_content"
|
||||
android:layout_marginTop="5dp" />
|
||||
</RelativeLayout>
|
@ -20,7 +20,7 @@
|
||||
android:layout_height="50dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/ib_app_back"
|
||||
android:id="@+id/btn_back"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerVertical="true"
|
||||
|
14
app/src/main/res/layout/fragment_house_manage.xml
Executable file
14
app/src/main/res/layout/fragment_house_manage.xml
Executable file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.jcodecraeer.xrecyclerview.XRecyclerView
|
||||
android:id="@+id/rlv_items"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layoutManager="LinearLayoutManager"
|
||||
tools:listitem="@layout/item_house" />
|
||||
</RelativeLayout>
|
60
app/src/main/res/layout/item_community_sel.xml
Normal file
60
app/src/main/res/layout/item_community_sel.xml
Normal file
@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="3dp"
|
||||
android:background="@drawable/shape_rectangle_white"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_district"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="15sp"
|
||||
tools:text="小区名称" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/gray_text"
|
||||
android:textSize="13sp"
|
||||
tools:text="街道" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_community"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/gray_text"
|
||||
android:textSize="13sp"
|
||||
tools:text="社区名称" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_confirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@drawable/sel_btn_submit"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:padding="10dp"
|
||||
android:text="选择"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
</LinearLayout>
|
72
app/src/main/res/layout/item_house.xml
Executable file
72
app/src/main/res/layout/item_house.xml
Executable file
@ -0,0 +1,72 @@
|
||||
<?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="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:background="@drawable/shape_rectangle_white"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_issue_img"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
tools:src="@drawable/ic_build_icon" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_issue_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#ff353535"
|
||||
android:textSize="18sp"
|
||||
tools:text="小区名称" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_issue_desc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#ff808080"
|
||||
android:textSize="12sp"
|
||||
tools:text="20号楼-1单元1101" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shp_line_dotted"
|
||||
android:layerType="software" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_issue_location"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:drawableLeft="@drawable/ic_location_blue"
|
||||
android:drawablePadding="5dp"
|
||||
android:singleLine="true"
|
||||
android:textColor="#ff1189ff"
|
||||
android:textSize="12sp"
|
||||
tools:text="中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067中国内蒙古自治区包头市九原区X067(包哈公里)" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
@ -1,5 +1,5 @@
|
||||
<resources>
|
||||
<string name="app_name">片长工作</string>
|
||||
<string name="app_name">网格工作</string>
|
||||
<!-- <string name="app_name">城市管理平台</string>-->
|
||||
<!-- <string name="app_name">片长工作测试</string>-->
|
||||
<string name="default_channel">定位点记录中...</string>
|
||||
@ -30,6 +30,7 @@
|
||||
<string name="want_to_cancle">松开手指,取消上传</string>
|
||||
<string name="time_too_short">录音时间过短</string>
|
||||
<string name="id_card_type">0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</string>
|
||||
<string name="id_number">0123456789</string>
|
||||
<string name="long_click_record">长按 录音</string>
|
||||
<string name="hang_up_finsh">松开 结束</string>
|
||||
<string name="release_cancel">松开 取消</string>
|
||||
|
@ -61,8 +61,8 @@ ext {
|
||||
gTargetSdkVersion = 28
|
||||
// gVersionCode = 2
|
||||
// gVersionName = '1.0.2'
|
||||
gVersionCode=34
|
||||
gVersionName='1.3.4'
|
||||
gVersionCode=35
|
||||
gVersionName='1.3.5'
|
||||
//Router编译版本
|
||||
gRouterApiVersion = '1.4.1'
|
||||
gRouterCompileVersion = '1.2.2'
|
||||
|
@ -10,9 +10,9 @@ import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
public class BaseUrlApi {
|
||||
|
||||
// public static final String IP = "http://219.147.99.164:8081/";/* 正式IP 版本一 */
|
||||
// public static final String IP = "http://219.147.99.164:8082/usercenter/"; /* 正式IP 版本二 */
|
||||
public static final String IP = "http://219.147.99.164:8082/usercenter/"; /* 正式IP 版本二 */
|
||||
// public static final String IP = "http://124.67.110.246:8081/usercenter/"; /* 集宁 版本一 */
|
||||
public static final String IP = "http://192.168.0.101:7001/usercenter/";/* 本地测试IP */
|
||||
// public static final String IP = "http://192.168.0.101:7001/usercenter/";/* 本地测试IP */
|
||||
// public static final String IP = "http://49.233.36.36:8868/usercenter/";/* 测试IP */
|
||||
public static final String PROJECT_NAME = "app/";
|
||||
public static final String BASE_URL = IP;
|
||||
@ -26,7 +26,7 @@ public class BaseUrlApi {
|
||||
public static final int CAMERA_REQUEST = 123;
|
||||
// "http://2277c412x2.iask.in:12758/servicecity
|
||||
// public static final String BASE_IP_P = "http://219.147.99.164:8082/"; /*正式*/
|
||||
public static final String BASE_IP_P = "http://192.168.0.101:8083/";/*测试*/
|
||||
public static final String BASE_IP_P = "http://192.168.0.111:8090/";/*测试*/
|
||||
// public static final String BASE_IP = "http://219.147.99.164:8081/servicecity/";/* 正式IP 版本一*/
|
||||
// public static final String BASE_IP_P = "http://192.168.1.176:8083/";/* 本地测试IP */
|
||||
// public static final String BASE_IP = "http://219.147.99.164:8082/servicecity/";/*正式IP 版本二*/
|
||||
|
@ -42,7 +42,8 @@ public class BaseUrlInterceptor implements Interceptor {
|
||||
// newBaseUrl = HttpUrl.parse(BaseUrlApi.BASE_URL_TOOLS);
|
||||
// newBaseUrl = HttpUrl.parse(BaseUrlApi.BASE_URL_CHECK);
|
||||
} else if ("person".equals(headerValue)) {
|
||||
newBaseUrl = HttpUrl.parse(BaseUrlApi.BASE_POPULATION_IP);
|
||||
newBaseUrl = HttpUrl.parse(BaseUrlApi.BASE_IP);
|
||||
// newBaseUrl = HttpUrl.parse(BaseUrlApi.BASE_POPULATION_IP);
|
||||
} else {
|
||||
newBaseUrl = oldHttpUrl;
|
||||
}
|
||||
|
@ -0,0 +1,150 @@
|
||||
package com.sucstepsoft.cm_utils.core.widget.views;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.sucstepsoft.cm_utils.R;
|
||||
|
||||
|
||||
/**
|
||||
* 作者 : Adam on 2018/7/23.
|
||||
* 邮箱 : itgaojian@163.com
|
||||
* 描述 : 从底部弹出的选择文件的dialog
|
||||
*/
|
||||
public class CenterBuildDialogView extends Dialog {
|
||||
|
||||
private boolean iscancelable;
|
||||
private boolean isBackCancelable;
|
||||
private View view;
|
||||
private Context context;
|
||||
private int gravity;
|
||||
private OnChoseListener mListener;
|
||||
private boolean mIsShow;
|
||||
private boolean mIsShowOther;
|
||||
|
||||
private CenterBuildDialogView(Context context, boolean isCancelable, boolean isBackCancelable, int gravity, boolean isShow, boolean isShowOther) {
|
||||
super(context, R.style.Dialog_ChoseFile);
|
||||
this.context = context;
|
||||
this.gravity = gravity;
|
||||
this.iscancelable = isCancelable;
|
||||
this.isBackCancelable = isBackCancelable;
|
||||
this.mIsShow = isShow;
|
||||
this.mIsShowOther = isShowOther;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
view = LayoutInflater.from(context).inflate(R.layout.dialog_choose_build, null);
|
||||
setContentView(view);
|
||||
setCancelable(iscancelable);
|
||||
setCanceledOnTouchOutside(isBackCancelable);
|
||||
view.findViewById(R.id.ll_house).setOnClickListener(v -> choseType(3));
|
||||
view.findViewById(R.id.ll_build).setOnClickListener(v -> choseType(4));
|
||||
DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
|
||||
Window window = this.getWindow();
|
||||
window.setGravity(Gravity.CENTER);
|
||||
window.setWindowAnimations(R.style.Dialog_ChoseFile);
|
||||
WindowManager.LayoutParams params = window.getAttributes();
|
||||
params.width = (int) (displayMetrics.widthPixels * 0.9);
|
||||
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
window.setAttributes(params);
|
||||
window.setBackgroundDrawable(new ColorDrawable());
|
||||
}
|
||||
|
||||
public void addOnChoseListener(OnChoseListener listener) {
|
||||
this.mListener = listener;
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择
|
||||
*
|
||||
* @param i
|
||||
*/
|
||||
private void choseType(int i) {
|
||||
if (mListener != null) {
|
||||
switch (i) {
|
||||
case 1:
|
||||
mListener.choseAlbum();
|
||||
break;
|
||||
case 2:
|
||||
mListener.choseFile();
|
||||
break;
|
||||
case 3:
|
||||
mListener.choseShoot();
|
||||
break;
|
||||
case 4:
|
||||
mListener.changePwd();
|
||||
break;
|
||||
case 5:
|
||||
mListener.loginOut();
|
||||
break;
|
||||
}
|
||||
}
|
||||
// this.dismiss();
|
||||
}
|
||||
|
||||
public interface OnChoseListener {
|
||||
void choseFile();
|
||||
|
||||
void choseAlbum();
|
||||
|
||||
void choseShoot();
|
||||
|
||||
void loginOut();
|
||||
|
||||
void changePwd();
|
||||
}
|
||||
|
||||
public static class DialogBuilder {
|
||||
private Context mContext;
|
||||
private boolean isCancelable;
|
||||
private boolean mIsBackable;
|
||||
private int mGravity = Gravity.BOTTOM;
|
||||
private OnChoseListener mListener;
|
||||
private boolean mIsShowOther;
|
||||
|
||||
public DialogBuilder(Context context) {
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
public DialogBuilder setIscancelable(boolean iscancelable) {
|
||||
this.isCancelable = iscancelable;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DialogBuilder setIsBackCancelable(boolean isBackCancelable) {
|
||||
this.mIsBackable = isBackCancelable;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DialogBuilder setShowLocation(int gravity) {
|
||||
this.mGravity = gravity;
|
||||
return this;
|
||||
}
|
||||
|
||||
private boolean mIsShow;
|
||||
|
||||
public DialogBuilder setIsShowFile(boolean isShowFile) {
|
||||
mIsShow = isShowFile;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DialogBuilder setIsShowOther(boolean isShow) {
|
||||
mIsShowOther = isShow;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CenterBuildDialogView build() {
|
||||
return new CenterBuildDialogView(this.mContext, this.isCancelable, this.mIsBackable, this.mGravity, mIsShow, mIsShowOther);
|
||||
}
|
||||
}
|
||||
}
|
@ -112,7 +112,8 @@ public class CenterChooseAreaDialogView extends Dialog {
|
||||
if (!TextUtils.isEmpty(area5)) {
|
||||
selArea += "-" + area5;
|
||||
}
|
||||
mListener.doConfirm(selArea);
|
||||
String mSelIds = mSelArea1 + "&" + mSelArea2 + "&" + mSelArea3;
|
||||
mListener.doConfirm(selArea, mSelIds);
|
||||
}
|
||||
}
|
||||
|
||||
@ -397,7 +398,7 @@ public class CenterChooseAreaDialogView extends Dialog {
|
||||
}
|
||||
|
||||
public interface OnChoseListener {
|
||||
void doConfirm(String list);
|
||||
void doConfirm(String list, String ids);
|
||||
}
|
||||
|
||||
public static class DialogBuilder {
|
||||
|
@ -53,6 +53,7 @@ public class CenterFuncDialogView extends Dialog {
|
||||
view.findViewById(R.id.ll_base).setOnClickListener(v -> choseType(1));
|
||||
view.findViewById(R.id.ll_outbound).setOnClickListener(v -> choseType(2));
|
||||
view.findViewById(R.id.ll_hire).setOnClickListener(v -> choseType(3));
|
||||
view.findViewById(R.id.ll_build).setOnClickListener(v -> choseType(4));
|
||||
DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
|
||||
Window window = this.getWindow();
|
||||
window.setGravity(Gravity.CENTER);
|
||||
|
BIN
cm_utils/src/main/res/drawable-xhdpi/ic_build.png
Normal file
BIN
cm_utils/src/main/res/drawable-xhdpi/ic_build.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
cm_utils/src/main/res/drawable-xhdpi/ic_house_dialog_icon.png
Normal file
BIN
cm_utils/src/main/res/drawable-xhdpi/ic_house_dialog_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
61
cm_utils/src/main/res/layout/dialog_choose_build.xml
Executable file
61
cm_utils/src/main/res/layout/dialog_choose_build.xml
Executable file
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp"
|
||||
android:background="@drawable/shp_rectangle_white_01"
|
||||
android:orientation="horizontal"
|
||||
android:padding="15dp">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_house"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/ic_house_dialog_icon" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="房屋"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_build"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/ic_build" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="楼宇"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -26,9 +26,10 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="户籍人口"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="15sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -51,9 +52,10 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="境外人员"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="15sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -76,9 +78,36 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="出租房"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="15sp" />
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_build"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/ic_build" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="房屋管理"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue
Block a user