接口对接

This commit is contained in:
itgaojian163 2020-03-31 19:00:43 +08:00
parent baf66ef564
commit 64a2f770e1
37 changed files with 1929 additions and 262 deletions

View File

@ -13,6 +13,7 @@ import android.view.View;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
@ -27,6 +28,7 @@ import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
import com.sucstepsoft.cm_utils.utils.AppUtils;
import com.sucstepsoft.cm_utils.utils.EncryptUtils;
import com.sucstepsoft.cm_utils.utils.FileIOUtils;
import com.sucstepsoft.cm_utils.utils.LogUtils;
import com.sucstepsoft.cm_utils.utils.PermissionUtils;
import com.sucstepsoft.cm_utils.utils.ToastUtils;
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
@ -72,6 +74,7 @@ public class LoginActivity extends BaseActivity {
CheckBox mCbRemember;
private Unbinder mUnbinder;
private boolean isShowPwd = false;
private boolean isRememberPwd = false;
private Disposable mDisposable;
@Override
@ -87,7 +90,13 @@ public class LoginActivity extends BaseActivity {
refreshView(STATE_LOAD_SUCCESS);
mRlNotify.setVisibility(View.GONE);
mBtnConfirm.setOnClickListener(v -> login());
mTvChangePwd.setOnClickListener(v -> ToastUtils.showShort("请联系管理员"));
// mTvChangePwd.setOnClickListener(v -> ToastUtils.showShort("请联系管理员"));
isRememberPwd = UserLgUtils.getCheckRemember();
mCbRemember.setChecked(isRememberPwd);
mCbRemember.setOnCheckedChangeListener((compoundButton, b) -> {
isRememberPwd = b;
UserLgUtils.setCheckRemember(b);
});
mIvShowPwd.setOnClickListener(v -> {
Editable etext = mEtUserPwd.getText();
Selection.setSelection(etext, etext.length());
@ -101,20 +110,6 @@ public class LoginActivity extends BaseActivity {
mEtUserPwd.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
}
});
// mScvCheck.setOnClickListener(v -> {
// EmStateCheck state = mScvCheck.getViewState();
// switch (state) {
// case NORMAL:
// mScvCheck.setCheckState(EmStateCheck.CHECK);
// break;
// case CHECK:
// mScvCheck.setCheckState(EmStateCheck.UNCHECK);
// break;
// case UNCHECK:
// mScvCheck.setCheckState(EmStateCheck.NORMAL);
// break;
// }
// });
setEditTextInhibitInputSpeChat(mEtUserPhone);
setEditTextInhibitInputSpeChat(mEtUserPwd);
mEtUserPhone.addTextChangedListener(new TextWatcher() {
@ -137,14 +132,18 @@ public class LoginActivity extends BaseActivity {
}
}
});
if (isRememberPwd) {
String passWord = UserLgUtils.getPassword();
if (!TextUtils.isEmpty(passWord)) {
mEtUserPwd.setText(passWord);
}
}
String username = UserLgUtils.getUserName();
String passWord = UserLgUtils.getPassword();
if (!TextUtils.isEmpty(username)) {
mEtUserPhone.setText(username);
}
if (!TextUtils.isEmpty(passWord)) {
mEtUserPwd.setText(passWord);
}
mIvClosePhone.setOnClickListener(v -> mEtUserPhone.setText(""));
requestPermission();
}
@ -154,12 +153,12 @@ public class LoginActivity extends BaseActivity {
* TODO 跳转测试页面
*/
private void login() {
startActivity(new Intent(this, MainActivity.class));
// if (checkUserInputInfo()) {
// String userName = mEtUserPhone.getText().toString().trim();
// String pwd = mEtUserPwd.getText().toString().trim();
// doLoginApp(userName, pwd);
// }
// startActivity(new Intent(this, MainActivity.class));
if (checkUserInputInfo()) {
String userName = mEtUserPhone.getText().toString().trim();
String pwd = mEtUserPwd.getText().toString().trim();
doLoginApp(userName, pwd);
}
}
/**
@ -175,9 +174,6 @@ public class LoginActivity extends BaseActivity {
info.setPassword(md5Pwd);
info.setUsername(name);
info.setDeviceNo(deviceId);
// if (!UserLgUtils.getAliasIsSeting()) {
// JPushInterface.setAlias(getApplicationContext(), 65536, deviceId);
// }
Gson gson = new Gson();
String obj = gson.toJson(info);
RequestBody body = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), obj);
@ -199,6 +195,7 @@ public class LoginActivity extends BaseActivity {
byte[] decode = Base64.decode(baseUserBean.getData(), Base64.DEFAULT);
try {
String loginUserInfo = AesUtil.aesCommonDecoder(PathConfig.SECRET, new String(decode, "UTF-8"));
LogUtils.e(loginUserInfo);
if (!TextUtils.isEmpty(loginUserInfo)) {
AppTokenUser appTokenUser = gson.fromJson(loginUserInfo, AppTokenUser.class);
UserLgUtils.setLoginInfo(loginUserInfo);
@ -210,7 +207,9 @@ public class LoginActivity extends BaseActivity {
UserLgUtils.setPhone(appTokenUser.getPhone());
UserLgUtils.setToken(baseUserBean.getData());
GlobalProvider.save(mActivity, "token", baseUserBean.getData());
UserLgUtils.setPassword(pwd);
if (isRememberPwd) {
UserLgUtils.setPassword(pwd);
}
startActivity(new Intent(LoginActivity.this, MainActivity.class));
finish();
} else {
@ -299,7 +298,6 @@ public class LoginActivity extends BaseActivity {
private void requestPermission() {
PermissionUtils.permission(
PermissionConstants.SMS,
PermissionConstants.LOCATION,
PermissionConstants.CAMERA,
PermissionConstants.STORAGE,
PermissionConstants.MICROPHONE,

View File

@ -37,6 +37,7 @@ import com.sucstepsoft.txrealtimelocation.activitys.mine.UserActivity;
import com.sucstepsoft.txrealtimelocation.activitys.notice.NoticeActivity;
import com.sucstepsoft.txrealtimelocation.activitys.trouble.TroubleReportActivity;
import com.sucstepsoft.txrealtimelocation.adapters.FunctionAdapter;
import com.sucstepsoft.txrealtimelocation.beans.AppTokenUser;
import com.sucstepsoft.txrealtimelocation.beans.VersionBean;
import com.sucstepsoft.txrealtimelocation.net.LocationApiService;
@ -96,10 +97,10 @@ public class MainActivity extends BaseActivity {
private Unbinder mBind;
private List<FuncBean> mFuncs = new ArrayList<>();
private String[] mBtnStrs = new String[]{"企业信息", "隐患上报", "隐患复查", "法律法规"};
private int[] mBtnIds = new int[]{R.drawable.ic_issue_report,
R.drawable.ic_issue_record,
R.drawable.ic_issue_disp,
R.drawable.ic_work_path};
private int[] mBtnIds = new int[]{R.drawable.ic_company,
R.drawable.ic_trouble,
R.drawable.ic_fucha,
R.drawable.ic_law};
private Gson mGson = null;
private AlertDialog mGpsWeakDialog;
@ -173,6 +174,13 @@ public class MainActivity extends BaseActivity {
private void initBaseView() {
mGson = new Gson();
String loginInfo = UserLgUtils.getLoginInfo();
AppTokenUser appTokenUser = mGson.fromJson(loginInfo, AppTokenUser.class);
if (appTokenUser.getRoles() != null && appTokenUser.getRoles().size() > 0) {
mTvOnline.setText(appTokenUser.getRoles().get(0).getRoleName());
}
if (appTokenUser.getDepartments() != null && appTokenUser.getDepartments().size() > 0) {
mTvDepart.setText(appTokenUser.getDepartments().get(0).getDepartmentName());
}
mTvUserName.setText(UserLgUtils.getName() + " 个人中心");
Glide.with(mActivity)
.load(BaseUrlApi.BASE_IMG_URL + UserLgUtils.getAvatar())

View File

@ -1,19 +1,30 @@
package com.sucstepsoft.txrealtimelocation.activitys.companylib;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.google.gson.Gson;
import com.jcodecraeer.xrecyclerview.ProgressStyle;
import com.jcodecraeer.xrecyclerview.XRecyclerView;
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
import com.sucstepsoft.cm_utils.utils.ToastUtils;
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
import com.sucstepsoft.txrealtimelocation.R;
import com.sucstepsoft.txrealtimelocation.activitys.issue.CheckOptionsActivity;
import com.sucstepsoft.txrealtimelocation.adapters.CompanyLibAdapter;
import com.sucstepsoft.txrealtimelocation.beans.BindCompanyBean;
import com.sucstepsoft.txrealtimelocation.beans.CompanyListDataBean;
import com.sucstepsoft.txrealtimelocation.beans.SuccessBean;
import com.sucstepsoft.txrealtimelocation.net.LocationApiService;
import java.util.ArrayList;
import java.util.List;
@ -21,6 +32,11 @@ import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
import okhttp3.RequestBody;
/**
* 企业信息首页
@ -37,14 +53,17 @@ public class CompanyLibActivity extends BaseActivity {
ImageView mIvEmpty;
@BindView(R.id.tv_error_hint)
TextView mTvErrorHint;
private Unbinder mBind;
@BindView(R.id.xlv_com_lib)
XRecyclerView mRlvComList;
private int mCurrentPage = 1;
private List<String> mDatas = new ArrayList<>();
private List<CompanyListDataBean.RowsBean> mDatas = new ArrayList<>();
private static final int STATE_LOADING = 333;
private static final int STATE_EMPTY = 433;
private static final int STATE_ERROR = 533;
private static final int STATE_SUCCESS = 633;
private CompanyLibAdapter mAdapter;
@Override
protected int setLayoutId() {
@ -59,7 +78,15 @@ public class CompanyLibActivity extends BaseActivity {
mTvPublish.setVisibility(View.VISIBLE);
mTvPublish.setText("录入");
mTvPublish.setOnClickListener(v -> startActivity(new Intent(this, EnterCompanyInfoActivity.class)));
CompanyLibAdapter mAdapter = new CompanyLibAdapter(mActivity, mDatas);
mAdapter = new CompanyLibAdapter(mActivity, mDatas);
mAdapter.addOnBindListener((type, bean, index) -> {
if (type == 1) {
bindCompany(bean, index);
} else {
unBindCompany(bean, index);
}
});
LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity);
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mRlvComList.setLayoutManager(layoutManager);
@ -80,18 +107,119 @@ public class CompanyLibActivity extends BaseActivity {
getCompanyLibList(mCurrentPage);
}
});
getCompanyLibList(mCurrentPage);
stateView(STATE_LOADING);
}
/**
* 解绑
*
* @param bean
*/
private void unBindCompany(CompanyListDataBean.RowsBean bean, int index) {
ProgressDialog mMProgressDialog = new ProgressDialog(mActivity);
mMProgressDialog.setMessage("解绑中...");
mMProgressDialog.setCancelable(false);
mMProgressDialog.setCanceledOnTouchOutside(false);
mMProgressDialog.show();
RetrofitManager.getInstance()
.create(LocationApiService.class)
.doUnBindCompany(bean.getEnterpriseId(), UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<SuccessBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(SuccessBean successBean) {
mMProgressDialog.dismiss();
ToastUtils.showShort("解绑成功");
bean.setUserId("");
mAdapter.notifyItemChanged(index);
}
@Override
public void onError(Throwable e) {
ToastUtils.showShort("解绑失败,请重试");
mMProgressDialog.dismiss();
}
@Override
public void onComplete() {
}
});
}
/**
* 绑定
*
* @param bean
*/
private void bindCompany(CompanyListDataBean.RowsBean bean, int index) {
ProgressDialog mMProgressDialog = new ProgressDialog(mActivity);
mMProgressDialog.setMessage("绑定中...");
mMProgressDialog.setCancelable(false);
mMProgressDialog.setCanceledOnTouchOutside(false);
mMProgressDialog.show();
BindCompanyBean bean1 = new BindCompanyBean();
bean1.setUserId(UserLgUtils.getUserId());
bean1.setEnterpriseId(bean.getEnterpriseId());
Gson gson = new Gson();
String obj = gson.toJson(bean1);
RequestBody body = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), obj);
RetrofitManager.getInstance()
.create(LocationApiService.class)
.doBindCompany(body, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<SuccessBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(SuccessBean successBean) {
mMProgressDialog.dismiss();
ToastUtils.showShort("绑定成功");
bean.setUserId(UserLgUtils.getUserId());
mAdapter.notifyItemChanged(index);
}
@Override
public void onError(Throwable e) {
ToastUtils.showShort("绑定失败,请重试");
mMProgressDialog.dismiss();
}
@Override
public void onComplete() {
}
});
}
private void stateView(int state) {
switch (state) {
case STATE_SUCCESS:
mTvErrorHint.setVisibility(View.GONE);
mRlvComList.setVisibility(View.VISIBLE);
mPbLoading.setVisibility(View.GONE);
mIvEmpty.setVisibility(View.GONE);
break;
case STATE_EMPTY:
mTvErrorHint.setVisibility(View.VISIBLE);
mTvErrorHint.setText("暂无数据");
mRlvComList.setVisibility(View.GONE);
mPbLoading.setVisibility(View.GONE);
mIvEmpty.setVisibility(View.VISIBLE);
break;//空数据
case STATE_ERROR:
mTvErrorHint.setVisibility(View.VISIBLE);
mTvErrorHint.setText("数据加载失败,请稍后重试.");
mRlvComList.setVisibility(View.GONE);
mPbLoading.setVisibility(View.GONE);
@ -99,6 +227,7 @@ public class CompanyLibActivity extends BaseActivity {
break;//加载错误
case STATE_LOADING:
default:
mTvErrorHint.setVisibility(View.VISIBLE);
mTvErrorHint.setText("数据加载中...");
mRlvComList.setVisibility(View.GONE);
mPbLoading.setVisibility(View.VISIBLE);
@ -109,13 +238,11 @@ public class CompanyLibActivity extends BaseActivity {
/**
* 显示详情
*
* @param id
*/
private void showDetail(String id) {
private void showDetail(CompanyListDataBean.RowsBean bean) {
Intent intent = new Intent();
intent.setClass(mActivity, CompanyDetailActivity.class);
intent.putExtra("id", id);
intent.putExtra("id", bean.getEnterpriseId());
startActivity(intent);
}
@ -125,6 +252,60 @@ public class CompanyLibActivity extends BaseActivity {
* @param currentPage
*/
private void getCompanyLibList(int currentPage) {
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getCompanyList(UserLgUtils.getUserId(), currentPage + "", UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<CompanyListDataBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(CompanyListDataBean companyListDataBean) {
if (companyListDataBean != null && companyListDataBean.getRows() != null && companyListDataBean.getRows().size() > 0) {
++mCurrentPage;
if (currentPage == 1) {
mDatas.clear();
mDatas.addAll(companyListDataBean.getRows());
} else {
mDatas.addAll(companyListDataBean.getRows());
}
stateView(STATE_SUCCESS);
mAdapter.notifyDataSetChanged();
mRlvComList.refreshComplete();
if (mDatas.size() >= companyListDataBean.getTotal()) {
mRlvComList.loadMoreComplete();
mRlvComList.setNoMore(true);
} else {
mRlvComList.loadMoreComplete();
mRlvComList.setNoMore(false);
}
} else {
if (currentPage > 1) {
mRlvComList.loadMoreComplete();
mRlvComList.setNoMore(true);
stateView(STATE_SUCCESS);
} else {
//无数据
stateView(STATE_EMPTY);
}
}
}
@Override
public void onError(Throwable e) {
stateView(STATE_ERROR);
ToastUtils.showShort("数据加载失,请稍后重试");
}
@Override
public void onComplete() {
}
});
}
@ -132,7 +313,8 @@ public class CompanyLibActivity extends BaseActivity {
* 刷新列表
*/
private void refreshData() {
mCurrentPage = 1;
getCompanyLibList(mCurrentPage);
}
@Override

View File

@ -1,26 +1,42 @@
package com.sucstepsoft.txrealtimelocation.activitys.issue;
import android.app.ProgressDialog;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.MediaStore;
import android.support.v4.content.FileProvider;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.view.Gravity;
import android.view.View;
import android.widget.TextView;
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.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.txrealtimelocation.R;
import com.sucstepsoft.txrealtimelocation.activitys.common.PhotoActivity;
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.Options;
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.OptionsAdapter;
import com.sucstepsoft.txrealtimelocation.beans.BaseUserBean;
import com.sucstepsoft.txrealtimelocation.beans.CheckOptionsbean;
import com.sucstepsoft.txrealtimelocation.beans.OptionsSubmitBean;
import com.sucstepsoft.txrealtimelocation.beans.SuccessBean;
import com.sucstepsoft.txrealtimelocation.net.LocationApiService;
import com.sucstepsoft.txrealtimelocation.widget.EmStateCheck;
import java.io.File;
import java.util.ArrayList;
@ -29,16 +45,32 @@ import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
import okhttp3.MediaType;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import top.zibin.luban.Luban;
import top.zibin.luban.OnCompressListener;
public class CheckOptionsActivity extends BaseActivity {
Unbinder mBind;
@BindView(R.id.rlv_options)
RecyclerView mRlvOptions;
@BindView(R.id.tv_name)
TextView mTvName;
@BindView(R.id.tv_peo)
TextView mTvPeo;
private AddPhotoBean mCurrentBean;
private String mPicPath;
private int mCurrentIndex = 0;
private List<Options> mOptions;
private OptionsAdapter mAdapter;
private String mCompanyId;
private ProgressDialog mMProgressDialog;
private Options mCurrentOptions;
@Override
protected int setLayoutId() {
@ -50,19 +82,21 @@ public class CheckOptionsActivity extends BaseActivity {
mBind = ButterKnife.bind(this);
refreshView(STATE_LOAD_SUCCESS);
mTvBaseTitle.setText("企业检查");
mTvPublish.setVisibility(View.VISIBLE);
mTvPublish.setText("确定");
mTvPublish.setOnClickListener(v -> buildConfirmData(mAdapter.getData()));
String id = getIntent().getStringExtra("id");
mCompanyId = getIntent().getStringExtra("cId");
String name = getIntent().getStringExtra("name");
String peo = getIntent().getStringExtra("peo");
mTvName.setText(name);
mTvPeo.setText(peo);
mOptions = new ArrayList<>();
for (int i = 0; i < 200; i++) {
List<AddPhotoBean> mPhotos = new ArrayList<>();
mPhotos.add(new AddPhotoBean());
Options o = new Options();
o.setTitle("测试检查项" + i);
o.setPhotos(mPhotos);
mOptions.add(o);
}
mAdapter = new OptionsAdapter(this, mOptions);
mRlvOptions.setAdapter(mAdapter);
mRlvOptions.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
mAdapter.addSelectPhotoListener((bean, options, i, type) -> {
mCurrentOptions = options;
if (type == 1) {
//选择图片
mCurrentIndex = i;
@ -77,6 +111,169 @@ public class CheckOptionsActivity extends BaseActivity {
startActivity(intent);
}
});
getCheckOptions(id);
}
/**
* 构建提交数据
*
* @param data
*/
private void buildConfirmData(List<Options> data) {
mMProgressDialog = new ProgressDialog(CheckOptionsActivity.this);
mMProgressDialog.setMessage("加载中...");
mMProgressDialog.setCancelable(false);
mMProgressDialog.setCanceledOnTouchOutside(false);
mMProgressDialog.show();
OptionsSubmitBean submitBean = new OptionsSubmitBean();
submitBean.setEnterpriseId(mCompanyId);
submitBean.setCheckType(1);
submitBean.setIsCoordination(1);
List<OptionsSubmitBean.HiddenDangerReportsBean> items = new ArrayList<>();
for (int i = 0; i < data.size(); i++) {
Options o = data.get(i);
OptionsSubmitBean.HiddenDangerReportsBean bean = new OptionsSubmitBean.HiddenDangerReportsBean();
bean.setCheckItemId(o.getId());
String photoIds = "";
if (o.getState() == EmStateCheck.NORMAL) {
bean.setCheckResult(0);
} else if (o.getState() == EmStateCheck.CHECK) {
bean.setCheckResult(1);
for (int j = 0; j < o.getPhotos().size(); j++) {
if (!TextUtils.isEmpty(o.getPhotos().get(j).getId())) {
photoIds += o.getPhotos().get(j).getId() + ",";
}
}
if (photoIds.length() < 10) {
mMProgressDialog.dismiss();
ToastUtils.showShort("检查项中存在未上传图片的项目");
return;
} else {
bean.setScenePhotos(photoIds);
}
} else {
if (o.getRectify() == 4) {
//立即整改
bean.setCheckResult(2);
if (o.getTimeLimit().equals("立即整改")) {
bean.setImmediatelyChangeType(1);
} else {
bean.setImmediatelyChangeType(2);
}
} else if (o.getRectify() == 5) {
//限期整改
bean.setCheckResult(3);
String strDay = o.getTimeLimit().substring(0, o.getTimeLimit().lastIndexOf(""));
bean.setRectificationDays(Integer.parseInt(strDay));
} else {
//不配合
bean.setCheckResult(4);
}
for (int j = 0; j < o.getPhotos().size(); j++) {
if (!TextUtils.isEmpty(o.getPhotos().get(j).getId())) {
photoIds += o.getPhotos().get(j).getId() + ",";
}
}
if (photoIds.length() < 10) {
mMProgressDialog.dismiss();
ToastUtils.showShort("检查项中存在未上传图片的项目");
return;
} else {
bean.setScenePhotos(photoIds);
}
}
items.add(bean);
}
submitBean.setHiddenDangerReports(items);
doSubmit(submitBean);
}
/**
* 提交检查结果
*
* @param submitBean
*/
private void doSubmit(OptionsSubmitBean submitBean) {
Gson gson = new Gson();
String obj = gson.toJson(submitBean);
RequestBody body = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), obj);
RetrofitManager.getInstance()
.create(LocationApiService.class)
.doSaveOptions(body, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<SuccessBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(SuccessBean successBean) {
mMProgressDialog.dismiss();
ToastUtils.showShort("检查成功");
finish();
}
@Override
public void onError(Throwable e) {
mMProgressDialog.dismiss();
}
@Override
public void onComplete() {
}
});
}
private void getCheckOptions(String id) {
refreshView(STATE_LOAD_LOADING);
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getCheckOptionsList(id, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<List<CheckOptionsbean>>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(List<CheckOptionsbean> checkOptionsbeans) {
if (checkOptionsbeans != null && checkOptionsbeans.size() > 0) {
buildCheckOptions(checkOptionsbeans);
} else {
refreshView(STATE_LOAD_EMPTY);
}
}
@Override
public void onError(Throwable e) {
refreshView(STATE_LOAD_ERROR);
}
@Override
public void onComplete() {
}
});
}
private void buildCheckOptions(List<CheckOptionsbean> checkOptionsbeans) {
for (int i = 0; i < checkOptionsbeans.size(); i++) {
List<AddPhotoBean> mPhotos = new ArrayList<>();
mPhotos.add(new AddPhotoBean());
Options o = new Options();
o.setId(checkOptionsbeans.get(i).getCheckItemId());
o.setTitle(checkOptionsbeans.get(i).getSummaryJoinByCheckItemId());
o.setPhotos(mPhotos);
mOptions.add(o);
}
mAdapter.setData(mOptions);
refreshView(STATE_LOAD_SUCCESS);
}
/**
@ -169,85 +366,81 @@ public class CheckOptionsActivity extends BaseActivity {
* @param picPath
*/
private void uploadImg(String picPath, int src) {
mOptions.get(mCurrentIndex).getPhotos().add(new AddPhotoBean());
mCurrentBean.setPath(picPath);
mCurrentBean.setId("1234");
mAdapter.notifyItemChanged(mCurrentIndex);
// File file = new File(picPath);
// if (!file.exists()) {
// showToast("图片路径错误.");
// return;
// }
// ProgressDialog progressDialog = UIUtil.initDialog(mActivity, "正在上传...");
// progressDialog.show();
// Luban.with(mActivity)
// .load(picPath)
// .ignoreBy(100)
// .setTargetDir(PathConfig.CATCH_PATH)
// .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();
File file = new File(picPath);
if (!file.exists()) {
showToast("图片路径错误.");
return;
}
ProgressDialog progressDialog = UIUtil.initDialog(mActivity, "正在上传...");
progressDialog.show();
Luban.with(mActivity)
.load(picPath)
.ignoreBy(100)
.setTargetDir(PathConfig.CATCH_PATH)
.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("上传成功");
mCurrentBean.setId(baseUserBean.getData());
mCurrentBean.setPath(picPath);
if (mCurrentOptions.getPhotos().size() < 4) {
mCurrentOptions.getPhotos().add(new AddPhotoBean());
}
mAdapter.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();
}
}

View File

@ -621,11 +621,7 @@
// private void getAreaList(int i) {
// mProgressDialog = null;
// if (i == 1) {
// mProgressDialog = new ProgressDialog(IssueReportActivity.this);
// mProgressDialog.setMessage("加载中...");
// mProgressDialog.setCancelable(false);
// mProgressDialog.setCanceledOnTouchOutside(false);
// mProgressDialog.show();
// }
//
// RetrofitManager.getInstance()

View File

@ -12,9 +12,41 @@ import java.util.List;
* 描述:
*/
public class Options {
private String id;
private List<AddPhotoBean> photos;
private String title;
private EmStateCheck state = EmStateCheck.NORMAL;
private EmStateCheck state = EmStateCheck.NORMAL;//检查状态 normal 未检查 check合格 uncheck不合格
private int rectify = 4;//立即整改-4,限期整改-5 不配合-6
//整改期限
// 当场整改
// 当天整改
//限期整改
// 1天 5 10
private String timeLimit;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTimeLimit() {
return timeLimit;
}
public void setTimeLimit(String timeLimit) {
this.timeLimit = timeLimit;
}
public int getRectify() {
return rectify;
}
public void setRectify(int rectify) {
this.rectify = rectify;
}
public List<AddPhotoBean> getPhotos() {
return photos;

View File

@ -7,6 +7,7 @@ import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.RadioGroup;
@ -79,25 +80,60 @@ public class OptionsAdapter extends BaseRecyclerAdapter<Options, OptionsHolder>
//合格
if (state == EmStateCheck.CHECK) {
oHolder.mLlContent.setVisibility(View.GONE);
} else {
oHolder.mLlContent.setVisibility(View.VISIBLE);
//立即整改
oHolder.mLlSp.setVisibility(View.VISIBLE);
String[] defaultArray = mContext.getResources().getStringArray(R.array.limit);
ArrayAdapter<String> defaultApater = new ArrayAdapter<>(mContext, R.layout.item_pop_text, defaultArray);
oHolder.mSpinner.setAdapter(defaultApater);
oHolder.mRg.setOnCheckedChangeListener((radioGroup, i) -> {
if (i == R.id.rb_now) {
mData.get(index).setTimeLimit("立即整改");
oHolder.mRbNow.setChecked(true);
oHolder.mRg.setOnCheckedChangeListener((radioGroup, id) -> {
if (id == R.id.rb_now) {
oHolder.mLlSp.setVisibility(View.VISIBLE);
//立即整改
oHolder.mSpinner.setAdapter(defaultApater);
} else {
mData.get(index).setRectify(4);
mData.get(index).setTimeLimit("立即整改");
oHolder.mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
String s = defaultArray[i];
mData.get(index).setTimeLimit(s);
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
} else if (id == R.id.rb_term) {
//限期整改
String[] stringArray = mContext.getResources().getStringArray(R.array.timeLimit);
ArrayAdapter<String> adapter = new ArrayAdapter<>(mContext, R.layout.item_pop_text, stringArray);
oHolder.mLlSp.setVisibility(View.VISIBLE);
mData.get(index).setRectify(5);
mData.get(index).setTimeLimit("1天");
String[] strArray = mContext.getResources().getStringArray(R.array.timeLimit);
ArrayAdapter<String> adapter = new ArrayAdapter<>(mContext, R.layout.item_pop_text, strArray);
oHolder.mSpinner.setAdapter(adapter);
oHolder.mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
String s = strArray[i];
mData.get(index).setTimeLimit(s);
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
}
});
} else {
//不配合
oHolder.mLlSp.setVisibility(View.GONE);
mData.get(index).setRectify(6);
}
});
}
AddPhotoAdapter photoAdapter = new AddPhotoAdapter(mContext, op.getPhotos());
oHolder.mRlvPhotos.setAdapter(photoAdapter);

View File

@ -5,6 +5,7 @@ import android.support.v7.widget.AppCompatSpinner;
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.TextView;
@ -24,6 +25,8 @@ public class OptionsHolder extends RecyclerView.ViewHolder {
public LinearLayout mLlContent;
public AppCompatSpinner mSpinner;
public RadioGroup mRg;
public LinearLayout mLlSp;
public RadioButton mRbNow;
public OptionsHolder(@NonNull View itemView) {
super(itemView);
@ -33,5 +36,7 @@ public class OptionsHolder extends RecyclerView.ViewHolder {
mLlContent = itemView.findViewById(R.id.ll_content);
mSpinner = itemView.findViewById(R.id.sp_term);
mRg = itemView.findViewById(R.id.rg_term);
mRbNow = itemView.findViewById(R.id.rb_now);
mLlSp = itemView.findViewById(R.id.ll_sp);
}
}

View File

@ -13,12 +13,16 @@ import android.widget.TextView;
import com.jcodecraeer.xrecyclerview.ProgressStyle;
import com.jcodecraeer.xrecyclerview.XRecyclerView;
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
import com.sucstepsoft.cm_utils.utils.ToastUtils;
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
import com.sucstepsoft.txrealtimelocation.R;
import com.sucstepsoft.txrealtimelocation.activitys.companylib.CompanyDetailActivity;
import com.sucstepsoft.txrealtimelocation.adapters.CompanyCheckAdapter;
import com.sucstepsoft.txrealtimelocation.beans.CompanyBean;
import com.sucstepsoft.txrealtimelocation.beans.CompanyListDataBean;
import com.sucstepsoft.txrealtimelocation.net.LocationApiService;
import java.util.ArrayList;
import java.util.List;
@ -26,6 +30,10 @@ 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;
/**
* 选择企业
@ -50,8 +58,9 @@ public class SelCompanyActivity extends BaseActivity {
@BindView(R.id.xlv_com_lib)
XRecyclerView mXlvComLib;
private Unbinder mBind;
private List<CompanyBean> mDatas = new ArrayList<>();
private List<CompanyListDataBean.RowsBean> mDatas = new ArrayList<>();
private CompanyCheckAdapter mAdapter;
private int mCurrentPage = 1;
@Override
protected int setLayoutId() {
@ -77,26 +86,15 @@ public class SelCompanyActivity extends BaseActivity {
});
refreshView(STATE_LOAD_SUCCESS);
reStateView(STATE_LO);
getCompanyList();
initView();
}
private void getCompanyList() {
for (int i = 0; i < 100; i++) {
CompanyBean bean = new CompanyBean();
bean.setId(i + "");
bean.setName(i + " 测试标题测试标题测试标题测试标题");
bean.setAddress("测试地址测试地址测试地址测试地址测试地址");
bean.setPeople("测试");
mDatas.add(bean);
}
private void initView() {
mAdapter = new CompanyCheckAdapter(mActivity, mDatas);
mXlvComLib.setAdapter(mAdapter);
LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity);
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mAdapter.addOnItemClickListener(bean -> startActivity(new Intent(this, CompanyDetailActivity.class)));
mXlvComLib.setLayoutManager(layoutManager);
// mXlvComLib.setAdapter(mAdapter);
// mXlvComLib.addOnItemClickListener(bean -> showIssueDetail(bean));
mXlvComLib.setNoMore(true);
mXlvComLib.setRefreshProgressStyle(ProgressStyle.BallGridBeat);
mXlvComLib.setLoadingMoreProgressStyle(ProgressStyle.Pacman);
@ -111,7 +109,59 @@ public class SelCompanyActivity extends BaseActivity {
}
});
reStateView(STATE_SU);
getCompanyLibList(mCurrentPage);
}
/**
* 获取列表
*
* @param currentPage
*/
private void getCompanyLibList(int currentPage) {
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getCompanyList(UserLgUtils.getUserId(), currentPage + "", UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<CompanyListDataBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(CompanyListDataBean companyListDataBean) {
if (companyListDataBean.getRows() != null && companyListDataBean.getRows().size() > 0) {
mDatas.addAll(companyListDataBean.getRows());
if (mDatas.size() == companyListDataBean.getTotal()) {
mXlvComLib.setNoMore(true);
} else {
mXlvComLib.setNoMore(false);
}
reStateView(STATE_SU);
mAdapter.setData(mDatas);
mXlvComLib.refreshComplete();
mXlvComLib.loadMoreComplete();
} else {
mXlvComLib.refreshComplete();
mXlvComLib.loadMoreComplete();
reStateView(STATE_EM);
}
}
@Override
public void onError(Throwable e) {
reStateView(STATE_ER);
mXlvComLib.refreshComplete();
mXlvComLib.loadMoreComplete();
}
@Override
public void onComplete() {
}
});
}
private void reStateView(int state) {

View File

@ -1,19 +1,31 @@
package com.sucstepsoft.txrealtimelocation.activitys.trouble;
import android.app.ProgressDialog;
import android.content.Intent;
import android.provider.CallLog;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
import com.sucstepsoft.cm_utils.core.retrofit_net.conver.BaseObserver;
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.txrealtimelocation.R;
import com.sucstepsoft.txrealtimelocation.activitys.issue.CheckOptionsActivity;
import com.sucstepsoft.txrealtimelocation.beans.CompanyDetailBean;
import com.sucstepsoft.txrealtimelocation.net.LocationApiService;
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;
/**
* 隐患上报
@ -22,7 +34,36 @@ public class TroubleReportActivity extends BaseActivity {
@BindView(R.id.tv_sel_company)
TextView mTvSelCompany;
@BindView(R.id.tv_name)
TextView mTvName;
@BindView(R.id.tv_type)
TextView mTvType;
@BindView(R.id.tv_re_address)
TextView mTvReAddress;
@BindView(R.id.tv_place)
TextView mTvPlace;
@BindView(R.id.tv_det_address)
TextView mTvDetAddress;
@BindView(R.id.tv_peo_count)
TextView mTvPeoCount;
@BindView(R.id.tv_risk)
TextView mTvRisk;
@BindView(R.id.tv_peo)
TextView mTvPeo;
@BindView(R.id.tv_phone)
TextView mTvPhone;
@BindView(R.id.ll_company_info)
LinearLayout mLlCompanyInfo;
@BindView(R.id.tv_hint)
TextView mTvHint;
@BindView(R.id.ll_btns)
LinearLayout mLlBtns;
@BindView(R.id.btn_check)
Button mBtnCheck;
@BindView(R.id.btn_uncheck)
Button mBtnUncheck;
private Unbinder mBind;
private CompanyDetailBean mDetailBean;
@Override
protected int setLayoutId() {
@ -34,8 +75,37 @@ public class TroubleReportActivity extends BaseActivity {
mBind = ButterKnife.bind(this);
refreshView(STATE_LOAD_SUCCESS);
mTvBaseTitle.setText("企业隐患上报");
mTvPublish.setVisibility(View.VISIBLE);
mTvPublish.setText("检查历史");
mTvSelCompany.setOnClickListener(v -> startActivityForResult(new Intent(this, SelCompanyActivity.class), 223));
mTvHint.setVisibility(View.VISIBLE);
mLlCompanyInfo.setVisibility(View.GONE);
//配合
mBtnCheck.setOnClickListener(v -> {
if (mDetailBean == null) {
ToastUtils.showShort("请选择企业");
} else {
Intent intent = new Intent(mActivity, CheckOptionsActivity.class);
intent.putExtra("id", mDetailBean.getIndustry());
intent.putExtra("cId", mDetailBean.getEnterpriseId());
intent.putExtra("name", mDetailBean.getName());
intent.putExtra("peo", mDetailBean.getMaster());
intent.putExtra("phone", mDetailBean.getPhone());
startActivity(intent);
finish();
}
});
//不配合
mBtnUncheck.setOnClickListener(v -> {
if (mDetailBean == null) {
ToastUtils.showShort("请选择企业");
} else {
Intent intent = new Intent(mActivity, CheckOptionsActivity.class);
intent.putExtra("id", mDetailBean.getEnterpriseId());
startActivity(intent);
finish();
}
});
}
@Override
@ -44,11 +114,68 @@ public class TroubleReportActivity extends BaseActivity {
if (requestCode == 223) {
if (resultCode == 123) {
String id = data.getStringExtra("id");
LogUtils.e(id);
getDetailById(id);
}
}
}
/**
* 获取企业详情
*
* @param id
*/
private void getDetailById(String id) {
ProgressDialog mProgressDialog = new ProgressDialog(mActivity);
mProgressDialog.setMessage("加载中...");
mProgressDialog.setCancelable(false);
mProgressDialog.setCanceledOnTouchOutside(false);
mProgressDialog.show();
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getCompanyDetail(id, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<CompanyDetailBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(CompanyDetailBean companyDetailBean) {
mProgressDialog.dismiss();
if (companyDetailBean != null) {
mDetailBean = companyDetailBean;
setDataToView();
}
}
@Override
public void onError(Throwable e) {
mProgressDialog.dismiss();
}
@Override
public void onComplete() {
}
});
}
private void setDataToView() {
mTvHint.setVisibility(View.GONE);
mLlCompanyInfo.setVisibility(View.VISIBLE);
mTvName.setText(mDetailBean.getName());
mTvPeo.setText(mDetailBean.getMaster());
mTvRisk.setText(mDetailBean.getRiskOperationDictionaryName());
mTvPeoCount.setText(mDetailBean.getEngagedCount() + "");
mTvPhone.setText(mDetailBean.getPhone());
mTvType.setText(mDetailBean.getTypeDictionaryName());
mTvReAddress.setText(mDetailBean.getArea1DictionaryName() + mDetailBean.getArea2DictionaryName() + mDetailBean.getArea3DictionaryName() + mDetailBean.getArea4DictionaryName() + mDetailBean.getArea5DictionaryName());
mTvDetAddress.setText(mDetailBean.getAddress());
mTvPlace.setText(mDetailBean.getIndustryDictionaryName());
}
@Override
protected void onDestroy() {
super.onDestroy();

View File

@ -1,20 +1,15 @@
package com.sucstepsoft.txrealtimelocation.adapters;
import android.content.Context;
import android.os.Handler;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
import com.sucstepsoft.cm_utils.utils.LogUtils;
import com.sucstepsoft.txrealtimelocation.R;
import com.sucstepsoft.txrealtimelocation.activitys.lawlib.LawLibActivity;
import com.sucstepsoft.txrealtimelocation.adapters.holders.CompanyCheckHolder;
import com.sucstepsoft.txrealtimelocation.beans.CompanyBean;
import com.sucstepsoft.txrealtimelocation.beans.CompanyListDataBean;
import java.util.List;
@ -24,12 +19,12 @@ import java.util.List;
* 邮箱: itgaojian@163.com
* 描述:
*/
public class CompanyCheckAdapter extends BaseRecyclerAdapter<CompanyBean, CompanyCheckHolder> {
public class CompanyCheckAdapter extends BaseRecyclerAdapter<CompanyListDataBean.RowsBean, CompanyCheckHolder> {
private int mCheckIndex = 0;
private String mCheckId = "";
private boolean onBind;
public CompanyCheckAdapter(Context ctx, List<CompanyBean> list) {
public CompanyCheckAdapter(Context ctx, List<CompanyListDataBean.RowsBean> list) {
super(ctx, list);
}
@ -42,24 +37,17 @@ public class CompanyCheckAdapter extends BaseRecyclerAdapter<CompanyBean, Compan
@Override
public void bindHolder(CompanyCheckHolder holder, int i) {
holder.itemView.setOnClickListener(v -> {
mCheckId = mData.get(i).getId();
mCheckId = mData.get(i).getEnterpriseId();
notifyDataSetChanged();
});
// holder.mCbCheck.setOnCheckedChangeListener((compoundButton, b) -> {
// mCheckId = mData.get(i).getId();
// LogUtils.e(b + "===" + mCheckId);
//// if (!onBind) {
//// notifyDataSetChanged();
//// }
// });
if (!TextUtils.isEmpty(mCheckId) && mData.get(i).getId().equals(mCheckId)) {
if (!TextUtils.isEmpty(mCheckId) && mData.get(i).getEnterpriseId().equals(mCheckId)) {
holder.mCbCheck.setChecked(true);
} else {
holder.mCbCheck.setChecked(false);
}
holder.mTvName.setText(mData.get(i).getName());
holder.mTvAddress.setText("地址:" + mData.get(i).getAddress());
holder.mTvPeo.setText("负责人:" + mData.get(i).getPeople());
holder.mTvName.setText(mData.get(i).getNameJoinByEnterpriseId());
holder.mTvAddress.setText("地址:" + mData.get(i).getArea2DictionaryName() + mData.get(i).getArea3DictionaryName() + mData.get(i).getArea4DictionaryName() + mData.get(i).getArea5DictionaryName());
holder.mTvPeo.setText("负责人:" + mData.get(i).getMasterJoinByEnterpriseId());
}
public String getSelDataId() {

View File

@ -1,6 +1,7 @@
package com.sucstepsoft.txrealtimelocation.adapters;
import android.content.Context;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -8,6 +9,7 @@ import android.view.ViewGroup;
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
import com.sucstepsoft.txrealtimelocation.R;
import com.sucstepsoft.txrealtimelocation.adapters.holders.CompanyHolder;
import com.sucstepsoft.txrealtimelocation.beans.CompanyListDataBean;
import java.util.List;
@ -17,8 +19,8 @@ import java.util.List;
* 邮箱: itgaojian@163.com
* 描述:
*/
public class CompanyLibAdapter extends BaseRecyclerAdapter<String, CompanyHolder> {
public CompanyLibAdapter(Context ctx, List<String> list) {
public class CompanyLibAdapter extends BaseRecyclerAdapter<CompanyListDataBean.RowsBean, CompanyHolder> {
public CompanyLibAdapter(Context ctx, List<CompanyListDataBean.RowsBean> list) {
super(ctx, list);
}
@ -30,6 +32,29 @@ public class CompanyLibAdapter extends BaseRecyclerAdapter<String, CompanyHolder
@Override
public void bindHolder(CompanyHolder companyHolder, int i) {
companyHolder.mTvAddress.setText("地址:" + mData.get(i).getArea2DictionaryName() + mData.get(i).getArea3DictionaryName() + mData.get(i).getArea4DictionaryName() + mData.get(i).getArea5DictionaryName());
companyHolder.mTvCompanyName.setText(mData.get(i).getNameJoinByEnterpriseId());
companyHolder.mTvCompanyPeo.setText("负责人:" + mData.get(i).getMasterJoinByEnterpriseId());
if (TextUtils.isEmpty(mData.get(i).getUserId())) {
companyHolder.mBtnClain.setVisibility(View.VISIBLE);
companyHolder.mBtnUnClaim.setVisibility(View.GONE);
} else {
companyHolder.mBtnClain.setVisibility(View.GONE);
companyHolder.mBtnUnClaim.setVisibility(View.VISIBLE);
}
if (mBindListener != null) {
companyHolder.mBtnClain.setOnClickListener(v -> mBindListener.onBindCompany(1, mData.get(i), i));
companyHolder.mBtnUnClaim.setOnClickListener(v -> mBindListener.onBindCompany(2, mData.get(i), i));
}
}
private OnBindListener mBindListener;
public void addOnBindListener(OnBindListener listener) {
this.mBindListener = listener;
}
public interface OnBindListener {
void onBindCompany(int type, CompanyListDataBean.RowsBean bean, int index);
}
}

View File

@ -3,8 +3,13 @@ package com.sucstepsoft.txrealtimelocation.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.txrealtimelocation.R;
import butterknife.BindView;
/**
* 作者: adam
* 日期: 2020/3/29 - 14:41
@ -14,8 +19,17 @@ import android.widget.TextView;
public class CompanyHolder extends RecyclerView.ViewHolder {
public TextView mTvCompanyName;
public TextView mTvCompanyPeo;
public TextView mTvAddress;
public Button mBtnClain;
public Button mBtnUnClaim;
public CompanyHolder(@NonNull View itemView) {
super(itemView);
mTvCompanyName = itemView.findViewById(R.id.tv_company_name);
mTvCompanyPeo = itemView.findViewById(R.id.tv_company_peo);
mTvAddress = itemView.findViewById(R.id.tv_address);
mBtnClain = itemView.findViewById(R.id.btn_claim);
mBtnUnClaim = itemView.findViewById(R.id.btn_unclaim);
}
}

View File

@ -33,6 +33,15 @@ public class AppTokenUser {
private String email;
private String username;
private List<RolesBean> roles;
private List<DepBean> departments;
public List<DepBean> getDepartments() {
return departments;
}
public void setDepartments(List<DepBean> departments) {
this.departments = departments;
}
public String getPhone() {
return phone;
@ -98,6 +107,27 @@ public class AppTokenUser {
this.roles = roles;
}
public static class DepBean {
private String departmentName;
private String departmentId;
public String getDepartmentName() {
return departmentName;
}
public void setDepartmentName(String departmentName) {
this.departmentName = departmentName;
}
public String getDepartmentId() {
return departmentId;
}
public void setDepartmentId(String departmentId) {
this.departmentId = departmentId;
}
}
public static class RolesBean {
/**
* roleId : e483f019-d971-49ac-b5fa-3314220da703

View File

@ -0,0 +1,34 @@
package com.sucstepsoft.txrealtimelocation.beans;
/**
* 作者: adam
* 日期: 2020/3/31 - 6:45 PM
* 邮箱: itgaojian@163.com
* 描述:
*/
public class BindCompanyBean {
/**
* enterpriseId : string
* userId : string
*/
private String enterpriseId;
private String userId;
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
}

View File

@ -0,0 +1,84 @@
package com.sucstepsoft.txrealtimelocation.beans;
/**
* 作者: adam
* 日期: 2020/3/31 - 3:57 PM
* 邮箱: itgaojian@163.com
* 描述:
*/
public class CheckOptionsbean {
/**
* industryCheckItemId : 3a1725c2-c1e6-496b-bb58-f70bbcbc7ded
* industryId : 706b8520-3a1d-431e-a203-0d307dc22e87
* industryIdDictionaryName : 餐饮
* checkItemId : a1c27ea5-40dd-4cc8-974c-d387f8ba428c
* nameJoinByCheckItemId : 照明
* summaryJoinByCheckItemId : 照明
* typeJoinByCheckItemId : 1
*/
private String industryCheckItemId;
private String industryId;
private String industryIdDictionaryName;
private String checkItemId;
private String nameJoinByCheckItemId;
private String summaryJoinByCheckItemId;
private String typeJoinByCheckItemId;
public String getIndustryCheckItemId() {
return industryCheckItemId;
}
public void setIndustryCheckItemId(String industryCheckItemId) {
this.industryCheckItemId = industryCheckItemId;
}
public String getIndustryId() {
return industryId;
}
public void setIndustryId(String industryId) {
this.industryId = industryId;
}
public String getIndustryIdDictionaryName() {
return industryIdDictionaryName;
}
public void setIndustryIdDictionaryName(String industryIdDictionaryName) {
this.industryIdDictionaryName = industryIdDictionaryName;
}
public String getCheckItemId() {
return checkItemId;
}
public void setCheckItemId(String checkItemId) {
this.checkItemId = checkItemId;
}
public String getNameJoinByCheckItemId() {
return nameJoinByCheckItemId;
}
public void setNameJoinByCheckItemId(String nameJoinByCheckItemId) {
this.nameJoinByCheckItemId = nameJoinByCheckItemId;
}
public String getSummaryJoinByCheckItemId() {
return summaryJoinByCheckItemId;
}
public void setSummaryJoinByCheckItemId(String summaryJoinByCheckItemId) {
this.summaryJoinByCheckItemId = summaryJoinByCheckItemId;
}
public String getTypeJoinByCheckItemId() {
return typeJoinByCheckItemId;
}
public void setTypeJoinByCheckItemId(String typeJoinByCheckItemId) {
this.typeJoinByCheckItemId = typeJoinByCheckItemId;
}
}

View File

@ -0,0 +1,254 @@
package com.sucstepsoft.txrealtimelocation.beans;
/**
* 作者: adam
* 日期: 2020/3/31 - 3:15 PM
* 邮箱: itgaojian@163.com
* 描述:
*/
public class CompanyDetailBean {
/**
* enterpriseId : 8cdf6a13-6ca4-40c2-963c-fbe264cb8cb2
* name : 张三牛肉店
* type : 7965a3b7-47b7-4843-b030-91f1bd4428e5
* typeDictionaryName :
* area1 : a91b43a2-e92a-43e6-8788-0c636c44f9b6
* area1DictionaryName :
* area2 : 905a4a20-2ffc-4d73-b6f0-eca0c7565b75
* area2DictionaryName :
* area3 : 281c2d38-a904-454a-9325-b5caee1c851c
* area3DictionaryName :
* area4 : 470e65d7-78b0-4a84-afb6-911b0f5db56a
* area4DictionaryName :
* area5 : e772333e-6900-43ae-a2f9-bf77d49cdf06
* area5DictionaryName :
* address : 102号街
* industry : 706b8520-3a1d-431e-a203-0d307dc22e87
* industryDictionaryName :
* engagedCount : 1
* riskOperation : f0b47289-f451-40c5-a57e-7042f69e5c2c
* riskOperationDictionaryName :
* master : 张三
* phone : 13888888888
* factoryGate : 5ba2de3f-38fc-4fee-85c0-f74d012ad71f
* workplace : 100a5050-a6b9-4612-a9ee-53c3546b5dd3
*/
private String enterpriseId;
private String name;
private String type;
private String typeDictionaryName;
private String area1;
private String area1DictionaryName;
private String area2;
private String area2DictionaryName;
private String area3;
private String area3DictionaryName;
private String area4;
private String area4DictionaryName;
private String area5;
private String area5DictionaryName;
private String address;
private String industry;
private String industryDictionaryName;
private int engagedCount;
private String riskOperation;
private String riskOperationDictionaryName;
private String master;
private String phone;
private String factoryGate;
private String workplace;
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getTypeDictionaryName() {
return typeDictionaryName;
}
public void setTypeDictionaryName(String typeDictionaryName) {
this.typeDictionaryName = typeDictionaryName;
}
public String getArea1() {
return area1;
}
public void setArea1(String area1) {
this.area1 = area1;
}
public String getArea1DictionaryName() {
return area1DictionaryName;
}
public void setArea1DictionaryName(String area1DictionaryName) {
this.area1DictionaryName = area1DictionaryName;
}
public String getArea2() {
return area2;
}
public void setArea2(String area2) {
this.area2 = area2;
}
public String getArea2DictionaryName() {
return area2DictionaryName;
}
public void setArea2DictionaryName(String area2DictionaryName) {
this.area2DictionaryName = area2DictionaryName;
}
public String getArea3() {
return area3;
}
public void setArea3(String area3) {
this.area3 = area3;
}
public String getArea3DictionaryName() {
return area3DictionaryName;
}
public void setArea3DictionaryName(String area3DictionaryName) {
this.area3DictionaryName = area3DictionaryName;
}
public String getArea4() {
return area4;
}
public void setArea4(String area4) {
this.area4 = area4;
}
public String getArea4DictionaryName() {
return area4DictionaryName;
}
public void setArea4DictionaryName(String area4DictionaryName) {
this.area4DictionaryName = area4DictionaryName;
}
public String getArea5() {
return area5;
}
public void setArea5(String area5) {
this.area5 = area5;
}
public String getArea5DictionaryName() {
return area5DictionaryName;
}
public void setArea5DictionaryName(String area5DictionaryName) {
this.area5DictionaryName = area5DictionaryName;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getIndustry() {
return industry;
}
public void setIndustry(String industry) {
this.industry = industry;
}
public String getIndustryDictionaryName() {
return industryDictionaryName;
}
public void setIndustryDictionaryName(String industryDictionaryName) {
this.industryDictionaryName = industryDictionaryName;
}
public int getEngagedCount() {
return engagedCount;
}
public void setEngagedCount(int engagedCount) {
this.engagedCount = engagedCount;
}
public String getRiskOperation() {
return riskOperation;
}
public void setRiskOperation(String riskOperation) {
this.riskOperation = riskOperation;
}
public String getRiskOperationDictionaryName() {
return riskOperationDictionaryName;
}
public void setRiskOperationDictionaryName(String riskOperationDictionaryName) {
this.riskOperationDictionaryName = riskOperationDictionaryName;
}
public String getMaster() {
return master;
}
public void setMaster(String master) {
this.master = master;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getFactoryGate() {
return factoryGate;
}
public void setFactoryGate(String factoryGate) {
this.factoryGate = factoryGate;
}
public String getWorkplace() {
return workplace;
}
public void setWorkplace(String workplace) {
this.workplace = workplace;
}
}

View File

@ -0,0 +1,293 @@
package com.sucstepsoft.txrealtimelocation.beans;
import java.util.List;
/**
* 作者: adam
* 日期: 2020/3/31 - 2:26 PM
* 邮箱: itgaojian@163.com
* 描述:
*/
public class CompanyListDataBean {
/**
* page : 1
* rows : [{"address":"string","area1":"string","area1DictionaryName":"string","area2":"string","area2DictionaryName":"string","area3":"string","area3DictionaryName":"string","area4":"string","area4DictionaryName":"string","area5":"string","area5DictionaryName":"string","engagedCount":0,"enterpriseId":"string","factoryGate":"string","industry":"string","industryDictionaryName":"string","master":"string","name":"string","phone":"string","riskOperation":"string","riskOperationDictionaryName":"string","type":"string","typeDictionaryName":"string","workplace":"string"}]
* total : 20
*/
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 {
/**
* addressJoinByEnterpriseId : string
* area1DictionaryName : string
* area1JoinByEnterpriseId : string
* area2DictionaryName : string
* area2JoinByEnterpriseId : string
* area3DictionaryName : string
* area3JoinByEnterpriseId : string
* area4DictionaryName : string
* area4JoinByEnterpriseId : string
* area5DictionaryName : string
* area5JoinByEnterpriseId : string
* engagedCountJoinByEnterpriseId : string
* enterpriseId : string
* enterpriseOfGridOperatorId : string
* industryDictionaryName : string
* industryJoinByEnterpriseId : string
* masterJoinByEnterpriseId : string
* nameJoinByEnterpriseId : string
* phoneJoinByEnterpriseId : string
* riskOperationDictionaryName : string
* riskOperationJoinByEnterpriseId : string
* typeDictionaryName : string
* typeJoinByEnterpriseId : string
* userId : string
*/
private String addressJoinByEnterpriseId;
private String area1DictionaryName;
private String area1JoinByEnterpriseId;
private String area2DictionaryName;
private String area2JoinByEnterpriseId;
private String area3DictionaryName;
private String area3JoinByEnterpriseId;
private String area4DictionaryName;
private String area4JoinByEnterpriseId;
private String area5DictionaryName;
private String area5JoinByEnterpriseId;
private String engagedCountJoinByEnterpriseId;
private String enterpriseId;
private String enterpriseOfGridOperatorId;
private String industryDictionaryName;
private String industryJoinByEnterpriseId;
private String masterJoinByEnterpriseId;
private String nameJoinByEnterpriseId;
private String phoneJoinByEnterpriseId;
private String riskOperationDictionaryName;
private String riskOperationJoinByEnterpriseId;
private String typeDictionaryName;
private String typeJoinByEnterpriseId;
private String userId;
public String getAddressJoinByEnterpriseId() {
return addressJoinByEnterpriseId;
}
public void setAddressJoinByEnterpriseId(String addressJoinByEnterpriseId) {
this.addressJoinByEnterpriseId = addressJoinByEnterpriseId;
}
public String getArea1DictionaryName() {
return area1DictionaryName;
}
public void setArea1DictionaryName(String area1DictionaryName) {
this.area1DictionaryName = area1DictionaryName;
}
public String getArea1JoinByEnterpriseId() {
return area1JoinByEnterpriseId;
}
public void setArea1JoinByEnterpriseId(String area1JoinByEnterpriseId) {
this.area1JoinByEnterpriseId = area1JoinByEnterpriseId;
}
public String getArea2DictionaryName() {
return area2DictionaryName;
}
public void setArea2DictionaryName(String area2DictionaryName) {
this.area2DictionaryName = area2DictionaryName;
}
public String getArea2JoinByEnterpriseId() {
return area2JoinByEnterpriseId;
}
public void setArea2JoinByEnterpriseId(String area2JoinByEnterpriseId) {
this.area2JoinByEnterpriseId = area2JoinByEnterpriseId;
}
public String getArea3DictionaryName() {
return area3DictionaryName;
}
public void setArea3DictionaryName(String area3DictionaryName) {
this.area3DictionaryName = area3DictionaryName;
}
public String getArea3JoinByEnterpriseId() {
return area3JoinByEnterpriseId;
}
public void setArea3JoinByEnterpriseId(String area3JoinByEnterpriseId) {
this.area3JoinByEnterpriseId = area3JoinByEnterpriseId;
}
public String getArea4DictionaryName() {
return area4DictionaryName;
}
public void setArea4DictionaryName(String area4DictionaryName) {
this.area4DictionaryName = area4DictionaryName;
}
public String getArea4JoinByEnterpriseId() {
return area4JoinByEnterpriseId;
}
public void setArea4JoinByEnterpriseId(String area4JoinByEnterpriseId) {
this.area4JoinByEnterpriseId = area4JoinByEnterpriseId;
}
public String getArea5DictionaryName() {
return area5DictionaryName;
}
public void setArea5DictionaryName(String area5DictionaryName) {
this.area5DictionaryName = area5DictionaryName;
}
public String getArea5JoinByEnterpriseId() {
return area5JoinByEnterpriseId;
}
public void setArea5JoinByEnterpriseId(String area5JoinByEnterpriseId) {
this.area5JoinByEnterpriseId = area5JoinByEnterpriseId;
}
public String getEngagedCountJoinByEnterpriseId() {
return engagedCountJoinByEnterpriseId;
}
public void setEngagedCountJoinByEnterpriseId(String engagedCountJoinByEnterpriseId) {
this.engagedCountJoinByEnterpriseId = engagedCountJoinByEnterpriseId;
}
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getEnterpriseOfGridOperatorId() {
return enterpriseOfGridOperatorId;
}
public void setEnterpriseOfGridOperatorId(String enterpriseOfGridOperatorId) {
this.enterpriseOfGridOperatorId = enterpriseOfGridOperatorId;
}
public String getIndustryDictionaryName() {
return industryDictionaryName;
}
public void setIndustryDictionaryName(String industryDictionaryName) {
this.industryDictionaryName = industryDictionaryName;
}
public String getIndustryJoinByEnterpriseId() {
return industryJoinByEnterpriseId;
}
public void setIndustryJoinByEnterpriseId(String industryJoinByEnterpriseId) {
this.industryJoinByEnterpriseId = industryJoinByEnterpriseId;
}
public String getMasterJoinByEnterpriseId() {
return masterJoinByEnterpriseId;
}
public void setMasterJoinByEnterpriseId(String masterJoinByEnterpriseId) {
this.masterJoinByEnterpriseId = masterJoinByEnterpriseId;
}
public String getNameJoinByEnterpriseId() {
return nameJoinByEnterpriseId;
}
public void setNameJoinByEnterpriseId(String nameJoinByEnterpriseId) {
this.nameJoinByEnterpriseId = nameJoinByEnterpriseId;
}
public String getPhoneJoinByEnterpriseId() {
return phoneJoinByEnterpriseId;
}
public void setPhoneJoinByEnterpriseId(String phoneJoinByEnterpriseId) {
this.phoneJoinByEnterpriseId = phoneJoinByEnterpriseId;
}
public String getRiskOperationDictionaryName() {
return riskOperationDictionaryName;
}
public void setRiskOperationDictionaryName(String riskOperationDictionaryName) {
this.riskOperationDictionaryName = riskOperationDictionaryName;
}
public String getRiskOperationJoinByEnterpriseId() {
return riskOperationJoinByEnterpriseId;
}
public void setRiskOperationJoinByEnterpriseId(String riskOperationJoinByEnterpriseId) {
this.riskOperationJoinByEnterpriseId = riskOperationJoinByEnterpriseId;
}
public String getTypeDictionaryName() {
return typeDictionaryName;
}
public void setTypeDictionaryName(String typeDictionaryName) {
this.typeDictionaryName = typeDictionaryName;
}
public String getTypeJoinByEnterpriseId() {
return typeJoinByEnterpriseId;
}
public void setTypeJoinByEnterpriseId(String typeJoinByEnterpriseId) {
this.typeJoinByEnterpriseId = typeJoinByEnterpriseId;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
}
}

View File

@ -0,0 +1,152 @@
package com.sucstepsoft.txrealtimelocation.beans;
import java.util.List;
/**
* 作者: adam
* 日期: 2020/3/31 - 4:12 PM
* 邮箱: itgaojian@163.com
* 描述:
*/
public class OptionsSubmitBean {
/**
* checkType : 0
* enterpriseId : string
* hiddenDangerReports : [{"checkId":"string","checkItemId":"string","checkResult":0,"immediatelyChangeType":0,"rectificationDays":0,"rectificationType":0,"scenePhotos":"string","summary":"string"}]
* isComplete : 0
* isCoordination : 0
*/
private int checkType;// 1检查 复查
private String enterpriseId; //企业Id
private int isComplete;//
private int isCoordination;//是否配合
private List<HiddenDangerReportsBean> hiddenDangerReports;
public int getCheckType() {
return checkType;
}
public void setCheckType(int checkType) {
this.checkType = checkType;
}
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public int getIsComplete() {
return isComplete;
}
public void setIsComplete(int isComplete) {
this.isComplete = isComplete;
}
public int getIsCoordination() {
return isCoordination;
}
public void setIsCoordination(int isCoordination) {
this.isCoordination = isCoordination;
}
public List<HiddenDangerReportsBean> getHiddenDangerReports() {
return hiddenDangerReports;
}
public void setHiddenDangerReports(List<HiddenDangerReportsBean> hiddenDangerReports) {
this.hiddenDangerReports = hiddenDangerReports;
}
public static class HiddenDangerReportsBean {
/**
* checkId : string
* checkItemId : string
* checkResult : 0
* immediatelyChangeType : 0
* rectificationDays : 0
* rectificationType : 0
* scenePhotos : string
* summary : string
*/
private String checkId;
private String checkItemId;
private int checkResult;
private int immediatelyChangeType;
private int rectificationDays;
private int rectificationType;
private String scenePhotos;
private String summary;
public String getCheckId() {
return checkId;
}
public void setCheckId(String checkId) {
this.checkId = checkId;
}
public String getCheckItemId() {
return checkItemId;
}
public void setCheckItemId(String checkItemId) {
this.checkItemId = checkItemId;
}
public int getCheckResult() {
return checkResult;
}
public void setCheckResult(int checkResult) {
this.checkResult = checkResult;
}
public int getImmediatelyChangeType() {
return immediatelyChangeType;
}
public void setImmediatelyChangeType(int immediatelyChangeType) {
this.immediatelyChangeType = immediatelyChangeType;
}
public int getRectificationDays() {
return rectificationDays;
}
public void setRectificationDays(int rectificationDays) {
this.rectificationDays = rectificationDays;
}
public int getRectificationType() {
return rectificationType;
}
public void setRectificationType(int rectificationType) {
this.rectificationType = rectificationType;
}
public String getScenePhotos() {
return scenePhotos;
}
public void setScenePhotos(String scenePhotos) {
this.scenePhotos = scenePhotos;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
}
}

View File

@ -5,9 +5,12 @@ import com.sucstepsoft.txrealtimelocation.beans.AddressListBean;
import com.sucstepsoft.txrealtimelocation.beans.AreaListBean;
import com.sucstepsoft.txrealtimelocation.beans.BaseUserBean;
import com.sucstepsoft.txrealtimelocation.beans.CaseFlowBean;
import com.sucstepsoft.txrealtimelocation.beans.CheckOptionsbean;
import com.sucstepsoft.txrealtimelocation.beans.CheckSignBean;
import com.sucstepsoft.txrealtimelocation.beans.CheckSignOffBean;
import com.sucstepsoft.txrealtimelocation.beans.CommunityBean;
import com.sucstepsoft.txrealtimelocation.beans.CompanyDetailBean;
import com.sucstepsoft.txrealtimelocation.beans.CompanyListDataBean;
import com.sucstepsoft.txrealtimelocation.beans.DepartmentBean;
import com.sucstepsoft.txrealtimelocation.beans.IssueSubBean;
import com.sucstepsoft.txrealtimelocation.beans.LeaveDetailBean;
@ -32,6 +35,7 @@ import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
@ -206,7 +210,7 @@ public interface LocationApiService {
*/
@Headers({"base_url_name:dict"})
@Multipart
@POST("app/file/uploadimage")
@POST("file/uploadimage")
Observable<BaseUserBean> uploadImage(@Part MultipartBody.Part file, @Header("token") String token);
/**
@ -241,7 +245,7 @@ public interface LocationApiService {
*/
@Headers({"base_url_name:dict"})
@Multipart
@POST("app/file/uploadaudio")
@POST("file/uploadaudio")
Observable<BaseUserBean> uploadVideo(@Part MultipartBody.Part file, @Header("token") String token);
/**
@ -254,7 +258,7 @@ public interface LocationApiService {
*/
@Headers({"base_url_name:dict"})
@Multipart
@POST("app/file/uploadfile")
@POST("file/uploadfile")
Observable<BaseUserBean> uploadFile(@Part MultipartBody.Part file, @Header("token") String token);
/**
@ -542,4 +546,40 @@ public interface LocationApiService {
Observable<List<UnderlingBean>> getMineLeaderList(@Path("leaderType") String leaderType, @Header("token") String token, @Path("isOnline") boolean isOnline);
//==================================================定位相关接口====================End===================================================
//============================================企业隐患上报===========================================
//获取企业列表
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
@GET("enterpriseofgridoperator/listpageenterpriseofgridoperatorbyuserid/{userId}")
Observable<CompanyListDataBean> getCompanyList(@Path("userId") String userId, @Query("page") String page, @Header("token") String token);
//获取企业详情
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
@GET("enterprise/getenterprisebyid/{enterpriseId}")
Observable<CompanyDetailBean> getCompanyDetail(@Path("enterpriseId") String page, @Header("token") String token);
//获取检查项
//industrycheckitem/listindustrycheckitem/{id}
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
@GET("industrycheckitem/listindustrycheckitem")
Observable<List<CheckOptionsbean>> getCheckOptionsList(@Query("id") String id, @Header("token") String token);
//保存检查结果
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
@POST("check/savecheck")
Observable<SuccessBean> doSaveOptions(@Body RequestBody leaveBody, @Header("token") String token);
//绑定企业
//enterpriseofgridoperator/saveenterpriseofgridoperator
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
@POST("enterpriseofgridoperator/saveenterpriseofgridoperator")
Observable<SuccessBean> doBindCompany(@Body RequestBody leaveBody, @Header("token") String token);
//解除绑定企业
//DELETE /app/enterpriseofgridoperator/removeenterpriseofgridoperator/{ids}
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
@DELETE("enterpriseofgridoperator/removeenterpriseofgridoperator/{ids}")
Observable<SuccessBean> doUnBindCompany(@Path("ids") String id, @Header("token") String token);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/shape_btn_nomal_gray" android:state_selected="true" />
<item android:drawable="@drawable/shape_btn_nomal_gray" android:state_pressed="true" />
<item android:drawable="@drawable/shape_btn_nomal_gray" android:state_enabled="false" />
<item android:drawable="@drawable/shape_btn_red_sel" android:state_selected="false" />
<item android:drawable="@drawable/shape_btn_red_sel" android:state_pressed="false" />
<item android:drawable="@drawable/shape_btn_red_sel" android:state_enabled="true" />
</selector>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/colorRedBg" />
<corners android:radius="6dp" />
<size
android:width="30dp"
android:height="20dp" />
</shape>

View 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="5dp" />
<!-- <solid android:color="@color/blue" />-->
<stroke
android:width="1dp"
android:color="@color/blue" />
</shape>

View File

@ -8,6 +8,44 @@
android:orientation="vertical"
tools:context=".activitys.issue.CheckOptionsActivity">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:cardCornerRadius="10dp"
app:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="false">
<LinearLayout
android:id="@+id/ll_company_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
android:padding="5dp">
<TextView
style="@style/company_name_title"
android:text="企业名称" />
<TextView
android:id="@+id/tv_name"
style="@style/company_content"
tools:text="企业名称企业名称企业名称企业名称企业名称" />
<TextView
style="@style/company_name_title"
android:text="主要负责人" />
<TextView
android:id="@+id/tv_peo"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.RecyclerView
android:id="@+id/rlv_options"

View File

@ -61,7 +61,7 @@
android:layout_height="wrap_content"
android:textColor="#ffffffff"
android:textSize="14sp"
tools:text="片长办(调度人员)" />
tools:text="部门" />
<TextView
android:id="@+id/tv_online"
@ -70,7 +70,7 @@
android:layout_marginTop="5dp"
android:textColor="@color/white"
android:textSize="13sp"
tools:text="(在线)" />
tools:text="职务" />
</LinearLayout>
<LinearLayout

View File

@ -71,6 +71,7 @@
android:text="企业名称" />
<TextView
android:id="@+id/tv_name"
style="@style/company_content"
tools:text="企业名称企业名称企业名称企业名称企业名称" />
@ -79,6 +80,7 @@
android:text="单位类型" />
<TextView
android:id="@+id/tv_type"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
@ -87,6 +89,7 @@
android:text="注册地址" />
<TextView
android:id="@+id/tv_re_address"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
@ -95,6 +98,7 @@
android:text="经营场所区域" />
<TextView
android:id="@+id/tv_place"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
@ -103,22 +107,7 @@
android:text="详细地址" />
<TextView
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
<TextView
style="@style/company_name_title"
android:text="企业名称" />
<TextView
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
<TextView
style="@style/company_name_title"
android:text="管理行业" />
<TextView
android:id="@+id/tv_det_address"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
@ -127,6 +116,7 @@
android:text="从业人员数量" />
<TextView
android:id="@+id/tv_peo_count"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
@ -135,6 +125,7 @@
android:text="风险特点" />
<TextView
android:id="@+id/tv_risk"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
@ -143,35 +134,39 @@
android:text="主要负责人" />
<TextView
android:id="@+id/tv_peo"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
<TextView
style="@style/company_name_title"
android:text="联系电话" />
<TextView
android:id="@+id/tv_phone"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
<TextView
style="@style/company_name_title"
android:text="厂区大门照片" />
<!-- <TextView-->
<!-- style="@style/company_name_title"-->
<!-- android:text="厂区大门照片" />-->
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<!-- <android.support.v7.widget.RecyclerView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content" />-->
<TextView
style="@style/company_name_title"
android:text="主要作业场所" />
<!-- <TextView-->
<!-- style="@style/company_name_title"-->
<!-- android:text="主要作业场所" />-->
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<!-- <android.support.v7.widget.RecyclerView-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content" />-->
</LinearLayout>
<TextView
android:id="@+id/tv_hint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
@ -193,6 +188,7 @@
android:padding="0dp">
<Button
android:id="@+id/btn_check"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@ -202,6 +198,7 @@
android:textSize="18sp" />
<Button
android:id="@+id/btn_uncheck"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"

View File

@ -86,7 +86,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:orientation="vertical">
android:orientation="vertical"
android:paddingBottom="20dp">
<LinearLayout
@ -138,6 +139,7 @@
android:layout_marginTop="10dp"
android:background="@drawable/sel_rectangle_btn_white_gray"
android:orientation="vertical"
android:visibility="gone"
android:padding="14dp">
<Switch
@ -168,6 +170,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:visibility="gone"
android:background="@drawable/sel_rectangle_btn_white_gray"
android:orientation="horizontal"
android:padding="14dp">
@ -189,6 +192,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/sel_rectangle_btn_white_gray"
android:visibility="gone"
android:orientation="horizontal"
android:padding="14dp">

View File

@ -4,33 +4,70 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:orientation="vertical"
android:padding="10dp">
<LinearLayout
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
android:gravity="center"
android:orientation="horizontal"
android:padding="10dp">
<TextView
android:id="@+id/tv_company_name"
android:layout_width="match_parent"
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="15sp"
tools:text="公司名称" />
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/tv_company_peo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="企业负责人:zhangsan" />
<TextView
android:id="@+id/tv_company_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="15sp"
tools:text="公司名称" />
<TextView
android:id="@+id/tv_company_peo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="企业负责人:zhangsan" />
<TextView
android:id="@+id/tv_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="地址" />
</LinearLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:id="@+id/btn_claim"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/sel_btn_submit"
android:text="认领\n企业"
android:textColor="@color/white" />
<Button
android:id="@+id/btn_unclaim"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/sel_btn_submit_red"
android:text="解除\n认领"
android:textColor="@color/white"
android:visibility="gone" />
</RelativeLayout>
</LinearLayout>
<Button
android:id="@+id/btn_claim"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="认领\n企业" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="3dp"
android:background="@color/gray_line" />
</LinearLayout>

View File

@ -1,9 +1,9 @@
<?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="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_margin="5dp"
android:orientation="vertical">
@ -47,6 +47,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:gravity="center_vertical"
android:orientation="vertical">
<RadioGroup
@ -69,16 +70,31 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="限期整改" />
<RadioButton
android:id="@+id/rb_coor"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="不配合" />
</RadioGroup>
<android.support.v7.widget.AppCompatSpinner
android:id="@+id/sp_term"
style="@style/common_spinner"
app:theme="@style/common_spinner"
android:layout_width="match_parent"
<LinearLayout
android:id="@+id/ll_sp"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:popupTheme="@style/common_spinner"
android:spinnerMode="dropdown" />
android:background="@drawable/sp_square_btn_blue_rim"
android:padding="2dp">
<android.support.v7.widget.AppCompatSpinner
android:id="@+id/sp_term"
style="@style/common_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:popupTheme="@style/common_spinner"
android:spinnerMode="dropdown"
app:theme="@style/common_spinner" />
</LinearLayout>
</LinearLayout>
<android.support.v7.widget.RecyclerView

View File

@ -53,7 +53,7 @@
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@color/black</item>
<item name="android:textSize">18sp</item>
<item name="android:textSize">15sp</item>
<item name="android:layout_marginTop">8dp</item>
</style>
@ -68,12 +68,12 @@
<style name="common_spinner">
<!--设置弹窗背景为 系统设置的 应用主色调 在application 的colorPrimay 中配置的颜色, actionBar toolbar 默认使用这个为背景颜色-->
<item name="android:popupBackground">@color/white</item>
<item name="android:layout_gravity">center</item>
<item name="android:gravity">center</item>
<item name="android:layout_width">wrap_content</item>
<item name="background">@drawable/sp_square_btn_blue_sel</item>
<item name="android:gravity">center</item>
<item name="android:layout_height">match_parent</item>
<!--设置 spinner 显示位置往下偏移 actionBarSize 的高度, 默认显示是直接显示在 Spinner 的选中项的上方-->
<item name="android:dropDownVerticalOffset">?attr/actionBarSize</item>
<item name="android:dropDownVerticalOffset">30dp</item>
<!--设置选中之后Item 的背景变换 设置背景为 灰色背景色-->
<item name="android:dropDownSelector">@color/gray</item>
<!--设置下拉框的 list 的样式, 主要是设置 分割线, 当然也可以设置下拉的 list 的背景颜色-->

View File

@ -10,8 +10,8 @@ import java.io.File;
* 描述 : 配置路由跳转的路径
*/
public class PathConfig {
// public static final String CITY_CODE_DEFAULT="321";//呼和浩特
public static final String CITY_CODE_DEFAULT="229";
// public static final String CITY_CODE_DEFAULT="321";//呼和浩特
public static final String CITY_CODE_DEFAULT = "229";
//=============================主页按钮模块类型===========================
public static final String MODULE_CALL = "call";
public static final String MODULE_PRISON = "prison";
@ -25,7 +25,7 @@ public class PathConfig {
public static final String MODULE_VISITOR = "visitor";
public static final String MODULE_PATROL = "patrol";
public static final String SECRET = "CMXX_TOKEN_INFOS";//秘钥
public static final String PROJECT_NAME = "locationReal";//TODO ===项目名称==
public static final String PROJECT_NAME = "YjReseau";//TODO ===项目名称==
public static final String ACTION_SYSTEM_MESSAGE = "com.sucstepsoft.hs.message";
public static final String ACTION_LOCATION_MESSAGE = "com.sucstepsoft.realtimelocation.MESSAGE_RECEIVED_ACTION";
public static final String ACTION_PUNCH_TIME_MESSAGE = "com.sucstepsoft.realtimelocation.MESSAGE_PUNCH_ACTION";
@ -37,7 +37,7 @@ public class PathConfig {
public static final String USER_TYPE_P = "e483f019-d971-49ac-b5fa-3314220da703";
public static final String USER_TYPE_N = "bc405346-8714-4ded-89ac-9cc4d755f66a";
public static final String USER_TYPE_X = "25affe67-134c-4a32-ba41-64b0cfedc782";
public static final String APP_VERSION_ID = "402e60d8-8270-4bb9-8850-83d30a39a53f";
public static final String APP_VERSION_ID = "cc0ef7f0-de0e-4e29-8428-534ab9f2494d";
//包头坐标 109.926934,40.574501
//呼市坐标 40.823879 111.771815
public static final double LA = 40.574501;

View File

@ -9,9 +9,8 @@ import com.sucstepsoft.cm_utils.constant.PathConfig;
*/
public class BaseUrlApi {
public static final String IP = "http://58.18.22.25:8081/";/* 正式IP */
// public static final String IP = "http://192.168.1.102:8002/";/* 本地测试IP */
// public static final String IP = "http://39.104.74.123:8083/";/* 测试IP */
// public static final String IP = "http://58.18.22.25:8081/";/* 正式IP */
public static final String IP = "http://192.168.0.113:7001/usercenter/";/* 测试IP */
public static final String PROJECT_NAME = "app/";
// public static final String BASE_URL = IP + PROJECT_NAME;
public static final String BASE_URL = IP + PROJECT_NAME;
@ -22,9 +21,9 @@ public class BaseUrlApi {
// http://39.104.74.123:8084/servicecity
public static final int PHOTO_REQUEST = 233;
public static final int CAMERA_REQUEST = 123;
public static final String BASE_IP = "http://58.18.22.25:8081/servicecity/";/* 正式IP */
// public static final String BASE_IP = "http://192.168.1.102:8084/servicecity/";/* 本地测试IP */
// public static final String BASE_IP = "http://39.104.74.123:8084/servicecity/";/* 测试IP */
// public static final String BASE_IP = "http://58.18.22.25:8081/servicecity/";/* 正式IP */
public static final String BASE_IP = "http://192.168.0.113:7006/inspection/";/* 测试IP */
// public static final String BASE_IP = "http://39.104.74.123:8084/servicecity/";/* 测试IP */
public static final String BASE_IMG_URL = BASE_IP + "route/file/downloadfile/true/";
public static final String SOCKET_IP = "192.168.1.149";

View File

@ -123,4 +123,12 @@ public class UserLgUtils {
public static boolean getAliasIsSeting() {
return SPUtils.getInstance(SP_USER_INFO).getBoolean("alias");
}
public static void setCheckRemember(boolean b) {
SPUtils.getInstance(SP_USER_INFO).put("rememberPwd", b);
}
public static boolean getCheckRemember() {
return SPUtils.getInstance(SP_USER_INFO).getBoolean("rememberPwd");
}
}