页面修改

This commit is contained in:
itgaojian163 2020-04-27 18:33:29 +08:00
parent 146d590fed
commit 31a2658cb0
93 changed files with 3743 additions and 1752 deletions

View File

@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":6,"versionName":"1.0.5","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":7,"versionName":"1.0.6","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]

BIN
app/release/yj-zs-4.apk Normal file

Binary file not shown.

View File

@ -47,7 +47,8 @@
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".activitys.plan.PlanHistoryActivity"></activity>
<activity android:name=".activitys.issue.PublicMainActivity"></activity>
<activity android:name=".activitys.plan.PlanHistoryActivity" />
<activity android:name=".activitys.plan.PlanListActivity" />
<activity
android:name=".activitys.plan.PlanActivity"

View File

@ -57,6 +57,7 @@ import com.sucstepsoft.txrealtimelocation.beans.BaseUserBean;
import com.sucstepsoft.txrealtimelocation.beans.CatalogBean;
import com.sucstepsoft.txrealtimelocation.beans.CheckOptionsbean;
import com.sucstepsoft.txrealtimelocation.beans.CompanyDetailBean;
import com.sucstepsoft.txrealtimelocation.beans.ErrorBean;
import com.sucstepsoft.txrealtimelocation.beans.OptionsSubmitBean;
import com.sucstepsoft.txrealtimelocation.beans.SuccessBean;
import com.sucstepsoft.txrealtimelocation.net.LocationApiService;
@ -79,6 +80,8 @@ import io.reactivex.schedulers.Schedulers;
import okhttp3.MediaType;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.HttpException;
import top.zibin.luban.Luban;
import top.zibin.luban.OnCompressListener;
@ -96,6 +99,8 @@ public class CatalogActivity extends BaseActivity {
Button mBtnUnClaim;
@BindView(R.id.tv_name)
TextView mTvName;
@BindView(R.id.tv_peo)
TextView mTvP;
private Unbinder mBind;
private List<CatalogBean> mDatas = new ArrayList<>();
@ -125,6 +130,7 @@ public class CatalogActivity extends BaseActivity {
private LocationClient mLocationClient;
private boolean isExist = false;//是否存在选择的错误项,用来弹出整改选项 dialog
private String mTaskCheckId;
private CatalogBean mCurrentCatalogBean;
@Override
protected int setLayoutId() {
@ -160,7 +166,11 @@ public class CatalogActivity extends BaseActivity {
} else {
mTvPublish.setVisibility(View.VISIBLE);
mRlvCatalog.setVisibility(View.VISIBLE);
if (TextUtils.isEmpty(id)) {
id = "";
}
getCheckOptions(id, nId);
getCompanyDetail(mCompanyId);
}
}
mBtnUnClaim.setOnClickListener(v -> doUnclaim());
@ -168,6 +178,41 @@ public class CatalogActivity extends BaseActivity {
startListenerLocation();
}
private void getCompanyDetail(String companyId) {
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getCompanyDetail(companyId, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<CompanyDetailBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(CompanyDetailBean companyDetailBean) {
if (companyDetailBean != null) {
if (TextUtils.isEmpty(companyDetailBean.getLegalPerson())) {
mTvP.setText("未录入");
} else {
mTvP.setText(companyDetailBean.getLegalPerson());
}
}
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
});
}
private void getCompanyDetail(String companyId, String nid) {
refreshView(STATE_LOAD_LOADING);
RetrofitManager.getInstance()
@ -184,8 +229,14 @@ public class CatalogActivity extends BaseActivity {
@Override
public void onNext(CompanyDetailBean companyDetailBean) {
if (companyDetailBean != null) {
String industry = companyDetailBean.getIndustry();
if (TextUtils.isEmpty(companyDetailBean.getLegalPerson())) {
mTvP.setText("未录入");
} else {
mTvP.setText(companyDetailBean.getLegalPerson());
}
String industry = companyDetailBean.getNature();
if (TextUtils.isEmpty(industry)) {
ToastUtils.showLong("该企业未关联检查项,请联系管理员进行关联");
refreshView(STATE_LOAD_EMPTY);
} else {
getCheckOptions(industry, nid);
@ -224,7 +275,13 @@ public class CatalogActivity extends BaseActivity {
mLeftAdapter = new LeftCatalogAdapter(mActivity, mDatas);
mRightAdapter = new NewOptionsAdapter(this, mCurrentOptions);
mRightAdapter.setStateChangeListener(isCheck -> {
if (!isCheck) {
//全部选择了
mCurrentCatalogBean.setAllCheck(true);
mLeftAdapter.notifyDataSetChanged();
}
});
mRlvChild.setLayoutManager(rightManager);
mRlvChild.setAdapter(mRightAdapter);
@ -265,8 +322,9 @@ public class CatalogActivity extends BaseActivity {
mRlvCatalog.setLayoutManager(manager);
mRlvCatalog.setAdapter(mLeftAdapter);
mLeftAdapter.addNotifyChildChangeListener(child -> {
mLeftAdapter.addNotifyChildChangeListener((child, bean) -> {
hideSoftKeyboard();
mCurrentCatalogBean = bean;
if (child != null && child.size() > 0) {
mRlvChild.setVisibility(View.VISIBLE);
mTvEmptyHint.setVisibility(View.GONE);
@ -286,9 +344,10 @@ public class CatalogActivity extends BaseActivity {
mTermStrings = mActivity.getResources().getStringArray(R.array.timeLimit);
mTermAdapter = new ArrayAdapter<>(mActivity, R.layout.item_pop_text, mTermStrings);
mNowAdapter = new ArrayAdapter<>(mActivity, R.layout.item_pop_text, mNowStrings);
Button mBtnConfirm = contentView.findViewById(R.id.btn_confirm);
Button mBtnCancel = contentView.findViewById(R.id.btn_cancel);
RadioGroup mRgTerm = contentView.findViewById(R.id.rg_term);
AppCompatSpinner mSpTerm = contentView.findViewById(R.id.sp_term);
// RecyclerView mRlvPhotos = contentView.findViewById(R.id.rlv_photos);
mSpTerm.setAdapter(mNowAdapter);
mSpTerm.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
@ -319,15 +378,12 @@ public class CatalogActivity extends BaseActivity {
}
});
mType = 1;
break;
case R.id.rb_coor:
//不配合
mSpTerm.setVisibility(View.GONE);
mType = 3;
mSpTerm.setClickable(false);
break;
case R.id.rb_term:
//限期整改
mType = 2;
mSpTerm.setClickable(true);
mSpTerm.setVisibility(View.VISIBLE);
mSpTerm.setAdapter(mTermAdapter);
mSpTerm.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@ -344,36 +400,14 @@ public class CatalogActivity extends BaseActivity {
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 -> {
// mSelPhotosType = 2;
// 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);
// }
// });
builder.setView(contentView);
builder.setPositiveButton("取消", (dialog, which) -> {
mSelTypeDialog = 0;
}).setNegativeButton("确定", (dialog, which) -> {
builder.setCancelable(false);
AlertDialog alertDialog = builder.create();
alertDialog.setCanceledOnTouchOutside(false);
alertDialog.show();
mBtnConfirm.setOnClickListener(v -> {
alertDialog.dismiss();
mMProgressDialog = new ProgressDialog(mActivity);
mMProgressDialog.setMessage("上报中...");
mMProgressDialog.setCancelable(false);
@ -395,12 +429,11 @@ public class CatalogActivity extends BaseActivity {
submitBean.setCheckLat(mCurrentLatitude + "");
submitBean.setCheckLng(mCurrentLongitude + "");
doSubmit(submitBean);
}).setCancelable(false)
.setTitle("整改选项")
.setIcon(R.drawable.ic_hint_dialog);
AlertDialog alertDialog = builder.create();
alertDialog.setCanceledOnTouchOutside(false);
alertDialog.show();
});
mBtnCancel.setOnClickListener(v -> {
alertDialog.dismiss();
mSelTypeDialog = 0;
});
}
/**
@ -569,6 +602,7 @@ public class CatalogActivity extends BaseActivity {
bean.setTypeByCheckItemId(checkOptionsbean.getTypeJoinByCheckItemId());
bean.setIcon(checkOptionsbean.getIconJoinByCheckItemId());
bean.setSelIcon(checkOptionsbean.getIconPressJoinByCheckItemId());
bean.setCheck(false);
mDatas.add(bean);
}
}
@ -641,6 +675,7 @@ public class CatalogActivity extends BaseActivity {
}
mLeftAdapter.setData(mDatas);
mCurrentOptions = mDatas.get(0).getOptions();
mCurrentCatalogBean = mDatas.get(0);
if (mCurrentOptions != null && mCurrentOptions.size() > 0) {
mRlvChild.setVisibility(View.VISIBLE);
mTvEmptyHint.setVisibility(View.GONE);
@ -690,45 +725,47 @@ public class CatalogActivity extends BaseActivity {
submitBean.setIsCoordination(1);
List<OptionsSubmitBean.HiddenDangerReportsBean> items = new ArrayList<>();
for (int l = 0; l < cBean.size(); l++) {
List<NewOptions> data = cBean.get(l).getOptions();
for (int i = 0; i < data.size(); i++) {
NewOptions o = data.get(i);
String phIds = "";
for (int j = 0; j < o.getPhotos().size(); j++) {
if (!TextUtils.isEmpty(o.getPhotos().get(j).getId())) {
phIds += o.getPhotos().get(j).getId() + ",";
if (!cBean.get(l).isCheck()) {
List<NewOptions> data = cBean.get(l).getOptions();
for (int i = 0; i < data.size(); i++) {
NewOptions o = data.get(i);
String phIds = "";
for (int j = 0; j < o.getPhotos().size(); j++) {
if (!TextUtils.isEmpty(o.getPhotos().get(j).getId())) {
phIds += o.getPhotos().get(j).getId() + ",";
}
}
}
List<NewOptions.ChildBean> child = data.get(i).getChild();
for (int j = 0; j < child.size(); j++) {
if (child.get(j).getType() == 1) {
//选择
if (child.get(j).isCheck()) {
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());
if (phIds.length() > 10) {
bean.setScenePhotos(phIds);
}
items.add(bean);
}
} else {
//输入
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());
if (TextUtils.isEmpty(child.get(j).getInputText())) {
bean.setCheckResult("");
} else {
bean.setCheckResult(child.get(j).getInputText());
}
if (phIds.length() > 10) {
bean.setScenePhotos(phIds);
}
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());
}
if (phIds.length() > 10) {
bean.setScenePhotos(phIds);
}
items.add(bean);
}
}
}
@ -800,7 +837,6 @@ public class CatalogActivity extends BaseActivity {
}
Gson gson = new Gson();
String obj = gson.toJson(submitBean);
LogUtils.e(obj);
RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
RetrofitManager.getInstance()
.create(LocationApiService.class)
@ -826,7 +862,19 @@ public class CatalogActivity extends BaseActivity {
@Override
public void onError(Throwable e) {
ToastUtils.showShort("提交失败,请稍后重试.");
if (e instanceof HttpException) {
ResponseBody responseBody = ((HttpException) e).response().errorBody();
try {
String string = responseBody.string();
Gson gson1 = new Gson();
ErrorBean errorBean = gson1.fromJson(string, ErrorBean.class);
ToastUtils.showShort(errorBean.getMsg());
} catch (Exception e1) {
ToastUtils.showShort("提交失败,请稍后重试.");
}
} else {
ToastUtils.showShort("提交失败,请稍后重试.");
}
if (mMProgressDialog != null && mMProgressDialog.isShowing()) {
mMProgressDialog.dismiss();
}
@ -849,8 +897,10 @@ public class CatalogActivity extends BaseActivity {
for (int i = 0; i < data.size(); i++) {
for (int j = 0; j < data.get(i).getOptions().size(); j++) {
if (data.get(i).getOptions().get(j).getState() == EmStateCheck.NORMAL) {
isComplete = false;
break;
if (!data.get(i).isCheck()) {
isComplete = false;
break;
}
}
}
}
@ -861,13 +911,14 @@ public class CatalogActivity extends BaseActivity {
for (int k = 0; k < child.size(); k++) {
NewOptions.ChildBean bean = child.get(k);
if (bean.isCheck() && bean.isWrong() && data.get(i).getOptions().get(j).getIsMust() == 1) {
isExist = true;
break;
if (!data.get(i).isCheck()) {
isExist = true;
break;
}
}
}
}
}
LogUtils.e(isExist);
return isComplete;
}

View File

@ -212,9 +212,11 @@ public class MainActivity extends BaseActivity {
mGson = new Gson();
String loginInfo = UserLgUtils.getLoginInfo();
AppTokenUser appTokenUser = mGson.fromJson(loginInfo, AppTokenUser.class);
if (appTokenUser.getRoles() != null && appTokenUser.getRoles().size() > 0) {
mTvOnline.setText(appTokenUser.getRoles().get(0).getRoleName());
}
mTvOnline.setVisibility(View.GONE);
// if (appTokenUser.getRoles() != null && appTokenUser.getRoles().size() > 0) {
// mTvOnline.setText(appTokenUser.getRoles().get(0).getRoleName());
// }
// mTvDepart.setVisibility(View.GONE);
if (appTokenUser.getDepartments() != null && appTokenUser.getDepartments().size() > 0) {
mTvDepart.setText(appTokenUser.getDepartments().get(0).getDepartmentName());
}
@ -242,7 +244,7 @@ public class MainActivity extends BaseActivity {
private void getNumberByMine() {
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getArticleCount(UserLgUtils.getToken())
.getArticleCount("94d1691f-65e6-4c82-8537-98c4a318b09e", UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BaseUserBean>() {

View File

@ -13,7 +13,6 @@ import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
import com.sucstepsoft.cm_utils.core.widget.base.BaseShowPhotoAdapter;
import com.sucstepsoft.cm_utils.utils.LogUtils;
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
import com.sucstepsoft.txrealtimelocation.R;
import com.sucstepsoft.txrealtimelocation.activitys.common.PhotoActivity;
@ -78,6 +77,14 @@ public class CompanyDetailActivity extends BaseActivity {
LinearLayout mLlCompanyInfo;
@BindView(R.id.tv_logoff)
TextView mTvLogOff;
@BindView(R.id.tv_door_hint)
TextView mTvDoorHint;
@BindView(R.id.tv_place_hint)
TextView mTvPlaceHint;
@BindView(R.id.tv_nature)
TextView mTvNature;
@BindView(R.id.tv_classify)
TextView mTvClassify;
private Unbinder mBind;
private CompanyDetailBean mDetailBean;
private String mId;
@ -152,66 +159,140 @@ public class CompanyDetailActivity extends BaseActivity {
mTvArea1.setText(mDetailBean.getArea1DictionaryName());
mTvArea2.setText(mDetailBean.getArea2DictionaryName());
mTvArea3.setText(mDetailBean.getArea3DictionaryName());
mTvArea4.setText(mDetailBean.getArea4DictionaryName());
mTvArea5.setText(mDetailBean.getArea5DictionaryName());
mTvType.setText(mDetailBean.getTypeDictionaryName());
if (TextUtils.isEmpty(mDetailBean.getArea4DictionaryName())) {
mTvArea4.setText("未录入");
} else {
mTvArea4.setText(mDetailBean.getArea4DictionaryName());
}
if (TextUtils.isEmpty(mDetailBean.getArea5DictionaryName())) {
mTvArea5.setText("未录入");
} else {
mTvArea5.setText(mDetailBean.getArea5DictionaryName());
}
if (TextUtils.isEmpty(mDetailBean.getTypeDictionaryName())) {
mTvType.setText("未录入");
} else {
mTvType.setText(mDetailBean.getTypeDictionaryName());
}
mTvName.setText(mDetailBean.getName());
mTvPeo.setText(mDetailBean.getMaster());
mTvPhone.setText(mDetailBean.getPhone());
mTvComP.setText(mDetailBean.getLegalPerson());
mTvScope.setText(mDetailBean.getSummary());
mTvCode.setText(mDetailBean.getBussinessRegNum());
mTvTrade1.setText(mDetailBean.getIndustryTypeDictionaryName());
mTvDetAddress.setText(mDetailBean.getAddress());
mTvPeoCount.setText(mDetailBean.getEngagedCount() + "");
mTvRisk.setText(mDetailBean.getRiskOperationDictionaryName());
mTvTrade.setText(mDetailBean.getIndustryDictionaryName());
LogUtils.e(mDetailBean.getFactoryGate());
List<String> photos = new ArrayList<>();
String[] split = mDetailBean.getFactoryGate().split(",");
for (int j = 0; j < split.length; j++) {
if (!TextUtils.isEmpty(split[j])) {
photos.add(BaseUrlApi.BASE_IMG_URL + split[j]);
}
if (TextUtils.isEmpty(mDetailBean.getMaster())) {
mTvPeo.setText("未录入");
} else {
mTvPeo.setText(mDetailBean.getMaster());
}
BaseShowPhotoAdapter adapter = new BaseShowPhotoAdapter(mActivity, photos);
GridLayoutManager manager = new GridLayoutManager(mActivity, 4) {
@Override
public boolean canScrollVertically() {
return false;
}
};
mRlvDoor.setLayoutManager(manager);
mRlvDoor.setAdapter(adapter);
adapter.addOnItemClickListener(url -> {
Intent intent = new Intent(mActivity, PhotoActivity.class);
intent.putExtra("imgUrls", new ArrayList<>(adapter.getData()));
startActivity(intent);
});
List<String> placeP = new ArrayList<>();
String[] split1 = mDetailBean.getWorkplace().split(",");
for (int j = 0; j < split1.length; j++) {
if (!TextUtils.isEmpty(split1[j])) {
placeP.add(BaseUrlApi.BASE_IMG_URL + split1[j]);
}
if (TextUtils.isEmpty(mDetailBean.getPhone())) {
mTvPhone.setText("未录入");
} else {
mTvPhone.setText(mDetailBean.getPhone());
}
BaseShowPhotoAdapter adapter1 = new BaseShowPhotoAdapter(mActivity, placeP);
GridLayoutManager manager1 = new GridLayoutManager(mActivity, 4) {
@Override
public boolean canScrollVertically() {
return false;
if (TextUtils.isEmpty(mDetailBean.getLegalPerson())) {
mTvComP.setText("未录入");
} else {
mTvComP.setText(mDetailBean.getLegalPerson());
}
if (TextUtils.isEmpty(mDetailBean.getSummary())) {
mTvScope.setText("未录入");
} else {
mTvScope.setText(mDetailBean.getSummary());
}
if (TextUtils.isEmpty(mDetailBean.getBussinessRegNum())) {
mTvCode.setText("未录入");
} else {
mTvCode.setText(mDetailBean.getBussinessRegNum());
}
if (TextUtils.isEmpty(mDetailBean.getIndustryTypeDictionaryName())) {
mTvTrade1.setText("未录入");
} else {
mTvTrade1.setText(mDetailBean.getIndustryTypeDictionaryName());
}
if (TextUtils.isEmpty(mDetailBean.getAddress())) {
mTvDetAddress.setText("未录入");
} else {
mTvDetAddress.setText(mDetailBean.getAddress());
}
if (mDetailBean.getEngagedCount() == 0) {
mTvPeoCount.setText("未录入");
} else {
mTvPeoCount.setText(mDetailBean.getEngagedCount() + "");
}
if (TextUtils.isEmpty(mDetailBean.getRiskOperationDictionaryName())) {
mTvRisk.setText("未录入");
} else {
mTvRisk.setText(mDetailBean.getRiskOperationDictionaryName());
}
if (TextUtils.isEmpty(mDetailBean.getIndustryDictionaryName())) {
mTvTrade.setText("未录入");
} else {
mTvTrade.setText(mDetailBean.getIndustryDictionaryName());
}
if (TextUtils.isEmpty(mDetailBean.getClassifyDictionaryName())) {
mTvClassify.setText("未录入");
} else {
mTvClassify.setText(mDetailBean.getClassifyDictionaryName());
}
if (TextUtils.isEmpty(mDetailBean.getNatureDictionaryName())) {
mTvNature.setText("未录入");
} else {
mTvNature.setText(mDetailBean.getNatureDictionaryName());
}
if (mDetailBean.getFactoryGate() != null && mDetailBean.getFactoryGate().length() > 0) {
mRlvDoor.setVisibility(View.VISIBLE);
mTvDoorHint.setVisibility(View.GONE);
List<String> photos = new ArrayList<>();
String[] split = mDetailBean.getFactoryGate().split(",");
for (int j = 0; j < split.length; j++) {
if (!TextUtils.isEmpty(split[j])) {
photos.add(BaseUrlApi.BASE_IMG_URL + split[j]);
}
}
};
mRlvPlace.setLayoutManager(manager1);
mRlvPlace.setAdapter(adapter1);
adapter1.addOnItemClickListener(url -> {
Intent intent = new Intent(mActivity, PhotoActivity.class);
intent.putExtra("imgUrls", new ArrayList<>(adapter1.getData()));
startActivity(intent);
});
BaseShowPhotoAdapter adapter = new BaseShowPhotoAdapter(mActivity, photos);
GridLayoutManager manager = new GridLayoutManager(mActivity, 4) {
@Override
public boolean canScrollVertically() {
return false;
}
};
mRlvDoor.setLayoutManager(manager);
mRlvDoor.setAdapter(adapter);
adapter.addOnItemClickListener(url -> {
Intent intent = new Intent(mActivity, PhotoActivity.class);
intent.putExtra("imgUrls", new ArrayList<>(adapter.getData()));
startActivity(intent);
});
} else {
mRlvDoor.setVisibility(View.GONE);
mTvDoorHint.setVisibility(View.VISIBLE);
}
if (!TextUtils.isEmpty(mDetailBean.getWorkplace())) {
mTvPlaceHint.setVisibility(View.GONE);
mRlvPlace.setVisibility(View.VISIBLE);
List<String> placeP = new ArrayList<>();
String[] split1 = mDetailBean.getWorkplace().split(",");
for (int j = 0; j < split1.length; j++) {
if (!TextUtils.isEmpty(split1[j])) {
placeP.add(BaseUrlApi.BASE_IMG_URL + split1[j]);
}
}
BaseShowPhotoAdapter adapter1 = new BaseShowPhotoAdapter(mActivity, placeP);
GridLayoutManager manager1 = new GridLayoutManager(mActivity, 4) {
@Override
public boolean canScrollVertically() {
return false;
}
};
mRlvPlace.setLayoutManager(manager1);
mRlvPlace.setAdapter(adapter1);
adapter1.addOnItemClickListener(url -> {
Intent intent = new Intent(mActivity, PhotoActivity.class);
intent.putExtra("imgUrls", new ArrayList<>(adapter1.getData()));
startActivity(intent);
});
} else {
mTvPlaceHint.setVisibility(View.VISIBLE);
mRlvPlace.setVisibility(View.GONE);
}
}
@ -221,5 +302,4 @@ public class CompanyDetailActivity extends BaseActivity {
mBind.unbind();
mDetailDis.dispose();
}
}

View File

@ -11,7 +11,9 @@ import android.provider.MediaStore;
import android.support.v4.content.FileProvider;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.Gravity;
import android.view.View;
import android.widget.EditText;
@ -112,7 +114,10 @@ public class CompanyInfoEditActivity extends BaseActivity {
TextView mTvTrade1;
@BindView(R.id.tv_logoff)
TextView mTvLogOff;//是否注销
@BindView(R.id.tv_nature)
TextView mTvNature;
@BindView(R.id.tv_sort)
TextView mTvSort;
private List<AddPhotoBean> mDoorPhotos;
private List<AddPhotoBean> mPlacePhotos;
private AddPhotoBean mCurrentBean;
@ -142,6 +147,13 @@ public class CompanyInfoEditActivity extends BaseActivity {
private List<DictBean> mArea5List = null;//社区 嘎查
private List<DictBean> mTraitList = null;//风险特点
private List<String> mLogOffList = null;//管理行业1
private OptionsPickerView mNaturePicker;//场所性质
private OptionsPickerView mSoltPicker;//企业分类
private List<DictBean> mNatureList = null;//场所性质
private List<DictBean> mSoltList = null;//企业分类
private String mSelNatureId = "";//场所性质
private String mSelSoltId = "";//企业分类
private String mSelTypeId = "";//单位类型ID
private String mSelTradeId = "";//管理行业ID
private String code = "";//组织机构代码证
@ -244,9 +256,72 @@ public class CompanyInfoEditActivity extends BaseActivity {
mTvArea4.setOnClickListener(v -> onShowArea4Picker());
mTvArea5.setOnClickListener(v -> onShowArea5Picker());
mTvRisk.setOnClickListener(v -> onShowRiskPicker());
mTvTrade.setOnClickListener(v -> onShowTradePicker());
mTvTrade1.setOnClickListener(v -> onShowTrade1Picker());
mTvLogOff.setOnClickListener(v -> onShowLogOffPicker());
mTvNature.setOnClickListener(v -> onShowNaturePicker());
mTvSort.setOnClickListener(v -> onShowSortPicker());
setEditTextInhibitInputSpeChat(mEtCompanyName);
setEditTextInhibitInputSpeChat(mEtCompanyCode);
setEditTextInhibitInputSpeChat(mEtCompanyP);
setEditTextInhibitInputSpeChat(mEtCompanyScope);
setEditTextInhibitInputSpeChat(mEtPhone);
setEditTextInhibitInputSpeChat(mEtPre);
setEditTextInhibitInputSpeChat(mEtDetailAddress);
astrictContentLength(mEtDetailAddress, 80);
astrictContentLength(mEtCompanyScope, 80);
astrictContentLength(mEtCompanyP, 30);
astrictContentLength(mEtCompanyName, 80);
}
private void onShowSortPicker() {
hideSoftKeyboard();
if (mSoltList != null && mSoltList.size() > 0) {
mSoltPicker = new OptionsPickerBuilder(mActivity, (options1, options2, options3, v) -> {
DictBean bean = mSoltList.get(options1);
mSelSoltId = bean.getDictionaryId();
mTvSort.setText(bean.getDictionaryName());
}).setTitleText("请选择")
.setCancelColor(Color.parseColor("#1189FF"))
.setSubmitColor(Color.parseColor("#1189FF"))
.setTitleColor(Color.parseColor("#1189FF"))
.build();
mSoltPicker.setPicker(mSoltList);
mSoltPicker.show();
} else {
if (mSoltList == null) {
getDicList(PathConfig.DIC_COMPANY_TYPE, 11);
} else {
ToastUtils.showShort("暂无数据");
}
}
}
private void onShowNaturePicker() {
hideSoftKeyboard();
if (mNatureList != null && mNatureList.size() > 0) {
mNaturePicker = new OptionsPickerBuilder(mActivity, (options1, options2, options3, v) -> {
DictBean bean = mNatureList.get(options1);
mSelNatureId = bean.getDictionaryId();
mTvNature.setText(bean.getDictionaryName());
}).setTitleText("请选择")
.setCancelColor(Color.parseColor("#1189FF"))
.setSubmitColor(Color.parseColor("#1189FF"))
.setTitleColor(Color.parseColor("#1189FF"))
.build();
mNaturePicker.setPicker(mNatureList);
mNaturePicker.show();
} else {
if (mNatureList == null) {
getDicList(PathConfig.DIC_PLACE_ID, 10);
} else {
ToastUtils.showShort("暂无数据");
}
}
}
private void onShowLogOffPicker() {
@ -275,6 +350,9 @@ public class CompanyInfoEditActivity extends BaseActivity {
DictBean bean = mTradeList1.get(options1);
mSelTrade1 = bean.getDictionaryId();
mTvTrade1.setText(bean.getDictionaryName());
mTradeList = null;
mTvTrade.setText("");
mSelTradeId = "";
}).setTitleText("请选择")
.setCancelColor(Color.parseColor("#1189FF"))
.setSubmitColor(Color.parseColor("#1189FF"))
@ -382,6 +460,7 @@ public class CompanyInfoEditActivity extends BaseActivity {
}
private void onShowTradePicker() {
LogUtils.e(mTradeList);
hideSoftKeyboard();
if (TextUtils.isEmpty(mSelTrade1)) {
ToastUtils.showShort("请先选择行业类型");
@ -522,8 +601,13 @@ public class CompanyInfoEditActivity extends BaseActivity {
submitBean.setArea3(mSelArea3Id);
submitBean.setNature(mSelNatureId);
submitBean.setClassify(mSelSoltId);
submitBean.setIndustryType(mSelTrade1);
submitBean.setBussinessRegNum(code);
if (!TextUtils.isEmpty(code)) {
submitBean.setBussinessRegNum(code);
}
submitBean.setLegalPerson(companP);
submitBean.setSummary(scope);
submitBean.setIsLogOff(mSelLogOff);
@ -579,11 +663,11 @@ public class CompanyInfoEditActivity extends BaseActivity {
ToastUtils.showShort("请输入企业名称");
return false;
}
code = mEtCompanyCode.getText().toString().trim();
if (TextUtils.isEmpty(code)) {
ToastUtils.showShort("请输入组织机构代码");
return false;
}
// code = mEtCompanyCode.getText().toString().trim();
// if (TextUtils.isEmpty(code)) {
// ToastUtils.showShort("请输入组织机构代码");
// return false;
// }
scope = mEtCompanyScope.getText().toString().trim();
if (TextUtils.isEmpty(scope)) {
ToastUtils.showShort("请输入营业范围");
@ -639,13 +723,21 @@ public class CompanyInfoEditActivity extends BaseActivity {
return false;
}
if (TextUtils.isEmpty(mDoorPhotoIds)) {
ToastUtils.showShort("请上传企业大门照片");
ToastUtils.showShort("请上传生产单位经营外貌照片");
return false;
}
if (TextUtils.isEmpty(mPlacePhotoIds)) {
ToastUtils.showShort("请上传企业主要场所");
return false;
}
if (TextUtils.isEmpty(mSelNatureId)) {
ToastUtils.showShort("请选择场所性质");
return false;
}
if (TextUtils.isEmpty(mSelSoltId)) {
ToastUtils.showShort("请选择企业分类");
return false;
}
return true;
}
@ -706,6 +798,14 @@ public class CompanyInfoEditActivity extends BaseActivity {
mTradeList1 = dictBeans;
onShowTrade1Picker();
break;
case 10://场所性质
mNatureList = dictBeans;
onShowNaturePicker();
break;
case 11://企业分类
mSoltList = dictBeans;
onShowSortPicker();
break;
}
}
@ -1036,6 +1136,11 @@ public class CompanyInfoEditActivity extends BaseActivity {
companP = mDetailBean.getLegalPerson();
mEtCompanyP.setText(companP);
mSelNatureId = mDetailBean.getNature();
mTvNature.setText(mDetailBean.getNatureDictionaryName());
mSelSoltId = mDetailBean.getClassify();
mTvSort.setText(mDetailBean.getClassifyDictionaryName());
mTvTrade1.setText(mDetailBean.getIndustryTypeDictionaryName());
mSelTrade1 = mDetailBean.getIndustryType();

View File

@ -11,10 +11,11 @@ import android.provider.MediaStore;
import android.support.v4.content.FileProvider;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.Gravity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
@ -34,12 +35,14 @@ 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.base.CatalogActivity;
import com.sucstepsoft.txrealtimelocation.activitys.common.PhotoActivity;
import com.sucstepsoft.txrealtimelocation.beans.BaseUserBean;
import com.sucstepsoft.txrealtimelocation.beans.CompanyEnterBean;
import com.sucstepsoft.txrealtimelocation.beans.DictBean;
import com.sucstepsoft.txrealtimelocation.beans.SuccessBean;
import com.sucstepsoft.txrealtimelocation.net.LocationApiService;
import com.sucstepsoft.txrealtimelocation.widget.MyTextWatcher;
import java.io.File;
import java.util.ArrayList;
@ -107,6 +110,10 @@ public class EnterCompanyInfoActivity extends BaseActivity {
TextView mTvTrade1;
@BindView(R.id.tv_logoff)
TextView mTvLogOff;//是否注销
@BindView(R.id.tv_nature)
TextView mTvNature;
@BindView(R.id.tv_sort)
TextView mTvSort;
private Unbinder mBind;
private List<AddPhotoBean> mDoorPhotos;
private List<AddPhotoBean> mPlacePhotos;
@ -118,6 +125,7 @@ public class EnterCompanyInfoActivity extends BaseActivity {
private OptionsPickerView mTradePicker;//管理行业
private OptionsPickerView mTradePicker1;//管理行业
private OptionsPickerView mLogOffPicker;//是否注销
private OptionsPickerView mMArea1Picker;
private OptionsPickerView mMArea2Picker;
private OptionsPickerView mMArea3Picker;
@ -130,6 +138,14 @@ public class EnterCompanyInfoActivity extends BaseActivity {
private List<DictBean> mTypeList = null;//单位类型
private List<DictBean> mTradeList = null;//管理行业
private List<DictBean> mTradeList1 = null;//管理行业1
private OptionsPickerView mNaturePicker;//场所性质
private OptionsPickerView mSoltPicker;//企业分类
private List<DictBean> mNatureList = null;//场所性质
private List<DictBean> mSoltList = null;//企业分类
private String mSelNatureId = "";//场所性质
private String mSelSoltId = "";//企业分类
private List<String> mLogOffList = null;//管理行业1
private List<DictBean> mArea1List = null;//
private List<DictBean> mArea2List = null;//
@ -243,11 +259,70 @@ public class EnterCompanyInfoActivity extends BaseActivity {
mTvTrade.setOnClickListener(v -> onShowTradePicker());
mTvTrade1.setOnClickListener(v -> onShowTrade1Picker());
mTvLogOff.setOnClickListener(v -> onShowLogOffPicker());
mTvNature.setOnClickListener(v -> onShowNaturePicker());
mTvSort.setOnClickListener(v -> onShowSortPicker());
setEditTextInhibitInputSpeChat(mEtCompanyName);
setEditTextInhibitInputSpeChat(mEtCompanyCode);
setEditTextInhibitInputSpeChat(mEtCompanyP);
setEditTextInhibitInputSpeChat(mEtCompanyScope);
setEditTextInhibitInputSpeChat(mEtPhone);
setEditTextInhibitInputSpeChat(mEtPre);
setEditTextInhibitInputSpeChat(mEtDetailAddress);
astrictContentLength(mEtDetailAddress, 80);
astrictContentLength(mEtCompanyScope, 80);
astrictContentLength(mEtCompanyP, 30);
astrictContentLength(mEtCompanyName, 80);
mTvLogOff.setText("未注销");
getDefaultArea1();
}
private void onShowSortPicker() {
hideSoftKeyboard();
if (mSoltList != null && mSoltList.size() > 0) {
mSoltPicker = new OptionsPickerBuilder(EnterCompanyInfoActivity.this, (options1, options2, options3, v) -> {
DictBean bean = mSoltList.get(options1);
mSelSoltId = bean.getDictionaryId();
mTvSort.setText(bean.getDictionaryName());
}).setTitleText("请选择")
.setCancelColor(Color.parseColor("#1189FF"))
.setSubmitColor(Color.parseColor("#1189FF"))
.setTitleColor(Color.parseColor("#1189FF"))
.build();
mSoltPicker.setPicker(mSoltList);
mSoltPicker.show();
} else {
if (mSoltList == null) {
getDicList(PathConfig.DIC_COMPANY_TYPE, 11);
} else {
ToastUtils.showShort("暂无数据");
}
}
}
private void onShowNaturePicker() {
hideSoftKeyboard();
if (mNatureList != null && mNatureList.size() > 0) {
mNaturePicker = new OptionsPickerBuilder(EnterCompanyInfoActivity.this, (options1, options2, options3, v) -> {
DictBean bean = mNatureList.get(options1);
mSelNatureId = bean.getDictionaryId();
mTvNature.setText(bean.getDictionaryName());
}).setTitleText("请选择")
.setCancelColor(Color.parseColor("#1189FF"))
.setSubmitColor(Color.parseColor("#1189FF"))
.setTitleColor(Color.parseColor("#1189FF"))
.build();
mNaturePicker.setPicker(mNatureList);
mNaturePicker.show();
} else {
if (mNatureList == null) {
getDicList(PathConfig.DIC_PLACE_ID, 10);
} else {
ToastUtils.showShort("暂无数据");
}
}
}
private void onShowLogOffPicker() {
hideSoftKeyboard();
mLogOffPicker = new OptionsPickerBuilder(EnterCompanyInfoActivity.this, (options1, options2, options3, v) -> {
@ -363,6 +438,9 @@ public class EnterCompanyInfoActivity extends BaseActivity {
DictBean bean = mTradeList1.get(options1);
mSelTrade1 = bean.getDictionaryId();
mTvTrade1.setText(bean.getDictionaryName());
mTradeList = null;
mTvTrade.setText("");
mSelTradeId = "";
}).setTitleText("请选择")
.setCancelColor(Color.parseColor("#1189FF"))
.setSubmitColor(Color.parseColor("#1189FF"))
@ -578,6 +656,10 @@ public class EnterCompanyInfoActivity extends BaseActivity {
submitBean.setArea3(mSelArea3Id);
submitBean.setIsLogOff(mSelLogOff);
submitBean.setIndustryType(mSelTrade1);
submitBean.setNature(mSelNatureId);
submitBean.setClassify(mSelSoltId);
code = mEtCompanyCode.getText().toString().trim();
if (!TextUtils.isEmpty(code)) {
submitBean.setBussinessRegNum(code);
@ -603,16 +685,22 @@ public class EnterCompanyInfoActivity extends BaseActivity {
.doSaveCompanyInfo(body, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<SuccessBean>() {
.subscribe(new Observer<BaseUserBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(SuccessBean successBean) {
public void onNext(BaseUserBean successBean) {
progressDialog.dismiss();
ToastUtils.showShort("录入成功");
//TODO 跳转检查页面
Intent intent = new Intent(mActivity, CatalogActivity.class);
intent.putExtra("nId", submitBean.getNature());//
intent.putExtra("cId", successBean.getData());//企业ID
intent.putExtra("name", submitBean.getName());//企业名称
startActivity(intent);
finish();
}
@ -636,6 +724,11 @@ public class EnterCompanyInfoActivity extends BaseActivity {
ToastUtils.showShort("请输入企业名称");
return false;
}
companP = mEtCompanyP.getText().toString().trim();
if (TextUtils.isEmpty(companP)) {
ToastUtils.showShort("请输入企业法人");
return false;
}
// code = mEtCompanyCode.getText().toString().trim();
// if (TextUtils.isEmpty(code)) {
// ToastUtils.showShort("请输入组织机构代码");
@ -646,16 +739,43 @@ public class EnterCompanyInfoActivity extends BaseActivity {
ToastUtils.showShort("请输入营业范围");
return false;
}
companP = mEtCompanyP.getText().toString().trim();
if (TextUtils.isEmpty(companP)) {
ToastUtils.showShort("请输入企业法人");
if (TextUtils.isEmpty(mSelTypeId)) {
ToastUtils.showShort("请选择企业类型");
return false;
}
if (TextUtils.isEmpty(mSelArea1Id)) {
ToastUtils.showShort("请选择企业所属省、自治区");
return false;
}
if (TextUtils.isEmpty(mSelArea2Id)) {
ToastUtils.showShort("请选择企业所属市");
return false;
}
if (TextUtils.isEmpty(mSelArea3Id)) {
ToastUtils.showShort("请选择企业所属旗县、区");
return false;
}
detailAddress = mEtDetailAddress.getText().toString().trim();
if (TextUtils.isEmpty(detailAddress)) {
ToastUtils.showShort("请输入企业详细地址");
return false;
}
if (TextUtils.isEmpty(mSelTrade1)) {
ToastUtils.showShort("请选择企业所属行业");
return false;
}
if (TextUtils.isEmpty(mSelNatureId)) {
ToastUtils.showShort("请选择场所性质");
return false;
}
if (TextUtils.isEmpty(mSelSoltId)) {
ToastUtils.showShort("请选择企业分类");
return false;
}
praceNum = mEtPeoCount.getText().toString().trim();
if (TextUtils.isEmpty(praceNum)) {
ToastUtils.showShort("请输入从业人员数量");
@ -671,38 +791,22 @@ public class EnterCompanyInfoActivity extends BaseActivity {
ToastUtils.showShort("请输入合法的联系电话");
return false;
}
if (TextUtils.isEmpty(mSelTypeId)) {
ToastUtils.showShort("请选择企业类型");
return false;
}
if (TextUtils.isEmpty(mSelTrade1)) {
ToastUtils.showShort("请选择企业所属行业");
return false;
}
if (TextUtils.isEmpty(mTraitId)) {
ToastUtils.showShort("请选择企业风险特点");
return false;
}
if (TextUtils.isEmpty(mSelArea1Id)) {
ToastUtils.showShort("请选择企业所属省、自治区");
return false;
}
if (TextUtils.isEmpty(mSelArea2Id)) {
ToastUtils.showShort("请选择企业所属市");
return false;
}
if (TextUtils.isEmpty(mSelArea3Id)) {
ToastUtils.showShort("请选择企业所属旗县、区");
return false;
}
if (TextUtils.isEmpty(mDoorPhotoIds)) {
ToastUtils.showShort("请上传企业大门照片");
ToastUtils.showShort("请上传生产单位经营外貌照片");
return false;
}
if (TextUtils.isEmpty(mPlacePhotoIds)) {
ToastUtils.showShort("请上传企业主要场所");
ToastUtils.showShort("请上传企业主要场所照片");
return false;
}
return true;
}
@ -763,6 +867,14 @@ public class EnterCompanyInfoActivity extends BaseActivity {
mTradeList1 = dictBeans;
onShowTrade1Picker();
break;
case 10://场所性质
mNatureList = dictBeans;
onShowNaturePicker();
break;
case 11://企业分类
mSoltList = dictBeans;
onShowSortPicker();
break;
}
}
@ -1043,4 +1155,5 @@ public class EnterCompanyInfoActivity extends BaseActivity {
super.onDestroy();
mBind.unbind();
}
}

View File

@ -94,9 +94,9 @@ public class MineCompanyLibActivity extends BaseActivity {
refreshView(STATE_LOAD_SUCCESS);
mTvBaseTitle.setText("我的企业");
mBind = ButterKnife.bind(this);
// mTvPublish.setVisibility(View.VISIBLE);
// mTvPublish.setText("录入");
// mTvPublish.setOnClickListener(v -> startActivity(new Intent(this, EnterCompanyInfoActivity.class)));
mTvPublish.setVisibility(View.VISIBLE);
mTvPublish.setText("录入");
mTvPublish.setOnClickListener(v -> startActivity(new Intent(this, EnterCompanyInfoActivity.class)));
mAdapter = new CompanyLibAdapter(mActivity, mDatas);
mAdapter.addOnBindListener((type, bean, index) -> {
if (type == 1) {

View File

@ -45,6 +45,7 @@ import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.NewOptions;
import com.sucstepsoft.txrealtimelocation.activitys.issue.demo.NewOptionsAdapter;
import com.sucstepsoft.txrealtimelocation.adapters.CounterLeftCatalogAdapter;
import com.sucstepsoft.txrealtimelocation.beans.BaseUserBean;
import com.sucstepsoft.txrealtimelocation.beans.CompanyDetailBean;
import com.sucstepsoft.txrealtimelocation.beans.CounterCatalogBean;
import com.sucstepsoft.txrealtimelocation.beans.CounterCheckOptionsBean;
import com.sucstepsoft.txrealtimelocation.beans.OptionsSubmitBean;
@ -86,6 +87,8 @@ public class NewCounterCheckOptionsActivity extends BaseActivity {
Button mBtnUnClaim;
@BindView(R.id.tv_name)
TextView mTvName;
@BindView(R.id.tv_peo)
TextView mTvP;
private List<CounterCatalogBean> mDatas = new ArrayList<>();
private List<NewOptions> mCurrentOptions = new ArrayList<>();
private CounterLeftCatalogAdapter mLeftAdapter;
@ -113,6 +116,7 @@ public class NewCounterCheckOptionsActivity extends BaseActivity {
private LocationClient mLocationClient;
private boolean isExist = false;//是否存在选择的错误项,用来弹出整改选项 dialog
private String mCheckId = "";
private CounterCatalogBean mCurrentCatalogBean;
@Override
protected int setLayoutId() {
@ -138,6 +142,7 @@ public class NewCounterCheckOptionsActivity extends BaseActivity {
initListView();
getCounterCheckOptions(mCheckId);
startListenerLocation();
getCompanyDetail(mCompanyId);
mBtnUnClaim.setOnClickListener(v -> doUnclaim());
}
@ -172,6 +177,41 @@ public class NewCounterCheckOptionsActivity extends BaseActivity {
return isComplete;
}
private void getCompanyDetail(String companyId) {
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getCompanyDetail(companyId, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<CompanyDetailBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(CompanyDetailBean companyDetailBean) {
if (companyDetailBean != null) {
if (TextUtils.isEmpty(companyDetailBean.getLegalPerson())) {
mTvP.setText("未录入");
} else {
mTvP.setText(companyDetailBean.getLegalPerson());
}
}
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
});
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == RESULT_OK) {
@ -294,7 +334,6 @@ public class NewCounterCheckOptionsActivity extends BaseActivity {
/**
* 构建提交数据
* TODO 提交需要parentId
*/
private void buildConfirmData(List<CounterCatalogBean> cBean) {
if (checkConfirmParams(cBean)) {
@ -425,7 +464,13 @@ public class NewCounterCheckOptionsActivity extends BaseActivity {
mRlvChild.setLayoutManager(rightManager);
mRlvChild.setAdapter(mRightAdapter);
mRightAdapter.setStateChangeListener(isCheck -> {
if (!isCheck) {
//全部选择了
mCurrentCatalogBean.setAllCheck(true);
mLeftAdapter.notifyDataSetChanged();
}
});
mRightAdapter.addSelectPhotoListener((bean, options, i, type, stat) -> {
mCurrentOptionsBean = options;
mSelPhotosType = stat;
@ -463,7 +508,8 @@ public class NewCounterCheckOptionsActivity extends BaseActivity {
mRlvCatalog.setLayoutManager(manager);
mRlvCatalog.setAdapter(mLeftAdapter);
mLeftAdapter.addNotifyChildChangeListener(child -> {
mLeftAdapter.addNotifyChildChangeListener((child, bean) -> {
mCurrentCatalogBean = bean;
if (child != null && child.size() > 0) {
mRlvChild.setVisibility(View.VISIBLE);
mTvEmptyHint.setVisibility(View.GONE);
@ -483,9 +529,10 @@ public class NewCounterCheckOptionsActivity extends BaseActivity {
mTermStrings = mActivity.getResources().getStringArray(R.array.timeLimit);
mTermAdapter = new ArrayAdapter<>(mActivity, R.layout.item_pop_text, mTermStrings);
mNowAdapter = new ArrayAdapter<>(mActivity, R.layout.item_pop_text, mNowStrings);
Button mBtnConfirm = contentView.findViewById(R.id.btn_confirm);
Button mBtnCancel = contentView.findViewById(R.id.btn_cancel);
RadioGroup mRgTerm = contentView.findViewById(R.id.rg_term);
AppCompatSpinner mSpTerm = contentView.findViewById(R.id.sp_term);
// RecyclerView mRlvPhotos = contentView.findViewById(R.id.rlv_photos);
mSpTerm.setAdapter(mNowAdapter);
mSpTerm.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
@ -517,11 +564,6 @@ public class NewCounterCheckOptionsActivity extends BaseActivity {
});
mType = 1;
break;
case R.id.rb_coor:
//不配合
mSpTerm.setVisibility(View.GONE);
mType = 3;
break;
case R.id.rb_term:
//限期整改
mType = 2;
@ -568,9 +610,12 @@ public class NewCounterCheckOptionsActivity extends BaseActivity {
// });
builder.setView(contentView);
builder.setPositiveButton("取消", (dialog, which) -> {
mSelTypeDialog = 0;
}).setNegativeButton("确定", (dialog, which) -> {
builder.setCancelable(false);
AlertDialog alertDialog = builder.create();
alertDialog.setCanceledOnTouchOutside(false);
alertDialog.show();
mBtnConfirm.setOnClickListener(v -> {
alertDialog.dismiss();
mMProgressDialog = new ProgressDialog(mActivity);
mMProgressDialog.setMessage("上报中...");
mMProgressDialog.setCancelable(false);
@ -589,18 +634,14 @@ public class NewCounterCheckOptionsActivity extends BaseActivity {
String strDay = mSelType.substring(0, mSelType.lastIndexOf(""));
submitBean.setRectificationDays(Integer.parseInt(strDay));
}
// if (!TextUtils.isEmpty(mPhotoIds)) {
// submitBean.setScenePhotos(mPhotoIds);
// }
submitBean.setCheckLat(mCurrentLatitude + "");
submitBean.setCheckLng(mCurrentLongitude + "");
doSubmit(submitBean);
}).setCancelable(false)
.setTitle("整改选项")
.setIcon(R.drawable.ic_hint_dialog);
AlertDialog alertDialog = builder.create();
alertDialog.setCanceledOnTouchOutside(false);
alertDialog.show();
});
mBtnCancel.setOnClickListener(v -> {
alertDialog.dismiss();
mSelTypeDialog = 0;
});
}
private void getCounterCheckOptions(String checkId) {
@ -694,6 +735,8 @@ public class NewCounterCheckOptionsActivity extends BaseActivity {
bean.setTypeByCheckItemId(checkOptionsbean.getType());
bean.setIcon(checkOptionsbean.getIcon());
bean.setSelIcon(checkOptionsbean.getIconPress());
bean.setAllCheck(false);
bean.setCheck(false);
mDatas.add(bean);
}
}
@ -766,6 +809,7 @@ public class NewCounterCheckOptionsActivity extends BaseActivity {
}
mLeftAdapter.setData(mDatas);
mCurrentOptions = mDatas.get(0).getOptions();
mCurrentCatalogBean = mDatas.get(0);
if (mCurrentOptions != null && mCurrentOptions.size() > 0) {
mRlvChild.setVisibility(View.VISIBLE);
mTvEmptyHint.setVisibility(View.GONE);

View File

@ -15,6 +15,7 @@ import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
import com.sucstepsoft.cm_utils.core.widget.base.BaseShowPhotoAdapter;
import com.sucstepsoft.cm_utils.utils.LogUtils;
import com.sucstepsoft.cm_utils.utils.ToastUtils;
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
import com.sucstepsoft.txrealtimelocation.R;
import com.sucstepsoft.txrealtimelocation.activitys.common.PhotoActivity;
@ -23,6 +24,7 @@ import com.sucstepsoft.txrealtimelocation.adapters.HistoryLeftCatalogAdapter;
import com.sucstepsoft.txrealtimelocation.adapters.LeftCatalogAdapter;
import com.sucstepsoft.txrealtimelocation.adapters.MissionDetailAdapter;
import com.sucstepsoft.txrealtimelocation.beans.CatalogBean;
import com.sucstepsoft.txrealtimelocation.beans.CompanyDetailBean;
import com.sucstepsoft.txrealtimelocation.beans.HistoryCatalogBean;
import com.sucstepsoft.txrealtimelocation.beans.HistoryDetialBean;
import com.sucstepsoft.txrealtimelocation.net.LocationApiService;
@ -49,6 +51,8 @@ public class HistoryDetialActivity extends BaseActivity {
TextView mTvType;
@BindView(R.id.ll_type)
LinearLayout mLlType;
@BindView(R.id.tv_peo)
TextView mTvP;
private Unbinder mBind;
private List<HistoryCatalogBean.ItemBean> mRightDatas = new ArrayList<>();
private Disposable mDis;
@ -67,9 +71,10 @@ public class HistoryDetialActivity extends BaseActivity {
mTvBaseTitle.setText("详情");
refreshView(STATE_LOAD_LOADING);
String cId = getIntent().getStringExtra("cId");
String enterpriseId = getIntent().getStringExtra("enterpriseId");
getDetail(cId);
mCatalogBeans = new ArrayList<>();
getCompanyDetail(enterpriseId);
LinearLayoutManager leftManager = new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false);
LinearLayoutManager rightManager = new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false);
@ -94,6 +99,41 @@ public class HistoryDetialActivity extends BaseActivity {
});
}
private void getCompanyDetail(String companyId) {
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getCompanyDetail(companyId, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<CompanyDetailBean>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(CompanyDetailBean companyDetailBean) {
if (companyDetailBean != null) {
if (TextUtils.isEmpty(companyDetailBean.getLegalPerson())) {
mTvP.setText("未录入");
} else {
mTvP.setText(companyDetailBean.getLegalPerson());
}
}
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
});
}
private void getDetail(String cid) {
RetrofitManager.getInstance()
.create(LocationApiService.class)
@ -111,27 +151,28 @@ public class HistoryDetialActivity extends BaseActivity {
if (beans != null) {
refreshView(STATE_LOAD_SUCCESS);
mTvName.setText(beans.getNameJoinByEnterpriseId());
if (beans.getIsComplete() == 0) {
if (beans.getRectificationType() == 1) {
mLlType.setVisibility(View.VISIBLE);
if (beans.getImmediatelyChangeType() == 1) {
mTvType.setText("当场整改");
} else {
mTvType.setText("当天整改");
}
} else if (beans.getRectificationType() == 2) {
mLlType.setVisibility(View.VISIBLE);
mTvType.setText(beans.getRectificationDays() + "天内整改");
// if (beans.getIsComplete() == 0) {
if (beans.getRectificationType() == 1) {
mLlType.setVisibility(View.VISIBLE);
if (beans.getImmediatelyChangeType() == 1) {
mTvType.setText("当场整改");
} else {
mLlType.setVisibility(View.GONE);
mTvType.setText("当天整改");
}
} else if (beans.getRectificationType() == 2) {
mLlType.setVisibility(View.VISIBLE);
mTvType.setText(beans.getRectificationDays() + "天内整改");
} else {
mLlType.setVisibility(View.GONE);
}
// } else {
// mLlType.setVisibility(View.VISIBLE);
// }
if (beans.getCheckItems() != null && beans.getCheckItems().size() > 0) {
mRlvCataLog.setVisibility(View.VISIBLE);
buildDetailListData(beans.getCheckItems());
} else {
ToastUtils.showShort("本次检查不存在合格项");
mRlvCataLog.setVisibility(View.GONE);
}
} else {
@ -168,6 +209,7 @@ public class HistoryDetialActivity extends BaseActivity {
for (int i = 0; i < mCatalogBeans.size(); i++) {
HistoryCatalogBean cBean = mCatalogBeans.get(i);
List<HistoryCatalogBean.ItemBean> items = new ArrayList<>();
boolean isCheck = false;
for (int j = 0; j < checkItems.size(); j++) {
if (cBean.getItemId().equals(checkItems.get(j).getCheckItemParentId())) {
HistoryCatalogBean.ItemBean itemBean = new HistoryCatalogBean.ItemBean();
@ -183,6 +225,7 @@ public class HistoryDetialActivity extends BaseActivity {
child.setUnitJoinByCheckItemId(hiddenDangerReportsBean.getUnitJoinByCheckItemId());
child.setNameJoinByCheckItemId(hiddenDangerReportsBean.getNameJoinByCheckItemId());
child.setCheckItemType(hiddenDangerReportsBean.getCheckItemType());
child.setIsWrongJoinByCheckItemId(hiddenDangerReportsBean.getIsWrongJoinByCheckItemId());
childs.add(child);
}
itemBean.setChild(childs);
@ -200,6 +243,7 @@ public class HistoryDetialActivity extends BaseActivity {
child.setCheckResult(hiddenDangerReportsBean.getCheckResult());
child.setUnitJoinByCheckItemId(hiddenDangerReportsBean.getUnitJoinByCheckItemId());
child.setNameJoinByCheckItemId(hiddenDangerReportsBean.getNameJoinByCheckItemId());
child.setIsWrongJoinByCheckItemId(hiddenDangerReportsBean.getIsWrongJoinByCheckItemId());
child.setCheckItemType(hiddenDangerReportsBean.getCheckItemType());
childs.add(child);
}
@ -209,6 +253,17 @@ public class HistoryDetialActivity extends BaseActivity {
}
}
for (int j = 0; j < items.size(); j++) {
HistoryCatalogBean.ItemBean itemBean = items.get(j);
for (int k = 0; k < itemBean.getChild().size(); k++) {
HistoryCatalogBean.ItemBeanChild child = itemBean.getChild().get(k);
if (child.getIsWrongJoinByCheckItemId() == 1) {
isCheck = true;
break;
}
}
}
cBean.setCheck(isCheck);
cBean.setOptions(items);
}
mRightDatas = mCatalogBeans.get(0).getOptions();

View File

@ -195,13 +195,20 @@ public class HistoryListActivity extends BaseActivity {
}
private void showDetail(CounterCheckListBean.RowsBean rowsBean) {
Intent intent = new Intent(mActivity, HistoryDetialActivity.class);
intent.putExtra("id", rowsBean.getIndustryJoinByEnterpriseId());
intent.putExtra("cId", rowsBean.getCheckId());
intent.putExtra("name", rowsBean.getNameJoinByEnterpriseId());
intent.putExtra("peo", rowsBean.getMasterJoinByEnterpriseId());
intent.putExtra("phone", rowsBean.getPhoneJoinByEnterpriseId());
startActivity(intent);
if (rowsBean.getIsCoordination() == 0) {
//不配合
ToastUtils.showShort("该企业不配合检查,已由上级单位处理");
} else {
Intent intent = new Intent(mActivity, HistoryDetialActivity.class);
intent.putExtra("id", rowsBean.getIndustryJoinByEnterpriseId());
intent.putExtra("enterpriseId", rowsBean.getEnterpriseId());
intent.putExtra("cId", rowsBean.getCheckId());
intent.putExtra("name", rowsBean.getNameJoinByEnterpriseId());
intent.putExtra("peo", rowsBean.getMasterJoinByEnterpriseId());
intent.putExtra("phone", rowsBean.getPhoneJoinByEnterpriseId());
startActivity(intent);
}
}
/**
@ -488,7 +495,7 @@ public class HistoryListActivity extends BaseActivity {
mMProgressDialog.show();
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getMineCheckListByAllByMouth(currentPage + "", mSearchCompanyName, mCompanyType, mMouth,"1", UserLgUtils.getToken())
.getMineCheckListByAllByMouth(currentPage + "", mSearchCompanyName, mCompanyType, mMouth, "1", UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<CounterCheckListBean>() {

View File

@ -89,17 +89,17 @@ public class PublicAreaActivity extends BaseActivity {
mXlvPublicList.setLayoutManager(manager);
mXlvPublicList.setAdapter(mAdapter);
mAdapter.addOnItemClickListener(rowsBean -> {
if (rowsBean.getCheckType() == 3) {
Intent intent = new Intent();
intent.setClass(mActivity, PublicDetailActivity.class);
intent.putExtra("id", rowsBean.getPublicAreaReportId());
startActivity(intent);
} else {
Intent intent = new Intent();
intent.setClass(mActivity, PublicCallBackActivity.class);
intent.putExtra("id", rowsBean.getPublicAreaReportId());
startActivityForResult(intent, 222);
}
// if (rowsBean.getCheckType() == 3) {
Intent intent = new Intent();
intent.setClass(mActivity, PublicDetailActivity.class);
intent.putExtra("id", rowsBean.getPublicAreaReportId());
startActivity(intent);
// } else {
// Intent intent = new Intent();
// intent.setClass(mActivity, PublicCallBackActivity.class);
// intent.putExtra("id", rowsBean.getPublicAreaReportId());
// startActivityForResult(intent, 222);
// }
});
mXlvPublicList.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override

View File

@ -2,7 +2,9 @@ package com.sucstepsoft.txrealtimelocation.activitys.issue;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.AppBarLayout;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.view.View;
@ -17,6 +19,8 @@ import com.sucstepsoft.cm_utils.utils.ToastUtils;
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
import com.sucstepsoft.txrealtimelocation.R;
import com.sucstepsoft.txrealtimelocation.activitys.common.PhotoActivity;
import com.sucstepsoft.txrealtimelocation.adapters.PublicLogAdapter;
import com.sucstepsoft.txrealtimelocation.beans.PublicLogBean;
import com.sucstepsoft.txrealtimelocation.beans.PublicTroubleListBean;
import com.sucstepsoft.txrealtimelocation.net.LocationApiService;
@ -41,13 +45,11 @@ public class PublicDetailActivity extends BaseActivity {
TextView mTvCContent;
@BindView(R.id.rlv_c_photos)
RecyclerView mRlvCPhotos;
@BindView(R.id.tv_re_date)
TextView mTvReDate;
@BindView(R.id.tv_re_content)
TextView mTvReContent;
@BindView(R.id.rlv_re_photos)
RecyclerView mRlvRePhotos;
@BindView(R.id.rlv_log)
RecyclerView mRlvLog;
private List<PublicLogBean> mLogDatas;
private Unbinder mBind;
private PublicLogAdapter mLogAdapter;
@Override
protected int setLayoutId() {
@ -102,11 +104,18 @@ public class PublicDetailActivity extends BaseActivity {
}
private void setDataToView(PublicTroubleListBean.RowsBean successBean) {
mLogDatas = new ArrayList<>();
mLogAdapter = new PublicLogAdapter(mActivity, mLogDatas);
mRlvLog.setLayoutManager(new LinearLayoutManager(mActivity) {
@Override
public boolean canScrollVertically() {
return false;
}
});
mRlvLog.setAdapter(mLogAdapter);
mTvAddress.setText(successBean.getCheckAddress());
mTvCContent.setText(successBean.getCheckContent());
mTvCDate.setText(successBean.getCheckDate());
mTvReDate.setText(successBean.getRecheckDate());
mTvReContent.setText(successBean.getRecheckContent());
if (!TextUtils.isEmpty(successBean.getCheckPhotos())) {
mRlvCPhotos.setVisibility(View.VISIBLE);
List<String> photos = new ArrayList<>();
@ -133,33 +142,40 @@ public class PublicDetailActivity extends BaseActivity {
} else {
mRlvCPhotos.setVisibility(View.GONE);
}
if (!TextUtils.isEmpty(successBean.getRecheckPhotos())) {
mRlvRePhotos.setVisibility(View.VISIBLE);
List<String> photos = new ArrayList<>();
String[] split = successBean.getRecheckPhotos().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) {
@Override
public boolean canScrollVertically() {
return false;
}
};
mRlvRePhotos.setLayoutManager(manager);
mRlvRePhotos.setAdapter(adapter);
adapter.addOnItemClickListener(url -> {
Intent intent = new Intent(mActivity, PhotoActivity.class);
intent.putExtra("imgUrls", new ArrayList<>(adapter.getData()));
startActivity(intent);
});
} else {
mRlvRePhotos.setVisibility(View.GONE);
}
refreshView(STATE_LOAD_SUCCESS);
getLogListById(successBean.getPublicAreaReportId());
}
private void getLogListById(String publicAreaReportId) {
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getPublicTroubleLogList(publicAreaReportId, UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<List<PublicLogBean>>() {
@Override
public void onSubscribe(Disposable d) {
}
@Override
public void onNext(List<PublicLogBean> publicLogBeans) {
if (publicLogBeans != null && publicLogBeans.size() > 0) {
mLogDatas = publicLogBeans;
mLogAdapter.setData(mLogDatas);
}
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
});
}
@Override

View File

@ -0,0 +1,97 @@
package com.sucstepsoft.txrealtimelocation.activitys.issue;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.View;
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
import com.sucstepsoft.cm_utils.core.widget.xtablayout.XTabLayout;
import com.sucstepsoft.txrealtimelocation.R;
import com.sucstepsoft.txrealtimelocation.fragments.issue.PendingFragment;
import com.sucstepsoft.txrealtimelocation.fragments.issue.PublicCaseFragment;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
public class PublicMainActivity extends BaseActivity {
@BindView(R.id.xtl_tabs)
XTabLayout mTablayout;
@BindView(R.id.vp_content)
ViewPager mVpContent;
private Unbinder mBind;
private String[] mTitles = new String[]{"待下派", "待处理", "待检查", "待结案", "已归档"};
private List<Fragment> mFragments = new ArrayList<>();
@Override
protected int setLayoutId() {
return R.layout.activity_public_main;
}
@Override
public void initData() {
super.initData();
mBind = ButterKnife.bind(this);
refreshView(STATE_LOAD_SUCCESS);
mTvBaseTitle.setText("公告区域");
mTvPublish.setVisibility(View.VISIBLE);
mTvPublish.setText("上报");
mTvPublish.setOnClickListener(v -> startActivityForResult(new Intent(mActivity, PublicReportActivity.class), 222));
for (int i = 0; i < mTitles.length; i++) {
PublicCaseFragment fragment = new PublicCaseFragment();
Bundle bundle = new Bundle();
bundle.putString("title", mTitles[i]);
fragment.setArguments(bundle);
mFragments.add(fragment);
}
VpRecordAdapter adapter = new VpRecordAdapter(getSupportFragmentManager());
mVpContent.setAdapter(adapter);
mTablayout.setxTabDisplayNum(4);
mTablayout.setupWithViewPager(mVpContent);
}
private class VpRecordAdapter extends FragmentStatePagerAdapter {
public VpRecordAdapter(FragmentManager fm) {
super(fm);
}
@Override
public Fragment getItem(int i) {
return mFragments.get(i);
}
@Override
public int getCount() {
if (mFragments != null) {
return mFragments.size();
} else {
return 0;
}
}
@Nullable
@Override
public CharSequence getPageTitle(int position) {
return mTitles[position];
}
}
@Override
protected void onDestroy() {
mFragments = null;
if (mBind != null) {
mBind.unbind();
}
super.onDestroy();
}
}

View File

@ -14,6 +14,8 @@ import android.text.TextUtils;
import android.view.Gravity;
import android.view.View;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import com.baidu.location.BDAbstractLocationListener;
@ -35,7 +37,6 @@ 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.base.CatalogActivity;
import com.sucstepsoft.txrealtimelocation.activitys.common.PhotoActivity;
import com.sucstepsoft.txrealtimelocation.beans.BaseUserBean;
import com.sucstepsoft.txrealtimelocation.beans.PublicCheckSubmitBean;
@ -70,6 +71,12 @@ public class PublicReportActivity extends BaseActivity {
EditText mEtPeoCount;
@BindView(R.id.rlv_photos)
RecyclerView mRlvPhotos;
@BindView(R.id.rb_mine)
RadioButton mRbMine;
@BindView(R.id.rb_can_not)
RadioButton mRbCanNot;
@BindView(R.id.rg_dispose)
RadioGroup mRgDispose;
/**
* 公共区域隐患上报
*/
@ -85,6 +92,7 @@ public class PublicReportActivity extends BaseActivity {
private AddPhotoBean mCurrentBean;
private String mPicPath;
private long mSelDate = 0L;
private int mCheckType = 1;//1-自处理 2-无法处理
@Override
protected int setLayoutId() {
@ -125,7 +133,13 @@ public class PublicReportActivity extends BaseActivity {
startActivity(intent);
}
});
mRgDispose.setOnCheckedChangeListener((group, checkedId) -> {
if (checkedId == R.id.rb_mine) {
mCheckType = 1;
} else {
mCheckType = 2;
}
});
}
/**
@ -218,9 +232,10 @@ public class PublicReportActivity extends BaseActivity {
submitBean.setCheckAddress(location);
submitBean.setCheckContent(content);
submitBean.setCheckDate(date);
submitBean.setCheckType(1);
submitBean.setCheckType(mCheckType);
submitBean.setCheckLat(mCurrentLatitude + "");
submitBean.setCheckLng(mCurrentLongitude + "");
submitBean.setCheckUserName("");
if (!TextUtils.isEmpty(mPhotoIds)) {
submitBean.setCheckPhotos(mPhotoIds);
}
@ -421,6 +436,7 @@ public class PublicReportActivity extends BaseActivity {
mLocationClient.start();
}
/**
* 实现定位回调
*/

View File

@ -1,6 +1,7 @@
package com.sucstepsoft.txrealtimelocation.activitys.issue.demo;
import android.content.Context;
import android.graphics.Color;
import android.graphics.Typeface;
import android.provider.MediaStore;
import android.support.design.widget.AppBarLayout;
@ -81,6 +82,11 @@ public class NewOptionsAdapter extends BaseRecyclerAdapter<NewOptions, NewOption
RadioButton button = new RadioButton(mContext);
button.setId(bean.getId());
button.setChecked(bean.isCheck());
if (bean.isWrong()) {
button.setTextColor(Color.RED);
} else {
button.setTextColor(Color.BLACK);
}
button.setText(bean.getTitle());
button.setPadding(dp2px, dp2px, dp2px, dp2px);
button.setTextSize(sp2px);
@ -174,6 +180,7 @@ public class NewOptionsAdapter extends BaseRecyclerAdapter<NewOptions, NewOption
mData.get(i).getChild().get(j).setCheck(false);
}
}
notifyDataChange();
});
// oHolder.mRgState.setOnCheckedChangeListener((radioGroup, i1) -> {
//
@ -224,12 +231,9 @@ public class NewOptionsAdapter extends BaseRecyclerAdapter<NewOptions, NewOption
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;
}
if (mData.get(i).getState() == EmStateCheck.NORMAL) {
isUnCheck = true;
break;
}
}
if (mChangeListener != null) {

View File

@ -19,6 +19,7 @@ import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Base64;
import android.view.Gravity;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
@ -132,44 +133,45 @@ public class UserActivity extends BaseActivity {
mTvCacheNum.setText(dirSize);
mTvVersionNum.setText("v " + AppUtils.getAppVersionName());
mTvUserName.setText(UserLgUtils.getName());
String loginInfo = UserLgUtils.getLoginInfo();
if (!TextUtils.isEmpty(loginInfo)) {
Gson mGson = new Gson();
AppTokenUser appTokenUser = mGson.fromJson(loginInfo, AppTokenUser.class);
String type = "片长";
if (appTokenUser.getRoles() != null && appTokenUser.getRoles().size() > 0) {
for (int i = 0; i < appTokenUser.getRoles().size(); i++) {
if (PathConfig.USER_TYPE_N.equals(appTokenUser.getRoles().get(i).getRoleId())) {
type = "N员";
break;
}
}
}
mTvDepart.setText(type);
} else {
mTvDepart.setText("管理员");
}
mTvDepart.setVisibility(View.GONE);
// String loginInfo = UserLgUtils.getLoginInfo();
// if (!TextUtils.isEmpty(loginInfo)) {
// Gson mGson = new Gson();
// AppTokenUser appTokenUser = mGson.fromJson(loginInfo, AppTokenUser.class);
// String type = "片长";
// if (appTokenUser.getRoles() != null && appTokenUser.getRoles().size() > 0) {
// for (int i = 0; i < appTokenUser.getRoles().size(); i++) {
// if (PathConfig.USER_TYPE_N.equals(appTokenUser.getRoles().get(i).getRoleId())) {
// type = "N员";
// break;
// }
// }
// }
// mTvDepart.setText(type);
// } else {
// mTvDepart.setText("管理员");
// }
Glide.with(mActivity)
.load(BaseUrlApi.BASE_IMG_URL + UserLgUtils.getAvatar())
.apply(RequestOptions.bitmapTransform(new CircleCrop())
.error(R.drawable.ic_user_default)
.placeholder(R.drawable.ic_user_default))
.into(mIvUserIcon);
String isHolday = GlobalProvider.getString(mActivity, "isHolday");
if (!TextUtils.isEmpty(isHolday)) {
if ("1".equals(isHolday)) {
mSwMode.setChecked(true);
} else {
mSwMode.setChecked(false);
}
}
mSwMode.setOnCheckedChangeListener((buttonView, isChecked) -> {
if (isChecked) {
GlobalProvider.save(mActivity, "isHolday", "1");
} else {
GlobalProvider.save(mActivity, "isHolday", "0");
}
});
// String isHolday = GlobalProvider.getString(mActivity, "isHolday");
// if (!TextUtils.isEmpty(isHolday)) {
// if ("1".equals(isHolday)) {
// mSwMode.setChecked(true);
// } else {
// mSwMode.setChecked(false);
// }
// }
// mSwMode.setOnCheckedChangeListener((buttonView, isChecked) -> {
// if (isChecked) {
// GlobalProvider.save(mActivity, "isHolday", "1");
// } else {
// GlobalProvider.save(mActivity, "isHolday", "0");
// }
// })
}
/**
@ -260,12 +262,7 @@ public class UserActivity extends BaseActivity {
showToast("图片路径错误.");
return;
}
int[] imageWidthHeight = getImageWidthHeight(picPath);
if (imageWidthHeight[0] > 413 || imageWidthHeight[1] > 626) {
ToastUtils.showShort("图片宽度必须小于等于413像素,高度必须小于626像素");
} else {
doUploaddImg(picPath);
}
doUploaddImg(picPath);
}
private void doUploaddImg(String picPath) {

View File

@ -1,16 +1,13 @@
package com.sucstepsoft.txrealtimelocation.activitys.mine;
import android.Manifest;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.pm.PackageManager;
import android.graphics.Color;
import android.support.v4.app.ActivityCompat;
import android.telephony.TelephonyManager;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Base64;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
@ -25,6 +22,7 @@ import com.sucstepsoft.cm_utils.utils.AppUtils;
import com.sucstepsoft.cm_utils.utils.EncryptUtils;
import com.sucstepsoft.cm_utils.utils.FileIOUtils;
import com.sucstepsoft.cm_utils.utils.LogUtils;
import com.sucstepsoft.cm_utils.utils.RegexUtils;
import com.sucstepsoft.cm_utils.utils.ToastUtils;
import com.sucstepsoft.cm_utils.utils.UIUtil;
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
@ -52,6 +50,7 @@ import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
import okhttp3.MediaType;
import okhttp3.RequestBody;
/**
@ -72,6 +71,12 @@ public class UserInfoActivity extends BaseActivity {
EditText mEtUserEmail;
@BindView(R.id.btn_submit)
Button mBtnSubmit;
@BindView(R.id.iv_clear_orig)
ImageView mIvClearOrig;
@BindView(R.id.iv_clear_phone)
ImageView mIvClearPhone;
@BindView(R.id.iv_clear_email)
ImageView mIvClearEmail;
private Unbinder mBind;
private TimePickerView mTimePickerView;
private SimpleDateFormat mDateFormat = new SimpleDateFormat("yyyy年MM月dd日");
@ -105,7 +110,12 @@ public class UserInfoActivity extends BaseActivity {
if (!TextUtils.isEmpty(UserLgUtils.getEmail())) {
mEtUserEmail.setText(UserLgUtils.getEmail());
}
mIvClearEmail.setOnClickListener(v -> mEtUserEmail.setText(""));
mIvClearOrig.setOnClickListener(v -> mEtUserName.setText(""));
mIvClearPhone.setOnClickListener(v -> mEtUserPhone.setText(""));
mBtnSubmit.setOnClickListener(v -> doSubmit());
setEditTextInhibitInputSpeChat(mEtUserEmail);
setEditTextInhibitInputSpeChat(mEtUserName);
setEditTextInhibitInputSpeChat(mEtUserPhone);
@ -116,6 +126,7 @@ public class UserInfoActivity extends BaseActivity {
String name = mEtUserName.getText().toString().trim();
String phone = mEtUserPhone.getText().toString().trim();
String email = mEtUserEmail.getText().toString().trim();
ChangeUserInfoBean bean = new ChangeUserInfoBean();
bean.setAvatar(UserLgUtils.getAvatar());
bean.setEmail(email);
@ -123,7 +134,7 @@ public class UserInfoActivity extends BaseActivity {
bean.setName(name);
Gson gson = new Gson();
String obj = gson.toJson(bean);
RequestBody body = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), obj);
RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
ProgressDialog dialog = UIUtil.initDialog(mActivity, "修改中...");
dialog.show();
RetrofitManager.getInstance()
@ -188,7 +199,7 @@ public class UserInfoActivity extends BaseActivity {
info.setDeviceNo(deviceId);
Gson gson = new Gson();
String obj = gson.toJson(info);
RequestBody body = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), obj);
RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
RetrofitManager.getInstance()
.create(LocationApiService.class)
.doLogin(body)
@ -257,10 +268,18 @@ public class UserInfoActivity extends BaseActivity {
ToastUtils.showShort("请输入联系电话");
return false;
}
if (!RegexUtils.isMobileExact(phone)) {
ToastUtils.showShort("电话号码不正确");
return false;
}
if (TextUtils.isEmpty(email)) {
ToastUtils.showShort("请输入联系邮箱");
return false;
}
if (!RegexUtils.isEmail(email)) {
ToastUtils.showShort("邮箱格式不正确");
return false;
}
return true;
}
@ -309,5 +328,4 @@ public class UserInfoActivity extends BaseActivity {
}
super.onDestroy();
}
}

View File

@ -104,10 +104,10 @@ public class NoticeDetailActivity extends BaseActivity {
mTvNoticeGator.setVisibility(View.GONE);
} else {
mTvNoticeGator.setVisibility(View.VISIBLE);
mTvNoticeGator.setText(source);
mTvNoticeGator.setText("来源:" + source);
}
mTvNoticeTime.setText(noticeDetailBean.getPublishDate());
mTvNoticeTime.setText("时间:" + noticeDetailBean.getPublishDate());
content = noticeDetailBean.getContent();
wvContent = new WebView(getApplicationContext());
initWebView();

View File

@ -114,6 +114,9 @@ public class PlanHistoryActivity extends BaseActivity {
@Override
protected void onDestroy() {
if (mDisposable != null && !mDisposable.isDisposed()) {
mDisposable.dispose();
}
if (mBind != null) {
mBind.unbind();
}
@ -136,10 +139,10 @@ public class PlanHistoryActivity extends BaseActivity {
public void onNext(SuccCountBean baseUserBean) {
refreshView(STATE_LOAD_SUCCESS);
if (baseUserBean != null && baseUserBean.getData() != null) {
mTvPlanComplete.setText("本月完成:" + baseUserBean.getData().getCountCheck());
mTvPlanComplete.setText("" + baseUserBean.getData().getCountCheck());
mTvPlanNum.setText("本月计划:" + baseUserBean.getData().getCheckPlanCount());
} else {
mTvPlanComplete.setText("本月完成:0");
mTvPlanComplete.setText("0");
mTvPlanNum.setText("本月计划:0");
}
}

View File

@ -46,8 +46,9 @@ public class CompanyCheckAdapter extends BaseRecyclerAdapter<CompanyListDataBean
holder.mCbCheck.setChecked(false);
}
holder.mTvName.setText(mData.get(i).getNameJoinByEnterpriseId());
holder.mTvAddress.setText("地址:" + mData.get(i).getArea2DictionaryName() + mData.get(i).getArea3DictionaryName() + mData.get(i).getArea4DictionaryName() + mData.get(i).getArea5DictionaryName() + mData.get(i).getAddressJoinByEnterpriseId());
holder.mTvPeo.setText("负责人:" + mData.get(i).getMasterJoinByEnterpriseId());
holder.mTvAddress.setText("地址:" + mData.get(i).getAddressJoinByEnterpriseId());
holder.mTvPeo.setVisibility(View.GONE);
// holder.mTvPeo.setText("负责人:" + mData.get(i).getMasterJoinByEnterpriseId());
}
public String getSelDataId() {

View File

@ -1,6 +1,7 @@
package com.sucstepsoft.txrealtimelocation.adapters;
import android.content.Context;
import android.graphics.Color;
import android.support.v7.widget.GridLayoutManager;
import android.text.Editable;
import android.text.InputType;
@ -61,6 +62,11 @@ public class CounterCheckOptionsAdapter extends BaseRecyclerAdapter<NewOptions,
RadioButton button = new RadioButton(mContext);
button.setId(bean.getId());
button.setText(bean.getTitle());
if (bean.isWrong()) {
button.setTextColor(Color.RED);
} else {
button.setTextColor(Color.BLACK);
}
button.setChecked(bean.isCheck());
button.setPadding(10, 10, 10, 10);
button.setTextSize(15);

View File

@ -47,12 +47,28 @@ public class CounterLeftCatalogAdapter extends BaseRecyclerAdapter<CounterCatalo
mSelectIndex = i;
notifyDataSetChanged();
if (mChildChangeListener != null) {
mChildChangeListener.onChangeChild(mData.get(i).getOptions());
mChildChangeListener.onChangeChild(mData.get(i).getOptions(), mData.get(i));
}
});
leftCatalogHolder.mCbCheck.setVisibility(View.GONE);
if (mData.get(i).isAllCheck()) {
leftCatalogHolder.mIvHint.setVisibility(View.GONE);
} else {
leftCatalogHolder.mIvHint.setVisibility(View.VISIBLE);
}
// leftCatalogHolder.mCbCheck.setOnCheckedChangeListener(null);
// leftCatalogHolder.mCbCheck.setChecked(mData.get(i).isCheck());
// leftCatalogHolder.mCbCheck.setOnCheckedChangeListener((buttonView, isChecked) -> {
// mData.get(i).setCheck(isChecked);
// mData.get(i).setAllCheck(isChecked);
// if (isChecked) {
// leftCatalogHolder.mIvHint.setVisibility(View.GONE);
// } else {
// leftCatalogHolder.mIvHint.setVisibility(View.VISIBLE);
// }
// });
if (mSelectIndex == i) {
leftCatalogHolder.itemView.setBackgroundColor(mContext.getResources().getColor(R.color.sel_blue));
leftCatalogHolder.mRlContent.setBackgroundColor(mContext.getResources().getColor(R.color.sel_blue));
leftCatalogHolder.mTvTitle.setSelected(true);
leftCatalogHolder.mIvArrow.setVisibility(View.VISIBLE);
Glide.with(mContext)
@ -61,7 +77,7 @@ public class CounterLeftCatalogAdapter extends BaseRecyclerAdapter<CounterCatalo
.into(leftCatalogHolder.mIvIcon);
} else {
leftCatalogHolder.mTvTitle.setSelected(false);
leftCatalogHolder.itemView.setBackgroundColor(mContext.getResources().getColor(R.color.normal_blue));
leftCatalogHolder.mRlContent.setBackgroundColor(mContext.getResources().getColor(R.color.normal_blue));
leftCatalogHolder.mIvArrow.setVisibility(View.GONE);
Glide.with(mContext)
.load(BaseUrlApi.BASE_IMG_URL + mData.get(i).getIcon())
@ -77,6 +93,6 @@ public class CounterLeftCatalogAdapter extends BaseRecyclerAdapter<CounterCatalo
}
public interface NotifyChildChangeListener {
void onChangeChild(List<NewOptions> child);
void onChangeChild(List<NewOptions> child, CounterCatalogBean bean);
}
}

View File

@ -2,6 +2,7 @@ package com.sucstepsoft.txrealtimelocation.adapters;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.support.v7.widget.GridLayoutManager;
import android.text.TextUtils;
import android.view.LayoutInflater;
@ -11,6 +12,7 @@ import android.widget.TextView;
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.BaseShowLittlePhotoAdapter;
import com.sucstepsoft.cm_utils.core.widget.base.BaseShowPhotoAdapter;
import com.sucstepsoft.txrealtimelocation.R;
import com.sucstepsoft.txrealtimelocation.activitys.common.PhotoActivity;
@ -49,6 +51,11 @@ public class HistoryItemDetailAdapter extends BaseRecyclerAdapter<HistoryCatalog
tv.setTextSize(13);
switch (mData.get(i).getChild().get(j).getCheckItemType()) {
case 1:
if (mData.get(i).getChild().get(j).getIsWrongJoinByCheckItemId() == 0) {
tv.setTextColor(Color.GRAY);
} else {
tv.setTextColor(Color.RED);
}
tv.setText(mData.get(i).getChild().get(j).getNameJoinByCheckItemId());
break;
case 2:
@ -77,7 +84,8 @@ public class HistoryItemDetailAdapter extends BaseRecyclerAdapter<HistoryCatalog
photos.add(BaseUrlApi.BASE_IMG_URL + split[j]);
}
}
BaseShowPhotoAdapter adapter = new BaseShowPhotoAdapter(mContext, photos);
BaseShowLittlePhotoAdapter adapter = new BaseShowLittlePhotoAdapter(mContext, photos);
GridLayoutManager manager = new GridLayoutManager(mContext, 4) {
@Override
public boolean canScrollVertically() {

View File

@ -50,9 +50,14 @@ public class HistoryLeftCatalogAdapter extends BaseRecyclerAdapter<HistoryCatalo
mChildChangeListener.onChangeChild(mData.get(i).getOptions());
}
});
leftCatalogHolder.mCbCheck.setVisibility(View.GONE);
if (mData.get(i).isCheck()) {
leftCatalogHolder.mIvHint.setVisibility(View.VISIBLE);
} else {
leftCatalogHolder.mIvHint.setVisibility(View.GONE);
}
if (mSelectIndex == i) {
leftCatalogHolder.itemView.setBackgroundColor(mContext.getResources().getColor(R.color.sel_blue));
leftCatalogHolder.mRlContent.setBackgroundColor(mContext.getResources().getColor(R.color.sel_blue));
leftCatalogHolder.mTvTitle.setSelected(true);
leftCatalogHolder.mIvArrow.setVisibility(View.VISIBLE);
Glide.with(mContext)
@ -61,8 +66,8 @@ public class HistoryLeftCatalogAdapter extends BaseRecyclerAdapter<HistoryCatalo
.into(leftCatalogHolder.mIvIcon);
} else {
leftCatalogHolder.mTvTitle.setSelected(false);
leftCatalogHolder.itemView.setBackgroundColor(mContext.getResources().getColor(R.color.normal_blue));
leftCatalogHolder.mIvArrow.setVisibility(View.GONE);
leftCatalogHolder.mRlContent.setBackgroundColor(mContext.getResources().getColor(R.color.normal_blue));
leftCatalogHolder.mIvArrow.setVisibility(View.INVISIBLE);
Glide.with(mContext)
.load(BaseUrlApi.BASE_IMG_URL + mData.get(i).getIcon())
.apply(mIconOptions)

View File

@ -34,11 +34,24 @@ public class HistoryMissionAdapter extends BaseRecyclerAdapter<CounterCheckListB
CounterCheckListBean.RowsBean bean = mData.get(i);
holder.mTvName.setText(bean.getNameJoinByEnterpriseId());
holder.mTvAddress.setText(bean.getAddressJoinByEnterpriseId());
holder.mTvPeo.setText(bean.getMasterJoinByEnterpriseId());
holder.mTvPeo.setVisibility(View.GONE);
if (mData.get(i).getIsCoordination() == 0) {
holder.mTvCoor.setVisibility(View.VISIBLE);
holder.mTvCoor.setText("不配合");
} else {
holder.mTvCoor.setVisibility(View.GONE);
}
if (bean.getCheckType() == 1) {
holder.mTvType.setText("检查");
// if (mData.get(i).getIsCoordination() == 0) {
//
// } else {
// holder.mTvType.setText("检查-配合");
// }
} else {
holder.mTvType.setText("复查");
}
if (bean.getIsComplete() == 0) {
holder.mTvState.setText("未完成");

View File

@ -4,6 +4,7 @@ import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundButton;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
@ -46,12 +47,27 @@ public class LeftCatalogAdapter extends BaseRecyclerAdapter<CatalogBean, LeftCat
mSelectIndex = i;
notifyDataSetChanged();
if (mChildChangeListener != null) {
mChildChangeListener.onChangeChild(mData.get(i).getOptions());
mChildChangeListener.onChangeChild(mData.get(i).getOptions(), mData.get(i));
}
});
if (mData.get(i).isAllCheck()) {
leftCatalogHolder.mIvHint.setVisibility(View.GONE);
} else {
leftCatalogHolder.mIvHint.setVisibility(View.VISIBLE);
}
leftCatalogHolder.mCbCheck.setOnCheckedChangeListener(null);
leftCatalogHolder.mCbCheck.setChecked(mData.get(i).isCheck());
leftCatalogHolder.mCbCheck.setOnCheckedChangeListener((buttonView, isChecked) -> {
mData.get(i).setCheck(isChecked);
mData.get(i).setAllCheck(isChecked);
if (isChecked) {
leftCatalogHolder.mIvHint.setVisibility(View.GONE);
} else {
leftCatalogHolder.mIvHint.setVisibility(View.VISIBLE);
}
});
if (mSelectIndex == i) {
leftCatalogHolder.itemView.setBackgroundColor(mContext.getResources().getColor(R.color.sel_blue));
leftCatalogHolder.mRlContent.setBackgroundColor(mContext.getResources().getColor(R.color.sel_blue));
leftCatalogHolder.mTvTitle.setSelected(true);
leftCatalogHolder.mIvArrow.setVisibility(View.VISIBLE);
Glide.with(mContext)
@ -60,7 +76,7 @@ public class LeftCatalogAdapter extends BaseRecyclerAdapter<CatalogBean, LeftCat
.into(leftCatalogHolder.mIvIcon);
} else {
leftCatalogHolder.mTvTitle.setSelected(false);
leftCatalogHolder.itemView.setBackgroundColor(mContext.getResources().getColor(R.color.normal_blue));
leftCatalogHolder.mRlContent.setBackgroundColor(mContext.getResources().getColor(R.color.normal_blue));
leftCatalogHolder.mIvArrow.setVisibility(View.GONE);
Glide.with(mContext)
.load(BaseUrlApi.BASE_IMG_URL + mData.get(i).getIcon())
@ -76,6 +92,6 @@ public class LeftCatalogAdapter extends BaseRecyclerAdapter<CatalogBean, LeftCat
}
public interface NotifyChildChangeListener {
void onChangeChild(List<NewOptions> child);
void onChangeChild(List<NewOptions> child, CatalogBean bean);
}
}

View File

@ -0,0 +1,39 @@
package com.sucstepsoft.txrealtimelocation.adapters;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.sucstepsoft.cm_utils.core.widget.base.BaseRecyclerAdapter;
import com.sucstepsoft.txrealtimelocation.R;
import com.sucstepsoft.txrealtimelocation.adapters.holders.PublicLogHolder;
import com.sucstepsoft.txrealtimelocation.beans.PublicLogBean;
import java.lang.invoke.LambdaConversionException;
import java.util.List;
/**
* 作者: adam
* 日期: 2020/4/27 - 11:42 AM
* 邮箱: itgaojian@163.com
* 描述:
*/
public class PublicLogAdapter extends BaseRecyclerAdapter<PublicLogBean, PublicLogHolder> {
public PublicLogAdapter(Context ctx, List<PublicLogBean> list) {
super(ctx, list);
}
@Override
public PublicLogHolder createHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_public_log, parent, false);
return new PublicLogHolder(itemView);
}
@Override
public void bindHolder(PublicLogHolder publicLogHolder, int i) {
publicLogHolder.mTvDate.setText(mData.get(i).getTime());
publicLogHolder.mTvDes.setText(mData.get(i).getLogSummary());
publicLogHolder.mTvTitle.setText(mData.get(i).getLogUserName());
}
}

View File

@ -36,10 +36,10 @@ public class PublicTroubleListAdapter extends BaseRecyclerAdapter<PublicTroubleL
PublicTroubleListBean.RowsBean rowsBean = mData.get(i);
publicTroubleHolder.mTvName.setText(rowsBean.getCheckAddress());
publicTroubleHolder.mTvDate.setText("检查时间:" + rowsBean.getCheckDate());
if (!TextUtils.isEmpty(rowsBean.getRecheckDate())) {
publicTroubleHolder.mTvState.setText("完成");
if (mData.get(i).getCheckType() == 1) {
publicTroubleHolder.mTvState.setText("处理完成");
} else {
publicTroubleHolder.mTvState.setText("待复查");
publicTroubleHolder.mTvState.setText("领导处理");
}
}
}

View File

@ -20,6 +20,7 @@ public class HistroyHolder extends RecyclerView.ViewHolder {
public TextView mTvState;
public TextView mTvType;
public TextView mTvTime;
public TextView mTvCoor;
public HistroyHolder(@NonNull View itemView) {
super(itemView);
@ -29,5 +30,6 @@ public class HistroyHolder extends RecyclerView.ViewHolder {
mTvState = itemView.findViewById(R.id.tv_state);
mTvType = itemView.findViewById(R.id.tv_type);
mTvTime = itemView.findViewById(R.id.tv_time);
mTvCoor = itemView.findViewById(R.id.tv_coor);
}
}

View File

@ -3,7 +3,9 @@ package com.sucstepsoft.txrealtimelocation.adapters.holders;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.sucstepsoft.txrealtimelocation.R;
@ -18,11 +20,17 @@ public class LeftCatalogHolder extends RecyclerView.ViewHolder {
public TextView mTvTitle;
public ImageView mIvIcon;
public ImageView mIvArrow;
public CheckBox mCbCheck;
public ImageView mIvHint;
public RelativeLayout mRlContent;
public LeftCatalogHolder(@NonNull View itemView) {
super(itemView);
mTvTitle = itemView.findViewById(R.id.tv_title);
mIvIcon = itemView.findViewById(R.id.iv_icon);
mIvArrow = itemView.findViewById(R.id.iv_arrow);
mCbCheck = itemView.findViewById(R.id.cb_check);
mIvHint = itemView.findViewById(R.id.iv_hint);
mRlContent = itemView.findViewById(R.id.rl_content);
}
}

View File

@ -0,0 +1,27 @@
package com.sucstepsoft.txrealtimelocation.adapters.holders;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;
import com.sucstepsoft.txrealtimelocation.R;
/**
* 作者: adam
* 日期: 2020/4/27 - 11:25 AM
* 邮箱: itgaojian@163.com
* 描述:
*/
public class PublicLogHolder extends RecyclerView.ViewHolder {
public TextView mTvTitle;
public TextView mTvDes;
public TextView mTvDate;
public PublicLogHolder(@NonNull View itemView) {
super(itemView);
mTvTitle = itemView.findViewById(R.id.tv_user_name);
mTvDes = itemView.findViewById(R.id.tv_desc);
mTvDate = itemView.findViewById(R.id.tv_time);
}
}

View File

@ -18,6 +18,25 @@ public class CatalogBean {
private String icon;
private String selIcon;
private String typeByCheckItemId;
private boolean isCheck;
private boolean isAllCheck;
public boolean isAllCheck() {
return isAllCheck;
}
public void setAllCheck(boolean allCheck) {
isAllCheck = allCheck;
}
public boolean isCheck() {
return isCheck;
}
public void setCheck(boolean check) {
isCheck = check;
}
public String getTypeByCheckItemId() {
return typeByCheckItemId;

View File

@ -7,7 +7,6 @@ package com.sucstepsoft.txrealtimelocation.beans;
* 描述:
*/
public class CompanyEnterBean {
/**
* address : string
* area1 : string
@ -15,13 +14,22 @@ public class CompanyEnterBean {
* area3 : string
* area4 : string
* area5 : string
* bussinessRegNum : string
* classify : string
* classifyDictionaryName : string
* engagedCount : 0
* factoryGate : string
* industry : string
* industryType : string
* isLogOff : 0
* legalPerson : string
* master : string
* name : string
* nature : string
* natureDictionaryName : string
* phone : string
* riskOperation : string
* summary : string
* type : string
* workplace : string
*/
@ -32,69 +40,24 @@ public class CompanyEnterBean {
private String area3;
private String area4;
private String area5;
private int engagedCount;//从业人数
private String factoryGate;//大门照片
private String industry;//行业
private String master;//负责人
private String name;//企业名称
private String phone;//电话
private String riskOperation;//风险
private String riskOperationPid;//风险父ID
private String type;//类型
private String workplace;//
private String summary;//营业范围
private String legalPerson;//企业法人
private String bussinessRegNum;//组织机构代码
private String industryType;//行业类型
private String bussinessRegNum;
private String classify;
private String classifyDictionaryName;
private int engagedCount;
private String factoryGate;
private String industry;
private String industryType;
private int isLogOff;
public int getIsLogOff() {
return isLogOff;
}
public void setIsLogOff(int isLogOff) {
this.isLogOff = isLogOff;
}
public String getRiskOperationPid() {
return riskOperationPid;
}
public void setRiskOperationPid(String riskOperationPid) {
this.riskOperationPid = riskOperationPid;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public String getLegalPerson() {
return legalPerson;
}
public void setLegalPerson(String legalPerson) {
this.legalPerson = legalPerson;
}
public String getBussinessRegNum() {
return bussinessRegNum;
}
public void setBussinessRegNum(String bussinessRegNum) {
this.bussinessRegNum = bussinessRegNum;
}
public String getIndustryType() {
return industryType;
}
public void setIndustryType(String industryType) {
this.industryType = industryType;
}
private String legalPerson;
private String master;
private String name;
private String nature;
private String natureDictionaryName;
private String phone;
private String riskOperation;
private String summary;
private String type;
private String workplace;
public String getAddress() {
return address;
@ -144,6 +107,30 @@ public class CompanyEnterBean {
this.area5 = area5;
}
public String getBussinessRegNum() {
return bussinessRegNum;
}
public void setBussinessRegNum(String bussinessRegNum) {
this.bussinessRegNum = bussinessRegNum;
}
public String getClassify() {
return classify;
}
public void setClassify(String classify) {
this.classify = classify;
}
public String getClassifyDictionaryName() {
return classifyDictionaryName;
}
public void setClassifyDictionaryName(String classifyDictionaryName) {
this.classifyDictionaryName = classifyDictionaryName;
}
public int getEngagedCount() {
return engagedCount;
}
@ -168,6 +155,30 @@ public class CompanyEnterBean {
this.industry = industry;
}
public String getIndustryType() {
return industryType;
}
public void setIndustryType(String industryType) {
this.industryType = industryType;
}
public int getIsLogOff() {
return isLogOff;
}
public void setIsLogOff(int isLogOff) {
this.isLogOff = isLogOff;
}
public String getLegalPerson() {
return legalPerson;
}
public void setLegalPerson(String legalPerson) {
this.legalPerson = legalPerson;
}
public String getMaster() {
return master;
}
@ -184,6 +195,22 @@ public class CompanyEnterBean {
this.name = name;
}
public String getNature() {
return nature;
}
public void setNature(String nature) {
this.nature = nature;
}
public String getNatureDictionaryName() {
return natureDictionaryName;
}
public void setNatureDictionaryName(String natureDictionaryName) {
this.natureDictionaryName = natureDictionaryName;
}
public String getPhone() {
return phone;
}
@ -200,6 +227,14 @@ public class CompanyEnterBean {
this.riskOperation = riskOperation;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public String getType() {
return type;
}

View File

@ -18,6 +18,25 @@ public class CounterCatalogBean {
private String icon;
private String selIcon;
private int typeByCheckItemId;
private boolean isCheck;
private boolean isAllCheck;
public boolean isCheck() {
return isCheck;
}
public void setCheck(boolean check) {
isCheck = check;
}
public boolean isAllCheck() {
return isAllCheck;
}
public void setAllCheck(boolean allCheck) {
isAllCheck = allCheck;
}
public int getTypeByCheckItemId() {
return typeByCheckItemId;

View File

@ -18,6 +18,15 @@ public class HistoryCatalogBean {
private String icon;
private String selIcon;
private int typeByCheckItemId;
private boolean isCheck;
public boolean isCheck() {
return isCheck;
}
public void setCheck(boolean check) {
isCheck = check;
}
public int getTypeByCheckItemId() {
return typeByCheckItemId;

View File

@ -35,8 +35,17 @@ public class PublicCheckSubmitBean {
private String recheckLng;
private String recheckPhotos;
private String publicAreaReportId;
private String checkUserName;
public String getCheckUserName() {
return checkUserName;
}
public void setCheckUserName(String checkUserName) {
this.checkUserName = checkUserName;
}
public String getPublicAreaReportId() {
return publicAreaReportId;
}

View File

@ -0,0 +1,74 @@
package com.sucstepsoft.txrealtimelocation.beans;
/**
* 作者: adam
* 日期: 2020/4/27 - 11:12 AM
* 邮箱: itgaojian@163.com
* 描述:
*/
public class PublicLogBean {
/**
* logSummary : string
* logUserName : string
* publicAreaReportId : string
* publicLeaderHandleId : string
* publicLogId : string
*/
private String logSummary;
private String logUserName;
private String publicAreaReportId;
private String publicLeaderHandleId;
private String publicLogId;
private String gmtCreate;
public String getTime() {
return gmtCreate;
}
public void setTime(String time) {
this.gmtCreate = time;
}
public String getLogSummary() {
return logSummary;
}
public void setLogSummary(String logSummary) {
this.logSummary = logSummary;
}
public String getLogUserName() {
return logUserName;
}
public void setLogUserName(String logUserName) {
this.logUserName = logUserName;
}
public String getPublicAreaReportId() {
return publicAreaReportId;
}
public void setPublicAreaReportId(String publicAreaReportId) {
this.publicAreaReportId = publicAreaReportId;
}
public String getPublicLeaderHandleId() {
return publicLeaderHandleId;
}
public void setPublicLeaderHandleId(String publicLeaderHandleId) {
this.publicLeaderHandleId = publicLeaderHandleId;
}
public String getPublicLogId() {
return publicLogId;
}
public void setPublicLogId(String publicLogId) {
this.publicLogId = publicLogId;
}
}

View File

@ -0,0 +1,301 @@
package com.sucstepsoft.txrealtimelocation.fragments.issue;
import android.app.Activity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import com.jcodecraeer.xrecyclerview.ProgressStyle;
import com.jcodecraeer.xrecyclerview.XRecyclerView;
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
import com.sucstepsoft.cm_utils.core.widget.base.LazyFragment;
import com.sucstepsoft.cm_utils.utils.ToastUtils;
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
import com.sucstepsoft.txrealtimelocation.R;
import com.sucstepsoft.txrealtimelocation.adapters.IssueSubAdapter;
import com.sucstepsoft.txrealtimelocation.adapters.PublicTroubleListAdapter;
import com.sucstepsoft.txrealtimelocation.beans.IssueSubBean;
import com.sucstepsoft.txrealtimelocation.beans.PublicTroubleListBean;
import com.sucstepsoft.txrealtimelocation.net.LocationApiService;
import com.sucstepsoft.txrealtimelocation.utils.ExceptionHandler;
import java.util.ArrayList;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;
//import com.sucstepsoft.txrealtimelocation.activitys.issue.IssueDetailActivity;
/**
* 作者: Adam
* 日期: 2019/7/30 - 09:31
* 邮箱: itgaojian@163.com
* 描述: 案件待下派
*/
public class PublicCaseFragment extends LazyFragment {
@BindView(R.id.rlv_items)
XRecyclerView mRlvItems;
private String mRows = "20";
private int mCurPage = 1;
private int mType = 1;
private Unbinder mBind;
private Activity mActivity;
private String mTitle;
private Disposable mDisFinish;
private Disposable mDisWait;
private Disposable mDisCheck;
private Disposable mDisDis;
private Disposable mDisAppoint;
private List<PublicTroubleListBean.RowsBean> mDatas = new ArrayList<>();
private PublicTroubleListAdapter mAdapter;
@Override
protected void onCreateViewLazy(Bundle savedInstanceState) {
super.onCreateViewLazy(savedInstanceState);
View view = LayoutInflater.from(mActivity).inflate(R.layout.fragment_public_case, null);
setContentView(view);
mBind = ButterKnife.bind(this, view);
mDatas = new ArrayList<>();
mAdapter = new PublicTroubleListAdapter(mActivity, mDatas);
Bundle arguments = getArguments();
mTitle = arguments.getString("title");
LinearLayoutManager layoutManager = new LinearLayoutManager(mActivity);
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mRlvItems.setLayoutManager(layoutManager);
mRlvItems.setAdapter(mAdapter);
mAdapter.addOnItemClickListener(bean -> showIssueDetail(bean));
mRlvItems.setNoMore(true);
mRlvItems.setRefreshProgressStyle(ProgressStyle.BallGridBeat);
mRlvItems.setLoadingMoreProgressStyle(ProgressStyle.Pacman);
mRlvItems.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
refresh();
}
@Override
public void onLoadMore() {
loadMore();
}
});
if (!TextUtils.isEmpty(mTitle)) {
switch (mTitle) {
// case "待处理":
// mType = 2;
// getDisposeList(1);
// break;
// case "待检查":
// mType = 3;
// getCheckList(1);
// break;
// case "待结案":
// mType = 4;
// getWaitFinishList(1);
// break;
// case "已归档":
// mType = 5;
// getFinishList(1);
// break;
case "待下派":
default:
mType = 1;
getAppointList(1);
break;
}
}
}
/**
* 显示详情
*
* @param bean
*/
private void showIssueDetail(PublicTroubleListBean.RowsBean bean) {
}
@Override
protected void onFragmentStartLazy() {
super.onFragmentStartLazy();
}
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
this.mActivity = activity;
}
/**
* 刷新视图
*
* @param state
*/
private void refreshView(int state) {
switch (state) {
case 14://加载中
break;
case 15://加载成功
break;
case 16://加载失败
break;
}
}
@Override
protected void onDestroyViewLazy() {
super.onDestroyViewLazy();
if (mDisAppoint != null && !mDisAppoint.isDisposed()) {
mDisAppoint.dispose();
}
if (mDisCheck != null && !mDisCheck.isDisposed()) {
mDisCheck.dispose();
}
if (mDisDis != null && !mDisDis.isDisposed()) {
mDisDis.dispose();
}
if (mDisFinish != null && !mDisFinish.isDisposed()) {
mDisFinish.dispose();
}
if (mDisWait != null && !mDisWait.isDisposed()) {
mDisWait.dispose();
}
mRlvItems.destroy();
mRlvItems = null;
mBind.unbind();
mAdapter = null;
mDatas = null;
}
/**
* 待下派
*/
private void getAppointList(int page) {
mCurPage = page;
RetrofitManager.getInstance()
.create(LocationApiService.class)
.getPublicTroubleList(mCurPage + "", UserLgUtils.getToken())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<PublicTroubleListBean>() {
@Override
public void onSubscribe(Disposable d) {
mDisDis = d;
}
@Override
public void onNext(PublicTroubleListBean issueSubBean) {
if (issueSubBean != null && issueSubBean.getRows() != null && issueSubBean.getRows().size() > 0) {
++mCurPage;
if (page == 1) {
mDatas.clear();
mDatas.addAll(issueSubBean.getRows());
} else {
mDatas.addAll(issueSubBean.getRows());
}
mAdapter.notifyDataSetChanged();
mRlvItems.refreshComplete();
if (mDatas.size() >= issueSubBean.getTotal()) {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(true);
} else {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(false);
}
} else {
if (page > 1) {
mRlvItems.loadMoreComplete();
mRlvItems.setNoMore(true);
} else {
//无数据
mRlvItems.refreshComplete();
mRlvItems.setNoMore(true);
ToastUtils.showShort("暂无数据");
}
}
}
@Override
public void onError(Throwable e) {
ExceptionHandler.handleException(e);
mRlvItems.refreshComplete();
mRlvItems.loadMoreComplete();
e.printStackTrace();
}
@Override
public void onComplete() {
}
});
}
private void refresh() {
if (!TextUtils.isEmpty(mTitle)) {
// "待下派", "待处理", "待检查", "待结案", "已归档"
switch (mTitle) {
// case "待处理":
// mType = 2;
// getDisposeList(1);
// break;
// case "待检查":
// mType = 3;
// getCheckList(1);
// break;
// case "待结案":
// mType = 4;
// getWaitFinishList(1);
// break;
// case "已归档":
// mType = 5;
// getFinishList(1);
// break;
case "待下派":
default:
mType = 1;
getAppointList(1);
break;
}
}
}
private void loadMore() {
if (!TextUtils.isEmpty(mTitle)) {
// "待下派", "待处理", "待检查", "待结案", "已归档"
switch (mTitle) {
// mType = 1;
// getAppointList(mCurPage);
// break;
// case "待处理":
// mType = 2;
// getDisposeList(mCurPage);
// break;
// case "待检查":
// mType = 3;
// getCheckList(mCurPage);
// break;
// case "待结案":
// mType = 4;
// getWaitFinishList(mCurPage);
// break;
// case "已归档":
// mType = 5;
// getFinishList(mCurPage);
// break;
case "待下派":
default:
mType = 1;
getAppointList(mCurPage);
break;
}
}
}
}

View File

@ -31,6 +31,7 @@ import com.sucstepsoft.txrealtimelocation.beans.NoticeDetailBean;
import com.sucstepsoft.txrealtimelocation.beans.PenLineBean;
import com.sucstepsoft.txrealtimelocation.beans.PersonBean;
import com.sucstepsoft.txrealtimelocation.beans.PlanListBean;
import com.sucstepsoft.txrealtimelocation.beans.PublicLogBean;
import com.sucstepsoft.txrealtimelocation.beans.PublicTroubleListBean;
import com.sucstepsoft.txrealtimelocation.beans.SignDataBean;
import com.sucstepsoft.txrealtimelocation.beans.SignTimeBean;
@ -624,7 +625,7 @@ public interface LocationApiService {
//企业信息录入
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
@POST("enterprise/saveenterprise")
Observable<SuccessBean> doSaveCompanyInfo(@Body RequestBody leaveBody, @Header("token") String token);
Observable<BaseUserBean> doSaveCompanyInfo(@Body RequestBody leaveBody, @Header("token") String token);
//企业信息修改
//PUT /app/enterprise/updateenterprise/{enterpriseId}
@ -769,7 +770,7 @@ public interface LocationApiService {
//getNumberByMine
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
@GET("articlecontent/countarticlecount")
Observable<BaseUserBean> getArticleCount(@Header("token") String token);
Observable<BaseUserBean> getArticleCount(@Query("articleCategoryId") String id, @Header("token") String token);
//获取历史任务数量
//GET /app/check/countcheckofmine
@ -812,16 +813,25 @@ public interface LocationApiService {
@GET("publicareareport/getpublicareareportbyid/{publicAreaReportId}")
Observable<PublicTroubleListBean.RowsBean> getPublicTroubleDetail(@Path("publicAreaReportId") String pId, @Header("token") String token);
//获取公共隐患列表
//获取公共隐患列表---TODO 需要换成自己的
//GET /app/publicareareport/listpagepublicareareportofmine
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
@GET("publicareareport/listpagepublicareareportofmine")
// @GET("publicareareport/listpagepublicareareportofmine")
@GET("publicareareport/listpagepublicareareport")
Observable<PublicTroubleListBean> getPublicTroubleList(@Query("page") String page, @Header("token") String token);
//获取公共隐患记录日志
//GET /app/publiclog/listpagepubliclog
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
@GET("publiclog/listpubliclogbypublicareareportid/{publicAreaReportId}")
Observable<List<PublicLogBean>> getPublicTroubleLogList(@Path("publicAreaReportId") String id, @Header("token") String token);
//获取公共隐患列表-名称搜索
//GET /app/publicareareport/listpagepublicareareportofmine
@Headers({"base_url_name:dict", "Content-Type: application/json", "Accept: application/json"})
@GET("publicareareport/listpagepublicareareportofmine")
@GET("publicareareport/listpagepublicareareport")
Observable<PublicTroubleListBean> getPublicTroubleListByName(@Query("page") String page, @Query("keywords") String key, @Header("token") String token);
//保存计划

View File

@ -0,0 +1,25 @@
package com.sucstepsoft.txrealtimelocation.widget;
import android.text.TextWatcher;
/**
* 作者: adam
* 日期: 2020/4/26 - 10:25 AM
* 邮箱: itgaojian@163.com
* 描述:
*/
public abstract class MyTextWatcher implements TextWatcher {
//记录输入的字数
protected CharSequence enterWords;
protected int selectionStart;
protected int selectionEnd;
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
enterWords = s;
}
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/gray_text" android:state_pressed="true" />
<item android:color="@color/sel_blue" android:state_pressed="false" />
</selector>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
<item android:color="@color/black" android:state_checked="true" />
<item android:color="@color/gray_text" android:state_checked="false" />
</selector>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
<item android:color="@color/teb_selected" android:state_checked="true" />
<item android:color="@color/red_normal" android:state_checked="false" />
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_cb_normal" android:state_checked="false" />
<item android:drawable="@drawable/ic_cb_checked" android:state_checked="true" />
</selector>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:shape="rectangle">
<solid android:color="@color/sel_blue" />
<size
android:width="2dp"
android:height="15dp" />
</shape>

View File

@ -47,15 +47,15 @@
android:textColor="@color/titleBar" />
</LinearLayout>
<!-- <TextView-->
<!-- style="@style/company_name_title"-->
<!-- android:drawableLeft="@drawable/ic_item_idcard"-->
<!-- android:text="负责人" />-->
<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="企业名称企业名称企业名称企业名称企业名称" />-->
<TextView
android:id="@+id/tv_peo"
style="@style/company_content"
tools:text="企业名称企业名称企业名称企业名称企业名称" />
</LinearLayout>

View File

@ -5,30 +5,34 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none">
<android.support.v7.widget.CardView
<LinearLayout
android:id="@+id/ll_company_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="10dp"
app:cardCornerRadius="10dp"
app:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="false">
android:background="@color/white"
android:orientation="vertical"
android:padding="5dp">
<TextView
android:id="@+id/tv_issue_base_info"
style="@style/issue_report_title"
android:drawableLeft="@drawable/shape_blue_line"
android:drawablePadding="10dp"
android:padding="8dp"
android:text="基本信息"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/ll_company_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
android:padding="5dp">
android:padding="10dp">
<TextView
style="@style/company_name_title"
@ -52,7 +56,7 @@
<TextView
android:id="@+id/tv_type"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
tools:text="企业名称企业名称企业名称企业名称企业名称" />
<View
android:layout_width="match_parent"
@ -112,7 +116,7 @@
<TextView
android:id="@+id/tv_area1"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
tools:text="企业名称企业名称企业名称企业名称企业名称" />
<View
android:layout_width="match_parent"
@ -127,7 +131,7 @@
<TextView
android:id="@+id/tv_area2"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
tools:text="企业名称企业名称企业名称企业名称企业名称" />
<View
android:layout_width="match_parent"
@ -142,7 +146,7 @@
<TextView
android:id="@+id/tv_area3"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
tools:text="企业名称企业名称企业名称企业名称企业名称" />
<View
android:layout_width="match_parent"
@ -157,7 +161,7 @@
<TextView
android:id="@+id/tv_area4"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
tools:text="企业名称企业名称企业名称企业名称企业名称" />
<View
android:layout_width="match_parent"
@ -172,7 +176,7 @@
<TextView
android:id="@+id/tv_area5"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
tools:text="企业名称企业名称企业名称企业名称企业名称" />
<View
android:layout_width="match_parent"
@ -187,7 +191,7 @@
<TextView
android:id="@+id/tv_det_address"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
tools:text="企业名称企业名称企业名称企业名称企业名称" />
<View
android:layout_width="match_parent"
@ -202,7 +206,7 @@
<TextView
android:id="@+id/tv_trade_1"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
tools:text="企业名称企业名称企业名称企业名称企业名称" />
<View
android:layout_width="match_parent"
@ -217,7 +221,37 @@
<TextView
android:id="@+id/tv_trade"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
tools:text="企业名称企业名称企业名称企业名称企业名称" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="3dp"
android:background="@color/divider_line_color" />
<TextView
style="@style/company_name_title"
android:text="场所性质" />
<TextView
android:id="@+id/tv_nature"
style="@style/company_content"
tools:text="企业名称企业名称企业名称企业名称企业名称" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="3dp"
android:background="@color/divider_line_color" />
<TextView
style="@style/company_name_title"
android:text="企业分类" />
<TextView
android:id="@+id/tv_classify"
style="@style/company_content"
tools:text="企业名称企业名称企业名称企业名称企业名称" />
<View
android:layout_width="match_parent"
@ -232,7 +266,7 @@
<TextView
android:id="@+id/tv_peo_count"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
tools:text="企业名称企业名称企业名称企业名称企业名称" />
<View
android:layout_width="match_parent"
@ -247,7 +281,7 @@
<TextView
android:id="@+id/tv_risk"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
tools:text="企业名称企业名称企业名称企业名称企业名称" />
<View
android:layout_width="match_parent"
@ -262,7 +296,7 @@
<TextView
android:id="@+id/tv_peo"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
tools:text="企业名称企业名称企业名称企业名称企业名称" />
<View
android:layout_width="match_parent"
@ -278,7 +312,7 @@
<TextView
android:id="@+id/tv_phone"
style="@style/company_content"
android:text="企业名称企业名称企业名称企业名称企业名称" />
tools:text="企业名称企业名称企业名称企业名称企业名称" />
<View
android:layout_width="match_parent"
@ -287,7 +321,6 @@
android:background="@color/divider_line_color" />
<TextView
style="@style/company_name_title"
android:text="企业是否注销" />
@ -301,15 +334,43 @@
android:layout_height="1dp"
android:layout_marginTop="3dp"
android:background="@color/divider_line_color" />
</LinearLayout>
<TextView
android:id="@+id/tv_issue_detail_info"
style="@style/issue_report_title"
android:drawableLeft="@drawable/shape_blue_line"
android:drawablePadding="10dp"
android:padding="8dp"
android:text="企业照片"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="10dp">
<TextView
style="@style/company_name_title"
android:text="生产单位经营外貌" />
<android.support.v7.widget.RecyclerView
android:id="@+id/rlv_door"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/rlv_door"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tv_door_hint"
style="@style/company_content"
android:text="未录入" />
</RelativeLayout>
<View
android:layout_width="match_parent"
@ -321,11 +382,24 @@
style="@style/company_name_title"
android:text="主要作业场所" />
<android.support.v7.widget.RecyclerView
android:id="@+id/rlv_place"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/rlv_place"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tv_place_hint"
style="@style/company_content"
android:text="未录入" />
</RelativeLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</ScrollView>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</RelativeLayout>

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,9 @@
<LinearLayout
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_margin="10dp"
android:layout_marginLeft="15dp"
android:layout_marginTop="15dp"
android:layout_marginRight="15dp"
android:layout_weight="1"
android:background="@drawable/shape_search_box"
android:gravity="center_vertical"
@ -33,9 +35,10 @@
android:focusable="true"
android:gravity="center_vertical"
android:hint="企业类型"
android:padding="5dp"
android:padding="10dp"
android:singleLine="true"
android:textColor="@color/black"
android:textColorHint="@color/black"
android:textFontWeight="1"
android:textSize="15sp"
tools:text="企业类型" />
@ -62,6 +65,7 @@
android:drawableLeft="@color/line"
android:gravity="left"
android:hint="@string/hit_company_name"
android:paddingLeft="5dp"
android:textColor="@color/black"
android:textSize="15sp"
tools:text="" />
@ -80,8 +84,8 @@
android:id="@+id/btn_search"
android:layout_width="58dp"
android:layout_height="40dp"
android:layout_marginTop="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="15dp"
android:layout_marginRight="15dp"
android:background="@drawable/sel_btn_submit_no_size"
android:text="搜索"
android:textColor="@color/white" />
@ -90,7 +94,8 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:layout_marginTop="10dp">
<LinearLayout
android:layout_width="match_parent"

View File

@ -32,6 +32,7 @@
android:drawableRight="@drawable/ic_arrow_gray_down"
android:ellipsize="end"
android:focusable="true"
android:textColorHint="@color/black"
android:gravity="center_vertical"
android:hint="企业类型"
android:padding="5dp"

File diff suppressed because it is too large Load Diff

View File

@ -40,9 +40,18 @@
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"
tools:text="企业名称企业名称企业名称企业名称企业名称" />
<LinearLayout
android:id="@+id/ll_type"
android:layout_width="match_parent"

View File

@ -32,6 +32,7 @@
android:ellipsize="end"
android:focusable="true"
android:gravity="center_vertical"
android:textColorHint="@color/black"
android:hint="企业类型"
android:padding="5dp"
android:singleLine="true"

View File

@ -265,7 +265,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="任务计划"
android:text="本月计划"
android:textSize="10sp" />
</LinearLayout>
</LinearLayout>

View File

@ -32,6 +32,7 @@
android:ellipsize="end"
android:focusable="true"
android:gravity="center_vertical"
android:textColorHint="@color/black"
android:hint="企业类型"
android:padding="5dp"
android:singleLine="true"

View File

@ -103,7 +103,7 @@
android:id="@+id/xlv_com_lib"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp" />
android:layout_margin="10dp" />
</RelativeLayout>

View File

@ -46,6 +46,16 @@
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"
tools:text="企业名称企业名称企业名称企业名称企业名称" />
</LinearLayout>
<LinearLayout

View File

@ -11,24 +11,6 @@
<com.jcodecraeer.xrecyclerview.XRecyclerView
android:id="@+id/xlv_notice"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<!-- <com.sucstepsoft.cm_utils.core.widget.xtablayout.XTabLayout-->
<!-- android:id="@+id/xtl_tabs"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="50dp"-->
<!-- android:background="@color/white"-->
<!-- app:xTabIndicatorColor="@color/text_blue1"-->
<!-- app:xTabIndicatorHeight="4dp"-->
<!-- app:xTabIndicatorWidth="15dp"-->
<!-- app:xTabMode="scrollable"-->
<!-- app:xTabSelectedTextColor="@color/text_blue1"-->
<!-- app:xTabSelectedTextSize="20sp"-->
<!-- app:xTabTextColor="#000"-->
<!-- app:xTabTextSize="15sp" />-->
<!-- <android.support.v4.view.ViewPager-->
<!-- android:id="@+id/vp_content"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent" />-->
android:layout_height="wrap_content"
android:layout_margin="5dp" />
</LinearLayout>

View File

@ -31,34 +31,38 @@
android:textSize="20sp"
tools:text="标题标题标题标题标题" />
<TextView
android:id="@+id/tv_notice_time"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:gravity="center"
android:textColor="#ff808080"
android:textSize="12sp"
tools:text="2019年01月01日 10:09:09" />
android:gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_notice_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="#ff808080"
android:textSize="12sp"
tools:text="2019年01月01日 10:09:09" />
<TextView
android:id="@+id/tv_notice_gator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="18dp"
android:gravity="center"
android:textColor="#ff808080"
android:textSize="12sp"
tools:text="张三" />
</LinearLayout>
<TextView
android:id="@+id/tv_notice_gator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginTop="5dp"
android:layout_marginRight="10dp"
android:background="@drawable/shp_status_blue"
android:gravity="center"
android:textColor="#ff808080"
android:textSize="12sp"
tools:text="张三" />
<LinearLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginTop="12dp"
android:orientation="vertical"
android:padding="10dp">

View File

@ -23,21 +23,34 @@
android:hint="本月完成计划"
android:padding="10dp"
android:textColor="@color/black"
android:textSize="15sp"
android:textStyle="bold" />
android:textSize="17sp" />
<TextView
android:id="@+id/tv_plan_complete"
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:clickable="true"
android:focusable="true"
android:hint="本月完成计划"
android:padding="10dp"
android:textColor="@color/black"
android:textSize="15sp"
android:textStyle="bold" />
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:padding="10dp"
android:text="本月完成:"
android:textColor="@color/black"
android:textSize="17sp" />
<TextView
android:id="@+id/tv_plan_complete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/normal_blue"
android:textSize="17sp"
tools:text="0" />
</LinearLayout>
</LinearLayout>
@ -45,6 +58,8 @@
android:id="@+id/rlv_items"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/sp_company_item_box"
tools:layoutManager="LinearLayoutManager"
tools:listitem="@layout/item_plan" />
</LinearLayout>

View File

@ -102,7 +102,8 @@
<com.jcodecraeer.xrecyclerview.XRecyclerView
android:id="@+id/xlv_public_list"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:layout_margin="10dp" />
</RelativeLayout>

View File

@ -105,96 +105,30 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp">
android:orientation="vertical"
android:padding="5dp">
<android.support.v7.widget.RecyclerView
android:id="@+id/rlv_c_photos"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:cardCornerRadius="5dp"
app:cardPreventCornerOverlap="true"
app:cardUseCompatPadding="false">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="5dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="复查内容:"
android:textColor="@color/black"
android:textSize="18sp" />
android:layout_marginTop="8dp"
android:text="处理日志:"
android:textColor="@color/black" />
<LinearLayout
<android.support.v7.widget.RecyclerView
android:id="@+id/rlv_log"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="10dp">
<TextView
android:id="@+id/tv_re_date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shp_rectangle_gray"
android:clickable="true"
android:focusable="true"
android:hint="请选择复查时间"
android:padding="10dp"
android:textColor="@color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="10dp">
<TextView
android:id="@+id/tv_re_content"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginTop="5dp"
android:background="@drawable/shp_rectangle_gray"
android:gravity="left"
android:hint="请输入复查描述"
android:padding="8dp"
android:textSize="15sp"
tools:text="" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="20dp">
<android.support.v7.widget.RecyclerView
android:id="@+id/rlv_re_photos"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
android:layout_marginTop="8dp" />
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</LinearLayout>

View File

@ -0,0 +1,29 @@
<?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="match_parent"
android:orientation="vertical"
tools:context=".activitys.issue.IssueRecordActivity">
<com.sucstepsoft.cm_utils.core.widget.xtablayout.XTabLayout
android:id="@+id/xtl_tabs"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
app:xTabIndicatorColor="@color/text_blue1"
app:xTabIndicatorHeight="4dp"
app:xTabIndicatorWidth="15dp"
app:xTabMode="scrollable"
app:xTabSelectedTextColor="@color/text_blue1"
app:xTabSelectedTextSize="20sp"
app:xTabTextColor="#000"
app:xTabTextSize="15sp" />
<android.support.v4.view.ViewPager
android:id="@+id/vp_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp" />
</LinearLayout>

View File

@ -45,7 +45,7 @@
android:layout_weight="1"
android:background="@drawable/shp_rectangle_gray"
android:gravity="left"
android:hint="请输入巡查地点"
android:hint="请输入隐患地点"
android:padding="10dp"
android:textColor="@color/black"
android:textSize="15sp"
@ -102,11 +102,52 @@
tools:text="" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="10dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_start_hint" />
<RadioGroup
android:id="@+id/rg_dispose"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioButton
android:id="@+id/rb_mine"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="@null"
android:checked="true"
android:drawableLeft="@drawable/sel_rb"
android:padding="8dp"
android:text="自处理"
android:textSize="16sp" />
<RadioButton
android:id="@+id/rb_can_not"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:button="@null"
android:drawableLeft="@drawable/sel_rb"
android:padding="8dp"
android:text="上级处理"
android:textSize="16sp" />
</RadioGroup>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="初查拍照:"
android:text="隐患照片:"
android:textColor="@color/black" />
<LinearLayout

View File

@ -36,6 +36,7 @@
android:padding="5dp"
android:singleLine="true"
android:textColor="@color/black"
android:textColorHint="@color/black"
android:textFontWeight="1"
android:textSize="15sp"
tools:text="企业类型" />

View File

@ -13,11 +13,25 @@
android:background="@drawable/sp_company_item_box"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="15dp"
android:text="整改选项"
android:textColor="@color/black"
android:textSize="20sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#ECECEC" />
<LinearLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginTop="15dp"
android:gravity="center_vertical"
android:orientation="horizontal">
@ -25,6 +39,7 @@
android:id="@+id/rg_term"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:orientation="vertical">
@ -32,10 +47,10 @@
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:drawablePadding="10dp"
android:text="立即整改"
android:textSize="16sp" />
@ -43,27 +58,28 @@
android:id="@+id/rb_term"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginTop="15dp"
android:button="@null"
android:drawableLeft="@drawable/sel_rb"
android:drawablePadding="10dp"
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" />
<!-- <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_width="150dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="2dp">
@ -74,50 +90,47 @@
style="@style/common_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="false"
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" />-->
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="15dp"
android:background="#ECECEC" />
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:padding="5dp">-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- <android.support.v7.widget.RecyclerView-->
<!-- android:id="@+id/rlv_photos"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content" />-->
<!-- </LinearLayout>-->
<Button
android:id="@+id/btn_confirm"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@null"
android:text="确定"
android:textColor="@color/col_btn_blue"
android:textSize="15sp" />
<!-- <LinearLayout-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:orientation="horizontal">-->
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="#ECECEC" />
<!-- <Button-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="1"-->
<!-- android:background="@drawable/sel_btn_submit_no_size"-->
<!-- android:text="确定"-->
<!-- android:textColor="@color/white" />-->
<!-- <Button-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_weight="1"-->
<!-- android:background="@drawable/sel_btn_submit_red"-->
<!-- android:text="取消"-->
<!-- android:textColor="@color/white" />-->
<!-- </LinearLayout>-->
<Button
android:id="@+id/btn_cancel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@null"
android:text="取消"
android:textSize="15sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.jcodecraeer.xrecyclerview.XRecyclerView
android:id="@+id/rlv_items"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layoutManager="LinearLayoutManager"
tools:listitem="@layout/item_issue" />
</RelativeLayout>

View File

@ -3,41 +3,64 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="90dp"
android:layout_marginLeft="2dp"
android:layout_marginTop="2dp"
android:layout_marginRight="2dp"
android:orientation="vertical"
android:paddingLeft="10dp"
tools:background="@color/normal_blue">
android:orientation="vertical">
<LinearLayout
<RelativeLayout
android:id="@+id/rl_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginRight="10dp"
android:gravity="center"
android:orientation="vertical">
android:layout_height="match_parent"
android:layout_marginLeft="2dp"
android:layout_marginRight="3dp"
tools:background="@color/sel_blue">
<ImageView
android:id="@+id/iv_icon"
<CheckBox
android:id="@+id/cb_check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:src="@drawable/ic_default_icon" />
android:layout_margin="3dp"
android:button="@drawable/sel_check_box_catalog" />
<TextView
android:id="@+id/tv_title"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:ellipsize="end"
android:layout_centerInParent="true"
android:layout_marginRight="10dp"
android:gravity="center"
android:maxLines="2"
android:minLines="2"
android:textColor="@color/white"
android:textSize="13sp"
tools:text="标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题" />
</LinearLayout>
android:orientation="vertical">
<ImageView
android:id="@+id/iv_icon"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
tools:src="@drawable/ic_default_icon" />
<TextView
android:id="@+id/tv_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/iv_icon"
android:layout_marginTop="3dp"
android:ellipsize="end"
android:gravity="center"
android:maxLines="2"
android:minLines="2"
android:textColor="@color/white"
android:textSize="13sp"
tools:text="标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题" />
<ImageView
android:id="@+id/iv_hint"
android:layout_width="13dp"
android:layout_height="13dp"
android:layout_alignParentRight="true"
android:layout_marginRight="3dp"
android:background="@drawable/ic_hint" />
</RelativeLayout>
</RelativeLayout>
<ImageView
android:id="@+id/iv_arrow"

View File

@ -41,9 +41,11 @@
android:id="@+id/tv_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="2"
android:ellipsize="end"
android:layout_marginTop="5dp"
android:textSize="12sp"
tools:text="地址:内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特" />
tools:text="地址:内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特内蒙古呼和浩特" />
</LinearLayout>
<CheckBox

View File

@ -7,7 +7,7 @@
android:background="@drawable/sp_company_item_box"
android:gravity="center_vertical"
android:orientation="vertical"
android:padding="5dp">
android:padding="12dp">
<LinearLayout
android:layout_width="match_parent"

View File

@ -28,6 +28,8 @@
android:id="@+id/tv_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:textSize="12sp"
tools:text="地址" />

View File

@ -22,21 +22,43 @@
android:orientation="horizontal">
<TextView
android:id="@+id/tv_name"
android:id="@+id/tv_coor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="16sp"
tools:text="名称名称名称名称名称名称名称名称" />
<TextView
android:id="@+id/tv_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:textColor="@color/titleBar"
android:layout_alignParentRight="true"
android:layout_marginRight="5dp"
android:background="@drawable/sp_red_sel"
android:padding="5dp"
android:textColor="@color/colorRedBg"
android:textSize="12sp"
tools:text="复查" />
tools:text="不配合" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@color/black"
android:textSize="16sp"
tools:text="企业名称企业名称企业名称企业名称" />
<TextView
android:id="@+id/tv_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:textColor="@color/titleBar"
android:textSize="12sp"
tools:text="复查" />
</LinearLayout>
</LinearLayout>
<TextView
@ -57,17 +79,33 @@
android:id="@+id/tv_peo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="12sp"
tools:text="负责人" />
<TextView
android:id="@+id/tv_address"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:textSize="12sp"
tools:text="地址" />
<TextView
android:id="@+id/tv_time"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="检查日期" />
android:gravity="center_vertical">
<TextView
android:id="@+id/tv_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:textSize="12sp"
tools:text="检查日期" />
</RelativeLayout>
</LinearLayout>

View File

@ -30,6 +30,7 @@
<android.support.v7.widget.RecyclerView
android:id="@+id/rlv_photos"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:layout_marginTop="3dp" />
</LinearLayout>

View File

@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_margin="10dp"
android:background="@drawable/shape_rectangle_white"
android:orientation="vertical"
android:padding="10dp"
@ -36,7 +36,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:background="@drawable/shp_status_blue"
android:gravity="center"
android:textColor="#ff808080"
android:textSize="12sp"

View File

@ -54,15 +54,6 @@
android:orientation="vertical">
</LinearLayout>
<!-- <RadioGroup-->
<!-- android:id="@+id/rg_state"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:gravity="center_vertical"-->
<!-- android:orientation="horizontal"-->
<!-- android:padding="3dp">-->
<!-- </RadioGroup>-->
<LinearLayout
android:id="@+id/ll_check"

View File

@ -4,14 +4,13 @@
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">
android:orientation="vertical">
<TextView
android:id="@+id/tv_date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:textColor="@color/black"
android:textSize="16sp"
tools:text="计划时间" />
@ -21,7 +20,8 @@
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:gravity="center_vertical"
android:orientation="horizontal">
android:orientation="horizontal"
android:padding="5dp">
<TextView
android:id="@+id/tv_name"
@ -42,5 +42,11 @@
tools:text="任务计划数量" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="@color/gray_line" />
</LinearLayout>

View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@drawable/ic_step_line_ver" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:gravity="center_vertical"
android:padding="5dp"
android:textColor="@color/black"
android:textSize="18sp"
tools:text="2018-10-12 22-22-22" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="3dp"
android:background="@drawable/shape_rectangle_white_10"
android:orientation="vertical"
android:padding="10dp">
<TextView
android:id="@+id/tv_user_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="处理人:张三" />
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_marginTop="3dp"
android:background="@drawable/shp_line_match"
android:layerType="software" />
<TextView
android:id="@+id/tv_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="处理描述" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>

View File

@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="3dp"
android:layout_margin="5dp"
android:background="@drawable/sp_company_item_box"
android:orientation="vertical"
android:padding="5dp">

View File

@ -94,4 +94,11 @@
<item name="android:textColor">@color/black</item>
<item name="android:textSize">16sp</item>
</style>
<style name="title_12">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@color/black</item>
<item name="android:textSize">12sp</item>
</style>
</resources>

View File

@ -59,8 +59,8 @@ ext {
gCompileSdkVersion = 28
gMinSdkVersion = 16
gTargetSdkVersion = 28
gVersionCode = 6
gVersionName = '1.0.5'
gVersionCode = 7
gVersionName = '1.0.6'
// gVersionCode=26
// gVersionName='1.3.0'
//Router编译版本

View File

@ -39,6 +39,8 @@ public class PathConfig {
public static final String USER_TYPE_X = "25affe67-134c-4a32-ba41-64b0cfedc782";
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="27694872-7295-4b41-aaa0-297fc6dbac3e";//企业分类
public static final String DIC_PLACE_ID="54c583df-6a6f-4a55-bcb3-2d6ace99b8ef";//场所性质
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_RISK_ID = "77128e8e-3e09-45b5-a48e-7a50d1b7cc32";//风险

View File

@ -105,6 +105,8 @@ public final class RegexConstants {
*/
public static final String REGEX_NEGATIVE_FLOAT = "^-[1-9]\\d*\\.\\d*|-0\\.\\d*[1-9]\\d*$";
public static final String REGEX_PWD = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,}$";
public static final String REGEX_ORG_CODE = "\\^[a-zA-Z0-9]{10,20}$\\";//组织机构代码
///////////////////////////////////////////////////////////////////////////
// If u want more please visit http://toutiao.com/i6231678548520731137
///////////////////////////////////////////////////////////////////////////

View File

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

View File

@ -15,6 +15,7 @@ import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentActivity;
import android.support.v7.app.AppCompatActivity;
import android.text.Editable;
import android.text.InputFilter;
import android.text.Spanned;
import android.text.TextUtils;
@ -40,6 +41,7 @@ import com.sucstepsoft.cm_utils.constant.PathConfig;
import com.sucstepsoft.cm_utils.core.beans.UserLoginBean;
import com.sucstepsoft.cm_utils.core.widget.views.BaseAreaListDialog;
import com.sucstepsoft.cm_utils.core.widget.views.DoubleAndOneClicklistener;
import com.sucstepsoft.cm_utils.core.widget.views.MyTextWatcher;
import com.sucstepsoft.cm_utils.utils.LogUtils;
import com.sucstepsoft.cm_utils.utils.ToastUtils;
import com.sucstepsoft.cm_utils.utils.UserInfoSPUtils;
@ -140,6 +142,12 @@ public abstract class BaseActivity extends AppCompatActivity {
// editText.setFilters(new InputFilter[]{filter});
}
/**
* 限制只能输入英文字符和数字
*/
protected void setEditTextInputType() {
}
/**
* 初始化数据
@ -501,6 +509,28 @@ public abstract class BaseActivity extends AppCompatActivity {
.navigation();
}
/**
* 限制输入框输入字数
*
* @param et
*/
protected void astrictContentLength(EditText et, int maxLength) {
et.addTextChangedListener(new MyTextWatcher() {
@Override
public void afterTextChanged(Editable s) {
//已输入字数
selectionStart = et.getSelectionStart();
selectionEnd = et.getSelectionEnd();
if (enterWords.length() > maxLength) {
s.delete(selectionStart - 1, selectionEnd);
int tempSelection = selectionEnd;
et.setText(s);
et.setSelection(tempSelection);
}
}
});
}
/**
* 打开拍摄 实现onActivityResult进行处理
* 需要引入ModuleMedia模块

View File

@ -0,0 +1,56 @@
package com.sucstepsoft.cm_utils.core.widget.base;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.sucstepsoft.cm_utils.R;
import java.util.List;
/**
* 作者 : Adam on 2018/11/14.
* 邮箱 : itgaojian@163.com
* 描述 : <功能描述>
*/
public class BaseShowLittlePhotoAdapter extends BaseRecyclerAdapter<String, BasePhotoHolder> {
public BaseShowLittlePhotoAdapter(Context ctx, List<String> list) {
super(ctx, list);
}
@Override
public BasePhotoHolder createHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(mContext)
.inflate(R.layout.item_show_photo_little, parent, false);
return new BasePhotoHolder(itemView);
}
@Override
public void bindHolder(BasePhotoHolder showPhotoHolder, int i) {
RequestOptions transform = new RequestOptions()
.error(R.drawable.ic_img_default)
.placeholder(R.drawable.ic_img_default)
.transform(new GlideRoundTransform(mContext, 5));
Glide.with(mContext)
.load(mData.get(i))
.apply(transform)
.into(showPhotoHolder.mIvPhoto);
if (listener != null) {
showPhotoHolder.itemView.setOnClickListener(v -> listener.clickListener(getData(), i));
}
}
public interface OnItemClick {
void clickListener(List<String> data, int pos);
}
private OnItemClick listener;
public void setOnItemClickListener(OnItemClick listener) {
this.listener = listener;
}
}

View File

@ -0,0 +1,25 @@
package com.sucstepsoft.cm_utils.core.widget.views;
import android.text.TextWatcher;
/**
* 作者: adam
* 日期: 2020/4/26 - 10:25 AM
* 邮箱: itgaojian@163.com
* 描述:
*/
public abstract class MyTextWatcher implements TextWatcher {
//记录输入的字数
protected CharSequence enterWords;
protected int selectionStart;
protected int selectionEnd;
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
enterWords = s;
}
}

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@color/white">
<ImageView
android:id="@+id/iv_photo"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_margin="2dp" />
</RelativeLayout>

View File

@ -131,14 +131,13 @@
<color name="teb_unselected">#b4b4b4</color>
<color name="teb_selected">#d70715</color>
<color name="red_normal">#FA5661</color>
<color name="base_bg">#fbf8f1</color>
<color name="base_line">#efefef</color>
<color name="base_item_text">#535353</color>
<drawable name="tab_gray">@color/bg_gray</drawable>
<drawable name="tab_white">@android:color/white</drawable>
<!--字体颜色-->
<!--<color name="text_write_FF">#FFFFFF</color>
<color name="text_write_FD">#FFFFFD</color>-->