diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..70916f2 --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/release/yj-zs-10.apk b/app/release/yj-zs-10.apk new file mode 100644 index 0000000..8ec2dd6 Binary files /dev/null and b/app/release/yj-zs-10.apk differ diff --git a/app/release/yj-zs-11.apk b/app/release/yj-zs-11.apk new file mode 100644 index 0000000..1864d63 Binary files /dev/null and b/app/release/yj-zs-11.apk differ diff --git a/app/release/yj-zs-12.apk b/app/release/yj-zs-12.apk new file mode 100644 index 0000000..2afd571 Binary files /dev/null and b/app/release/yj-zs-12.apk differ diff --git a/app/release/yj-zs-13.apk b/app/release/yj-zs-13.apk new file mode 100644 index 0000000..ceead9b Binary files /dev/null and b/app/release/yj-zs-13.apk differ diff --git a/app/release/yj-zs-14.apk b/app/release/yj-zs-14.apk new file mode 100644 index 0000000..2aa1a74 Binary files /dev/null and b/app/release/yj-zs-14.apk differ diff --git a/app/release/yj-zs-15.apk b/app/release/yj-zs-15.apk new file mode 100644 index 0000000..b0328b9 Binary files /dev/null and b/app/release/yj-zs-15.apk differ diff --git a/app/release/yj-zs-16.apk b/app/release/yj-zs-16.apk new file mode 100644 index 0000000..5c3e6ce Binary files /dev/null and b/app/release/yj-zs-16.apk differ diff --git a/app/release/yj-zs-17.apk b/app/release/yj-zs-17.apk new file mode 100644 index 0000000..d29e1d5 Binary files /dev/null and b/app/release/yj-zs-17.apk differ diff --git a/app/release/yj-zs-5.apk b/app/release/yj-zs-5.apk new file mode 100644 index 0000000..690bd80 Binary files /dev/null and b/app/release/yj-zs-5.apk differ diff --git a/app/release/yj-zs-6.apk b/app/release/yj-zs-6.apk new file mode 100644 index 0000000..b858e68 Binary files /dev/null and b/app/release/yj-zs-6.apk differ diff --git a/app/release/yj-zs-7.apk b/app/release/yj-zs-7.apk new file mode 100644 index 0000000..00f94f9 Binary files /dev/null and b/app/release/yj-zs-7.apk differ diff --git a/app/release/yj-zs-8.apk b/app/release/yj-zs-8.apk new file mode 100644 index 0000000..b5cd2ba Binary files /dev/null and b/app/release/yj-zs-8.apk differ diff --git a/app/release/yj-zs-9.apk b/app/release/yj-zs-9.apk new file mode 100644 index 0000000..bd23f79 Binary files /dev/null and b/app/release/yj-zs-9.apk differ diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 7c61d46..391eaf0 100755 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -47,6 +47,22 @@ android:supportsRtl="true" android:theme="@style/AppTheme" tools:ignore="GoogleAppIndexingWarning"> + + + + mFuncs = new ArrayList<>(); - private String[] mBtnStrs = new String[]{"我的企业\n(新增企业)", "企业检查", "隐患复查", "我的任务", "公共区域", "法律法规", "企业地图", "钉钉"}; + private String[] mBtnStrs = new String[]{"我的企业\n(新增企业)", "企业检查", "隐患复查", "待办任务", "固定任务", "随机任务", "公共区域", "法律法规", "企业地图", "钉钉"}; // private String[] mBtnStrs = new String[]{"企业信息", "隐患上报", "隐患复查", "我的任务", "历史任务", "法律法规"}; private int[] mBtnIds = new int[]{R.drawable.ic_main_c_info, R.drawable.ic_main_report, R.drawable.ic_main_risk, + R.drawable.ic_law, R.drawable.ic_main_mine, R.drawable.ic_main_history, + R.drawable.ic_main_history, R.drawable.ic_main_law, R.drawable.ic_main_risk, R.drawable.ic_main_report}; @@ -179,6 +182,7 @@ public class MainActivity extends BaseActivity { } else { UserLgUtils.setIndustryId(""); } + UserLgUtils.setPersonType(girdPBean.getPersonType()); } @Override @@ -230,10 +234,13 @@ public class MainActivity extends BaseActivity { case "隐患复查": intent = new Intent(this, CounterCheckMainActivity.class); break; + case "待办任务"://各类待办任务 + intent = new Intent(this, TdTaskActivity.class); + break; case "法律法规": intent = new Intent(this, LawLibActivity.class); break; - case "我的任务": + case "固定任务": intent = new Intent(this, MineMissionActivity.class); break; case "历史任务": @@ -248,6 +255,9 @@ public class MainActivity extends BaseActivity { case "钉钉": intent = getPackageManager().getLaunchIntentForPackage("com.alibaba.android.rimet"); break; + case "随机任务": + intent = new Intent(this, MineMissionActivity.class); + break; } if (intent != null) { startActivity(intent); diff --git a/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/countercheck/CounterCheckMainActivity.java b/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/countercheck/CounterCheckMainActivity.java index da2a183..ff34be0 100644 --- a/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/countercheck/CounterCheckMainActivity.java +++ b/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/countercheck/CounterCheckMainActivity.java @@ -481,8 +481,8 @@ public class CounterCheckMainActivity extends BaseActivity { private void showDetail(CounterCheckListBean.RowsBean bean) { Intent intent = new Intent(mActivity, NewCounterCheckOptionsActivity.class); intent.putExtra("checkId", bean.getCheckId()); - intent.putExtra("name", bean.getNameJoinByEnterpriseId()); - intent.putExtra("peo", bean.getMasterJoinByEnterpriseId()); + intent.putExtra("name", bean.getEnterpriseName()); + intent.putExtra("peo", bean.getEnterpriseMaster()); intent.putExtra("enId", bean.getEnterpriseId()); startActivityForResult(intent, 123); } diff --git a/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/countercheck/NewCounterCheckOptionsActivity.java b/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/countercheck/NewCounterCheckOptionsActivity.java index 36ff96d..63a616a 100644 --- a/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/countercheck/NewCounterCheckOptionsActivity.java +++ b/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/countercheck/NewCounterCheckOptionsActivity.java @@ -53,6 +53,7 @@ import com.sucstepsoft.txrealtimelocation.beans.CounterCheckOptionsBean; import com.sucstepsoft.txrealtimelocation.beans.OptionsSubmitBean; import com.sucstepsoft.txrealtimelocation.beans.SuccessBean; import com.sucstepsoft.txrealtimelocation.net.LocationApiService; +import com.sucstepsoft.txrealtimelocation.utils.ExceptionHandler; import com.sucstepsoft.txrealtimelocation.widget.EmStateCheck; import java.io.File; @@ -926,7 +927,7 @@ public class NewCounterCheckOptionsActivity extends BaseActivity { @Override public void onError(Throwable e) { - ToastUtils.showShort("复查失败,请稍后重试"); + ExceptionHandler.handleException(e); mMProgressDialog.dismiss(); } diff --git a/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/issue/HistoryDetialActivity.java b/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/issue/HistoryDetialActivity.java index 0915fc7..84d1eac 100644 --- a/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/issue/HistoryDetialActivity.java +++ b/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/issue/HistoryDetialActivity.java @@ -1,5 +1,6 @@ package com.sucstepsoft.txrealtimelocation.activitys.issue; +import android.content.Intent; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.text.TextUtils; @@ -15,6 +16,7 @@ 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.trouble.CaseLogActivity; import com.sucstepsoft.txrealtimelocation.adapters.HistoryItemDetailAdapter; import com.sucstepsoft.txrealtimelocation.adapters.HistoryLeftCatalogAdapter; import com.sucstepsoft.txrealtimelocation.beans.CompanyDetailBean; @@ -72,6 +74,13 @@ public class HistoryDetialActivity extends BaseActivity { String enterpriseId = getIntent().getStringExtra("enterpriseId"); //让整改描述可以滑动 mTvContent.setMaxLineCount(3); + mTvPublish.setVisibility(View.VISIBLE); + mTvPublish.setText("日志"); + mTvPublish.setOnClickListener(v -> { + Intent intent = new Intent(mActivity, CaseLogActivity.class); + intent.putExtra("cId", cId); + startActivity(intent); + }); getDetail(cId); mCatalogBeans = new ArrayList<>(); getCompanyDetail(enterpriseId); @@ -113,6 +122,7 @@ public class HistoryDetialActivity extends BaseActivity { @Override public void onNext(CompanyDetailBean companyDetailBean) { if (companyDetailBean != null) { + mTvName.setText(companyDetailBean.getName()); if (TextUtils.isEmpty(companyDetailBean.getLegalPerson())) { if (TextUtils.isEmpty(companyDetailBean.getMaster())) { mTvP.setText("未录入"); @@ -153,7 +163,6 @@ public class HistoryDetialActivity extends BaseActivity { public void onNext(HistoryDetialBean beans) { if (beans != null) { refreshView(STATE_LOAD_SUCCESS); - mTvName.setText(beans.getNameJoinByEnterpriseId()); if (!TextUtils.isEmpty(beans.getSummary())) { mRlDesc.setVisibility(View.VISIBLE); mTvContent.setContent(beans.getSummary()); diff --git a/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/issue/HistoryListActivity.java b/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/issue/HistoryListActivity.java index 765fdac..fa0bb2d 100644 --- a/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/issue/HistoryListActivity.java +++ b/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/issue/HistoryListActivity.java @@ -195,20 +195,20 @@ public class HistoryListActivity extends BaseActivity { } private void showDetail(CounterCheckListBean.RowsBean rowsBean) { - if (rowsBean.getIsCoordination() == 0) { - //不配合 - ToastUtils.showShort("该企业不配合检查,已由上级单位处理"); - } else { - Intent intent = new Intent(mActivity, HistoryDetialActivity.class); - intent.putExtra("id", rowsBean.getIndustryJoinByEnterpriseId()); - intent.putExtra("enterpriseId", rowsBean.getEnterpriseId()); - intent.putExtra("cId", rowsBean.getCheckId()); - intent.putExtra("name", rowsBean.getNameJoinByEnterpriseId()); - intent.putExtra("peo", rowsBean.getMasterJoinByEnterpriseId()); - intent.putExtra("phone", rowsBean.getPhoneJoinByEnterpriseId()); - startActivity(intent); - } - +// if (rowsBean.getIsCoordination() == 0) { +// //不配合 +// ToastUtils.showShort("该企业不配合检查,已由上级单位处理"); +// } else { +// +// } + Intent intent = new Intent(mActivity, HistoryDetialActivity.class); + intent.putExtra("id", rowsBean.getEnterpriseIndustry()); + intent.putExtra("enterpriseId", rowsBean.getEnterpriseId()); + intent.putExtra("cId", rowsBean.getCheckId()); + intent.putExtra("name", rowsBean.getEnterpriseName()); + intent.putExtra("peo", rowsBean.getEnterpriseMaster()); + intent.putExtra("phone", rowsBean.getEnterprisePhone()); + startActivity(intent); } /** diff --git a/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/issue/NewCheckOptionsActivity.java b/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/issue/NewCheckOptionsActivity.java index b38bd65..e6fbee1 100644 --- a/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/issue/NewCheckOptionsActivity.java +++ b/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/issue/NewCheckOptionsActivity.java @@ -604,6 +604,7 @@ public class NewCheckOptionsActivity extends BaseActivity { @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { + LogUtils.e(requestCode + "===" + resultCode); if (resultCode == RESULT_OK) { switch (requestCode) { case BaseUrlApi.CAMERA_REQUEST://相机 diff --git a/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/trouble/CaseCheckOptionsActivity.java b/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/trouble/CaseCheckOptionsActivity.java new file mode 100644 index 0000000..e268a11 --- /dev/null +++ b/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/trouble/CaseCheckOptionsActivity.java @@ -0,0 +1,823 @@ +package com.sucstepsoft.txrealtimelocation.activitys.trouble; + +import android.app.ProgressDialog; +import android.content.Intent; +import android.support.v7.widget.LinearLayoutManager; +import android.support.v7.widget.RecyclerView; +import android.text.TextUtils; +import android.view.TextureView; +import android.view.View; +import android.widget.Button; +import android.widget.RelativeLayout; +import android.widget.TextView; + +import com.google.gson.Gson; +import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager; +import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity; +import com.sucstepsoft.cm_utils.core.widget.views.ButtomInputView; +import com.sucstepsoft.cm_utils.core.widget.views.CenterInputSelView; +import com.sucstepsoft.cm_utils.utils.LogUtils; +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.adapters.HistoryItemDetailAdapter; +import com.sucstepsoft.txrealtimelocation.adapters.HistoryLeftCatalogAdapter; +import com.sucstepsoft.txrealtimelocation.beans.CaseCompleteBean; +import com.sucstepsoft.txrealtimelocation.beans.CaseDetailBean; +import com.sucstepsoft.txrealtimelocation.beans.CompanyDetailBean; +import com.sucstepsoft.txrealtimelocation.beans.HistoryCatalogBean; +import com.sucstepsoft.txrealtimelocation.beans.HistoryDetialBean; +import com.sucstepsoft.txrealtimelocation.beans.SuccessBean; +import com.sucstepsoft.txrealtimelocation.net.LocationApiService; +import com.sucstepsoft.txrealtimelocation.utils.ExceptionHandler; +import com.sucstepsoft.txrealtimelocation.widget.StretchyTextView; + +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; +import okhttp3.MediaType; +import okhttp3.RequestBody; + +public class CaseCheckOptionsActivity extends BaseActivity { + public static final String GRID_GRID = "grid";//网格员 + public static final String GRID_STREET = "street";//乡镇街道管理员 + public static final String GRID_DISTRICT = "district";//旗县区管理员 + public static final String GRID_DISTRICT_DEPARTMENT = "districtDepartment";//旗县区委办局管理员 + public static final String GRID_CITY = "city";//市管理员 + + + @BindView(R.id.rlv_detail) + RecyclerView mRlvDetail; + @BindView(R.id.rlv_catalog) + RecyclerView mRlvCataLog; + @BindView(R.id.tv_name) + TextView mTvName; + @BindView(R.id.tv_peo) + TextView mTvP; + @BindView(R.id.tv_phone) + TextView mTvPhone; + @BindView(R.id.tv_content) + StretchyTextView mTvContent; + @BindView(R.id.rl_desc) + RelativeLayout mRlDesc; + @BindView(R.id.btn_superior) + Button mBtnSuperior; + @BindView(R.id.btn_complete) + Button mBtnComplete; + @BindView(R.id.btn_go_back) + Button mBtnGoBack; + private Unbinder mBind; + private List mRightDatas = new ArrayList<>(); + private Disposable mDis; + private List mCatalogBeans; + private HistoryLeftCatalogAdapter mLeftCatalogAdapter; + private HistoryItemDetailAdapter mRightAdapter; + private String mCId; + private String mPersonType; + + @Override + protected int setLayoutId() { + return R.layout.activity_case_check_options; + } + + @Override + public void initData() { + mBind = ButterKnife.bind(this); + mTvBaseTitle.setText("详情"); + refreshView(STATE_LOAD_LOADING); + mCId = getIntent().getStringExtra("checkId"); + String enterpriseId = getIntent().getStringExtra("enId"); + mTvPublish.setVisibility(View.VISIBLE); + mTvPublish.setText("日志"); + mTvPublish.setOnClickListener(v -> { + Intent intent = new Intent(mActivity, CaseLogActivity.class); + intent.putExtra("cId", mCId); + startActivity(intent); + }); + //让整改描述可以滑动 + mTvContent.setMaxLineCount(3); + getDetail(mCId); + mCatalogBeans = new ArrayList<>(); + getCompanyDetail(enterpriseId); + LinearLayoutManager leftManager = new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false); + LinearLayoutManager rightManager = new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false); + + + mLeftCatalogAdapter = new HistoryLeftCatalogAdapter(mActivity, mCatalogBeans); + mRightAdapter = new HistoryItemDetailAdapter(mActivity, mRightDatas); + + mRlvDetail.setLayoutManager(rightManager); + mRlvCataLog.setLayoutManager(leftManager); + + + mRlvDetail.setAdapter(mRightAdapter); + mRlvCataLog.setAdapter(mLeftCatalogAdapter); + mLeftCatalogAdapter.addNotifyChildChangeListener(child -> { + if (child != null && child.size() > 0) { + mRightDatas = child; + mRightAdapter.setData(mRightDatas); + } else { + LogUtils.e("暂无数据"); + } + }); + mPersonType = UserLgUtils.getPersonType(); + switch (mPersonType) { + case GRID_STREET://街道 + mBtnComplete.setVisibility(View.VISIBLE); + mBtnSuperior.setVisibility(View.VISIBLE); + mBtnGoBack.setVisibility(View.GONE); + break; + case GRID_DISTRICT://旗县区 + mBtnComplete.setVisibility(View.VISIBLE); + mBtnSuperior.setVisibility(View.VISIBLE); + mBtnGoBack.setVisibility(View.VISIBLE); + break; + case GRID_DISTRICT_DEPARTMENT://旗县区委办局 + case GRID_CITY://市 + mBtnComplete.setVisibility(View.VISIBLE); + mBtnSuperior.setVisibility(View.GONE); + mBtnGoBack.setVisibility(View.VISIBLE); + break; + } + //完成 + mBtnComplete.setOnClickListener(v -> showInputDialog("处理完成", 2)); + //上级 + mBtnSuperior.setOnClickListener(v -> { + switch (mPersonType) { + case GRID_STREET://街道 + showSelDialog(); + break; + case GRID_DISTRICT://旗县区 + showInputDialog("上报领导", 3); + break; + } + }); + //回退 + mBtnGoBack.setOnClickListener(v -> showInputDialog("任务回退", 1)); + } + + private void getCompanyDetail(String companyId) { + RetrofitManager.getInstance() + .create(LocationApiService.class) + .getCompanyDetail(companyId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(CompanyDetailBean companyDetailBean) { + if (companyDetailBean != null) { + if (TextUtils.isEmpty(companyDetailBean.getPhone())) { + mTvPhone.setText("未录入"); + } else { + mTvPhone.setText(companyDetailBean.getPhone()); + } + mTvName.setText(companyDetailBean.getName()); + if (TextUtils.isEmpty(companyDetailBean.getLegalPerson())) { + if (TextUtils.isEmpty(companyDetailBean.getMaster())) { + mTvP.setText("未录入"); + } else { + mTvP.setText(companyDetailBean.getMaster()); + } + } else { + mTvP.setText(companyDetailBean.getLegalPerson()); + } + } + } + + @Override + public void onError(Throwable e) { + + } + + @Override + public void onComplete() { + + } + }); + } + + private void getDetail(String cid) { + RetrofitManager.getInstance() + .create(LocationApiService.class) + .getMineCaseDetailById(cid, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + mDis = d; + } + + @Override + public void onNext(CaseDetailBean beans) { + if (beans != null) { + refreshView(STATE_LOAD_SUCCESS); + if (!TextUtils.isEmpty(beans.getSummary())) { + mRlDesc.setVisibility(View.VISIBLE); + mTvContent.setContent(beans.getSummary()); + } else { + mRlDesc.setVisibility(View.GONE); + } + if (beans.getCheckItems() != null && beans.getCheckItems().size() > 0) { + mRlvCataLog.setVisibility(View.VISIBLE); + buildDetailListData(beans.getCheckItems()); + } else { + ToastUtils.showShort("本次检查不存在合格项"); + mRlvCataLog.setVisibility(View.GONE); + } + } else { + refreshView(STATE_LOAD_EMPTY); + } + } + + @Override + public void onError(Throwable e) { + refreshView(STATE_LOAD_ERROR); + } + + @Override + public void onComplete() { + + } + }); + } + + + /** + * 带目录 + * + * @param checkItems + */ + private void buildDetailListData(List checkItems) { + //遍历判断是否是目录 + for (int i = 0; i < checkItems.size(); i++) { + if (checkItems.get(i).getCheckItemParentId().equals("0")) { + HistoryCatalogBean bean = new HistoryCatalogBean(); + bean.setTitle(checkItems.get(i).getName()); + bean.setItemId(checkItems.get(i).getCheckItemId()); + bean.setpId(checkItems.get(i).getCheckItemParentId()); + bean.setIcon(checkItems.get(i).getIcon()); + bean.setSelIcon(checkItems.get(i).getIconPress()); + bean.setTypeByCheckItemId(checkItems.get(i).getType()); + mCatalogBeans.add(bean); + } + } + for (int i = 0; i < mCatalogBeans.size(); i++) { + HistoryCatalogBean cBean = mCatalogBeans.get(i); + List items = new ArrayList<>(); + boolean isCheck = false; + for (int j = 0; j < checkItems.size(); j++) { + if (cBean.getItemId().equals(checkItems.get(j).getCheckItemParentId())) { + HistoryCatalogBean.ItemBean itemBean = new HistoryCatalogBean.ItemBean(); + itemBean.setName(checkItems.get(j).getName()); + itemBean.setCheckItemId(checkItems.get(j).getCheckItemId()); + itemBean.setScenePhotos(checkItems.get(j).getScenePhotos()); + List childs = new ArrayList<>(); + for (int k = 0; k < checkItems.get(j).getHiddenDangerReports().size(); k++) { + HistoryCatalogBean.ItemBeanChild child = new HistoryCatalogBean.ItemBeanChild(); + CaseDetailBean.CheckItemsBean.HiddenDangerReportsBean hiddenDangerReportsBean = checkItems.get(j).getHiddenDangerReports().get(k); + child.setScenePhotos(hiddenDangerReportsBean.getScenePhotos()); + child.setCheckResult(hiddenDangerReportsBean.getCheckResult()); + child.setUnitJoinByCheckItemId(hiddenDangerReportsBean.getUnitJoinByCheckItemId()); + child.setNameJoinByCheckItemId(hiddenDangerReportsBean.getNameJoinByCheckItemId()); + child.setCheckItemType(hiddenDangerReportsBean.getCheckItemType()); + child.setIsWrongJoinByCheckItemId(hiddenDangerReportsBean.getIsWrongJoinByCheckItemId()); + childs.add(child); + } + itemBean.setChild(childs); + items.add(itemBean); + } else if (cBean.getpId().equals("0") && cBean.getTypeByCheckItemId() == 2 && cBean.getItemId().equals(checkItems.get(j).getCheckItemId())) { + HistoryCatalogBean.ItemBean itemBean = new HistoryCatalogBean.ItemBean(); + itemBean.setName(checkItems.get(j).getName()); + itemBean.setCheckItemId(checkItems.get(j).getCheckItemId()); + itemBean.setScenePhotos(checkItems.get(j).getScenePhotos()); + List childs = new ArrayList<>(); + for (int k = 0; k < checkItems.get(j).getHiddenDangerReports().size(); k++) { + HistoryCatalogBean.ItemBeanChild child = new HistoryCatalogBean.ItemBeanChild(); + CaseDetailBean.CheckItemsBean.HiddenDangerReportsBean hiddenDangerReportsBean = checkItems.get(j).getHiddenDangerReports().get(k); + child.setScenePhotos(hiddenDangerReportsBean.getScenePhotos()); + child.setCheckResult(hiddenDangerReportsBean.getCheckResult()); + child.setUnitJoinByCheckItemId(hiddenDangerReportsBean.getUnitJoinByCheckItemId()); + child.setNameJoinByCheckItemId(hiddenDangerReportsBean.getNameJoinByCheckItemId()); + child.setIsWrongJoinByCheckItemId(hiddenDangerReportsBean.getIsWrongJoinByCheckItemId()); + child.setCheckItemType(hiddenDangerReportsBean.getCheckItemType()); + childs.add(child); + } + itemBean.setChild(childs); + items.add(itemBean); + } else { + + } + } + for (int j = 0; j < items.size(); j++) { + HistoryCatalogBean.ItemBean itemBean = items.get(j); + for (int k = 0; k < itemBean.getChild().size(); k++) { + HistoryCatalogBean.ItemBeanChild child = itemBean.getChild().get(k); + if (child.getIsWrongJoinByCheckItemId() == 1) { + isCheck = true; + break; + } + } + } + cBean.setCheck(isCheck); + cBean.setOptions(items); + } + mRightDatas = mCatalogBeans.get(0).getOptions(); + mRightAdapter.setData(mRightDatas); + mLeftCatalogAdapter.setData(mCatalogBeans); + } + + /** + * 显示输入框dialog + * 1 回退 + * 2 完成 + * 3 领导 + */ + private void showInputDialog(String title, int type) { + ButtomInputView inputView = new ButtomInputView.DialogBuilder(mActivity).build(); + inputView.addOnChoseListener(() -> { + String desc = inputView.mEtText.getText().toString().trim(); + if (TextUtils.isEmpty(desc)) { + ToastUtils.showShort("请输入描述"); + } else { + inputView.dismiss(); + switch (mPersonType) { + case GRID_STREET://街道 + doComplete(desc); + break; + case GRID_DISTRICT://旗县区 + if (type == 1) { + doBackDistrict(desc); + } else if (type == 2) { + doCompleteDistrict(desc); + } else if (type == 3) { + doDistrictLeader(desc); + } + break; + case GRID_DISTRICT_DEPARTMENT://旗县区委办局 + if (type == 1) { + doBackDistrictDepartment(desc); + } else if (type == 2) { + doCompleteDistrictDepartment(desc); + } + break; + case GRID_CITY://市 + if (type == 1) { + doBackCity(desc); + } else if (type == 2) { + doCompleteCity(desc); + } + break; + } + + } + }); + inputView.show(); + inputView.setTitle(title); + } + + /** + * 旗县区上报领导 + */ + private void doDistrictLeader(String desc) { + ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中..."); + dialog.show(); + CaseCompleteBean bea = new CaseCompleteBean(); + bea.setSummary(desc); + Gson gson = new Gson(); + String obj = gson.toJson(bea); + RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj); + RetrofitManager.getInstance() + .create(LocationApiService.class) + .doDistrictCaseToLeader(body, mCId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(SuccessBean successBean) { + dialog.dismiss(); + ToastUtils.showShort("处理完成"); + setResult(223); + finish(); + } + + @Override + public void onError(Throwable e) { + dialog.dismiss(); + ExceptionHandler.handleException(e); + } + + @Override + public void onComplete() { + + } + }); + } + + /** + * 旗县区完成 + */ + private void doCompleteDistrict(String desc) { + ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中..."); + dialog.show(); + CaseCompleteBean bea = new CaseCompleteBean(); + bea.setSummary(desc); + Gson gson = new Gson(); + String obj = gson.toJson(bea); + RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj); + RetrofitManager.getInstance() + .create(LocationApiService.class) + .doDistrictCaseComplete(body, mCId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(SuccessBean successBean) { + dialog.dismiss(); + ToastUtils.showShort("处理完成"); + setResult(223); + finish(); + } + + @Override + public void onError(Throwable e) { + dialog.dismiss(); + ExceptionHandler.handleException(e); + } + + @Override + public void onComplete() { + + } + }); + } + + /** + * 旗县区回退 + */ + private void doBackDistrict(String desc) { + ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中..."); + dialog.show(); + CaseCompleteBean bea = new CaseCompleteBean(); + bea.setSummary(desc); + Gson gson = new Gson(); + String obj = gson.toJson(bea); + RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj); + RetrofitManager.getInstance() + .create(LocationApiService.class) + .doDistrictCaseBack(body, mCId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(SuccessBean successBean) { + dialog.dismiss(); + ToastUtils.showShort("处理完成"); + setResult(223); + finish(); + } + + @Override + public void onError(Throwable e) { + dialog.dismiss(); + ExceptionHandler.handleException(e); + } + + @Override + public void onComplete() { + + } + }); + } + + /** + * 显示上级处理dialog + */ + private void showSelDialog() { + CenterInputSelView selView = new CenterInputSelView.DialogBuilder(mActivity).build(); + + selView.addOnChoseListener(() -> { + if (TextUtils.isEmpty(selView.mSelType)) { + ToastUtils.showShort("请选择处理领导"); + return; + } + //判断是否是旗县区领导 + if ("district".equals(selView.mSelType) && TextUtils.isEmpty(selView.mSelPersonId)) { + ToastUtils.showShort("请选择处理人员"); + return; + } + String desc = selView.mEtText.getText().toString().trim(); + if (TextUtils.isEmpty(desc)) { + ToastUtils.showShort("请输入描述信息"); + return; + } + selView.dismiss(); + doSuperiorDispose(selView.mSelType, selView.mSelPersonId, desc); + }); + selView.show(); + selView.setTitle("上级处理"); + } + + /** + * 街道上级处理 + */ + private void doSuperiorDispose(String type, String pId, String desc) { + ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中..."); + dialog.show(); + CaseCompleteBean bea = new CaseCompleteBean(); + bea.setSummary(desc); + bea.setLeaderType(type); + if ("district".equals(type)) { + bea.setLeaderId(pId); + } + Gson gson = new Gson(); + String obj = gson.toJson(bea); + RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj); + RetrofitManager.getInstance() + .create(LocationApiService.class) + .doSuperiorCaseStreet(body, mCId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(SuccessBean successBean) { + dialog.dismiss(); + ToastUtils.showShort("处理完成"); + setResult(223); + finish(); + } + + @Override + public void onError(Throwable e) { + dialog.dismiss(); + ExceptionHandler.handleException(e); + } + + @Override + public void onComplete() { + + } + }); + } + + + /** + * 旗县区委办局回退 + */ + private void doBackDistrictDepartment(String desc) { + ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中..."); + dialog.show(); + CaseCompleteBean bea = new CaseCompleteBean(); + bea.setSummary(desc); + Gson gson = new Gson(); + String obj = gson.toJson(bea); + RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj); + RetrofitManager.getInstance() + .create(LocationApiService.class) + .doDistrictDepartmentCaseBack(body, mCId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(SuccessBean successBean) { + dialog.dismiss(); + ToastUtils.showShort("处理完成"); + setResult(223); + finish(); + } + + @Override + public void onError(Throwable e) { + dialog.dismiss(); + ExceptionHandler.handleException(e); + } + + @Override + public void onComplete() { + + } + }); + } + + + /** + * 市回退 + */ + private void doBackCity(String desc) { + ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中..."); + dialog.show(); + CaseCompleteBean bea = new CaseCompleteBean(); + bea.setSummary(desc); + Gson gson = new Gson(); + String obj = gson.toJson(bea); + RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj); + RetrofitManager.getInstance() + .create(LocationApiService.class) + .doCityCaseBack(body, mCId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(SuccessBean successBean) { + dialog.dismiss(); + ToastUtils.showShort("处理完成"); + setResult(223); + finish(); + } + + @Override + public void onError(Throwable e) { + dialog.dismiss(); + ExceptionHandler.handleException(e); + } + + @Override + public void onComplete() { + + } + }); + } + + /** + * 市完成 + */ + private void doCompleteCity(String desc) { + ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中..."); + dialog.show(); + CaseCompleteBean bea = new CaseCompleteBean(); + bea.setSummary(desc); + Gson gson = new Gson(); + String obj = gson.toJson(bea); + RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj); + RetrofitManager.getInstance() + .create(LocationApiService.class) + .doCityCaseComplete(body, mCId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(SuccessBean successBean) { + dialog.dismiss(); + ToastUtils.showShort("处理完成"); + setResult(223); + finish(); + } + + @Override + public void onError(Throwable e) { + dialog.dismiss(); + ExceptionHandler.handleException(e); + } + + @Override + public void onComplete() { + + } + }); + } + + /** + * 旗县区委办局 + */ + private void doCompleteDistrictDepartment(String desc) { + ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中..."); + dialog.show(); + CaseCompleteBean bea = new CaseCompleteBean(); + bea.setSummary(desc); + Gson gson = new Gson(); + String obj = gson.toJson(bea); + RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj); + RetrofitManager.getInstance() + .create(LocationApiService.class) + .doDistrictDepartmentCaseComplete(body, mCId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(SuccessBean successBean) { + dialog.dismiss(); + ToastUtils.showShort("处理完成"); + setResult(223); + finish(); + } + + @Override + public void onError(Throwable e) { + dialog.dismiss(); + ExceptionHandler.handleException(e); + } + + @Override + public void onComplete() { + + } + }); + } + + /** + * 街道提交处理完成 + * + * @param desc + */ + private void doComplete(String desc) { + ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中..."); + dialog.show(); + CaseCompleteBean bea = new CaseCompleteBean(); + bea.setSummary(desc); + Gson gson = new Gson(); + String obj = gson.toJson(bea); + RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj); + RetrofitManager.getInstance() + .create(LocationApiService.class) + .doCompleteCaseStreet(body, mCId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(SuccessBean successBean) { + dialog.dismiss(); + ToastUtils.showShort("处理完成"); + setResult(223); + finish(); + } + + @Override + public void onError(Throwable e) { + dialog.dismiss(); + ExceptionHandler.handleException(e); + } + + @Override + public void onComplete() { + + } + }); + } + + @Override + protected void onDestroy() { + super.onDestroy(); + if (mDis != null && !mDis.isDisposed()) { + mDis.dispose(); + } + mBind.unbind(); + } +} diff --git a/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/trouble/CaseCheckOptionsDetailActivity.java b/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/trouble/CaseCheckOptionsDetailActivity.java new file mode 100644 index 0000000..292f623 --- /dev/null +++ b/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/trouble/CaseCheckOptionsDetailActivity.java @@ -0,0 +1,811 @@ +package com.sucstepsoft.txrealtimelocation.activitys.trouble; + +import android.app.ProgressDialog; +import android.content.Intent; +import android.support.v7.widget.LinearLayoutManager; +import android.support.v7.widget.RecyclerView; +import android.text.TextUtils; +import android.view.View; +import android.widget.Button; +import android.widget.RelativeLayout; +import android.widget.TextView; + +import com.google.gson.Gson; +import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager; +import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity; +import com.sucstepsoft.cm_utils.core.widget.views.ButtomInputView; +import com.sucstepsoft.cm_utils.core.widget.views.CenterInputSelView; +import com.sucstepsoft.cm_utils.utils.LogUtils; +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.adapters.HistoryItemDetailAdapter; +import com.sucstepsoft.txrealtimelocation.adapters.HistoryLeftCatalogAdapter; +import com.sucstepsoft.txrealtimelocation.beans.CaseCompleteBean; +import com.sucstepsoft.txrealtimelocation.beans.CaseDetailBean; +import com.sucstepsoft.txrealtimelocation.beans.CompanyDetailBean; +import com.sucstepsoft.txrealtimelocation.beans.HistoryCatalogBean; +import com.sucstepsoft.txrealtimelocation.beans.SuccessBean; +import com.sucstepsoft.txrealtimelocation.net.LocationApiService; +import com.sucstepsoft.txrealtimelocation.utils.ExceptionHandler; +import com.sucstepsoft.txrealtimelocation.widget.StretchyTextView; + +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; +import okhttp3.MediaType; +import okhttp3.RequestBody; + +public class CaseCheckOptionsDetailActivity extends BaseActivity { + public static final String GRID_GRID = "grid";//网格员 + public static final String GRID_STREET = "street";//乡镇街道管理员 + public static final String GRID_DISTRICT = "district";//旗县区管理员 + public static final String GRID_DISTRICT_DEPARTMENT = "districtDepartment";//旗县区委办局管理员 + public static final String GRID_CITY = "city";//市管理员 + + + @BindView(R.id.rlv_detail) + RecyclerView mRlvDetail; + @BindView(R.id.rlv_catalog) + RecyclerView mRlvCataLog; + @BindView(R.id.tv_name) + TextView mTvName; + @BindView(R.id.tv_peo) + TextView mTvP; + @BindView(R.id.tv_phone) + TextView mTvPhone; + private Unbinder mBind; + private List mRightDatas = new ArrayList<>(); + private Disposable mDis; + private List mCatalogBeans; + private HistoryLeftCatalogAdapter mLeftCatalogAdapter; + private HistoryItemDetailAdapter mRightAdapter; + private String mCId; + private String mPersonType; + + @Override + protected int setLayoutId() { + return R.layout.activity_case_check_options_detail; + } + + @Override + public void initData() { + mBind = ButterKnife.bind(this); + mTvBaseTitle.setText("详情"); + refreshView(STATE_LOAD_LOADING); + mCId = getIntent().getStringExtra("checkId"); + String enterpriseId = getIntent().getStringExtra("enId"); + mTvPublish.setVisibility(View.VISIBLE); + mTvPublish.setText("日志"); + mTvPublish.setOnClickListener(v -> { + Intent intent = new Intent(mActivity, CaseLogActivity.class); + intent.putExtra("cId", mCId); + startActivity(intent); + }); + //让整改描述可以滑动 +// mTvContent.setMaxLineCount(3); + getDetail(mCId); + mCatalogBeans = new ArrayList<>(); + getCompanyDetail(enterpriseId); + LinearLayoutManager leftManager = new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false); + LinearLayoutManager rightManager = new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false); + + + mLeftCatalogAdapter = new HistoryLeftCatalogAdapter(mActivity, mCatalogBeans); + mRightAdapter = new HistoryItemDetailAdapter(mActivity, mRightDatas); + + mRlvDetail.setLayoutManager(rightManager); + mRlvCataLog.setLayoutManager(leftManager); + + + mRlvDetail.setAdapter(mRightAdapter); + mRlvCataLog.setAdapter(mLeftCatalogAdapter); + mLeftCatalogAdapter.addNotifyChildChangeListener(child -> { + if (child != null && child.size() > 0) { + mRightDatas = child; + mRightAdapter.setData(mRightDatas); + } else { + LogUtils.e("暂无数据"); + } + }); + mPersonType = UserLgUtils.getPersonType(); +// switch (mPersonType) { +// case GRID_STREET://街道 +// mBtnComplete.setVisibility(View.VISIBLE); +// mBtnSuperior.setVisibility(View.VISIBLE); +// mBtnGoBack.setVisibility(View.GONE); +// break; +// case GRID_DISTRICT://旗县区 +// mBtnComplete.setVisibility(View.VISIBLE); +// mBtnSuperior.setVisibility(View.VISIBLE); +// mBtnGoBack.setVisibility(View.VISIBLE); +// break; +// case GRID_DISTRICT_DEPARTMENT://旗县区委办局 +// case GRID_CITY://市 +// mBtnComplete.setVisibility(View.VISIBLE); +// mBtnSuperior.setVisibility(View.GONE); +// mBtnGoBack.setVisibility(View.VISIBLE); +// break; +// } +// //完成 +// mBtnComplete.setOnClickListener(v -> showInputDialog("处理完成", 2)); +// //上级 +// mBtnSuperior.setOnClickListener(v -> { +// switch (mPersonType) { +// case GRID_STREET://街道 +// showSelDialog(); +// break; +// case GRID_DISTRICT://旗县区 +// showInputDialog("上报领导", 3); +// break; +// } +// }); +// //回退 +// mBtnGoBack.setOnClickListener(v -> showInputDialog("任务回退", 1)); + } + + private void getCompanyDetail(String companyId) { + RetrofitManager.getInstance() + .create(LocationApiService.class) + .getCompanyDetail(companyId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(CompanyDetailBean companyDetailBean) { + if (companyDetailBean != null) { + if (TextUtils.isEmpty(companyDetailBean.getPhone())) { + mTvPhone.setText("未录入"); + } else { + mTvPhone.setText(companyDetailBean.getPhone()); + } + mTvName.setText(companyDetailBean.getName()); + if (TextUtils.isEmpty(companyDetailBean.getLegalPerson())) { + if (TextUtils.isEmpty(companyDetailBean.getMaster())) { + mTvP.setText("未录入"); + } else { + mTvP.setText(companyDetailBean.getMaster()); + } + } else { + mTvP.setText(companyDetailBean.getLegalPerson()); + } + } + } + + @Override + public void onError(Throwable e) { + + } + + @Override + public void onComplete() { + + } + }); + } + + private void getDetail(String cid) { + RetrofitManager.getInstance() + .create(LocationApiService.class) + .getMineCaseDetailById(cid, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + mDis = d; + } + + @Override + public void onNext(CaseDetailBean beans) { + if (beans != null) { + refreshView(STATE_LOAD_SUCCESS); +// if (!TextUtils.isEmpty(beans.getSummary())) { +// mRlDesc.setVisibility(View.VISIBLE); +//// mTvContent.setContent(beans.getSummary()); +// } else { +// mRlDesc.setVisibility(View.GONE); +// } + if (beans.getCheckItems() != null && beans.getCheckItems().size() > 0) { + mRlvCataLog.setVisibility(View.VISIBLE); + buildDetailListData(beans.getCheckItems()); + } else { + ToastUtils.showShort("本次检查不存在合格项"); + mRlvCataLog.setVisibility(View.GONE); + } + } else { + refreshView(STATE_LOAD_EMPTY); + } + } + + @Override + public void onError(Throwable e) { + refreshView(STATE_LOAD_ERROR); + } + + @Override + public void onComplete() { + + } + }); + } + + + /** + * 带目录 + * + * @param checkItems + */ + private void buildDetailListData(List checkItems) { + //遍历判断是否是目录 + for (int i = 0; i < checkItems.size(); i++) { + if (checkItems.get(i).getCheckItemParentId().equals("0")) { + HistoryCatalogBean bean = new HistoryCatalogBean(); + bean.setTitle(checkItems.get(i).getName()); + bean.setItemId(checkItems.get(i).getCheckItemId()); + bean.setpId(checkItems.get(i).getCheckItemParentId()); + bean.setIcon(checkItems.get(i).getIcon()); + bean.setSelIcon(checkItems.get(i).getIconPress()); + bean.setTypeByCheckItemId(checkItems.get(i).getType()); + mCatalogBeans.add(bean); + } + } + for (int i = 0; i < mCatalogBeans.size(); i++) { + HistoryCatalogBean cBean = mCatalogBeans.get(i); + List items = new ArrayList<>(); + boolean isCheck = false; + for (int j = 0; j < checkItems.size(); j++) { + if (cBean.getItemId().equals(checkItems.get(j).getCheckItemParentId())) { + HistoryCatalogBean.ItemBean itemBean = new HistoryCatalogBean.ItemBean(); + itemBean.setName(checkItems.get(j).getName()); + itemBean.setCheckItemId(checkItems.get(j).getCheckItemId()); + itemBean.setScenePhotos(checkItems.get(j).getScenePhotos()); + List childs = new ArrayList<>(); + for (int k = 0; k < checkItems.get(j).getHiddenDangerReports().size(); k++) { + HistoryCatalogBean.ItemBeanChild child = new HistoryCatalogBean.ItemBeanChild(); + CaseDetailBean.CheckItemsBean.HiddenDangerReportsBean hiddenDangerReportsBean = checkItems.get(j).getHiddenDangerReports().get(k); + child.setScenePhotos(hiddenDangerReportsBean.getScenePhotos()); + child.setCheckResult(hiddenDangerReportsBean.getCheckResult()); + child.setUnitJoinByCheckItemId(hiddenDangerReportsBean.getUnitJoinByCheckItemId()); + child.setNameJoinByCheckItemId(hiddenDangerReportsBean.getNameJoinByCheckItemId()); + child.setCheckItemType(hiddenDangerReportsBean.getCheckItemType()); + child.setIsWrongJoinByCheckItemId(hiddenDangerReportsBean.getIsWrongJoinByCheckItemId()); + childs.add(child); + } + itemBean.setChild(childs); + items.add(itemBean); + } else if (cBean.getpId().equals("0") && cBean.getTypeByCheckItemId() == 2 && cBean.getItemId().equals(checkItems.get(j).getCheckItemId())) { + HistoryCatalogBean.ItemBean itemBean = new HistoryCatalogBean.ItemBean(); + itemBean.setName(checkItems.get(j).getName()); + itemBean.setCheckItemId(checkItems.get(j).getCheckItemId()); + itemBean.setScenePhotos(checkItems.get(j).getScenePhotos()); + List childs = new ArrayList<>(); + for (int k = 0; k < checkItems.get(j).getHiddenDangerReports().size(); k++) { + HistoryCatalogBean.ItemBeanChild child = new HistoryCatalogBean.ItemBeanChild(); + CaseDetailBean.CheckItemsBean.HiddenDangerReportsBean hiddenDangerReportsBean = checkItems.get(j).getHiddenDangerReports().get(k); + child.setScenePhotos(hiddenDangerReportsBean.getScenePhotos()); + child.setCheckResult(hiddenDangerReportsBean.getCheckResult()); + child.setUnitJoinByCheckItemId(hiddenDangerReportsBean.getUnitJoinByCheckItemId()); + child.setNameJoinByCheckItemId(hiddenDangerReportsBean.getNameJoinByCheckItemId()); + child.setIsWrongJoinByCheckItemId(hiddenDangerReportsBean.getIsWrongJoinByCheckItemId()); + child.setCheckItemType(hiddenDangerReportsBean.getCheckItemType()); + childs.add(child); + } + itemBean.setChild(childs); + items.add(itemBean); + } else { + + } + } + for (int j = 0; j < items.size(); j++) { + HistoryCatalogBean.ItemBean itemBean = items.get(j); + for (int k = 0; k < itemBean.getChild().size(); k++) { + HistoryCatalogBean.ItemBeanChild child = itemBean.getChild().get(k); + if (child.getIsWrongJoinByCheckItemId() == 1) { + isCheck = true; + break; + } + } + } + cBean.setCheck(isCheck); + cBean.setOptions(items); + } + mRightDatas = mCatalogBeans.get(0).getOptions(); + mRightAdapter.setData(mRightDatas); + mLeftCatalogAdapter.setData(mCatalogBeans); + } + + /** + * 显示输入框dialog + * 1 回退 + * 2 完成 + * 3 领导 + */ + private void showInputDialog(String title, int type) { + ButtomInputView inputView = new ButtomInputView.DialogBuilder(mActivity).build(); + inputView.addOnChoseListener(() -> { + String desc = inputView.mEtText.getText().toString().trim(); + if (TextUtils.isEmpty(desc)) { + ToastUtils.showShort("请输入描述"); + } else { + inputView.dismiss(); + switch (mPersonType) { + case GRID_STREET://街道 + doComplete(desc); + break; + case GRID_DISTRICT://旗县区 + if (type == 1) { + doBackDistrict(desc); + } else if (type == 2) { + doCompleteDistrict(desc); + } else if (type == 3) { + doDistrictLeader(desc); + } + break; + case GRID_DISTRICT_DEPARTMENT://旗县区委办局 + if (type == 1) { + doBackDistrictDepartment(desc); + } else if (type == 2) { + doCompleteDistrictDepartment(desc); + } + break; + case GRID_CITY://市 + if (type == 1) { + doBackCity(desc); + } else if (type == 2) { + doCompleteCity(desc); + } + break; + } + + } + }); + inputView.show(); + inputView.setTitle(title); + } + + /** + * 旗县区上报领导 + */ + private void doDistrictLeader(String desc) { + ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中..."); + dialog.show(); + CaseCompleteBean bea = new CaseCompleteBean(); + bea.setSummary(desc); + Gson gson = new Gson(); + String obj = gson.toJson(bea); + RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj); + RetrofitManager.getInstance() + .create(LocationApiService.class) + .doDistrictCaseToLeader(body, mCId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(SuccessBean successBean) { + dialog.dismiss(); + ToastUtils.showShort("处理完成"); + setResult(223); + finish(); + } + + @Override + public void onError(Throwable e) { + dialog.dismiss(); + ExceptionHandler.handleException(e); + } + + @Override + public void onComplete() { + + } + }); + } + + /** + * 旗县区完成 + */ + private void doCompleteDistrict(String desc) { + ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中..."); + dialog.show(); + CaseCompleteBean bea = new CaseCompleteBean(); + bea.setSummary(desc); + Gson gson = new Gson(); + String obj = gson.toJson(bea); + RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj); + RetrofitManager.getInstance() + .create(LocationApiService.class) + .doDistrictCaseComplete(body, mCId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(SuccessBean successBean) { + dialog.dismiss(); + ToastUtils.showShort("处理完成"); + setResult(223); + finish(); + } + + @Override + public void onError(Throwable e) { + dialog.dismiss(); + ExceptionHandler.handleException(e); + } + + @Override + public void onComplete() { + + } + }); + } + + /** + * 旗县区回退 + */ + private void doBackDistrict(String desc) { + ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中..."); + dialog.show(); + CaseCompleteBean bea = new CaseCompleteBean(); + bea.setSummary(desc); + Gson gson = new Gson(); + String obj = gson.toJson(bea); + RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj); + RetrofitManager.getInstance() + .create(LocationApiService.class) + .doDistrictCaseBack(body, mCId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(SuccessBean successBean) { + dialog.dismiss(); + ToastUtils.showShort("处理完成"); + setResult(223); + finish(); + } + + @Override + public void onError(Throwable e) { + dialog.dismiss(); + ExceptionHandler.handleException(e); + } + + @Override + public void onComplete() { + + } + }); + } + + /** + * 显示上级处理dialog + */ + private void showSelDialog() { + CenterInputSelView selView = new CenterInputSelView.DialogBuilder(mActivity).build(); + + selView.addOnChoseListener(() -> { + if (TextUtils.isEmpty(selView.mSelType)) { + ToastUtils.showShort("请选择处理领导"); + return; + } + //判断是否是旗县区领导 + if ("district".equals(selView.mSelType) && TextUtils.isEmpty(selView.mSelPersonId)) { + ToastUtils.showShort("请选择处理人员"); + return; + } + String desc = selView.mEtText.getText().toString().trim(); + if (TextUtils.isEmpty(desc)) { + ToastUtils.showShort("请输入描述信息"); + return; + } + selView.dismiss(); + doSuperiorDispose(selView.mSelType, selView.mSelPersonId, desc); + }); + selView.show(); + selView.setTitle("上级处理"); + } + + /** + * 街道上级处理 + */ + private void doSuperiorDispose(String type, String pId, String desc) { + ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中..."); + dialog.show(); + CaseCompleteBean bea = new CaseCompleteBean(); + bea.setSummary(desc); + bea.setLeaderType(type); + if ("district".equals(type)) { + bea.setLeaderId(pId); + } + Gson gson = new Gson(); + String obj = gson.toJson(bea); + RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj); + RetrofitManager.getInstance() + .create(LocationApiService.class) + .doSuperiorCaseStreet(body, mCId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(SuccessBean successBean) { + dialog.dismiss(); + ToastUtils.showShort("处理完成"); + setResult(223); + finish(); + } + + @Override + public void onError(Throwable e) { + dialog.dismiss(); + ExceptionHandler.handleException(e); + } + + @Override + public void onComplete() { + + } + }); + } + + + /** + * 旗县区委办局回退 + */ + private void doBackDistrictDepartment(String desc) { + ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中..."); + dialog.show(); + CaseCompleteBean bea = new CaseCompleteBean(); + bea.setSummary(desc); + Gson gson = new Gson(); + String obj = gson.toJson(bea); + RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj); + RetrofitManager.getInstance() + .create(LocationApiService.class) + .doDistrictDepartmentCaseBack(body, mCId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(SuccessBean successBean) { + dialog.dismiss(); + ToastUtils.showShort("处理完成"); + setResult(223); + finish(); + } + + @Override + public void onError(Throwable e) { + dialog.dismiss(); + ExceptionHandler.handleException(e); + } + + @Override + public void onComplete() { + + } + }); + } + + + /** + * 市回退 + */ + private void doBackCity(String desc) { + ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中..."); + dialog.show(); + CaseCompleteBean bea = new CaseCompleteBean(); + bea.setSummary(desc); + Gson gson = new Gson(); + String obj = gson.toJson(bea); + RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj); + RetrofitManager.getInstance() + .create(LocationApiService.class) + .doCityCaseBack(body, mCId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(SuccessBean successBean) { + dialog.dismiss(); + ToastUtils.showShort("处理完成"); + setResult(223); + finish(); + } + + @Override + public void onError(Throwable e) { + dialog.dismiss(); + ExceptionHandler.handleException(e); + } + + @Override + public void onComplete() { + + } + }); + } + + /** + * 市完成 + */ + private void doCompleteCity(String desc) { + ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中..."); + dialog.show(); + CaseCompleteBean bea = new CaseCompleteBean(); + bea.setSummary(desc); + Gson gson = new Gson(); + String obj = gson.toJson(bea); + RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj); + RetrofitManager.getInstance() + .create(LocationApiService.class) + .doCityCaseComplete(body, mCId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(SuccessBean successBean) { + dialog.dismiss(); + ToastUtils.showShort("处理完成"); + setResult(223); + finish(); + } + + @Override + public void onError(Throwable e) { + dialog.dismiss(); + ExceptionHandler.handleException(e); + } + + @Override + public void onComplete() { + + } + }); + } + + /** + * 旗县区委办局 + */ + private void doCompleteDistrictDepartment(String desc) { + ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中..."); + dialog.show(); + CaseCompleteBean bea = new CaseCompleteBean(); + bea.setSummary(desc); + Gson gson = new Gson(); + String obj = gson.toJson(bea); + RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj); + RetrofitManager.getInstance() + .create(LocationApiService.class) + .doDistrictDepartmentCaseComplete(body, mCId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(SuccessBean successBean) { + dialog.dismiss(); + ToastUtils.showShort("处理完成"); + setResult(223); + finish(); + } + + @Override + public void onError(Throwable e) { + dialog.dismiss(); + ExceptionHandler.handleException(e); + } + + @Override + public void onComplete() { + + } + }); + } + + /** + * 街道提交处理完成 + * + * @param desc + */ + private void doComplete(String desc) { + ProgressDialog dialog = UIUtil.initDialog(mActivity, "提交中..."); + dialog.show(); + CaseCompleteBean bea = new CaseCompleteBean(); + bea.setSummary(desc); + Gson gson = new Gson(); + String obj = gson.toJson(bea); + RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj); + RetrofitManager.getInstance() + .create(LocationApiService.class) + .doCompleteCaseStreet(body, mCId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(SuccessBean successBean) { + dialog.dismiss(); + ToastUtils.showShort("处理完成"); + setResult(223); + finish(); + } + + @Override + public void onError(Throwable e) { + dialog.dismiss(); + ExceptionHandler.handleException(e); + } + + @Override + public void onComplete() { + + } + }); + } + + @Override + protected void onDestroy() { + super.onDestroy(); + if (mDis != null && !mDis.isDisposed()) { + mDis.dispose(); + } + mBind.unbind(); + } +} diff --git a/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/trouble/CaseLogActivity.java b/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/trouble/CaseLogActivity.java new file mode 100644 index 0000000..a88d8aa --- /dev/null +++ b/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/trouble/CaseLogActivity.java @@ -0,0 +1,92 @@ +package com.sucstepsoft.txrealtimelocation.activitys.trouble; + +import android.support.v7.widget.LinearLayoutManager; +import android.support.v7.widget.RecyclerView; + +import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager; +import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity; +import com.sucstepsoft.cm_utils.utils.UserLgUtils; +import com.sucstepsoft.txrealtimelocation.R; +import com.sucstepsoft.txrealtimelocation.adapters.CaseLogAdapter; +import com.sucstepsoft.txrealtimelocation.beans.LogListBean; +import com.sucstepsoft.txrealtimelocation.net.LocationApiService; +import com.sucstepsoft.txrealtimelocation.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; + +//日志 +public class CaseLogActivity extends BaseActivity { + + @BindView(R.id.rlv_content) + RecyclerView mRlvLog; + private Unbinder mBind; + private String mCId; + private CaseLogAdapter mAdapter; + private List mDatas = new ArrayList<>(); + + @Override + protected int setLayoutId() { + return R.layout.activity_case_log; + } + + @Override + public void initData() { + mBind = ButterKnife.bind(this); + mTvBaseTitle.setText("日志"); + mCId = getIntent().getStringExtra("cId"); + mAdapter = new CaseLogAdapter(mActivity, mDatas); + mRlvLog.setLayoutManager(new LinearLayoutManager(mActivity)); + mRlvLog.setAdapter(mAdapter); + getLogList(mCId); + } + + /** + * 获取 日志 + * + * @param cId + */ + private void getLogList(String cId) { + RetrofitManager.getInstance() + .create(LocationApiService.class) + .getCaseLogList(cId, UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer>() { + @Override + public void onSubscribe(Disposable d) { + + } + + @Override + public void onNext(List logListBeans) { + if (logListBeans != null && logListBeans.size() > 0) { + mDatas = logListBeans; + mAdapter.setData(mDatas); + refreshView(STATE_LOAD_SUCCESS); + } else { + refreshView(STATE_LOAD_EMPTY); + } + } + + @Override + public void onError(Throwable e) { + ExceptionHandler.handleException(e); + refreshView(STATE_LOAD_ERROR); + } + + @Override + public void onComplete() { + + } + }); + } +} \ No newline at end of file diff --git a/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/trouble/TdTaskActivity.java b/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/trouble/TdTaskActivity.java new file mode 100644 index 0000000..338f818 --- /dev/null +++ b/app/src/main/java/com/sucstepsoft/txrealtimelocation/activitys/trouble/TdTaskActivity.java @@ -0,0 +1,102 @@ +package com.sucstepsoft.txrealtimelocation.activitys.trouble; + +import android.os.Bundle; +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 com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager; +import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity; +import com.sucstepsoft.cm_utils.core.widget.xtablayout.XTabLayout; +import com.sucstepsoft.cm_utils.utils.UserLgUtils; +import com.sucstepsoft.txrealtimelocation.R; +import com.sucstepsoft.txrealtimelocation.activitys.issue.IssueRecordActivity; +import com.sucstepsoft.txrealtimelocation.beans.CaseListBean; +import com.sucstepsoft.txrealtimelocation.fragments.issue.CaseListFragment; +import com.sucstepsoft.txrealtimelocation.fragments.issue.CaseListHistoryFragment; +import com.sucstepsoft.txrealtimelocation.fragments.issue.PendingFragment; +import com.sucstepsoft.txrealtimelocation.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 TdTaskActivity extends BaseActivity { + + @BindView(R.id.xtl_tabs) + XTabLayout mTablayout; + @BindView(R.id.vp_content) + ViewPager mVpContent; + private String[] mTitles = new String[]{"待办任务", "已处理任务"}; + private List mFragments = new ArrayList<>(); + private Unbinder mBind; + + + @Override + protected int setLayoutId() { + return R.layout.activity_td_task; + } + + @Override + public void initData() { + mBind = ButterKnife.bind(this); + refreshView(STATE_LOAD_SUCCESS); + mTvBaseTitle.setText("待办任务"); + CaseListFragment fragment = new CaseListFragment(); + mFragments.add(fragment); + CaseListHistoryFragment fragment1 = new CaseListHistoryFragment(); + mFragments.add(fragment1); + VpRecordAdapter adapter = new VpRecordAdapter(getSupportFragmentManager()); + mVpContent.setAdapter(adapter); + mTablayout.setxTabDisplayNum(2); + mTablayout.setupWithViewPager(mVpContent); + } + + + 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(); + } + + +} \ No newline at end of file diff --git a/app/src/main/java/com/sucstepsoft/txrealtimelocation/adapters/CaseListAdapter.java b/app/src/main/java/com/sucstepsoft/txrealtimelocation/adapters/CaseListAdapter.java new file mode 100644 index 0000000..29216a4 --- /dev/null +++ b/app/src/main/java/com/sucstepsoft/txrealtimelocation/adapters/CaseListAdapter.java @@ -0,0 +1,51 @@ +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; + +import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter; +import com.sucstepsoft.txrealtimelocation.R; +import com.sucstepsoft.txrealtimelocation.adapters.holders.CaseListHolder; +import com.sucstepsoft.txrealtimelocation.adapters.holders.CompanyCheckHolder; +import com.sucstepsoft.txrealtimelocation.beans.CaseListBean; +import com.sucstepsoft.txrealtimelocation.beans.CompanyListDataBean; + +import java.util.List; + +/** + * 作者: adam + * 日期: 2020/3/30 - 12:35 PM + * 邮箱: itgaojian@163.com + * 描述: + */ +public class CaseListAdapter extends BaseRecyclerAdapter { + private int mCheckIndex = 0; + private String mCheckId = ""; + private boolean onBind; + + public CaseListAdapter(Context ctx, List list) { + super(ctx, list); + } + + @Override + public CaseListHolder createHolder(ViewGroup parent, int viewType) { + View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_company_check, parent, false); + return new CaseListHolder(itemView); + } + + @Override + public void bindHolder(CaseListHolder holder, int i) { + CaseListBean.RowsBean bean = mData.get(i); + holder.mTvName.setText(bean.getEnterpriseName()); + holder.mTvPeo.setText(bean.getEnterpriseMaster()); + String address = bean.getEnterpriseArea1Name() + bean.getEnterpriseArea2Name() + bean.getEnterpriseArea3Name() + bean.getEnterpriseArea4Name() + bean.getEnterpriseArea5Name(); + holder.mTvAddress.setText(address); + } + + public String getSelDataId() { + return mCheckId; + } +} diff --git a/app/src/main/java/com/sucstepsoft/txrealtimelocation/adapters/CaseLogAdapter.java b/app/src/main/java/com/sucstepsoft/txrealtimelocation/adapters/CaseLogAdapter.java new file mode 100755 index 0000000..6ce4e93 --- /dev/null +++ b/app/src/main/java/com/sucstepsoft/txrealtimelocation/adapters/CaseLogAdapter.java @@ -0,0 +1,67 @@ +package com.sucstepsoft.txrealtimelocation.adapters; + +import android.content.Context; +import android.content.Intent; +import android.graphics.Color; +import android.support.v7.widget.GridLayoutManager; +import android.text.TextUtils; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi; +import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter; +import com.sucstepsoft.cm_utils.core.widget.base.BaseShowPhotoAdapter; +import com.sucstepsoft.txrealtimelocation.R; +import com.sucstepsoft.txrealtimelocation.activitys.common.PhotoActivity; +import com.sucstepsoft.txrealtimelocation.adapters.holders.CaseLogHolder; +import com.sucstepsoft.txrealtimelocation.adapters.holders.IssueStepHolder; +import com.sucstepsoft.txrealtimelocation.beans.CaseFlowBean; +import com.sucstepsoft.txrealtimelocation.beans.CaseListBean; +import com.sucstepsoft.txrealtimelocation.beans.LogListBean; + +import java.util.ArrayList; +import java.util.List; + +/** + * 作者: Adam + * 日期: 2019/8/6 - 14:10 + * 邮箱: itgaojian@163.com + * 描述: + */ +public class CaseLogAdapter extends BaseRecyclerAdapter { + + + public CaseLogAdapter(Context ctx, List list) { + super(ctx, list); + } + + @Override + public CaseLogHolder createHolder(ViewGroup parent, int viewType) { + View view = LayoutInflater.from(mContext).inflate(R.layout.item_case_log, parent, false); + return new CaseLogHolder(view); + } + + @Override + public void bindHolder(CaseLogHolder holder, int i) { + LogListBean bean = mData.get(i); + holder.mTvTime.setText(bean.getTime()); + holder.mTvDesc.setText(bean.getDescription()); + holder.mTvStartTime.setText(bean.getStartTime()); + holder.mTvEndTime.setText(bean.getEndTime()); + holder.mTvHandleTime.setText(bean.getHandleDuration()); + holder.mTvHandleUser.setText(bean.getHandlerUserName()); + holder.mTvHandlePhone.setText(bean.getHandlerUserPhone()); + if (!TextUtils.isEmpty(bean.getSummary())) { + holder.mLlExplain.setVisibility(View.VISIBLE); + holder.mTvHandleSummary.setText(bean.getSummary()); + } else { + holder.mLlExplain.setVisibility(View.GONE); + } + if (TextUtils.isEmpty(bean.getEndTime())) { + holder.mTvHandleStatus.setText("[正在处理]"); + } else { + holder.mTvHandleStatus.setText("[处理完成]"); + } + } +} diff --git a/app/src/main/java/com/sucstepsoft/txrealtimelocation/adapters/CounterCheckListAdapter.java b/app/src/main/java/com/sucstepsoft/txrealtimelocation/adapters/CounterCheckListAdapter.java index dfed5bd..8e7ef1f 100644 --- a/app/src/main/java/com/sucstepsoft/txrealtimelocation/adapters/CounterCheckListAdapter.java +++ b/app/src/main/java/com/sucstepsoft/txrealtimelocation/adapters/CounterCheckListAdapter.java @@ -32,13 +32,13 @@ public class CounterCheckListAdapter extends BaseRecyclerAdapter checkItems; + + public String getCheckId() { + return checkId; + } + + public void setCheckId(String checkId) { + this.checkId = checkId; + } + + public String getCheckLat() { + return checkLat; + } + + public void setCheckLat(String checkLat) { + this.checkLat = checkLat; + } + + public String getCheckLng() { + return checkLng; + } + + public void setCheckLng(String checkLng) { + this.checkLng = checkLng; + } + + public int getCheckType() { + return checkType; + } + + public void setCheckType(int checkType) { + this.checkType = checkType; + } + + public String getCreator() { + return creator; + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public String getCreatorName() { + return creatorName; + } + + public void setCreatorName(String creatorName) { + this.creatorName = creatorName; + } + + public String getCreatorPhone() { + return creatorPhone; + } + + public void setCreatorPhone(String creatorPhone) { + this.creatorPhone = creatorPhone; + } + + public String getEnterpriseAddress() { + return enterpriseAddress; + } + + public void setEnterpriseAddress(String enterpriseAddress) { + this.enterpriseAddress = enterpriseAddress; + } + + public String getEnterpriseArea1() { + return enterpriseArea1; + } + + public void setEnterpriseArea1(String enterpriseArea1) { + this.enterpriseArea1 = enterpriseArea1; + } + + public String getEnterpriseArea1Name() { + return enterpriseArea1Name; + } + + public void setEnterpriseArea1Name(String enterpriseArea1Name) { + this.enterpriseArea1Name = enterpriseArea1Name; + } + + public String getEnterpriseArea2() { + return enterpriseArea2; + } + + public void setEnterpriseArea2(String enterpriseArea2) { + this.enterpriseArea2 = enterpriseArea2; + } + + public String getEnterpriseArea2Name() { + return enterpriseArea2Name; + } + + public void setEnterpriseArea2Name(String enterpriseArea2Name) { + this.enterpriseArea2Name = enterpriseArea2Name; + } + + public String getEnterpriseArea3() { + return enterpriseArea3; + } + + public void setEnterpriseArea3(String enterpriseArea3) { + this.enterpriseArea3 = enterpriseArea3; + } + + public String getEnterpriseArea3Name() { + return enterpriseArea3Name; + } + + public void setEnterpriseArea3Name(String enterpriseArea3Name) { + this.enterpriseArea3Name = enterpriseArea3Name; + } + + public String getEnterpriseArea4() { + return enterpriseArea4; + } + + public void setEnterpriseArea4(String enterpriseArea4) { + this.enterpriseArea4 = enterpriseArea4; + } + + public String getEnterpriseArea4Name() { + return enterpriseArea4Name; + } + + public void setEnterpriseArea4Name(String enterpriseArea4Name) { + this.enterpriseArea4Name = enterpriseArea4Name; + } + + public String getEnterpriseArea5() { + return enterpriseArea5; + } + + public void setEnterpriseArea5(String enterpriseArea5) { + this.enterpriseArea5 = enterpriseArea5; + } + + public String getEnterpriseArea5Name() { + return enterpriseArea5Name; + } + + public void setEnterpriseArea5Name(String enterpriseArea5Name) { + this.enterpriseArea5Name = enterpriseArea5Name; + } + + public String getEnterpriseEngagedCount() { + return enterpriseEngagedCount; + } + + public void setEnterpriseEngagedCount(String enterpriseEngagedCount) { + this.enterpriseEngagedCount = enterpriseEngagedCount; + } + + public String getEnterpriseFactoryGate() { + return enterpriseFactoryGate; + } + + public void setEnterpriseFactoryGate(String enterpriseFactoryGate) { + this.enterpriseFactoryGate = enterpriseFactoryGate; + } + + public String getEnterpriseId() { + return enterpriseId; + } + + public void setEnterpriseId(String enterpriseId) { + this.enterpriseId = enterpriseId; + } + + public String getEnterpriseIndustry() { + return enterpriseIndustry; + } + + public void setEnterpriseIndustry(String enterpriseIndustry) { + this.enterpriseIndustry = enterpriseIndustry; + } + + public String getEnterpriseIndustryName() { + return enterpriseIndustryName; + } + + public void setEnterpriseIndustryName(String enterpriseIndustryName) { + this.enterpriseIndustryName = enterpriseIndustryName; + } + + public String getEnterpriseLat() { + return enterpriseLat; + } + + public void setEnterpriseLat(String enterpriseLat) { + this.enterpriseLat = enterpriseLat; + } + + public String getEnterpriseLng() { + return enterpriseLng; + } + + public void setEnterpriseLng(String enterpriseLng) { + this.enterpriseLng = enterpriseLng; + } + + public String getEnterpriseMaster() { + return enterpriseMaster; + } + + public void setEnterpriseMaster(String enterpriseMaster) { + this.enterpriseMaster = enterpriseMaster; + } + + public String getEnterpriseName() { + return enterpriseName; + } + + public void setEnterpriseName(String enterpriseName) { + this.enterpriseName = enterpriseName; + } + + public String getEnterprisePhone() { + return enterprisePhone; + } + + public void setEnterprisePhone(String enterprisePhone) { + this.enterprisePhone = enterprisePhone; + } + + public String getEnterpriseRiskOperation() { + return enterpriseRiskOperation; + } + + public void setEnterpriseRiskOperation(String enterpriseRiskOperation) { + this.enterpriseRiskOperation = enterpriseRiskOperation; + } + + public String getEnterpriseRiskOperationName() { + return enterpriseRiskOperationName; + } + + public void setEnterpriseRiskOperationName(String enterpriseRiskOperationName) { + this.enterpriseRiskOperationName = enterpriseRiskOperationName; + } + + public String getEnterpriseType() { + return enterpriseType; + } + + public void setEnterpriseType(String enterpriseType) { + this.enterpriseType = enterpriseType; + } + + public String getEnterpriseTypeName() { + return enterpriseTypeName; + } + + public void setEnterpriseTypeName(String enterpriseTypeName) { + this.enterpriseTypeName = enterpriseTypeName; + } + + public String getEnterpriseWorkplace() { + return enterpriseWorkplace; + } + + public void setEnterpriseWorkplace(String enterpriseWorkplace) { + this.enterpriseWorkplace = enterpriseWorkplace; + } + + public String getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public int getImmediatelyChangeType() { + return immediatelyChangeType; + } + + public void setImmediatelyChangeType(int immediatelyChangeType) { + this.immediatelyChangeType = immediatelyChangeType; + } + + 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 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 getSummary() { + return summary; + } + + public void setSummary(String summary) { + this.summary = summary; + } + + public String getTaskCheckId() { + return taskCheckId; + } + + public void setTaskCheckId(String taskCheckId) { + this.taskCheckId = taskCheckId; + } + + public List getCheckItems() { + return checkItems; + } + + public void setCheckItems(List checkItems) { + this.checkItems = checkItems; + } + + public static class CheckItemsBean { + private String checkItemId; + private String checkItemParentId; + private int checkItemType; + private String icon; + private String iconPress; + private String name; + private String parentName; + private String scenePhotos; + private String summary; + private int type; + private List checkItemOptions; + private List hiddenDangerReports; + + public String getCheckItemId() { + return checkItemId; + } + + public void setCheckItemId(String checkItemId) { + this.checkItemId = checkItemId; + } + + public String getCheckItemParentId() { + return checkItemParentId; + } + + public void setCheckItemParentId(String checkItemParentId) { + this.checkItemParentId = checkItemParentId; + } + + public int getCheckItemType() { + return checkItemType; + } + + public void setCheckItemType(int checkItemType) { + this.checkItemType = checkItemType; + } + + public String getIcon() { + return icon; + } + + public void setIcon(String icon) { + this.icon = icon; + } + + public String getIconPress() { + return iconPress; + } + + public void setIconPress(String iconPress) { + this.iconPress = iconPress; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getParentName() { + return parentName; + } + + public void setParentName(String parentName) { + this.parentName = parentName; + } + + 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; + } + + public int getType() { + return type; + } + + public void setType(int type) { + this.type = type; + } + + public List getCheckItemOptions() { + return checkItemOptions; + } + + public void setCheckItemOptions(List checkItemOptions) { + this.checkItemOptions = checkItemOptions; + } + + public List getHiddenDangerReports() { + return hiddenDangerReports; + } + + public void setHiddenDangerReports(List hiddenDangerReports) { + this.hiddenDangerReports = hiddenDangerReports; + } + + public static class HiddenDangerReportsBean { + private String checkId; + private String checkItemId; + private String checkItemOptionId; + private int checkItemType; + private String checkResult; + private String hiddenDangerReportId; + private int isWrongJoinByCheckItemId; + private String nameJoinByCheckItemId; + private String scenePhotos; + private int type; + private String unitJoinByCheckItemId; + + 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 String getCheckItemOptionId() { + return checkItemOptionId; + } + + public void setCheckItemOptionId(String checkItemOptionId) { + this.checkItemOptionId = checkItemOptionId; + } + + public int getCheckItemType() { + return checkItemType; + } + + public void setCheckItemType(int checkItemType) { + this.checkItemType = checkItemType; + } + + public String getCheckResult() { + return checkResult; + } + + public void setCheckResult(String checkResult) { + this.checkResult = checkResult; + } + + public String getHiddenDangerReportId() { + return hiddenDangerReportId; + } + + public void setHiddenDangerReportId(String hiddenDangerReportId) { + this.hiddenDangerReportId = hiddenDangerReportId; + } + + public int getIsWrongJoinByCheckItemId() { + return isWrongJoinByCheckItemId; + } + + public void setIsWrongJoinByCheckItemId(int isWrongJoinByCheckItemId) { + this.isWrongJoinByCheckItemId = isWrongJoinByCheckItemId; + } + + public String getNameJoinByCheckItemId() { + return nameJoinByCheckItemId; + } + + public void setNameJoinByCheckItemId(String nameJoinByCheckItemId) { + this.nameJoinByCheckItemId = nameJoinByCheckItemId; + } + + public String getScenePhotos() { + return scenePhotos; + } + + public void setScenePhotos(String scenePhotos) { + this.scenePhotos = scenePhotos; + } + + public int getType() { + return type; + } + + public void setType(int type) { + this.type = type; + } + + public String getUnitJoinByCheckItemId() { + return unitJoinByCheckItemId; + } + + public void setUnitJoinByCheckItemId(String unitJoinByCheckItemId) { + this.unitJoinByCheckItemId = unitJoinByCheckItemId; + } + } + } +} diff --git a/app/src/main/java/com/sucstepsoft/txrealtimelocation/beans/CaseListBean.java b/app/src/main/java/com/sucstepsoft/txrealtimelocation/beans/CaseListBean.java new file mode 100644 index 0000000..0a60548 --- /dev/null +++ b/app/src/main/java/com/sucstepsoft/txrealtimelocation/beans/CaseListBean.java @@ -0,0 +1,625 @@ +package com.sucstepsoft.txrealtimelocation.beans; + +import java.util.List; + +/** + * 作者: adam + * 日期: 2021/7/19 - 2:45 下午 + * 邮箱: itgaojian@163.com + * 描述: + */ +public class CaseListBean { + + private int page; + private int total; + private List 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 getRows() { + return rows; + } + + public void setRows(List rows) { + this.rows = rows; + } + + public static class RowsBean { + private String checkId; + private String checkLat; + private String checkLng; + private int checkType; + private String creator; + private String creatorName; + private String creatorPhone; + private String enterpriseAddress; + private String enterpriseArea1; + private String enterpriseArea1Name; + private String enterpriseArea2; + private String enterpriseArea2Name; + private String enterpriseArea3; + private String enterpriseArea3Name; + private String enterpriseArea4; + private String enterpriseArea4Name; + private String enterpriseArea5; + private String enterpriseArea5Name; + private String enterpriseEngagedCount; + private String enterpriseFactoryGate; + private String enterpriseId; + private String enterpriseIndustry; + private String enterpriseIndustryName; + private String enterpriseLat; + private String enterpriseLng; + private String enterpriseMaster; + private String enterpriseName; + private String enterprisePhone; + private String enterpriseRiskOperation; + private String enterpriseRiskOperationName; + private String enterpriseType; + private String enterpriseTypeName; + private String enterpriseWorkplace; + private String gmtCreate; + private int immediatelyChangeType; + private int isComplete; + private int isCoordination; + private int rectificationDays; + private int rectificationType; + private String summary; + private String taskCheckId; + private List checkItems; + + public String getCheckId() { + return checkId; + } + + public void setCheckId(String checkId) { + this.checkId = checkId; + } + + public String getCheckLat() { + return checkLat; + } + + public void setCheckLat(String checkLat) { + this.checkLat = checkLat; + } + + public String getCheckLng() { + return checkLng; + } + + public void setCheckLng(String checkLng) { + this.checkLng = checkLng; + } + + public int getCheckType() { + return checkType; + } + + public void setCheckType(int checkType) { + this.checkType = checkType; + } + + public String getCreator() { + return creator; + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public String getCreatorName() { + return creatorName; + } + + public void setCreatorName(String creatorName) { + this.creatorName = creatorName; + } + + public String getCreatorPhone() { + return creatorPhone; + } + + public void setCreatorPhone(String creatorPhone) { + this.creatorPhone = creatorPhone; + } + + public String getEnterpriseAddress() { + return enterpriseAddress; + } + + public void setEnterpriseAddress(String enterpriseAddress) { + this.enterpriseAddress = enterpriseAddress; + } + + public String getEnterpriseArea1() { + return enterpriseArea1; + } + + public void setEnterpriseArea1(String enterpriseArea1) { + this.enterpriseArea1 = enterpriseArea1; + } + + public String getEnterpriseArea1Name() { + return enterpriseArea1Name; + } + + public void setEnterpriseArea1Name(String enterpriseArea1Name) { + this.enterpriseArea1Name = enterpriseArea1Name; + } + + public String getEnterpriseArea2() { + return enterpriseArea2; + } + + public void setEnterpriseArea2(String enterpriseArea2) { + this.enterpriseArea2 = enterpriseArea2; + } + + public String getEnterpriseArea2Name() { + return enterpriseArea2Name; + } + + public void setEnterpriseArea2Name(String enterpriseArea2Name) { + this.enterpriseArea2Name = enterpriseArea2Name; + } + + public String getEnterpriseArea3() { + return enterpriseArea3; + } + + public void setEnterpriseArea3(String enterpriseArea3) { + this.enterpriseArea3 = enterpriseArea3; + } + + public String getEnterpriseArea3Name() { + return enterpriseArea3Name; + } + + public void setEnterpriseArea3Name(String enterpriseArea3Name) { + this.enterpriseArea3Name = enterpriseArea3Name; + } + + public String getEnterpriseArea4() { + return enterpriseArea4; + } + + public void setEnterpriseArea4(String enterpriseArea4) { + this.enterpriseArea4 = enterpriseArea4; + } + + public String getEnterpriseArea4Name() { + return enterpriseArea4Name; + } + + public void setEnterpriseArea4Name(String enterpriseArea4Name) { + this.enterpriseArea4Name = enterpriseArea4Name; + } + + public String getEnterpriseArea5() { + return enterpriseArea5; + } + + public void setEnterpriseArea5(String enterpriseArea5) { + this.enterpriseArea5 = enterpriseArea5; + } + + public String getEnterpriseArea5Name() { + return enterpriseArea5Name; + } + + public void setEnterpriseArea5Name(String enterpriseArea5Name) { + this.enterpriseArea5Name = enterpriseArea5Name; + } + + public String getEnterpriseEngagedCount() { + return enterpriseEngagedCount; + } + + public void setEnterpriseEngagedCount(String enterpriseEngagedCount) { + this.enterpriseEngagedCount = enterpriseEngagedCount; + } + + public String getEnterpriseFactoryGate() { + return enterpriseFactoryGate; + } + + public void setEnterpriseFactoryGate(String enterpriseFactoryGate) { + this.enterpriseFactoryGate = enterpriseFactoryGate; + } + + public String getEnterpriseId() { + return enterpriseId; + } + + public void setEnterpriseId(String enterpriseId) { + this.enterpriseId = enterpriseId; + } + + public String getEnterpriseIndustry() { + return enterpriseIndustry; + } + + public void setEnterpriseIndustry(String enterpriseIndustry) { + this.enterpriseIndustry = enterpriseIndustry; + } + + public String getEnterpriseIndustryName() { + return enterpriseIndustryName; + } + + public void setEnterpriseIndustryName(String enterpriseIndustryName) { + this.enterpriseIndustryName = enterpriseIndustryName; + } + + public String getEnterpriseLat() { + return enterpriseLat; + } + + public void setEnterpriseLat(String enterpriseLat) { + this.enterpriseLat = enterpriseLat; + } + + public String getEnterpriseLng() { + return enterpriseLng; + } + + public void setEnterpriseLng(String enterpriseLng) { + this.enterpriseLng = enterpriseLng; + } + + public String getEnterpriseMaster() { + return enterpriseMaster; + } + + public void setEnterpriseMaster(String enterpriseMaster) { + this.enterpriseMaster = enterpriseMaster; + } + + public String getEnterpriseName() { + return enterpriseName; + } + + public void setEnterpriseName(String enterpriseName) { + this.enterpriseName = enterpriseName; + } + + public String getEnterprisePhone() { + return enterprisePhone; + } + + public void setEnterprisePhone(String enterprisePhone) { + this.enterprisePhone = enterprisePhone; + } + + public String getEnterpriseRiskOperation() { + return enterpriseRiskOperation; + } + + public void setEnterpriseRiskOperation(String enterpriseRiskOperation) { + this.enterpriseRiskOperation = enterpriseRiskOperation; + } + + public String getEnterpriseRiskOperationName() { + return enterpriseRiskOperationName; + } + + public void setEnterpriseRiskOperationName(String enterpriseRiskOperationName) { + this.enterpriseRiskOperationName = enterpriseRiskOperationName; + } + + public String getEnterpriseType() { + return enterpriseType; + } + + public void setEnterpriseType(String enterpriseType) { + this.enterpriseType = enterpriseType; + } + + public String getEnterpriseTypeName() { + return enterpriseTypeName; + } + + public void setEnterpriseTypeName(String enterpriseTypeName) { + this.enterpriseTypeName = enterpriseTypeName; + } + + public String getEnterpriseWorkplace() { + return enterpriseWorkplace; + } + + public void setEnterpriseWorkplace(String enterpriseWorkplace) { + this.enterpriseWorkplace = enterpriseWorkplace; + } + + public String getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public int getImmediatelyChangeType() { + return immediatelyChangeType; + } + + public void setImmediatelyChangeType(int immediatelyChangeType) { + this.immediatelyChangeType = immediatelyChangeType; + } + + 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 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 getSummary() { + return summary; + } + + public void setSummary(String summary) { + this.summary = summary; + } + + public String getTaskCheckId() { + return taskCheckId; + } + + public void setTaskCheckId(String taskCheckId) { + this.taskCheckId = taskCheckId; + } + + public List getCheckItems() { + return checkItems; + } + + public void setCheckItems(List checkItems) { + this.checkItems = checkItems; + } + + public static class CheckItemsBean { + private String checkItemId; + private int checkItemListType; + private String checkItemName; + private String checkItemParentId; + private String checkItemSummary; + private int checkItemType; + private int isMustCheck; + private String taskEnterpriseId; + private String taskId; + private List checkItemOptions; + + public String getCheckItemId() { + return checkItemId; + } + + public void setCheckItemId(String checkItemId) { + this.checkItemId = checkItemId; + } + + public int getCheckItemListType() { + return checkItemListType; + } + + public void setCheckItemListType(int checkItemListType) { + this.checkItemListType = checkItemListType; + } + + public String getCheckItemName() { + return checkItemName; + } + + public void setCheckItemName(String checkItemName) { + this.checkItemName = checkItemName; + } + + public String getCheckItemParentId() { + return checkItemParentId; + } + + public void setCheckItemParentId(String checkItemParentId) { + this.checkItemParentId = checkItemParentId; + } + + public String getCheckItemSummary() { + return checkItemSummary; + } + + public void setCheckItemSummary(String checkItemSummary) { + this.checkItemSummary = checkItemSummary; + } + + public int getCheckItemType() { + return checkItemType; + } + + public void setCheckItemType(int checkItemType) { + this.checkItemType = checkItemType; + } + + public int getIsMustCheck() { + return isMustCheck; + } + + public void setIsMustCheck(int isMustCheck) { + this.isMustCheck = isMustCheck; + } + + public String getTaskEnterpriseId() { + return taskEnterpriseId; + } + + public void setTaskEnterpriseId(String taskEnterpriseId) { + this.taskEnterpriseId = taskEnterpriseId; + } + + public String getTaskId() { + return taskId; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public List getCheckItemOptions() { + return checkItemOptions; + } + + public void setCheckItemOptions(List checkItemOptions) { + this.checkItemOptions = checkItemOptions; + } + + public static class CheckItemOptionsBean { + private String checkItemId; + private int checkItemIsWrong; + private String checkItemOptionId; + private String checkItemOptionName; + private int checkItemOptionType; + private String checkItemOptionUnit; + private String checkResult; + private int isWrong; + private String name; + private String scenePhotos; + private int type; + private String unit; + + public String getCheckItemId() { + return checkItemId; + } + + public void setCheckItemId(String checkItemId) { + this.checkItemId = checkItemId; + } + + public int getCheckItemIsWrong() { + return checkItemIsWrong; + } + + public void setCheckItemIsWrong(int checkItemIsWrong) { + this.checkItemIsWrong = checkItemIsWrong; + } + + public String getCheckItemOptionId() { + return checkItemOptionId; + } + + public void setCheckItemOptionId(String checkItemOptionId) { + this.checkItemOptionId = checkItemOptionId; + } + + public String getCheckItemOptionName() { + return checkItemOptionName; + } + + public void setCheckItemOptionName(String checkItemOptionName) { + this.checkItemOptionName = checkItemOptionName; + } + + public int getCheckItemOptionType() { + return checkItemOptionType; + } + + public void setCheckItemOptionType(int checkItemOptionType) { + this.checkItemOptionType = checkItemOptionType; + } + + public String getCheckItemOptionUnit() { + return checkItemOptionUnit; + } + + public void setCheckItemOptionUnit(String checkItemOptionUnit) { + this.checkItemOptionUnit = checkItemOptionUnit; + } + + public String getCheckResult() { + return checkResult; + } + + public void setCheckResult(String checkResult) { + this.checkResult = checkResult; + } + + public int getIsWrong() { + return isWrong; + } + + public void setIsWrong(int isWrong) { + this.isWrong = isWrong; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getScenePhotos() { + return scenePhotos; + } + + public void setScenePhotos(String scenePhotos) { + this.scenePhotos = scenePhotos; + } + + public int getType() { + return type; + } + + public void setType(int type) { + this.type = type; + } + + public String getUnit() { + return unit; + } + + public void setUnit(String unit) { + this.unit = unit; + } + } + } + } +} diff --git a/app/src/main/java/com/sucstepsoft/txrealtimelocation/beans/CounterCheckListBean.java b/app/src/main/java/com/sucstepsoft/txrealtimelocation/beans/CounterCheckListBean.java index a461ed0..e60f689 100644 --- a/app/src/main/java/com/sucstepsoft/txrealtimelocation/beans/CounterCheckListBean.java +++ b/app/src/main/java/com/sucstepsoft/txrealtimelocation/beans/CounterCheckListBean.java @@ -10,12 +10,6 @@ import java.util.List; */ public class CounterCheckListBean { - /** - * rows : [{"checkId":"f62d228d-05a3-49fb-9b64-702e781cc54a","enterpriseId":"8cdf6a13-6ca4-40c2-963c-fbe264cb8cb2","nameJoinByEnterpriseId":"张三牛肉店","typeJoinByEnterpriseId":"7965a3b7-47b7-4843-b030-91f1bd4428e5","typeDictionaryName":"企业法人","area1JoinByEnterpriseId":"a91b43a2-e92a-43e6-8788-0c636c44f9b6","area2JoinByEnterpriseId":"905a4a20-2ffc-4d73-b6f0-eca0c7565b75","area3JoinByEnterpriseId":"281c2d38-a904-454a-9325-b5caee1c851c","area4JoinByEnterpriseId":"470e65d7-78b0-4a84-afb6-911b0f5db56a","area5JoinByEnterpriseId":"e772333e-6900-43ae-a2f9-bf77d49cdf06","addressJoinByEnterpriseId":"102号街","industryJoinByEnterpriseId":"706b8520-3a1d-431e-a203-0d307dc22e87","industryDictionaryName":"餐饮","engagedCountJoinByEnterpriseId":"1","riskOperationJoinByEnterpriseId":"f0b47289-f451-40c5-a57e-7042f69e5c2c","riskOperationDictionaryName":"危险化学品","masterJoinByEnterpriseId":"张三","phoneJoinByEnterpriseId":"13888888888","checkType":1,"isCoordination":1,"isComplete":0,"gmtCreate":"2020-04-02 10:10:44"},{"checkId":"36edad62-28c6-4dec-acb8-03faefb97cd5","enterpriseId":"8cdf6a13-6ca4-40c2-963c-fbe264cb8cb2","nameJoinByEnterpriseId":"张三牛肉店","typeJoinByEnterpriseId":"7965a3b7-47b7-4843-b030-91f1bd4428e5","typeDictionaryName":"企业法人","area1JoinByEnterpriseId":"a91b43a2-e92a-43e6-8788-0c636c44f9b6","area2JoinByEnterpriseId":"905a4a20-2ffc-4d73-b6f0-eca0c7565b75","area3JoinByEnterpriseId":"281c2d38-a904-454a-9325-b5caee1c851c","area4JoinByEnterpriseId":"470e65d7-78b0-4a84-afb6-911b0f5db56a","area5JoinByEnterpriseId":"e772333e-6900-43ae-a2f9-bf77d49cdf06","addressJoinByEnterpriseId":"102号街","industryJoinByEnterpriseId":"706b8520-3a1d-431e-a203-0d307dc22e87","industryDictionaryName":"餐饮","engagedCountJoinByEnterpriseId":"1","riskOperationJoinByEnterpriseId":"f0b47289-f451-40c5-a57e-7042f69e5c2c","riskOperationDictionaryName":"危险化学品","masterJoinByEnterpriseId":"张三","phoneJoinByEnterpriseId":"13888888888","checkType":1,"isCoordination":1,"isComplete":1,"gmtCreate":"2020-04-02 10:10:01"},{"checkId":"7867e7d1-d15e-466e-a6fa-bb8564acce32","enterpriseId":"8cdf6a13-6ca4-40c2-963c-fbe264cb8cb2","nameJoinByEnterpriseId":"张三牛肉店","typeJoinByEnterpriseId":"7965a3b7-47b7-4843-b030-91f1bd4428e5","typeDictionaryName":"企业法人","area1JoinByEnterpriseId":"a91b43a2-e92a-43e6-8788-0c636c44f9b6","area2JoinByEnterpriseId":"905a4a20-2ffc-4d73-b6f0-eca0c7565b75","area3JoinByEnterpriseId":"281c2d38-a904-454a-9325-b5caee1c851c","area4JoinByEnterpriseId":"470e65d7-78b0-4a84-afb6-911b0f5db56a","area5JoinByEnterpriseId":"e772333e-6900-43ae-a2f9-bf77d49cdf06","addressJoinByEnterpriseId":"102号街","industryJoinByEnterpriseId":"706b8520-3a1d-431e-a203-0d307dc22e87","industryDictionaryName":"餐饮","engagedCountJoinByEnterpriseId":"1","riskOperationJoinByEnterpriseId":"f0b47289-f451-40c5-a57e-7042f69e5c2c","riskOperationDictionaryName":"危险化学品","masterJoinByEnterpriseId":"张三","phoneJoinByEnterpriseId":"13888888888","checkType":1,"isCoordination":1,"isComplete":0,"gmtCreate":"2020-04-02 10:01:22"},{"checkId":"9230b2fc-74ba-48fb-8df4-5fbdee6ff3f4","enterpriseId":"8cdf6a13-6ca4-40c2-963c-fbe264cb8cb2","nameJoinByEnterpriseId":"张三牛肉店","typeJoinByEnterpriseId":"7965a3b7-47b7-4843-b030-91f1bd4428e5","typeDictionaryName":"企业法人","area1JoinByEnterpriseId":"a91b43a2-e92a-43e6-8788-0c636c44f9b6","area2JoinByEnterpriseId":"905a4a20-2ffc-4d73-b6f0-eca0c7565b75","area3JoinByEnterpriseId":"281c2d38-a904-454a-9325-b5caee1c851c","area4JoinByEnterpriseId":"470e65d7-78b0-4a84-afb6-911b0f5db56a","area5JoinByEnterpriseId":"e772333e-6900-43ae-a2f9-bf77d49cdf06","addressJoinByEnterpriseId":"102号街","industryJoinByEnterpriseId":"706b8520-3a1d-431e-a203-0d307dc22e87","industryDictionaryName":"餐饮","engagedCountJoinByEnterpriseId":"1","riskOperationJoinByEnterpriseId":"f0b47289-f451-40c5-a57e-7042f69e5c2c","riskOperationDictionaryName":"危险化学品","masterJoinByEnterpriseId":"张三","phoneJoinByEnterpriseId":"13888888888","checkType":1,"isCoordination":1,"isComplete":0,"gmtCreate":"2020-04-02 09:50:32"},{"checkId":"1f8f8a9a-fd39-4a0b-b07f-f5a8ca10de91","enterpriseId":"6be5ce58-f12f-49e7-b9c8-6eb92b895c49","nameJoinByEnterpriseId":"李四拉面","typeJoinByEnterpriseId":"7965a3b7-47b7-4843-b030-91f1bd4428e5","typeDictionaryName":"企业法人","area1JoinByEnterpriseId":"a91b43a2-e92a-43e6-8788-0c636c44f9b6","area2JoinByEnterpriseId":"905a4a20-2ffc-4d73-b6f0-eca0c7565b75","area3JoinByEnterpriseId":"281c2d38-a904-454a-9325-b5caee1c851c","area4JoinByEnterpriseId":"3d9194b5-9331-4d8a-9bcb-67e08c8b6045","area5JoinByEnterpriseId":"d01f5e62-9100-4981-8b4f-e6a530d6b5fd","addressJoinByEnterpriseId":"和H好多好多和大好河山","industryJoinByEnterpriseId":"706b8520-3a1d-431e-a203-0d307dc22e87","industryDictionaryName":"餐饮","engagedCountJoinByEnterpriseId":"50","riskOperationJoinByEnterpriseId":"8a566441-34db-40bd-8f96-ca00c6ffa2a6","riskOperationDictionaryName":"有限空间","masterJoinByEnterpriseId":"李四改","phoneJoinByEnterpriseId":"13888888888","checkType":1,"isCoordination":1,"isComplete":0,"gmtCreate":"2020-04-01 16:21:16"},{"checkId":"7d3726b2-97d7-4010-919d-72b1942ab9f8","enterpriseId":"8cdf6a13-6ca4-40c2-963c-fbe264cb8cb2","nameJoinByEnterpriseId":"张三牛肉店","typeJoinByEnterpriseId":"7965a3b7-47b7-4843-b030-91f1bd4428e5","typeDictionaryName":"企业法人","area1JoinByEnterpriseId":"a91b43a2-e92a-43e6-8788-0c636c44f9b6","area2JoinByEnterpriseId":"905a4a20-2ffc-4d73-b6f0-eca0c7565b75","area3JoinByEnterpriseId":"281c2d38-a904-454a-9325-b5caee1c851c","area4JoinByEnterpriseId":"470e65d7-78b0-4a84-afb6-911b0f5db56a","area5JoinByEnterpriseId":"e772333e-6900-43ae-a2f9-bf77d49cdf06","addressJoinByEnterpriseId":"102号街","industryJoinByEnterpriseId":"706b8520-3a1d-431e-a203-0d307dc22e87","industryDictionaryName":"餐饮","engagedCountJoinByEnterpriseId":"1","riskOperationJoinByEnterpriseId":"f0b47289-f451-40c5-a57e-7042f69e5c2c","riskOperationDictionaryName":"危险化学品","masterJoinByEnterpriseId":"张三","phoneJoinByEnterpriseId":"13888888888","checkType":1,"isCoordination":1,"isComplete":0,"gmtCreate":"2020-03-31 17:50:45"},{"checkId":"9bac4a3b-2913-45d0-bc44-be631e0d4b45","enterpriseId":"8cdf6a13-6ca4-40c2-963c-fbe264cb8cb2","nameJoinByEnterpriseId":"张三牛肉店","typeJoinByEnterpriseId":"7965a3b7-47b7-4843-b030-91f1bd4428e5","typeDictionaryName":"企业法人","area1JoinByEnterpriseId":"a91b43a2-e92a-43e6-8788-0c636c44f9b6","area2JoinByEnterpriseId":"905a4a20-2ffc-4d73-b6f0-eca0c7565b75","area3JoinByEnterpriseId":"281c2d38-a904-454a-9325-b5caee1c851c","area4JoinByEnterpriseId":"470e65d7-78b0-4a84-afb6-911b0f5db56a","area5JoinByEnterpriseId":"e772333e-6900-43ae-a2f9-bf77d49cdf06","addressJoinByEnterpriseId":"102号街","industryJoinByEnterpriseId":"706b8520-3a1d-431e-a203-0d307dc22e87","industryDictionaryName":"餐饮","engagedCountJoinByEnterpriseId":"1","riskOperationJoinByEnterpriseId":"f0b47289-f451-40c5-a57e-7042f69e5c2c","riskOperationDictionaryName":"危险化学品","masterJoinByEnterpriseId":"张三","phoneJoinByEnterpriseId":"13888888888","checkType":1,"isCoordination":1,"isComplete":0,"gmtCreate":"2020-03-31 17:44:18"},{"checkId":"bd269c5b-437f-4634-82f0-cbe4bcc6b958","enterpriseId":"8cdf6a13-6ca4-40c2-963c-fbe264cb8cb2","nameJoinByEnterpriseId":"张三牛肉店","typeJoinByEnterpriseId":"7965a3b7-47b7-4843-b030-91f1bd4428e5","typeDictionaryName":"企业法人","area1JoinByEnterpriseId":"a91b43a2-e92a-43e6-8788-0c636c44f9b6","area2JoinByEnterpriseId":"905a4a20-2ffc-4d73-b6f0-eca0c7565b75","area3JoinByEnterpriseId":"281c2d38-a904-454a-9325-b5caee1c851c","area4JoinByEnterpriseId":"470e65d7-78b0-4a84-afb6-911b0f5db56a","area5JoinByEnterpriseId":"e772333e-6900-43ae-a2f9-bf77d49cdf06","addressJoinByEnterpriseId":"102号街","industryJoinByEnterpriseId":"706b8520-3a1d-431e-a203-0d307dc22e87","industryDictionaryName":"餐饮","engagedCountJoinByEnterpriseId":"1","riskOperationJoinByEnterpriseId":"f0b47289-f451-40c5-a57e-7042f69e5c2c","riskOperationDictionaryName":"危险化学品","masterJoinByEnterpriseId":"张三","phoneJoinByEnterpriseId":"13888888888","checkType":1,"isCoordination":1,"isComplete":0,"gmtCreate":"2020-03-31 17:42:15"},{"checkId":"6f72d0d8-da2f-4ebc-b027-d80c818f069a","enterpriseId":"8cdf6a13-6ca4-40c2-963c-fbe264cb8cb2","nameJoinByEnterpriseId":"张三牛肉店","typeJoinByEnterpriseId":"7965a3b7-47b7-4843-b030-91f1bd4428e5","typeDictionaryName":"企业法人","area1JoinByEnterpriseId":"a91b43a2-e92a-43e6-8788-0c636c44f9b6","area2JoinByEnterpriseId":"905a4a20-2ffc-4d73-b6f0-eca0c7565b75","area3JoinByEnterpriseId":"281c2d38-a904-454a-9325-b5caee1c851c","area4JoinByEnterpriseId":"470e65d7-78b0-4a84-afb6-911b0f5db56a","area5JoinByEnterpriseId":"e772333e-6900-43ae-a2f9-bf77d49cdf06","addressJoinByEnterpriseId":"102号街","industryJoinByEnterpriseId":"706b8520-3a1d-431e-a203-0d307dc22e87","industryDictionaryName":"餐饮","engagedCountJoinByEnterpriseId":"1","riskOperationJoinByEnterpriseId":"f0b47289-f451-40c5-a57e-7042f69e5c2c","riskOperationDictionaryName":"危险化学品","masterJoinByEnterpriseId":"张三","phoneJoinByEnterpriseId":"13888888888","checkType":0,"isCoordination":0,"isComplete":0,"gmtCreate":"2020-03-31 17:33:16"},{"checkId":"f9aa1435-133c-40af-bd79-16fe98bcd7a0","enterpriseId":"8cdf6a13-6ca4-40c2-963c-fbe264cb8cb2","nameJoinByEnterpriseId":"张三牛肉店","typeJoinByEnterpriseId":"7965a3b7-47b7-4843-b030-91f1bd4428e5","typeDictionaryName":"企业法人","area1JoinByEnterpriseId":"a91b43a2-e92a-43e6-8788-0c636c44f9b6","area2JoinByEnterpriseId":"905a4a20-2ffc-4d73-b6f0-eca0c7565b75","area3JoinByEnterpriseId":"281c2d38-a904-454a-9325-b5caee1c851c","area4JoinByEnterpriseId":"470e65d7-78b0-4a84-afb6-911b0f5db56a","area5JoinByEnterpriseId":"e772333e-6900-43ae-a2f9-bf77d49cdf06","addressJoinByEnterpriseId":"102号街","industryJoinByEnterpriseId":"706b8520-3a1d-431e-a203-0d307dc22e87","industryDictionaryName":"餐饮","engagedCountJoinByEnterpriseId":"1","riskOperationJoinByEnterpriseId":"f0b47289-f451-40c5-a57e-7042f69e5c2c","riskOperationDictionaryName":"危险化学品","masterJoinByEnterpriseId":"张三","phoneJoinByEnterpriseId":"13888888888","checkType":0,"isCoordination":0,"isComplete":0,"gmtCreate":"2020-03-31 17:29:39"}] - * page : 1 - * total : 10 - */ - private int page; private int total; private List rows; @@ -45,53 +39,48 @@ public class CounterCheckListBean { } public static class RowsBean { - /** - * checkId : f62d228d-05a3-49fb-9b64-702e781cc54a - * enterpriseId : 8cdf6a13-6ca4-40c2-963c-fbe264cb8cb2 - * nameJoinByEnterpriseId : 张三牛肉店 - * typeJoinByEnterpriseId : 7965a3b7-47b7-4843-b030-91f1bd4428e5 - * typeDictionaryName : 企业法人 - * area1JoinByEnterpriseId : a91b43a2-e92a-43e6-8788-0c636c44f9b6 - * area2JoinByEnterpriseId : 905a4a20-2ffc-4d73-b6f0-eca0c7565b75 - * area3JoinByEnterpriseId : 281c2d38-a904-454a-9325-b5caee1c851c - * area4JoinByEnterpriseId : 470e65d7-78b0-4a84-afb6-911b0f5db56a - * area5JoinByEnterpriseId : e772333e-6900-43ae-a2f9-bf77d49cdf06 - * addressJoinByEnterpriseId : 102号街 - * industryJoinByEnterpriseId : 706b8520-3a1d-431e-a203-0d307dc22e87 - * industryDictionaryName : 餐饮 - * engagedCountJoinByEnterpriseId : 1 - * riskOperationJoinByEnterpriseId : f0b47289-f451-40c5-a57e-7042f69e5c2c - * riskOperationDictionaryName : 危险化学品 - * masterJoinByEnterpriseId : 张三 - * phoneJoinByEnterpriseId : 13888888888 - * checkType : 1 - * isCoordination : 1 - * isComplete : 0 - * gmtCreate : 2020-04-02 10:10:44 - */ - private String checkId; - private String enterpriseId; - private String nameJoinByEnterpriseId; - private String typeJoinByEnterpriseId; - private String typeDictionaryName; - private String area1JoinByEnterpriseId; - private String area2JoinByEnterpriseId; - private String area3JoinByEnterpriseId; - private String area4JoinByEnterpriseId; - private String area5JoinByEnterpriseId; - private String addressJoinByEnterpriseId; - private String industryJoinByEnterpriseId; - private String industryDictionaryName; - private String engagedCountJoinByEnterpriseId; - private String riskOperationJoinByEnterpriseId; - private String riskOperationDictionaryName; - private String masterJoinByEnterpriseId; - private String phoneJoinByEnterpriseId; + private String checkLat; + private String checkLng; private int checkType; - private int isCoordination; - private int isComplete; + private String creator; + private String creatorName; + private String creatorPhone; + private String enterpriseAddress; + private String enterpriseArea1; + private String enterpriseArea1Name; + private String enterpriseArea2; + private String enterpriseArea2Name; + private String enterpriseArea3; + private String enterpriseArea3Name; + private String enterpriseArea4; + private String enterpriseArea4Name; + private String enterpriseArea5; + private String enterpriseArea5Name; + private String enterpriseEngagedCount; + private String enterpriseFactoryGate; + private String enterpriseId; + private String enterpriseIndustry; + private String enterpriseIndustryName; + private String enterpriseLat; + private String enterpriseLng; + private String enterpriseMaster; + private String enterpriseName; + private String enterprisePhone; + private String enterpriseRiskOperation; + private String enterpriseRiskOperationName; + private String enterpriseType; + private String enterpriseTypeName; + private String enterpriseWorkplace; private String gmtCreate; + private int immediatelyChangeType; + private int isComplete; + private int isCoordination; + private int rectificationDays; + private int rectificationType; + private String summary; + private String taskCheckId; + private List checkItems; public String getCheckId() { return checkId; @@ -101,140 +90,20 @@ public class CounterCheckListBean { this.checkId = checkId; } - public String getEnterpriseId() { - return enterpriseId; + public String getCheckLat() { + return checkLat; } - public void setEnterpriseId(String enterpriseId) { - this.enterpriseId = enterpriseId; + public void setCheckLat(String checkLat) { + this.checkLat = checkLat; } - public String getNameJoinByEnterpriseId() { - return nameJoinByEnterpriseId; + public String getCheckLng() { + return checkLng; } - public void setNameJoinByEnterpriseId(String nameJoinByEnterpriseId) { - this.nameJoinByEnterpriseId = nameJoinByEnterpriseId; - } - - public String getTypeJoinByEnterpriseId() { - return typeJoinByEnterpriseId; - } - - public void setTypeJoinByEnterpriseId(String typeJoinByEnterpriseId) { - this.typeJoinByEnterpriseId = typeJoinByEnterpriseId; - } - - public String getTypeDictionaryName() { - return typeDictionaryName; - } - - public void setTypeDictionaryName(String typeDictionaryName) { - this.typeDictionaryName = typeDictionaryName; - } - - public String getArea1JoinByEnterpriseId() { - return area1JoinByEnterpriseId; - } - - public void setArea1JoinByEnterpriseId(String area1JoinByEnterpriseId) { - this.area1JoinByEnterpriseId = area1JoinByEnterpriseId; - } - - public String getArea2JoinByEnterpriseId() { - return area2JoinByEnterpriseId; - } - - public void setArea2JoinByEnterpriseId(String area2JoinByEnterpriseId) { - this.area2JoinByEnterpriseId = area2JoinByEnterpriseId; - } - - public String getArea3JoinByEnterpriseId() { - return area3JoinByEnterpriseId; - } - - public void setArea3JoinByEnterpriseId(String area3JoinByEnterpriseId) { - this.area3JoinByEnterpriseId = area3JoinByEnterpriseId; - } - - public String getArea4JoinByEnterpriseId() { - return area4JoinByEnterpriseId; - } - - public void setArea4JoinByEnterpriseId(String area4JoinByEnterpriseId) { - this.area4JoinByEnterpriseId = area4JoinByEnterpriseId; - } - - public String getArea5JoinByEnterpriseId() { - return area5JoinByEnterpriseId; - } - - public void setArea5JoinByEnterpriseId(String area5JoinByEnterpriseId) { - this.area5JoinByEnterpriseId = area5JoinByEnterpriseId; - } - - public String getAddressJoinByEnterpriseId() { - return addressJoinByEnterpriseId; - } - - public void setAddressJoinByEnterpriseId(String addressJoinByEnterpriseId) { - this.addressJoinByEnterpriseId = addressJoinByEnterpriseId; - } - - public String getIndustryJoinByEnterpriseId() { - return industryJoinByEnterpriseId; - } - - public void setIndustryJoinByEnterpriseId(String industryJoinByEnterpriseId) { - this.industryJoinByEnterpriseId = industryJoinByEnterpriseId; - } - - public String getIndustryDictionaryName() { - return industryDictionaryName; - } - - public void setIndustryDictionaryName(String industryDictionaryName) { - this.industryDictionaryName = industryDictionaryName; - } - - public String getEngagedCountJoinByEnterpriseId() { - return engagedCountJoinByEnterpriseId; - } - - public void setEngagedCountJoinByEnterpriseId(String engagedCountJoinByEnterpriseId) { - this.engagedCountJoinByEnterpriseId = engagedCountJoinByEnterpriseId; - } - - public String getRiskOperationJoinByEnterpriseId() { - return riskOperationJoinByEnterpriseId; - } - - public void setRiskOperationJoinByEnterpriseId(String riskOperationJoinByEnterpriseId) { - this.riskOperationJoinByEnterpriseId = riskOperationJoinByEnterpriseId; - } - - public String getRiskOperationDictionaryName() { - return riskOperationDictionaryName; - } - - public void setRiskOperationDictionaryName(String riskOperationDictionaryName) { - this.riskOperationDictionaryName = riskOperationDictionaryName; - } - - public String getMasterJoinByEnterpriseId() { - return masterJoinByEnterpriseId; - } - - public void setMasterJoinByEnterpriseId(String masterJoinByEnterpriseId) { - this.masterJoinByEnterpriseId = masterJoinByEnterpriseId; - } - - public String getPhoneJoinByEnterpriseId() { - return phoneJoinByEnterpriseId; - } - - public void setPhoneJoinByEnterpriseId(String phoneJoinByEnterpriseId) { - this.phoneJoinByEnterpriseId = phoneJoinByEnterpriseId; + public void setCheckLng(String checkLng) { + this.checkLng = checkLng; } public int getCheckType() { @@ -245,12 +114,252 @@ public class CounterCheckListBean { this.checkType = checkType; } - public int getIsCoordination() { - return isCoordination; + public String getCreator() { + return creator; } - public void setIsCoordination(int isCoordination) { - this.isCoordination = isCoordination; + public void setCreator(String creator) { + this.creator = creator; + } + + public String getCreatorName() { + return creatorName; + } + + public void setCreatorName(String creatorName) { + this.creatorName = creatorName; + } + + public String getCreatorPhone() { + return creatorPhone; + } + + public void setCreatorPhone(String creatorPhone) { + this.creatorPhone = creatorPhone; + } + + public String getEnterpriseAddress() { + return enterpriseAddress; + } + + public void setEnterpriseAddress(String enterpriseAddress) { + this.enterpriseAddress = enterpriseAddress; + } + + public String getEnterpriseArea1() { + return enterpriseArea1; + } + + public void setEnterpriseArea1(String enterpriseArea1) { + this.enterpriseArea1 = enterpriseArea1; + } + + public String getEnterpriseArea1Name() { + return enterpriseArea1Name; + } + + public void setEnterpriseArea1Name(String enterpriseArea1Name) { + this.enterpriseArea1Name = enterpriseArea1Name; + } + + public String getEnterpriseArea2() { + return enterpriseArea2; + } + + public void setEnterpriseArea2(String enterpriseArea2) { + this.enterpriseArea2 = enterpriseArea2; + } + + public String getEnterpriseArea2Name() { + return enterpriseArea2Name; + } + + public void setEnterpriseArea2Name(String enterpriseArea2Name) { + this.enterpriseArea2Name = enterpriseArea2Name; + } + + public String getEnterpriseArea3() { + return enterpriseArea3; + } + + public void setEnterpriseArea3(String enterpriseArea3) { + this.enterpriseArea3 = enterpriseArea3; + } + + public String getEnterpriseArea3Name() { + return enterpriseArea3Name; + } + + public void setEnterpriseArea3Name(String enterpriseArea3Name) { + this.enterpriseArea3Name = enterpriseArea3Name; + } + + public String getEnterpriseArea4() { + return enterpriseArea4; + } + + public void setEnterpriseArea4(String enterpriseArea4) { + this.enterpriseArea4 = enterpriseArea4; + } + + public String getEnterpriseArea4Name() { + return enterpriseArea4Name; + } + + public void setEnterpriseArea4Name(String enterpriseArea4Name) { + this.enterpriseArea4Name = enterpriseArea4Name; + } + + public String getEnterpriseArea5() { + return enterpriseArea5; + } + + public void setEnterpriseArea5(String enterpriseArea5) { + this.enterpriseArea5 = enterpriseArea5; + } + + public String getEnterpriseArea5Name() { + return enterpriseArea5Name; + } + + public void setEnterpriseArea5Name(String enterpriseArea5Name) { + this.enterpriseArea5Name = enterpriseArea5Name; + } + + public String getEnterpriseEngagedCount() { + return enterpriseEngagedCount; + } + + public void setEnterpriseEngagedCount(String enterpriseEngagedCount) { + this.enterpriseEngagedCount = enterpriseEngagedCount; + } + + public String getEnterpriseFactoryGate() { + return enterpriseFactoryGate; + } + + public void setEnterpriseFactoryGate(String enterpriseFactoryGate) { + this.enterpriseFactoryGate = enterpriseFactoryGate; + } + + public String getEnterpriseId() { + return enterpriseId; + } + + public void setEnterpriseId(String enterpriseId) { + this.enterpriseId = enterpriseId; + } + + public String getEnterpriseIndustry() { + return enterpriseIndustry; + } + + public void setEnterpriseIndustry(String enterpriseIndustry) { + this.enterpriseIndustry = enterpriseIndustry; + } + + public String getEnterpriseIndustryName() { + return enterpriseIndustryName; + } + + public void setEnterpriseIndustryName(String enterpriseIndustryName) { + this.enterpriseIndustryName = enterpriseIndustryName; + } + + public String getEnterpriseLat() { + return enterpriseLat; + } + + public void setEnterpriseLat(String enterpriseLat) { + this.enterpriseLat = enterpriseLat; + } + + public String getEnterpriseLng() { + return enterpriseLng; + } + + public void setEnterpriseLng(String enterpriseLng) { + this.enterpriseLng = enterpriseLng; + } + + public String getEnterpriseMaster() { + return enterpriseMaster; + } + + public void setEnterpriseMaster(String enterpriseMaster) { + this.enterpriseMaster = enterpriseMaster; + } + + public String getEnterpriseName() { + return enterpriseName; + } + + public void setEnterpriseName(String enterpriseName) { + this.enterpriseName = enterpriseName; + } + + public String getEnterprisePhone() { + return enterprisePhone; + } + + public void setEnterprisePhone(String enterprisePhone) { + this.enterprisePhone = enterprisePhone; + } + + public String getEnterpriseRiskOperation() { + return enterpriseRiskOperation; + } + + public void setEnterpriseRiskOperation(String enterpriseRiskOperation) { + this.enterpriseRiskOperation = enterpriseRiskOperation; + } + + public String getEnterpriseRiskOperationName() { + return enterpriseRiskOperationName; + } + + public void setEnterpriseRiskOperationName(String enterpriseRiskOperationName) { + this.enterpriseRiskOperationName = enterpriseRiskOperationName; + } + + public String getEnterpriseType() { + return enterpriseType; + } + + public void setEnterpriseType(String enterpriseType) { + this.enterpriseType = enterpriseType; + } + + public String getEnterpriseTypeName() { + return enterpriseTypeName; + } + + public void setEnterpriseTypeName(String enterpriseTypeName) { + this.enterpriseTypeName = enterpriseTypeName; + } + + public String getEnterpriseWorkplace() { + return enterpriseWorkplace; + } + + public void setEnterpriseWorkplace(String enterpriseWorkplace) { + this.enterpriseWorkplace = enterpriseWorkplace; + } + + public String getGmtCreate() { + return gmtCreate; + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public int getImmediatelyChangeType() { + return immediatelyChangeType; + } + + public void setImmediatelyChangeType(int immediatelyChangeType) { + this.immediatelyChangeType = immediatelyChangeType; } public int getIsComplete() { @@ -261,12 +370,256 @@ public class CounterCheckListBean { this.isComplete = isComplete; } - public String getGmtCreate() { - return gmtCreate; + public int getIsCoordination() { + return isCoordination; } - public void setGmtCreate(String gmtCreate) { - this.gmtCreate = gmtCreate; + public void setIsCoordination(int isCoordination) { + this.isCoordination = isCoordination; + } + + 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 getSummary() { + return summary; + } + + public void setSummary(String summary) { + this.summary = summary; + } + + public String getTaskCheckId() { + return taskCheckId; + } + + public void setTaskCheckId(String taskCheckId) { + this.taskCheckId = taskCheckId; + } + + public List getCheckItems() { + return checkItems; + } + + public void setCheckItems(List checkItems) { + this.checkItems = checkItems; + } + + public static class CheckItemsBean { + private String checkItemId; + private int checkItemListType; + private String checkItemName; + private String checkItemParentId; + private String checkItemSummary; + private int checkItemType; + private int isMustCheck; + private String taskEnterpriseId; + private String taskId; + private List checkItemOptions; + + public String getCheckItemId() { + return checkItemId; + } + + public void setCheckItemId(String checkItemId) { + this.checkItemId = checkItemId; + } + + public int getCheckItemListType() { + return checkItemListType; + } + + public void setCheckItemListType(int checkItemListType) { + this.checkItemListType = checkItemListType; + } + + public String getCheckItemName() { + return checkItemName; + } + + public void setCheckItemName(String checkItemName) { + this.checkItemName = checkItemName; + } + + public String getCheckItemParentId() { + return checkItemParentId; + } + + public void setCheckItemParentId(String checkItemParentId) { + this.checkItemParentId = checkItemParentId; + } + + public String getCheckItemSummary() { + return checkItemSummary; + } + + public void setCheckItemSummary(String checkItemSummary) { + this.checkItemSummary = checkItemSummary; + } + + public int getCheckItemType() { + return checkItemType; + } + + public void setCheckItemType(int checkItemType) { + this.checkItemType = checkItemType; + } + + public int getIsMustCheck() { + return isMustCheck; + } + + public void setIsMustCheck(int isMustCheck) { + this.isMustCheck = isMustCheck; + } + + public String getTaskEnterpriseId() { + return taskEnterpriseId; + } + + public void setTaskEnterpriseId(String taskEnterpriseId) { + this.taskEnterpriseId = taskEnterpriseId; + } + + public String getTaskId() { + return taskId; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public List getCheckItemOptions() { + return checkItemOptions; + } + + public void setCheckItemOptions(List checkItemOptions) { + this.checkItemOptions = checkItemOptions; + } + + public static class CheckItemOptionsBean { + private String checkItemId; + private int checkItemIsWrong; + private String checkItemOptionId; + private String checkItemOptionName; + private int checkItemOptionType; + private String checkItemOptionUnit; + private String checkResult; + private int isWrong; + private String name; + private String scenePhotos; + private int type; + private String unit; + + public String getCheckItemId() { + return checkItemId; + } + + public void setCheckItemId(String checkItemId) { + this.checkItemId = checkItemId; + } + + public int getCheckItemIsWrong() { + return checkItemIsWrong; + } + + public void setCheckItemIsWrong(int checkItemIsWrong) { + this.checkItemIsWrong = checkItemIsWrong; + } + + public String getCheckItemOptionId() { + return checkItemOptionId; + } + + public void setCheckItemOptionId(String checkItemOptionId) { + this.checkItemOptionId = checkItemOptionId; + } + + public String getCheckItemOptionName() { + return checkItemOptionName; + } + + public void setCheckItemOptionName(String checkItemOptionName) { + this.checkItemOptionName = checkItemOptionName; + } + + public int getCheckItemOptionType() { + return checkItemOptionType; + } + + public void setCheckItemOptionType(int checkItemOptionType) { + this.checkItemOptionType = checkItemOptionType; + } + + public String getCheckItemOptionUnit() { + return checkItemOptionUnit; + } + + public void setCheckItemOptionUnit(String checkItemOptionUnit) { + this.checkItemOptionUnit = checkItemOptionUnit; + } + + public String getCheckResult() { + return checkResult; + } + + public void setCheckResult(String checkResult) { + this.checkResult = checkResult; + } + + public int getIsWrong() { + return isWrong; + } + + public void setIsWrong(int isWrong) { + this.isWrong = isWrong; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getScenePhotos() { + return scenePhotos; + } + + public void setScenePhotos(String scenePhotos) { + this.scenePhotos = scenePhotos; + } + + public int getType() { + return type; + } + + public void setType(int type) { + this.type = type; + } + + public String getUnit() { + return unit; + } + + public void setUnit(String unit) { + this.unit = unit; + } + } } } } \ No newline at end of file diff --git a/app/src/main/java/com/sucstepsoft/txrealtimelocation/beans/DistrictPersonBean.java b/app/src/main/java/com/sucstepsoft/txrealtimelocation/beans/DistrictPersonBean.java new file mode 100644 index 0000000..bf44341 --- /dev/null +++ b/app/src/main/java/com/sucstepsoft/txrealtimelocation/beans/DistrictPersonBean.java @@ -0,0 +1,227 @@ +package com.sucstepsoft.txrealtimelocation.beans; + +/** + * 作者: adam + * 日期: 2021/7/19 - 5:55 下午 + * 邮箱: itgaojian@163.com + * 描述: + */ +public class DistrictPersonBean { + + private String area1; + private String area1Name; + private String area2; + private String area2Name; + private String area3; + private String area3Name; + private String area4; + private String area4Name; + private String area5; + private String area5Name; + private String gridPersonnelId; + private String gridType; + private String industryId; + private String leaderUserId; + private String leaderUserName; + private int level; + private String personType; + private String userBirth; + private String userExplain; + private String userId; + private String userName; + private String userNation; + private String userPhone; + private String userSex; + + public String getArea1() { + return area1; + } + + public void setArea1(String area1) { + this.area1 = area1; + } + + public String getArea1Name() { + return area1Name; + } + + public void setArea1Name(String area1Name) { + this.area1Name = area1Name; + } + + public String getArea2() { + return area2; + } + + public void setArea2(String area2) { + this.area2 = area2; + } + + public String getArea2Name() { + return area2Name; + } + + public void setArea2Name(String area2Name) { + this.area2Name = area2Name; + } + + public String getArea3() { + return area3; + } + + public void setArea3(String area3) { + this.area3 = area3; + } + + public String getArea3Name() { + return area3Name; + } + + public void setArea3Name(String area3Name) { + this.area3Name = area3Name; + } + + public String getArea4() { + return area4; + } + + public void setArea4(String area4) { + this.area4 = area4; + } + + public String getArea4Name() { + return area4Name; + } + + public void setArea4Name(String area4Name) { + this.area4Name = area4Name; + } + + public String getArea5() { + return area5; + } + + public void setArea5(String area5) { + this.area5 = area5; + } + + public String getArea5Name() { + return area5Name; + } + + public void setArea5Name(String area5Name) { + this.area5Name = area5Name; + } + + public String getGridPersonnelId() { + return gridPersonnelId; + } + + public void setGridPersonnelId(String gridPersonnelId) { + this.gridPersonnelId = gridPersonnelId; + } + + public String getGridType() { + return gridType; + } + + public void setGridType(String gridType) { + this.gridType = gridType; + } + + public String getIndustryId() { + return industryId; + } + + public void setIndustryId(String industryId) { + this.industryId = industryId; + } + + public String getLeaderUserId() { + return leaderUserId; + } + + public void setLeaderUserId(String leaderUserId) { + this.leaderUserId = leaderUserId; + } + + public String getLeaderUserName() { + return leaderUserName; + } + + public void setLeaderUserName(String leaderUserName) { + this.leaderUserName = leaderUserName; + } + + public int getLevel() { + return level; + } + + public void setLevel(int level) { + this.level = level; + } + + public String getPersonType() { + return personType; + } + + public void setPersonType(String personType) { + this.personType = personType; + } + + public String getUserBirth() { + return userBirth; + } + + public void setUserBirth(String userBirth) { + this.userBirth = userBirth; + } + + public String getUserExplain() { + return userExplain; + } + + public void setUserExplain(String userExplain) { + this.userExplain = userExplain; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getUserNation() { + return userNation; + } + + public void setUserNation(String userNation) { + this.userNation = userNation; + } + + public String getUserPhone() { + return userPhone; + } + + public void setUserPhone(String userPhone) { + this.userPhone = userPhone; + } + + public String getUserSex() { + return userSex; + } + + public void setUserSex(String userSex) { + this.userSex = userSex; + } +} diff --git a/app/src/main/java/com/sucstepsoft/txrealtimelocation/beans/LogListBean.java b/app/src/main/java/com/sucstepsoft/txrealtimelocation/beans/LogListBean.java new file mode 100644 index 0000000..e5ba5a0 --- /dev/null +++ b/app/src/main/java/com/sucstepsoft/txrealtimelocation/beans/LogListBean.java @@ -0,0 +1,101 @@ +package com.sucstepsoft.txrealtimelocation.beans; + +/** + * 作者: adam + * 日期: 2021/7/20 - 11:12 上午 + * 邮箱: itgaojian@163.com + * 描述: + */ +public class LogListBean { + + private String description; + private String endTime; + private String handleDuration; + private String handlerUserId; + private String handlerUserName; + private String handlerUserPhone; + private String name; + private String startTime; + private String summary; + private String time; + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getHandleDuration() { + return handleDuration; + } + + public void setHandleDuration(String handleDuration) { + this.handleDuration = handleDuration; + } + + public String getHandlerUserId() { + return handlerUserId; + } + + public void setHandlerUserId(String handlerUserId) { + this.handlerUserId = handlerUserId; + } + + public String getHandlerUserName() { + return handlerUserName; + } + + public void setHandlerUserName(String handlerUserName) { + this.handlerUserName = handlerUserName; + } + + public String getHandlerUserPhone() { + return handlerUserPhone; + } + + public void setHandlerUserPhone(String handlerUserPhone) { + this.handlerUserPhone = handlerUserPhone; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getSummary() { + return summary; + } + + public void setSummary(String summary) { + this.summary = summary; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } +} diff --git a/app/src/main/java/com/sucstepsoft/txrealtimelocation/fragments/issue/CaseListFragment.java b/app/src/main/java/com/sucstepsoft/txrealtimelocation/fragments/issue/CaseListFragment.java new file mode 100755 index 0000000..369240c --- /dev/null +++ b/app/src/main/java/com/sucstepsoft/txrealtimelocation/fragments/issue/CaseListFragment.java @@ -0,0 +1,470 @@ +package com.sucstepsoft.txrealtimelocation.fragments.issue; + +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.txrealtimelocation.R; +import com.sucstepsoft.txrealtimelocation.activitys.trouble.CaseCheckOptionsActivity; +import com.sucstepsoft.txrealtimelocation.adapters.CaseListAdapter; +import com.sucstepsoft.txrealtimelocation.adapters.IssueSubAdapter; +import com.sucstepsoft.txrealtimelocation.beans.CaseListBean; +import com.sucstepsoft.txrealtimelocation.beans.IssueSubBean; +import com.sucstepsoft.txrealtimelocation.net.LocationApiService; +import com.sucstepsoft.txrealtimelocation.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 + * 日期: 2019/7/30 - 09:31 + * 邮箱: itgaojian@163.com + * 描述: 我的待办任务 + */ +public class CaseListFragment extends LazyFragment { + public static final String GRID_GRID = "grid";//网格员 + public static final String GRID_STREET = "street";//乡镇街道管理员 + public static final String GRID_DISTRICT = "district";//旗县区管理员 + public static final String GRID_DISTRICT_DEPARTMENT = "districtDepartment";//旗县区委办局管理员 + public static final String GRID_CITY = "city";//市管理员 + @BindView(R.id.rlv_items) + XRecyclerView mRlvItems; + private List mDatas; + private CaseListAdapter mAdapter; + private String mRows = "20"; + private int mCurPage = 1; + private int mType = 1; + private Unbinder mBind; + private Activity mActivity; + private Disposable mDisDis; + private Disposable mDisAppoint; + private String mPersonType; + + @Override + protected void onCreateViewLazy(Bundle savedInstanceState) { + super.onCreateViewLazy(savedInstanceState); + View view = LayoutInflater.from(mActivity).inflate(R.layout.fragment_case_list, null); + setContentView(view); + mBind = ButterKnife.bind(this, view); + mDatas = new ArrayList<>(); + mAdapter = new CaseListAdapter(mActivity, mDatas); + 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(); + } + }); + + mPersonType = UserLgUtils.getPersonType(); + switch (mPersonType) { + case GRID_GRID: + break; + case GRID_STREET: + getStreetList(mCurPage); + break; + case GRID_DISTRICT: + getDistrictList(mCurPage); + break; + case GRID_DISTRICT_DEPARTMENT: + getDistrictDepartmentList(mCurPage); + break; + case GRID_CITY: + getCityList(mCurPage); + break; + } + } + + /** + * 显示详情 + * + * @param bean + */ + private void showIssueDetail(CaseListBean.RowsBean bean) { + Intent intent = new Intent(mActivity, CaseCheckOptionsActivity.class); + intent.putExtra("checkId", bean.getCheckId()); + intent.putExtra("name", bean.getEnterpriseName()); + intent.putExtra("peo", bean.getEnterpriseMaster()); + intent.putExtra("enId", bean.getEnterpriseId()); + startActivityForResult(intent, 123); + } + + @Override + protected void onFragmentStartLazy() { + super.onFragmentStartLazy(); + } + + @Override + public void onAttach(Activity activity) { + super.onAttach(activity); + this.mActivity = activity; + } + + @Override + public void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); + if (requestCode == 123) { + if (resultCode == 223) { + refresh(); + } + } + + } + + private void refresh() { + mDatas.clear(); + mAdapter.setData(mDatas); + switch (mPersonType) { + case GRID_GRID: + break; + case GRID_STREET: + getStreetList(1); + break; + case GRID_DISTRICT: + getDistrictList(1); + break; + case GRID_DISTRICT_DEPARTMENT: + getDistrictDepartmentList(1); + break; + case GRID_CITY: + getCityList(1); + break; + } + } + + private void loadMore() { + switch (mPersonType) { + case GRID_GRID: + break; + case GRID_STREET: + getStreetList(mCurPage); + break; + case GRID_DISTRICT: + getDistrictList(mCurPage); + break; + case GRID_DISTRICT_DEPARTMENT: + getDistrictDepartmentList(mCurPage); + break; + case GRID_CITY: + getCityList(mCurPage); + break; + } + } + + /** + * 刷新视图 + * + * @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 (mDisDis != null && !mDisDis.isDisposed()) { + mDisDis.dispose(); + } + mRlvItems.destroy(); + mRlvItems = null; + mBind.unbind(); + mAdapter = null; + mDatas = null; + } + + /** + * 我的街道案件 + */ + private void getStreetList(int page) { + mCurPage = page; + RetrofitManager.getInstance() + .create(LocationApiService.class) + .getMineStreetCaseList(mCurPage + "", UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + mDisAppoint = d; + } + + @Override + public void onNext(CaseListBean 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 getDistrictList(int page) { + mCurPage = page; + RetrofitManager.getInstance() + .create(LocationApiService.class) + .getMineDistrictCaseList(mCurPage + "", UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + mDisAppoint = d; + } + + @Override + public void onNext(CaseListBean 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 getDistrictDepartmentList(int page) { + mCurPage = page; + RetrofitManager.getInstance() + .create(LocationApiService.class) + .getMineDistrictDepartmentCaseList(mCurPage + "", UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + mDisAppoint = d; + } + + @Override + public void onNext(CaseListBean 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 getCityList(int page) { + mCurPage = page; + RetrofitManager.getInstance() + .create(LocationApiService.class) + .getMineCityCaseList(mCurPage + "", UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + mDisAppoint = d; + } + + @Override + public void onNext(CaseListBean 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() { + + } + }); + } + +} diff --git a/app/src/main/java/com/sucstepsoft/txrealtimelocation/fragments/issue/CaseListHistoryFragment.java b/app/src/main/java/com/sucstepsoft/txrealtimelocation/fragments/issue/CaseListHistoryFragment.java new file mode 100755 index 0000000..a092f8a --- /dev/null +++ b/app/src/main/java/com/sucstepsoft/txrealtimelocation/fragments/issue/CaseListHistoryFragment.java @@ -0,0 +1,269 @@ +package com.sucstepsoft.txrealtimelocation.fragments.issue; + +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.txrealtimelocation.R; +import com.sucstepsoft.txrealtimelocation.activitys.trouble.CaseCheckOptionsActivity; +import com.sucstepsoft.txrealtimelocation.activitys.trouble.CaseCheckOptionsDetailActivity; +import com.sucstepsoft.txrealtimelocation.adapters.CaseListAdapter; +import com.sucstepsoft.txrealtimelocation.adapters.IssueSubAdapter; +import com.sucstepsoft.txrealtimelocation.beans.CaseListBean; +import com.sucstepsoft.txrealtimelocation.beans.IssueSubBean; +import com.sucstepsoft.txrealtimelocation.net.LocationApiService; +import com.sucstepsoft.txrealtimelocation.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 + * 日期: 2019/7/30 - 09:31 + * 邮箱: itgaojian@163.com + * 描述: 我的待办任务 + */ +public class CaseListHistoryFragment extends LazyFragment { + public static final String GRID_GRID = "grid";//网格员 + public static final String GRID_STREET = "street";//乡镇街道管理员 + public static final String GRID_DISTRICT = "district";//旗县区管理员 + public static final String GRID_DISTRICT_DEPARTMENT = "districtDepartment";//旗县区委办局管理员 + public static final String GRID_CITY = "city";//市管理员 + @BindView(R.id.rlv_items) + XRecyclerView mRlvItems; + private List mDatas; + private CaseListAdapter mAdapter; + private String mRows = "20"; + private int mCurPage = 1; + private int mType = 1; + private Unbinder mBind; + private Activity mActivity; + private Disposable mDisDis; + private Disposable mDisAppoint; + private String mPersonType; + + @Override + protected void onCreateViewLazy(Bundle savedInstanceState) { + super.onCreateViewLazy(savedInstanceState); + View view = LayoutInflater.from(mActivity).inflate(R.layout.fragment_case_history_list, null); + setContentView(view); + mBind = ButterKnife.bind(this, view); + mDatas = new ArrayList<>(); + mAdapter = new CaseListAdapter(mActivity, mDatas); + 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(); + } + }); + + mPersonType = UserLgUtils.getPersonType(); + getStreetList(mCurPage); + + } + + /** + * 显示详情 + * + * @param bean + */ + private void showIssueDetail(CaseListBean.RowsBean bean) { + Intent intent = new Intent(mActivity, CaseCheckOptionsDetailActivity.class); + intent.putExtra("checkId", bean.getCheckId()); + intent.putExtra("name", bean.getEnterpriseName()); + intent.putExtra("peo", bean.getEnterpriseMaster()); + intent.putExtra("enId", bean.getEnterpriseId()); + startActivityForResult(intent, 123); + } + + @Override + protected void onFragmentStartLazy() { + super.onFragmentStartLazy(); + } + + @Override + public void onAttach(Activity activity) { + super.onAttach(activity); + this.mActivity = activity; + } + + @Override + public void onActivityResult(int requestCode, int resultCode, Intent data) { + super.onActivityResult(requestCode, resultCode, data); + if (requestCode == 123) { + if (resultCode == 223) { + refresh(); + } + } + + } + + private void refresh() { + mDatas.clear(); + mAdapter.setData(mDatas); + getStreetList(1); +// switch (mPersonType) { +// case GRID_GRID: +// break; +// case GRID_STREET: +// +// break; +// case GRID_DISTRICT: +// getDistrictList(1); +// break; +// case GRID_DISTRICT_DEPARTMENT: +// getDistrictDepartmentList(1); +// break; +// case GRID_CITY: +// getCityList(1); +// break; +// } + } + + private void loadMore() { + getStreetList(mCurPage); +// switch (mPersonType) { +// case GRID_GRID: +// break; +// case GRID_STREET: +// +// break; +// case GRID_DISTRICT: +// getDistrictList(mCurPage); +// break; +// case GRID_DISTRICT_DEPARTMENT: +// getDistrictDepartmentList(mCurPage); +// break; +// case GRID_CITY: +// getCityList(mCurPage); +// break; +// } + } + + /** + * 刷新视图 + * + * @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 (mDisDis != null && !mDisDis.isDisposed()) { + mDisDis.dispose(); + } + mRlvItems.destroy(); + mRlvItems = null; + mBind.unbind(); + mAdapter = null; + mDatas = null; + } + + /** + * 我的街道案件 + */ + private void getStreetList(int page) { + mCurPage = page; + RetrofitManager.getInstance() + .create(LocationApiService.class) + .getMineHistoryStreetCaseList(mCurPage + "", UserLgUtils.getToken()) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(Disposable d) { + mDisAppoint = d; + } + + @Override + public void onNext(CaseListBean 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() { + + } + }); + } + +} diff --git a/app/src/main/java/com/sucstepsoft/txrealtimelocation/net/LocationApiService.java b/app/src/main/java/com/sucstepsoft/txrealtimelocation/net/LocationApiService.java index 37ede19..4681823 100755 --- a/app/src/main/java/com/sucstepsoft/txrealtimelocation/net/LocationApiService.java +++ b/app/src/main/java/com/sucstepsoft/txrealtimelocation/net/LocationApiService.java @@ -8,7 +8,9 @@ import com.sucstepsoft.txrealtimelocation.beans.AreaListBean; import com.sucstepsoft.txrealtimelocation.beans.BaseDictionaryBean; import com.sucstepsoft.txrealtimelocation.beans.BaseUserBean; import com.sucstepsoft.txrealtimelocation.beans.BaseUserInfo; +import com.sucstepsoft.txrealtimelocation.beans.CaseDetailBean; import com.sucstepsoft.txrealtimelocation.beans.CaseFlowBean; +import com.sucstepsoft.txrealtimelocation.beans.CaseListBean; import com.sucstepsoft.txrealtimelocation.beans.CheckItemOption; import com.sucstepsoft.txrealtimelocation.beans.CheckOptionsbean; import com.sucstepsoft.txrealtimelocation.beans.CheckSignBean; @@ -20,12 +22,14 @@ import com.sucstepsoft.txrealtimelocation.beans.CounterCheckListBean; import com.sucstepsoft.txrealtimelocation.beans.CounterCheckOptionsBean; import com.sucstepsoft.txrealtimelocation.beans.DepartmentBean; import com.sucstepsoft.txrealtimelocation.beans.DictBean; +import com.sucstepsoft.txrealtimelocation.beans.DistrictPersonBean; import com.sucstepsoft.txrealtimelocation.beans.GirdPBean; import com.sucstepsoft.txrealtimelocation.beans.HistoryDetialBean; import com.sucstepsoft.txrealtimelocation.beans.HistoryMissionBean; import com.sucstepsoft.txrealtimelocation.beans.IssueSubBean; import com.sucstepsoft.txrealtimelocation.beans.LeaveDetailBean; import com.sucstepsoft.txrealtimelocation.beans.LeaveListBean; +import com.sucstepsoft.txrealtimelocation.beans.LogListBean; import com.sucstepsoft.txrealtimelocation.beans.MainNumBean; import com.sucstepsoft.txrealtimelocation.beans.MineCompany; import com.sucstepsoft.txrealtimelocation.beans.MineCountBean; @@ -96,17 +100,19 @@ public interface LocationApiService { @Headers({"Content-Type: application/json", "Accept: application/json"}) @GET("appversion/getappversionnumber/{appVersionId}") Observable doCheckAppVersion(@Path("appVersionId") String appVersionId, @Header("token") String token); + @Headers({"Content-Type:application/json", "Accept:application/json"}) @GET("user/getappuser") Observable getUserInfo(@Header("token") String token); + /** * 更新用户基本信息 */ @Headers({"Content-Type:application/json", "Accept:application/json"}) @PUT("user/updateuserinfo") Observable editUserInfo(@Body RequestBody body, @Header("token") String token); + /** - * * 获取字典 * * @param id @@ -115,6 +121,7 @@ public interface LocationApiService { @Headers({"Content-Type:application/json", "Accept:application/json"}) @GET("datadictionary/listdictionarybyparentid/{dictionaryParentId}") Observable> getSystemDictionary(@Path("dictionaryParentId") String id, @Header("token") String token); + /** * 校验上午是否已经签到 * @@ -134,6 +141,7 @@ public interface LocationApiService { @Headers({"base_url_name:dict", "Content-Type:application/json", "Accept:application/json"}) @GET("app/usersignout/getcheckusersignout") Observable checkSignOff(@Header("token") String token); + /** * 获取用户基本信息 */ @@ -141,6 +149,7 @@ public interface LocationApiService { @Headers({"Content-Type:application/json", "Accept:application/json"}) @GET("user/getuserinfo") Observable getBaseUserInfo(@Header("token") String token); + /** * 签到 * @@ -705,7 +714,7 @@ public interface LocationApiService { //保存检查结果 @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) - @POST("check/savecheck") + @POST("check2/save") Observable doSaveOptions(@Body RequestBody leaveBody, @Header("token") String token); //绑定企业 @@ -723,89 +732,89 @@ public interface LocationApiService { //复查列表 @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) - @GET("check/listpagerecheckofmine") + @GET("check2/listpage-recheck-of-mine") Observable getCounterCheckList(@Query("page") String page, @Header("token") String token); //复查列表-name @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) - @GET("check/listpagerecheckofmine") + @GET("check2/listpage-recheck-of-mine") Observable getCounterCheckListByName(@Query("page") String page, @Query("keywords") String name, @Header("token") String token); //复查列表-type @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) - @GET("check/listpagerecheckofmine") + @GET("check2/listpage-recheck-of-mine") Observable getCounterCheckListByType(@Query("page") String page, @Query("type") String type, @Header("token") String token); //复查列表-all @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) - @GET("check/listpagerecheckofmine") + @GET("check2/listpage-recheck-of-mine") Observable getCounterCheckListByAll(@Query("page") String page, @Query("keywords") String name, @Query("type") String type, @Header("token") String token); //获取复查项列表 //GET /app/check/listcheckitemunpassbycheckid/{checkId} @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) - @GET("check/listcheckitemunpassbycheckid/{checkId}") + @GET("check2/list-check-item-unpass/{checkId}") Observable> getCounterCheckOptions(@Path("checkId") String checkId, @Header("token") String token); //保存复查结果 @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) - @POST("check/saverecheck/{checkId}") + @POST("check2/save-re/{checkId}") Observable doSaveCounterCheckOptions(@Body RequestBody leaveBody, @Path("checkId") String checkId, @Header("token") String token); //我的历史任务列表 //check/listpagecheckofmine @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) - @GET("check/listpagecheckofmine") + @GET("check2/listpage-check-of-mine") Observable getMineCheckList(@Query("page") String page, @Header("token") String token); //历史任务-name @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) - @GET("check/listpagecheckofmine") + @GET("check2/listpage-check-of-mine") Observable getMineCheckListByName(@Query("page") String page, @Query("keywords") String name, @Header("token") String token); //历史任务-type @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) - @GET("check/listpagecheckofmine") + @GET("check2/listpage-check-of-mine") Observable getMineCheckListByType(@Query("page") String page, @Query("type") String type, @Header("token") String token); //历史任务-all @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) - @GET("check/listpagecheckofmine") + @GET("check2/listpage-check-of-mine") Observable getMineCheckListByAll(@Query("page") String page, @Query("keywords") String name, @Query("type") String type, @Header("token") String token); //我的历史任务列表 //check/listpagecheckofmine @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) - @GET("check/listpagecheckofmine") + @GET("check2/listpage-check-of-mine") Observable getMineCheckListByMouth(@Query("page") String page, @Query("checkMonth") String mouth, @Query("checkType") String cType, @Header("token") String token); //历史任务-name @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) - @GET("check/listpagecheckofmine") + @GET("check2/listpage-check-of-mine") Observable getMineCheckListByNameByMouth(@Query("page") String page, @Query("keywords") String name, @Query("checkMonth") String mouth, @Query("checkType") String cType, @Header("token") String token); //历史任务-type @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) - @GET("check/listpagecheckofmine") + @GET("check2/listpage-check-of-mine") Observable getMineCheckListByTypeByMouth(@Query("page") String page, @Query("type") String type, @Query("checkMonth") String mouth, @Query("checkType") String cType, @Header("token") String token); //历史任务-all @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) - @GET("check/listpagecheckofmine") + @GET("check2/listpage-check-of-mine") Observable getMineCheckListByAllByMouth(@Query("page") String page, @Query("keywords") String name, @Query("type") String type, @Query("checkMonth") String mouth, @Query("checkType") String cType, @Header("token") String token); //历史任务详情 //check/getcheckbyid/{checkId} @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) - @GET("check/listcheckitembycheckid/{checkId}") + @GET("check2/listcheckitembycheckid/{checkId}") Observable> getHistoryDetail(@Path("checkId") String checkId, @Header("token") String token); //历史任务详情 --- 新接口 @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) - @GET("check/getcheckbyid/{checkId}") + @GET("check2/get/{checkId}") Observable getHistoryDetailById(@Path("checkId") String checkId, @Header("token") String token); //通知列表 @@ -848,7 +857,7 @@ public interface LocationApiService { //获取历史任务数量 //GET /app/check/countcheckofmine @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) - @GET("check/countcheckofmine") + @GET("check2/count-check-of-mine") Observable getHistoryCount(@Header("token") String token); //我的企业数量 @@ -885,6 +894,7 @@ public interface LocationApiService { @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) @GET("publicareareport/getpublicareareportbyid/{publicAreaReportId}") Observable getPublicTroubleDetail(@Path("publicAreaReportId") String pId, @Header("token") String token); + /** * 获取个人字段信息列表 */ @@ -944,5 +954,111 @@ public interface LocationApiService { @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) @GET("count/countcurrentmonthofmine") Observable getMineCount(@Header("token") String token); + + /*=================待办任务=====================*/ + //我的街道案件列表 + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @GET("check2/listpage-street-of-mine") + Observable getMineStreetCaseList(@Query("page") String page, @Header("token") String token); + + //我的旗县区案件列表 + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @GET("check2/listpage-district-of-mine") + Observable getMineDistrictCaseList(@Query("page") String page, @Header("token") String token); + + //我的旗县区委办局案件列表 + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @GET("check2/listpage-district-department-of-mine") + Observable getMineDistrictDepartmentCaseList(@Query("page") String page, @Header("token") String token); + + //我的市案件列表 + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @GET("check2/listpage-city-of-mine") + Observable getMineCityCaseList(@Query("page") String page, @Header("token") String token); + + + /*历史列表*/ + //我的街道历史列表 + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @GET("check2/listpage-history-of-mine") + Observable getMineHistoryStreetCaseList(@Query("page") String page, @Header("token") String token); + + //我的旗县区历史列表 + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @GET("check2/listpage-district-of-mine") + Observable getMineHistoryDistrictCaseList(@Query("page") String page, @Header("token") String token); + + //我的旗县区委办局历史列表 + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @GET("check2/listpage-district-department-of-mine") + Observable getMineHistoryDistrictDepartmentCaseList(@Query("page") String page, @Header("token") String token); + + //我的市历史列表 + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @GET("check2/listpage-city-of-mine") + Observable getMineHistoryCityCaseList(@Query("page") String page, @Header("token") String token); + + + //获取案件详情 + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @GET("check2/get/{checkId}") + Observable getMineCaseDetailById(@Path("checkId") String id, @Header("token") String token); + + //街道案件完成 + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @PUT("check2/update-street-complete/{checkId}") + Observable doCompleteCaseStreet(@Body RequestBody body, @Path("checkId") String checkId, @Header("token") String token); + + //街道案件上级处理 + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @PUT("check2/update-street-to-leader/{checkId}") + Observable doSuperiorCaseStreet(@Body RequestBody body, @Path("checkId") String checkId, @Header("token") String token); + + //旗县区案件回退 + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @PUT("check2/update-district-back/{checkId}") + Observable doDistrictCaseBack(@Body RequestBody body, @Path("checkId") String checkId, @Header("token") String token); + + //旗县区案件完成 + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @PUT("check2/update-district-complete/{checkId}") + Observable doDistrictCaseComplete(@Body RequestBody body, @Path("checkId") String checkId, @Header("token") String token); + + //旗县区案件上报领导 + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @PUT("check2/update-district-to-leader/{checkId}") + Observable doDistrictCaseToLeader(@Body RequestBody body, @Path("checkId") String checkId, @Header("token") String token); + + //旗县区委办局案件回退 + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @PUT("check2/update-district-department-back/{checkId}") + Observable doDistrictDepartmentCaseBack(@Body RequestBody body, @Path("checkId") String checkId, @Header("token") String token); + + //旗县区委办局案件完成 + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @PUT("check2/update-district-department-complete/{checkId}") + Observable doDistrictDepartmentCaseComplete(@Body RequestBody body, @Path("checkId") String checkId, @Header("token") String token); + + + //旗县区委办局案件回退 + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @PUT("check2/update-city-back/{checkId}") + Observable doCityCaseBack(@Body RequestBody body, @Path("checkId") String checkId, @Header("token") String token); + + //旗县区委办局案件完成 + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @PUT("check2/update-city-complete/{checkId}") + Observable doCityCaseComplete(@Body RequestBody body, @Path("checkId") String checkId, @Header("token") String token); + + //获取旗县区领导名单 + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @GET("gridpersonnel/list") + Observable> getDistrictPersonList(@Query("personType") String type, @Header("token") String token); + + //案件日志 GET /app/check2/list-check-log/{checkId} +// LogListBean + @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) + @GET("check2/list-check-log/{checkId}") + Observable> getCaseLogList(@Path("checkId") String checkId, @Header("token") String token); } diff --git a/app/src/main/res/drawable-xhdpi/ic_step_line_ver.9.png b/app/src/main/res/drawable-xhdpi/ic_step_line_ver.9.png old mode 100755 new mode 100644 index 98af06a..8c79e0f Binary files a/app/src/main/res/drawable-xhdpi/ic_step_line_ver.9.png and b/app/src/main/res/drawable-xhdpi/ic_step_line_ver.9.png differ diff --git a/app/src/main/res/layout/activity_case_check_options.xml b/app/src/main/res/layout/activity_case_check_options.xml new file mode 100644 index 0000000..e7167b1 --- /dev/null +++ b/app/src/main/res/layout/activity_case_check_options.xml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + +