检查项添加图片
This commit is contained in:
parent
1c8423f28c
commit
e3154983cd
@ -47,7 +47,10 @@
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
tools:ignore="GoogleAppIndexingWarning">
|
||||
<activity android:name=".activitys.issue.NewCheckOptionsActivity"></activity>
|
||||
<activity
|
||||
android:name=".activitys.issue.NewCheckOptionsActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||
<activity
|
||||
android:name=".activitys.issue.PublicReportActivity"
|
||||
android:screenOrientation="portrait"
|
||||
@ -367,10 +370,10 @@
|
||||
<action android:name="com.sucstepsoft.txrealtimelocation.services.LocationHelperService" />
|
||||
</intent-filter>
|
||||
</service> <!-- since 3.3.0 Required SDK核心功能 -->
|
||||
<service
|
||||
android:name="com.baidu.location.f"
|
||||
android:enabled="true"
|
||||
android:process=":remote" /> <!-- since 3.3.0 Required SDK 核心功能 -->
|
||||
<service
|
||||
android:name="com.baidu.location.f"
|
||||
android:enabled="true"
|
||||
android:process=":remote" /> <!-- since 3.3.0 Required SDK 核心功能 -->
|
||||
<!-- 可配置android:process参数将PushService放在其他进程中 -->
|
||||
<!-- User defined. For test only 继承自cn.jpush.android.service.JCommonService -->
|
||||
<!-- <service -->
|
||||
|
@ -2,10 +2,12 @@ package com.sucstepsoft.txrealtimelocation.activitys.base;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.location.Location;
|
||||
import android.provider.Settings;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
@ -44,6 +46,7 @@ import com.sucstepsoft.txrealtimelocation.activitys.notice.NoticeActivity;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.trouble.SelCompanyActivity;
|
||||
import com.sucstepsoft.txrealtimelocation.adapters.FunctionAdapter;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.AppTokenUser;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.BaseUserBean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.VersionBean;
|
||||
import com.sucstepsoft.txrealtimelocation.net.LocationApiService;
|
||||
import com.sucstepsoft.txrealtimelocation.utils.GpsUtils;
|
||||
@ -97,6 +100,8 @@ public class MainActivity extends BaseActivity {
|
||||
TextView mTvOnline;
|
||||
@BindView(R.id.ll_history)
|
||||
LinearLayout mllHistory;
|
||||
@BindView(R.id.tv_history_num)
|
||||
TextView mTvHistoryNum;
|
||||
private String[] permissions = new String[]{
|
||||
PermissionConstants.STORAGE,
|
||||
PermissionConstants.PHONE,
|
||||
@ -143,6 +148,13 @@ public class MainActivity extends BaseActivity {
|
||||
if (!oPen) {
|
||||
openGpsSetting();
|
||||
}
|
||||
|
||||
|
||||
//tv_history_num
|
||||
//tv_aviso_num
|
||||
// tv_mine_issue_num
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -220,6 +232,123 @@ public class MainActivity extends BaseActivity {
|
||||
mTvState.setText("正常");
|
||||
mTvState.setTextColor(Color.WHITE);
|
||||
checkPermission();
|
||||
// getNumberByMine();
|
||||
// getNumberEnter();
|
||||
// getNumberHistory();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取通知公告、我的企业、历史任务
|
||||
*/
|
||||
private void getNumberByMine() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getArticleCount(UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseUserBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(BaseUserBean baseUserBean) {
|
||||
if (!TextUtils.isEmpty(baseUserBean.getData())) {
|
||||
int i = Integer.parseInt(baseUserBean.getData());
|
||||
if (i >= 100) {
|
||||
mTvAvisoNum.setText("99+");
|
||||
} else {
|
||||
mTvAvisoNum.setText(baseUserBean.getData() + "");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void getNumberEnter() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getMineEnterpriseCount(UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseUserBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(BaseUserBean baseUserBean) {
|
||||
if (!TextUtils.isEmpty(baseUserBean.getData())) {
|
||||
int i = Integer.parseInt(baseUserBean.getData());
|
||||
if (i >= 100) {
|
||||
mTvMineIssueNum.setText("99+");
|
||||
} else {
|
||||
mTvMineIssueNum.setText(baseUserBean.getData() + "");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void getNumberHistory() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getHistoryCount(UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseUserBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(BaseUserBean baseUserBean) {
|
||||
if (!TextUtils.isEmpty(baseUserBean.getData())) {
|
||||
int i = Integer.parseInt(baseUserBean.getData());
|
||||
if (i >= 100) {
|
||||
mTvHistoryNum.setText("99+");
|
||||
} else {
|
||||
mTvHistoryNum.setText(baseUserBean.getData() + "");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private AlertDialog mGpsSettingDialog;
|
||||
@ -385,6 +514,9 @@ public class MainActivity extends BaseActivity {
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
getNumberByMine();
|
||||
getNumberEnter();
|
||||
getNumberHistory();
|
||||
}
|
||||
|
||||
|
||||
|
@ -76,6 +76,8 @@ public class CompanyDetailActivity extends BaseActivity {
|
||||
TextView mTvTrade1;
|
||||
@BindView(R.id.ll_company_info)
|
||||
LinearLayout mLlCompanyInfo;
|
||||
@BindView(R.id.tv_logoff)
|
||||
TextView mTvLogOff;
|
||||
private Unbinder mBind;
|
||||
private CompanyDetailBean mDetailBean;
|
||||
private String mId;
|
||||
@ -142,6 +144,11 @@ public class CompanyDetailActivity extends BaseActivity {
|
||||
|
||||
private void setDataToView() {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
if (mDetailBean.getIsLogOff() == 1) {
|
||||
mTvLogOff.setText("已注销");
|
||||
} else {
|
||||
mTvLogOff.setText("未注销");
|
||||
}
|
||||
mTvArea1.setText(mDetailBean.getArea1DictionaryName());
|
||||
mTvArea2.setText(mDetailBean.getArea2DictionaryName());
|
||||
mTvArea3.setText(mDetailBean.getArea3DictionaryName());
|
||||
|
@ -110,6 +110,8 @@ public class CompanyInfoEditActivity extends BaseActivity {
|
||||
TextView mTvArea2;
|
||||
@BindView(R.id.tv_trade_1)
|
||||
TextView mTvTrade1;
|
||||
@BindView(R.id.tv_logoff)
|
||||
TextView mTvLogOff;//是否注销
|
||||
|
||||
private List<AddPhotoBean> mDoorPhotos;
|
||||
private List<AddPhotoBean> mPlacePhotos;
|
||||
@ -120,6 +122,7 @@ public class CompanyInfoEditActivity extends BaseActivity {
|
||||
|
||||
private OptionsPickerView mTradePicker;//管理行业
|
||||
private OptionsPickerView mTradePicker1;//管理行业
|
||||
private OptionsPickerView mLogOffPicker;//是否注销
|
||||
private OptionsPickerView mMArea1Picker;
|
||||
private OptionsPickerView mMArea2Picker;
|
||||
private OptionsPickerView mMArea3Picker;
|
||||
@ -138,6 +141,7 @@ public class CompanyInfoEditActivity extends BaseActivity {
|
||||
private List<DictBean> mArea4List = null;//街道
|
||||
private List<DictBean> mArea5List = null;//社区 村 嘎查
|
||||
private List<DictBean> mTraitList = null;//风险特点
|
||||
private List<String> mLogOffList = null;//管理行业1
|
||||
private String mSelTypeId = "";//单位类型ID
|
||||
private String mSelTradeId = "";//管理行业ID
|
||||
private String code = "";//组织机构代码证
|
||||
@ -161,6 +165,7 @@ public class CompanyInfoEditActivity extends BaseActivity {
|
||||
private AddPhotoAdapter mMPlacePhotoAdapter;
|
||||
private AddPhotoAdapter mMDoorPhotoAdapter;
|
||||
|
||||
private int mSelLogOff = 0;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
@ -241,6 +246,26 @@ public class CompanyInfoEditActivity extends BaseActivity {
|
||||
mTvRisk.setOnClickListener(v -> onShowRiskPicker());
|
||||
mTvTrade.setOnClickListener(v -> onShowTradePicker());
|
||||
mTvTrade1.setOnClickListener(v -> onShowTrade1Picker());
|
||||
mTvLogOff.setOnClickListener(v -> onShowLogOffPicker());
|
||||
}
|
||||
|
||||
private void onShowLogOffPicker() {
|
||||
hideSoftKeyboard();
|
||||
mLogOffPicker = new OptionsPickerBuilder(mActivity, (options1, options2, options3, v) -> {
|
||||
String s = mLogOffList.get(options1);
|
||||
if (s.equals("未注销")) {
|
||||
mSelLogOff = 0;
|
||||
} else {
|
||||
mSelLogOff = 1;//已注销
|
||||
}
|
||||
mTvLogOff.setText(s);
|
||||
}).setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mLogOffPicker.setPicker(mLogOffList);
|
||||
mLogOffPicker.show();
|
||||
}
|
||||
|
||||
private void onShowTrade1Picker() {
|
||||
@ -501,6 +526,7 @@ public class CompanyInfoEditActivity extends BaseActivity {
|
||||
submitBean.setBussinessRegNum(code);
|
||||
submitBean.setLegalPerson(companP);
|
||||
submitBean.setSummary(scope);
|
||||
submitBean.setIsLogOff(mSelLogOff);
|
||||
|
||||
if (!TextUtils.isEmpty(mSelTradeId)) {
|
||||
submitBean.setIndustry(mSelTradeId);//行业
|
||||
@ -962,7 +988,12 @@ public class CompanyInfoEditActivity extends BaseActivity {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
companyName = mDetailBean.getName();
|
||||
mEtCompanyName.setText(companyName);
|
||||
|
||||
mSelLogOff = mDetailBean.getIsLogOff();
|
||||
if (mSelLogOff == 1) {
|
||||
mTvLogOff.setText("已注销");
|
||||
} else {
|
||||
mTvLogOff.setText("未注销");
|
||||
}
|
||||
people = mDetailBean.getMaster();
|
||||
mEtPre.setText(people);
|
||||
|
||||
|
@ -105,7 +105,8 @@ public class EnterCompanyInfoActivity extends BaseActivity {
|
||||
EditText mEtCompanyScope;
|
||||
@BindView(R.id.tv_trade_1)
|
||||
TextView mTvTrade1;
|
||||
|
||||
@BindView(R.id.tv_logoff)
|
||||
TextView mTvLogOff;//是否注销
|
||||
private Unbinder mBind;
|
||||
private List<AddPhotoBean> mDoorPhotos;
|
||||
private List<AddPhotoBean> mPlacePhotos;
|
||||
@ -116,6 +117,7 @@ public class EnterCompanyInfoActivity extends BaseActivity {
|
||||
|
||||
private OptionsPickerView mTradePicker;//管理行业
|
||||
private OptionsPickerView mTradePicker1;//管理行业
|
||||
private OptionsPickerView mLogOffPicker;//是否注销
|
||||
private OptionsPickerView mMArea1Picker;
|
||||
private OptionsPickerView mMArea2Picker;
|
||||
private OptionsPickerView mMArea3Picker;
|
||||
@ -128,6 +130,7 @@ public class EnterCompanyInfoActivity extends BaseActivity {
|
||||
private List<DictBean> mTypeList = null;//单位类型
|
||||
private List<DictBean> mTradeList = null;//管理行业
|
||||
private List<DictBean> mTradeList1 = null;//管理行业1
|
||||
private List<String> mLogOffList = null;//管理行业1
|
||||
private List<DictBean> mArea1List = null;//省
|
||||
private List<DictBean> mArea2List = null;//市
|
||||
private List<DictBean> mArea3List = null;//旗县
|
||||
@ -156,7 +159,7 @@ public class EnterCompanyInfoActivity extends BaseActivity {
|
||||
private int mCurrentPhotoType = 1;//当前上传的图片所属 1大门, 2主要场所
|
||||
private AddPhotoAdapter mMPlacePhotoAdapter;
|
||||
private AddPhotoAdapter mMDoorPhotoAdapter;
|
||||
|
||||
private int mSelLogOff = 0;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
@ -175,6 +178,10 @@ public class EnterCompanyInfoActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
private void initPhotoView() {
|
||||
mLogOffList = new ArrayList<>();
|
||||
mLogOffList.add("未注销");
|
||||
mLogOffList.add("已注销");
|
||||
|
||||
mDoorPhotos = new ArrayList<>();
|
||||
mPlacePhotos = new ArrayList<>();
|
||||
mDoorPhotos.add(new AddPhotoBean());
|
||||
@ -235,9 +242,31 @@ public class EnterCompanyInfoActivity extends BaseActivity {
|
||||
mTvRisk.setOnClickListener(v -> onShowRiskPicker());
|
||||
mTvTrade.setOnClickListener(v -> onShowTradePicker());
|
||||
mTvTrade1.setOnClickListener(v -> onShowTrade1Picker());
|
||||
mTvLogOff.setOnClickListener(v -> onShowLogOffPicker());
|
||||
|
||||
mTvLogOff.setText("未注销");
|
||||
getDefaultArea1();
|
||||
}
|
||||
|
||||
private void onShowLogOffPicker() {
|
||||
hideSoftKeyboard();
|
||||
mLogOffPicker = new OptionsPickerBuilder(EnterCompanyInfoActivity.this, (options1, options2, options3, v) -> {
|
||||
String s = mLogOffList.get(options1);
|
||||
if (s.equals("未注销")) {
|
||||
mSelLogOff = 0;
|
||||
} else {
|
||||
mSelLogOff = 1;//已注销
|
||||
}
|
||||
mTvLogOff.setText(s);
|
||||
}).setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mLogOffPicker.setPicker(mLogOffList);
|
||||
mLogOffPicker.show();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取默认省份
|
||||
@ -547,8 +576,7 @@ public class EnterCompanyInfoActivity extends BaseActivity {
|
||||
submitBean.setArea1(mSelArea1Id);
|
||||
submitBean.setArea2(mSelArea2Id);
|
||||
submitBean.setArea3(mSelArea3Id);
|
||||
|
||||
|
||||
submitBean.setIsLogOff(mSelLogOff);
|
||||
submitBean.setIndustryType(mSelTrade1);
|
||||
code = mEtCompanyCode.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(code)) {
|
||||
|
@ -14,6 +14,7 @@ import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.TextureView;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
@ -113,6 +114,8 @@ public class CounterCheckOptionsActivity extends BaseActivity {
|
||||
private String mSelType = "";//整改期限
|
||||
private double mCurrentLatitude = 0.0d;
|
||||
private double mCurrentLongitude = 0.0d;
|
||||
private NewOptions mCurrentOptions;
|
||||
private int mSelPhotosType = 1;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
@ -148,6 +151,40 @@ public class CounterCheckOptionsActivity extends BaseActivity {
|
||||
mLlStateDis.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
|
||||
mAdapter.addSelectPhotoListener((bean, options, i, type, stat) -> {
|
||||
mCurrentOptions = options;
|
||||
mSelPhotosType = stat;
|
||||
if (type == 1) {
|
||||
//选择图片
|
||||
showSelectPhoto(bean);
|
||||
} else if (type == 2) {
|
||||
//预览
|
||||
ArrayList<String> list = new ArrayList<>();
|
||||
list.add(bean.getPath());
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra(PhotoActivity.TAG_IMGURL, list);
|
||||
intent.setClass(mActivity, PhotoActivity.class);
|
||||
startActivity(intent);
|
||||
} else {
|
||||
//删除
|
||||
List<AddPhotoBean> photos = mAdapter.getData().get(i).getPhotos();
|
||||
if (photos.size() == 4) {
|
||||
boolean isExist = false;
|
||||
for (int j = 0; j < photos.size(); j++) {
|
||||
AddPhotoBean photoBean = photos.get(j);
|
||||
if (TextUtils.isEmpty(photoBean.getId())) {
|
||||
isExist = true;
|
||||
}
|
||||
}
|
||||
if (!isExist) {
|
||||
mAdapter.getData().get(i).getPhotos().add(new AddPhotoBean());
|
||||
}
|
||||
}
|
||||
photos.remove(bean);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
startListenerLocation();
|
||||
getCounterCheckOptions(mCheckId);
|
||||
|
||||
@ -222,6 +259,7 @@ public class CounterCheckOptionsActivity extends BaseActivity {
|
||||
mPhotoIds = mPhotoIds.replace(bean.getId() + ",", "");
|
||||
}));
|
||||
mAddPhotoAdapter.addOnItemClickListener(bean -> {
|
||||
mSelPhotosType = 2;
|
||||
if (TextUtils.isEmpty(bean.getPath())) {
|
||||
//空数据
|
||||
showSelectPhoto(bean);
|
||||
@ -335,6 +373,12 @@ public class CounterCheckOptionsActivity extends BaseActivity {
|
||||
List<OptionsSubmitBean.HiddenDangerReportsBean> items = new ArrayList<>();
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
NewOptions o = data.get(i);
|
||||
String phIds = "";
|
||||
for (int j = 0; j < o.getPhotos().size(); j++) {
|
||||
if (!TextUtils.isEmpty(o.getPhotos().get(j).getId())) {
|
||||
phIds += o.getPhotos().get(j).getId() + ",";
|
||||
}
|
||||
}
|
||||
List<NewOptions.ChildBean> child = data.get(i).getChild();
|
||||
for (int j = 0; j < child.size(); j++) {
|
||||
if (child.get(j).getType() == 1) {
|
||||
@ -345,6 +389,9 @@ public class CounterCheckOptionsActivity extends BaseActivity {
|
||||
bean.setCheckItemOptionId(child.get(j).getItemId());
|
||||
bean.setCheckResult(child.get(j).getItemId());
|
||||
bean.setType(child.get(j).getType());
|
||||
if(phIds.length()>10){
|
||||
bean.setScenePhotos(phIds);
|
||||
}
|
||||
items.add(bean);
|
||||
}
|
||||
} else {
|
||||
@ -358,6 +405,9 @@ public class CounterCheckOptionsActivity extends BaseActivity {
|
||||
} else {
|
||||
bean.setCheckResult(child.get(j).getInputText());
|
||||
}
|
||||
if(phIds.length()>10){
|
||||
bean.setScenePhotos(phIds);
|
||||
}
|
||||
items.add(bean);
|
||||
}
|
||||
}
|
||||
@ -576,14 +626,32 @@ public class CounterCheckOptionsActivity extends BaseActivity {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
ToastUtils.showShort("上传成功");
|
||||
mCurrentBean.setId(baseUserBean.getData());
|
||||
mPhotoIds += baseUserBean.getData() + ",";
|
||||
mCurrentBean.setPath(picPath);
|
||||
if (mPhotos.size() < 9) {
|
||||
mPhotos.add(new AddPhotoBean());
|
||||
if (mSelPhotosType == 1) {
|
||||
mCurrentBean.setId(baseUserBean.getData());
|
||||
mCurrentBean.setPath(picPath);
|
||||
if (mCurrentOptions.getPhotos().size() < 4) {
|
||||
mCurrentOptions.getPhotos().add(new AddPhotoBean());
|
||||
}
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mCurrentBean = null;
|
||||
} else {
|
||||
mCurrentBean.setId(baseUserBean.getData());
|
||||
mPhotoIds += baseUserBean.getData() + ",";
|
||||
mCurrentBean.setPath(picPath);
|
||||
if (mPhotos.size() < 9) {
|
||||
mPhotos.add(new AddPhotoBean());
|
||||
}
|
||||
mAddPhotoAdapter.notifyDataSetChanged();
|
||||
mCurrentBean = null;
|
||||
}
|
||||
mAddPhotoAdapter.notifyDataSetChanged();
|
||||
mCurrentBean = null;
|
||||
// mCurrentBean.setId(baseUserBean.getData());
|
||||
// mPhotoIds += baseUserBean.getData() + ",";
|
||||
// mCurrentBean.setPath(picPath);
|
||||
// if (mPhotos.size() < 9) {
|
||||
// mPhotos.add(new AddPhotoBean());
|
||||
// }
|
||||
// mAddPhotoAdapter.notifyDataSetChanged();
|
||||
// mCurrentBean = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -71,7 +71,6 @@ public class HistoryDetialActivity extends BaseActivity {
|
||||
};
|
||||
mRlvDetail.setLayoutManager(linearLayoutManager);
|
||||
mRlvDetail.setAdapter(mAdapter);
|
||||
|
||||
}
|
||||
|
||||
private void getDetail(String cid) {
|
||||
@ -93,7 +92,7 @@ public class HistoryDetialActivity extends BaseActivity {
|
||||
mTvName.setText(beans.getNameJoinByEnterpriseId());
|
||||
mTvPeo.setText(beans.getMasterJoinByEnterpriseId());
|
||||
if (beans.getIsComplete() == 0) {
|
||||
if (beans.getRectificationType() == 0) {
|
||||
if (beans.getRectificationType() == 1) {
|
||||
mLlType.setVisibility(View.VISIBLE);
|
||||
if (beans.getImmediatelyChangeType() == 1) {
|
||||
mTvType.setText("当场整改");
|
||||
|
@ -106,11 +106,13 @@ public class NewCheckOptionsActivity extends BaseActivity {
|
||||
private ArrayAdapter mNowAdapter;
|
||||
private AddPhotoAdapter mAddPhotoAdapter;
|
||||
private List<AddPhotoBean> mPhotos;
|
||||
private NewOptions mCurrentOptions;
|
||||
private String mPhotoIds = "";
|
||||
private int mType = 1;//整改方式
|
||||
private String mSelType = "";//整改期限
|
||||
private double mCurrentLatitude = 0.0d;
|
||||
private double mCurrentLongitude = 0.0d;
|
||||
private int mSelPhotosType = 2;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
@ -125,6 +127,9 @@ public class NewCheckOptionsActivity extends BaseActivity {
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
mTvPublish.setText("确定");
|
||||
mTvPublish.setOnClickListener(v -> {
|
||||
// Gson gson= new Gson();
|
||||
// String s = gson.toJson(mAdapter.getData());
|
||||
// LogUtils.e(s);
|
||||
buildConfirmData(mAdapter.getData());
|
||||
});
|
||||
startListenerLocation();
|
||||
@ -155,9 +160,46 @@ public class NewCheckOptionsActivity extends BaseActivity {
|
||||
mLlStateDis.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
|
||||
getCheckOptions(id, nId);
|
||||
|
||||
if (TextUtils.isEmpty(nId)) {
|
||||
ToastUtils.showLong("该企业未关联检查项,请联系管理员进行关联");
|
||||
mRlvOptions.setVisibility(View.GONE);
|
||||
} else {
|
||||
mRlvOptions.setVisibility(View.VISIBLE);
|
||||
getCheckOptions(id, nId);
|
||||
}
|
||||
mAdapter.addSelectPhotoListener((bean, options, i, type, stat) -> {
|
||||
mCurrentOptions = options;
|
||||
mSelPhotosType = stat;
|
||||
if (type == 1) {
|
||||
//选择图片
|
||||
showSelectPhoto(bean);
|
||||
} else if (type == 2) {
|
||||
//预览
|
||||
ArrayList<String> list = new ArrayList<>();
|
||||
list.add(bean.getPath());
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra(PhotoActivity.TAG_IMGURL, list);
|
||||
intent.setClass(mActivity, PhotoActivity.class);
|
||||
startActivity(intent);
|
||||
} else {
|
||||
//删除
|
||||
List<AddPhotoBean> photos = mAdapter.getData().get(i).getPhotos();
|
||||
if (photos.size() == 4) {
|
||||
boolean isExist = false;
|
||||
for (int j = 0; j < photos.size(); j++) {
|
||||
AddPhotoBean photoBean = photos.get(j);
|
||||
if (TextUtils.isEmpty(photoBean.getId())) {
|
||||
isExist = true;
|
||||
}
|
||||
}
|
||||
if (!isExist) {
|
||||
mAdapter.getData().get(i).getPhotos().add(new AddPhotoBean());
|
||||
}
|
||||
}
|
||||
photos.remove(bean);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
mNowStrings = mActivity.getResources().getStringArray(R.array.limit);
|
||||
mTermStrings = mActivity.getResources().getStringArray(R.array.timeLimit);
|
||||
mBtnUnclaim.setOnClickListener(v -> doUnclaim());
|
||||
@ -229,6 +271,7 @@ public class NewCheckOptionsActivity extends BaseActivity {
|
||||
mPhotoIds = mPhotoIds.replace(bean.getId() + ",", "");
|
||||
}));
|
||||
mAddPhotoAdapter.addOnItemClickListener(bean -> {
|
||||
mSelPhotosType = 2;
|
||||
if (TextUtils.isEmpty(bean.getPath())) {
|
||||
//空数据
|
||||
showSelectPhoto(bean);
|
||||
@ -308,6 +351,12 @@ public class NewCheckOptionsActivity extends BaseActivity {
|
||||
List<OptionsSubmitBean.HiddenDangerReportsBean> items = new ArrayList<>();
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
NewOptions o = data.get(i);
|
||||
String phIds = "";
|
||||
for (int j = 0; j < o.getPhotos().size(); j++) {
|
||||
if (!TextUtils.isEmpty(o.getPhotos().get(j).getId())) {
|
||||
phIds += o.getPhotos().get(j).getId() + ",";
|
||||
}
|
||||
}
|
||||
List<NewOptions.ChildBean> child = data.get(i).getChild();
|
||||
for (int j = 0; j < child.size(); j++) {
|
||||
if (child.get(j).getType() == 1) {
|
||||
@ -318,6 +367,9 @@ public class NewCheckOptionsActivity extends BaseActivity {
|
||||
bean.setCheckItemOptionId(child.get(j).getItemId());
|
||||
bean.setCheckResult(child.get(j).getItemId());
|
||||
bean.setType(child.get(j).getType());
|
||||
if (phIds.length() > 10) {
|
||||
bean.setScenePhotos(phIds);
|
||||
}
|
||||
items.add(bean);
|
||||
}
|
||||
} else {
|
||||
@ -331,6 +383,9 @@ public class NewCheckOptionsActivity extends BaseActivity {
|
||||
} else {
|
||||
bean.setCheckResult(child.get(j).getInputText());
|
||||
}
|
||||
if (phIds.length() > 10) {
|
||||
bean.setScenePhotos(phIds);
|
||||
}
|
||||
items.add(bean);
|
||||
}
|
||||
}
|
||||
@ -617,14 +672,24 @@ public class NewCheckOptionsActivity extends BaseActivity {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
ToastUtils.showShort("上传成功");
|
||||
mCurrentBean.setId(baseUserBean.getData());
|
||||
mPhotoIds += baseUserBean.getData() + ",";
|
||||
mCurrentBean.setPath(picPath);
|
||||
if (mPhotos.size() < 9) {
|
||||
mPhotos.add(new AddPhotoBean());
|
||||
if (mSelPhotosType == 1) {
|
||||
mCurrentBean.setId(baseUserBean.getData());
|
||||
mCurrentBean.setPath(picPath);
|
||||
if (mCurrentOptions.getPhotos().size() < 4) {
|
||||
mCurrentOptions.getPhotos().add(new AddPhotoBean());
|
||||
}
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mCurrentBean = null;
|
||||
} else {
|
||||
mCurrentBean.setId(baseUserBean.getData());
|
||||
mPhotoIds += baseUserBean.getData() + ",";
|
||||
mCurrentBean.setPath(picPath);
|
||||
if (mPhotos.size() < 9) {
|
||||
mPhotos.add(new AddPhotoBean());
|
||||
}
|
||||
mAddPhotoAdapter.notifyDataSetChanged();
|
||||
mCurrentBean = null;
|
||||
}
|
||||
mAddPhotoAdapter.notifyDataSetChanged();
|
||||
mCurrentBean = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.sucstepsoft.txrealtimelocation.activitys.issue.demo;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.design.widget.AppBarLayout;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
import android.text.Editable;
|
||||
import android.text.InputType;
|
||||
@ -58,27 +59,28 @@ public class NewOptionsAdapter extends BaseRecyclerAdapter<NewOptions, NewOption
|
||||
public void bindHolder(NewOptionsHolder oHolder, int i) {
|
||||
//设置是否必须星号
|
||||
if (mData.get(i).getIsMust() == 1) {
|
||||
oHolder.mIvIsMust.setVisibility(View.INVISIBLE);
|
||||
oHolder.mIvIsMust.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
oHolder.mIvIsMust.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
oHolder.mTvTitle.setText(mData.get(i).getTitle());
|
||||
oHolder.mRgState.setOnCheckedChangeListener(null);
|
||||
oHolder.mEtContent.setVisibility(View.GONE);
|
||||
oHolder.mRgState.removeAllViews();
|
||||
oHolder.mLlCheck.removeAllViews();
|
||||
boolean isInput = false;
|
||||
|
||||
for (int j = 0; j < mData.get(i).getChild().size(); j++) {
|
||||
if (mData.get(i).getChild().get(j).getType() == 1) {
|
||||
NewOptions.ChildBean bean = mData.get(i).getChild().get(j);
|
||||
RadioButton button = new RadioButton(mContext);
|
||||
button.setId(bean.getId());
|
||||
button.setChecked(bean.isCheck());
|
||||
button.setText(bean.getTitle());
|
||||
button.setPadding(dp2px, dp2px, dp2px, dp2px);
|
||||
button.setTextSize(sp2px);
|
||||
button.setButtonDrawable(R.drawable.sel_rb);
|
||||
oHolder.mRgState.addView(button);
|
||||
isInput = true;
|
||||
} else {
|
||||
} else if (mData.get(i).getChild().get(j).getType() == 2 || mData.get(i).getChild().get(j).getType() == 3) {
|
||||
EditText editText = new EditText(mContext);
|
||||
editText.setHint("请输入" + mData.get(i).getTitle() + mData.get(i).getChild().get(j).getTitle());
|
||||
editText.setBackgroundResource(R.drawable.sp_square_btn_gray_sel);
|
||||
@ -90,6 +92,11 @@ public class NewOptionsAdapter extends BaseRecyclerAdapter<NewOptions, NewOption
|
||||
lp.rightMargin = dp2px10;
|
||||
lp.topMargin = dp2px10;
|
||||
editText.setLayoutParams(lp);
|
||||
if (!TextUtils.isEmpty(mData.get(i).getChild().get(j).getInputText())) {
|
||||
editText.setText(mData.get(i).getChild().get(j).getInputText());
|
||||
} else {
|
||||
editText.setText("");
|
||||
}
|
||||
if (mData.get(i).getChild().get(j).getType() == 2) {
|
||||
editText.setInputType(InputType.TYPE_CLASS_NUMBER);
|
||||
} else {
|
||||
@ -138,13 +145,15 @@ public class NewOptionsAdapter extends BaseRecyclerAdapter<NewOptions, NewOption
|
||||
}
|
||||
});
|
||||
oHolder.mLlCheck.addView(editText);
|
||||
} else {
|
||||
//图片
|
||||
}
|
||||
}
|
||||
oHolder.mRgState.setOnCheckedChangeListener((radioGroup, i1) -> {
|
||||
for (int j = 0; j < mData.get(i).getChild().size(); j++) {
|
||||
if (mData.get(i).getChild().get(j).getId() == i1) {
|
||||
mData.get(i).getChild().get(j).setCheck(true);
|
||||
//纯选择
|
||||
// //纯选择
|
||||
if (mData.get(i).getChild().get(j).getType() == 1) {
|
||||
if (mData.get(i).getChild().get(j).isWrong()) {
|
||||
mData.get(i).setState(EmStateCheck.UNCHECK);
|
||||
@ -160,12 +169,44 @@ public class NewOptionsAdapter extends BaseRecyclerAdapter<NewOptions, NewOption
|
||||
});
|
||||
if (isInput) {
|
||||
//存在选择
|
||||
mData.get(i).setState(EmStateCheck.NORMAL);
|
||||
boolean isSel = false;
|
||||
for (int j = 0; j < mData.get(i).getChild().size(); j++) {
|
||||
NewOptions.ChildBean bean = mData.get(i).getChild().get(j);
|
||||
if (bean.getType() == 1) {
|
||||
if (bean.isCheck()) {
|
||||
isSel = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isSel) {
|
||||
mData.get(i).setState(EmStateCheck.NORMAL);
|
||||
}
|
||||
} else {
|
||||
//纯输入
|
||||
mData.get(i).setState(EmStateCheck.CHECK);
|
||||
}
|
||||
setPhotoView(oHolder, i);
|
||||
}
|
||||
|
||||
private void setPhotoView(NewOptionsHolder oHolder, int index) {
|
||||
AddPhotoAdapter photoAdapter = new AddPhotoAdapter(mContext, mData.get(index).getPhotos());
|
||||
oHolder.mRlvPhotos.setAdapter(photoAdapter);
|
||||
oHolder.mRlvPhotos.setLayoutManager(new GridLayoutManager(mContext, 4));
|
||||
photoAdapter.addOnDeleteListener((bean, i) -> {
|
||||
mSelectPhotoListener.onSelectPhoto(bean, mData.get(index), index, 3, 1);
|
||||
});
|
||||
photoAdapter.addOnItemClickListener(bean -> {
|
||||
if (mSelectPhotoListener != null) {
|
||||
if (TextUtils.isEmpty(bean.getPath())) {
|
||||
//空数据,选择图片
|
||||
mSelectPhotoListener.onSelectPhoto(bean, mData.get(index), index, 1, 1);
|
||||
} else {
|
||||
mSelectPhotoListener.onSelectPhoto(bean, mData.get(index), index, 2, 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void notifyDataChange() {
|
||||
boolean isUnCheck = false;
|
||||
@ -189,7 +230,7 @@ public class NewOptionsAdapter extends BaseRecyclerAdapter<NewOptions, NewOption
|
||||
}
|
||||
|
||||
public interface SelectPhoto {
|
||||
void onSelectPhoto(AddPhotoBean bean, Options options, int i, int type);
|
||||
void onSelectPhoto(AddPhotoBean bean, NewOptions options, int i, int type, int s);
|
||||
}
|
||||
|
||||
private StateChangeListener mChangeListener;
|
||||
|
@ -24,14 +24,13 @@ public class NewOptionsHolder extends RecyclerView.ViewHolder {
|
||||
public ImageView mIvIsMust;
|
||||
public RadioGroup mRgState;
|
||||
public LinearLayout mLlCheck;
|
||||
public EditText mEtContent;
|
||||
|
||||
public RecyclerView mRlvPhotos;
|
||||
public NewOptionsHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mTvTitle = itemView.findViewById(R.id.tv_title);
|
||||
mRgState = itemView.findViewById(R.id.rg_state);
|
||||
mIvIsMust = itemView.findViewById(R.id.iv_must);
|
||||
mLlCheck = itemView.findViewById(R.id.ll_check);
|
||||
mEtContent = itemView.findViewById(R.id.et_content);
|
||||
mRlvPhotos= itemView.findViewById(R.id.rlv_photos);
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import android.text.InputType;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.TextureView;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
@ -22,6 +23,7 @@ import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
import com.sucstepsoft.txrealtimelocation.R;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.NewOptions;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.NewOptionsAdapter;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.NewOptionsHolder;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.Options;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.OptionsAdapter;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.OptionsHolder;
|
||||
@ -57,16 +59,18 @@ public class CounterCheckOptionsAdapter extends BaseRecyclerAdapter<NewOptions,
|
||||
oHolder.mIvIsMust.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
oHolder.mTvTitle.setText(mData.get(i).getTitle());
|
||||
oHolder.mRgState.setOnCheckedChangeListener(null);
|
||||
oHolder.mEtContent.setVisibility(View.GONE);
|
||||
boolean isInput = false;
|
||||
oHolder.mRgState.removeAllViews();
|
||||
oHolder.mLlCheck.removeAllViews();
|
||||
|
||||
oHolder.mRgState.setOnCheckedChangeListener(null);
|
||||
boolean isInput = false;
|
||||
for (int j = 0; j < mData.get(i).getChild().size(); j++) {
|
||||
if (mData.get(i).getChild().get(j).getType() == 1) {
|
||||
NewOptions.ChildBean bean = mData.get(i).getChild().get(j);
|
||||
RadioButton button = new RadioButton(mContext);
|
||||
button.setId(bean.getId());
|
||||
button.setText(bean.getTitle());
|
||||
button.setChecked(bean.isCheck());
|
||||
button.setPadding(10, 10, 10, 10);
|
||||
button.setTextSize(15);
|
||||
button.setButtonDrawable(R.drawable.sel_rb);
|
||||
@ -83,6 +87,9 @@ public class CounterCheckOptionsAdapter extends BaseRecyclerAdapter<NewOptions,
|
||||
lp.leftMargin = 15;
|
||||
lp.rightMargin = 15;
|
||||
editText.setLayoutParams(lp);
|
||||
if (!TextUtils.isEmpty(mData.get(i).getChild().get(j).getInputText())) {
|
||||
editText.setText(mData.get(i).getChild().get(j).getInputText());
|
||||
}
|
||||
if (mData.get(i).getChild().get(j).getType() == 2) {
|
||||
editText.setInputType(InputType.TYPE_CLASS_NUMBER);
|
||||
} else {
|
||||
@ -128,10 +135,42 @@ public class CounterCheckOptionsAdapter extends BaseRecyclerAdapter<NewOptions,
|
||||
});
|
||||
if (isInput) {
|
||||
//存在选择
|
||||
mData.get(i).setState(EmStateCheck.NORMAL);
|
||||
boolean isSel = false;
|
||||
for (int j = 0; j < mData.get(i).getChild().size(); j++) {
|
||||
NewOptions.ChildBean bean = mData.get(i).getChild().get(j);
|
||||
if (bean.getType() == 1) {
|
||||
if (bean.isCheck()) {
|
||||
isSel = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isSel) {
|
||||
mData.get(i).setState(EmStateCheck.NORMAL);
|
||||
}
|
||||
} else {
|
||||
mData.get(i).setState(EmStateCheck.CHECK);
|
||||
}
|
||||
setPhotoView(oHolder, i);
|
||||
}
|
||||
|
||||
private void setPhotoView(CounterCheckOptionHolder oHolder, int index) {
|
||||
AddPhotoAdapter photoAdapter = new AddPhotoAdapter(mContext, mData.get(index).getPhotos());
|
||||
oHolder.mRlvPhotos.setAdapter(photoAdapter);
|
||||
oHolder.mRlvPhotos.setLayoutManager(new GridLayoutManager(mContext, 4));
|
||||
photoAdapter.addOnDeleteListener((bean, i) -> {
|
||||
mSelectPhotoListener.onSelectPhoto(bean, mData.get(index), index, 3, 1);
|
||||
});
|
||||
photoAdapter.addOnItemClickListener(bean -> {
|
||||
if (mSelectPhotoListener != null) {
|
||||
if (TextUtils.isEmpty(bean.getPath())) {
|
||||
//空数据,选择图片
|
||||
mSelectPhotoListener.onSelectPhoto(bean, mData.get(index), index, 1, 1);
|
||||
} else {
|
||||
mSelectPhotoListener.onSelectPhoto(bean, mData.get(index), index, 2, 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void notifyDataChange() {
|
||||
@ -147,6 +186,7 @@ public class CounterCheckOptionsAdapter extends BaseRecyclerAdapter<NewOptions,
|
||||
}
|
||||
mChangeListener.onStateChange(isUnCheck);
|
||||
}
|
||||
|
||||
private StateChangeListener mChangeListener;
|
||||
|
||||
public void setStateChangeListener(StateChangeListener listener) {
|
||||
@ -157,13 +197,13 @@ public class CounterCheckOptionsAdapter extends BaseRecyclerAdapter<NewOptions,
|
||||
void onStateChange(boolean isCheck);
|
||||
}
|
||||
|
||||
private OptionsAdapter.SelectPhoto mSelectPhotoListener;
|
||||
private SelectPhoto mSelectPhotoListener;
|
||||
|
||||
public void addSelectPhotoListener(OptionsAdapter.SelectPhoto selectPhotoListener) {
|
||||
public void addSelectPhotoListener(SelectPhoto selectPhotoListener) {
|
||||
this.mSelectPhotoListener = selectPhotoListener;
|
||||
}
|
||||
|
||||
public interface SelectPhoto {
|
||||
void onSelectPhoto(AddPhotoBean bean, Options options, int i, int type);
|
||||
void onSelectPhoto(AddPhotoBean bean, NewOptions options, int i, int type, int state);
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,11 @@ public class MissionDetailAdapter extends BaseRecyclerAdapter<HistoryDetialBean.
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
String tx = mData.get(i).getHiddenDangerReports().get(j).getNameJoinByCheckItemId() + ":" + mData.get(i).getHiddenDangerReports().get(j).getCheckResult() + mData.get(i).getHiddenDangerReports().get(j).getUnitJoinByCheckItemId();
|
||||
String temp = "未填写";
|
||||
if (!TextUtils.isEmpty(mData.get(i).getHiddenDangerReports().get(j).getCheckResult())) {
|
||||
temp = mData.get(i).getHiddenDangerReports().get(j).getCheckResult() + mData.get(i).getHiddenDangerReports().get(j).getUnitJoinByCheckItemId();
|
||||
}
|
||||
String tx = mData.get(i).getHiddenDangerReports().get(j).getNameJoinByCheckItemId() + ":" + temp;
|
||||
tv.setText(tx);
|
||||
break;
|
||||
}
|
||||
@ -62,5 +66,31 @@ public class MissionDetailAdapter extends BaseRecyclerAdapter<HistoryDetialBean.
|
||||
} else {
|
||||
holder.mLlContent.setVisibility(View.GONE);
|
||||
}
|
||||
if (TextUtils.isEmpty(mData.get(i).getPhotos())) {
|
||||
holder.mRlvPhotos.setVisibility(View.GONE);
|
||||
} else {
|
||||
holder.mRlvPhotos.setVisibility(View.VISIBLE);
|
||||
List<String> photos = new ArrayList<>();
|
||||
String[] split = mData.get(i).getPhotos().split(",");
|
||||
for (int j = 0; j < split.length; j++) {
|
||||
if (!TextUtils.isEmpty(split[j])) {
|
||||
photos.add(BaseUrlApi.BASE_IMG_URL + split[j]);
|
||||
}
|
||||
}
|
||||
BaseShowPhotoAdapter adapter = new BaseShowPhotoAdapter(mContext, photos);
|
||||
GridLayoutManager manager = new GridLayoutManager(mContext, 4) {
|
||||
@Override
|
||||
public boolean canScrollVertically() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
holder.mRlvPhotos.setLayoutManager(manager);
|
||||
holder.mRlvPhotos.setAdapter(adapter);
|
||||
adapter.addOnItemClickListener(url -> {
|
||||
Intent intent = new Intent(mContext, PhotoActivity.class);
|
||||
intent.putExtra("imgUrls", new ArrayList<>(adapter.getData()));
|
||||
mContext.startActivity(intent);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,16 +25,14 @@ public class CounterCheckOptionHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvTitle;
|
||||
public ImageView mIvIsMust;
|
||||
public LinearLayout mLlCheck;
|
||||
public EditText mEtContent;
|
||||
|
||||
|
||||
public RecyclerView mRlvPhotos;
|
||||
public CounterCheckOptionHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mTvTitle = itemView.findViewById(R.id.tv_title);
|
||||
mRgState = itemView.findViewById(R.id.rg_state);
|
||||
mIvIsMust = itemView.findViewById(R.id.iv_must);
|
||||
mLlCheck = itemView.findViewById(R.id.ll_check);
|
||||
mEtContent = itemView.findViewById(R.id.et_content);
|
||||
mRlvPhotos= itemView.findViewById(R.id.rlv_photos);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,10 +17,12 @@ import com.sucstepsoft.txrealtimelocation.R;
|
||||
public class MissionDetailHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvName;
|
||||
public LinearLayout mLlContent;
|
||||
public RecyclerView mRlvPhotos;
|
||||
|
||||
public MissionDetailHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mTvName = itemView.findViewById(R.id.tv_options_name);
|
||||
mLlContent = itemView.findViewById(R.id.ll_content);
|
||||
mRlvPhotos = itemView.findViewById(R.id.rlv_photos);
|
||||
}
|
||||
}
|
||||
|
@ -69,6 +69,15 @@ public class CompanyDetailBean {
|
||||
private String bussinessRegNum;
|
||||
private String legalPerson;
|
||||
private String summary;
|
||||
private int isLogOff;
|
||||
|
||||
public int getIsLogOff() {
|
||||
return isLogOff;
|
||||
}
|
||||
|
||||
public void setIsLogOff(int isLogOff) {
|
||||
this.isLogOff = isLogOff;
|
||||
}
|
||||
|
||||
public String getEnterpriseId() {
|
||||
return enterpriseId;
|
||||
|
@ -46,6 +46,15 @@ public class CompanyEnterBean {
|
||||
private String legalPerson;//企业法人
|
||||
private String bussinessRegNum;//组织机构代码
|
||||
private String industryType;//行业类型
|
||||
private int isLogOff;
|
||||
|
||||
public int getIsLogOff() {
|
||||
return isLogOff;
|
||||
}
|
||||
|
||||
public void setIsLogOff(int isLogOff) {
|
||||
this.isLogOff = isLogOff;
|
||||
}
|
||||
|
||||
public String getRiskOperationPid() {
|
||||
return riskOperationPid;
|
||||
|
@ -333,8 +333,17 @@ public class HistoryDetialBean {
|
||||
private int type;
|
||||
private String checkItemParentId;
|
||||
private List<?> checkItemOptions;
|
||||
private String scenePhotos;
|
||||
private List<HiddenDangerReportsBean> hiddenDangerReports;
|
||||
|
||||
public String getPhotos() {
|
||||
return scenePhotos;
|
||||
}
|
||||
|
||||
public void setPhotos(String photos) {
|
||||
this.scenePhotos = photos;
|
||||
}
|
||||
|
||||
public String getCheckItemId() {
|
||||
return checkItemId;
|
||||
}
|
||||
|
@ -156,6 +156,15 @@ public class OptionsSubmitBean {
|
||||
private String checkItemOptionId;
|
||||
private String checkResult;
|
||||
private int type;
|
||||
private String scenePhotos;
|
||||
|
||||
public String getScenePhotos() {
|
||||
return scenePhotos;
|
||||
}
|
||||
|
||||
public void setScenePhotos(String scenePhotos) {
|
||||
this.scenePhotos = scenePhotos;
|
||||
}
|
||||
|
||||
public String getCheckId() {
|
||||
return checkId;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.sucstepsoft.txrealtimelocation.net;
|
||||
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.AddressListBean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.AreaListBean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.BaseUserBean;
|
||||
@ -735,4 +736,23 @@ public interface LocationApiService {
|
||||
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("articlecontent/getarticlecontentbyid/{articleContentId}")
|
||||
Observable<NoticeDetailBean> getNoticeDetailById(@Path("articleContentId") String id, @Header("token") String token);
|
||||
|
||||
|
||||
//获取通知公告数量
|
||||
//getNumberByMine
|
||||
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("articlecontent/countarticlecount")
|
||||
Observable<BaseUserBean> getArticleCount(@Header("token") String token);
|
||||
|
||||
//获取历史任务数量
|
||||
//GET /app/check/countcheckofmine
|
||||
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("check/countcheckofmine")
|
||||
Observable<BaseUserBean> getHistoryCount(@Header("token") String token);
|
||||
|
||||
//我的企业数量
|
||||
//GET /app/enterpriseofgridoperator/countenterpriseofgridoperatorofmine
|
||||
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("enterpriseofgridoperator/countenterpriseofgridoperatorofmine")
|
||||
Observable<BaseUserBean> getMineEnterpriseCount(@Header("token") String token);
|
||||
}
|
||||
|
@ -286,6 +286,22 @@
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@color/divider_line_color" />
|
||||
|
||||
<TextView
|
||||
|
||||
style="@style/company_name_title"
|
||||
android:text="企业是否注销" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_logoff"
|
||||
style="@style/company_content"
|
||||
tools:text="未注销" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@color/divider_line_color" />
|
||||
|
||||
<TextView
|
||||
style="@style/company_name_title"
|
||||
android:text="生产单位经营外貌" />
|
||||
|
@ -156,10 +156,10 @@
|
||||
android:id="@+id/tv_com_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:focusable="true"
|
||||
android:hint="请选择企业类型"
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black" />
|
||||
@ -181,8 +181,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:focusable="true"
|
||||
android:hint="企业所属省、自治区"
|
||||
android:padding="10dp"
|
||||
@ -205,8 +205,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:focusable="true"
|
||||
android:hint="企业所属市"
|
||||
android:padding="10dp"
|
||||
@ -229,10 +229,10 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:hint="企业所属旗县区"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:focusable="true"
|
||||
android:hint="企业所属旗县区"
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black" />
|
||||
</LinearLayout>
|
||||
@ -252,11 +252,11 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:focusable="true"
|
||||
android:hint="请选择所属街道"
|
||||
android:padding="10dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:textColor="@color/black" />
|
||||
</LinearLayout>
|
||||
|
||||
@ -275,11 +275,11 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:focusable="true"
|
||||
android:hint="请选择社区、村、嘎查"
|
||||
android:padding="10dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:textColor="@color/black" />
|
||||
</LinearLayout>
|
||||
|
||||
@ -356,12 +356,12 @@
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:focusable="true"
|
||||
android:gravity="left"
|
||||
android:hint="请选择管理行业"
|
||||
android:padding="10dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="15sp" />
|
||||
|
||||
@ -411,8 +411,8 @@
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:focusable="true"
|
||||
android:gravity="left"
|
||||
android:hint="请选择风险作业"
|
||||
@ -470,6 +470,34 @@
|
||||
tools:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ic_start_hint" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_logoff"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:focusable="true"
|
||||
android:gravity="left"
|
||||
android:hint="企业是否注销"
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
@ -98,8 +98,8 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"
|
||||
android:background="@drawable/ic_start_hint" />
|
||||
android:background="@drawable/ic_start_hint"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_company_code"
|
||||
@ -472,6 +472,34 @@
|
||||
tools:text="" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ic_start_hint" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_logoff"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:clickable="true"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:focusable="true"
|
||||
android:gravity="left"
|
||||
android:hint="企业是否注销"
|
||||
android:padding="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
@ -57,8 +57,7 @@
|
||||
android:layout_height="27dp"
|
||||
android:background="@drawable/sp_blue_sel"
|
||||
android:text="企业不配合"
|
||||
android:textColor="@color/titleBar"
|
||||
/>
|
||||
android:textColor="@color/titleBar" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
@ -75,7 +74,13 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- <ExpandableListView-->
|
||||
<!-- android:id="@+id/elv_options"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content" />-->
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_options"
|
||||
|
@ -28,47 +28,39 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
tools:text="测试数据测试数据测试数据测试数据测试数据测试数据测试数据测试数据" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_state"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_state"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_check"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
android:padding="5dp">
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_content"
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_photos"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:background="@drawable/sp_square_btn_gray_sel"
|
||||
android:hint="请输入"
|
||||
android:padding="3dp"
|
||||
android:textSize="13sp"
|
||||
android:visibility="gone" />
|
||||
android:padding="5dp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -25,5 +25,9 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_photos"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</LinearLayout>
|
@ -28,27 +28,26 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
tools:text="测试数据测试数据测试数据测试数据测试数据测试数据测试数据测试数据" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_state"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_state"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_check"
|
||||
android:layout_width="match_parent"
|
||||
@ -58,17 +57,10 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_content"
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_photos"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:background="@drawable/sp_square_btn_gray_sel"
|
||||
android:hint="请输入"
|
||||
android:padding="3dp"
|
||||
android:textSize="13sp"
|
||||
android:visibility="gone" />
|
||||
android:padding="5dp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
Loading…
Reference in New Issue
Block a user