添加定位,修改隐患上报

This commit is contained in:
itgaojian163 2020-04-17 16:18:22 +08:00
parent 86f0267e38
commit 1c8423f28c
62 changed files with 3515 additions and 898 deletions

View File

@ -51,7 +51,7 @@ dependencies {
implementation project(':cm_utils') implementation project(':cm_utils')
implementation project(':camera') implementation project(':camera')
// //
// implementation files('libs/BaiduLBS_Android.jar') implementation files('libs/BaiduLBS_Android.jar')
// implementation files('libs/IndoorscapeAlbumPlugin.jar') // implementation files('libs/IndoorscapeAlbumPlugin.jar')
// //
// implementation files('libs/jcore-android-2.0.1.jar') // implementation files('libs/jcore-android-2.0.1.jar')

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
app/libs/x86/libindoor.so Normal file

Binary file not shown.

BIN
app/libs/x86/liblocSDK8a.so Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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

Binary file not shown.

View File

@ -47,8 +47,15 @@
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning"> tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".activitys.issue.PublicReportActivity"></activity> <activity android:name=".activitys.issue.NewCheckOptionsActivity"></activity>
<activity android:name=".activitys.issue.PublicAreaActivity" /> <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 <activity
android:name=".activitys.issue.HistoryDetialActivity" android:name=".activitys.issue.HistoryDetialActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
@ -250,7 +257,7 @@
<!-- </activity> --> <!-- </activity> -->
<meta-data <meta-data
android:name="com.baidu.lbsapi.API_KEY" android:name="com.baidu.lbsapi.API_KEY"
android:value="ulhypZnhFbnhzgEUAUqbA28N7DRB8agg" /> android:value="pYx5soXOQToimEzEL1QbI6wz9G4B9dkb" />
<meta-data <meta-data
android:name="BUGLY_APPID" android:name="BUGLY_APPID"
android:value="ff95776367" /> android:value="ff95776367" />
@ -360,10 +367,10 @@
<action android:name="com.sucstepsoft.txrealtimelocation.services.LocationHelperService" /> <action android:name="com.sucstepsoft.txrealtimelocation.services.LocationHelperService" />
</intent-filter> </intent-filter>
</service> <!-- since 3.3.0 Required SDK核心功能 --> </service> <!-- since 3.3.0 Required SDK核心功能 -->
<!-- <service --> <service
<!-- android:name="com.baidu.location.f" --> android:name="com.baidu.location.f"
<!-- android:enabled="true" --> android:enabled="true"
<!-- android:process=":remote" /> &lt;!&ndash; since 3.3.0 Required SDK 核心功能 &ndash;&gt; --> android:process=":remote" /> <!-- since 3.3.0 Required SDK 核心功能 -->
<!-- 可配置android:process参数将PushService放在其他进程中 --> <!-- 可配置android:process参数将PushService放在其他进程中 -->
<!-- User defined. For test only 继承自cn.jpush.android.service.JCommonService --> <!-- User defined. For test only 继承自cn.jpush.android.service.JCommonService -->
<!-- <service --> <!-- <service -->

View File

@ -90,7 +90,6 @@ public class LoginActivity extends BaseActivity {
refreshView(STATE_LOAD_SUCCESS); refreshView(STATE_LOAD_SUCCESS);
mRlNotify.setVisibility(View.GONE); mRlNotify.setVisibility(View.GONE);
mBtnConfirm.setOnClickListener(v -> login()); mBtnConfirm.setOnClickListener(v -> login());
// mTvChangePwd.setOnClickListener(v -> ToastUtils.showShort("请联系管理员"));
isRememberPwd = UserLgUtils.getCheckRemember(); isRememberPwd = UserLgUtils.getCheckRemember();
mCbRemember.setChecked(isRememberPwd); mCbRemember.setChecked(isRememberPwd);
mCbRemember.setOnCheckedChangeListener((compoundButton, b) -> { mCbRemember.setOnCheckedChangeListener((compoundButton, b) -> {

View File

@ -32,6 +32,7 @@ import com.sucstepsoft.txrealtimelocation.activitys.companylib.MineCompanyLibAct
import com.sucstepsoft.txrealtimelocation.activitys.countercheck.CounterCheckMainActivity; import com.sucstepsoft.txrealtimelocation.activitys.countercheck.CounterCheckMainActivity;
import com.sucstepsoft.txrealtimelocation.activitys.issue.HistoryDetialActivity; import com.sucstepsoft.txrealtimelocation.activitys.issue.HistoryDetialActivity;
import com.sucstepsoft.txrealtimelocation.activitys.issue.HistoryListActivity; 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.issue.PublicAreaActivity;
import com.sucstepsoft.txrealtimelocation.activitys.lawlib.LawLibActivity; import com.sucstepsoft.txrealtimelocation.activitys.lawlib.LawLibActivity;
import com.sucstepsoft.txrealtimelocation.activitys.companylib.CompanyLibActivity; 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.AppTokenUser;
import com.sucstepsoft.txrealtimelocation.beans.VersionBean; import com.sucstepsoft.txrealtimelocation.beans.VersionBean;
import com.sucstepsoft.txrealtimelocation.net.LocationApiService; import com.sucstepsoft.txrealtimelocation.net.LocationApiService;
import com.sucstepsoft.txrealtimelocation.utils.GpsUtils;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
@ -99,7 +101,9 @@ public class MainActivity extends BaseActivity {
PermissionConstants.STORAGE, PermissionConstants.STORAGE,
PermissionConstants.PHONE, PermissionConstants.PHONE,
PermissionConstants.MICROPHONE, PermissionConstants.MICROPHONE,
PermissionConstants.LOCATION
}; };
private static final int GPS_REQUEST_CODE = 1234;
private Unbinder mBind; private Unbinder mBind;
private List<FuncBean> mFuncs = new ArrayList<>(); private List<FuncBean> mFuncs = new ArrayList<>();
private String[] mBtnStrs = new String[]{"企业信息", "隐患上报", "隐患复查", "我的任务", "公共区域", "法律法规"}; private String[] mBtnStrs = new String[]{"企业信息", "隐患上报", "隐患复查", "我的任务", "公共区域", "法律法规"};
@ -134,6 +138,11 @@ public class MainActivity extends BaseActivity {
} }
}).request(); }).request();
initBaseView(); initBaseView();
boolean oPen = GpsUtils.isOPen(mActivity);
LogUtils.e(oPen);
if (!oPen) {
openGpsSetting();
}
} }
@ -163,6 +172,7 @@ public class MainActivity extends BaseActivity {
Intent intent = null; Intent intent = null;
switch (bean.getText()) { switch (bean.getText()) {
case "企业信息": case "企业信息":
// intent = new Intent(this, NewCheckOptionsActivity.class);
intent = new Intent(this, CompanyLibActivity.class); intent = new Intent(this, CompanyLibActivity.class);
break; break;
case "隐患上报": case "隐患上报":
@ -212,6 +222,28 @@ public class MainActivity extends BaseActivity {
checkPermission(); 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() { private void checkPermission() {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) { if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {

View File

@ -235,6 +235,96 @@ public class EnterCompanyInfoActivity extends BaseActivity {
mTvRisk.setOnClickListener(v -> onShowRiskPicker()); mTvRisk.setOnClickListener(v -> onShowRiskPicker());
mTvTrade.setOnClickListener(v -> onShowTradePicker()); mTvTrade.setOnClickListener(v -> onShowTradePicker());
mTvTrade1.setOnClickListener(v -> onShowTrade1Picker()); 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() { private void onShowTrade1Picker() {
@ -460,7 +550,10 @@ public class EnterCompanyInfoActivity extends BaseActivity {
submitBean.setIndustryType(mSelTrade1); submitBean.setIndustryType(mSelTrade1);
submitBean.setBussinessRegNum(code); code = mEtCompanyCode.getText().toString().trim();
if (!TextUtils.isEmpty(code)) {
submitBean.setBussinessRegNum(code);
}
submitBean.setLegalPerson(companP); submitBean.setLegalPerson(companP);
submitBean.setSummary(scope); submitBean.setSummary(scope);
@ -515,11 +608,11 @@ public class EnterCompanyInfoActivity extends BaseActivity {
ToastUtils.showShort("请输入企业名称"); ToastUtils.showShort("请输入企业名称");
return false; return false;
} }
code = mEtCompanyCode.getText().toString().trim(); // code = mEtCompanyCode.getText().toString().trim();
if (TextUtils.isEmpty(code)) { // if (TextUtils.isEmpty(code)) {
ToastUtils.showShort("请输入组织机构代码"); // ToastUtils.showShort("请输入组织机构代码");
return false; // return false;
} // }
scope = mEtCompanyScope.getText().toString().trim(); scope = mEtCompanyScope.getText().toString().trim();
if (TextUtils.isEmpty(scope)) { if (TextUtils.isEmpty(scope)) {
ToastUtils.showShort("请输入营业范围"); ToastUtils.showShort("请输入营业范围");

View File

@ -8,30 +8,46 @@ import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.provider.MediaStore; import android.provider.MediaStore;
import android.support.v4.content.FileProvider; 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.LinearLayoutManager;
import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.Gravity; import android.view.Gravity;
import android.view.View; import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button; import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.RadioGroup;
import android.widget.TextView; 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.google.gson.Gson;
import com.sucstepsoft.cm_utils.constant.PathConfig; import com.sucstepsoft.cm_utils.constant.PathConfig;
import com.sucstepsoft.cm_utils.core.beans.AddPhotoBean; 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.BaseUrlApi;
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager; 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.base.BaseActivity;
import com.sucstepsoft.cm_utils.core.widget.views.ButtomDialogView; 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.ProiderUtil;
import com.sucstepsoft.cm_utils.utils.ToastUtils; import com.sucstepsoft.cm_utils.utils.ToastUtils;
import com.sucstepsoft.cm_utils.utils.UIUtil; import com.sucstepsoft.cm_utils.utils.UIUtil;
import com.sucstepsoft.cm_utils.utils.UserLgUtils; import com.sucstepsoft.cm_utils.utils.UserLgUtils;
import com.sucstepsoft.txrealtimelocation.R; import com.sucstepsoft.txrealtimelocation.R;
import com.sucstepsoft.txrealtimelocation.activitys.common.PhotoActivity; 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.activitys.issue.demo.Options;
import com.sucstepsoft.txrealtimelocation.adapters.CounterCheckOptionsAdapter; import com.sucstepsoft.txrealtimelocation.adapters.CounterCheckOptionsAdapter;
import com.sucstepsoft.txrealtimelocation.beans.BaseUserBean; import com.sucstepsoft.txrealtimelocation.beans.BaseUserBean;
import com.sucstepsoft.txrealtimelocation.beans.CheckOptionsbean;
import com.sucstepsoft.txrealtimelocation.beans.CounterCheckOptionsBean; import com.sucstepsoft.txrealtimelocation.beans.CounterCheckOptionsBean;
import com.sucstepsoft.txrealtimelocation.beans.OptionsSubmitBean; import com.sucstepsoft.txrealtimelocation.beans.OptionsSubmitBean;
import com.sucstepsoft.txrealtimelocation.beans.SuccessBean; import com.sucstepsoft.txrealtimelocation.beans.SuccessBean;
@ -62,7 +78,7 @@ public class CounterCheckOptionsActivity extends BaseActivity {
@BindView(R.id.tv_peo) @BindView(R.id.tv_peo)
TextView mTvPeo; TextView mTvPeo;
private Unbinder mBind; private Unbinder mBind;
private List<Options> mOptions; private List<NewOptions> mOptions;
@BindView(R.id.rlv_options) @BindView(R.id.rlv_options)
RecyclerView mRlvOptions; RecyclerView mRlvOptions;
@BindView(R.id.btn_unclaim) @BindView(R.id.btn_unclaim)
@ -72,10 +88,32 @@ public class CounterCheckOptionsActivity extends BaseActivity {
private CounterCheckOptionsAdapter mAdapter; private CounterCheckOptionsAdapter mAdapter;
private String mCompanyId; private String mCompanyId;
private ProgressDialog mMProgressDialog; private ProgressDialog mMProgressDialog;
private Options mCurrentOptions;
private int mCurrentIndex = 0;
private String mCheckId; 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 @Override
protected int setLayoutId() { protected int setLayoutId() {
return R.layout.activity_counter_check_options; return R.layout.activity_counter_check_options;
@ -100,13 +138,94 @@ public class CounterCheckOptionsActivity extends BaseActivity {
mAdapter = new CounterCheckOptionsAdapter(mActivity, mOptions); mAdapter = new CounterCheckOptionsAdapter(mActivity, mOptions);
mRlvOptions.setAdapter(mAdapter); mRlvOptions.setAdapter(mAdapter);
mRlvOptions.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)); mRlvOptions.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
mAdapter.addSelectPhotoListener((bean, options, i, type) -> { mLlStateDis.setVisibility(View.GONE);
mCurrentOptions = options; mAdapter.setStateChangeListener(isCheck -> {
if (type == 1) { if (isCheck) {
//选择图片 //存在检查不合格项
mCurrentIndex = i; 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); showSelectPhoto(bean);
} else if (type == 2) { } else {
//预览 //预览
ArrayList<String> list = new ArrayList<>(); ArrayList<String> list = new ArrayList<>();
list.add(bean.getPath()); list.add(bean.getPath());
@ -114,26 +233,8 @@ public class CounterCheckOptionsActivity extends BaseActivity {
intent.putExtra(PhotoActivity.TAG_IMGURL, list); intent.putExtra(PhotoActivity.TAG_IMGURL, list);
intent.setClass(mActivity, PhotoActivity.class); intent.setClass(mActivity, PhotoActivity.class);
startActivity(intent); 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() { private void doUnclaim() {
@ -219,72 +320,90 @@ public class CounterCheckOptionsActivity extends BaseActivity {
* *
* @param data * @param data
*/ */
private void buildConfirmData(List<Options> data) { private void buildConfirmData(List<NewOptions> data) {
mMProgressDialog = new ProgressDialog(mActivity); mMProgressDialog = new ProgressDialog(mActivity);
mMProgressDialog.setMessage("加载中..."); mMProgressDialog.setMessage("上报中...");
mMProgressDialog.setCancelable(false); mMProgressDialog.setCancelable(false);
mMProgressDialog.setCanceledOnTouchOutside(false); mMProgressDialog.setCanceledOnTouchOutside(false);
mMProgressDialog.show(); mMProgressDialog.show();
OptionsSubmitBean submitBean = new OptionsSubmitBean();
submitBean.setEnterpriseId(mCompanyId); if (checkConfirmParams(data)) {
submitBean.setCheckType(2); OptionsSubmitBean submitBean = new OptionsSubmitBean();
submitBean.setIsCoordination(1); submitBean.setEnterpriseId(mCompanyId);
List<OptionsSubmitBean.HiddenDangerReportsBean> items = new ArrayList<>(); submitBean.setCheckType(1);
for (int i = 0; i < data.size(); i++) { submitBean.setIsCoordination(1);
Options o = data.get(i); List<OptionsSubmitBean.HiddenDangerReportsBean> items = new ArrayList<>();
if (o.getIsMust() == 1) { for (int i = 0; i < data.size(); i++) {
if (o.getState() == EmStateCheck.NORMAL) { NewOptions o = data.get(i);
mMProgressDialog.dismiss(); List<NewOptions.ChildBean> child = data.get(i).getChild();
ToastUtils.showShort("检查项中存在未检查的必查项目"); for (int j = 0; j < child.size(); j++) {
return; if (child.get(j).getType() == 1) {
} //选择
} if (child.get(j).isCheck()) {
OptionsSubmitBean.HiddenDangerReportsBean bean = new OptionsSubmitBean.HiddenDangerReportsBean(); OptionsSubmitBean.HiddenDangerReportsBean bean = new OptionsSubmitBean.HiddenDangerReportsBean();
bean.setCheckItemId(o.getId()); bean.setCheckItemId(o.getId());
String photoIds = ""; bean.setCheckItemOptionId(child.get(j).getItemId());
if (o.getState() == EmStateCheck.NORMAL) { bean.setCheckResult(child.get(j).getItemId());
bean.setCheckResult(0); bean.setType(child.get(j).getType());
} else if (o.getState() == EmStateCheck.CHECK) { items.add(bean);
bean.setCheckResult(1); }
for (int j = 0; j < o.getPhotos().size(); j++) { } else {
if (!TextUtils.isEmpty(o.getPhotos().get(j).getId())) { //输入
photoIds += o.getPhotos().get(j).getId() + ","; 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 { } else {
if (o.getRectify() == 4) { submitBean.setRectificationType(2);
//立即整改 String strDay = mSelType.substring(0, mSelType.lastIndexOf(""));
bean.setCheckResult(2); submitBean.setRectificationDays(Integer.parseInt(strDay));
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);
}
} }
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("上传成功"); ToastUtils.showShort("上传成功");
mCurrentBean.setId(baseUserBean.getData()); mCurrentBean.setId(baseUserBean.getData());
mPhotoIds += baseUserBean.getData() + ",";
mCurrentBean.setPath(picPath); mCurrentBean.setPath(picPath);
if (mCurrentOptions.getPhotos().size() < 4) { if (mPhotos.size() < 9) {
mCurrentOptions.getPhotos().add(new AddPhotoBean()); mPhotos.add(new AddPhotoBean());
} }
mAdapter.notifyDataSetChanged(); mAddPhotoAdapter.notifyDataSetChanged();
mCurrentBean = null; mCurrentBean = null;
} }
@ -499,14 +619,78 @@ public class CounterCheckOptionsActivity extends BaseActivity {
for (int i = 0; i < checkOptionsbeans.size(); i++) { for (int i = 0; i < checkOptionsbeans.size(); i++) {
List<AddPhotoBean> mPhotos = new ArrayList<>(); List<AddPhotoBean> mPhotos = new ArrayList<>();
mPhotos.add(new AddPhotoBean()); 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.setId(checkOptionsbeans.get(i).getCheckItemId());
o.setTitle(checkOptionsbeans.get(i).getName()); o.setTitle(checkOptionsbeans.get(i).getName());
o.setPhotos(mPhotos); o.setPhotos(mPhotos);
o.setIsMust(checkOptionsbeans.get(i).getType());
mOptions.add(o); mOptions.add(o);
} }
mAdapter.setData(mOptions); mAdapter.setData(mOptions);
refreshView(STATE_LOAD_SUCCESS); 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();
}
}
}
} }

View File

@ -96,6 +96,7 @@ public class CheckOptionsActivity extends BaseActivity {
buildConfirmData(mAdapter.getData()); buildConfirmData(mAdapter.getData());
}); });
String id = getIntent().getStringExtra("id"); String id = getIntent().getStringExtra("id");
String nId = getIntent().getStringExtra("nId");
mCompanyId = getIntent().getStringExtra("cId"); mCompanyId = getIntent().getStringExtra("cId");
String name = getIntent().getStringExtra("name"); String name = getIntent().getStringExtra("name");
String peo = getIntent().getStringExtra("peo"); String peo = getIntent().getStringExtra("peo");
@ -144,7 +145,7 @@ public class CheckOptionsActivity extends BaseActivity {
mAdapter.notifyDataSetChanged(); mAdapter.notifyDataSetChanged();
} }
}); });
getCheckOptions(id); getCheckOptions(id, nId);
mBtnUnclaim.setOnClickListener(v -> doUnclaim()); mBtnUnclaim.setOnClickListener(v -> doUnclaim());
} }
@ -217,52 +218,52 @@ public class CheckOptionsActivity extends BaseActivity {
return; return;
} }
} }
OptionsSubmitBean.HiddenDangerReportsBean bean = new OptionsSubmitBean.HiddenDangerReportsBean(); // OptionsSubmitBean.HiddenDangerReportsBean bean = new OptionsSubmitBean.HiddenDangerReportsBean();
bean.setCheckItemId(o.getId()); // bean.setCheckItemId(o.getId());
String photoIds = ""; // String photoIds = "";
if (o.getState() == EmStateCheck.NORMAL) { // if (o.getState() == EmStateCheck.NORMAL) {
bean.setCheckResult(0); // bean.setCheckResult(0);
} else if (o.getState() == EmStateCheck.CHECK) { // } else if (o.getState() == EmStateCheck.CHECK) {
bean.setCheckResult(1); // bean.setCheckResult(1);
for (int j = 0; j < o.getPhotos().size(); j++) { // for (int j = 0; j < o.getPhotos().size(); j++) {
if (!TextUtils.isEmpty(o.getPhotos().get(j).getId())) { // if (!TextUtils.isEmpty(o.getPhotos().get(j).getId())) {
photoIds += o.getPhotos().get(j).getId() + ","; // photoIds += o.getPhotos().get(j).getId() + ",";
} // }
} // }
if (photoIds.length() > 10) { // if (photoIds.length() > 10) {
bean.setScenePhotos(photoIds); // bean.setScenePhotos(photoIds);
} // }
} else { // } else {
if (o.getRectify() == 4) { // if (o.getRectify() == 4) {
//立即整改 // //立即整改
bean.setCheckResult(2); // bean.setCheckResult(2);
if (o.getTimeLimit().equals("立即整改")) { // if (o.getTimeLimit().equals("立即整改")) {
bean.setImmediatelyChangeType(1); // bean.setImmediatelyChangeType(1);
} else { // } else {
bean.setImmediatelyChangeType(2); // bean.setImmediatelyChangeType(2);
} // }
} else if (o.getRectify() == 5) { // } else if (o.getRectify() == 5) {
//限期整改 // //限期整改
bean.setCheckResult(3); // bean.setCheckResult(3);
String strDay = o.getTimeLimit().substring(0, o.getTimeLimit().lastIndexOf("")); // String strDay = o.getTimeLimit().substring(0, o.getTimeLimit().lastIndexOf(""));
bean.setRectificationDays(Integer.parseInt(strDay)); // bean.setRectificationDays(Integer.parseInt(strDay));
} else { // } else {
//不配合 // //不配合
bean.setCheckResult(4); // bean.setCheckResult(4);
} // }
for (int j = 0; j < o.getPhotos().size(); j++) { // for (int j = 0; j < o.getPhotos().size(); j++) {
if (!TextUtils.isEmpty(o.getPhotos().get(j).getId())) { // if (!TextUtils.isEmpty(o.getPhotos().get(j).getId())) {
photoIds += o.getPhotos().get(j).getId() + ","; // photoIds += o.getPhotos().get(j).getId() + ",";
} // }
} // }
if (photoIds.length() > 10) { // if (photoIds.length() > 10) {
bean.setScenePhotos(photoIds); // bean.setScenePhotos(photoIds);
// mMProgressDialog.dismiss(); //// mMProgressDialog.dismiss();
// ToastUtils.showShort("检查项中存在未上传图片的项目"); //// ToastUtils.showShort("检查项中存在未上传图片的项目");
// return; //// return;
} // }
} // }
items.add(bean); // items.add(bean);
} }
submitBean.setHiddenDangerReports(items); submitBean.setHiddenDangerReports(items);
doSubmit(submitBean); 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); refreshView(STATE_LOAD_LOADING);
RetrofitManager.getInstance() RetrofitManager.getInstance()
.create(LocationApiService.class) .create(LocationApiService.class)
.getCheckOptionsList(id, UserLgUtils.getToken()) .getCheckOptionsList(id, nId, UserLgUtils.getToken())
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<List<CheckOptionsbean>>() { .subscribe(new Observer<List<CheckOptionsbean>>() {

View File

@ -1,14 +1,24 @@
package com.sucstepsoft.txrealtimelocation.activitys.issue; 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.LinearLayoutManager;
import android.support.v7.widget.RecyclerView; 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.retrofit_net.RetrofitManager;
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity; 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.cm_utils.utils.UserLgUtils;
import com.sucstepsoft.txrealtimelocation.R; import com.sucstepsoft.txrealtimelocation.R;
import com.sucstepsoft.txrealtimelocation.activitys.common.PhotoActivity;
import com.sucstepsoft.txrealtimelocation.adapters.MissionDetailAdapter; 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 com.sucstepsoft.txrealtimelocation.net.LocationApiService;
import java.util.ArrayList; import java.util.ArrayList;
@ -25,9 +35,18 @@ import io.reactivex.schedulers.Schedulers;
public class HistoryDetialActivity extends BaseActivity { public class HistoryDetialActivity extends BaseActivity {
@BindView(R.id.rlv_detail) @BindView(R.id.rlv_detail)
RecyclerView mRlvDetail; 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 Unbinder mBind;
private List<HistoryMissionBean> mDatas = new ArrayList<>(); private List<HistoryDetialBean.CheckItemsBean> mDatas = new ArrayList<>();
private MissionDetailAdapter mAdapter; private MissionDetailAdapter mAdapter;
private Disposable mDis; private Disposable mDis;
@ -44,7 +63,13 @@ public class HistoryDetialActivity extends BaseActivity {
String cId = getIntent().getStringExtra("cId"); String cId = getIntent().getStringExtra("cId");
getDetail(cId); getDetail(cId);
mAdapter = new MissionDetailAdapter(mActivity, mDatas); 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); mRlvDetail.setAdapter(mAdapter);
} }
@ -52,21 +77,87 @@ public class HistoryDetialActivity extends BaseActivity {
private void getDetail(String cid) { private void getDetail(String cid) {
RetrofitManager.getInstance() RetrofitManager.getInstance()
.create(LocationApiService.class) .create(LocationApiService.class)
.getHistoryDetail(cid, UserLgUtils.getToken()) .getHistoryDetailById(cid, UserLgUtils.getToken())
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<List<HistoryMissionBean>>() { .subscribe(new Observer<HistoryDetialBean>() {
@Override @Override
public void onSubscribe(Disposable d) { public void onSubscribe(Disposable d) {
mDis = d; mDis = d;
} }
@Override @Override
public void onNext(List<HistoryMissionBean> beans) { public void onNext(HistoryDetialBean beans) {
if (beans != null && beans.size() > 0) { if (beans != null) {
refreshView(STATE_LOAD_SUCCESS); refreshView(STATE_LOAD_SUCCESS);
mDatas = beans; mTvName.setText(beans.getNameJoinByEnterpriseId());
mAdapter.setData(mDatas); 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 { } else {
refreshView(STATE_LOAD_EMPTY); refreshView(STATE_LOAD_EMPTY);
} }
@ -92,4 +183,5 @@ public class HistoryDetialActivity extends BaseActivity {
} }
mBind.unbind(); mBind.unbind();
} }
} }

View File

@ -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();
}
}
}
}

View File

@ -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;
}
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -26,6 +26,7 @@ import com.sucstepsoft.cm_utils.utils.UIUtil;
import com.sucstepsoft.cm_utils.utils.UserLgUtils; import com.sucstepsoft.cm_utils.utils.UserLgUtils;
import com.sucstepsoft.txrealtimelocation.R; import com.sucstepsoft.txrealtimelocation.R;
import com.sucstepsoft.txrealtimelocation.activitys.issue.CheckOptionsActivity; import com.sucstepsoft.txrealtimelocation.activitys.issue.CheckOptionsActivity;
import com.sucstepsoft.txrealtimelocation.activitys.issue.NewCheckOptionsActivity;
import com.sucstepsoft.txrealtimelocation.adapters.CompanyCheckAdapter; import com.sucstepsoft.txrealtimelocation.adapters.CompanyCheckAdapter;
import com.sucstepsoft.txrealtimelocation.beans.CompanyListDataBean; import com.sucstepsoft.txrealtimelocation.beans.CompanyListDataBean;
import com.sucstepsoft.txrealtimelocation.beans.DictBean; import com.sucstepsoft.txrealtimelocation.beans.DictBean;
@ -119,12 +120,13 @@ public class SelCompanyActivity extends BaseActivity {
mAdapter = new CompanyCheckAdapter(mActivity, mDatas); mAdapter = new CompanyCheckAdapter(mActivity, mDatas);
mXlvComLib.setAdapter(mAdapter); mXlvComLib.setAdapter(mAdapter);
mAdapter.addOnItemClickListener(bean -> { 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("id", bean.getIndustryJoinByEnterpriseId());
intent.putExtra("cId",bean.getEnterpriseId()); intent.putExtra("cId", bean.getEnterpriseId());
intent.putExtra("name", bean.getNameJoinByEnterpriseId()); intent.putExtra("name", bean.getNameJoinByEnterpriseId());
intent.putExtra("peo", bean.getMasterJoinByEnterpriseId()); intent.putExtra("peo", bean.getMasterJoinByEnterpriseId());
intent.putExtra("phone",bean.getPhoneJoinByEnterpriseId()); intent.putExtra("phone", bean.getPhoneJoinByEnterpriseId());
startActivity(intent); startActivity(intent);
}); });
LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity); LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity);

View File

@ -35,7 +35,7 @@ public class CompanyLibAdapter extends BaseRecyclerAdapter<CompanyListDataBean.R
public void bindHolder(CompanyHolder companyHolder, int i) { 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.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.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())) { if (TextUtils.isEmpty(mData.get(i).getUserId())) {
companyHolder.mBtnClain.setVisibility(View.VISIBLE); companyHolder.mBtnClain.setVisibility(View.VISIBLE);
companyHolder.mBtnUnClaim.setVisibility(View.GONE); companyHolder.mBtnUnClaim.setVisibility(View.GONE);

View File

@ -2,18 +2,26 @@ package com.sucstepsoft.txrealtimelocation.adapters;
import android.content.Context; import android.content.Context;
import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.GridLayoutManager;
import android.text.Editable;
import android.text.InputType;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.AdapterView; import android.widget.AdapterView;
import android.widget.ArrayAdapter; 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.beans.AddPhotoBean;
import com.sucstepsoft.cm_utils.core.widget.base.AddPhotoAdapter; import com.sucstepsoft.cm_utils.core.widget.base.AddPhotoAdapter;
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter; import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
import com.sucstepsoft.cm_utils.utils.LogUtils; import com.sucstepsoft.cm_utils.utils.LogUtils;
import com.sucstepsoft.txrealtimelocation.R; 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.Options;
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.OptionsAdapter; import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.OptionsAdapter;
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.OptionsHolder; import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.OptionsHolder;
@ -28,16 +36,10 @@ import java.util.List;
* 邮箱: itgaojian@163.com * 邮箱: itgaojian@163.com
* 描述: * 描述:
*/ */
public class CounterCheckOptionsAdapter extends BaseRecyclerAdapter<Options, CounterCheckOptionHolder> { public class CounterCheckOptionsAdapter extends BaseRecyclerAdapter<NewOptions, CounterCheckOptionHolder> {
private ArrayAdapter<String> mDefaultApater;
private ArrayAdapter<String> mAdapter;
private String[] mNowStrings;
private String[] mTermStrings;
public CounterCheckOptionsAdapter(Context ctx, List list) { public CounterCheckOptionsAdapter(Context ctx, List list) {
super(ctx, list); super(ctx, list);
mNowStrings = mContext.getResources().getStringArray(R.array.limit);
mTermStrings = mContext.getResources().getStringArray(R.array.timeLimit);
} }
@Override @Override
@ -52,235 +54,107 @@ public class CounterCheckOptionsAdapter extends BaseRecyclerAdapter<Options, Cou
if (mData.get(i).getIsMust() == 1) { if (mData.get(i).getIsMust() == 1) {
oHolder.mIvIsMust.setVisibility(View.VISIBLE); oHolder.mIvIsMust.setVisibility(View.VISIBLE);
} else { } else {
oHolder.mIvIsMust.setVisibility(View.GONE); oHolder.mIvIsMust.setVisibility(View.INVISIBLE);
} }
//设置检查项名称
oHolder.mTvTitle.setText(mData.get(i).getTitle()); oHolder.mTvTitle.setText(mData.get(i).getTitle());
oHolder.mRgState.setOnCheckedChangeListener(null); oHolder.mRgState.setOnCheckedChangeListener(null);
if (mData.get(i).getState() == EmStateCheck.UNCHECK) { oHolder.mEtContent.setVisibility(View.GONE);
//不合格 boolean isInput = false;
oHolder.mLlContent.setVisibility(View.VISIBLE);
oHolder.mRlvPhotos.setVisibility(View.VISIBLE); for (int j = 0; j < mData.get(i).getChild().size(); j++) {
setDisData(oHolder, mData.get(i), i); if (mData.get(i).getChild().get(j).getType() == 1) {
} else if (mData.get(i).getState() == EmStateCheck.CHECK) { NewOptions.ChildBean bean = mData.get(i).getChild().get(j);
//合格 RadioButton button = new RadioButton(mContext);
oHolder.mLlContent.setVisibility(View.GONE); button.setId(bean.getId());
oHolder.mRlvPhotos.setVisibility(View.VISIBLE); button.setText(bean.getTitle());
setCheckData(oHolder, mData.get(i), i); button.setPadding(10, 10, 10, 10);
} else { button.setTextSize(15);
//未检查 button.setButtonDrawable(R.drawable.sel_rb);
oHolder.mLlContent.setVisibility(View.GONE); oHolder.mRgState.addView(button);
oHolder.mRlvPhotos.setVisibility(View.GONE); isInput = true;
setNomarlData(oHolder, mData.get(i), i); } 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) -> { oHolder.mRgState.setOnCheckedChangeListener((radioGroup, i1) -> {
LogUtils.e("调用了==" + i1); for (int j = 0; j < mData.get(i).getChild().size(); j++) {
switch (i1) { if (mData.get(i).getChild().get(j).getId() == i1) {
case R.id.rb_state_uncheck: mData.get(i).getChild().get(j).setCheck(true);
mData.get(i).setState(EmStateCheck.NORMAL); //纯选择
oHolder.mLlContent.setVisibility(View.GONE); if (mData.get(i).getChild().get(j).getType() == 1) {
oHolder.mRlvPhotos.setVisibility(View.GONE); if (mData.get(i).getChild().get(j).isWrong()) {
setNomarlData(oHolder, mData.get(i), i); mData.get(i).setState(EmStateCheck.UNCHECK);
break; } else {
case R.id.rb_state_check: mData.get(i).setState(EmStateCheck.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);
} else { } else {
oHolder.mSpinner.setSelection(1); mData.get(i).getChild().get(j).setCheck(false);
} }
} else {
//未选择过
oHolder.mSpinner.setSelection(0);
} }
oHolder.mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { notifyDataChange();
@Override });
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) { if (isInput) {
String s = mNowStrings[i]; //存在选择
mData.get(index).setTimeLimit(s); mData.get(i).setState(EmStateCheck.NORMAL);
} } else {
mData.get(i).setState(EmStateCheck.CHECK);
@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);
} }
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);
}
});
} }
/** private void notifyDataChange() {
* 设置合格数据 boolean isUnCheck = false;
* for (int i = 0; i < mData.size(); i++) {
* @param oHolder for (int j = 0; j < mData.get(i).getChild().size(); j++) {
* @param op NewOptions.ChildBean bean = mData.get(i).getChild().get(j);
* @param index if (bean.isCheck() && bean.isWrong() && mData.get(i).getIsMust() == 1) {
*/ isUnCheck = true;
private void setCheckData(CounterCheckOptionHolder oHolder, Options op, int index) { break;
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);
} }
} }
}); }
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; private OptionsAdapter.SelectPhoto mSelectPhotoListener;

View File

@ -8,6 +8,7 @@ import android.text.TextUtils;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.TextView;
import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi; import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter; import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
@ -15,6 +16,7 @@ import com.sucstepsoft.cm_utils.core.widget.base.BaseShowPhotoAdapter;
import com.sucstepsoft.txrealtimelocation.R; import com.sucstepsoft.txrealtimelocation.R;
import com.sucstepsoft.txrealtimelocation.activitys.common.PhotoActivity; import com.sucstepsoft.txrealtimelocation.activitys.common.PhotoActivity;
import com.sucstepsoft.txrealtimelocation.adapters.holders.MissionDetailHolder; import com.sucstepsoft.txrealtimelocation.adapters.holders.MissionDetailHolder;
import com.sucstepsoft.txrealtimelocation.beans.HistoryDetialBean;
import com.sucstepsoft.txrealtimelocation.beans.HistoryMissionBean; import com.sucstepsoft.txrealtimelocation.beans.HistoryMissionBean;
import java.util.ArrayList; import java.util.ArrayList;
@ -26,9 +28,8 @@ import java.util.List;
* 邮箱: itgaojian@163.com * 邮箱: itgaojian@163.com
* 描述: * 描述:
*/ */
public class MissionDetailAdapter extends BaseRecyclerAdapter<HistoryMissionBean, MissionDetailHolder> { public class MissionDetailAdapter extends BaseRecyclerAdapter<HistoryDetialBean.CheckItemsBean, MissionDetailHolder> {
public MissionDetailAdapter(Context ctx, List<HistoryDetialBean.CheckItemsBean> list) {
public MissionDetailAdapter(Context ctx, List<HistoryMissionBean> list) {
super(ctx, list); super(ctx, list);
} }
@ -40,61 +41,26 @@ public class MissionDetailAdapter extends BaseRecyclerAdapter<HistoryMissionBean
@Override @Override
public void bindHolder(MissionDetailHolder holder, int i) { public void bindHolder(MissionDetailHolder holder, int i) {
holder.mTvName.setText(mData.get(i).getNameJoinByCheckItemId()); holder.mTvName.setText(mData.get(i).getName());
switch (mData.get(i).getCheckResult()) { if (mData.get(i).getHiddenDangerReports() != null && mData.get(i).getHiddenDangerReports().size() > 0) {
case 1: holder.mLlContent.setVisibility(View.VISIBLE);
holder.mTvCheckType.setText("检查合格"); for (int j = 0; j < mData.get(i).getHiddenDangerReports().size(); j++) {
holder.mTvCheckType.setTextColor(Color.GREEN); TextView tv = new TextView(mContext);
holder.mTvDay.setVisibility(View.GONE); tv.setTextSize(13);
break; switch (mData.get(i).getHiddenDangerReports().get(j).getCheckItemType()) {
case 2: case 1:
holder.mTvCheckType.setText("立即整改"); tv.setText(mData.get(i).getHiddenDangerReports().get(j).getNameJoinByCheckItemId());
holder.mTvCheckType.setTextColor(Color.RED); break;
holder.mTvDay.setVisibility(View.GONE); case 2:
break; case 3:
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();
holder.mTvCheckType.setText("限期整改"); tv.setText(tx);
holder.mTvDay.setVisibility(View.VISIBLE); break;
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.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 { } else {
holder.mRlvPhotos.setVisibility(View.GONE); holder.mLlContent.setVisibility(View.GONE);
} }
} }
} }

View File

@ -4,6 +4,7 @@ import android.support.annotation.NonNull;
import android.support.v7.widget.AppCompatSpinner; import android.support.v7.widget.AppCompatSpinner;
import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView;
import android.view.View; import android.view.View;
import android.widget.EditText;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.RadioButton; import android.widget.RadioButton;
@ -20,30 +21,20 @@ import com.sucstepsoft.txrealtimelocation.widget.StateCheckView;
* 描述: 复查选项 * 描述: 复查选项
*/ */
public class CounterCheckOptionHolder extends RecyclerView.ViewHolder { 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 RadioGroup mRgState;
public TextView mTvTitle;
public ImageView mIvIsMust;
public LinearLayout mLlCheck;
public EditText mEtContent;
public CounterCheckOptionHolder(@NonNull View itemView) { public CounterCheckOptionHolder(@NonNull View itemView) {
super(itemView); super(itemView);
mTvTitle = itemView.findViewById(R.id.tv_title); mTvTitle = itemView.findViewById(R.id.tv_title);
mRgState = itemView.findViewById(R.id.rg_state); 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); mIvIsMust = itemView.findViewById(R.id.iv_must);
mLlCheck = itemView.findViewById(R.id.ll_check);
mEtContent = itemView.findViewById(R.id.et_content);
} }
} }

View File

@ -3,6 +3,7 @@ package com.sucstepsoft.txrealtimelocation.adapters.holders;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView;
import android.view.View; import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import com.sucstepsoft.txrealtimelocation.R; import com.sucstepsoft.txrealtimelocation.R;
@ -15,16 +16,11 @@ import com.sucstepsoft.txrealtimelocation.R;
*/ */
public class MissionDetailHolder extends RecyclerView.ViewHolder { public class MissionDetailHolder extends RecyclerView.ViewHolder {
public TextView mTvName; public TextView mTvName;
public TextView mTvDay; public LinearLayout mLlContent;
public TextView mTvCheckType;
public RecyclerView mRlvPhotos;
public MissionDetailHolder(@NonNull View itemView) { public MissionDetailHolder(@NonNull View itemView) {
super(itemView); super(itemView);
mTvName = itemView.findViewById(R.id.tv_options_name); mTvName = itemView.findViewById(R.id.tv_options_name);
mTvDay = itemView.findViewById(R.id.tv_day); mLlContent = itemView.findViewById(R.id.ll_content);
mTvCheckType = itemView.findViewById(R.id.tv_options_check);
mRlvPhotos = itemView.findViewById(R.id.rlv_photos);
} }
} }

View File

@ -4,6 +4,8 @@ import android.content.Context;
import android.support.multidex.MultiDex; import android.support.multidex.MultiDex;
import android.support.multidex.MultiDexApplication; import android.support.multidex.MultiDexApplication;
import com.baidu.mapapi.CoordType;
import com.baidu.mapapi.SDKInitializer;
import com.squareup.leakcanary.LeakCanary; import com.squareup.leakcanary.LeakCanary;
import com.tencent.bugly.crashreport.CrashReport; import com.tencent.bugly.crashreport.CrashReport;
@ -41,16 +43,17 @@ public class BaseApplication extends MultiDexApplication {
initJPush(); initJPush();
// CrashReport.initCrashReport(getApplicationContext(), "ff95776367", false); // CrashReport.initCrashReport(getApplicationContext(), "ff95776367", false);
sInitialized = true; sInitialized = true;
initBaiduMap();
} }
/** /**
* 百度地图初始化 * 百度地图初始化
*/ */
private void initBaiduMap() { private void initBaiduMap() {
// SDKInitializer.initialize(this); SDKInitializer.initialize(this);
//自4.3.0起百度地图SDK所有接口均支持百度坐标和国测局坐标用此方法设置您使用的坐标类型. //自4.3.0起百度地图SDK所有接口均支持百度坐标和国测局坐标用此方法设置您使用的坐标类型.
//包括BD09LL和GCJ02两种坐标默认是BD09LL坐标 //包括BD09LL和GCJ02两种坐标默认是BD09LL坐标
// SDKInitializer.setCoordType(CoordType.BD09LL); SDKInitializer.setCoordType(CoordType.BD09LL);
} }
// public static LocationChangBroadcastReceiver getlocationChangeBoardcase() { // public static LocationChangBroadcastReceiver getlocationChangeBoardcase() {

View File

@ -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;
}
}

View File

@ -1,5 +1,7 @@
package com.sucstepsoft.txrealtimelocation.beans; package com.sucstepsoft.txrealtimelocation.beans;
import java.util.List;
/** /**
* 作者: adam * 作者: adam
* 日期: 2020/3/31 - 3:57 PM * 日期: 2020/3/31 - 3:57 PM
@ -8,32 +10,28 @@ package com.sucstepsoft.txrealtimelocation.beans;
*/ */
public class CheckOptionsbean { public class CheckOptionsbean {
/** /**
* industryCheckItemId : 3a1725c2-c1e6-496b-bb58-f70bbcbc7ded * industryCheckItemId : a6027f46-8ff0-466a-996b-9198dbfc52c5
* industryId : 706b8520-3a1d-431e-a203-0d307dc22e87 * natureId : 165aa316-2972-4ed9-9a4b-7f8b9d489986
* industryIdDictionaryName : 餐饮 * natureIdDictionaryName : 商店超市
* checkItemId : a1c27ea5-40dd-4cc8-974c-d387f8ba428c * checkItemId : d37491ee-146e-430e-b155-2256fc0c4957
* nameJoinByCheckItemId : 照明 * nameJoinByCheckItemId : 营业执照
* summaryJoinByCheckItemId : 照明 * summaryJoinByCheckItemId : 营业执照
* typeJoinByCheckItemId : 1 * 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 industryCheckItemId;
private String industryId; private String natureId;
private String industryIdDictionaryName; private String natureIdDictionaryName;
private String checkItemId; private String checkItemId;
private String nameJoinByCheckItemId; private String nameJoinByCheckItemId;
private String summaryJoinByCheckItemId; private String summaryJoinByCheckItemId;
private String typeJoinByCheckItemId; private String typeJoinByCheckItemId;
private int type; private int type;
private List<CheckItemOptionsBean> checkItemOptions;
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getIndustryCheckItemId() { public String getIndustryCheckItemId() {
return industryCheckItemId; return industryCheckItemId;
@ -43,20 +41,20 @@ public class CheckOptionsbean {
this.industryCheckItemId = industryCheckItemId; this.industryCheckItemId = industryCheckItemId;
} }
public String getIndustryId() { public String getNatureId() {
return industryId; return natureId;
} }
public void setIndustryId(String industryId) { public void setNatureId(String natureId) {
this.industryId = industryId; this.natureId = natureId;
} }
public String getIndustryIdDictionaryName() { public String getNatureIdDictionaryName() {
return industryIdDictionaryName; return natureIdDictionaryName;
} }
public void setIndustryIdDictionaryName(String industryIdDictionaryName) { public void setNatureIdDictionaryName(String natureIdDictionaryName) {
this.industryIdDictionaryName = industryIdDictionaryName; this.natureIdDictionaryName = natureIdDictionaryName;
} }
public String getCheckItemId() { public String getCheckItemId() {
@ -90,4 +88,86 @@ public class CheckOptionsbean {
public void setTypeJoinByCheckItemId(String typeJoinByCheckItemId) { public void setTypeJoinByCheckItemId(String typeJoinByCheckItemId) {
this.typeJoinByCheckItemId = 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;
}
}
} }

View File

@ -46,152 +46,87 @@ public class CompanyListDataBean {
public static class RowsBean { public static class RowsBean {
/** /**
* addressJoinByEnterpriseId : string * enterpriseOfGridOperatorId : 8912ae08-fe03-4001-a867-185f8e70946e
* area1DictionaryName : string * userId : e48e9c4a-995e-4061-abcd-a3c260c11333
* area1JoinByEnterpriseId : string * enterpriseId : b4b4847d-c182-42c2-b699-e412e0fe12c2
* area2DictionaryName : string * nameJoinByEnterpriseId : 青山区新达厨卫洁具店
* area2JoinByEnterpriseId : string * typeJoinByEnterpriseId : 30b2b1b8-0915-487f-a33d-449762ed644a
* area3DictionaryName : string * area1JoinByEnterpriseId :
* area3JoinByEnterpriseId : string * area2JoinByEnterpriseId :
* area4DictionaryName : string * area3JoinByEnterpriseId :
* area4JoinByEnterpriseId : string * area4JoinByEnterpriseId :
* area5DictionaryName : string * area5JoinByEnterpriseId :
* area5JoinByEnterpriseId : string * addressJoinByEnterpriseId : 内蒙古自治区包头市青山区色气湾
* engagedCountJoinByEnterpriseId : string * industryJoinByEnterpriseId : 43b477d9-1bc6-4dc9-b5a7-849187bf438e
* enterpriseId : string * engagedCountJoinByEnterpriseId : 2
* enterpriseOfGridOperatorId : string * riskOperationJoinByEnterpriseId :
* industryDictionaryName : string * masterJoinByEnterpriseId :
* industryJoinByEnterpriseId : string * phoneJoinByEnterpriseId :
* masterJoinByEnterpriseId : string * area1DictionaryName : 内蒙古
* nameJoinByEnterpriseId : stringa * area2DictionaryName : 包头市
* phoneJoinByEnterpriseId : string * area3DictionaryName : 青山区
* riskOperationDictionaryName : string * area4DictionaryName : 青福镇
* riskOperationJoinByEnterpriseId : string * area5DictionaryName : 色气湾村
* typeDictionaryName : string * industryDictionaryName :
* typeJoinByEnterpriseId : string * riskOperationDictionaryName :
* userId : string * 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 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 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() { public String getEnterpriseOfGridOperatorId() {
return addressJoinByEnterpriseId; return enterpriseOfGridOperatorId;
} }
public void setAddressJoinByEnterpriseId(String addressJoinByEnterpriseId) { public void setEnterpriseOfGridOperatorId(String enterpriseOfGridOperatorId) {
this.addressJoinByEnterpriseId = addressJoinByEnterpriseId; this.enterpriseOfGridOperatorId = enterpriseOfGridOperatorId;
} }
public String getArea1DictionaryName() { public String getUserId() {
return area1DictionaryName; return userId;
} }
public void setArea1DictionaryName(String area1DictionaryName) { public void setUserId(String userId) {
this.area1DictionaryName = area1DictionaryName; this.userId = userId;
}
public String getArea1JoinByEnterpriseId() {
return area1JoinByEnterpriseId;
}
public void setArea1JoinByEnterpriseId(String area1JoinByEnterpriseId) {
this.area1JoinByEnterpriseId = area1JoinByEnterpriseId;
}
public String getArea2DictionaryName() {
return area2DictionaryName;
}
public void setArea2DictionaryName(String area2DictionaryName) {
this.area2DictionaryName = area2DictionaryName;
}
public String getArea2JoinByEnterpriseId() {
return area2JoinByEnterpriseId;
}
public void setArea2JoinByEnterpriseId(String area2JoinByEnterpriseId) {
this.area2JoinByEnterpriseId = area2JoinByEnterpriseId;
}
public String getArea3DictionaryName() {
return area3DictionaryName;
}
public void setArea3DictionaryName(String area3DictionaryName) {
this.area3DictionaryName = area3DictionaryName;
}
public String getArea3JoinByEnterpriseId() {
return area3JoinByEnterpriseId;
}
public void setArea3JoinByEnterpriseId(String area3JoinByEnterpriseId) {
this.area3JoinByEnterpriseId = area3JoinByEnterpriseId;
}
public String getArea4DictionaryName() {
return area4DictionaryName;
}
public void setArea4DictionaryName(String area4DictionaryName) {
this.area4DictionaryName = area4DictionaryName;
}
public String getArea4JoinByEnterpriseId() {
return area4JoinByEnterpriseId;
}
public void setArea4JoinByEnterpriseId(String area4JoinByEnterpriseId) {
this.area4JoinByEnterpriseId = area4JoinByEnterpriseId;
}
public String getArea5DictionaryName() {
return area5DictionaryName;
}
public void setArea5DictionaryName(String area5DictionaryName) {
this.area5DictionaryName = area5DictionaryName;
}
public String getArea5JoinByEnterpriseId() {
return area5JoinByEnterpriseId;
}
public void setArea5JoinByEnterpriseId(String area5JoinByEnterpriseId) {
this.area5JoinByEnterpriseId = area5JoinByEnterpriseId;
}
public String getEngagedCountJoinByEnterpriseId() {
return engagedCountJoinByEnterpriseId;
}
public void setEngagedCountJoinByEnterpriseId(String engagedCountJoinByEnterpriseId) {
this.engagedCountJoinByEnterpriseId = engagedCountJoinByEnterpriseId;
} }
public String getEnterpriseId() { public String getEnterpriseId() {
@ -202,38 +137,6 @@ public class CompanyListDataBean {
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public String getEnterpriseOfGridOperatorId() {
return enterpriseOfGridOperatorId;
}
public void setEnterpriseOfGridOperatorId(String enterpriseOfGridOperatorId) {
this.enterpriseOfGridOperatorId = enterpriseOfGridOperatorId;
}
public String getIndustryDictionaryName() {
return industryDictionaryName;
}
public void setIndustryDictionaryName(String industryDictionaryName) {
this.industryDictionaryName = industryDictionaryName;
}
public String getIndustryJoinByEnterpriseId() {
return industryJoinByEnterpriseId;
}
public void setIndustryJoinByEnterpriseId(String industryJoinByEnterpriseId) {
this.industryJoinByEnterpriseId = industryJoinByEnterpriseId;
}
public String getMasterJoinByEnterpriseId() {
return masterJoinByEnterpriseId;
}
public void setMasterJoinByEnterpriseId(String masterJoinByEnterpriseId) {
this.masterJoinByEnterpriseId = masterJoinByEnterpriseId;
}
public String getNameJoinByEnterpriseId() { public String getNameJoinByEnterpriseId() {
return nameJoinByEnterpriseId; return nameJoinByEnterpriseId;
} }
@ -242,38 +145,6 @@ public class CompanyListDataBean {
this.nameJoinByEnterpriseId = nameJoinByEnterpriseId; this.nameJoinByEnterpriseId = nameJoinByEnterpriseId;
} }
public String getPhoneJoinByEnterpriseId() {
return phoneJoinByEnterpriseId;
}
public void setPhoneJoinByEnterpriseId(String phoneJoinByEnterpriseId) {
this.phoneJoinByEnterpriseId = phoneJoinByEnterpriseId;
}
public String getRiskOperationDictionaryName() {
return riskOperationDictionaryName;
}
public void setRiskOperationDictionaryName(String riskOperationDictionaryName) {
this.riskOperationDictionaryName = riskOperationDictionaryName;
}
public String getRiskOperationJoinByEnterpriseId() {
return riskOperationJoinByEnterpriseId;
}
public void setRiskOperationJoinByEnterpriseId(String riskOperationJoinByEnterpriseId) {
this.riskOperationJoinByEnterpriseId = riskOperationJoinByEnterpriseId;
}
public String getTypeDictionaryName() {
return typeDictionaryName;
}
public void setTypeDictionaryName(String typeDictionaryName) {
this.typeDictionaryName = typeDictionaryName;
}
public String getTypeJoinByEnterpriseId() { public String getTypeJoinByEnterpriseId() {
return typeJoinByEnterpriseId; return typeJoinByEnterpriseId;
} }
@ -282,12 +153,212 @@ public class CompanyListDataBean {
this.typeJoinByEnterpriseId = typeJoinByEnterpriseId; this.typeJoinByEnterpriseId = typeJoinByEnterpriseId;
} }
public String getUserId() { public String getArea1JoinByEnterpriseId() {
return userId; return area1JoinByEnterpriseId;
} }
public void setUserId(String userId) { public void setArea1JoinByEnterpriseId(String area1JoinByEnterpriseId) {
this.userId = userId; 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;
} }
} }
} }

View File

@ -1,5 +1,7 @@
package com.sucstepsoft.txrealtimelocation.beans; package com.sucstepsoft.txrealtimelocation.beans;
import java.util.List;
/** /**
* 作者: adam * 作者: adam
* 日期: 2020/4/2 - 11:28 AM * 日期: 2020/4/2 - 11:28 AM
@ -8,17 +10,26 @@ package com.sucstepsoft.txrealtimelocation.beans;
*/ */
public class CounterCheckOptionsBean { public class CounterCheckOptionsBean {
/** /**
* checkItemId : a1c27ea5-40dd-4cc8-974c-d387f8ba428c * checkItemId : bde68ea3-a271-42c2-bdcd-8f9a7e43f837
* name : 照明 * name : 培训制度
* summary : 照明 * parentName :
* type : 1 * 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 checkItemId;
private String name; private String name;
private String parentName;
private String summary; private String summary;
private int type; private int type;
private String checkItemParentId;
private List<CheckItemOptionsBean> checkItemOptions;
private List<?> hiddenDangerReports;
public String getCheckItemId() { public String getCheckItemId() {
return checkItemId; return checkItemId;
@ -36,6 +47,14 @@ public class CounterCheckOptionsBean {
this.name = name; this.name = name;
} }
public String getParentName() {
return parentName;
}
public void setParentName(String parentName) {
this.parentName = parentName;
}
public String getSummary() { public String getSummary() {
return summary; return summary;
} }
@ -51,4 +70,94 @@ public class CounterCheckOptionsBean {
public void setType(int type) { public void setType(int type) {
this.type = 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

View File

@ -10,20 +10,58 @@ import java.util.List;
*/ */
public class OptionsSubmitBean { public class OptionsSubmitBean {
/** /**
* checkResult : 0
* checkType : 0 * checkType : 0
* enterpriseId : string * 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 * isComplete : 0
* isCoordination : 0 * isCoordination : 0
* rectificationDays : 0
* rectificationType : 0
* scenePhotos : string
* summary : string
*/ */
private String checkLat;
private int checkType;// 1检查 复查 private String checkLng;
private String enterpriseId; //企业Id private int checkResult;
private int isComplete;// private int checkType;
private int isCoordination;//是否配合 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; 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() { public int getCheckType() {
return checkType; return checkType;
} }
@ -40,6 +78,14 @@ public class OptionsSubmitBean {
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public int getImmediatelyChangeType() {
return immediatelyChangeType;
}
public void setImmediatelyChangeType(int immediatelyChangeType) {
this.immediatelyChangeType = immediatelyChangeType;
}
public int getIsComplete() { public int getIsComplete() {
return isComplete; return isComplete;
} }
@ -56,6 +102,38 @@ public class OptionsSubmitBean {
this.isCoordination = isCoordination; this.isCoordination = isCoordination;
} }
public int getRectificationDays() {
return rectificationDays;
}
public void setRectificationDays(int rectificationDays) {
this.rectificationDays = rectificationDays;
}
public int getRectificationType() {
return rectificationType;
}
public void setRectificationType(int rectificationType) {
this.rectificationType = rectificationType;
}
public String 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() { public List<HiddenDangerReportsBean> getHiddenDangerReports() {
return hiddenDangerReports; return hiddenDangerReports;
} }
@ -68,22 +146,16 @@ public class OptionsSubmitBean {
/** /**
* checkId : string * checkId : string
* checkItemId : string * checkItemId : string
* checkResult : 0 * checkItemOptionId : string
* immediatelyChangeType : 0 * checkResult : string
* rectificationDays : 0 * type : 0
* rectificationType : 0
* scenePhotos : string
* summary : string
*/ */
private String checkId; private String checkId;
private String checkItemId; private String checkItemId;
private int checkResult; private String checkItemOptionId;
private int immediatelyChangeType; private String checkResult;
private int rectificationDays; private int type;
private int rectificationType;
private String scenePhotos;
private String summary;
public String getCheckId() { public String getCheckId() {
return checkId; return checkId;
@ -101,52 +173,28 @@ public class OptionsSubmitBean {
this.checkItemId = checkItemId; this.checkItemId = checkItemId;
} }
public int getCheckResult() { public String getCheckItemOptionId() {
return checkItemOptionId;
}
public void setCheckItemOptionId(String checkItemOptionId) {
this.checkItemOptionId = checkItemOptionId;
}
public String getCheckResult() {
return checkResult; return checkResult;
} }
public void setCheckResult(int checkResult) { public void setCheckResult(String checkResult) {
this.checkResult = checkResult; this.checkResult = checkResult;
} }
public int getImmediatelyChangeType() { public int getType() {
return immediatelyChangeType; return type;
} }
public void setImmediatelyChangeType(int immediatelyChangeType) { public void setType(int type) {
this.immediatelyChangeType = immediatelyChangeType; this.type = type;
}
public int getRectificationDays() {
return rectificationDays;
}
public void setRectificationDays(int rectificationDays) {
this.rectificationDays = rectificationDays;
}
public int getRectificationType() {
return rectificationType;
}
public void setRectificationType(int rectificationType) {
this.rectificationType = rectificationType;
}
public String getScenePhotos() {
return scenePhotos;
}
public void setScenePhotos(String scenePhotos) {
this.scenePhotos = scenePhotos;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
} }
} }
} }

View File

@ -5,6 +5,7 @@ import com.sucstepsoft.txrealtimelocation.beans.AddressListBean;
import com.sucstepsoft.txrealtimelocation.beans.AreaListBean; import com.sucstepsoft.txrealtimelocation.beans.AreaListBean;
import com.sucstepsoft.txrealtimelocation.beans.BaseUserBean; import com.sucstepsoft.txrealtimelocation.beans.BaseUserBean;
import com.sucstepsoft.txrealtimelocation.beans.CaseFlowBean; import com.sucstepsoft.txrealtimelocation.beans.CaseFlowBean;
import com.sucstepsoft.txrealtimelocation.beans.CheckItemOption;
import com.sucstepsoft.txrealtimelocation.beans.CheckOptionsbean; import com.sucstepsoft.txrealtimelocation.beans.CheckOptionsbean;
import com.sucstepsoft.txrealtimelocation.beans.CheckSignBean; import com.sucstepsoft.txrealtimelocation.beans.CheckSignBean;
import com.sucstepsoft.txrealtimelocation.beans.CheckSignOffBean; 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.CounterCheckOptionsBean;
import com.sucstepsoft.txrealtimelocation.beans.DepartmentBean; import com.sucstepsoft.txrealtimelocation.beans.DepartmentBean;
import com.sucstepsoft.txrealtimelocation.beans.DictBean; import com.sucstepsoft.txrealtimelocation.beans.DictBean;
import com.sucstepsoft.txrealtimelocation.beans.HistoryDetialBean;
import com.sucstepsoft.txrealtimelocation.beans.HistoryMissionBean; import com.sucstepsoft.txrealtimelocation.beans.HistoryMissionBean;
import com.sucstepsoft.txrealtimelocation.beans.IssueSubBean; import com.sucstepsoft.txrealtimelocation.beans.IssueSubBean;
import com.sucstepsoft.txrealtimelocation.beans.LeaveDetailBean; import com.sucstepsoft.txrealtimelocation.beans.LeaveDetailBean;
@ -629,7 +631,13 @@ public interface LocationApiService {
//industrycheckitem/listindustrycheckitem/{id} //industrycheckitem/listindustrycheckitem/{id}
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"}) @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
@GET("industrycheckitem/listindustrycheckitem") @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"}) @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
@ -708,6 +716,11 @@ public interface LocationApiService {
@GET("check/listcheckitembycheckid/{checkId}") @GET("check/listcheckitembycheckid/{checkId}")
Observable<List<HistoryMissionBean>> getHistoryDetail(@Path("checkId") String checkId, @Header("token") String token); 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"}) @Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
@GET("articlecontent/listpagearticlecontent") @GET("articlecontent/listpagearticlecontent")

View File

@ -288,7 +288,7 @@
<TextView <TextView
style="@style/company_name_title" style="@style/company_name_title"
android:text="厂区大门照片" /> android:text="生产单位经营外貌" />
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:id="@+id/rlv_door" android:id="@+id/rlv_door"

View File

@ -517,7 +517,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/shp_rectangle_gray" android:background="@drawable/shp_rectangle_gray"
android:padding="10dp" android:padding="10dp"
android:text="厂区大门" android:text="生产单位经营外貌"
android:textColor="@color/black" /> android:textColor="@color/black" />
</LinearLayout> </LinearLayout>

View File

@ -61,7 +61,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="27dp" android:layout_height="27dp"
android:background="@drawable/sp_blue_sel" android:background="@drawable/sp_blue_sel"
android:text="企业不配合" android:text="企业未整改"
android:textColor="@color/titleBar" /> android:textColor="@color/titleBar" />
</LinearLayout> </LinearLayout>
@ -86,10 +86,103 @@
<android.support.v7.widget.RecyclerView <android.support.v7.widget.RecyclerView
android:id="@+id/rlv_options" android:id="@+id/rlv_options"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content" />
tools:layoutManager="LinearLayoutManager"
tools:listitem="@layout/item_options" />
</LinearLayout> </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> </LinearLayout>
</android.support.v4.widget.NestedScrollView> </android.support.v4.widget.NestedScrollView>
</LinearLayout> </LinearLayout>

View File

@ -98,6 +98,7 @@
<ImageView <ImageView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="invisible"
android:background="@drawable/ic_start_hint" /> android:background="@drawable/ic_start_hint" />
<EditText <EditText
@ -520,7 +521,7 @@
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true"
android:padding="10dp" android:padding="10dp"
android:text="厂区大门" android:text="生产单位经营外貌"
android:textColor="@color/black" /> android:textColor="@color/black" />
</LinearLayout> </LinearLayout>

View File

@ -9,8 +9,88 @@
android:padding="10dp" android:padding="10dp"
tools:context=".activitys.issue.HistoryDetialActivity"> tools:context=".activitys.issue.HistoryDetialActivity">
<android.support.v7.widget.RecyclerView <android.support.v4.widget.NestedScrollView
android:id="@+id/rlv_detail"
android:layout_width="match_parent" 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> </LinearLayout>

View 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>

View File

@ -11,7 +11,6 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/shape_rectangle_white" android:background="@drawable/shape_rectangle_white"
android:orientation="vertical"> android:orientation="vertical">
@ -29,131 +28,47 @@
<TextView <TextView
android:id="@+id/tv_title" android:id="@+id/tv_title"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_weight="1"
android:padding="5dp" android:padding="5dp"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="16sp" android:textSize="16sp"
tools:text="测试数据测试数据测试数据测试数据测试数据测试数据测试数据测试数据" /> 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> </LinearLayout>
<View <RadioGroup
android:id="@+id/rg_state"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="wrap_content"
android:layout_marginTop="3dp" android:layout_gravity="center"
android:background="@color/gray_bg" /> android:gravity="center_vertical"
android:orientation="vertical"
android:padding="8dp">
</RadioGroup>
<LinearLayout <LinearLayout
android:id="@+id/ll_content" android:id="@+id/ll_check"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="2dp" android:orientation="vertical"
android:gravity="center_vertical" android:padding="8dp">
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" />
</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> </LinearLayout>
<android.support.v7.widget.RecyclerView <EditText
android:id="@+id/rlv_photos" android:id="@+id/et_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" 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>
</LinearLayout> </LinearLayout>

View File

@ -16,22 +16,14 @@
android:textSize="16sp" android:textSize="16sp"
tools:text="检查项名称" /> tools:text="检查项名称" />
<TextView <LinearLayout
android:id="@+id/tv_options_check" android:id="@+id/ll_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textSize="12sp" android:layout_marginTop="3dp"
tools:text="是否存在隐患" /> 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> </LinearLayout>

View 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>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string-array name="limit"> <string-array name="limit">
<item>立即整改</item> <item>当场整改</item>
<item>当天整改</item> <item>当天整改</item>
</string-array> </string-array>
<string-array name="timeLimit"> <string-array name="timeLimit">

View File

@ -59,8 +59,8 @@ ext {
gCompileSdkVersion = 28 gCompileSdkVersion = 28
gMinSdkVersion = 16 gMinSdkVersion = 16
gTargetSdkVersion = 28 gTargetSdkVersion = 28
gVersionCode = 4 gVersionCode = 5
gVersionName = '1.0.3' gVersionName = '1.0.4'
// gVersionCode=26 // gVersionCode=26
// gVersionName='1.3.0' // gVersionName='1.3.0'
//Router编译版本 //Router编译版本

View File

@ -40,12 +40,14 @@ public class PathConfig {
public static final String APP_VERSION_ID = "cc0ef7f0-de0e-4e29-8428-534ab9f2494d";//下载AppID 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_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 = "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_RISK_ID = "77128e8e-3e09-45b5-a48e-7a50d1b7cc32";//风险
public static final String DIC_AREA_ID = "81583ade-5466-49aa-b7b6-c643c131ea34";//地区 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 NOTICE_TYPE_ID = "94d1691f-65e6-4c82-8537-98c4a318b09e";//通知公告
public static final String LAW_TYPE_ID = "fcc6ebf0-5d0b-43f9-a89e-e3283941f25a";//政策法规 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 //包头坐标 109.926934,40.574501
//呼市坐标 40.823879 111.771815 //呼市坐标 40.823879 111.771815

View File

@ -9,8 +9,8 @@ import com.sucstepsoft.cm_utils.constant.PathConfig;
*/ */
public class BaseUrlApi { public class BaseUrlApi {
public static final String IP = "http://58.18.22.25:8081/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 IP = "http://192.168.0.113:7001/usercenter/";/* 测试IP */
public static final String PROJECT_NAME = "app/"; public static final String PROJECT_NAME = "app/";
public static final String BASE_URL = IP + PROJECT_NAME; public static final String BASE_URL = IP + PROJECT_NAME;
public static final String APP_VERSION = BASE_URL + "appCmVersionManagement/getAppVersion"; 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 String FIELD_SAFETY = BASE_URL + "appFieldSafety/goFloorPlan";
public static final int PHOTO_REQUEST = 233; public static final int PHOTO_REQUEST = 233;
public static final int CAMERA_REQUEST = 123; 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://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://192.168.0.113:7006/inspection/";/* 测试IP */
public static final String BASE_IMG_URL = BASE_IP + "route/file/downloadfile/true/"; public static final String BASE_IMG_URL = BASE_IP + "route/file/downloadfile/true/";
public static final String SOCKET_IP = "192.168.1.149"; public static final String SOCKET_IP = "192.168.1.149";