添加定位,修改隐患上报
This commit is contained in:
parent
86f0267e38
commit
1c8423f28c
@ -51,7 +51,7 @@ dependencies {
|
||||
implementation project(':cm_utils')
|
||||
implementation project(':camera')
|
||||
//百度地图
|
||||
// implementation files('libs/BaiduLBS_Android.jar')
|
||||
implementation files('libs/BaiduLBS_Android.jar')
|
||||
// implementation files('libs/IndoorscapeAlbumPlugin.jar')
|
||||
//极光推送
|
||||
// implementation files('libs/jcore-android-2.0.1.jar')
|
||||
|
BIN
app/libs/BaiduLBS_Android.jar
Normal file
BIN
app/libs/BaiduLBS_Android.jar
Normal file
Binary file not shown.
BIN
app/libs/arm64-v8a/libBaiduMapSDK_base_v6_2_0.so
Normal file
BIN
app/libs/arm64-v8a/libBaiduMapSDK_base_v6_2_0.so
Normal file
Binary file not shown.
BIN
app/libs/arm64-v8a/libBaiduMapSDK_map_v6_2_0.so
Normal file
BIN
app/libs/arm64-v8a/libBaiduMapSDK_map_v6_2_0.so
Normal file
Binary file not shown.
BIN
app/libs/arm64-v8a/libindoor.so
Normal file
BIN
app/libs/arm64-v8a/libindoor.so
Normal file
Binary file not shown.
BIN
app/libs/arm64-v8a/liblocSDK8a.so
Normal file
BIN
app/libs/arm64-v8a/liblocSDK8a.so
Normal file
Binary file not shown.
BIN
app/libs/armeabi-v7a/libBaiduMapSDK_base_v6_2_0.so
Normal file
BIN
app/libs/armeabi-v7a/libBaiduMapSDK_base_v6_2_0.so
Normal file
Binary file not shown.
BIN
app/libs/armeabi-v7a/libBaiduMapSDK_map_v6_2_0.so
Normal file
BIN
app/libs/armeabi-v7a/libBaiduMapSDK_map_v6_2_0.so
Normal file
Binary file not shown.
BIN
app/libs/armeabi-v7a/libindoor.so
Normal file
BIN
app/libs/armeabi-v7a/libindoor.so
Normal file
Binary file not shown.
BIN
app/libs/armeabi-v7a/liblocSDK8a.so
Normal file
BIN
app/libs/armeabi-v7a/liblocSDK8a.so
Normal file
Binary file not shown.
BIN
app/libs/armeabi/libBaiduMapSDK_base_v6_2_0.so
Normal file
BIN
app/libs/armeabi/libBaiduMapSDK_base_v6_2_0.so
Normal file
Binary file not shown.
BIN
app/libs/armeabi/libBaiduMapSDK_map_v6_2_0.so
Normal file
BIN
app/libs/armeabi/libBaiduMapSDK_map_v6_2_0.so
Normal file
Binary file not shown.
BIN
app/libs/armeabi/libindoor.so
Normal file
BIN
app/libs/armeabi/libindoor.so
Normal file
Binary file not shown.
BIN
app/libs/armeabi/liblocSDK8a.so
Normal file
BIN
app/libs/armeabi/liblocSDK8a.so
Normal file
Binary file not shown.
BIN
app/libs/x86/libBaiduMapSDK_base_v6_2_0.so
Normal file
BIN
app/libs/x86/libBaiduMapSDK_base_v6_2_0.so
Normal file
Binary file not shown.
BIN
app/libs/x86/libBaiduMapSDK_map_v6_2_0.so
Normal file
BIN
app/libs/x86/libBaiduMapSDK_map_v6_2_0.so
Normal file
Binary file not shown.
BIN
app/libs/x86/libindoor.so
Normal file
BIN
app/libs/x86/libindoor.so
Normal file
Binary file not shown.
BIN
app/libs/x86/liblocSDK8a.so
Normal file
BIN
app/libs/x86/liblocSDK8a.so
Normal file
Binary file not shown.
BIN
app/libs/x86_64/libBaiduMapSDK_base_v6_2_0.so
Normal file
BIN
app/libs/x86_64/libBaiduMapSDK_base_v6_2_0.so
Normal file
Binary file not shown.
BIN
app/libs/x86_64/libBaiduMapSDK_map_v6_2_0.so
Normal file
BIN
app/libs/x86_64/libBaiduMapSDK_map_v6_2_0.so
Normal file
Binary file not shown.
BIN
app/libs/x86_64/libindoor.so
Normal file
BIN
app/libs/x86_64/libindoor.so
Normal file
Binary file not shown.
BIN
app/libs/x86_64/liblocSDK8a.so
Normal file
BIN
app/libs/x86_64/liblocSDK8a.so
Normal file
Binary file not shown.
@ -1 +1 @@
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":4,"versionName":"1.0.3","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":5,"versionName":"1.0.4","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
BIN
app/release/yj-zs-2.apk
Normal file
BIN
app/release/yj-zs-2.apk
Normal file
Binary file not shown.
@ -47,8 +47,15 @@
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
tools:ignore="GoogleAppIndexingWarning">
|
||||
<activity android:name=".activitys.issue.PublicReportActivity"></activity>
|
||||
<activity android:name=".activitys.issue.PublicAreaActivity" />
|
||||
<activity android:name=".activitys.issue.NewCheckOptionsActivity"></activity>
|
||||
<activity
|
||||
android:name=".activitys.issue.PublicReportActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||
<activity
|
||||
android:name=".activitys.issue.PublicAreaActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||
<activity
|
||||
android:name=".activitys.issue.HistoryDetialActivity"
|
||||
android:screenOrientation="portrait"
|
||||
@ -250,7 +257,7 @@
|
||||
<!-- </activity> -->
|
||||
<meta-data
|
||||
android:name="com.baidu.lbsapi.API_KEY"
|
||||
android:value="ulhypZnhFbnhzgEUAUqbA28N7DRB8agg" />
|
||||
android:value="pYx5soXOQToimEzEL1QbI6wz9G4B9dkb" />
|
||||
<meta-data
|
||||
android:name="BUGLY_APPID"
|
||||
android:value="ff95776367" />
|
||||
@ -360,10 +367,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 -->
|
||||
|
@ -90,7 +90,6 @@ public class LoginActivity extends BaseActivity {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mRlNotify.setVisibility(View.GONE);
|
||||
mBtnConfirm.setOnClickListener(v -> login());
|
||||
// mTvChangePwd.setOnClickListener(v -> ToastUtils.showShort("请联系管理员"));
|
||||
isRememberPwd = UserLgUtils.getCheckRemember();
|
||||
mCbRemember.setChecked(isRememberPwd);
|
||||
mCbRemember.setOnCheckedChangeListener((compoundButton, b) -> {
|
||||
|
@ -32,6 +32,7 @@ import com.sucstepsoft.txrealtimelocation.activitys.companylib.MineCompanyLibAct
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.countercheck.CounterCheckMainActivity;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.HistoryDetialActivity;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.HistoryListActivity;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.NewCheckOptionsActivity;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.PublicAreaActivity;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.lawlib.LawLibActivity;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.companylib.CompanyLibActivity;
|
||||
@ -45,6 +46,7 @@ import com.sucstepsoft.txrealtimelocation.adapters.FunctionAdapter;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.AppTokenUser;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.VersionBean;
|
||||
import com.sucstepsoft.txrealtimelocation.net.LocationApiService;
|
||||
import com.sucstepsoft.txrealtimelocation.utils.GpsUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
@ -99,7 +101,9 @@ public class MainActivity extends BaseActivity {
|
||||
PermissionConstants.STORAGE,
|
||||
PermissionConstants.PHONE,
|
||||
PermissionConstants.MICROPHONE,
|
||||
PermissionConstants.LOCATION
|
||||
};
|
||||
private static final int GPS_REQUEST_CODE = 1234;
|
||||
private Unbinder mBind;
|
||||
private List<FuncBean> mFuncs = new ArrayList<>();
|
||||
private String[] mBtnStrs = new String[]{"企业信息", "隐患上报", "隐患复查", "我的任务", "公共区域", "法律法规"};
|
||||
@ -134,6 +138,11 @@ public class MainActivity extends BaseActivity {
|
||||
}
|
||||
}).request();
|
||||
initBaseView();
|
||||
boolean oPen = GpsUtils.isOPen(mActivity);
|
||||
LogUtils.e(oPen);
|
||||
if (!oPen) {
|
||||
openGpsSetting();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -163,6 +172,7 @@ public class MainActivity extends BaseActivity {
|
||||
Intent intent = null;
|
||||
switch (bean.getText()) {
|
||||
case "企业信息":
|
||||
// intent = new Intent(this, NewCheckOptionsActivity.class);
|
||||
intent = new Intent(this, CompanyLibActivity.class);
|
||||
break;
|
||||
case "隐患上报":
|
||||
@ -212,6 +222,28 @@ public class MainActivity extends BaseActivity {
|
||||
checkPermission();
|
||||
}
|
||||
|
||||
private AlertDialog mGpsSettingDialog;
|
||||
|
||||
|
||||
/**
|
||||
* 打开GPS
|
||||
*/
|
||||
private void openGpsSetting() {
|
||||
if (mGpsSettingDialog == null) {
|
||||
mGpsSettingDialog = new AlertDialog.Builder(this).setTitle("打开GPS")
|
||||
.setMessage("定位需要打开GPS,请前往设置")
|
||||
.setNegativeButton("取消", (dialogInterface, i) -> dialogInterface.dismiss())
|
||||
.setPositiveButton("前往", (dialogInterface, i) -> {
|
||||
Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
|
||||
startActivityForResult(intent, GPS_REQUEST_CODE);
|
||||
})
|
||||
.setCancelable(false)
|
||||
.create();
|
||||
}
|
||||
if (!mGpsSettingDialog.isShowing()) {
|
||||
mGpsSettingDialog.show();
|
||||
}
|
||||
}
|
||||
|
||||
private void checkPermission() {
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
||||
|
@ -235,6 +235,96 @@ public class EnterCompanyInfoActivity extends BaseActivity {
|
||||
mTvRisk.setOnClickListener(v -> onShowRiskPicker());
|
||||
mTvTrade.setOnClickListener(v -> onShowTradePicker());
|
||||
mTvTrade1.setOnClickListener(v -> onShowTrade1Picker());
|
||||
getDefaultArea1();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取默认省份
|
||||
*/
|
||||
private void getDefaultArea1() {
|
||||
ProgressDialog progressDialog = UIUtil.initDialog(mActivity, "获取数据中...");
|
||||
progressDialog.setCanceledOnTouchOutside(false);
|
||||
progressDialog.setCancelable(false);
|
||||
progressDialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getDicrList(PathConfig.DIC_AREA_ID, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<DictBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<DictBean> dictBeans) {
|
||||
if (dictBeans != null && dictBeans.size() > 0) {
|
||||
for (int i = 0; i < dictBeans.size(); i++) {
|
||||
if (dictBeans.get(i).getDictionaryId().equals(PathConfig.DEFAULT_PROVINCE_AREA)) {
|
||||
mTvArea1.setText(dictBeans.get(i).getDictionaryName());
|
||||
mSelArea1Id = dictBeans.get(i).getDictionaryId();
|
||||
getDefaultArea2(progressDialog, dictBeans.get(i).getDictionaryId());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
ToastUtils.showShort("获取数据失败,请稍后重试");
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取默认市
|
||||
*/
|
||||
private void getDefaultArea2(ProgressDialog progressDialog, String id) {
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getDicrList(id, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<DictBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<DictBean> dictBeans) {
|
||||
progressDialog.dismiss();
|
||||
if (dictBeans != null && dictBeans.size() > 0) {
|
||||
for (int i = 0; i < dictBeans.size(); i++) {
|
||||
if (dictBeans.get(i).getDictionaryId().equals(PathConfig.DEFAULT_CITY_AREA)) {
|
||||
mTvArea2.setText(dictBeans.get(i).getDictionaryName());
|
||||
mSelArea2Id = dictBeans.get(i).getDictionaryId();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
ToastUtils.showShort("获取数据失败,请稍后重试");
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void onShowTrade1Picker() {
|
||||
@ -460,7 +550,10 @@ public class EnterCompanyInfoActivity extends BaseActivity {
|
||||
|
||||
|
||||
submitBean.setIndustryType(mSelTrade1);
|
||||
submitBean.setBussinessRegNum(code);
|
||||
code = mEtCompanyCode.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(code)) {
|
||||
submitBean.setBussinessRegNum(code);
|
||||
}
|
||||
submitBean.setLegalPerson(companP);
|
||||
submitBean.setSummary(scope);
|
||||
|
||||
@ -515,11 +608,11 @@ public class EnterCompanyInfoActivity extends BaseActivity {
|
||||
ToastUtils.showShort("请输入企业名称");
|
||||
return false;
|
||||
}
|
||||
code = mEtCompanyCode.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(code)) {
|
||||
ToastUtils.showShort("请输入组织机构代码");
|
||||
return false;
|
||||
}
|
||||
// code = mEtCompanyCode.getText().toString().trim();
|
||||
// if (TextUtils.isEmpty(code)) {
|
||||
// ToastUtils.showShort("请输入组织机构代码");
|
||||
// return false;
|
||||
// }
|
||||
scope = mEtCompanyScope.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(scope)) {
|
||||
ToastUtils.showShort("请输入营业范围");
|
||||
|
@ -8,30 +8,46 @@ import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.provider.MediaStore;
|
||||
import android.support.v4.content.FileProvider;
|
||||
import android.support.v7.widget.AppCompatSpinner;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.baidu.location.BDAbstractLocationListener;
|
||||
import com.baidu.location.BDLocation;
|
||||
import com.baidu.location.LocationClient;
|
||||
import com.baidu.location.LocationClientOption;
|
||||
import com.google.gson.Gson;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.core.beans.AddPhotoBean;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.AddPhotoAdapter;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.ButtomDialogView;
|
||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.ProiderUtil;
|
||||
import com.sucstepsoft.cm_utils.utils.ToastUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UIUtil;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
import com.sucstepsoft.txrealtimelocation.R;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.common.PhotoActivity;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.NewCheckOptionsActivity;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.NewOptions;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.NewOptionsAdapter;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.Options;
|
||||
import com.sucstepsoft.txrealtimelocation.adapters.CounterCheckOptionsAdapter;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.BaseUserBean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.CheckOptionsbean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.CounterCheckOptionsBean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.OptionsSubmitBean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.SuccessBean;
|
||||
@ -62,7 +78,7 @@ public class CounterCheckOptionsActivity extends BaseActivity {
|
||||
@BindView(R.id.tv_peo)
|
||||
TextView mTvPeo;
|
||||
private Unbinder mBind;
|
||||
private List<Options> mOptions;
|
||||
private List<NewOptions> mOptions;
|
||||
@BindView(R.id.rlv_options)
|
||||
RecyclerView mRlvOptions;
|
||||
@BindView(R.id.btn_unclaim)
|
||||
@ -72,10 +88,32 @@ public class CounterCheckOptionsActivity extends BaseActivity {
|
||||
private CounterCheckOptionsAdapter mAdapter;
|
||||
private String mCompanyId;
|
||||
private ProgressDialog mMProgressDialog;
|
||||
private Options mCurrentOptions;
|
||||
private int mCurrentIndex = 0;
|
||||
private String mCheckId;
|
||||
|
||||
|
||||
@BindView(R.id.ll_company_info)
|
||||
LinearLayout mLlCompanyInfo;
|
||||
@BindView(R.id.ll_state_dis)
|
||||
LinearLayout mLlStateDis;
|
||||
@BindView(R.id.rg_term)
|
||||
RadioGroup mRgTerm;
|
||||
@BindView(R.id.sp_term)
|
||||
AppCompatSpinner mSpTerm;
|
||||
@BindView(R.id.rlv_photos)
|
||||
RecyclerView mRlvPhotos;
|
||||
private LocationClient mLocationClient;
|
||||
private String[] mNowStrings;
|
||||
private String[] mTermStrings;
|
||||
private ArrayAdapter mTermAdapter;
|
||||
private ArrayAdapter mNowAdapter;
|
||||
private AddPhotoAdapter mAddPhotoAdapter;
|
||||
private List<AddPhotoBean> mPhotos;
|
||||
private String mPhotoIds = "";
|
||||
private int mType = 1;//整改方式
|
||||
private String mSelType = "";//整改期限
|
||||
private double mCurrentLatitude = 0.0d;
|
||||
private double mCurrentLongitude = 0.0d;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_counter_check_options;
|
||||
@ -100,13 +138,94 @@ public class CounterCheckOptionsActivity extends BaseActivity {
|
||||
mAdapter = new CounterCheckOptionsAdapter(mActivity, mOptions);
|
||||
mRlvOptions.setAdapter(mAdapter);
|
||||
mRlvOptions.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
|
||||
mAdapter.addSelectPhotoListener((bean, options, i, type) -> {
|
||||
mCurrentOptions = options;
|
||||
if (type == 1) {
|
||||
//选择图片
|
||||
mCurrentIndex = i;
|
||||
mLlStateDis.setVisibility(View.GONE);
|
||||
mAdapter.setStateChangeListener(isCheck -> {
|
||||
if (isCheck) {
|
||||
//存在检查不合格项
|
||||
mLlStateDis.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
//不存在
|
||||
mLlStateDis.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
startListenerLocation();
|
||||
getCounterCheckOptions(mCheckId);
|
||||
|
||||
mNowStrings = mActivity.getResources().getStringArray(R.array.limit);
|
||||
mTermStrings = mActivity.getResources().getStringArray(R.array.timeLimit);
|
||||
mBtnUnclaim.setOnClickListener(v -> doUnclaim());
|
||||
mTermAdapter = new ArrayAdapter<>(mActivity, R.layout.item_pop_text, mTermStrings);
|
||||
mNowAdapter = new ArrayAdapter<>(mActivity, R.layout.item_pop_text, mNowStrings);
|
||||
mSpTerm.setAdapter(mNowAdapter);
|
||||
mSpTerm.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
mSelType = mNowStrings[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
|
||||
}
|
||||
});
|
||||
mRgTerm.setOnCheckedChangeListener((radioGroup, i) -> {
|
||||
switch (i) {
|
||||
case R.id.rb_now:
|
||||
//立即整改
|
||||
mSpTerm.setVisibility(View.VISIBLE);
|
||||
mSpTerm.setAdapter(mNowAdapter);
|
||||
mSpTerm.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
mSelType = mNowStrings[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
|
||||
}
|
||||
});
|
||||
mType = 1;
|
||||
break;
|
||||
case R.id.rb_coor:
|
||||
//不配合
|
||||
mSpTerm.setVisibility(View.GONE);
|
||||
mType = 3;
|
||||
break;
|
||||
case R.id.rb_term:
|
||||
//限期整改
|
||||
mType = 2;
|
||||
mSpTerm.setVisibility(View.VISIBLE);
|
||||
mSpTerm.setAdapter(mTermAdapter);
|
||||
mSpTerm.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
mSelType = mTermStrings[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
});
|
||||
mPhotos = new ArrayList<>();
|
||||
mPhotos.add(new AddPhotoBean());
|
||||
mAddPhotoAdapter = new AddPhotoAdapter(this, mPhotos);
|
||||
mRlvPhotos.setLayoutManager(new GridLayoutManager(mActivity, 4));
|
||||
mRlvPhotos.setAdapter(mAddPhotoAdapter);
|
||||
//删除上传的相片
|
||||
mAddPhotoAdapter.addOnDeleteListener(((bean, i) -> {
|
||||
mAddPhotoAdapter.removeItem(bean);
|
||||
mPhotoIds = mPhotoIds.replace(bean.getId() + ",", "");
|
||||
}));
|
||||
mAddPhotoAdapter.addOnItemClickListener(bean -> {
|
||||
if (TextUtils.isEmpty(bean.getPath())) {
|
||||
//空数据
|
||||
showSelectPhoto(bean);
|
||||
} else if (type == 2) {
|
||||
} else {
|
||||
//预览
|
||||
ArrayList<String> list = new ArrayList<>();
|
||||
list.add(bean.getPath());
|
||||
@ -114,26 +233,8 @@ public class CounterCheckOptionsActivity extends BaseActivity {
|
||||
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();
|
||||
}
|
||||
});
|
||||
getCounterCheckOptions(mCheckId);
|
||||
mBtnUnclaim.setOnClickListener(v -> doUnclaim());
|
||||
}
|
||||
|
||||
private void doUnclaim() {
|
||||
@ -219,72 +320,90 @@ public class CounterCheckOptionsActivity extends BaseActivity {
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
private void buildConfirmData(List<Options> data) {
|
||||
private void buildConfirmData(List<NewOptions> data) {
|
||||
mMProgressDialog = new ProgressDialog(mActivity);
|
||||
mMProgressDialog.setMessage("加载中...");
|
||||
mMProgressDialog.setMessage("上报中...");
|
||||
mMProgressDialog.setCancelable(false);
|
||||
mMProgressDialog.setCanceledOnTouchOutside(false);
|
||||
mMProgressDialog.show();
|
||||
OptionsSubmitBean submitBean = new OptionsSubmitBean();
|
||||
submitBean.setEnterpriseId(mCompanyId);
|
||||
submitBean.setCheckType(2);
|
||||
submitBean.setIsCoordination(1);
|
||||
List<OptionsSubmitBean.HiddenDangerReportsBean> items = new ArrayList<>();
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
Options o = data.get(i);
|
||||
if (o.getIsMust() == 1) {
|
||||
if (o.getState() == EmStateCheck.NORMAL) {
|
||||
mMProgressDialog.dismiss();
|
||||
ToastUtils.showShort("检查项中存在未检查的必查项目");
|
||||
return;
|
||||
}
|
||||
}
|
||||
OptionsSubmitBean.HiddenDangerReportsBean bean = new OptionsSubmitBean.HiddenDangerReportsBean();
|
||||
bean.setCheckItemId(o.getId());
|
||||
String photoIds = "";
|
||||
if (o.getState() == EmStateCheck.NORMAL) {
|
||||
bean.setCheckResult(0);
|
||||
} else if (o.getState() == EmStateCheck.CHECK) {
|
||||
bean.setCheckResult(1);
|
||||
for (int j = 0; j < o.getPhotos().size(); j++) {
|
||||
if (!TextUtils.isEmpty(o.getPhotos().get(j).getId())) {
|
||||
photoIds += o.getPhotos().get(j).getId() + ",";
|
||||
|
||||
if (checkConfirmParams(data)) {
|
||||
OptionsSubmitBean submitBean = new OptionsSubmitBean();
|
||||
submitBean.setEnterpriseId(mCompanyId);
|
||||
submitBean.setCheckType(1);
|
||||
submitBean.setIsCoordination(1);
|
||||
List<OptionsSubmitBean.HiddenDangerReportsBean> items = new ArrayList<>();
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
NewOptions o = data.get(i);
|
||||
List<NewOptions.ChildBean> child = data.get(i).getChild();
|
||||
for (int j = 0; j < child.size(); j++) {
|
||||
if (child.get(j).getType() == 1) {
|
||||
//选择
|
||||
if (child.get(j).isCheck()) {
|
||||
OptionsSubmitBean.HiddenDangerReportsBean bean = new OptionsSubmitBean.HiddenDangerReportsBean();
|
||||
bean.setCheckItemId(o.getId());
|
||||
bean.setCheckItemOptionId(child.get(j).getItemId());
|
||||
bean.setCheckResult(child.get(j).getItemId());
|
||||
bean.setType(child.get(j).getType());
|
||||
items.add(bean);
|
||||
}
|
||||
} else {
|
||||
//输入
|
||||
OptionsSubmitBean.HiddenDangerReportsBean bean = new OptionsSubmitBean.HiddenDangerReportsBean();
|
||||
bean.setCheckItemId(o.getId());
|
||||
bean.setCheckItemOptionId(child.get(j).getItemId());
|
||||
bean.setType(child.get(j).getType());
|
||||
if (TextUtils.isEmpty(child.get(j).getInputText())) {
|
||||
bean.setCheckResult("");
|
||||
} else {
|
||||
bean.setCheckResult(child.get(j).getInputText());
|
||||
}
|
||||
items.add(bean);
|
||||
}
|
||||
}
|
||||
if (photoIds.length() > 10) {
|
||||
bean.setScenePhotos(photoIds);
|
||||
}
|
||||
|
||||
|
||||
if (mType == 1) {
|
||||
submitBean.setRectificationType(1);
|
||||
//立即整改
|
||||
if (mSelType.equals("当场整改")) {
|
||||
submitBean.setImmediatelyChangeType(1);
|
||||
} else {
|
||||
submitBean.setImmediatelyChangeType(2);
|
||||
}
|
||||
} else {
|
||||
if (o.getRectify() == 4) {
|
||||
//立即整改
|
||||
bean.setCheckResult(2);
|
||||
if (o.getTimeLimit().equals("立即整改")) {
|
||||
bean.setImmediatelyChangeType(1);
|
||||
} else {
|
||||
bean.setImmediatelyChangeType(2);
|
||||
}
|
||||
} else if (o.getRectify() == 5) {
|
||||
//限期整改
|
||||
bean.setCheckResult(3);
|
||||
String strDay = o.getTimeLimit().substring(0, o.getTimeLimit().lastIndexOf("天"));
|
||||
bean.setRectificationDays(Integer.parseInt(strDay));
|
||||
} else {
|
||||
//不配合
|
||||
bean.setCheckResult(4);
|
||||
}
|
||||
for (int j = 0; j < o.getPhotos().size(); j++) {
|
||||
if (!TextUtils.isEmpty(o.getPhotos().get(j).getId())) {
|
||||
photoIds += o.getPhotos().get(j).getId() + ",";
|
||||
}
|
||||
}
|
||||
if (photoIds.length() > 10) {
|
||||
bean.setScenePhotos(photoIds);
|
||||
}
|
||||
submitBean.setRectificationType(2);
|
||||
String strDay = mSelType.substring(0, mSelType.lastIndexOf("天"));
|
||||
submitBean.setRectificationDays(Integer.parseInt(strDay));
|
||||
}
|
||||
items.add(bean);
|
||||
if (!TextUtils.isEmpty(mPhotoIds)) {
|
||||
submitBean.setScenePhotos(mPhotoIds);
|
||||
}
|
||||
submitBean.setHiddenDangerReports(items);
|
||||
submitBean.setCheckLat(mCurrentLatitude + "");
|
||||
submitBean.setCheckLng(mCurrentLongitude + "");
|
||||
doSubmit(submitBean);
|
||||
} else {
|
||||
mMProgressDialog.dismiss();
|
||||
ToastUtils.showShort("检查项中存在未检查的项目");
|
||||
}
|
||||
submitBean.setHiddenDangerReports(items);
|
||||
doSubmit(submitBean);
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验参数是否合法
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private boolean checkConfirmParams(List<NewOptions> data) {
|
||||
boolean isComplete = true;
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
if (data.get(i).getState() == EmStateCheck.NORMAL) {
|
||||
isComplete = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return isComplete;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -458,11 +577,12 @@ public class CounterCheckOptionsActivity extends BaseActivity {
|
||||
}
|
||||
ToastUtils.showShort("上传成功");
|
||||
mCurrentBean.setId(baseUserBean.getData());
|
||||
mPhotoIds += baseUserBean.getData() + ",";
|
||||
mCurrentBean.setPath(picPath);
|
||||
if (mCurrentOptions.getPhotos().size() < 4) {
|
||||
mCurrentOptions.getPhotos().add(new AddPhotoBean());
|
||||
if (mPhotos.size() < 9) {
|
||||
mPhotos.add(new AddPhotoBean());
|
||||
}
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mAddPhotoAdapter.notifyDataSetChanged();
|
||||
mCurrentBean = null;
|
||||
}
|
||||
|
||||
@ -499,14 +619,78 @@ public class CounterCheckOptionsActivity extends BaseActivity {
|
||||
for (int i = 0; i < checkOptionsbeans.size(); i++) {
|
||||
List<AddPhotoBean> mPhotos = new ArrayList<>();
|
||||
mPhotos.add(new AddPhotoBean());
|
||||
Options o = new Options();
|
||||
NewOptions o = new NewOptions();
|
||||
List<NewOptions.ChildBean> beans = new ArrayList<>();
|
||||
for (int j = 0; j < checkOptionsbeans.get(i).getCheckItemOptions().size(); j++) {
|
||||
NewOptions.ChildBean bean = new NewOptions.ChildBean();
|
||||
CounterCheckOptionsBean.CheckItemOptionsBean optionsBean = checkOptionsbeans.get(i).getCheckItemOptions().get(j);
|
||||
bean.setId(j);
|
||||
bean.setItemId(optionsBean.getCheckItemOptionId());
|
||||
bean.setTitle(optionsBean.getName());
|
||||
bean.setType(optionsBean.getType());
|
||||
if (checkOptionsbeans.get(i).getCheckItemOptions().get(j).getIsWrong() == 0) {
|
||||
bean.setWrong(false);
|
||||
} else {
|
||||
bean.setWrong(true);
|
||||
}
|
||||
bean.setCheck(false);
|
||||
beans.add(bean);
|
||||
}
|
||||
o.setType(checkOptionsbeans.get(i).getType());
|
||||
o.setChild(beans);
|
||||
o.setId(checkOptionsbeans.get(i).getCheckItemId());
|
||||
o.setTitle(checkOptionsbeans.get(i).getName());
|
||||
o.setPhotos(mPhotos);
|
||||
o.setIsMust(checkOptionsbeans.get(i).getType());
|
||||
mOptions.add(o);
|
||||
}
|
||||
mAdapter.setData(mOptions);
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化定位参数配置
|
||||
*/
|
||||
|
||||
private void startListenerLocation() {
|
||||
mLocationClient = new LocationClient(getApplicationContext());
|
||||
LocationClientOption locationOption = new LocationClientOption();
|
||||
MyLocationListener myLocationListener = new MyLocationListener();
|
||||
mLocationClient.registerLocationListener(myLocationListener);
|
||||
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
||||
locationOption.setCoorType("bd09ll");
|
||||
locationOption.setScanSpan(1000);
|
||||
locationOption.setIsNeedAddress(true);
|
||||
locationOption.setIsNeedLocationDescribe(true);
|
||||
locationOption.setNeedDeviceDirect(false);
|
||||
locationOption.setLocationNotify(true);
|
||||
locationOption.setIgnoreKillProcess(true);
|
||||
locationOption.setIsNeedLocationDescribe(true);
|
||||
locationOption.setIsNeedLocationPoiList(true);
|
||||
locationOption.SetIgnoreCacheException(false);
|
||||
locationOption.setOpenGps(true);
|
||||
locationOption.setIsNeedAltitude(false);
|
||||
locationOption.setOpenAutoNotifyMode();
|
||||
locationOption.setLocationPurpose(LocationClientOption.BDLocationPurpose.SignIn);
|
||||
locationOption.setOpenAutoNotifyMode(3000, 1, LocationClientOption.LOC_SENSITIVITY_HIGHT);
|
||||
mLocationClient.setLocOption(locationOption);
|
||||
mLocationClient.start();
|
||||
}
|
||||
|
||||
/**
|
||||
* 实现定位回调
|
||||
*/
|
||||
public class MyLocationListener extends BDAbstractLocationListener {
|
||||
@Override
|
||||
public void onReceiveLocation(BDLocation location) {
|
||||
double latitude = location.getLatitude();
|
||||
double longitude = location.getLongitude();
|
||||
float radius = location.getRadius();
|
||||
if (latitude != Double.MIN_VALUE && longitude != Double.MIN_VALUE && radius <= 300) {
|
||||
mCurrentLatitude = latitude;
|
||||
mCurrentLongitude = longitude;
|
||||
mLocationClient.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -96,6 +96,7 @@ public class CheckOptionsActivity extends BaseActivity {
|
||||
buildConfirmData(mAdapter.getData());
|
||||
});
|
||||
String id = getIntent().getStringExtra("id");
|
||||
String nId = getIntent().getStringExtra("nId");
|
||||
mCompanyId = getIntent().getStringExtra("cId");
|
||||
String name = getIntent().getStringExtra("name");
|
||||
String peo = getIntent().getStringExtra("peo");
|
||||
@ -144,7 +145,7 @@ public class CheckOptionsActivity extends BaseActivity {
|
||||
mAdapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
getCheckOptions(id);
|
||||
getCheckOptions(id, nId);
|
||||
mBtnUnclaim.setOnClickListener(v -> doUnclaim());
|
||||
}
|
||||
|
||||
@ -217,52 +218,52 @@ public class CheckOptionsActivity extends BaseActivity {
|
||||
return;
|
||||
}
|
||||
}
|
||||
OptionsSubmitBean.HiddenDangerReportsBean bean = new OptionsSubmitBean.HiddenDangerReportsBean();
|
||||
bean.setCheckItemId(o.getId());
|
||||
String photoIds = "";
|
||||
if (o.getState() == EmStateCheck.NORMAL) {
|
||||
bean.setCheckResult(0);
|
||||
} else if (o.getState() == EmStateCheck.CHECK) {
|
||||
bean.setCheckResult(1);
|
||||
for (int j = 0; j < o.getPhotos().size(); j++) {
|
||||
if (!TextUtils.isEmpty(o.getPhotos().get(j).getId())) {
|
||||
photoIds += o.getPhotos().get(j).getId() + ",";
|
||||
}
|
||||
}
|
||||
if (photoIds.length() > 10) {
|
||||
bean.setScenePhotos(photoIds);
|
||||
}
|
||||
} else {
|
||||
if (o.getRectify() == 4) {
|
||||
//立即整改
|
||||
bean.setCheckResult(2);
|
||||
if (o.getTimeLimit().equals("立即整改")) {
|
||||
bean.setImmediatelyChangeType(1);
|
||||
} else {
|
||||
bean.setImmediatelyChangeType(2);
|
||||
}
|
||||
} else if (o.getRectify() == 5) {
|
||||
//限期整改
|
||||
bean.setCheckResult(3);
|
||||
String strDay = o.getTimeLimit().substring(0, o.getTimeLimit().lastIndexOf("天"));
|
||||
bean.setRectificationDays(Integer.parseInt(strDay));
|
||||
} else {
|
||||
//不配合
|
||||
bean.setCheckResult(4);
|
||||
}
|
||||
for (int j = 0; j < o.getPhotos().size(); j++) {
|
||||
if (!TextUtils.isEmpty(o.getPhotos().get(j).getId())) {
|
||||
photoIds += o.getPhotos().get(j).getId() + ",";
|
||||
}
|
||||
}
|
||||
if (photoIds.length() > 10) {
|
||||
bean.setScenePhotos(photoIds);
|
||||
// mMProgressDialog.dismiss();
|
||||
// ToastUtils.showShort("检查项中存在未上传图片的项目");
|
||||
// return;
|
||||
}
|
||||
}
|
||||
items.add(bean);
|
||||
// OptionsSubmitBean.HiddenDangerReportsBean bean = new OptionsSubmitBean.HiddenDangerReportsBean();
|
||||
// bean.setCheckItemId(o.getId());
|
||||
// String photoIds = "";
|
||||
// if (o.getState() == EmStateCheck.NORMAL) {
|
||||
// bean.setCheckResult(0);
|
||||
// } else if (o.getState() == EmStateCheck.CHECK) {
|
||||
// bean.setCheckResult(1);
|
||||
// for (int j = 0; j < o.getPhotos().size(); j++) {
|
||||
// if (!TextUtils.isEmpty(o.getPhotos().get(j).getId())) {
|
||||
// photoIds += o.getPhotos().get(j).getId() + ",";
|
||||
// }
|
||||
// }
|
||||
// if (photoIds.length() > 10) {
|
||||
// bean.setScenePhotos(photoIds);
|
||||
// }
|
||||
// } else {
|
||||
// if (o.getRectify() == 4) {
|
||||
// //立即整改
|
||||
// bean.setCheckResult(2);
|
||||
// if (o.getTimeLimit().equals("立即整改")) {
|
||||
// bean.setImmediatelyChangeType(1);
|
||||
// } else {
|
||||
// bean.setImmediatelyChangeType(2);
|
||||
// }
|
||||
// } else if (o.getRectify() == 5) {
|
||||
// //限期整改
|
||||
// bean.setCheckResult(3);
|
||||
// String strDay = o.getTimeLimit().substring(0, o.getTimeLimit().lastIndexOf("天"));
|
||||
// bean.setRectificationDays(Integer.parseInt(strDay));
|
||||
// } else {
|
||||
// //不配合
|
||||
// bean.setCheckResult(4);
|
||||
// }
|
||||
// for (int j = 0; j < o.getPhotos().size(); j++) {
|
||||
// if (!TextUtils.isEmpty(o.getPhotos().get(j).getId())) {
|
||||
// photoIds += o.getPhotos().get(j).getId() + ",";
|
||||
// }
|
||||
// }
|
||||
// if (photoIds.length() > 10) {
|
||||
// bean.setScenePhotos(photoIds);
|
||||
//// mMProgressDialog.dismiss();
|
||||
//// ToastUtils.showShort("检查项中存在未上传图片的项目");
|
||||
//// return;
|
||||
// }
|
||||
// }
|
||||
// items.add(bean);
|
||||
}
|
||||
submitBean.setHiddenDangerReports(items);
|
||||
doSubmit(submitBean);
|
||||
@ -309,11 +310,11 @@ public class CheckOptionsActivity extends BaseActivity {
|
||||
});
|
||||
}
|
||||
|
||||
private void getCheckOptions(String id) {
|
||||
private void getCheckOptions(String id, String nId) {
|
||||
refreshView(STATE_LOAD_LOADING);
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getCheckOptionsList(id, UserLgUtils.getToken())
|
||||
.getCheckOptionsList(id, nId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<CheckOptionsbean>>() {
|
||||
|
@ -1,14 +1,24 @@
|
||||
package com.sucstepsoft.txrealtimelocation.activitys.issue;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseShowPhotoAdapter;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
import com.sucstepsoft.txrealtimelocation.R;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.common.PhotoActivity;
|
||||
import com.sucstepsoft.txrealtimelocation.adapters.MissionDetailAdapter;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.HistoryMissionBean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.HistoryDetialBean;
|
||||
import com.sucstepsoft.txrealtimelocation.net.LocationApiService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -25,9 +35,18 @@ import io.reactivex.schedulers.Schedulers;
|
||||
public class HistoryDetialActivity extends BaseActivity {
|
||||
@BindView(R.id.rlv_detail)
|
||||
RecyclerView mRlvDetail;
|
||||
|
||||
@BindView(R.id.tv_name)
|
||||
TextView mTvName;
|
||||
@BindView(R.id.tv_peo)
|
||||
TextView mTvPeo;
|
||||
@BindView(R.id.tv_type)
|
||||
TextView mTvType;
|
||||
@BindView(R.id.rlv_photos)
|
||||
RecyclerView mRlvPhotos;
|
||||
@BindView(R.id.ll_type)
|
||||
LinearLayout mLlType;
|
||||
private Unbinder mBind;
|
||||
private List<HistoryMissionBean> mDatas = new ArrayList<>();
|
||||
private List<HistoryDetialBean.CheckItemsBean> mDatas = new ArrayList<>();
|
||||
private MissionDetailAdapter mAdapter;
|
||||
private Disposable mDis;
|
||||
|
||||
@ -44,7 +63,13 @@ public class HistoryDetialActivity extends BaseActivity {
|
||||
String cId = getIntent().getStringExtra("cId");
|
||||
getDetail(cId);
|
||||
mAdapter = new MissionDetailAdapter(mActivity, mDatas);
|
||||
mRlvDetail.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(mActivity) {
|
||||
@Override
|
||||
public boolean canScrollVertically() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
mRlvDetail.setLayoutManager(linearLayoutManager);
|
||||
mRlvDetail.setAdapter(mAdapter);
|
||||
|
||||
}
|
||||
@ -52,21 +77,87 @@ public class HistoryDetialActivity extends BaseActivity {
|
||||
private void getDetail(String cid) {
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getHistoryDetail(cid, UserLgUtils.getToken())
|
||||
.getHistoryDetailById(cid, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<HistoryMissionBean>>() {
|
||||
.subscribe(new Observer<HistoryDetialBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
mDis = d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<HistoryMissionBean> beans) {
|
||||
if (beans != null && beans.size() > 0) {
|
||||
public void onNext(HistoryDetialBean beans) {
|
||||
if (beans != null) {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mDatas = beans;
|
||||
mAdapter.setData(mDatas);
|
||||
mTvName.setText(beans.getNameJoinByEnterpriseId());
|
||||
mTvPeo.setText(beans.getMasterJoinByEnterpriseId());
|
||||
if (beans.getIsComplete() == 0) {
|
||||
if (beans.getRectificationType() == 0) {
|
||||
mLlType.setVisibility(View.VISIBLE);
|
||||
if (beans.getImmediatelyChangeType() == 1) {
|
||||
mTvType.setText("当场整改");
|
||||
} else {
|
||||
mTvType.setText("当天整改");
|
||||
}
|
||||
if (!TextUtils.isEmpty(beans.getScenePhotos())) {
|
||||
mRlvPhotos.setVisibility(View.VISIBLE);
|
||||
List<String> photos = new ArrayList<>();
|
||||
String[] split = beans.getScenePhotos().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(mActivity, photos);
|
||||
GridLayoutManager manager = new GridLayoutManager(mActivity, 4);
|
||||
mRlvPhotos.setLayoutManager(manager);
|
||||
mRlvPhotos.setAdapter(adapter);
|
||||
adapter.addOnItemClickListener(url -> {
|
||||
Intent intent = new Intent(mActivity, PhotoActivity.class);
|
||||
intent.putExtra("imgUrls", new ArrayList<>(adapter.getData()));
|
||||
startActivity(intent);
|
||||
});
|
||||
} else {
|
||||
mRlvPhotos.setVisibility(View.GONE);
|
||||
}
|
||||
} else if (beans.getRectificationType() == 2) {
|
||||
mLlType.setVisibility(View.VISIBLE);
|
||||
mTvType.setText(beans.getRectificationDays() + "天内整改");
|
||||
if (!TextUtils.isEmpty(beans.getScenePhotos())) {
|
||||
mRlvPhotos.setVisibility(View.VISIBLE);
|
||||
List<String> photos = new ArrayList<>();
|
||||
String[] split = beans.getScenePhotos().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(mActivity, photos);
|
||||
GridLayoutManager manager = new GridLayoutManager(mActivity, 4);
|
||||
mRlvPhotos.setLayoutManager(manager);
|
||||
mRlvPhotos.setAdapter(adapter);
|
||||
adapter.addOnItemClickListener(url -> {
|
||||
Intent intent = new Intent(mActivity, PhotoActivity.class);
|
||||
intent.putExtra("imgUrls", new ArrayList<>(adapter.getData()));
|
||||
startActivity(intent);
|
||||
});
|
||||
} else {
|
||||
mRlvPhotos.setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
mLlType.setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
mLlType.setVisibility(View.GONE);
|
||||
}
|
||||
if (beans.getCheckItems() != null && beans.getCheckItems().size() > 0) {
|
||||
mRlvDetail.setVisibility(View.VISIBLE);
|
||||
mDatas = beans.getCheckItems();
|
||||
mAdapter.setData(mDatas);
|
||||
} else {
|
||||
mRlvDetail.setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
refreshView(STATE_LOAD_EMPTY);
|
||||
}
|
||||
@ -92,4 +183,5 @@ public class HistoryDetialActivity extends BaseActivity {
|
||||
}
|
||||
mBind.unbind();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,706 @@
|
||||
package com.sucstepsoft.txrealtimelocation.activitys.issue;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.provider.MediaStore;
|
||||
import android.support.design.widget.AppBarLayout;
|
||||
import android.support.v4.content.FileProvider;
|
||||
import android.support.v7.widget.AppCompatSpinner;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.baidu.location.BDAbstractLocationListener;
|
||||
import com.baidu.location.BDLocation;
|
||||
import com.baidu.location.LocationClient;
|
||||
import com.baidu.location.LocationClientOption;
|
||||
import com.google.gson.Gson;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.core.beans.AddPhotoBean;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.AddPhotoAdapter;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.ButtomDialogView;
|
||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.ProiderUtil;
|
||||
import com.sucstepsoft.cm_utils.utils.ToastUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UIUtil;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
import com.sucstepsoft.txrealtimelocation.R;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.common.PhotoActivity;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.companylib.EnterCompanyInfoActivity;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.NewOptions;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.NewOptionsAdapter;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.Options;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.BaseUserBean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.CheckItemOption;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.CheckOptionsbean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.OptionsSubmitBean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.SuccessBean;
|
||||
import com.sucstepsoft.txrealtimelocation.net.LocationApiService;
|
||||
import com.sucstepsoft.txrealtimelocation.widget.EmStateCheck;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import io.reactivex.Observer;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.MultipartBody;
|
||||
import okhttp3.RequestBody;
|
||||
import top.zibin.luban.Luban;
|
||||
import top.zibin.luban.OnCompressListener;
|
||||
|
||||
public class NewCheckOptionsActivity extends BaseActivity {
|
||||
|
||||
|
||||
Unbinder mBind;
|
||||
@BindView(R.id.tv_name)
|
||||
TextView mTvName;
|
||||
@BindView(R.id.btn_unclaim)
|
||||
Button mBtnUnclaim;
|
||||
@BindView(R.id.tv_peo)
|
||||
TextView mTvPeo;
|
||||
@BindView(R.id.ll_company_info)
|
||||
LinearLayout mLlCompanyInfo;
|
||||
@BindView(R.id.rlv_options)
|
||||
RecyclerView mRlvOptions;
|
||||
@BindView(R.id.ll_state_dis)
|
||||
LinearLayout mLlStateDis;
|
||||
@BindView(R.id.rg_term)
|
||||
RadioGroup mRgTerm;
|
||||
@BindView(R.id.sp_term)
|
||||
AppCompatSpinner mSpTerm;
|
||||
@BindView(R.id.rlv_photos)
|
||||
RecyclerView mRlvPhotos;
|
||||
private AddPhotoBean mCurrentBean;
|
||||
private String mPicPath;
|
||||
private List<NewOptions> mOptions;
|
||||
private NewOptionsAdapter mAdapter;
|
||||
private String mCompanyId;
|
||||
private ProgressDialog mMProgressDialog;
|
||||
private LocationClient mLocationClient;
|
||||
private String[] mNowStrings;
|
||||
private String[] mTermStrings;
|
||||
private ArrayAdapter mTermAdapter;
|
||||
private ArrayAdapter mNowAdapter;
|
||||
private AddPhotoAdapter mAddPhotoAdapter;
|
||||
private List<AddPhotoBean> mPhotos;
|
||||
private String mPhotoIds = "";
|
||||
private int mType = 1;//整改方式
|
||||
private String mSelType = "";//整改期限
|
||||
private double mCurrentLatitude = 0.0d;
|
||||
private double mCurrentLongitude = 0.0d;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
return R.layout.activity_new_check_options;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
mBind = ButterKnife.bind(this);
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mTvBaseTitle.setText("企业检查");
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
mTvPublish.setText("确定");
|
||||
mTvPublish.setOnClickListener(v -> {
|
||||
buildConfirmData(mAdapter.getData());
|
||||
});
|
||||
startListenerLocation();
|
||||
String nId = getIntent().getStringExtra("nId");
|
||||
String id = getIntent().getStringExtra("id");
|
||||
mCompanyId = getIntent().getStringExtra("cId");
|
||||
String name = getIntent().getStringExtra("name");
|
||||
String peo = getIntent().getStringExtra("peo");
|
||||
mTvName.setText(name);
|
||||
mTvPeo.setText(peo);
|
||||
mOptions = new ArrayList<>();
|
||||
mAdapter = new NewOptionsAdapter(this, mOptions);
|
||||
mRlvOptions.setAdapter(mAdapter);
|
||||
mLlStateDis.setVisibility(View.GONE);
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false) {
|
||||
@Override
|
||||
public boolean canScrollVertically() {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
mRlvOptions.setLayoutManager(linearLayoutManager);
|
||||
mAdapter.setStateChangeListener(isCheck -> {
|
||||
if (isCheck) {
|
||||
//存在检查不合格项
|
||||
mLlStateDis.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
//不存在
|
||||
mLlStateDis.setVisibility(View.GONE);
|
||||
}
|
||||
});
|
||||
|
||||
getCheckOptions(id, nId);
|
||||
|
||||
mNowStrings = mActivity.getResources().getStringArray(R.array.limit);
|
||||
mTermStrings = mActivity.getResources().getStringArray(R.array.timeLimit);
|
||||
mBtnUnclaim.setOnClickListener(v -> doUnclaim());
|
||||
mTermAdapter = new ArrayAdapter<>(mActivity, R.layout.item_pop_text, mTermStrings);
|
||||
mNowAdapter = new ArrayAdapter<>(mActivity, R.layout.item_pop_text, mNowStrings);
|
||||
mSpTerm.setAdapter(mNowAdapter);
|
||||
mSpTerm.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
mSelType = mNowStrings[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
|
||||
}
|
||||
});
|
||||
mRgTerm.setOnCheckedChangeListener((radioGroup, i) -> {
|
||||
switch (i) {
|
||||
case R.id.rb_now:
|
||||
//立即整改
|
||||
mSpTerm.setVisibility(View.VISIBLE);
|
||||
mSpTerm.setAdapter(mNowAdapter);
|
||||
mSpTerm.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
mSelType = mNowStrings[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
|
||||
}
|
||||
});
|
||||
mType = 1;
|
||||
break;
|
||||
case R.id.rb_coor:
|
||||
//不配合
|
||||
mSpTerm.setVisibility(View.GONE);
|
||||
mType = 3;
|
||||
break;
|
||||
case R.id.rb_term:
|
||||
//限期整改
|
||||
mType = 2;
|
||||
mSpTerm.setVisibility(View.VISIBLE);
|
||||
mSpTerm.setAdapter(mTermAdapter);
|
||||
mSpTerm.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
mSelType = mTermStrings[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
});
|
||||
mPhotos = new ArrayList<>();
|
||||
mPhotos.add(new AddPhotoBean());
|
||||
mAddPhotoAdapter = new AddPhotoAdapter(this, mPhotos);
|
||||
mRlvPhotos.setLayoutManager(new GridLayoutManager(mActivity, 4));
|
||||
mRlvPhotos.setAdapter(mAddPhotoAdapter);
|
||||
//删除上传的相片
|
||||
mAddPhotoAdapter.addOnDeleteListener(((bean, i) -> {
|
||||
mAddPhotoAdapter.removeItem(bean);
|
||||
mPhotoIds = mPhotoIds.replace(bean.getId() + ",", "");
|
||||
}));
|
||||
mAddPhotoAdapter.addOnItemClickListener(bean -> {
|
||||
if (TextUtils.isEmpty(bean.getPath())) {
|
||||
//空数据
|
||||
showSelectPhoto(bean);
|
||||
} else {
|
||||
//预览
|
||||
ArrayList<String> list = new ArrayList<>();
|
||||
list.add(bean.getPath());
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra(PhotoActivity.TAG_IMGURL, list);
|
||||
intent.setClass(mActivity, PhotoActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void doUnclaim() {
|
||||
ProgressDialog dialog = new ProgressDialog(mActivity);
|
||||
dialog.setMessage("上报中...");
|
||||
dialog.setCancelable(false);
|
||||
dialog.setCanceledOnTouchOutside(false);
|
||||
dialog.show();
|
||||
OptionsSubmitBean submitBean = new OptionsSubmitBean();
|
||||
submitBean.setEnterpriseId(mCompanyId);
|
||||
submitBean.setIsCoordination(0);
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(submitBean);
|
||||
RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.doSaveOptions(body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(SuccessBean successBean) {
|
||||
dialog.dismiss();
|
||||
ToastUtils.showShort("检查成功");
|
||||
setResult(223);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
ToastUtils.showShort("提交失败,请稍后重试.");
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建提交数据
|
||||
*
|
||||
* @param data
|
||||
*/
|
||||
private void buildConfirmData(List<NewOptions> data) {
|
||||
mMProgressDialog = new ProgressDialog(mActivity);
|
||||
mMProgressDialog.setMessage("上报中...");
|
||||
mMProgressDialog.setCancelable(false);
|
||||
mMProgressDialog.setCanceledOnTouchOutside(false);
|
||||
mMProgressDialog.show();
|
||||
|
||||
if (checkConfirmParams(data)) {
|
||||
OptionsSubmitBean submitBean = new OptionsSubmitBean();
|
||||
submitBean.setEnterpriseId(mCompanyId);
|
||||
submitBean.setCheckType(1);
|
||||
submitBean.setIsCoordination(1);
|
||||
List<OptionsSubmitBean.HiddenDangerReportsBean> items = new ArrayList<>();
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
NewOptions o = data.get(i);
|
||||
List<NewOptions.ChildBean> child = data.get(i).getChild();
|
||||
for (int j = 0; j < child.size(); j++) {
|
||||
if (child.get(j).getType() == 1) {
|
||||
//选择
|
||||
if (child.get(j).isCheck()) {
|
||||
OptionsSubmitBean.HiddenDangerReportsBean bean = new OptionsSubmitBean.HiddenDangerReportsBean();
|
||||
bean.setCheckItemId(o.getId());
|
||||
bean.setCheckItemOptionId(child.get(j).getItemId());
|
||||
bean.setCheckResult(child.get(j).getItemId());
|
||||
bean.setType(child.get(j).getType());
|
||||
items.add(bean);
|
||||
}
|
||||
} else {
|
||||
//输入
|
||||
OptionsSubmitBean.HiddenDangerReportsBean bean = new OptionsSubmitBean.HiddenDangerReportsBean();
|
||||
bean.setCheckItemId(o.getId());
|
||||
bean.setCheckItemOptionId(child.get(j).getItemId());
|
||||
bean.setType(child.get(j).getType());
|
||||
if (TextUtils.isEmpty(child.get(j).getInputText())) {
|
||||
bean.setCheckResult("");
|
||||
} else {
|
||||
bean.setCheckResult(child.get(j).getInputText());
|
||||
}
|
||||
items.add(bean);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mType == 1) {
|
||||
submitBean.setRectificationType(1);
|
||||
//立即整改
|
||||
if (mSelType.equals("当场整改")) {
|
||||
submitBean.setImmediatelyChangeType(1);
|
||||
} else {
|
||||
submitBean.setImmediatelyChangeType(2);
|
||||
}
|
||||
} else {
|
||||
submitBean.setRectificationType(2);
|
||||
String strDay = mSelType.substring(0, mSelType.lastIndexOf("天"));
|
||||
submitBean.setRectificationDays(Integer.parseInt(strDay));
|
||||
}
|
||||
if (!TextUtils.isEmpty(mPhotoIds)) {
|
||||
submitBean.setScenePhotos(mPhotoIds);
|
||||
}
|
||||
submitBean.setHiddenDangerReports(items);
|
||||
submitBean.setCheckLat(mCurrentLatitude + "");
|
||||
submitBean.setCheckLng(mCurrentLongitude + "");
|
||||
doSubmit(submitBean);
|
||||
} else {
|
||||
mMProgressDialog.dismiss();
|
||||
ToastUtils.showShort("检查项中存在未检查的项目");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验参数是否合法
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private boolean checkConfirmParams(List<NewOptions> data) {
|
||||
boolean isComplete = true;
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
if (data.get(i).getState() == EmStateCheck.NORMAL) {
|
||||
isComplete = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return isComplete;
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交检查结果
|
||||
*
|
||||
* @param submitBean
|
||||
*/
|
||||
private void doSubmit(OptionsSubmitBean submitBean) {
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(submitBean);
|
||||
RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.doSaveOptions(body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<SuccessBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(SuccessBean successBean) {
|
||||
mMProgressDialog.dismiss();
|
||||
ToastUtils.showShort("检查成功");
|
||||
setResult(223);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
ToastUtils.showShort("提交失败,请稍后重试.");
|
||||
mMProgressDialog.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void getCheckOptions(String id, String nId) {
|
||||
refreshView(STATE_LOAD_LOADING);
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.getCheckOptionsList(id, nId, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<List<CheckOptionsbean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<CheckOptionsbean> checkOptionsbeans) {
|
||||
if (checkOptionsbeans != null && checkOptionsbeans.size() > 0) {
|
||||
buildCheckOptions(checkOptionsbeans);
|
||||
} else {
|
||||
refreshView(STATE_LOAD_EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void buildCheckOptions(List<CheckOptionsbean> checkOptionsbeans) {
|
||||
for (int i = 0; i < checkOptionsbeans.size(); i++) {
|
||||
List<AddPhotoBean> mPhotos = new ArrayList<>();
|
||||
mPhotos.add(new AddPhotoBean());
|
||||
NewOptions o = new NewOptions();
|
||||
List<NewOptions.ChildBean> beans = new ArrayList<>();
|
||||
for (int j = 0; j < checkOptionsbeans.get(i).getCheckItemOptions().size(); j++) {
|
||||
NewOptions.ChildBean bean = new NewOptions.ChildBean();
|
||||
CheckOptionsbean.CheckItemOptionsBean optionsBean = checkOptionsbeans.get(i).getCheckItemOptions().get(j);
|
||||
bean.setId(j);
|
||||
bean.setItemId(optionsBean.getCheckItemOptionId());
|
||||
bean.setTitle(optionsBean.getName());
|
||||
bean.setType(optionsBean.getType());
|
||||
if (checkOptionsbeans.get(i).getCheckItemOptions().get(j).getIsWrong() == 0) {
|
||||
bean.setWrong(false);
|
||||
} else {
|
||||
bean.setWrong(true);
|
||||
}
|
||||
bean.setCheck(false);
|
||||
beans.add(bean);
|
||||
}
|
||||
o.setType(checkOptionsbeans.get(i).getType());
|
||||
o.setChild(beans);
|
||||
o.setId(checkOptionsbeans.get(i).getCheckItemId());
|
||||
o.setTitle(checkOptionsbeans.get(i).getNameJoinByCheckItemId());
|
||||
o.setPhotos(mPhotos);
|
||||
o.setIsMust(checkOptionsbeans.get(i).getType());
|
||||
mOptions.add(o);
|
||||
}
|
||||
mAdapter.setData(mOptions);
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示选择图片
|
||||
*
|
||||
* @param bean
|
||||
*/
|
||||
private void showSelectPhoto(AddPhotoBean bean) {
|
||||
hideSoftKeyboard();
|
||||
ButtomDialogView buttomDialogView = new ButtomDialogView.DialogBuilder(mActivity)
|
||||
.setIsBackCancelable(true)
|
||||
.setIscancelable(true)
|
||||
.setShowLocation(Gravity.BOTTOM)
|
||||
.setIsShowFile(false)
|
||||
.build();
|
||||
buttomDialogView.addOnChoseListener(new ButtomDialogView.OnChoseListener() {
|
||||
@Override
|
||||
public void choseFile() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void choseAlbum() {
|
||||
mCurrentBean = bean;
|
||||
Intent intent = new Intent(Intent.ACTION_PICK, null);
|
||||
intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
|
||||
"image/*");
|
||||
startActivityForResult(intent, BaseUrlApi.PHOTO_REQUEST);
|
||||
buttomDialogView.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void choseShoot() {
|
||||
mCurrentBean = bean;
|
||||
mPicPath = PathConfig.CATCH_PATH + System.currentTimeMillis() + ".jpg";
|
||||
File file = new File(mPicPath);
|
||||
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
// 下面这句指定调用相机拍照后的照片存储的路径
|
||||
Uri uri;
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
|
||||
uri = Uri.fromFile(file);
|
||||
} else {
|
||||
uri = FileProvider.getUriForFile(mActivity, ProiderUtil.getFileProviderName(mActivity), file);
|
||||
}
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
|
||||
startActivityForResult(intent, BaseUrlApi.CAMERA_REQUEST);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loginOut() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changePwd() {
|
||||
|
||||
}
|
||||
});
|
||||
buttomDialogView.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (resultCode == RESULT_OK) {
|
||||
switch (requestCode) {
|
||||
case BaseUrlApi.CAMERA_REQUEST://相机
|
||||
uploadImg(mPicPath, 1);
|
||||
break;
|
||||
case BaseUrlApi.PHOTO_REQUEST://相册
|
||||
try {
|
||||
if (data == null) return;
|
||||
Uri uri = data.getData();
|
||||
String[] proj = {MediaStore.Images.Media.DATA};
|
||||
Cursor cursor = managedQuery(uri, proj, null, null, null);
|
||||
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
||||
cursor.moveToFirst();
|
||||
String srcPath = cursor.getString(column_index);
|
||||
uploadImg(srcPath, 2);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
*
|
||||
* @param picPath
|
||||
*/
|
||||
private void uploadImg(String picPath, int src) {
|
||||
File file = new File(picPath);
|
||||
if (!file.exists()) {
|
||||
showToast("图片路径错误.");
|
||||
return;
|
||||
}
|
||||
ProgressDialog progressDialog = UIUtil.initDialog(mActivity, "正在上传...");
|
||||
progressDialog.show();
|
||||
Luban.with(mActivity)
|
||||
.load(picPath)
|
||||
.ignoreBy(100)
|
||||
.setTargetDir(PathConfig.CATCH_PATH)
|
||||
.filter(path -> !(TextUtils.isEmpty(path) || path.toLowerCase().endsWith(".gif")))
|
||||
.setCompressListener(new OnCompressListener() {
|
||||
@Override
|
||||
public void onStart() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(File file) {
|
||||
RequestBody requestFile = RequestBody.create(MediaType.parse("multipart/form-data"), file);
|
||||
MultipartBody.Part body = MultipartBody.Part.createFormData("image", file.getName(), requestFile);
|
||||
RetrofitManager.getInstance()
|
||||
.create(LocationApiService.class)
|
||||
.uploadImage(body, UserLgUtils.getToken())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseUserBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(BaseUserBean baseUserBean) {
|
||||
if (progressDialog != null && progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
ToastUtils.showShort("上传成功");
|
||||
mCurrentBean.setId(baseUserBean.getData());
|
||||
mPhotoIds += baseUserBean.getData() + ",";
|
||||
mCurrentBean.setPath(picPath);
|
||||
if (mPhotos.size() < 9) {
|
||||
mPhotos.add(new AddPhotoBean());
|
||||
}
|
||||
mAddPhotoAdapter.notifyDataSetChanged();
|
||||
mCurrentBean = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
if (progressDialog != null && progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
ToastUtils.showShort("上传失败,请稍后重试.");
|
||||
if (file.exists()) {
|
||||
file.delete();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
if (progressDialog.isShowing()) {
|
||||
progressDialog.dismiss();
|
||||
}
|
||||
ToastUtils.showShort("图片上传失败,请稍后重试");
|
||||
}
|
||||
})
|
||||
.launch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化定位参数配置
|
||||
*/
|
||||
|
||||
private void startListenerLocation() {
|
||||
mLocationClient = new LocationClient(getApplicationContext());
|
||||
LocationClientOption locationOption = new LocationClientOption();
|
||||
MyLocationListener myLocationListener = new MyLocationListener();
|
||||
mLocationClient.registerLocationListener(myLocationListener);
|
||||
locationOption.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
|
||||
locationOption.setCoorType("bd09ll");
|
||||
locationOption.setScanSpan(1000);
|
||||
locationOption.setIsNeedAddress(true);
|
||||
locationOption.setIsNeedLocationDescribe(true);
|
||||
locationOption.setNeedDeviceDirect(false);
|
||||
locationOption.setLocationNotify(true);
|
||||
locationOption.setIgnoreKillProcess(true);
|
||||
locationOption.setIsNeedLocationDescribe(true);
|
||||
locationOption.setIsNeedLocationPoiList(true);
|
||||
locationOption.SetIgnoreCacheException(false);
|
||||
locationOption.setOpenGps(true);
|
||||
locationOption.setIsNeedAltitude(false);
|
||||
locationOption.setOpenAutoNotifyMode();
|
||||
locationOption.setLocationPurpose(LocationClientOption.BDLocationPurpose.SignIn);
|
||||
locationOption.setOpenAutoNotifyMode(3000, 1, LocationClientOption.LOC_SENSITIVITY_HIGHT);
|
||||
mLocationClient.setLocOption(locationOption);
|
||||
mLocationClient.start();
|
||||
}
|
||||
|
||||
/**
|
||||
* 实现定位回调
|
||||
*/
|
||||
public class MyLocationListener extends BDAbstractLocationListener {
|
||||
@Override
|
||||
public void onReceiveLocation(BDLocation location) {
|
||||
double latitude = location.getLatitude();
|
||||
double longitude = location.getLongitude();
|
||||
float radius = location.getRadius();
|
||||
int errorCode = location.getLocType();
|
||||
if (latitude != Double.MIN_VALUE && longitude != Double.MIN_VALUE && radius <= 300) {
|
||||
LogUtils.e("====");
|
||||
mCurrentLatitude = latitude;
|
||||
mCurrentLongitude = longitude;
|
||||
mLocationClient.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,188 @@
|
||||
package com.sucstepsoft.txrealtimelocation.activitys.issue.demo;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.beans.AddPhotoBean;
|
||||
import com.sucstepsoft.txrealtimelocation.widget.EmStateCheck;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/3/27 - 10:30 AM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class NewOptions {
|
||||
private int type;// 1单选 2输入
|
||||
private String id;
|
||||
private List<AddPhotoBean> photos;
|
||||
private List<ChildBean> child;
|
||||
private String title;
|
||||
private EmStateCheck state = EmStateCheck.NORMAL;//检查状态 normal未检查 check合格 uncheck不合格
|
||||
private int rectify = 4;//立即整改-4,限期整改-5 不配合-6
|
||||
private int isMust = 1;//1 必查 2选查
|
||||
private String inputContent;
|
||||
|
||||
//整改期限
|
||||
// 当场整改
|
||||
// 当天整改
|
||||
//限期整改
|
||||
// 1天 5 10
|
||||
|
||||
public List<ChildBean> getChild() {
|
||||
return child;
|
||||
}
|
||||
|
||||
public void setChild(List<ChildBean> child) {
|
||||
this.child = child;
|
||||
}
|
||||
|
||||
public String getInputContent() {
|
||||
return inputContent;
|
||||
}
|
||||
|
||||
public void setInputContent(String inputContent) {
|
||||
this.inputContent = inputContent;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
private String timeLimit;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTimeLimit() {
|
||||
return timeLimit;
|
||||
}
|
||||
|
||||
public void setTimeLimit(String timeLimit) {
|
||||
this.timeLimit = timeLimit;
|
||||
}
|
||||
|
||||
public int getRectify() {
|
||||
return rectify;
|
||||
}
|
||||
|
||||
public void setRectify(int rectify) {
|
||||
this.rectify = rectify;
|
||||
}
|
||||
|
||||
public List<AddPhotoBean> getPhotos() {
|
||||
return photos;
|
||||
}
|
||||
|
||||
public void setPhotos(List<AddPhotoBean> photos) {
|
||||
this.photos = photos;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
|
||||
public EmStateCheck getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(EmStateCheck state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public int getIsMust() {
|
||||
return isMust;
|
||||
}
|
||||
|
||||
public void setIsMust(int isMust) {
|
||||
this.isMust = isMust;
|
||||
}
|
||||
|
||||
public static class ChildBean {
|
||||
private int id;
|
||||
private String title;
|
||||
private boolean isCheck;
|
||||
private boolean isWrong;
|
||||
private String itemId;
|
||||
private int type;
|
||||
private String inputNumber;
|
||||
private String inputText;
|
||||
|
||||
public String getInputNumber() {
|
||||
return inputNumber;
|
||||
}
|
||||
|
||||
public void setInputNumber(String inputNumber) {
|
||||
this.inputNumber = inputNumber;
|
||||
}
|
||||
|
||||
public String getInputText() {
|
||||
return inputText;
|
||||
}
|
||||
|
||||
public void setInputText(String inputText) {
|
||||
this.inputText = inputText;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
||||
public void setItemId(String itemId) {
|
||||
this.itemId = itemId;
|
||||
}
|
||||
|
||||
public boolean isWrong() {
|
||||
return isWrong;
|
||||
}
|
||||
|
||||
public void setWrong(boolean wrong) {
|
||||
isWrong = wrong;
|
||||
}
|
||||
|
||||
public boolean isCheck() {
|
||||
return isCheck;
|
||||
}
|
||||
|
||||
public void setCheck(boolean check) {
|
||||
isCheck = check;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,205 @@
|
||||
package com.sucstepsoft.txrealtimelocation.activitys.issue.demo;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
import android.text.Editable;
|
||||
import android.text.InputType;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.beans.AddPhotoBean;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.AddPhotoAdapter;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
|
||||
import com.sucstepsoft.cm_utils.utils.ConvertUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.ScreenUtils;
|
||||
import com.sucstepsoft.txrealtimelocation.R;
|
||||
import com.sucstepsoft.txrealtimelocation.widget.EmStateCheck;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/3/27 - 10:30 AM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class NewOptionsAdapter extends BaseRecyclerAdapter<NewOptions, NewOptionsHolder> {
|
||||
|
||||
private int dp2px;
|
||||
private int dp2px10;
|
||||
private int sp2px;
|
||||
|
||||
public NewOptionsAdapter(Context ctx, List<NewOptions> list) {
|
||||
super(ctx, list);
|
||||
dp2px = ConvertUtils.dp2px(5);
|
||||
dp2px10 = ConvertUtils.dp2px(8);
|
||||
sp2px = 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NewOptionsHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(mContext).inflate(R.layout.item_options_new, parent, false);
|
||||
return new NewOptionsHolder(view);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void bindHolder(NewOptionsHolder oHolder, int i) {
|
||||
//设置是否必须星号
|
||||
if (mData.get(i).getIsMust() == 1) {
|
||||
oHolder.mIvIsMust.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
oHolder.mIvIsMust.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
oHolder.mTvTitle.setText(mData.get(i).getTitle());
|
||||
oHolder.mRgState.setOnCheckedChangeListener(null);
|
||||
oHolder.mEtContent.setVisibility(View.GONE);
|
||||
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.setPadding(dp2px, dp2px, dp2px, dp2px);
|
||||
button.setTextSize(sp2px);
|
||||
button.setButtonDrawable(R.drawable.sel_rb);
|
||||
oHolder.mRgState.addView(button);
|
||||
isInput = true;
|
||||
} else {
|
||||
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);
|
||||
editText.setPadding(dp2px, dp2px, dp2px, dp2px);
|
||||
editText.setTextSize(sp2px);
|
||||
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
|
||||
lp.bottomMargin = dp2px10;
|
||||
lp.leftMargin = dp2px10;
|
||||
lp.rightMargin = dp2px10;
|
||||
lp.topMargin = dp2px10;
|
||||
editText.setLayoutParams(lp);
|
||||
if (mData.get(i).getChild().get(j).getType() == 2) {
|
||||
editText.setInputType(InputType.TYPE_CLASS_NUMBER);
|
||||
} else {
|
||||
editText.setInputType(InputType.TYPE_CLASS_TEXT);
|
||||
}
|
||||
int finalJ = j;
|
||||
editText.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence charSequence, int i2, int i3, int i4) {
|
||||
mData.get(i).getChild().get(finalJ).setInputText(charSequence.toString().trim());
|
||||
// boolean isInput = false;
|
||||
// for (int k = 0; k < mData.get(i).getChild().size(); k++) {
|
||||
// if (mData.get(i).getChild().get(k).getType() == 1) {
|
||||
// isInput = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// //纯输入
|
||||
// if (!isInput) {
|
||||
// //纯输入 判断有没有值
|
||||
// boolean input = false;
|
||||
//
|
||||
// for (int k = 0; k < mData.get(i).getChild().size(); k++) {
|
||||
// if (!TextUtils.isEmpty(mData.get(i).getChild().get(k).getInputText())) {
|
||||
// //有值
|
||||
// input = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// if (input) {
|
||||
// mData.get(i).setState(EmStateCheck.CHECK);
|
||||
// } else {
|
||||
// mData.get(i).setState(EmStateCheck.UNCHECK);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable editable) {
|
||||
|
||||
}
|
||||
});
|
||||
oHolder.mLlCheck.addView(editText);
|
||||
}
|
||||
}
|
||||
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);
|
||||
} else {
|
||||
mData.get(i).setState(EmStateCheck.CHECK);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mData.get(i).getChild().get(j).setCheck(false);
|
||||
}
|
||||
}
|
||||
notifyDataChange();
|
||||
});
|
||||
if (isInput) {
|
||||
//存在选择
|
||||
mData.get(i).setState(EmStateCheck.NORMAL);
|
||||
} else {
|
||||
mData.get(i).setState(EmStateCheck.CHECK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void notifyDataChange() {
|
||||
boolean isUnCheck = false;
|
||||
for (int i = 0; i < mData.size(); i++) {
|
||||
for (int j = 0; j < mData.get(i).getChild().size(); j++) {
|
||||
NewOptions.ChildBean bean = mData.get(i).getChild().get(j);
|
||||
if (bean.isCheck() && bean.isWrong() && mData.get(i).getIsMust() == 1) {
|
||||
isUnCheck = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
mChangeListener.onStateChange(isUnCheck);
|
||||
}
|
||||
|
||||
|
||||
private SelectPhoto mSelectPhotoListener;
|
||||
|
||||
public void addSelectPhotoListener(SelectPhoto selectPhotoListener) {
|
||||
this.mSelectPhotoListener = selectPhotoListener;
|
||||
}
|
||||
|
||||
public interface SelectPhoto {
|
||||
void onSelectPhoto(AddPhotoBean bean, Options options, int i, int type);
|
||||
}
|
||||
|
||||
private StateChangeListener mChangeListener;
|
||||
|
||||
public void setStateChangeListener(StateChangeListener listener) {
|
||||
this.mChangeListener = listener;
|
||||
}
|
||||
|
||||
public interface StateChangeListener {
|
||||
void onStateChange(boolean isCheck);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.sucstepsoft.txrealtimelocation.activitys.issue.demo;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.AppCompatSpinner;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.sucstepsoft.txrealtimelocation.R;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/3/27 - 10:32 AM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class NewOptionsHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvTitle;
|
||||
public ImageView mIvIsMust;
|
||||
public RadioGroup mRgState;
|
||||
public LinearLayout mLlCheck;
|
||||
public EditText mEtContent;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
@ -26,6 +26,7 @@ import com.sucstepsoft.cm_utils.utils.UIUtil;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
import com.sucstepsoft.txrealtimelocation.R;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.CheckOptionsActivity;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.NewCheckOptionsActivity;
|
||||
import com.sucstepsoft.txrealtimelocation.adapters.CompanyCheckAdapter;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.CompanyListDataBean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.DictBean;
|
||||
@ -119,12 +120,13 @@ public class SelCompanyActivity extends BaseActivity {
|
||||
mAdapter = new CompanyCheckAdapter(mActivity, mDatas);
|
||||
mXlvComLib.setAdapter(mAdapter);
|
||||
mAdapter.addOnItemClickListener(bean -> {
|
||||
Intent intent = new Intent(mActivity, CheckOptionsActivity.class);
|
||||
Intent intent = new Intent(mActivity, NewCheckOptionsActivity.class);
|
||||
intent.putExtra("nId", bean.getNatureJoinByEnterpriseId());
|
||||
intent.putExtra("id", bean.getIndustryJoinByEnterpriseId());
|
||||
intent.putExtra("cId",bean.getEnterpriseId());
|
||||
intent.putExtra("cId", bean.getEnterpriseId());
|
||||
intent.putExtra("name", bean.getNameJoinByEnterpriseId());
|
||||
intent.putExtra("peo", bean.getMasterJoinByEnterpriseId());
|
||||
intent.putExtra("phone",bean.getPhoneJoinByEnterpriseId());
|
||||
intent.putExtra("phone", bean.getPhoneJoinByEnterpriseId());
|
||||
startActivity(intent);
|
||||
});
|
||||
LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity);
|
||||
|
@ -35,7 +35,7 @@ public class CompanyLibAdapter extends BaseRecyclerAdapter<CompanyListDataBean.R
|
||||
public void bindHolder(CompanyHolder companyHolder, int i) {
|
||||
companyHolder.mTvAddress.setText("地址:" + mData.get(i).getArea2DictionaryName() + mData.get(i).getArea3DictionaryName() + mData.get(i).getArea4DictionaryName() + mData.get(i).getArea5DictionaryName());
|
||||
companyHolder.mTvCompanyName.setText(mData.get(i).getNameJoinByEnterpriseId());
|
||||
companyHolder.mTvCompanyPeo.setText("负责人:" + mData.get(i).getMasterJoinByEnterpriseId());
|
||||
companyHolder.mTvCompanyPeo.setText("法人:" + mData.get(i).getLegalPerson());
|
||||
if (TextUtils.isEmpty(mData.get(i).getUserId())) {
|
||||
companyHolder.mBtnClain.setVisibility(View.VISIBLE);
|
||||
companyHolder.mBtnUnClaim.setVisibility(View.GONE);
|
||||
|
@ -2,18 +2,26 @@ package com.sucstepsoft.txrealtimelocation.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.GridLayoutManager;
|
||||
import android.text.Editable;
|
||||
import android.text.InputType;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RadioButton;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.beans.AddPhotoBean;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.AddPhotoAdapter;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
|
||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
import com.sucstepsoft.txrealtimelocation.R;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.NewOptions;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.NewOptionsAdapter;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.Options;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.OptionsAdapter;
|
||||
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.OptionsHolder;
|
||||
@ -28,16 +36,10 @@ import java.util.List;
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class CounterCheckOptionsAdapter extends BaseRecyclerAdapter<Options, CounterCheckOptionHolder> {
|
||||
private ArrayAdapter<String> mDefaultApater;
|
||||
private ArrayAdapter<String> mAdapter;
|
||||
private String[] mNowStrings;
|
||||
private String[] mTermStrings;
|
||||
public class CounterCheckOptionsAdapter extends BaseRecyclerAdapter<NewOptions, CounterCheckOptionHolder> {
|
||||
|
||||
public CounterCheckOptionsAdapter(Context ctx, List list) {
|
||||
super(ctx, list);
|
||||
mNowStrings = mContext.getResources().getStringArray(R.array.limit);
|
||||
mTermStrings = mContext.getResources().getStringArray(R.array.timeLimit);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -52,235 +54,107 @@ public class CounterCheckOptionsAdapter extends BaseRecyclerAdapter<Options, Cou
|
||||
if (mData.get(i).getIsMust() == 1) {
|
||||
oHolder.mIvIsMust.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
oHolder.mIvIsMust.setVisibility(View.GONE);
|
||||
oHolder.mIvIsMust.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
//设置检查项名称
|
||||
oHolder.mTvTitle.setText(mData.get(i).getTitle());
|
||||
oHolder.mRgState.setOnCheckedChangeListener(null);
|
||||
if (mData.get(i).getState() == EmStateCheck.UNCHECK) {
|
||||
//不合格
|
||||
oHolder.mLlContent.setVisibility(View.VISIBLE);
|
||||
oHolder.mRlvPhotos.setVisibility(View.VISIBLE);
|
||||
setDisData(oHolder, mData.get(i), i);
|
||||
} else if (mData.get(i).getState() == EmStateCheck.CHECK) {
|
||||
//合格
|
||||
oHolder.mLlContent.setVisibility(View.GONE);
|
||||
oHolder.mRlvPhotos.setVisibility(View.VISIBLE);
|
||||
setCheckData(oHolder, mData.get(i), i);
|
||||
} else {
|
||||
//未检查
|
||||
oHolder.mLlContent.setVisibility(View.GONE);
|
||||
oHolder.mRlvPhotos.setVisibility(View.GONE);
|
||||
setNomarlData(oHolder, mData.get(i), i);
|
||||
oHolder.mEtContent.setVisibility(View.GONE);
|
||||
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.setPadding(10, 10, 10, 10);
|
||||
button.setTextSize(15);
|
||||
button.setButtonDrawable(R.drawable.sel_rb);
|
||||
oHolder.mRgState.addView(button);
|
||||
isInput = true;
|
||||
} else {
|
||||
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);
|
||||
editText.setPadding(10, 10, 10, 10);
|
||||
editText.setTextSize(15);
|
||||
LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) oHolder.mLlCheck.getLayoutParams();
|
||||
lp.bottomMargin = 15;
|
||||
lp.leftMargin = 15;
|
||||
lp.rightMargin = 15;
|
||||
editText.setLayoutParams(lp);
|
||||
if (mData.get(i).getChild().get(j).getType() == 2) {
|
||||
editText.setInputType(InputType.TYPE_CLASS_NUMBER);
|
||||
} else {
|
||||
editText.setInputType(InputType.TYPE_CLASS_TEXT);
|
||||
}
|
||||
int finalJ = j;
|
||||
editText.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence charSequence, int i2, int i3, int i4) {
|
||||
mData.get(i).getChild().get(finalJ).setInputText(charSequence.toString().trim());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable editable) {
|
||||
|
||||
}
|
||||
});
|
||||
oHolder.mLlCheck.addView(editText);
|
||||
}
|
||||
}
|
||||
oHolder.mRgState.setOnCheckedChangeListener((radioGroup, i1) -> {
|
||||
LogUtils.e("调用了==" + i1);
|
||||
switch (i1) {
|
||||
case R.id.rb_state_uncheck:
|
||||
mData.get(i).setState(EmStateCheck.NORMAL);
|
||||
oHolder.mLlContent.setVisibility(View.GONE);
|
||||
oHolder.mRlvPhotos.setVisibility(View.GONE);
|
||||
setNomarlData(oHolder, mData.get(i), i);
|
||||
break;
|
||||
case R.id.rb_state_check:
|
||||
mData.get(i).setState(EmStateCheck.CHECK);
|
||||
oHolder.mLlContent.setVisibility(View.GONE);
|
||||
oHolder.mRlvPhotos.setVisibility(View.VISIBLE);
|
||||
setCheckData(oHolder, mData.get(i), i);
|
||||
break;
|
||||
case R.id.rb_state_dis:
|
||||
mData.get(i).setState(EmStateCheck.UNCHECK);
|
||||
oHolder.mLlContent.setVisibility(View.VISIBLE);
|
||||
oHolder.mRlvPhotos.setVisibility(View.VISIBLE);
|
||||
setDisData(oHolder, mData.get(i), i);
|
||||
break;
|
||||
}
|
||||
});
|
||||
setPhotoView(mData.get(i), oHolder, i);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置不合格数据
|
||||
*
|
||||
* @param oHolder
|
||||
* @param op
|
||||
* @param index
|
||||
*/
|
||||
private void setDisData(CounterCheckOptionHolder oHolder, Options op, int index) {
|
||||
oHolder.mRgState.check(R.id.rb_state_dis);
|
||||
mData.get(index).setState(EmStateCheck.UNCHECK);
|
||||
//TODO 不合格 回显
|
||||
int rectify = mData.get(index).getRectify();
|
||||
if (rectify == 4) {//立即整改
|
||||
oHolder.mRg.check(R.id.rb_now);
|
||||
oHolder.mLlSp.setVisibility(View.VISIBLE);
|
||||
String timeLimit = mData.get(index).getTimeLimit();
|
||||
mDefaultApater = new ArrayAdapter<>(mContext, R.layout.item_pop_text, mNowStrings);
|
||||
oHolder.mSpinner.setAdapter(mDefaultApater);
|
||||
if (!TextUtils.isEmpty(timeLimit)) {
|
||||
//之前选择过
|
||||
if (timeLimit.equals("立即整改")) {
|
||||
oHolder.mSpinner.setSelection(0);
|
||||
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);
|
||||
} else {
|
||||
mData.get(i).setState(EmStateCheck.CHECK);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
oHolder.mSpinner.setSelection(1);
|
||||
mData.get(i).getChild().get(j).setCheck(false);
|
||||
}
|
||||
} else {
|
||||
//未选择过
|
||||
oHolder.mSpinner.setSelection(0);
|
||||
}
|
||||
oHolder.mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
String s = mNowStrings[i];
|
||||
mData.get(index).setTimeLimit(s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
|
||||
}
|
||||
});
|
||||
} else if (rectify == 5) {//限期整改
|
||||
oHolder.mRg.check(R.id.rb_term);
|
||||
oHolder.mLlSp.setVisibility(View.VISIBLE);
|
||||
String timeLimit = mData.get(index).getTimeLimit();
|
||||
mAdapter = new ArrayAdapter<>(mContext, R.layout.item_pop_text, mTermStrings);
|
||||
oHolder.mSpinner.setAdapter(mAdapter);
|
||||
if (!TextUtils.isEmpty(timeLimit)) {
|
||||
//之前选择过
|
||||
switch (timeLimit) {
|
||||
case "5天":
|
||||
oHolder.mSpinner.setSelection(1);
|
||||
break;
|
||||
case "10天":
|
||||
oHolder.mSpinner.setSelection(2);
|
||||
break;
|
||||
case "15天":
|
||||
oHolder.mSpinner.setSelection(3);
|
||||
break;
|
||||
case "20天":
|
||||
oHolder.mSpinner.setSelection(4);
|
||||
break;
|
||||
case "25天":
|
||||
oHolder.mSpinner.setSelection(5);
|
||||
break;
|
||||
case "30天":
|
||||
oHolder.mSpinner.setSelection(6);
|
||||
break;
|
||||
case "1天":
|
||||
default:
|
||||
oHolder.mSpinner.setSelection(0);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
//未选择过
|
||||
oHolder.mSpinner.setSelection(0);
|
||||
}
|
||||
oHolder.mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
String s = mTermStrings[i];
|
||||
mData.get(index).setTimeLimit(s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
|
||||
}
|
||||
});
|
||||
} else {//不配合
|
||||
oHolder.mRg.check(R.id.rb_coor);
|
||||
oHolder.mLlSp.setVisibility(View.GONE);
|
||||
notifyDataChange();
|
||||
});
|
||||
if (isInput) {
|
||||
//存在选择
|
||||
mData.get(i).setState(EmStateCheck.NORMAL);
|
||||
} else {
|
||||
mData.get(i).setState(EmStateCheck.CHECK);
|
||||
}
|
||||
oHolder.mRg.setOnCheckedChangeListener((radioGroup, id) -> {
|
||||
if (id == R.id.rb_now) { //立即整改
|
||||
oHolder.mLlSp.setVisibility(View.VISIBLE);
|
||||
mDefaultApater = new ArrayAdapter<>(mContext, R.layout.item_pop_text, mNowStrings);
|
||||
oHolder.mSpinner.setAdapter(mDefaultApater);
|
||||
oHolder.mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
String s = mNowStrings[i];
|
||||
mData.get(index).setTimeLimit(s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
|
||||
}
|
||||
});
|
||||
mData.get(index).setRectify(4);
|
||||
mData.get(index).setTimeLimit("立即整改");
|
||||
} else if (id == R.id.rb_term) { //限期整改
|
||||
oHolder.mLlSp.setVisibility(View.VISIBLE);
|
||||
mAdapter = new ArrayAdapter<>(mContext, R.layout.item_pop_text, mTermStrings);
|
||||
oHolder.mSpinner.setAdapter(mAdapter);
|
||||
oHolder.mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
String s = mTermStrings[i];
|
||||
mData.get(index).setTimeLimit(s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
|
||||
}
|
||||
});
|
||||
mData.get(index).setRectify(5);
|
||||
mData.get(index).setTimeLimit("1天");
|
||||
} else { //不配合
|
||||
oHolder.mLlSp.setVisibility(View.GONE);
|
||||
mData.get(index).setRectify(6);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置合格数据
|
||||
*
|
||||
* @param oHolder
|
||||
* @param op
|
||||
* @param index
|
||||
*/
|
||||
private void setCheckData(CounterCheckOptionHolder oHolder, Options op, int index) {
|
||||
oHolder.mRgState.check(R.id.rb_state_check);
|
||||
setPhotoView(op, oHolder, index);
|
||||
mData.get(index).setState(EmStateCheck.CHECK);
|
||||
mData.get(index).setRectify(4);
|
||||
mData.get(index).setTimeLimit("");
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置未检查数据
|
||||
*
|
||||
* @param oHolder
|
||||
* @param op
|
||||
* @param index
|
||||
*/
|
||||
private void setNomarlData(CounterCheckOptionHolder oHolder, Options op, int index) {
|
||||
oHolder.mRgState.check(R.id.rb_state_uncheck);
|
||||
mData.get(index).setState(EmStateCheck.NORMAL);
|
||||
setPhotoView(op, oHolder, index);
|
||||
mData.get(index).setRectify(4);
|
||||
mData.get(index).setTimeLimit("");
|
||||
}
|
||||
|
||||
|
||||
private void setPhotoView(Options op, 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.addOnItemClickListener(bean -> {
|
||||
if (mSelectPhotoListener != null) {
|
||||
if (TextUtils.isEmpty(bean.getPath())) {
|
||||
//空数据,选择图片
|
||||
mSelectPhotoListener.onSelectPhoto(bean, mData.get(index), index, 1);
|
||||
} else {
|
||||
mSelectPhotoListener.onSelectPhoto(bean, mData.get(index), index, 2);
|
||||
private void notifyDataChange() {
|
||||
boolean isUnCheck = false;
|
||||
for (int i = 0; i < mData.size(); i++) {
|
||||
for (int j = 0; j < mData.get(i).getChild().size(); j++) {
|
||||
NewOptions.ChildBean bean = mData.get(i).getChild().get(j);
|
||||
if (bean.isCheck() && bean.isWrong() && mData.get(i).getIsMust() == 1) {
|
||||
isUnCheck = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
mChangeListener.onStateChange(isUnCheck);
|
||||
}
|
||||
private StateChangeListener mChangeListener;
|
||||
|
||||
public void setStateChangeListener(StateChangeListener listener) {
|
||||
this.mChangeListener = listener;
|
||||
}
|
||||
|
||||
public interface StateChangeListener {
|
||||
void onStateChange(boolean isCheck);
|
||||
}
|
||||
|
||||
private OptionsAdapter.SelectPhoto mSelectPhotoListener;
|
||||
|
@ -8,6 +8,7 @@ import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
|
||||
@ -15,6 +16,7 @@ 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.MissionDetailHolder;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.HistoryDetialBean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.HistoryMissionBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -26,9 +28,8 @@ import java.util.List;
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class MissionDetailAdapter extends BaseRecyclerAdapter<HistoryMissionBean, MissionDetailHolder> {
|
||||
|
||||
public MissionDetailAdapter(Context ctx, List<HistoryMissionBean> list) {
|
||||
public class MissionDetailAdapter extends BaseRecyclerAdapter<HistoryDetialBean.CheckItemsBean, MissionDetailHolder> {
|
||||
public MissionDetailAdapter(Context ctx, List<HistoryDetialBean.CheckItemsBean> list) {
|
||||
super(ctx, list);
|
||||
}
|
||||
|
||||
@ -40,61 +41,26 @@ public class MissionDetailAdapter extends BaseRecyclerAdapter<HistoryMissionBean
|
||||
|
||||
@Override
|
||||
public void bindHolder(MissionDetailHolder holder, int i) {
|
||||
holder.mTvName.setText(mData.get(i).getNameJoinByCheckItemId());
|
||||
switch (mData.get(i).getCheckResult()) {
|
||||
case 1:
|
||||
holder.mTvCheckType.setText("检查合格");
|
||||
holder.mTvCheckType.setTextColor(Color.GREEN);
|
||||
holder.mTvDay.setVisibility(View.GONE);
|
||||
break;
|
||||
case 2:
|
||||
holder.mTvCheckType.setText("立即整改");
|
||||
holder.mTvCheckType.setTextColor(Color.RED);
|
||||
holder.mTvDay.setVisibility(View.GONE);
|
||||
break;
|
||||
case 3:
|
||||
holder.mTvCheckType.setText("限期整改");
|
||||
holder.mTvDay.setVisibility(View.VISIBLE);
|
||||
holder.mTvCheckType.setTextColor(Color.RED);
|
||||
holder.mTvDay.setText(mData.get(i).getRectificationDays() + "天");
|
||||
break;
|
||||
case 4:
|
||||
holder.mTvCheckType.setText("企业不配合");
|
||||
holder.mTvCheckType.setTextColor(Color.RED);
|
||||
holder.mTvDay.setVisibility(View.GONE);
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
holder.mTvCheckType.setTextColor(Color.RED);
|
||||
holder.mTvCheckType.setText("未检查");
|
||||
holder.mTvDay.setVisibility(View.GONE);
|
||||
break;
|
||||
}
|
||||
if (!TextUtils.isEmpty(mData.get(i).getScenePhotos())) {
|
||||
holder.mRlvPhotos.setVisibility(View.VISIBLE);
|
||||
List<String> photos = new ArrayList<>();
|
||||
String[] split = mData.get(i).getScenePhotos().split(",");
|
||||
for (int j = 0; j < split.length; j++) {
|
||||
if (!TextUtils.isEmpty(split[j])) {
|
||||
photos.add(BaseUrlApi.BASE_IMG_URL + split[j]);
|
||||
holder.mTvName.setText(mData.get(i).getName());
|
||||
if (mData.get(i).getHiddenDangerReports() != null && mData.get(i).getHiddenDangerReports().size() > 0) {
|
||||
holder.mLlContent.setVisibility(View.VISIBLE);
|
||||
for (int j = 0; j < mData.get(i).getHiddenDangerReports().size(); j++) {
|
||||
TextView tv = new TextView(mContext);
|
||||
tv.setTextSize(13);
|
||||
switch (mData.get(i).getHiddenDangerReports().get(j).getCheckItemType()) {
|
||||
case 1:
|
||||
tv.setText(mData.get(i).getHiddenDangerReports().get(j).getNameJoinByCheckItemId());
|
||||
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();
|
||||
tv.setText(tx);
|
||||
break;
|
||||
}
|
||||
holder.mLlContent.addView(tv);
|
||||
}
|
||||
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);
|
||||
});
|
||||
} else {
|
||||
holder.mRlvPhotos.setVisibility(View.GONE);
|
||||
holder.mLlContent.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.AppCompatSpinner;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RadioButton;
|
||||
@ -20,30 +21,20 @@ import com.sucstepsoft.txrealtimelocation.widget.StateCheckView;
|
||||
* 描述: 复查选项
|
||||
*/
|
||||
public class CounterCheckOptionHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvTitle;
|
||||
// public StateCheckView mScvOptions;
|
||||
public RecyclerView mRlvPhotos;
|
||||
public LinearLayout mLlContent;
|
||||
public AppCompatSpinner mSpinner;
|
||||
public RadioGroup mRg;
|
||||
public LinearLayout mLlSp;
|
||||
public RadioButton mRbNow;
|
||||
public ImageView mIvIsMust;
|
||||
public RadioGroup mRgState;
|
||||
public TextView mTvTitle;
|
||||
public ImageView mIvIsMust;
|
||||
public LinearLayout mLlCheck;
|
||||
public EditText mEtContent;
|
||||
|
||||
|
||||
public CounterCheckOptionHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mTvTitle = itemView.findViewById(R.id.tv_title);
|
||||
mRgState = itemView.findViewById(R.id.rg_state);
|
||||
// mScvOptions = itemView.findViewById(R.id.scv_options);
|
||||
mRlvPhotos = itemView.findViewById(R.id.rlv_photos);
|
||||
mLlContent = itemView.findViewById(R.id.ll_content);
|
||||
mSpinner = itemView.findViewById(R.id.sp_term);
|
||||
mRg = itemView.findViewById(R.id.rg_term);
|
||||
mRbNow = itemView.findViewById(R.id.rb_now);
|
||||
mLlSp = itemView.findViewById(R.id.ll_sp);
|
||||
mIvIsMust = itemView.findViewById(R.id.iv_must);
|
||||
mLlCheck = itemView.findViewById(R.id.ll_check);
|
||||
mEtContent = itemView.findViewById(R.id.et_content);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.sucstepsoft.txrealtimelocation.adapters.holders;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.sucstepsoft.txrealtimelocation.R;
|
||||
@ -15,16 +16,11 @@ import com.sucstepsoft.txrealtimelocation.R;
|
||||
*/
|
||||
public class MissionDetailHolder extends RecyclerView.ViewHolder {
|
||||
public TextView mTvName;
|
||||
public TextView mTvDay;
|
||||
public TextView mTvCheckType;
|
||||
public RecyclerView mRlvPhotos;
|
||||
public LinearLayout mLlContent;
|
||||
|
||||
public MissionDetailHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mTvName = itemView.findViewById(R.id.tv_options_name);
|
||||
mTvDay = itemView.findViewById(R.id.tv_day);
|
||||
mTvCheckType = itemView.findViewById(R.id.tv_options_check);
|
||||
mRlvPhotos = itemView.findViewById(R.id.rlv_photos);
|
||||
|
||||
mLlContent = itemView.findViewById(R.id.ll_content);
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,8 @@ import android.content.Context;
|
||||
import android.support.multidex.MultiDex;
|
||||
import android.support.multidex.MultiDexApplication;
|
||||
|
||||
import com.baidu.mapapi.CoordType;
|
||||
import com.baidu.mapapi.SDKInitializer;
|
||||
import com.squareup.leakcanary.LeakCanary;
|
||||
import com.tencent.bugly.crashreport.CrashReport;
|
||||
|
||||
@ -41,16 +43,17 @@ public class BaseApplication extends MultiDexApplication {
|
||||
initJPush();
|
||||
// CrashReport.initCrashReport(getApplicationContext(), "ff95776367", false);
|
||||
sInitialized = true;
|
||||
initBaiduMap();
|
||||
}
|
||||
|
||||
/**
|
||||
* 百度地图初始化
|
||||
*/
|
||||
private void initBaiduMap() {
|
||||
// SDKInitializer.initialize(this);
|
||||
SDKInitializer.initialize(this);
|
||||
//自4.3.0起,百度地图SDK所有接口均支持百度坐标和国测局坐标,用此方法设置您使用的坐标类型.
|
||||
//包括BD09LL和GCJ02两种坐标,默认是BD09LL坐标。
|
||||
// SDKInitializer.setCoordType(CoordType.BD09LL);
|
||||
SDKInitializer.setCoordType(CoordType.BD09LL);
|
||||
}
|
||||
|
||||
// public static LocationChangBroadcastReceiver getlocationChangeBoardcase() {
|
||||
|
@ -0,0 +1,74 @@
|
||||
package com.sucstepsoft.txrealtimelocation.beans;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/3/31 - 3:57 PM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class CheckItemOption {
|
||||
|
||||
/**
|
||||
* checkItemId : string
|
||||
* checkItemOptionId : string
|
||||
* isWrong : 0
|
||||
* name : string
|
||||
* type : 0
|
||||
* unit : string
|
||||
*/
|
||||
|
||||
private String checkItemId;
|
||||
private String checkItemOptionId;
|
||||
private int isWrong;
|
||||
private String name;
|
||||
private int type;
|
||||
private String unit;
|
||||
|
||||
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 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 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;
|
||||
}
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
package com.sucstepsoft.txrealtimelocation.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/3/31 - 3:57 PM
|
||||
@ -8,32 +10,28 @@ package com.sucstepsoft.txrealtimelocation.beans;
|
||||
*/
|
||||
public class CheckOptionsbean {
|
||||
|
||||
|
||||
/**
|
||||
* industryCheckItemId : 3a1725c2-c1e6-496b-bb58-f70bbcbc7ded
|
||||
* industryId : 706b8520-3a1d-431e-a203-0d307dc22e87
|
||||
* industryIdDictionaryName : 餐饮
|
||||
* checkItemId : a1c27ea5-40dd-4cc8-974c-d387f8ba428c
|
||||
* nameJoinByCheckItemId : 照明
|
||||
* summaryJoinByCheckItemId : 照明
|
||||
* typeJoinByCheckItemId : 1
|
||||
* industryCheckItemId : a6027f46-8ff0-466a-996b-9198dbfc52c5
|
||||
* natureId : 165aa316-2972-4ed9-9a4b-7f8b9d489986
|
||||
* natureIdDictionaryName : 商店超市
|
||||
* checkItemId : d37491ee-146e-430e-b155-2256fc0c4957
|
||||
* nameJoinByCheckItemId : 营业执照
|
||||
* summaryJoinByCheckItemId : 营业执照
|
||||
* typeJoinByCheckItemId :
|
||||
* type : 1
|
||||
* checkItemOptions : [{"checkItemOptionId":"6ba68e00-4c67-4974-9d8b-5f7e3f2e7027","checkItemId":"","type":1,"name":"有","unit":"","isWrong":0},{"checkItemOptionId":"675a2ead-c22c-4415-94bb-4c8543a4337a","checkItemId":"","type":1,"name":"无","unit":"","isWrong":1}]
|
||||
*/
|
||||
|
||||
private String industryCheckItemId;
|
||||
private String industryId;
|
||||
private String industryIdDictionaryName;
|
||||
private String natureId;
|
||||
private String natureIdDictionaryName;
|
||||
private String checkItemId;
|
||||
private String nameJoinByCheckItemId;
|
||||
private String summaryJoinByCheckItemId;
|
||||
private String typeJoinByCheckItemId;
|
||||
private int type;
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
private List<CheckItemOptionsBean> checkItemOptions;
|
||||
|
||||
public String getIndustryCheckItemId() {
|
||||
return industryCheckItemId;
|
||||
@ -43,20 +41,20 @@ public class CheckOptionsbean {
|
||||
this.industryCheckItemId = industryCheckItemId;
|
||||
}
|
||||
|
||||
public String getIndustryId() {
|
||||
return industryId;
|
||||
public String getNatureId() {
|
||||
return natureId;
|
||||
}
|
||||
|
||||
public void setIndustryId(String industryId) {
|
||||
this.industryId = industryId;
|
||||
public void setNatureId(String natureId) {
|
||||
this.natureId = natureId;
|
||||
}
|
||||
|
||||
public String getIndustryIdDictionaryName() {
|
||||
return industryIdDictionaryName;
|
||||
public String getNatureIdDictionaryName() {
|
||||
return natureIdDictionaryName;
|
||||
}
|
||||
|
||||
public void setIndustryIdDictionaryName(String industryIdDictionaryName) {
|
||||
this.industryIdDictionaryName = industryIdDictionaryName;
|
||||
public void setNatureIdDictionaryName(String natureIdDictionaryName) {
|
||||
this.natureIdDictionaryName = natureIdDictionaryName;
|
||||
}
|
||||
|
||||
public String getCheckItemId() {
|
||||
@ -90,4 +88,86 @@ public class CheckOptionsbean {
|
||||
public void setTypeJoinByCheckItemId(String typeJoinByCheckItemId) {
|
||||
this.typeJoinByCheckItemId = typeJoinByCheckItemId;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public List<CheckItemOptionsBean> getCheckItemOptions() {
|
||||
return checkItemOptions;
|
||||
}
|
||||
|
||||
public void setCheckItemOptions(List<CheckItemOptionsBean> checkItemOptions) {
|
||||
this.checkItemOptions = checkItemOptions;
|
||||
}
|
||||
|
||||
public static class CheckItemOptionsBean {
|
||||
/**
|
||||
* checkItemOptionId : 6ba68e00-4c67-4974-9d8b-5f7e3f2e7027
|
||||
* checkItemId :
|
||||
* type : 1
|
||||
* name : 有
|
||||
* unit :
|
||||
* isWrong : 0
|
||||
*/
|
||||
|
||||
private String checkItemOptionId;
|
||||
private String checkItemId;
|
||||
private int type;
|
||||
private String name;
|
||||
private String unit;
|
||||
private int isWrong;
|
||||
|
||||
public String getCheckItemOptionId() {
|
||||
return checkItemOptionId;
|
||||
}
|
||||
|
||||
public void setCheckItemOptionId(String checkItemOptionId) {
|
||||
this.checkItemOptionId = checkItemOptionId;
|
||||
}
|
||||
|
||||
public String getCheckItemId() {
|
||||
return checkItemId;
|
||||
}
|
||||
|
||||
public void setCheckItemId(String checkItemId) {
|
||||
this.checkItemId = checkItemId;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setUnit(String unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public int getIsWrong() {
|
||||
return isWrong;
|
||||
}
|
||||
|
||||
public void setIsWrong(int isWrong) {
|
||||
this.isWrong = isWrong;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,152 +46,87 @@ public class CompanyListDataBean {
|
||||
|
||||
public static class RowsBean {
|
||||
|
||||
|
||||
/**
|
||||
* addressJoinByEnterpriseId : string
|
||||
* area1DictionaryName : string
|
||||
* area1JoinByEnterpriseId : string
|
||||
* area2DictionaryName : string
|
||||
* area2JoinByEnterpriseId : string
|
||||
* area3DictionaryName : string
|
||||
* area3JoinByEnterpriseId : string
|
||||
* area4DictionaryName : string
|
||||
* area4JoinByEnterpriseId : string
|
||||
* area5DictionaryName : string
|
||||
* area5JoinByEnterpriseId : string
|
||||
* engagedCountJoinByEnterpriseId : string
|
||||
* enterpriseId : string
|
||||
* enterpriseOfGridOperatorId : string
|
||||
* industryDictionaryName : string
|
||||
* industryJoinByEnterpriseId : string
|
||||
* masterJoinByEnterpriseId : string
|
||||
* nameJoinByEnterpriseId : stringa
|
||||
* phoneJoinByEnterpriseId : string
|
||||
* riskOperationDictionaryName : string
|
||||
* riskOperationJoinByEnterpriseId : string
|
||||
* typeDictionaryName : string
|
||||
* typeJoinByEnterpriseId : string
|
||||
* userId : string
|
||||
* enterpriseOfGridOperatorId : 8912ae08-fe03-4001-a867-185f8e70946e
|
||||
* userId : e48e9c4a-995e-4061-abcd-a3c260c11333
|
||||
* enterpriseId : b4b4847d-c182-42c2-b699-e412e0fe12c2
|
||||
* nameJoinByEnterpriseId : 青山区新达厨卫洁具店
|
||||
* typeJoinByEnterpriseId : 30b2b1b8-0915-487f-a33d-449762ed644a
|
||||
* area1JoinByEnterpriseId :
|
||||
* area2JoinByEnterpriseId :
|
||||
* area3JoinByEnterpriseId :
|
||||
* area4JoinByEnterpriseId :
|
||||
* area5JoinByEnterpriseId :
|
||||
* addressJoinByEnterpriseId : 内蒙古自治区包头市青山区色气湾
|
||||
* industryJoinByEnterpriseId : 43b477d9-1bc6-4dc9-b5a7-849187bf438e
|
||||
* engagedCountJoinByEnterpriseId : 2
|
||||
* riskOperationJoinByEnterpriseId :
|
||||
* masterJoinByEnterpriseId :
|
||||
* phoneJoinByEnterpriseId :
|
||||
* area1DictionaryName : 内蒙古
|
||||
* area2DictionaryName : 包头市
|
||||
* area3DictionaryName : 青山区
|
||||
* area4DictionaryName : 青福镇
|
||||
* area5DictionaryName : 色气湾村
|
||||
* industryDictionaryName :
|
||||
* riskOperationDictionaryName :
|
||||
* typeDictionaryName :
|
||||
* industryTypeJoinByEnterpriseId :
|
||||
* industryTypeDictionaryName :
|
||||
* legalPerson :
|
||||
* classifyJoinByEnterpriseId : b61b6396-3ac4-4401-9073-e04f0b33a519
|
||||
* classifyDictionaryName : 嘎查村(社区)
|
||||
* natureJoinByEnterpriseId : 165aa316-2972-4ed9-9a4b-7f8b9d489986
|
||||
* natureDictionaryName : 商店超市
|
||||
*/
|
||||
|
||||
private String addressJoinByEnterpriseId;
|
||||
private String area1DictionaryName;
|
||||
private String area1JoinByEnterpriseId;
|
||||
private String area2DictionaryName;
|
||||
private String area2JoinByEnterpriseId;
|
||||
private String area3DictionaryName;
|
||||
private String area3JoinByEnterpriseId;
|
||||
private String area4DictionaryName;
|
||||
private String area4JoinByEnterpriseId;
|
||||
private String area5DictionaryName;
|
||||
private String area5JoinByEnterpriseId;
|
||||
private String engagedCountJoinByEnterpriseId;
|
||||
private String enterpriseId;
|
||||
private String enterpriseOfGridOperatorId;
|
||||
private String industryDictionaryName;
|
||||
private String industryJoinByEnterpriseId;
|
||||
private String masterJoinByEnterpriseId;
|
||||
private String nameJoinByEnterpriseId;
|
||||
private String phoneJoinByEnterpriseId;
|
||||
private String riskOperationDictionaryName;
|
||||
private String riskOperationJoinByEnterpriseId;
|
||||
private String typeDictionaryName;
|
||||
private String typeJoinByEnterpriseId;
|
||||
private String userId;
|
||||
private String enterpriseId;
|
||||
private String nameJoinByEnterpriseId;
|
||||
private String typeJoinByEnterpriseId;
|
||||
private String area1JoinByEnterpriseId;
|
||||
private String area2JoinByEnterpriseId;
|
||||
private String area3JoinByEnterpriseId;
|
||||
private String area4JoinByEnterpriseId;
|
||||
private String area5JoinByEnterpriseId;
|
||||
private String addressJoinByEnterpriseId;
|
||||
private String industryJoinByEnterpriseId;
|
||||
private String engagedCountJoinByEnterpriseId;
|
||||
private String riskOperationJoinByEnterpriseId;
|
||||
private String masterJoinByEnterpriseId;
|
||||
private String phoneJoinByEnterpriseId;
|
||||
private String area1DictionaryName;
|
||||
private String area2DictionaryName;
|
||||
private String area3DictionaryName;
|
||||
private String area4DictionaryName;
|
||||
private String area5DictionaryName;
|
||||
private String industryDictionaryName;
|
||||
private String riskOperationDictionaryName;
|
||||
private String typeDictionaryName;
|
||||
private String industryTypeJoinByEnterpriseId;
|
||||
private String industryTypeDictionaryName;
|
||||
private String legalPerson;
|
||||
private String classifyJoinByEnterpriseId;
|
||||
private String classifyDictionaryName;
|
||||
private String natureJoinByEnterpriseId;
|
||||
private String natureDictionaryName;
|
||||
|
||||
public String getAddressJoinByEnterpriseId() {
|
||||
return addressJoinByEnterpriseId;
|
||||
public String getEnterpriseOfGridOperatorId() {
|
||||
return enterpriseOfGridOperatorId;
|
||||
}
|
||||
|
||||
public void setAddressJoinByEnterpriseId(String addressJoinByEnterpriseId) {
|
||||
this.addressJoinByEnterpriseId = addressJoinByEnterpriseId;
|
||||
public void setEnterpriseOfGridOperatorId(String enterpriseOfGridOperatorId) {
|
||||
this.enterpriseOfGridOperatorId = enterpriseOfGridOperatorId;
|
||||
}
|
||||
|
||||
public String getArea1DictionaryName() {
|
||||
return area1DictionaryName;
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setArea1DictionaryName(String area1DictionaryName) {
|
||||
this.area1DictionaryName = area1DictionaryName;
|
||||
}
|
||||
|
||||
public String getArea1JoinByEnterpriseId() {
|
||||
return area1JoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public void setArea1JoinByEnterpriseId(String area1JoinByEnterpriseId) {
|
||||
this.area1JoinByEnterpriseId = area1JoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public String getArea2DictionaryName() {
|
||||
return area2DictionaryName;
|
||||
}
|
||||
|
||||
public void setArea2DictionaryName(String area2DictionaryName) {
|
||||
this.area2DictionaryName = area2DictionaryName;
|
||||
}
|
||||
|
||||
public String getArea2JoinByEnterpriseId() {
|
||||
return area2JoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public void setArea2JoinByEnterpriseId(String area2JoinByEnterpriseId) {
|
||||
this.area2JoinByEnterpriseId = area2JoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public String getArea3DictionaryName() {
|
||||
return area3DictionaryName;
|
||||
}
|
||||
|
||||
public void setArea3DictionaryName(String area3DictionaryName) {
|
||||
this.area3DictionaryName = area3DictionaryName;
|
||||
}
|
||||
|
||||
public String getArea3JoinByEnterpriseId() {
|
||||
return area3JoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public void setArea3JoinByEnterpriseId(String area3JoinByEnterpriseId) {
|
||||
this.area3JoinByEnterpriseId = area3JoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public String getArea4DictionaryName() {
|
||||
return area4DictionaryName;
|
||||
}
|
||||
|
||||
public void setArea4DictionaryName(String area4DictionaryName) {
|
||||
this.area4DictionaryName = area4DictionaryName;
|
||||
}
|
||||
|
||||
public String getArea4JoinByEnterpriseId() {
|
||||
return area4JoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public void setArea4JoinByEnterpriseId(String area4JoinByEnterpriseId) {
|
||||
this.area4JoinByEnterpriseId = area4JoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public String getArea5DictionaryName() {
|
||||
return area5DictionaryName;
|
||||
}
|
||||
|
||||
public void setArea5DictionaryName(String area5DictionaryName) {
|
||||
this.area5DictionaryName = area5DictionaryName;
|
||||
}
|
||||
|
||||
public String getArea5JoinByEnterpriseId() {
|
||||
return area5JoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public void setArea5JoinByEnterpriseId(String area5JoinByEnterpriseId) {
|
||||
this.area5JoinByEnterpriseId = area5JoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public String getEngagedCountJoinByEnterpriseId() {
|
||||
return engagedCountJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public void setEngagedCountJoinByEnterpriseId(String engagedCountJoinByEnterpriseId) {
|
||||
this.engagedCountJoinByEnterpriseId = engagedCountJoinByEnterpriseId;
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getEnterpriseId() {
|
||||
@ -202,38 +137,6 @@ public class CompanyListDataBean {
|
||||
this.enterpriseId = enterpriseId;
|
||||
}
|
||||
|
||||
public String getEnterpriseOfGridOperatorId() {
|
||||
return enterpriseOfGridOperatorId;
|
||||
}
|
||||
|
||||
public void setEnterpriseOfGridOperatorId(String enterpriseOfGridOperatorId) {
|
||||
this.enterpriseOfGridOperatorId = enterpriseOfGridOperatorId;
|
||||
}
|
||||
|
||||
public String getIndustryDictionaryName() {
|
||||
return industryDictionaryName;
|
||||
}
|
||||
|
||||
public void setIndustryDictionaryName(String industryDictionaryName) {
|
||||
this.industryDictionaryName = industryDictionaryName;
|
||||
}
|
||||
|
||||
public String getIndustryJoinByEnterpriseId() {
|
||||
return industryJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public void setIndustryJoinByEnterpriseId(String industryJoinByEnterpriseId) {
|
||||
this.industryJoinByEnterpriseId = industryJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public String getMasterJoinByEnterpriseId() {
|
||||
return masterJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public void setMasterJoinByEnterpriseId(String masterJoinByEnterpriseId) {
|
||||
this.masterJoinByEnterpriseId = masterJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public String getNameJoinByEnterpriseId() {
|
||||
return nameJoinByEnterpriseId;
|
||||
}
|
||||
@ -242,38 +145,6 @@ public class CompanyListDataBean {
|
||||
this.nameJoinByEnterpriseId = nameJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public String getPhoneJoinByEnterpriseId() {
|
||||
return phoneJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public void setPhoneJoinByEnterpriseId(String phoneJoinByEnterpriseId) {
|
||||
this.phoneJoinByEnterpriseId = phoneJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public String getRiskOperationDictionaryName() {
|
||||
return riskOperationDictionaryName;
|
||||
}
|
||||
|
||||
public void setRiskOperationDictionaryName(String riskOperationDictionaryName) {
|
||||
this.riskOperationDictionaryName = riskOperationDictionaryName;
|
||||
}
|
||||
|
||||
public String getRiskOperationJoinByEnterpriseId() {
|
||||
return riskOperationJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public void setRiskOperationJoinByEnterpriseId(String riskOperationJoinByEnterpriseId) {
|
||||
this.riskOperationJoinByEnterpriseId = riskOperationJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public String getTypeDictionaryName() {
|
||||
return typeDictionaryName;
|
||||
}
|
||||
|
||||
public void setTypeDictionaryName(String typeDictionaryName) {
|
||||
this.typeDictionaryName = typeDictionaryName;
|
||||
}
|
||||
|
||||
public String getTypeJoinByEnterpriseId() {
|
||||
return typeJoinByEnterpriseId;
|
||||
}
|
||||
@ -282,12 +153,212 @@ public class CompanyListDataBean {
|
||||
this.typeJoinByEnterpriseId = typeJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
public String getArea1JoinByEnterpriseId() {
|
||||
return area1JoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
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 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 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 String getArea1DictionaryName() {
|
||||
return area1DictionaryName;
|
||||
}
|
||||
|
||||
public void setArea1DictionaryName(String area1DictionaryName) {
|
||||
this.area1DictionaryName = area1DictionaryName;
|
||||
}
|
||||
|
||||
public String getArea2DictionaryName() {
|
||||
return area2DictionaryName;
|
||||
}
|
||||
|
||||
public void setArea2DictionaryName(String area2DictionaryName) {
|
||||
this.area2DictionaryName = area2DictionaryName;
|
||||
}
|
||||
|
||||
public String getArea3DictionaryName() {
|
||||
return area3DictionaryName;
|
||||
}
|
||||
|
||||
public void setArea3DictionaryName(String area3DictionaryName) {
|
||||
this.area3DictionaryName = area3DictionaryName;
|
||||
}
|
||||
|
||||
public String getArea4DictionaryName() {
|
||||
return area4DictionaryName;
|
||||
}
|
||||
|
||||
public void setArea4DictionaryName(String area4DictionaryName) {
|
||||
this.area4DictionaryName = area4DictionaryName;
|
||||
}
|
||||
|
||||
public String getArea5DictionaryName() {
|
||||
return area5DictionaryName;
|
||||
}
|
||||
|
||||
public void setArea5DictionaryName(String area5DictionaryName) {
|
||||
this.area5DictionaryName = area5DictionaryName;
|
||||
}
|
||||
|
||||
public String getIndustryDictionaryName() {
|
||||
return industryDictionaryName;
|
||||
}
|
||||
|
||||
public void setIndustryDictionaryName(String industryDictionaryName) {
|
||||
this.industryDictionaryName = industryDictionaryName;
|
||||
}
|
||||
|
||||
public String getRiskOperationDictionaryName() {
|
||||
return riskOperationDictionaryName;
|
||||
}
|
||||
|
||||
public void setRiskOperationDictionaryName(String riskOperationDictionaryName) {
|
||||
this.riskOperationDictionaryName = riskOperationDictionaryName;
|
||||
}
|
||||
|
||||
public String getTypeDictionaryName() {
|
||||
return typeDictionaryName;
|
||||
}
|
||||
|
||||
public void setTypeDictionaryName(String typeDictionaryName) {
|
||||
this.typeDictionaryName = typeDictionaryName;
|
||||
}
|
||||
|
||||
public String getIndustryTypeJoinByEnterpriseId() {
|
||||
return industryTypeJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public void setIndustryTypeJoinByEnterpriseId(String industryTypeJoinByEnterpriseId) {
|
||||
this.industryTypeJoinByEnterpriseId = industryTypeJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public String getIndustryTypeDictionaryName() {
|
||||
return industryTypeDictionaryName;
|
||||
}
|
||||
|
||||
public void setIndustryTypeDictionaryName(String industryTypeDictionaryName) {
|
||||
this.industryTypeDictionaryName = industryTypeDictionaryName;
|
||||
}
|
||||
|
||||
public String getLegalPerson() {
|
||||
return legalPerson;
|
||||
}
|
||||
|
||||
public void setLegalPerson(String legalPerson) {
|
||||
this.legalPerson = legalPerson;
|
||||
}
|
||||
|
||||
public String getClassifyJoinByEnterpriseId() {
|
||||
return classifyJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public void setClassifyJoinByEnterpriseId(String classifyJoinByEnterpriseId) {
|
||||
this.classifyJoinByEnterpriseId = classifyJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public String getClassifyDictionaryName() {
|
||||
return classifyDictionaryName;
|
||||
}
|
||||
|
||||
public void setClassifyDictionaryName(String classifyDictionaryName) {
|
||||
this.classifyDictionaryName = classifyDictionaryName;
|
||||
}
|
||||
|
||||
public String getNatureJoinByEnterpriseId() {
|
||||
return natureJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public void setNatureJoinByEnterpriseId(String natureJoinByEnterpriseId) {
|
||||
this.natureJoinByEnterpriseId = natureJoinByEnterpriseId;
|
||||
}
|
||||
|
||||
public String getNatureDictionaryName() {
|
||||
return natureDictionaryName;
|
||||
}
|
||||
|
||||
public void setNatureDictionaryName(String natureDictionaryName) {
|
||||
this.natureDictionaryName = natureDictionaryName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.sucstepsoft.txrealtimelocation.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/4/2 - 11:28 AM
|
||||
@ -8,17 +10,26 @@ package com.sucstepsoft.txrealtimelocation.beans;
|
||||
*/
|
||||
public class CounterCheckOptionsBean {
|
||||
|
||||
|
||||
/**
|
||||
* checkItemId : a1c27ea5-40dd-4cc8-974c-d387f8ba428c
|
||||
* name : 照明
|
||||
* summary : 照明
|
||||
* type : 1
|
||||
* checkItemId : bde68ea3-a271-42c2-bdcd-8f9a7e43f837
|
||||
* name : 培训制度
|
||||
* parentName :
|
||||
* summary : 培训制度
|
||||
* type : 2
|
||||
* checkItemParentId :
|
||||
* checkItemOptions : [{"checkItemOptionId":"714cb2b5-9443-41fe-a565-ed28f9211268","checkItemId":"bde68ea3-a271-42c2-bdcd-8f9a7e43f837","type":1,"name":"有","unit":"","isWrong":0},{"checkItemOptionId":"20515bae-5bfb-404a-8317-df3e3feb44e8","checkItemId":"bde68ea3-a271-42c2-bdcd-8f9a7e43f837","type":1,"name":"无","unit":"","isWrong":1}]
|
||||
* hiddenDangerReports : []
|
||||
*/
|
||||
|
||||
private String checkItemId;
|
||||
private String name;
|
||||
private String parentName;
|
||||
private String summary;
|
||||
private int type;
|
||||
private String checkItemParentId;
|
||||
private List<CheckItemOptionsBean> checkItemOptions;
|
||||
private List<?> hiddenDangerReports;
|
||||
|
||||
public String getCheckItemId() {
|
||||
return checkItemId;
|
||||
@ -36,6 +47,14 @@ public class CounterCheckOptionsBean {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getParentName() {
|
||||
return parentName;
|
||||
}
|
||||
|
||||
public void setParentName(String parentName) {
|
||||
this.parentName = parentName;
|
||||
}
|
||||
|
||||
public String getSummary() {
|
||||
return summary;
|
||||
}
|
||||
@ -51,4 +70,94 @@ public class CounterCheckOptionsBean {
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getCheckItemParentId() {
|
||||
return checkItemParentId;
|
||||
}
|
||||
|
||||
public void setCheckItemParentId(String checkItemParentId) {
|
||||
this.checkItemParentId = checkItemParentId;
|
||||
}
|
||||
|
||||
public List<CheckItemOptionsBean> getCheckItemOptions() {
|
||||
return checkItemOptions;
|
||||
}
|
||||
|
||||
public void setCheckItemOptions(List<CheckItemOptionsBean> checkItemOptions) {
|
||||
this.checkItemOptions = checkItemOptions;
|
||||
}
|
||||
|
||||
public List<?> getHiddenDangerReports() {
|
||||
return hiddenDangerReports;
|
||||
}
|
||||
|
||||
public void setHiddenDangerReports(List<?> hiddenDangerReports) {
|
||||
this.hiddenDangerReports = hiddenDangerReports;
|
||||
}
|
||||
|
||||
public static class CheckItemOptionsBean {
|
||||
/**
|
||||
* checkItemOptionId : 714cb2b5-9443-41fe-a565-ed28f9211268
|
||||
* checkItemId : bde68ea3-a271-42c2-bdcd-8f9a7e43f837
|
||||
* type : 1
|
||||
* name : 有
|
||||
* unit :
|
||||
* isWrong : 0
|
||||
*/
|
||||
|
||||
private String checkItemOptionId;
|
||||
private String checkItemId;
|
||||
private int type;
|
||||
private String name;
|
||||
private String unit;
|
||||
private int isWrong;
|
||||
|
||||
public String getCheckItemOptionId() {
|
||||
return checkItemOptionId;
|
||||
}
|
||||
|
||||
public void setCheckItemOptionId(String checkItemOptionId) {
|
||||
this.checkItemOptionId = checkItemOptionId;
|
||||
}
|
||||
|
||||
public String getCheckItemId() {
|
||||
return checkItemId;
|
||||
}
|
||||
|
||||
public void setCheckItemId(String checkItemId) {
|
||||
this.checkItemId = checkItemId;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setUnit(String unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public int getIsWrong() {
|
||||
return isWrong;
|
||||
}
|
||||
|
||||
public void setIsWrong(int isWrong) {
|
||||
this.isWrong = isWrong;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -10,20 +10,58 @@ import java.util.List;
|
||||
*/
|
||||
public class OptionsSubmitBean {
|
||||
|
||||
|
||||
/**
|
||||
* checkResult : 0
|
||||
* checkType : 0
|
||||
* enterpriseId : string
|
||||
* hiddenDangerReports : [{"checkId":"string","checkItemId":"string","checkResult":0,"immediatelyChangeType":0,"rectificationDays":0,"rectificationType":0,"scenePhotos":"string","summary":"string"}]
|
||||
* hiddenDangerReports : [{"checkId":"string","checkItemId":"string","checkItemOptionId":"string","checkResult":"string","type":0}]
|
||||
* immediatelyChangeType : 0
|
||||
* isComplete : 0
|
||||
* isCoordination : 0
|
||||
* rectificationDays : 0
|
||||
* rectificationType : 0
|
||||
* scenePhotos : string
|
||||
* summary : string
|
||||
*/
|
||||
|
||||
private int checkType;// 1检查 复查
|
||||
private String enterpriseId; //企业Id
|
||||
private int isComplete;//
|
||||
private int isCoordination;//是否配合
|
||||
private String checkLat;
|
||||
private String checkLng;
|
||||
private int checkResult;
|
||||
private int checkType;
|
||||
private String enterpriseId;
|
||||
private int immediatelyChangeType;
|
||||
private int isComplete;
|
||||
private int isCoordination;
|
||||
private int rectificationDays;
|
||||
private int rectificationType;
|
||||
private String scenePhotos;
|
||||
private String summary;
|
||||
private List<HiddenDangerReportsBean> hiddenDangerReports;
|
||||
|
||||
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 getCheckResult() {
|
||||
return checkResult;
|
||||
}
|
||||
|
||||
public void setCheckResult(int checkResult) {
|
||||
this.checkResult = checkResult;
|
||||
}
|
||||
|
||||
public int getCheckType() {
|
||||
return checkType;
|
||||
}
|
||||
@ -40,6 +78,14 @@ public class OptionsSubmitBean {
|
||||
this.enterpriseId = enterpriseId;
|
||||
}
|
||||
|
||||
public int getImmediatelyChangeType() {
|
||||
return immediatelyChangeType;
|
||||
}
|
||||
|
||||
public void setImmediatelyChangeType(int immediatelyChangeType) {
|
||||
this.immediatelyChangeType = immediatelyChangeType;
|
||||
}
|
||||
|
||||
public int getIsComplete() {
|
||||
return isComplete;
|
||||
}
|
||||
@ -56,6 +102,38 @@ public class OptionsSubmitBean {
|
||||
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 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 List<HiddenDangerReportsBean> getHiddenDangerReports() {
|
||||
return hiddenDangerReports;
|
||||
}
|
||||
@ -68,22 +146,16 @@ public class OptionsSubmitBean {
|
||||
/**
|
||||
* checkId : string
|
||||
* checkItemId : string
|
||||
* checkResult : 0
|
||||
* immediatelyChangeType : 0
|
||||
* rectificationDays : 0
|
||||
* rectificationType : 0
|
||||
* scenePhotos : string
|
||||
* summary : string
|
||||
* checkItemOptionId : string
|
||||
* checkResult : string
|
||||
* type : 0
|
||||
*/
|
||||
|
||||
private String checkId;
|
||||
private String checkItemId;
|
||||
private int checkResult;
|
||||
private int immediatelyChangeType;
|
||||
private int rectificationDays;
|
||||
private int rectificationType;
|
||||
private String scenePhotos;
|
||||
private String summary;
|
||||
private String checkItemOptionId;
|
||||
private String checkResult;
|
||||
private int type;
|
||||
|
||||
public String getCheckId() {
|
||||
return checkId;
|
||||
@ -101,52 +173,28 @@ public class OptionsSubmitBean {
|
||||
this.checkItemId = checkItemId;
|
||||
}
|
||||
|
||||
public int getCheckResult() {
|
||||
public String getCheckItemOptionId() {
|
||||
return checkItemOptionId;
|
||||
}
|
||||
|
||||
public void setCheckItemOptionId(String checkItemOptionId) {
|
||||
this.checkItemOptionId = checkItemOptionId;
|
||||
}
|
||||
|
||||
public String getCheckResult() {
|
||||
return checkResult;
|
||||
}
|
||||
|
||||
public void setCheckResult(int checkResult) {
|
||||
public void setCheckResult(String checkResult) {
|
||||
this.checkResult = checkResult;
|
||||
}
|
||||
|
||||
public int getImmediatelyChangeType() {
|
||||
return immediatelyChangeType;
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setImmediatelyChangeType(int immediatelyChangeType) {
|
||||
this.immediatelyChangeType = immediatelyChangeType;
|
||||
}
|
||||
|
||||
public int getRectificationDays() {
|
||||
return rectificationDays;
|
||||
}
|
||||
|
||||
public void setRectificationDays(int rectificationDays) {
|
||||
this.rectificationDays = rectificationDays;
|
||||
}
|
||||
|
||||
public int getRectificationType() {
|
||||
return rectificationType;
|
||||
}
|
||||
|
||||
public void setRectificationType(int rectificationType) {
|
||||
this.rectificationType = rectificationType;
|
||||
}
|
||||
|
||||
public String getScenePhotos() {
|
||||
return scenePhotos;
|
||||
}
|
||||
|
||||
public void setScenePhotos(String scenePhotos) {
|
||||
this.scenePhotos = scenePhotos;
|
||||
}
|
||||
|
||||
public String getSummary() {
|
||||
return summary;
|
||||
}
|
||||
|
||||
public void setSummary(String summary) {
|
||||
this.summary = summary;
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import com.sucstepsoft.txrealtimelocation.beans.AddressListBean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.AreaListBean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.BaseUserBean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.CaseFlowBean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.CheckItemOption;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.CheckOptionsbean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.CheckSignBean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.CheckSignOffBean;
|
||||
@ -15,6 +16,7 @@ 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.HistoryDetialBean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.HistoryMissionBean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.IssueSubBean;
|
||||
import com.sucstepsoft.txrealtimelocation.beans.LeaveDetailBean;
|
||||
@ -629,7 +631,13 @@ public interface LocationApiService {
|
||||
//industrycheckitem/listindustrycheckitem/{id}
|
||||
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("industrycheckitem/listindustrycheckitem")
|
||||
Observable<List<CheckOptionsbean>> getCheckOptionsList(@Query("industryId") String id, @Header("token") String token);
|
||||
Observable<List<CheckOptionsbean>> getCheckOptionsList(@Query("industryId") String id, @Query("natureId") String nId, @Header("token") String token);
|
||||
|
||||
//获取检查项
|
||||
//GET /app/checkitemoption/listcheckitemoption
|
||||
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("checkitemoption/listcheckitemoption")
|
||||
Observable<List<CheckItemOption>> getCheckItemOptionList(@Query("industryId") String id, @Header("token") String token);
|
||||
|
||||
//保存检查结果
|
||||
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
|
||||
@ -708,6 +716,11 @@ public interface LocationApiService {
|
||||
@GET("check/listcheckitembycheckid/{checkId}")
|
||||
Observable<List<HistoryMissionBean>> 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}")
|
||||
Observable<HistoryDetialBean> getHistoryDetailById(@Path("checkId") String checkId, @Header("token") String token);
|
||||
|
||||
//通知列表
|
||||
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("articlecontent/listpagearticlecontent")
|
||||
|
@ -288,7 +288,7 @@
|
||||
|
||||
<TextView
|
||||
style="@style/company_name_title"
|
||||
android:text="厂区大门照片" />
|
||||
android:text="生产单位经营外貌" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_door"
|
||||
|
@ -517,7 +517,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shp_rectangle_gray"
|
||||
android:padding="10dp"
|
||||
android:text="厂区大门"
|
||||
android:text="生产单位经营外貌"
|
||||
android:textColor="@color/black" />
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -61,7 +61,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="27dp"
|
||||
android:background="@drawable/sp_blue_sel"
|
||||
android:text="企业不配合"
|
||||
android:text="企业未整改"
|
||||
android:textColor="@color/titleBar" />
|
||||
</LinearLayout>
|
||||
|
||||
@ -86,10 +86,103 @@
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_options"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layoutManager="LinearLayoutManager"
|
||||
tools:listitem="@layout/item_options" />
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_state_dis"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/sp_company_item_box"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_term"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_now"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:drawableLeft="@drawable/sel_rb"
|
||||
android:text="立即整改"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_term"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:button="@null"
|
||||
android:drawableLeft="@drawable/sel_rb"
|
||||
android:text="限期整改"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_coor"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:button="@null"
|
||||
android:drawableLeft="@drawable/sel_rb"
|
||||
android:text="不配合"
|
||||
android:textSize="16sp"
|
||||
android:visibility="gone" />
|
||||
</RadioGroup>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_sp"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="2dp">
|
||||
|
||||
|
||||
<android.support.v7.widget.AppCompatSpinner
|
||||
android:id="@+id/sp_term"
|
||||
style="@style/common_spinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:popupTheme="@style/common_spinner"
|
||||
android:spinnerMode="dropdown"
|
||||
app:theme="@style/common_spinner" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="3dp"
|
||||
android:background="@color/gray_bg" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_photos"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
</LinearLayout>
|
@ -98,6 +98,7 @@
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="invisible"
|
||||
android:background="@drawable/ic_start_hint" />
|
||||
|
||||
<EditText
|
||||
@ -520,7 +521,7 @@
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="10dp"
|
||||
android:text="厂区大门"
|
||||
android:text="生产单位经营外貌"
|
||||
android:textColor="@color/black" />
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -9,8 +9,88 @@
|
||||
android:padding="10dp"
|
||||
tools:context=".activitys.issue.HistoryDetialActivity">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_detail"
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_company_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/sp_company_item_box"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/company_name_title"
|
||||
android:drawableLeft="@drawable/ic_item_user"
|
||||
android:text="企业名称" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
style="@style/company_content"
|
||||
tools:text="企业名称企业名称企业名称企业名称企业名称" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/company_name_title"
|
||||
android:drawableLeft="@drawable/ic_item_idcard"
|
||||
android:text="负责人" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_peo"
|
||||
style="@style/company_content"
|
||||
android:text="企业名称企业名称企业名称企业名称企业名称" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/company_name_title"
|
||||
android:drawableLeft="@drawable/ic_item_idcard"
|
||||
android:text="整改期限" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_type"
|
||||
style="@style/company_content"
|
||||
tools:text="立即整改" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_photos"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_detail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
</LinearLayout>
|
181
app/src/main/res/layout/activity_new_check_options.xml
Normal file
181
app/src/main/res/layout/activity_new_check_options.xml
Normal file
@ -0,0 +1,181 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/gray"
|
||||
android:orientation="vertical"
|
||||
tools:context=".activitys.issue.CheckOptionsActivity">
|
||||
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_company_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/sp_company_item_box"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/company_name_title"
|
||||
android:drawableLeft="@drawable/ic_item_user"
|
||||
android:text="企业名称" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
style="@style/company_content"
|
||||
tools:text="企业名称企业名称企业名称企业名称企业名称" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_unclaim"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="27dp"
|
||||
android:background="@drawable/sp_blue_sel"
|
||||
android:text="企业不配合"
|
||||
android:textColor="@color/titleBar"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/company_name_title"
|
||||
android:drawableLeft="@drawable/ic_item_idcard"
|
||||
android:text="负责人" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_peo"
|
||||
style="@style/company_content"
|
||||
android:text="企业名称企业名称企业名称企业名称企业名称" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_options"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_state_dis"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/sp_company_item_box"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_term"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_now"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:drawableLeft="@drawable/sel_rb"
|
||||
android:text="立即整改"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_term"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:button="@null"
|
||||
android:drawableLeft="@drawable/sel_rb"
|
||||
android:text="限期整改"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_coor"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:button="@null"
|
||||
android:drawableLeft="@drawable/sel_rb"
|
||||
android:text="不配合"
|
||||
android:textSize="16sp"
|
||||
android:visibility="gone" />
|
||||
</RadioGroup>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_sp"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="2dp">
|
||||
|
||||
|
||||
<android.support.v7.widget.AppCompatSpinner
|
||||
android:id="@+id/sp_term"
|
||||
style="@style/common_spinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:popupTheme="@style/common_spinner"
|
||||
android:spinnerMode="dropdown"
|
||||
app:theme="@style/common_spinner" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_margin="3dp"
|
||||
android:background="@color/gray_bg" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_photos"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
</LinearLayout>
|
@ -11,7 +11,6 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:background="@drawable/shape_rectangle_white"
|
||||
android:orientation="vertical">
|
||||
|
||||
@ -29,131 +28,47 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="match_parent"
|
||||
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="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_state_uncheck"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:drawableLeft="@drawable/sel_rb"
|
||||
android:text="未检查"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_state_check"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:button="@null"
|
||||
android:drawableLeft="@drawable/sel_rb"
|
||||
android:text="合格"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_state_dis"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:button="@null"
|
||||
android:drawableLeft="@drawable/sel_rb"
|
||||
android:text="存在隐患"
|
||||
android:textSize="12sp" />
|
||||
</RadioGroup>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_state"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@color/gray_bg" />
|
||||
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_content"
|
||||
android:id="@+id/ll_check"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_term"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_now"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:drawableLeft="@drawable/sel_rb"
|
||||
android:text="立即整改"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_term"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:button="@null"
|
||||
android:drawableLeft="@drawable/sel_rb"
|
||||
android:text="限期整改"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_coor"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:button="@null"
|
||||
android:drawableLeft="@drawable/sel_rb"
|
||||
android:text="不配合"
|
||||
android:textSize="16sp" />
|
||||
</RadioGroup>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_sp"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="2dp">
|
||||
|
||||
<android.support.v7.widget.AppCompatSpinner
|
||||
android:id="@+id/sp_term"
|
||||
style="@style/common_spinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:popupTheme="@style/common_spinner"
|
||||
android:spinnerMode="dropdown"
|
||||
app:theme="@style/common_spinner" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_photos"
|
||||
<EditText
|
||||
android:id="@+id/et_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp" />
|
||||
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" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -16,22 +16,14 @@
|
||||
android:textSize="16sp"
|
||||
tools:text="检查项名称" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_options_check"
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="12sp"
|
||||
tools:text="是否存在隐患" />
|
||||
android:layout_marginTop="3dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_day"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="12sp"
|
||||
tools:text="整改天数" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/rlv_photos"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
74
app/src/main/res/layout/item_options_new.xml
Normal file
74
app/src/main/res/layout/item_options_new.xml
Normal file
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/sp_company_item_box"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_rectangle_white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_must"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ic_start_hint" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
tools:text="测试数据测试数据测试数据测试数据测试数据测试数据测试数据测试数据" />
|
||||
|
||||
</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="5dp">
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_content"
|
||||
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" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string-array name="limit">
|
||||
<item>立即整改</item>
|
||||
<item>当场整改</item>
|
||||
<item>当天整改</item>
|
||||
</string-array>
|
||||
<string-array name="timeLimit">
|
||||
|
@ -59,8 +59,8 @@ ext {
|
||||
gCompileSdkVersion = 28
|
||||
gMinSdkVersion = 16
|
||||
gTargetSdkVersion = 28
|
||||
gVersionCode = 4
|
||||
gVersionName = '1.0.3'
|
||||
gVersionCode = 5
|
||||
gVersionName = '1.0.4'
|
||||
// gVersionCode=26
|
||||
// gVersionName='1.3.0'
|
||||
//Router编译版本
|
||||
|
@ -40,12 +40,14 @@ public class PathConfig {
|
||||
public static final String APP_VERSION_ID = "cc0ef7f0-de0e-4e29-8428-534ab9f2494d";//下载AppID
|
||||
public static final String DIC_COMPANY_TYPE_ID = "612415f3-0ebb-4bc2-b713-e9fb1acc7f76";//企业类型
|
||||
public static final String DIC_TRADE_ID = "b97630ab-45b7-45bc-a624-507d4df952ff";//管理行业
|
||||
public static final String DIC_TRADE_ID_1="b97630ab-45b7-45bc-a624-507d4df952ff";
|
||||
public static final String DIC_TRADE_ID_1 = "b97630ab-45b7-45bc-a624-507d4df952ff";
|
||||
public static final String DIC_RISK_ID = "77128e8e-3e09-45b5-a48e-7a50d1b7cc32";//风险
|
||||
public static final String DIC_AREA_ID = "81583ade-5466-49aa-b7b6-c643c131ea34";//地区
|
||||
public static final String NOTICE_TYPE_ID = "94d1691f-65e6-4c82-8537-98c4a318b09e";//通知公告
|
||||
public static final String LAW_TYPE_ID = "fcc6ebf0-5d0b-43f9-a89e-e3283941f25a";//政策法规
|
||||
|
||||
public static final String MAP_KEY_BAIDU = "pYx5soXOQToimEzEL1QbI6wz9G4B9dkb";
|
||||
public static final String DEFAULT_PROVINCE_AREA = "6aba668e-8ab3-4fbb-8886-b2d468ccf00e";//省份
|
||||
public static final String DEFAULT_CITY_AREA = "3f62e230-47a5-4ad9-ab01-08fd2c5218d8";//市、自治区
|
||||
|
||||
//包头坐标 109.926934,40.574501
|
||||
//呼市坐标 40.823879 111.771815
|
||||
|
@ -9,8 +9,8 @@ import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
*/
|
||||
public class BaseUrlApi {
|
||||
|
||||
public static final String IP = "http://58.18.22.25:8081/usercenter/";/* 正式IP */
|
||||
// public static final String IP = "http://192.168.0.113:7001/usercenter/";/* 测试IP */
|
||||
// public static final String IP = "http://58.18.22.25:8081/usercenter/";/* 正式IP */
|
||||
public static final String IP = "http://192.168.0.113:7001/usercenter/";/* 测试IP */
|
||||
public static final String PROJECT_NAME = "app/";
|
||||
public static final String BASE_URL = IP + PROJECT_NAME;
|
||||
public static final String APP_VERSION = BASE_URL + "appCmVersionManagement/getAppVersion";
|
||||
@ -18,8 +18,8 @@ public class BaseUrlApi {
|
||||
public static final String FIELD_SAFETY = BASE_URL + "appFieldSafety/goFloorPlan";
|
||||
public static final int PHOTO_REQUEST = 233;
|
||||
public static final int CAMERA_REQUEST = 123;
|
||||
public static final String BASE_IP = "http://58.18.22.25:8082/inspection/";/* 正式IP */
|
||||
// public static final String BASE_IP = "http://192.168.0.113:7006/inspection/";/* 测试IP */
|
||||
// public static final String BASE_IP = "http://58.18.22.25:8082/inspection/";/* 正式IP */
|
||||
public static final String BASE_IP = "http://192.168.0.113:7006/inspection/";/* 测试IP */
|
||||
public static final String BASE_IMG_URL = BASE_IP + "route/file/downloadfile/true/";
|
||||
public static final String SOCKET_IP = "192.168.1.149";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user