修改参会人员列表,添加会议签到
This commit is contained in:
parent
1f130d1f0d
commit
0b23261d59
@ -106,8 +106,11 @@ dependencies {
|
||||
api 'com.liulishuo.okdownload:okhttp:1.0.5'
|
||||
api 'com.liulishuo.okdownload:okdownload:1.0.5'
|
||||
api 'com.haibin:calendarview:3.6.9'
|
||||
//zxing
|
||||
api 'com.google.zxing:core:3.4.1'
|
||||
api ('com.journeyapps:zxing-android-embedded:3.6.0') { transitive = false }
|
||||
// //zxing
|
||||
// api 'com.google.zxing:core:3.4.1'
|
||||
// api ('com.journeyapps:zxing-android-embedded:3.6.0') { transitive = false }
|
||||
api 'com.github.jenly1314:zxing-lite:2.1.1'
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -38,6 +38,10 @@
|
||||
<activity
|
||||
android:name=".utils.PermissionUtils$PermissionActivity"
|
||||
android:theme="@style/translucent" />
|
||||
<activity
|
||||
android:name="com.king.zxing.CaptureActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/CaptureTheme"/>
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
|
116
baselib/src/main/java/com/tenlionsoft/baselib/core/widget/views/QrDialog.java
Executable file
116
baselib/src/main/java/com/tenlionsoft/baselib/core/widget/views/QrDialog.java
Executable file
@ -0,0 +1,116 @@
|
||||
package com.tenlionsoft.baselib.core.widget.views;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.tenlionsoft.baselib.R;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi;
|
||||
|
||||
|
||||
/**
|
||||
* 作者 : Adam on 2018/7/23.
|
||||
* 邮箱 : itgaojian@163.com
|
||||
* 描述 : 显示二维码的弹窗
|
||||
*/
|
||||
public class QrDialog extends Dialog {
|
||||
|
||||
private View view;
|
||||
private Context context;
|
||||
private OnChangeListener mChangeListener;
|
||||
private EditText mEtContent;
|
||||
private float level = -1;
|
||||
private String mQr;
|
||||
|
||||
private QrDialog(Context context, String qr) {
|
||||
super(context, R.style.dialog_center_alpha);
|
||||
this.context = context;
|
||||
this.mQr = qr;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
view = LayoutInflater.from(context).inflate(R.layout.dialog_meeting_qr, null);
|
||||
setContentView(view);
|
||||
setCancelable(false);
|
||||
setCanceledOnTouchOutside(false);
|
||||
ImageView mIvQr = view.findViewById(R.id.iv_qr);
|
||||
Glide.with(context)
|
||||
.load(BaseUrlApi.BASE_IMG_URL + mQr)
|
||||
.into(mIvQr);
|
||||
view.findViewById(R.id.tv_confirm).setOnClickListener(v -> this.dismiss());
|
||||
DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
|
||||
Window window = this.getWindow();
|
||||
window.setGravity(Gravity.CENTER);
|
||||
window.setWindowAnimations(R.style.dialog_center_alpha);
|
||||
WindowManager.LayoutParams params = window.getAttributes();
|
||||
params.width = (int) (displayMetrics.widthPixels * 0.9);
|
||||
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
window.setAttributes(params);
|
||||
window.setBackgroundDrawable(new ColorDrawable());
|
||||
}
|
||||
|
||||
private void doConfirm() {
|
||||
if (checkParams()) {
|
||||
if (mChangeListener != null) {
|
||||
String content = mEtContent.getText().toString().trim();
|
||||
mChangeListener.doChange(content, level);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void HideSoftKeyBoardDialog(Activity activity) {
|
||||
try {
|
||||
InputMethodManager imm = (InputMethodManager) activity.getSystemService(activity.INPUT_METHOD_SERVICE);
|
||||
imm.toggleSoftInput(InputMethodManager.HIDE_NOT_ALWAYS, 0);
|
||||
} catch (Exception ex) {
|
||||
}
|
||||
}
|
||||
|
||||
public void addOnChangeListener(OnChangeListener listener) {
|
||||
this.mChangeListener = listener;
|
||||
}
|
||||
|
||||
public interface OnChangeListener {
|
||||
void doChange(String org, float level);
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验参数
|
||||
*/
|
||||
private boolean checkParams() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public static class DialogBuilder {
|
||||
private Context mContext;
|
||||
private String mQr;
|
||||
|
||||
public DialogBuilder(Context context) {
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
public DialogBuilder setQr(String qr) {
|
||||
this.mQr = qr;
|
||||
return this;
|
||||
}
|
||||
|
||||
public QrDialog build() {
|
||||
return new QrDialog(mContext, mQr);
|
||||
}
|
||||
}
|
||||
}
|
43
baselib/src/main/res/layout/dialog_meeting_qr.xml
Normal file
43
baselib/src/main/res/layout/dialog_meeting_qr.xml
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/shp_rectangle_white_5"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:text="会议签到码"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_qr"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="250dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="5dp" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="right"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_confirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="10dp"
|
||||
android:text="确定"
|
||||
android:textColor="@color/text_blue" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -54,7 +54,7 @@ task clean(type: Delete) {
|
||||
}
|
||||
ext {
|
||||
gCompileSdkVersion = 30
|
||||
gMinSdkVersion = 16
|
||||
gMinSdkVersion = 21
|
||||
gTargetSdkVersion = 30
|
||||
gVersionCode = 9
|
||||
gVersionName = '1.0.8'
|
||||
|
36
import-summary.txt
Normal file
36
import-summary.txt
Normal file
@ -0,0 +1,36 @@
|
||||
ECLIPSE ANDROID PROJECT IMPORT SUMMARY
|
||||
======================================
|
||||
|
||||
Ignored Files:
|
||||
--------------
|
||||
The following files were *not* copied into the new Gradle project; you
|
||||
should evaluate whether these are still needed in your project and if
|
||||
so manually move them:
|
||||
|
||||
* pom.xml
|
||||
* proguard.cfg
|
||||
|
||||
Moved Files:
|
||||
------------
|
||||
Android Gradle projects use a different directory structure than ADT
|
||||
Eclipse projects. Here's how the projects were restructured:
|
||||
|
||||
* AndroidManifest.xml => zxing/src/main/AndroidManifest.xml
|
||||
* assets/ => zxing/src/main/assets/
|
||||
* res/ => zxing/src/main/res/
|
||||
* src/ => zxing/src/main/java/
|
||||
|
||||
Next Steps:
|
||||
-----------
|
||||
You can now build the project. The Gradle project needs network
|
||||
connectivity to download dependencies.
|
||||
|
||||
Bugs:
|
||||
-----
|
||||
If for some reason your project does not build, and you determine that
|
||||
it is due to a bug or limitation of the Eclipse to Gradle importer,
|
||||
please file a bug at http://b.android.com with category
|
||||
Component-Tools.
|
||||
|
||||
(This import summary is for your information only, and can be deleted
|
||||
after import once you are satisfied with the results.)
|
@ -13,7 +13,8 @@ import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.google.gson.Gson;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.journeyapps.barcodescanner.CaptureActivity;
|
||||
import com.king.zxing.CameraScan;
|
||||
import com.king.zxing.CaptureActivity;
|
||||
import com.tengshisoft.mainmodule.R;
|
||||
import com.tengshisoft.mainmodule.R2;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
@ -38,6 +39,9 @@ import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
@ -97,6 +101,7 @@ public class MainTabActivity extends BaseActivity {
|
||||
private Unbinder mBind;
|
||||
private List<BaseFragment> mFragments;
|
||||
private long finishTime = 0;
|
||||
private ActivityResultLauncher<Intent> mLauncher;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
@ -109,6 +114,14 @@ public class MainTabActivity extends BaseActivity {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mFragments = new ArrayList<>();
|
||||
initContentView();
|
||||
mLauncher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {
|
||||
if (result.getResultCode() == RESULT_OK) {
|
||||
String s = CameraScan.parseScanResult(result.getData());
|
||||
LogUtils.e("扫描结果=="+s);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
NetworkChangeReceiver.registerReceiver(mActivity);
|
||||
//TODO 检查App版本 checkAppVersion();
|
||||
}
|
||||
@ -251,6 +264,8 @@ public class MainTabActivity extends BaseActivity {
|
||||
.titleBar(mVStatusBar)
|
||||
.init();
|
||||
case 3://加号
|
||||
Intent intent = new Intent(mActivity, CaptureActivity.class);
|
||||
mLauncher.launch(intent);
|
||||
|
||||
break;
|
||||
case 4://邮件
|
||||
@ -278,6 +293,11 @@ public class MainTabActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable @org.jetbrains.annotations.Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* App版本校验
|
||||
*/
|
||||
|
@ -41,6 +41,7 @@ import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.R2;
|
||||
import com.tenlionsoft.oamodule.adapter.BasePersonShowAdapter;
|
||||
import com.tenlionsoft.oamodule.beans.ChoosePersonListBean;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingAttachListBean;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingRoomBean;
|
||||
import com.tenlionsoft.oamodule.beans.PersonShowBean;
|
||||
import com.tenlionsoft.oamodule.beans.SaveMeetingBean;
|
||||
@ -113,7 +114,7 @@ public class MeetingApplyActivity extends BaseActivity {
|
||||
|
||||
private ChoosePersonListBean mSelEmcee;
|
||||
private MeetingRoomBean mSelRoom;
|
||||
private List<PersonShowBean> mJoinPerson;
|
||||
private List<MeetingAttachListBean> mJoinPerson;
|
||||
private BasePersonShowAdapter mPersonShowAdapter;
|
||||
|
||||
|
||||
@ -184,13 +185,13 @@ public class MeetingApplyActivity extends BaseActivity {
|
||||
|
||||
|
||||
mJoinPerson = new ArrayList<>();
|
||||
mJoinPerson.add(new PersonShowBean());
|
||||
mJoinPerson.add(new MeetingAttachListBean());
|
||||
mPersonShowAdapter = new BasePersonShowAdapter(mActivity, mJoinPerson, 1);
|
||||
mRlvJoin.setLayoutManager(new GridLayoutManager(mActivity, 4));
|
||||
mRlvJoin.setAdapter(mPersonShowAdapter);
|
||||
mPersonShowAdapter.addOnDelListener(this::showConfirmDialog);
|
||||
mPersonShowAdapter.addOnItemClickListener(bean -> {
|
||||
if (TextUtils.isEmpty(bean.getId())) {
|
||||
if (TextUtils.isEmpty(bean.getUserId())) {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_SEL_PERSON)
|
||||
.withBoolean("isSingle", false)
|
||||
@ -200,7 +201,7 @@ public class MeetingApplyActivity extends BaseActivity {
|
||||
mBtnConfirm.setOnClickListener(v -> doConfirm());
|
||||
}
|
||||
|
||||
private void showConfirmDialog(PersonShowBean bean, int i) {
|
||||
private void showConfirmDialog(MeetingAttachListBean bean, int i) {
|
||||
new AlertDialog.Builder(mActivity)
|
||||
.setTitle("提示")
|
||||
.setMessage("确定要删除该参会人员吗?")
|
||||
@ -260,17 +261,17 @@ public class MeetingApplyActivity extends BaseActivity {
|
||||
String[] ids = id.split(",");
|
||||
for (int i = 0; i < names.length; i++) {
|
||||
boolean isExist = false;
|
||||
for (PersonShowBean person : mJoinPerson) {
|
||||
if (TextUtils.isEmpty(person.getId())) continue;
|
||||
if (person.getId().equals(ids[i])) {
|
||||
for (MeetingAttachListBean person : mJoinPerson) {
|
||||
if (TextUtils.isEmpty(person.getUserId())) continue;
|
||||
if (person.getUserId().equals(ids[i])) {
|
||||
isExist = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isExist) {
|
||||
PersonShowBean bean = new PersonShowBean();
|
||||
bean.setName(names[i]);
|
||||
bean.setId(ids[i]);
|
||||
MeetingAttachListBean bean = new MeetingAttachListBean();
|
||||
bean.setUserName(names[i]);
|
||||
bean.setUserId(ids[i]);
|
||||
mJoinPerson.add(0, bean);
|
||||
}
|
||||
}
|
||||
@ -509,10 +510,10 @@ public class MeetingApplyActivity extends BaseActivity {
|
||||
}
|
||||
StringBuilder ids = new StringBuilder();
|
||||
StringBuilder names = new StringBuilder();
|
||||
for (PersonShowBean person : mJoinPerson) {
|
||||
if (TextUtils.isEmpty(person.getId())) continue;
|
||||
ids.append(person.getId()).append("_");
|
||||
names.append(person.getName()).append(",");
|
||||
for (MeetingAttachListBean person : mJoinPerson) {
|
||||
if (TextUtils.isEmpty(person.getUserId())) continue;
|
||||
ids.append(person.getUserId()).append("_");
|
||||
names.append(person.getUserName()).append(",");
|
||||
}
|
||||
if (ids.toString().endsWith("_")) {
|
||||
String id = ids.substring(0, ids.toString().length() - 1);
|
||||
|
@ -1,7 +1,9 @@
|
||||
package com.tenlionsoft.oamodule.activity.meeting;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.TextView;
|
||||
|
||||
@ -14,11 +16,15 @@ import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager;
|
||||
import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
import com.tenlionsoft.baselib.core.widget.base.ShowFileAdapter;
|
||||
import com.tenlionsoft.baselib.core.widget.views.QrDialog;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.R2;
|
||||
import com.tenlionsoft.oamodule.adapter.BasePersonShowAdapter;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingAttachListBean;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingQrBean;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingRoomRecordBean;
|
||||
import com.tenlionsoft.oamodule.beans.PersonShowBean;
|
||||
import com.tenlionsoft.oamodule.net.OAApi;
|
||||
@ -63,10 +69,13 @@ public class MeetingDetailActivity extends BaseActivity {
|
||||
RecyclerView mRlvFiles;
|
||||
@BindView(R2.id.tv_file_hint)
|
||||
TextView mTvFileHint;
|
||||
@BindView(R2.id.btn_qr)
|
||||
Button mBtnQr;
|
||||
private Unbinder mBind;
|
||||
private String mId;
|
||||
private List<PersonShowBean> mJoinPerson;
|
||||
private BasePersonShowAdapter mPersonShowAdapter;
|
||||
private String mQr;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
@ -78,6 +87,12 @@ public class MeetingDetailActivity extends BaseActivity {
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("会议详情");
|
||||
mId = getIntent().getStringExtra("id");
|
||||
String type = getIntent().getStringExtra("type");
|
||||
if ("mine".equals(type)) {
|
||||
mBtnQr.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mBtnQr.setVisibility(View.GONE);
|
||||
}
|
||||
if (TextUtils.isEmpty(mId)) {
|
||||
ToastUtils.show("数据有误");
|
||||
finish();
|
||||
@ -133,22 +148,13 @@ public class MeetingDetailActivity extends BaseActivity {
|
||||
if (b.getMeetingNoticeType().contains("1")) mCbNoticeMsg.setChecked(true);
|
||||
if (b.getMeetingNoticeType().contains("2")) mCbNoticeEmail.setChecked(true);
|
||||
}
|
||||
//TODO 参会人员
|
||||
if (!TextUtils.isEmpty(b.getMeetingUserIds())) {
|
||||
mJoinPerson = new ArrayList<>();
|
||||
String[] ids = b.getMeetingUserIds().split("_");
|
||||
String[] names = b.getMeetingUserNames().split(",");
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
PersonShowBean bean = new PersonShowBean();
|
||||
bean.setId(ids[i]);
|
||||
bean.setName(names[i]);
|
||||
mJoinPerson.add(bean);
|
||||
}
|
||||
mPersonShowAdapter = new BasePersonShowAdapter(mActivity, mJoinPerson, 2);
|
||||
mRlvJoin.setLayoutManager(new GridLayoutManager(mActivity, 4));
|
||||
mRlvJoin.setAdapter(mPersonShowAdapter);
|
||||
//获取参会人员
|
||||
getMeetingAttachList();
|
||||
}
|
||||
//参会人员
|
||||
mTvContent.setText(b.getMeetingContent());
|
||||
|
||||
//文件
|
||||
if (!TextUtils.isEmpty(b.getMeetingFile())) {
|
||||
mRlvFiles.setVisibility(View.VISIBLE);
|
||||
@ -169,6 +175,91 @@ public class MeetingDetailActivity extends BaseActivity {
|
||||
mRlvFiles.setVisibility(View.GONE);
|
||||
mTvFileHint.setVisibility(View.VISIBLE);
|
||||
}
|
||||
mBtnQr.setOnClickListener(v -> onShowQr());
|
||||
}
|
||||
|
||||
private void onShowQr() {
|
||||
if (TextUtils.isEmpty(mQr)) {
|
||||
doGetQr();
|
||||
} else {
|
||||
QrDialog dialog = new QrDialog.DialogBuilder(mActivity)
|
||||
.setQr(mQr)
|
||||
.build();
|
||||
dialog.show();
|
||||
}
|
||||
}
|
||||
|
||||
private void doGetQr() {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getMeetingSignQr(mId, UserLgUtils.getToken())
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<MeetingQrBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull MeetingQrBean meetingQrBean) {
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
if (TextUtils.isEmpty(meetingQrBean.getQrId())) {
|
||||
ToastUtils.show("未获取到签到码,请稍后重试");
|
||||
} else {
|
||||
mQr = meetingQrBean.getQrId();
|
||||
onShowQr();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void getMeetingAttachList() {
|
||||
ProgressDialog dialog = UIUtil.initDialog(mActivity, "获取中...");
|
||||
dialog.show();
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getMeetingAttachList(mId, UserLgUtils.getToken())
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<List<MeetingAttachListBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull List<MeetingAttachListBean> meetingAttachListBeans) {
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
mJoinPerson = new ArrayList<>();
|
||||
mPersonShowAdapter = new BasePersonShowAdapter(mActivity, meetingAttachListBeans, 2);
|
||||
mRlvJoin.setLayoutManager(new GridLayoutManager(mActivity, 4));
|
||||
mRlvJoin.setAdapter(mPersonShowAdapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
if (dialog.isShowing()) dialog.dismiss();
|
||||
ExceptionHandler.handleException(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -89,6 +89,7 @@ public class MineMeetingListActivity extends BaseActivity {
|
||||
mAdapter.addOnItemClickListener(rowsBean -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_MEETING_DETAIL)
|
||||
.withString("id", rowsBean.getMeetingId())
|
||||
.withString("type", "mine")
|
||||
.navigation(mActivity, 12));
|
||||
refreshStateView(LionActions.STATE_LOAD);
|
||||
doRefresh();
|
||||
|
@ -9,7 +9,7 @@ import android.view.ViewGroup;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.beans.PersonShowBean;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingAttachListBean;
|
||||
import com.tenlionsoft.oamodule.holder.BasePersonShowHolder;
|
||||
|
||||
import java.util.List;
|
||||
@ -20,10 +20,10 @@ import java.util.List;
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class BasePersonShowAdapter extends BaseRecyclerAdapter<PersonShowBean, BasePersonShowHolder> {
|
||||
public class BasePersonShowAdapter extends BaseRecyclerAdapter<MeetingAttachListBean, BasePersonShowHolder> {
|
||||
private int mType = 1;
|
||||
|
||||
public BasePersonShowAdapter(Context ctx, List<PersonShowBean> list, int type) {
|
||||
public BasePersonShowAdapter(Context ctx, List<MeetingAttachListBean> list, int type) {
|
||||
super(ctx, list);
|
||||
this.mType = type;
|
||||
}
|
||||
@ -36,18 +36,26 @@ public class BasePersonShowAdapter extends BaseRecyclerAdapter<PersonShowBean, B
|
||||
|
||||
@Override
|
||||
public void bindHolder(BasePersonShowHolder h, int i) {
|
||||
PersonShowBean b = mData.get(i);
|
||||
|
||||
if (!TextUtils.isEmpty(b.getId())) {
|
||||
MeetingAttachListBean b = mData.get(i);
|
||||
if (!TextUtils.isEmpty(b.getUserId())) {
|
||||
h.mTvName.setVisibility(View.VISIBLE);
|
||||
if (mType == 2) {
|
||||
//单纯显示
|
||||
h.mIvDel.setVisibility(View.GONE);
|
||||
h.mIvSign.setVisibility(View.VISIBLE);
|
||||
if (1 == b.getIsSign()) {
|
||||
//签到了
|
||||
h.mIvSign.setImageResource(R.drawable.ic_abolish_oper_icon);
|
||||
} else {
|
||||
//未签到
|
||||
h.mIvSign.setImageResource(R.drawable.ic_apply_oper_icon);
|
||||
}
|
||||
} else {
|
||||
//可以删除
|
||||
h.mIvDel.setVisibility(View.VISIBLE);
|
||||
h.mIvSign.setVisibility(View.GONE);
|
||||
}
|
||||
h.mTvName.setText(mData.get(i).getName());
|
||||
h.mTvName.setText(mData.get(i).getUserName());
|
||||
Glide.with(mContext)
|
||||
.load(R.drawable.ic_user_default)
|
||||
.into(h.mIvUserIcon);
|
||||
@ -70,6 +78,6 @@ public class BasePersonShowAdapter extends BaseRecyclerAdapter<PersonShowBean, B
|
||||
}
|
||||
|
||||
public interface OnDelListener {
|
||||
void doDel(PersonShowBean bean, int i);
|
||||
void doDel(MeetingAttachListBean bean, int i);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,248 @@
|
||||
package com.tenlionsoft.oamodule.beans;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2022/4/19 - 16:51
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class MeetingAttachListBean {
|
||||
|
||||
private int isSign;
|
||||
private MeetingDTOBean meetingDTO;
|
||||
private String meetingId;
|
||||
private String meetingUserId;
|
||||
private String signTime;
|
||||
private String userId;
|
||||
private String userName;
|
||||
private String userType;
|
||||
|
||||
public int getIsSign() {
|
||||
return isSign;
|
||||
}
|
||||
|
||||
public void setIsSign(int isSign) {
|
||||
this.isSign = isSign;
|
||||
}
|
||||
|
||||
public MeetingDTOBean getMeetingDTO() {
|
||||
return meetingDTO;
|
||||
}
|
||||
|
||||
public void setMeetingDTO(MeetingDTOBean meetingDTO) {
|
||||
this.meetingDTO = meetingDTO;
|
||||
}
|
||||
|
||||
public String getMeetingId() {
|
||||
return meetingId;
|
||||
}
|
||||
|
||||
public void setMeetingId(String meetingId) {
|
||||
this.meetingId = meetingId;
|
||||
}
|
||||
|
||||
public String getMeetingUserId() {
|
||||
return meetingUserId;
|
||||
}
|
||||
|
||||
public void setMeetingUserId(String meetingUserId) {
|
||||
this.meetingUserId = meetingUserId;
|
||||
}
|
||||
|
||||
public String getSignTime() {
|
||||
return signTime;
|
||||
}
|
||||
|
||||
public void setSignTime(String signTime) {
|
||||
this.signTime = signTime;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getUserType() {
|
||||
return userType;
|
||||
}
|
||||
|
||||
public void setUserType(String userType) {
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
public static class MeetingDTOBean {
|
||||
private String meetingCode;
|
||||
private String meetingContent;
|
||||
private String meetingEndTime;
|
||||
private String meetingFile;
|
||||
private String meetingHostUserId;
|
||||
private String meetingHostUserName;
|
||||
private String meetingId;
|
||||
private String meetingNoticeType;
|
||||
private String meetingRoomId;
|
||||
private String meetingRoomName;
|
||||
private String meetingRoomType;
|
||||
private String meetingRoomTypeName;
|
||||
private String meetingStartTime;
|
||||
private String meetingTitle;
|
||||
private String meetingType;
|
||||
private String meetingTypeName;
|
||||
private String meetingUserIds;
|
||||
private String meetingUserNames;
|
||||
|
||||
public String getMeetingCode() {
|
||||
return meetingCode;
|
||||
}
|
||||
|
||||
public void setMeetingCode(String meetingCode) {
|
||||
this.meetingCode = meetingCode;
|
||||
}
|
||||
|
||||
public String getMeetingContent() {
|
||||
return meetingContent;
|
||||
}
|
||||
|
||||
public void setMeetingContent(String meetingContent) {
|
||||
this.meetingContent = meetingContent;
|
||||
}
|
||||
|
||||
public String getMeetingEndTime() {
|
||||
return meetingEndTime;
|
||||
}
|
||||
|
||||
public void setMeetingEndTime(String meetingEndTime) {
|
||||
this.meetingEndTime = meetingEndTime;
|
||||
}
|
||||
|
||||
public String getMeetingFile() {
|
||||
return meetingFile;
|
||||
}
|
||||
|
||||
public void setMeetingFile(String meetingFile) {
|
||||
this.meetingFile = meetingFile;
|
||||
}
|
||||
|
||||
public String getMeetingHostUserId() {
|
||||
return meetingHostUserId;
|
||||
}
|
||||
|
||||
public void setMeetingHostUserId(String meetingHostUserId) {
|
||||
this.meetingHostUserId = meetingHostUserId;
|
||||
}
|
||||
|
||||
public String getMeetingHostUserName() {
|
||||
return meetingHostUserName;
|
||||
}
|
||||
|
||||
public void setMeetingHostUserName(String meetingHostUserName) {
|
||||
this.meetingHostUserName = meetingHostUserName;
|
||||
}
|
||||
|
||||
public String getMeetingId() {
|
||||
return meetingId;
|
||||
}
|
||||
|
||||
public void setMeetingId(String meetingId) {
|
||||
this.meetingId = meetingId;
|
||||
}
|
||||
|
||||
public String getMeetingNoticeType() {
|
||||
return meetingNoticeType;
|
||||
}
|
||||
|
||||
public void setMeetingNoticeType(String meetingNoticeType) {
|
||||
this.meetingNoticeType = meetingNoticeType;
|
||||
}
|
||||
|
||||
public String getMeetingRoomId() {
|
||||
return meetingRoomId;
|
||||
}
|
||||
|
||||
public void setMeetingRoomId(String meetingRoomId) {
|
||||
this.meetingRoomId = meetingRoomId;
|
||||
}
|
||||
|
||||
public String getMeetingRoomName() {
|
||||
return meetingRoomName;
|
||||
}
|
||||
|
||||
public void setMeetingRoomName(String meetingRoomName) {
|
||||
this.meetingRoomName = meetingRoomName;
|
||||
}
|
||||
|
||||
public String getMeetingRoomType() {
|
||||
return meetingRoomType;
|
||||
}
|
||||
|
||||
public void setMeetingRoomType(String meetingRoomType) {
|
||||
this.meetingRoomType = meetingRoomType;
|
||||
}
|
||||
|
||||
public String getMeetingRoomTypeName() {
|
||||
return meetingRoomTypeName;
|
||||
}
|
||||
|
||||
public void setMeetingRoomTypeName(String meetingRoomTypeName) {
|
||||
this.meetingRoomTypeName = meetingRoomTypeName;
|
||||
}
|
||||
|
||||
public String getMeetingStartTime() {
|
||||
return meetingStartTime;
|
||||
}
|
||||
|
||||
public void setMeetingStartTime(String meetingStartTime) {
|
||||
this.meetingStartTime = meetingStartTime;
|
||||
}
|
||||
|
||||
public String getMeetingTitle() {
|
||||
return meetingTitle;
|
||||
}
|
||||
|
||||
public void setMeetingTitle(String meetingTitle) {
|
||||
this.meetingTitle = meetingTitle;
|
||||
}
|
||||
|
||||
public String getMeetingType() {
|
||||
return meetingType;
|
||||
}
|
||||
|
||||
public void setMeetingType(String meetingType) {
|
||||
this.meetingType = meetingType;
|
||||
}
|
||||
|
||||
public String getMeetingTypeName() {
|
||||
return meetingTypeName;
|
||||
}
|
||||
|
||||
public void setMeetingTypeName(String meetingTypeName) {
|
||||
this.meetingTypeName = meetingTypeName;
|
||||
}
|
||||
|
||||
public String getMeetingUserIds() {
|
||||
return meetingUserIds;
|
||||
}
|
||||
|
||||
public void setMeetingUserIds(String meetingUserIds) {
|
||||
this.meetingUserIds = meetingUserIds;
|
||||
}
|
||||
|
||||
public String getMeetingUserNames() {
|
||||
return meetingUserNames;
|
||||
}
|
||||
|
||||
public void setMeetingUserNames(String meetingUserNames) {
|
||||
this.meetingUserNames = meetingUserNames;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.tenlionsoft.oamodule.beans;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2022/4/19 - 16:26
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class MeetingQrBean {
|
||||
|
||||
private String qrId;
|
||||
private String qrName;
|
||||
|
||||
public String getQrId() {
|
||||
return qrId;
|
||||
}
|
||||
|
||||
public void setQrId(String qrId) {
|
||||
this.qrId = qrId;
|
||||
}
|
||||
|
||||
public String getQrName() {
|
||||
return qrName;
|
||||
}
|
||||
|
||||
public void setQrName(String qrName) {
|
||||
this.qrName = qrName;
|
||||
}
|
||||
}
|
@ -26,6 +26,8 @@ public class BasePersonShowHolder extends RecyclerView.ViewHolder {
|
||||
public ImageView mIvUserIcon;
|
||||
@BindView(R2.id.iv_del)
|
||||
public ImageView mIvDel;
|
||||
@BindView(R2.id.iv_sign)
|
||||
public ImageView mIvSign;
|
||||
|
||||
public BasePersonShowHolder(@NonNull @NotNull View itemView) {
|
||||
super(itemView);
|
||||
|
@ -11,6 +11,8 @@ import com.tenlionsoft.oamodule.beans.DocTypeBean;
|
||||
import com.tenlionsoft.oamodule.beans.DocumentDetailBean;
|
||||
import com.tenlionsoft.oamodule.beans.DocumentListBean;
|
||||
import com.tenlionsoft.oamodule.beans.DriverBean;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingAttachListBean;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingQrBean;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingRecordListBean;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingRoomBean;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingRoomRecordBean;
|
||||
@ -243,7 +245,21 @@ public interface OAApi {
|
||||
@GET("app/meeting/get/{meetingId}")
|
||||
Observable<MeetingRoomRecordBean> getMeetingDetail(@Path("meetingId") String id, @Header("token") String token);
|
||||
|
||||
//========日常工作========
|
||||
/**
|
||||
* 获取会议参会人员列表
|
||||
*/
|
||||
@Headers({"base_url_name:oa", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/meetinguser/list-bymeetingid/{meetingId}")
|
||||
Observable<List<MeetingAttachListBean>> getMeetingAttachList(@Path("meetingId") String id, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 获取会议签到码
|
||||
*/
|
||||
@Headers({"base_url_name:oa", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/meeting/get-signqrcode/{meetingId}")
|
||||
Observable<MeetingQrBean> getMeetingSignQr(@Path("meetingId") String id, @Header("token") String token);
|
||||
|
||||
/*========日常工作========*/
|
||||
|
||||
/**
|
||||
* 提交日常工作
|
||||
|
@ -332,7 +332,11 @@
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_qr"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="签到码" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</RelativeLayout>
|
@ -14,6 +14,7 @@
|
||||
android:layout_marginTop="5dp"
|
||||
android:src="@drawable/ic_user_default" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
@ -36,4 +37,12 @@
|
||||
android:layout_marginLeft="-10dp"
|
||||
android:layout_toRightOf="@id/iv_user_icon"
|
||||
android:src="@drawable/ic_delete" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_sign"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="-10dp"
|
||||
android:layout_toRightOf="@id/iv_user_icon"
|
||||
android:src="@drawable/ic_delete" />
|
||||
</RelativeLayout>
|
Loading…
Reference in New Issue
Block a user