文档详情Bug,我的发起列表
This commit is contained in:
parent
32da55f568
commit
9590b630fa
@ -10,8 +10,8 @@
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"versionCode": 2,
|
||||
"versionName": "1.0.2",
|
||||
"versionCode": 3,
|
||||
"versionName": "1.0.3",
|
||||
"outputFile": "app-release.apk"
|
||||
}
|
||||
]
|
||||
|
@ -26,10 +26,13 @@ import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.Display;
|
||||
import android.view.KeyCharacterMap;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.TouchDelegate;
|
||||
import android.view.View;
|
||||
import android.view.ViewConfiguration;
|
||||
import android.view.WindowManager;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
@ -54,6 +57,7 @@ import com.jcodecraeer.xrecyclerview.progressindicator.AVLoadingIndicatorView;
|
||||
import com.tenlionsoft.baselib.R;
|
||||
import com.tenlionsoft.baselib.constant.PathConfig;
|
||||
import com.tenlionsoft.baselib.core.widget.views.AfxTextView;
|
||||
import com.tenlionsoft.baselib.utils.LogUtils;
|
||||
import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -243,6 +247,19 @@ public abstract class BaseActivity extends AppCompatActivity {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
protected boolean isHasNavBar(){
|
||||
//通过判断设备是否有返回键、菜单键(不是虚拟键,是手机屏幕外的按键)来确定是否有navigation bar
|
||||
boolean hasMenuKey = ViewConfiguration.get(this)
|
||||
.hasPermanentMenuKey();
|
||||
boolean hasBackKey = KeyCharacterMap
|
||||
.deviceHasKey(KeyEvent.KEYCODE_BACK);
|
||||
|
||||
if (!hasMenuKey && !hasBackKey) {
|
||||
// 做任何你需要做的,这个设备有一个导航栏
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void setLocalBroad(LocalBroad localBroad) {
|
||||
this.mLocalBroad = localBroad;
|
||||
|
@ -124,7 +124,7 @@ public class PreviewFileActivity extends BaseActivity {
|
||||
private void setWebContent(String url) {
|
||||
mWvWeb = new WebView(mActivity);
|
||||
WebSettings settings = mWvWeb.getSettings();
|
||||
settings.setCacheMode(WebSettings.LOAD_DEFAULT);
|
||||
settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
|
||||
settings.setJavaScriptEnabled(true);//启用JS
|
||||
settings.setBlockNetworkImage(true);//阻塞页面图片加载
|
||||
settings.setDomStorageEnabled(true);
|
||||
|
21
baselib/src/main/res/layout/item_tab_custom_text_view.xml
Normal file
21
baselib/src/main/res/layout/item_tab_custom_text_view.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?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:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp">
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_tab_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textSize="14sp"
|
||||
app:text_type_cus="1"
|
||||
tools:text="新闻" />
|
||||
|
||||
</LinearLayout>
|
@ -2,7 +2,7 @@
|
||||
<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="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
|
@ -8,6 +8,8 @@ import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.google.gson.Gson;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
@ -35,7 +37,6 @@ import com.tenlionsoft.baselib.utils.UserLgUtils;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
@ -142,35 +143,35 @@ public class MainTabActivity extends BaseActivity {
|
||||
*/
|
||||
private void getUserExpandInfo() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.getUserInfoExpand(UserLgUtils.getToken())
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<UserInfoBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
.create(BaseApiService.class)
|
||||
.getUserInfoExpand(UserLgUtils.getToken())
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<UserInfoBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull UserInfoBean userInfoBean) {
|
||||
List<UserInfoBean.DepartmentsBean> departments = userInfoBean.getDepartments();
|
||||
UserLgUtils.setUserDeptId(new Gson().toJson(departments));
|
||||
//通知fragment刷新
|
||||
if (mFragments != null && mFragments.size() > 0) {
|
||||
mFragments.get(0).refreshContentView("userInfo");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
@Override
|
||||
public void onNext(@NonNull UserInfoBean userInfoBean) {
|
||||
List<UserInfoBean.DepartmentsBean> departments = userInfoBean.getDepartments();
|
||||
UserLgUtils.setUserDeptId(new Gson().toJson(departments));
|
||||
//通知fragment刷新
|
||||
if (mFragments != null && mFragments.size() > 0) {
|
||||
mFragments.get(0).refreshContentView("userInfo");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -184,7 +185,8 @@ public class MainTabActivity extends BaseActivity {
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
if (isNavBarHasShown(this)) {
|
||||
boolean isHas = isNavBarHasShown(this);
|
||||
if (isHas) {
|
||||
checkNavigation();
|
||||
}
|
||||
}
|
||||
@ -253,8 +255,8 @@ public class MainTabActivity extends BaseActivity {
|
||||
mVStatusBar.setVisibility(View.GONE);
|
||||
mVpContent.setCurrentItem(0, false);
|
||||
ImmersionBar.with(this)
|
||||
.statusBarColor(R.color.transparent)
|
||||
.init();
|
||||
.statusBarColor(R.color.transparent)
|
||||
.init();
|
||||
}
|
||||
|
||||
private void chooseDoc() {
|
||||
@ -275,10 +277,10 @@ public class MainTabActivity extends BaseActivity {
|
||||
mVpContent.setCurrentItem(1, false);
|
||||
|
||||
ImmersionBar.with(this)
|
||||
.statusBarColor(R.color.gray_f8)
|
||||
.statusBarDarkFont(true)
|
||||
.titleBar(mVStatusBar)
|
||||
.init();
|
||||
.statusBarColor(R.color.gray_f8)
|
||||
.statusBarDarkFont(true)
|
||||
.titleBar(mVStatusBar)
|
||||
.init();
|
||||
}
|
||||
|
||||
private void chooseEmail() {
|
||||
@ -299,10 +301,10 @@ public class MainTabActivity extends BaseActivity {
|
||||
mVStatusBar.setVisibility(View.VISIBLE);
|
||||
|
||||
ImmersionBar.with(this)
|
||||
.statusBarColor(R.color.gray_f8)
|
||||
.statusBarDarkFont(true)
|
||||
.titleBar(mVStatusBar)
|
||||
.init();
|
||||
.statusBarColor(R.color.gray_f8)
|
||||
.statusBarDarkFont(true)
|
||||
.titleBar(mVStatusBar)
|
||||
.init();
|
||||
}
|
||||
|
||||
private void chooseMine() {
|
||||
@ -322,10 +324,10 @@ public class MainTabActivity extends BaseActivity {
|
||||
mVStatusBar.setVisibility(View.VISIBLE);
|
||||
|
||||
ImmersionBar.with(this)
|
||||
.statusBarColor(R.color.white)
|
||||
.statusBarDarkFont(true)
|
||||
.titleBar(mVStatusBar)
|
||||
.init();
|
||||
.statusBarColor(R.color.white)
|
||||
.statusBarDarkFont(true)
|
||||
.titleBar(mVStatusBar)
|
||||
.init();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -333,34 +335,34 @@ public class MainTabActivity extends BaseActivity {
|
||||
*/
|
||||
private void checkAppVersion() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.doCheckAppVersion(BaseUrlApi.APP_VERSION_ID)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<VersionBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
.create(BaseApiService.class)
|
||||
.doCheckAppVersion(BaseUrlApi.APP_VERSION_ID)
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<VersionBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(VersionBean successBean) {
|
||||
if (successBean != null && successBean.getData() > 0) {
|
||||
if (CheckUpdateUtils.checkcode(MainTabActivity.this, successBean.getData() + "")) {
|
||||
startDownloadApk();
|
||||
@Override
|
||||
public void onNext(VersionBean successBean) {
|
||||
if (successBean != null && successBean.getData() > 0) {
|
||||
if (CheckUpdateUtils.checkcode(MainTabActivity.this, successBean.getData() + "")) {
|
||||
startDownloadApk();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7,6 +7,9 @@ import android.graphics.Color;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.google.android.flexbox.FlexDirection;
|
||||
import com.google.android.flexbox.FlexWrap;
|
||||
@ -36,8 +39,6 @@ import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
@ -149,6 +150,7 @@ public class ChooseDocTypeActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void onLowerDept(DocumentTypeList bean, int pos) {
|
||||
if ("0".equals(bean.getDocumentDirId())) return;
|
||||
//添加到当前选中的集合中
|
||||
mSelCatalog.add(bean);
|
||||
mTypeAdapter.setData(mSelCatalog);
|
||||
@ -440,6 +442,14 @@ public class ChooseDocTypeActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull List<DocumentTypeList> documentTypeLists) {
|
||||
if ("0".equals(mSelCatalogId)) {
|
||||
DocumentTypeList rootBean = new DocumentTypeList();
|
||||
rootBean.setChecked(false);
|
||||
rootBean.setDirName("根目录");
|
||||
rootBean.setDocumentDirPid("0");
|
||||
rootBean.setDocumentDirId("0");
|
||||
documentTypeLists.add(0,rootBean);
|
||||
}
|
||||
if (documentTypeLists.size() > 0) {
|
||||
mCsvState.setState(CustomStateView.STATE_SUCCESS);
|
||||
mDatas.addAll(documentTypeLists);
|
||||
|
@ -77,6 +77,7 @@ public class NoticeListActivity extends BaseActivity {
|
||||
|
||||
private List<NoticeListBean.RowsBean> mDatas;
|
||||
private NoticeAdapter mAdapter;
|
||||
private String mId;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
@ -86,7 +87,9 @@ public class NoticeListActivity extends BaseActivity {
|
||||
@Override
|
||||
public void initData() {
|
||||
ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("通知公告");
|
||||
mId = getIntent().getStringExtra("id");
|
||||
String title = getIntent().getStringExtra("title");
|
||||
mTvBaseTitle.setText(title);
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
refreshPageState(STATE_LOAD_LOADING);
|
||||
initViews();
|
||||
@ -243,7 +246,7 @@ public class NoticeListActivity extends BaseActivity {
|
||||
String end = mTvEndDate.getText().toString().trim();
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getNoticeList("2", PathConfig.NOTICE_CONFIG_ID, start, end, mKeywords, mCurrentPage + "", "20")
|
||||
.getNoticeList("2", mId, start, end, mKeywords, mCurrentPage + "", "20")
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<NoticeListBean>() {
|
||||
@Override
|
||||
|
@ -13,6 +13,10 @@ import android.widget.RadioGroup;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
||||
@ -32,6 +36,7 @@ import com.tenlionsoft.baselib.utils.TimeUtils;
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.R2;
|
||||
import com.tenlionsoft.oamodule.adapter.MineTodoAdapter;
|
||||
import com.tenlionsoft.oamodule.beans.MineApplyBean;
|
||||
import com.tenlionsoft.oamodule.beans.MineDoneBean;
|
||||
import com.tenlionsoft.oamodule.beans.MineTodoBean;
|
||||
import com.tenlionsoft.oamodule.net.OAApi;
|
||||
@ -39,9 +44,6 @@ import com.tenlionsoft.oamodule.net.OAApi;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
@ -85,7 +87,7 @@ public class MineTodoActivity extends BaseActivity {
|
||||
@BindView(R2.id.tv_end_date)
|
||||
TextView mTvEndDate;
|
||||
private List<Object> mDatas;
|
||||
private int mType = 1;//1我的待办 2我的已办
|
||||
private int mType = 1;//1我的待办 2我的已办 3我发起的
|
||||
private MineTodoAdapter mAdapter;
|
||||
private int mCurrentPage = 1;
|
||||
private String mKeywords = "";
|
||||
@ -100,10 +102,10 @@ public class MineTodoActivity extends BaseActivity {
|
||||
ButterKnife.bind(this);
|
||||
mRlTitleBar.setVisibility(View.GONE);
|
||||
ImmersionBar.with(this)
|
||||
.statusBarDarkFont(true)
|
||||
.statusBarColor(R.color.gray_bg)
|
||||
.titleBar(mRlContentTitle)
|
||||
.init();
|
||||
.statusBarDarkFont(true)
|
||||
.statusBarColor(R.color.gray_bg)
|
||||
.titleBar(mRlContentTitle)
|
||||
.init();
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mCsvState.setState(CustomStateView.STATE_LOAD);
|
||||
initViews();
|
||||
@ -126,6 +128,8 @@ public class MineTodoActivity extends BaseActivity {
|
||||
} else if (checkedId == R.id.rb_mine) {
|
||||
//我已办
|
||||
mType = 2;
|
||||
} else if (checkedId == R.id.rb_mine_apply) {
|
||||
mType = 3;
|
||||
}
|
||||
//重置搜索条件
|
||||
resetCondition();
|
||||
@ -139,18 +143,26 @@ public class MineTodoActivity extends BaseActivity {
|
||||
//我的待办
|
||||
MineTodoBean.RowsBean b = (MineTodoBean.RowsBean) o;
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_OAFLOW_CENTER)
|
||||
.withString("title", b.getMainTitle())
|
||||
.withSerializable("bean", b)
|
||||
.navigation(mActivity, 12);
|
||||
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_OAFLOW_CENTER)
|
||||
.withString("title", b.getMainTitle())
|
||||
.withSerializable("bean", b)
|
||||
.navigation(mActivity, 12);
|
||||
} else if (o instanceof MineDoneBean.RowsBean) {
|
||||
//我的已办
|
||||
MineDoneBean.RowsBean b = (MineDoneBean.RowsBean) o;
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_OAFLOW_CENTER)
|
||||
.withString("title", b.getTaskName())
|
||||
.withSerializable("bean", b)
|
||||
.navigation(mActivity, 12);
|
||||
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_OAFLOW_CENTER)
|
||||
.withString("title", b.getTaskName())
|
||||
.withSerializable("bean", b)
|
||||
.navigation(mActivity, 12);
|
||||
} else if (true) {
|
||||
//我发起的
|
||||
MineApplyBean.RowsBean b = (MineApplyBean.RowsBean) o;
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_OAFLOW_CENTER)
|
||||
.withString("title", b.getProcessDefinitionName())
|
||||
.withSerializable("bean", b)
|
||||
.navigation(mActivity, 12);
|
||||
}
|
||||
});
|
||||
doRefresh();
|
||||
@ -209,13 +221,13 @@ public class MineTodoActivity extends BaseActivity {
|
||||
break;
|
||||
}
|
||||
})
|
||||
.setTitleText("请选时间")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.isDialog(false)
|
||||
.setType(new boolean[]{true, true, true, false, false, false})
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
.setTitleText("请选时间")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.isDialog(false)
|
||||
.setType(new boolean[]{true, true, true, false, false, false})
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mTimePickerView.show();
|
||||
}
|
||||
|
||||
@ -225,8 +237,10 @@ public class MineTodoActivity extends BaseActivity {
|
||||
private void doLoadMore() {
|
||||
if (mType == 1) {
|
||||
getMineTodoList(mCurrentPage);
|
||||
} else {
|
||||
} else if (mType == 2) {
|
||||
getMineDoneList(mCurrentPage);
|
||||
} else {
|
||||
getMineApplyList(mCurrentPage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -239,146 +253,223 @@ public class MineTodoActivity extends BaseActivity {
|
||||
mAdapter.setData(mDatas);
|
||||
if (mType == 1) {
|
||||
getMineTodoList(1);
|
||||
} else {
|
||||
} else if (mType == 2) {
|
||||
getMineDoneList(1);
|
||||
} else {
|
||||
getMineApplyList(1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取我发起的
|
||||
*
|
||||
* @param i
|
||||
*/
|
||||
private void getMineApplyList(int currentPage) {
|
||||
mCurrentPage = currentPage;
|
||||
String start = mTvStartDate.getText().toString().trim();
|
||||
String end = mTvEndDate.getText().toString().trim();
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getMineApplyList(mKeywords, start, end, mCurrentPage + "")
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<MineApplyBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull MineApplyBean listBean) {
|
||||
if (listBean.getRows() != null && listBean.getRows().size() > 0) {
|
||||
++mCurrentPage;
|
||||
if (currentPage == 1) {
|
||||
mDatas.clear();
|
||||
mDatas.addAll(listBean.getRows());
|
||||
} else {
|
||||
mDatas.addAll(listBean.getRows());
|
||||
}
|
||||
mCsvState.setState(CustomStateView.STATE_SUCCESS);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mSrlContent.finishRefresh();
|
||||
if (mDatas.size() >= listBean.getTotal()) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(true);
|
||||
} else {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(false);
|
||||
}
|
||||
} else {
|
||||
mSrlContent.finishRefresh();
|
||||
mSrlContent.finishLoadMore();
|
||||
if (currentPage > 1) {
|
||||
mSrlContent.setNoMoreData(true);
|
||||
} else {
|
||||
if (TextUtils.isEmpty(mKeywords)) {
|
||||
//无数据
|
||||
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
||||
} else {
|
||||
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
||||
ToastUtils.show("未查询到相关内容");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.finishRefresh();
|
||||
ExceptionHandler.handleException(e);
|
||||
mCsvState.setState(CustomStateView.STATE_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取我的待办
|
||||
*
|
||||
* @param currentPage
|
||||
*/
|
||||
private void getMineTodoList(int currentPage) {
|
||||
mCurrentPage = currentPage;
|
||||
String start = mTvStartDate.getText().toString().trim();
|
||||
String end = mTvEndDate.getText().toString().trim();
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getMineTodoList(mKeywords, start, end, mCurrentPage + "")
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<MineTodoBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
.create(OAApi.class)
|
||||
.getMineTodoList(mKeywords, start, end, mCurrentPage + "")
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<MineTodoBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull MineTodoBean listBean) {
|
||||
if (listBean.getRows() != null && listBean.getRows().size() > 0) {
|
||||
++mCurrentPage;
|
||||
if (currentPage == 1) {
|
||||
mDatas.clear();
|
||||
mDatas.addAll(listBean.getRows());
|
||||
} else {
|
||||
mDatas.addAll(listBean.getRows());
|
||||
}
|
||||
mCsvState.setState(CustomStateView.STATE_SUCCESS);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mSrlContent.finishRefresh();
|
||||
if (mDatas.size() >= listBean.getTotal()) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(true);
|
||||
} else {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(false);
|
||||
}
|
||||
} else {
|
||||
mSrlContent.finishRefresh();
|
||||
mSrlContent.finishLoadMore();
|
||||
if (currentPage > 1) {
|
||||
mSrlContent.setNoMoreData(true);
|
||||
} else {
|
||||
if (TextUtils.isEmpty(mKeywords)) {
|
||||
//无数据
|
||||
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
||||
@Override
|
||||
public void onNext(@NonNull MineTodoBean listBean) {
|
||||
if (listBean.getRows() != null && listBean.getRows().size() > 0) {
|
||||
++mCurrentPage;
|
||||
if (currentPage == 1) {
|
||||
mDatas.clear();
|
||||
mDatas.addAll(listBean.getRows());
|
||||
} else {
|
||||
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
||||
ToastUtils.show("未查询到相关内容");
|
||||
mDatas.addAll(listBean.getRows());
|
||||
}
|
||||
mCsvState.setState(CustomStateView.STATE_SUCCESS);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mSrlContent.finishRefresh();
|
||||
if (mDatas.size() >= listBean.getTotal()) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(true);
|
||||
} else {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(false);
|
||||
}
|
||||
} else {
|
||||
mSrlContent.finishRefresh();
|
||||
mSrlContent.finishLoadMore();
|
||||
if (currentPage > 1) {
|
||||
mSrlContent.setNoMoreData(true);
|
||||
} else {
|
||||
if (TextUtils.isEmpty(mKeywords)) {
|
||||
//无数据
|
||||
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
||||
} else {
|
||||
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
||||
ToastUtils.show("未查询到相关内容");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.finishRefresh();
|
||||
ExceptionHandler.handleException(e);
|
||||
mCsvState.setState(CustomStateView.STATE_ERROR);
|
||||
}
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.finishRefresh();
|
||||
ExceptionHandler.handleException(e);
|
||||
mCsvState.setState(CustomStateView.STATE_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取被督办的列表
|
||||
* 获取我的已办
|
||||
*/
|
||||
private void getMineDoneList(int currentPage) {
|
||||
mCurrentPage = currentPage;
|
||||
String start = mTvStartDate.getText().toString().trim();
|
||||
String end = mTvEndDate.getText().toString().trim();
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getMineDoneList(mKeywords, start, end, mCurrentPage + "")
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<MineDoneBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
.create(OAApi.class)
|
||||
.getMineDoneList(mKeywords, start, end, mCurrentPage + "")
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<MineDoneBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull MineDoneBean listBean) {
|
||||
if (listBean.getRows() != null && listBean.getRows().size() > 0) {
|
||||
++mCurrentPage;
|
||||
if (currentPage == 1) {
|
||||
mDatas.clear();
|
||||
mDatas.addAll(listBean.getRows());
|
||||
} else {
|
||||
mDatas.addAll(listBean.getRows());
|
||||
}
|
||||
mCsvState.setState(CustomStateView.STATE_SUCCESS);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mSrlContent.finishRefresh();
|
||||
if (mDatas.size() >= listBean.getTotal()) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(true);
|
||||
} else {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(false);
|
||||
}
|
||||
} else {
|
||||
mSrlContent.finishRefresh();
|
||||
mSrlContent.finishLoadMore();
|
||||
if (currentPage > 1) {
|
||||
mSrlContent.setNoMoreData(true);
|
||||
} else {
|
||||
if (TextUtils.isEmpty(mKeywords)) {
|
||||
//无数据
|
||||
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
||||
@Override
|
||||
public void onNext(@NonNull MineDoneBean listBean) {
|
||||
if (listBean.getRows() != null && listBean.getRows().size() > 0) {
|
||||
++mCurrentPage;
|
||||
if (currentPage == 1) {
|
||||
mDatas.clear();
|
||||
mDatas.addAll(listBean.getRows());
|
||||
} else {
|
||||
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
||||
ToastUtils.show("未查询到相关内容");
|
||||
mDatas.addAll(listBean.getRows());
|
||||
}
|
||||
mCsvState.setState(CustomStateView.STATE_SUCCESS);
|
||||
mAdapter.notifyDataSetChanged();
|
||||
mSrlContent.finishRefresh();
|
||||
if (mDatas.size() >= listBean.getTotal()) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(true);
|
||||
} else {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.setNoMoreData(false);
|
||||
}
|
||||
} else {
|
||||
mSrlContent.finishRefresh();
|
||||
mSrlContent.finishLoadMore();
|
||||
if (currentPage > 1) {
|
||||
mSrlContent.setNoMoreData(true);
|
||||
} else {
|
||||
if (TextUtils.isEmpty(mKeywords)) {
|
||||
//无数据
|
||||
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
||||
} else {
|
||||
mCsvState.setState(CustomStateView.STATE_EMPTY);
|
||||
ToastUtils.show("未查询到相关内容");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.finishRefresh();
|
||||
ExceptionHandler.handleException(e);
|
||||
mCsvState.setState(CustomStateView.STATE_ERROR);
|
||||
}
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mSrlContent.finishLoadMore();
|
||||
mSrlContent.finishRefresh();
|
||||
ExceptionHandler.handleException(e);
|
||||
mCsvState.setState(CustomStateView.STATE_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
@ -78,6 +78,7 @@ import com.tenlionsoft.oamodule.beans.CarBean;
|
||||
import com.tenlionsoft.oamodule.beans.ChoosePersonListBean;
|
||||
import com.tenlionsoft.oamodule.beans.DriverBean;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingRoomBean;
|
||||
import com.tenlionsoft.oamodule.beans.MineApplyBean;
|
||||
import com.tenlionsoft.oamodule.beans.MineDoneBean;
|
||||
import com.tenlionsoft.oamodule.beans.MineReadBean;
|
||||
import com.tenlionsoft.oamodule.beans.MineTodoBean;
|
||||
@ -653,6 +654,21 @@ public class OaFlowCenterActivity extends BaseActivity {
|
||||
params.put("type", "show");
|
||||
params.put("processId", b.getProcessInstanceId());
|
||||
params.put("taskId", b.getReportUid());
|
||||
}else if(mBean instanceof MineApplyBean.RowsBean){
|
||||
//我的已办
|
||||
MineApplyBean.RowsBean b = (MineApplyBean.RowsBean) mBean;
|
||||
String url = String.format(mActivity.getResources()
|
||||
.getString(R.string.mine_todo_detail),
|
||||
b.getFormCode(),
|
||||
b.getFormVersion() + "",
|
||||
UserLgUtils.getToken(),
|
||||
b.getReportUid(),
|
||||
b.getProcessInstanceId());
|
||||
String path = BaseUrlApi.BASE_OA + url;
|
||||
params.put("url", path);
|
||||
params.put("type", "show");
|
||||
params.put("processId", b.getProcessInstanceId());
|
||||
params.put("taskId", "");
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,99 @@
|
||||
package com.tenlionsoft.oamodule.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.beans.NoticeTabListBean;
|
||||
|
||||
import net.lucode.hackware.magicindicator.MagicIndicator;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.CommonNavigatorAdapter;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerIndicator;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.indicators.LinePagerIndicator;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.CommonPagerTitleView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2021/11/4 - 3:17 下午
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述: viewpage2简单指示器
|
||||
*/
|
||||
public class ListNavigatorAdapter extends CommonNavigatorAdapter {
|
||||
private List<NoticeTabListBean> mTitles;
|
||||
private Context mContext;
|
||||
private MagicIndicator mMiTabs;
|
||||
|
||||
public ListNavigatorAdapter(Context ctx, List<NoticeTabListBean> titles, MagicIndicator magicIndicator) {
|
||||
this.mTitles = titles;
|
||||
this.mContext = ctx;
|
||||
mMiTabs = magicIndicator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mTitles.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPagerTitleView getTitleView(Context context, int index) {
|
||||
CommonPagerTitleView titleView = new CommonPagerTitleView(context);
|
||||
titleView.setContentView(R.layout.item_tab_custom_text_view);
|
||||
TextView tvTitle = titleView.findViewById(R.id.tv_tab_title);
|
||||
tvTitle.setText(mTitles.get(index).getDesktopTitleName());
|
||||
titleView.setOnPagerTitleChangeListener(new CommonPagerTitleView.OnPagerTitleChangeListener() {
|
||||
@Override
|
||||
public void onSelected(int index, int totalCount) {
|
||||
tvTitle.setTextColor(Color.parseColor("#2262FB"));
|
||||
tvTitle.setTextSize(15);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeselected(int index, int totalCount) {
|
||||
tvTitle.setTextColor(Color.BLACK);
|
||||
tvTitle.setTextSize(14);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLeave(int index, int totalCount, float leavePercent, boolean leftToRight) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnter(int index, int totalCount, float enterPercent, boolean leftToRight) {
|
||||
|
||||
}
|
||||
});
|
||||
titleView.setOnClickListener(v -> {
|
||||
mMiTabs.onPageSelected(index);
|
||||
mMiTabs.onPageScrolled(index,0f,0);
|
||||
if (mListener != null) {
|
||||
mListener.onChange(index, mTitles.get(index));
|
||||
}
|
||||
});
|
||||
return titleView;
|
||||
}
|
||||
|
||||
private OnChangeListener mListener;
|
||||
|
||||
public void addOnChangeListener(OnChangeListener listener) {
|
||||
this.mListener = listener;
|
||||
}
|
||||
|
||||
public interface OnChangeListener {
|
||||
void onChange(int index, NoticeTabListBean b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPagerIndicator getIndicator(Context context) {
|
||||
LinePagerIndicator indicator = new LinePagerIndicator(context);
|
||||
indicator.setMode(LinePagerIndicator.MODE_EXACTLY);
|
||||
indicator.setRoundRadius(5);
|
||||
indicator.setLineWidth(15);
|
||||
indicator.setColors(Color.parseColor("#2262FB"));
|
||||
return indicator;
|
||||
}
|
||||
}
|
@ -8,6 +8,7 @@ import android.view.ViewGroup;
|
||||
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.beans.MineApplyBean;
|
||||
import com.tenlionsoft.oamodule.beans.MineDoneBean;
|
||||
import com.tenlionsoft.oamodule.beans.MineTodoBean;
|
||||
import com.tenlionsoft.oamodule.holder.MineTodoHolder;
|
||||
@ -49,6 +50,13 @@ public class MineTodoAdapter extends BaseRecyclerAdapter<Object, MineTodoHolder>
|
||||
h.mTvTitle.setText(b.getMainTitle());
|
||||
h.mTvName.setText(b.getTaskName());
|
||||
h.mTvState.setVisibility(View.GONE);
|
||||
} else if (o instanceof MineApplyBean.RowsBean) {
|
||||
MineApplyBean.RowsBean b = (MineApplyBean.RowsBean) o;
|
||||
h.mTvTitle.setTextColor(Color.BLACK);
|
||||
h.mTvTime.setText(b.getStartTime());
|
||||
h.mTvTitle.setText(b.getProcessDefinitionName());
|
||||
h.mTvName.setText(b.getEndTime());
|
||||
h.mTvState.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,155 @@
|
||||
package com.tenlionsoft.oamodule.beans;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class MineApplyBean {
|
||||
|
||||
private int page;
|
||||
private List<RowsBean> rows;
|
||||
private int total;
|
||||
|
||||
public int getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(int page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public List<RowsBean> getRows() {
|
||||
return rows;
|
||||
}
|
||||
|
||||
public void setRows(List<RowsBean> rows) {
|
||||
this.rows = rows;
|
||||
}
|
||||
|
||||
public int getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(int total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public static class RowsBean implements Serializable {
|
||||
private String deploymentId;
|
||||
private String endTime;
|
||||
private String formCode;
|
||||
private int formVersion;
|
||||
private String processDefinitionId;
|
||||
private String processDefinitionKey;
|
||||
private String processDefinitionName;
|
||||
private int processDefinitionVersion;
|
||||
private String processInstanceId;
|
||||
private String reportUid;
|
||||
private String startActivityId;
|
||||
private String startTime;
|
||||
private String startUserId;
|
||||
|
||||
public String getDeploymentId() {
|
||||
return deploymentId;
|
||||
}
|
||||
|
||||
public void setDeploymentId(String deploymentId) {
|
||||
this.deploymentId = deploymentId;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getFormCode() {
|
||||
return formCode;
|
||||
}
|
||||
|
||||
public void setFormCode(String formCode) {
|
||||
this.formCode = formCode;
|
||||
}
|
||||
|
||||
public int getFormVersion() {
|
||||
return formVersion;
|
||||
}
|
||||
|
||||
public void setFormVersion(int formVersion) {
|
||||
this.formVersion = formVersion;
|
||||
}
|
||||
|
||||
public String getProcessDefinitionId() {
|
||||
return processDefinitionId;
|
||||
}
|
||||
|
||||
public void setProcessDefinitionId(String processDefinitionId) {
|
||||
this.processDefinitionId = processDefinitionId;
|
||||
}
|
||||
|
||||
public String getProcessDefinitionKey() {
|
||||
return processDefinitionKey;
|
||||
}
|
||||
|
||||
public void setProcessDefinitionKey(String processDefinitionKey) {
|
||||
this.processDefinitionKey = processDefinitionKey;
|
||||
}
|
||||
|
||||
public String getProcessDefinitionName() {
|
||||
return processDefinitionName;
|
||||
}
|
||||
|
||||
public void setProcessDefinitionName(String processDefinitionName) {
|
||||
this.processDefinitionName = processDefinitionName;
|
||||
}
|
||||
|
||||
public int getProcessDefinitionVersion() {
|
||||
return processDefinitionVersion;
|
||||
}
|
||||
|
||||
public void setProcessDefinitionVersion(int processDefinitionVersion) {
|
||||
this.processDefinitionVersion = processDefinitionVersion;
|
||||
}
|
||||
|
||||
public String getProcessInstanceId() {
|
||||
return processInstanceId;
|
||||
}
|
||||
|
||||
public void setProcessInstanceId(String processInstanceId) {
|
||||
this.processInstanceId = processInstanceId;
|
||||
}
|
||||
|
||||
public String getReportUid() {
|
||||
return reportUid;
|
||||
}
|
||||
|
||||
public void setReportUid(String reportUid) {
|
||||
this.reportUid = reportUid;
|
||||
}
|
||||
|
||||
public String getStartActivityId() {
|
||||
return startActivityId;
|
||||
}
|
||||
|
||||
public void setStartActivityId(String startActivityId) {
|
||||
this.startActivityId = startActivityId;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getStartUserId() {
|
||||
return startUserId;
|
||||
}
|
||||
|
||||
public void setStartUserId(String startUserId) {
|
||||
this.startUserId = startUserId;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,212 @@
|
||||
package com.tenlionsoft.oamodule.beans;
|
||||
|
||||
public class NoticeTabListBean {
|
||||
|
||||
private String beoverdueTime;
|
||||
private String checkSwitch;
|
||||
private String commentSwitch;
|
||||
private double configOrder;
|
||||
private String configSwitch;
|
||||
private String configUserRange;
|
||||
private String creator;
|
||||
private String deleteSwitch;
|
||||
private String desktopTitleName;
|
||||
private String desktopViewSwitch;
|
||||
private String gmtCreate;
|
||||
private String gmtModified;
|
||||
private String iconFileSwitch;
|
||||
private String isDelete;
|
||||
private String menuNameManager;
|
||||
private String menuNameView;
|
||||
private String modifier;
|
||||
private String noticeConfigId;
|
||||
private String publishRange;
|
||||
private String remark;
|
||||
private String rollSwitch;
|
||||
private String uploadFileSwitch;
|
||||
private String watermarkContent;
|
||||
|
||||
public String getBeoverdueTime() {
|
||||
return beoverdueTime;
|
||||
}
|
||||
|
||||
public void setBeoverdueTime(String beoverdueTime) {
|
||||
this.beoverdueTime = beoverdueTime;
|
||||
}
|
||||
|
||||
public String getCheckSwitch() {
|
||||
return checkSwitch;
|
||||
}
|
||||
|
||||
public void setCheckSwitch(String checkSwitch) {
|
||||
this.checkSwitch = checkSwitch;
|
||||
}
|
||||
|
||||
public String getCommentSwitch() {
|
||||
return commentSwitch;
|
||||
}
|
||||
|
||||
public void setCommentSwitch(String commentSwitch) {
|
||||
this.commentSwitch = commentSwitch;
|
||||
}
|
||||
|
||||
public double getConfigOrder() {
|
||||
return configOrder;
|
||||
}
|
||||
|
||||
public void setConfigOrder(double configOrder) {
|
||||
this.configOrder = configOrder;
|
||||
}
|
||||
|
||||
public String getConfigSwitch() {
|
||||
return configSwitch;
|
||||
}
|
||||
|
||||
public void setConfigSwitch(String configSwitch) {
|
||||
this.configSwitch = configSwitch;
|
||||
}
|
||||
|
||||
public String getConfigUserRange() {
|
||||
return configUserRange;
|
||||
}
|
||||
|
||||
public void setConfigUserRange(String configUserRange) {
|
||||
this.configUserRange = configUserRange;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getDeleteSwitch() {
|
||||
return deleteSwitch;
|
||||
}
|
||||
|
||||
public void setDeleteSwitch(String deleteSwitch) {
|
||||
this.deleteSwitch = deleteSwitch;
|
||||
}
|
||||
|
||||
public String getDesktopTitleName() {
|
||||
return desktopTitleName;
|
||||
}
|
||||
|
||||
public void setDesktopTitleName(String desktopTitleName) {
|
||||
this.desktopTitleName = desktopTitleName;
|
||||
}
|
||||
|
||||
public String getDesktopViewSwitch() {
|
||||
return desktopViewSwitch;
|
||||
}
|
||||
|
||||
public void setDesktopViewSwitch(String desktopViewSwitch) {
|
||||
this.desktopViewSwitch = desktopViewSwitch;
|
||||
}
|
||||
|
||||
public String getGmtCreate() {
|
||||
return gmtCreate;
|
||||
}
|
||||
|
||||
public void setGmtCreate(String gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public String getGmtModified() {
|
||||
return gmtModified;
|
||||
}
|
||||
|
||||
public void setGmtModified(String gmtModified) {
|
||||
this.gmtModified = gmtModified;
|
||||
}
|
||||
|
||||
public String getIconFileSwitch() {
|
||||
return iconFileSwitch;
|
||||
}
|
||||
|
||||
public void setIconFileSwitch(String iconFileSwitch) {
|
||||
this.iconFileSwitch = iconFileSwitch;
|
||||
}
|
||||
|
||||
public String getIsDelete() {
|
||||
return isDelete;
|
||||
}
|
||||
|
||||
public void setIsDelete(String isDelete) {
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
public String getMenuNameManager() {
|
||||
return menuNameManager;
|
||||
}
|
||||
|
||||
public void setMenuNameManager(String menuNameManager) {
|
||||
this.menuNameManager = menuNameManager;
|
||||
}
|
||||
|
||||
public String getMenuNameView() {
|
||||
return menuNameView;
|
||||
}
|
||||
|
||||
public void setMenuNameView(String menuNameView) {
|
||||
this.menuNameView = menuNameView;
|
||||
}
|
||||
|
||||
public String getModifier() {
|
||||
return modifier;
|
||||
}
|
||||
|
||||
public void setModifier(String modifier) {
|
||||
this.modifier = modifier;
|
||||
}
|
||||
|
||||
public String getNoticeConfigId() {
|
||||
return noticeConfigId;
|
||||
}
|
||||
|
||||
public void setNoticeConfigId(String noticeConfigId) {
|
||||
this.noticeConfigId = noticeConfigId;
|
||||
}
|
||||
|
||||
public String getPublishRange() {
|
||||
return publishRange;
|
||||
}
|
||||
|
||||
public void setPublishRange(String publishRange) {
|
||||
this.publishRange = publishRange;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getRollSwitch() {
|
||||
return rollSwitch;
|
||||
}
|
||||
|
||||
public void setRollSwitch(String rollSwitch) {
|
||||
this.rollSwitch = rollSwitch;
|
||||
}
|
||||
|
||||
public String getUploadFileSwitch() {
|
||||
return uploadFileSwitch;
|
||||
}
|
||||
|
||||
public void setUploadFileSwitch(String uploadFileSwitch) {
|
||||
this.uploadFileSwitch = uploadFileSwitch;
|
||||
}
|
||||
|
||||
public String getWatermarkContent() {
|
||||
return watermarkContent;
|
||||
}
|
||||
|
||||
public void setWatermarkContent(String watermarkContent) {
|
||||
this.watermarkContent = watermarkContent;
|
||||
}
|
||||
}
|
@ -187,13 +187,14 @@ public class DocFragment extends BaseFragment {
|
||||
mSelCatalogAdapter.setData(mSelCatalog);
|
||||
mSelCatalogId = b.getDocumentDirId();
|
||||
doRefresh();
|
||||
} else if (rowsBean instanceof DocumentListBean) {
|
||||
} else if (rowsBean instanceof DocumentListBean.RowsBean) {
|
||||
DocumentListBean.RowsBean b = (DocumentListBean.RowsBean) rowsBean;
|
||||
Intent intent = new Intent(mActivity, DocumentDetailActivity.class);
|
||||
intent.putExtra("id", b.getDocumentFileId());
|
||||
intent.putExtra("type", mType);
|
||||
mLauncher.launch(intent);
|
||||
}
|
||||
LogUtils.e(rowsBean instanceof DocumentListBean.RowsBean);
|
||||
});
|
||||
|
||||
|
||||
|
@ -52,13 +52,18 @@ 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.ListNavigatorAdapter;
|
||||
import com.tenlionsoft.oamodule.adapter.NoticeShowAdapter;
|
||||
import com.tenlionsoft.oamodule.beans.BySuperviseListBean;
|
||||
import com.tenlionsoft.oamodule.beans.NoticeListBean;
|
||||
import com.tenlionsoft.oamodule.beans.NoticeTabListBean;
|
||||
import com.tenlionsoft.oamodule.beans.ToDoCountBean;
|
||||
import com.tenlionsoft.oamodule.beans.UnReadCountBean;
|
||||
import com.tenlionsoft.oamodule.net.OAApi;
|
||||
|
||||
import net.lucode.hackware.magicindicator.MagicIndicator;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.CommonNavigator;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -132,6 +137,10 @@ public class OaMainFragment extends BaseFragment {
|
||||
LinearLayout mLlTodoCount;
|
||||
@BindView(R2.id.ll_unread_count)
|
||||
LinearLayout mLlUnreadCount;
|
||||
@BindView(R2.id.mi_notice_tabs)
|
||||
MagicIndicator mMiTabs;
|
||||
@BindView(R2.id.ll_notice_tab)
|
||||
LinearLayout mLlNoticeTab;
|
||||
@BindView(R2.id.ll_supervise_count)
|
||||
LinearLayout mLlSuperviseCount;
|
||||
private List<FuncBean> mFuncBeans;
|
||||
@ -139,6 +148,8 @@ public class OaMainFragment extends BaseFragment {
|
||||
private ActivityResultLauncher<Intent> mLauncher;
|
||||
private NoticeShowAdapter mNoticeShowAdapter;
|
||||
private List<NoticeListBean.RowsBean> mNoticeListBeanRows;
|
||||
private String mCurrentNoticeId;
|
||||
private String mCurrentNoticeTitle;
|
||||
|
||||
@Override
|
||||
protected int getContentViewId() {
|
||||
@ -195,6 +206,8 @@ public class OaMainFragment extends BaseFragment {
|
||||
|
||||
mTvNoticeMore.setOnClickListener(v -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_NOTICE)
|
||||
.withString("id", mCurrentNoticeId)
|
||||
.withString("title", mCurrentNoticeTitle)
|
||||
.navigation());//通知公告更多
|
||||
mIvScan.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(mActivity, CaptureActivity.class);
|
||||
@ -223,7 +236,7 @@ public class OaMainFragment extends BaseFragment {
|
||||
//获取菜单
|
||||
getMainMenuList();
|
||||
//获取通知公告
|
||||
getNoticeList();
|
||||
getNoticeTabs();
|
||||
mSrlContent.finishRefresh();
|
||||
}
|
||||
|
||||
@ -271,10 +284,64 @@ public class OaMainFragment extends BaseFragment {
|
||||
});
|
||||
}
|
||||
|
||||
private void getNoticeList() {
|
||||
/**
|
||||
* 获取新闻类别
|
||||
*/
|
||||
private void getNoticeTabs() {
|
||||
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getNoticeList("2", PathConfig.NOTICE_CONFIG_ID, "", "", "", "1", "15")
|
||||
.getNoticeTabList()
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<List<NoticeTabListBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@io.reactivex.rxjava3.annotations.NonNull List<NoticeTabListBean> noticeTabListBeans) {
|
||||
if (noticeTabListBeans != null && noticeTabListBeans.size() > 0) {
|
||||
CommonNavigator commonNavigator = new CommonNavigator(mActivity);
|
||||
ListNavigatorAdapter adapter = new ListNavigatorAdapter(mActivity, noticeTabListBeans, mMiTabs);
|
||||
commonNavigator.setAdapter(adapter);
|
||||
commonNavigator.setAdjustMode(false);
|
||||
mMiTabs.setNavigator(commonNavigator);
|
||||
adapter.addOnChangeListener((index, b) -> {
|
||||
mCurrentNoticeId = b.getNoticeConfigId();
|
||||
mCurrentNoticeTitle = b.getDesktopTitleName();
|
||||
mCsvNotice.setVisibility(View.VISIBLE);
|
||||
getNoticeList(mCurrentNoticeId);
|
||||
});
|
||||
getNoticeList(noticeTabListBeans.get(0).getNoticeConfigId());//默认获取第一条数据
|
||||
mCurrentNoticeId = noticeTabListBeans.get(0).getNoticeConfigId();
|
||||
mCurrentNoticeTitle = noticeTabListBeans.get(0).getDesktopTitleName();
|
||||
} else {
|
||||
mRlvNotice.setVisibility(View.GONE);
|
||||
mCsvNotice.setVisibility(View.VISIBLE);
|
||||
mCsvNotice.setState(CustomStateView.STATE_EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) {
|
||||
mRlvNotice.setVisibility(View.GONE);
|
||||
mCsvNotice.setState(CustomStateView.STATE_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void getNoticeList(String id) {
|
||||
mNoticeListBeanRows.clear();
|
||||
mNoticeShowAdapter.setData(mNoticeListBeanRows);
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getNoticeList("2", id, "", "", "", "1", "15")
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<NoticeListBean>() {
|
||||
@Override
|
||||
|
@ -32,6 +32,7 @@ import com.tenlionsoft.oamodule.beans.MeetingQrBean;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingRecordListBean;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingRoomBean;
|
||||
import com.tenlionsoft.oamodule.beans.MeetingRoomRecordBean;
|
||||
import com.tenlionsoft.oamodule.beans.MineApplyBean;
|
||||
import com.tenlionsoft.oamodule.beans.MineDoneBean;
|
||||
import com.tenlionsoft.oamodule.beans.MineJoinMeetingListBean;
|
||||
import com.tenlionsoft.oamodule.beans.MineReadBean;
|
||||
@ -41,6 +42,7 @@ import com.tenlionsoft.oamodule.beans.NewsListBean;
|
||||
import com.tenlionsoft.oamodule.beans.NewsTypeBean;
|
||||
import com.tenlionsoft.oamodule.beans.NoticeCommentListBean;
|
||||
import com.tenlionsoft.oamodule.beans.NoticeListBean;
|
||||
import com.tenlionsoft.oamodule.beans.NoticeTabListBean;
|
||||
import com.tenlionsoft.oamodule.beans.OaFlowApplyBean;
|
||||
import com.tenlionsoft.oamodule.beans.OaFlowLogBean;
|
||||
import com.tenlionsoft.oamodule.beans.RoutineAcceptListBean;
|
||||
@ -1050,6 +1052,14 @@ public interface OAApi {
|
||||
Observable<MineDoneBean> getMineDoneList(@Query("keywords") String key, @Query("startTime") String start, @Query(
|
||||
"endTime") String end, @Query("page") String page);
|
||||
|
||||
/**
|
||||
* TODO 我发起的
|
||||
*/
|
||||
@Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/oa/base/listpage-start-of-mine")
|
||||
Observable<MineApplyBean> getMineApplyList(@Query("keywords") String key, @Query("startTime") String start, @Query(
|
||||
"endTime") String end, @Query("page") String page);
|
||||
|
||||
/**
|
||||
* 转交
|
||||
*/
|
||||
@ -1161,4 +1171,11 @@ public interface OAApi {
|
||||
@Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
|
||||
@PUT("app/indextemplaterecord/update/{indexTemplateRecordId}")
|
||||
Observable<BaseSuccessBean> doEditDataReport(@Path("indexTemplateRecordId") String id, @Body RequestBody body);
|
||||
|
||||
/**
|
||||
* 获取首页新闻列表
|
||||
*/
|
||||
@Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"})
|
||||
@GET("app/noticeconfig/listswitchview")
|
||||
Observable<List<NoticeTabListBean>> getNoticeTabList();
|
||||
}
|
||||
|
@ -73,7 +73,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/switch_custom_gray_white_right"
|
||||
android:background="@drawable/switch_custom_gray_white_center"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="10dp"
|
||||
@ -82,6 +82,20 @@
|
||||
android:paddingBottom="5dp"
|
||||
android:text="我的已办"
|
||||
android:textColor="@color/col_gray_black" />
|
||||
<RadioButton
|
||||
android:id="@+id/rb_mine_apply"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/switch_custom_gray_white_right"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="我发起的"
|
||||
android:textColor="@color/col_gray_black" />
|
||||
</RadioGroup>
|
||||
|
||||
|
||||
|
@ -84,6 +84,7 @@
|
||||
android:paddingBottom="5dp"
|
||||
android:text="我的已办"
|
||||
android:textColor="@color/col_gray_black" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
|
||||
|
@ -224,12 +224,12 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/blue_bg"
|
||||
android:visibility="gone"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="6dp">
|
||||
android:paddingBottom="6dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="17dp"
|
||||
@ -287,19 +287,33 @@
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_notice_tab"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||
android:id="@+id/mi_notice_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:background="@color/white" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_notice_icon"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_notice_title_icon" />
|
||||
android:src="@drawable/ic_notice_title_icon"
|
||||
android:visibility="gone" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -310,22 +324,24 @@
|
||||
android:text="通知公告"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/text_15"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone" />
|
||||
|
||||
<com.tenlionsoft.baselib.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_notice_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:text="查看更多 >>"
|
||||
android:text="更多 >>"
|
||||
android:textColor="#BBBBBB"
|
||||
android:textSize="12sp" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
|
Loading…
Reference in New Issue
Block a user