Jelajahi Sumber

任务中心页面完成

lichao 5 bulan lalu
induk
melakukan
7cec913833
68 mengubah file dengan 3950 tambahan dan 486 penghapusan
  1. 2 1
      app/build.gradle
  2. 5 4
      app/src/main/AndroidManifest.xml
  3. 2 0
      app/src/main/java/com/xwkj/jcjcgz/app/AppLifecyclesImpl.java
  4. 35 0
      app/src/main/java/com/xwkj/jcjcgz/app/utils/StringUtil.java
  5. 204 0
      app/src/main/java/com/xwkj/jcjcgz/app/view/AppBarLayoutBehavior.java
  6. 41 0
      app/src/main/java/com/xwkj/jcjcgz/di/component/RwfxTaskStatusComponent.java
  7. 41 0
      app/src/main/java/com/xwkj/jcjcgz/di/component/RwfxTaskTypeComponent.java
  8. 41 0
      app/src/main/java/com/xwkj/jcjcgz/di/component/TaskDxzpComponent.java
  9. 41 0
      app/src/main/java/com/xwkj/jcjcgz/di/component/TaskTypeComponent.java
  10. 30 0
      app/src/main/java/com/xwkj/jcjcgz/di/module/RwfxTaskStatusModule.java
  11. 30 0
      app/src/main/java/com/xwkj/jcjcgz/di/module/RwfxTaskTypeModule.java
  12. 30 0
      app/src/main/java/com/xwkj/jcjcgz/di/module/TaskDxzpModule.java
  13. 30 0
      app/src/main/java/com/xwkj/jcjcgz/di/module/TaskTypeModule.java
  14. 29 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/contract/RwfxTaskStatusContract.java
  15. 29 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/contract/RwfxTaskTypeContract.java
  16. 1 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/contract/RwzxContract.java
  17. 1 1
      app/src/main/java/com/xwkj/jcjcgz/mvp/contract/TaskContract.java
  18. 30 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/contract/TaskDxzpContract.java
  19. 29 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/contract/TaskTypeContract.java
  20. 46 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/model/RwfxTaskStatusModel.java
  21. 46 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/model/RwfxTaskTypeModel.java
  22. 46 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/model/TaskDxzpModel.java
  23. 46 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/model/TaskTypeModel.java
  24. 15 11
      app/src/main/java/com/xwkj/jcjcgz/mvp/model/api/ReqToBus.java
  25. 165 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/model/entity/ChannelEntity.java
  26. 111 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/model/entity/TaskDxzpEntity.java
  27. 51 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/model/entity/TaskEntity.java
  28. 3 1
      app/src/main/java/com/xwkj/jcjcgz/mvp/presenter/AppDetailPresenter.java
  29. 3 1
      app/src/main/java/com/xwkj/jcjcgz/mvp/presenter/AppListPresenter.java
  30. 29 2
      app/src/main/java/com/xwkj/jcjcgz/mvp/presenter/LoginPresenter.java
  31. 53 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/presenter/RwfxTaskStatusPresenter.java
  32. 53 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/presenter/RwfxTaskTypePresenter.java
  33. 29 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/presenter/RwzxPresenter.java
  34. 82 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/presenter/TaskDxzpPresenter.java
  35. 29 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/presenter/TaskPresenter.java
  36. 53 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/presenter/TaskTypePresenter.java
  37. 1 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/ui/activity/LoginActivity.java
  38. 2 2
      app/src/main/java/com/xwkj/jcjcgz/mvp/ui/activity/MainActivity.java
  39. 1 1
      app/src/main/java/com/xwkj/jcjcgz/mvp/ui/adapter/BaseRecycleAdapter.java
  40. 21 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/ui/adapter/RwfxTaskTypeAdapter.java
  41. 76 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/ui/adapter/TaskDxzpAdapter.java
  42. 176 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/ui/fragment/RwfxTaskStatusFragment.java
  43. 193 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/ui/fragment/RwfxTaskTypeFragment.java
  44. 202 39
      app/src/main/java/com/xwkj/jcjcgz/mvp/ui/fragment/RwzxFragment.java
  45. 222 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/ui/fragment/TaskDxzpFragment.java
  46. 24 4
      app/src/main/java/com/xwkj/jcjcgz/mvp/ui/fragment/TaskFragment.java
  47. 191 0
      app/src/main/java/com/xwkj/jcjcgz/mvp/ui/fragment/TaskTypeFragment.java
  48. 233 35
      app/src/main/java/com/xwkj/jcjcgz/mvp/ui/fragment/Test1Fragment.java
  49. TEMPAT SAMPAH
      app/src/main/res/drawable-xxxhdpi/bg_red.9.png
  50. TEMPAT SAMPAH
      app/src/main/res/drawable-xxxhdpi/bj_btn_home.png
  51. TEMPAT SAMPAH
      app/src/main/res/drawable-xxxhdpi/icon_head_default.png
  52. TEMPAT SAMPAH
      app/src/main/res/drawable-xxxhdpi/icon_id.png
  53. TEMPAT SAMPAH
      app/src/main/res/drawable-xxxhdpi/icon_phone.png
  54. 5 0
      app/src/main/res/drawable/bg_shape_1a9a5eff_corner10.xml
  55. 21 0
      app/src/main/res/drawable/task_type_progress_style.xml
  56. 26 0
      app/src/main/res/layout/fragment_rwfx_task_status.xml
  57. 19 0
      app/src/main/res/layout/fragment_rwfx_task_type.xml
  58. 253 199
      app/src/main/res/layout/fragment_rwzx.xml
  59. 24 0
      app/src/main/res/layout/fragment_task_dxzp.xml
  60. 55 0
      app/src/main/res/layout/fragment_task_type.xml
  61. 284 185
      app/src/main/res/layout/fragment_test.xml
  62. 101 0
      app/src/main/res/layout/item_dxzp.xml
  63. 74 0
      app/src/main/res/layout/item_rwfx_task_type.xml
  64. 1 0
      app/src/main/res/layout/item_task.xml
  65. 227 0
      app/src/main/res/layout/layout_rwfx.xml
  66. TEMPAT SAMPAH
      app/src/main/res/mipmap-xxxhdpi/icon_screening.png
  67. 3 0
      app/src/main/res/values/colors.xml
  68. 4 0
      app/src/main/res/xml/network_security_config.xml

+ 2 - 1
app/build.gradle

@@ -168,9 +168,10 @@ dependencies {
     implementation  'io.github.scwang90:refresh-footer-classics:2.1.0'    //经典加载
 
 
+    implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
 
 
-
+    implementation 'com.wuyr:secondfloorbehavior:1.0.4'
 
 
 

+ 5 - 4
app/src/main/AndroidManifest.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.xwkj.jcjcgz">
+    package="com.xwkj.jcjcgz" >
 
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
@@ -15,14 +15,15 @@
         android:allowBackup="true"
         android:icon="${APP_ICON}"
         android:label="@string/app_name"
+        android:networkSecurityConfig="@xml/network_security_config"
         android:supportsRtl="true"
-        android:theme="@style/AppTheme">
+        android:theme="@style/AppTheme" >
         <activity android:name=".mvp.ui.activity.Test1Activity" />
         <activity android:name=".mvp.ui.activity.LoginActivity" />
         <activity android:name=".mvp.ui.activity.AppDetailActivity" />
         <activity android:name=".mvp.ui.activity.AppListActivity" />
-<!--        <activity android:name=".mvp.ui.activity.MainActivity" />-->
-        <activity android:name=".mvp.ui.activity.MainActivity">
+        <activity android:name=".mvp.ui.activity.MainActivity" />
+        <activity android:name=".mvp.ui.activity.TestActivity" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 

+ 2 - 0
app/src/main/java/com/xwkj/jcjcgz/app/AppLifecyclesImpl.java

@@ -5,6 +5,7 @@ import android.content.Context;
 
 import androidx.annotation.NonNull;
 
+import com.hjq.toast.ToastUtils;
 import com.jess.arms.base.delegate.AppLifecycles;
 import com.jess.arms.integration.cache.IntelligentCache;
 import com.jess.arms.utils.ArmsUtils;
@@ -35,6 +36,7 @@ public class AppLifecyclesImpl implements AppLifecycles {
 
     @Override
     public void onCreate(@NonNull Application application) {
+        ToastUtils.init(application);
         if (LeakCanary.isInAnalyzerProcess(application)) {
             // This process is dedicated to LeakCanary for heap analysis.
             // You should not init your app in this process.

+ 35 - 0
app/src/main/java/com/xwkj/jcjcgz/app/utils/StringUtil.java

@@ -0,0 +1,35 @@
+package com.xwkj.jcjcgz.app.utils;
+
+import android.text.TextUtils;
+
+public class StringUtil {
+
+    /**
+     * 保留前二后二,其他替换为*
+     * @param id
+     * @return
+     */
+    public static String replaceId(String id) {
+        if (TextUtils.isEmpty(id) || id.length() != 18) {
+            return id;
+        }
+        return id.replaceAll("(?<=[\\w]{2})\\w(?=[\\w]{2})", "*");
+    }
+
+    /**
+     *
+     * @param str
+     * @return
+     */
+    public static String replaceString(String str) {
+        if (TextUtils.isEmpty(str) || str.length() < 6) {
+            return str;
+        }
+        int length = str.length();
+        if (length >= 6 && length < 11) {
+            return str.replaceAll("(?<=[\\w]{2})\\w(?=[\\w]{2})", "*");
+        }
+        return str.replaceAll("(?<=[\\w]{2})\\w(?=[\\w]{2})", "*");
+    }
+
+}

+ 204 - 0
app/src/main/java/com/xwkj/jcjcgz/app/view/AppBarLayoutBehavior.java

@@ -0,0 +1,204 @@
+package com.xwkj.jcjcgz.app.view;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.MotionEvent;
+import android.view.View;
+import android.widget.OverScroller;
+
+import androidx.coordinatorlayout.widget.CoordinatorLayout;
+
+import com.google.android.material.appbar.AppBarLayout;
+
+import java.lang.reflect.Field;
+
+/**
+ * <pre>
+ *     @author yangchong
+ *     blog  : https://github.com/yangchong211
+ *     time  : 2019/03/13
+ *     desc  : 自定义Behavior
+ *     revise: 解决appbarLayout若干问题
+ *              1)快速滑动appbarLayout会出现回弹
+ *              2)快速滑动appbarLayout到折叠状态下,立马下滑,会出现抖动的问题
+ *              3)滑动appbarLayout,无法通过手指按下让其停止滑动
+ * </pre>
+ */
+public class AppBarLayoutBehavior extends AppBarLayout.Behavior{
+
+    private static final String TAG = "AppbarLayoutBehavior";
+    private static final int TYPE_FLING = 1;
+    private boolean isFlinging;
+    private boolean shouldBlockNestedScroll;
+
+    public AppBarLayoutBehavior(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    @Override
+    public boolean onInterceptTouchEvent(CoordinatorLayout parent, AppBarLayout child, MotionEvent ev) {
+        LogUtil.d(TAG, "onInterceptTouchEvent:" + child.getTotalScrollRange());
+        shouldBlockNestedScroll = isFlinging;
+        switch (ev.getActionMasked()) {
+            case MotionEvent.ACTION_DOWN:
+                //手指触摸屏幕的时候停止fling事件
+                stopAppbarLayoutFling(child);
+                break;
+            default:
+                break;
+        }
+        return super.onInterceptTouchEvent(parent, child, ev);
+    }
+
+    /**
+     * 反射获取私有的flingRunnable 属性,考虑support 28以后变量名修改的问题
+     * @return Field
+     * @throws NoSuchFieldException
+     */
+    private Field getFlingRunnableField() throws NoSuchFieldException {
+        Class<?> superclass = this.getClass().getSuperclass();
+        try {
+            // support design 27及一下版本
+            Class<?> headerBehaviorType = null;
+            if (superclass != null) {
+                headerBehaviorType = superclass.getSuperclass();
+            }
+            if (headerBehaviorType != null) {
+                return headerBehaviorType.getDeclaredField("mFlingRunnable");
+            }else {
+                return null;
+            }
+        } catch (NoSuchFieldException e) {
+            e.printStackTrace();
+            // 可能是28及以上版本
+            Class<?> headerBehaviorType = superclass.getSuperclass().getSuperclass();
+            if (headerBehaviorType != null) {
+                return headerBehaviorType.getDeclaredField("flingRunnable");
+            } else {
+                return null;
+            }
+        }
+    }
+
+    /**
+     * 反射获取私有的scroller 属性,考虑support 28以后变量名修改的问题
+     * @return Field
+     * @throws NoSuchFieldException
+     */
+    private Field getScrollerField() throws NoSuchFieldException {
+        Class<?> superclass = this.getClass().getSuperclass();
+        try {
+            // support design 27及一下版本
+            Class<?> headerBehaviorType = null;
+            if (superclass != null) {
+                headerBehaviorType = superclass.getSuperclass();
+            }
+            if (headerBehaviorType != null) {
+                return headerBehaviorType.getDeclaredField("mScroller");
+            }else {
+                return null;
+            }
+        } catch (NoSuchFieldException e) {
+            e.printStackTrace();
+            // 可能是28及以上版本
+            Class<?> headerBehaviorType = superclass.getSuperclass().getSuperclass();
+            if (headerBehaviorType != null) {
+                return headerBehaviorType.getDeclaredField("scroller");
+            }else {
+                return null;
+            }
+        }
+    }
+
+    /**
+     * 停止appbarLayout的fling事件
+     * @param appBarLayout
+     */
+    private void stopAppbarLayoutFling(AppBarLayout appBarLayout) {
+        //通过反射拿到HeaderBehavior中的flingRunnable变量
+        try {
+            Field flingRunnableField = getFlingRunnableField();
+            Field scrollerField = getScrollerField();
+            if (flingRunnableField != null) {
+                flingRunnableField.setAccessible(true);
+            }
+            if (scrollerField != null) {
+                scrollerField.setAccessible(true);
+            }
+            Runnable flingRunnable = null;
+            if (flingRunnableField != null) {
+                flingRunnable = (Runnable) flingRunnableField.get(this);
+            }
+            OverScroller overScroller = (OverScroller) scrollerField.get(this);
+            if (flingRunnable != null) {
+                LogUtil.d(TAG, "存在flingRunnable");
+                appBarLayout.removeCallbacks(flingRunnable);
+                flingRunnableField.set(this, null);
+            }
+            if (overScroller != null && !overScroller.isFinished()) {
+                overScroller.abortAnimation();
+            }
+        } catch (NoSuchFieldException e) {
+            e.printStackTrace();
+        } catch (IllegalAccessException e) {
+            e.printStackTrace();
+        }
+    }
+
+    @Override
+    public boolean onStartNestedScroll(CoordinatorLayout parent, AppBarLayout child,
+                                       View directTargetChild, View target,
+                                       int nestedScrollAxes, int type) {
+        LogUtil.d(TAG, "onStartNestedScroll");
+        stopAppbarLayoutFling(child);
+        return super.onStartNestedScroll(parent, child, directTargetChild, target,
+                nestedScrollAxes, type);
+    }
+
+    @Override
+    public void onNestedPreScroll(CoordinatorLayout coordinatorLayout,
+                                  AppBarLayout child, View target,
+                                  int dx, int dy, int[] consumed, int type) {
+        LogUtil.d(TAG, "onNestedPreScroll:" + child.getTotalScrollRange()
+                + " ,dx:" + dx + " ,dy:" + dy + " ,type:" + type);
+        //type返回1时,表示当前target处于非touch的滑动,
+        //该bug的引起是因为appbar在滑动时,CoordinatorLayout内的实现NestedScrollingChild2接口的滑动
+        //子类还未结束其自身的fling
+        //所以这里监听子类的非touch时的滑动,然后block掉滑动事件传递给AppBarLayout
+        if (type == TYPE_FLING) {
+            isFlinging = true;
+        }
+        if (!shouldBlockNestedScroll) {
+            super.onNestedPreScroll(coordinatorLayout, child, target, dx, dy, consumed, type);
+        }
+    }
+
+    @Override
+    public void onNestedScroll(CoordinatorLayout coordinatorLayout, AppBarLayout child,
+                               View target, int dxConsumed, int dyConsumed, int
+                                       dxUnconsumed, int dyUnconsumed, int type) {
+        LogUtil.d(TAG, "onNestedScroll: target:" + target.getClass() + " ,"
+                + child.getTotalScrollRange() + " ,dxConsumed:"
+                + dxConsumed + " ,dyConsumed:" + dyConsumed + " " + ",type:" + type);
+        if (!shouldBlockNestedScroll) {
+            super.onNestedScroll(coordinatorLayout, child, target, dxConsumed,
+                    dyConsumed, dxUnconsumed, dyUnconsumed, type);
+        }
+    }
+
+    @Override
+    public void onStopNestedScroll(CoordinatorLayout coordinatorLayout, AppBarLayout abl,
+                                   View target, int type) {
+        LogUtil.d(TAG, "onStopNestedScroll");
+        super.onStopNestedScroll(coordinatorLayout, abl, target, type);
+        isFlinging = false;
+        shouldBlockNestedScroll = false;
+    }
+
+    private static class LogUtil{
+        static void d(String tag, String string){
+            Log.d(tag,string);
+        }
+    }
+}

+ 41 - 0
app/src/main/java/com/xwkj/jcjcgz/di/component/RwfxTaskStatusComponent.java

@@ -0,0 +1,41 @@
+package com.xwkj.jcjcgz.di.component;
+
+import dagger.BindsInstance;
+import dagger.Component;
+
+import com.jess.arms.di.component.AppComponent;
+
+import com.xwkj.jcjcgz.di.module.RwfxTaskStatusModule;
+import com.xwkj.jcjcgz.mvp.contract.RwfxTaskStatusContract;
+
+import com.jess.arms.di.scope.FragmentScope;
+import com.xwkj.jcjcgz.mvp.ui.fragment.RwfxTaskStatusFragment;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/12/2024 09:54
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+@FragmentScope
+@Component(modules = RwfxTaskStatusModule.class, dependencies = AppComponent.class)
+public interface RwfxTaskStatusComponent {
+    void inject(RwfxTaskStatusFragment fragment);
+
+    @Component.Builder
+    interface Builder {
+        @BindsInstance
+        RwfxTaskStatusComponent.Builder view(RwfxTaskStatusContract.View view);
+
+        RwfxTaskStatusComponent.Builder appComponent(AppComponent appComponent);
+
+        RwfxTaskStatusComponent build();
+    }
+}

+ 41 - 0
app/src/main/java/com/xwkj/jcjcgz/di/component/RwfxTaskTypeComponent.java

@@ -0,0 +1,41 @@
+package com.xwkj.jcjcgz.di.component;
+
+import dagger.BindsInstance;
+import dagger.Component;
+
+import com.jess.arms.di.component.AppComponent;
+
+import com.xwkj.jcjcgz.di.module.RwfxTaskTypeModule;
+import com.xwkj.jcjcgz.mvp.contract.RwfxTaskTypeContract;
+
+import com.jess.arms.di.scope.FragmentScope;
+import com.xwkj.jcjcgz.mvp.ui.fragment.RwfxTaskTypeFragment;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/12/2024 10:07
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+@FragmentScope
+@Component(modules = RwfxTaskTypeModule.class, dependencies = AppComponent.class)
+public interface RwfxTaskTypeComponent {
+    void inject(RwfxTaskTypeFragment fragment);
+
+    @Component.Builder
+    interface Builder {
+        @BindsInstance
+        RwfxTaskTypeComponent.Builder view(RwfxTaskTypeContract.View view);
+
+        RwfxTaskTypeComponent.Builder appComponent(AppComponent appComponent);
+
+        RwfxTaskTypeComponent build();
+    }
+}

+ 41 - 0
app/src/main/java/com/xwkj/jcjcgz/di/component/TaskDxzpComponent.java

@@ -0,0 +1,41 @@
+package com.xwkj.jcjcgz.di.component;
+
+import dagger.BindsInstance;
+import dagger.Component;
+
+import com.jess.arms.di.component.AppComponent;
+
+import com.xwkj.jcjcgz.di.module.TaskDxzpModule;
+import com.xwkj.jcjcgz.mvp.contract.TaskDxzpContract;
+
+import com.jess.arms.di.scope.FragmentScope;
+import com.xwkj.jcjcgz.mvp.ui.fragment.TaskDxzpFragment;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/16/2024 14:19
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+@FragmentScope
+@Component(modules = TaskDxzpModule.class, dependencies = AppComponent.class)
+public interface TaskDxzpComponent {
+    void inject(TaskDxzpFragment fragment);
+
+    @Component.Builder
+    interface Builder {
+        @BindsInstance
+        TaskDxzpComponent.Builder view(TaskDxzpContract.View view);
+
+        TaskDxzpComponent.Builder appComponent(AppComponent appComponent);
+
+        TaskDxzpComponent build();
+    }
+}

+ 41 - 0
app/src/main/java/com/xwkj/jcjcgz/di/component/TaskTypeComponent.java

@@ -0,0 +1,41 @@
+package com.xwkj.jcjcgz.di.component;
+
+import dagger.BindsInstance;
+import dagger.Component;
+
+import com.jess.arms.di.component.AppComponent;
+
+import com.xwkj.jcjcgz.di.module.TaskTypeModule;
+import com.xwkj.jcjcgz.mvp.contract.TaskTypeContract;
+
+import com.jess.arms.di.scope.FragmentScope;
+import com.xwkj.jcjcgz.mvp.ui.fragment.TaskTypeFragment;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/11/2024 14:58
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+@FragmentScope
+@Component(modules = TaskTypeModule.class, dependencies = AppComponent.class)
+public interface TaskTypeComponent {
+    void inject(TaskTypeFragment fragment);
+
+    @Component.Builder
+    interface Builder {
+        @BindsInstance
+        TaskTypeComponent.Builder view(TaskTypeContract.View view);
+
+        TaskTypeComponent.Builder appComponent(AppComponent appComponent);
+
+        TaskTypeComponent build();
+    }
+}

+ 30 - 0
app/src/main/java/com/xwkj/jcjcgz/di/module/RwfxTaskStatusModule.java

@@ -0,0 +1,30 @@
+package com.xwkj.jcjcgz.di.module;
+
+import com.jess.arms.di.scope.FragmentScope;
+
+import dagger.Binds;
+import dagger.Module;
+import dagger.Provides;
+
+import com.xwkj.jcjcgz.mvp.contract.RwfxTaskStatusContract;
+import com.xwkj.jcjcgz.mvp.model.RwfxTaskStatusModel;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/12/2024 09:54
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+@Module
+public abstract class RwfxTaskStatusModule {
+
+    @Binds
+    abstract RwfxTaskStatusContract.Model bindRwfxTaskStatusModel(RwfxTaskStatusModel model);
+}

+ 30 - 0
app/src/main/java/com/xwkj/jcjcgz/di/module/RwfxTaskTypeModule.java

@@ -0,0 +1,30 @@
+package com.xwkj.jcjcgz.di.module;
+
+import com.jess.arms.di.scope.FragmentScope;
+
+import dagger.Binds;
+import dagger.Module;
+import dagger.Provides;
+
+import com.xwkj.jcjcgz.mvp.contract.RwfxTaskTypeContract;
+import com.xwkj.jcjcgz.mvp.model.RwfxTaskTypeModel;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/12/2024 10:07
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+@Module
+public abstract class RwfxTaskTypeModule {
+
+    @Binds
+    abstract RwfxTaskTypeContract.Model bindRwfxTaskTypeModel(RwfxTaskTypeModel model);
+}

+ 30 - 0
app/src/main/java/com/xwkj/jcjcgz/di/module/TaskDxzpModule.java

@@ -0,0 +1,30 @@
+package com.xwkj.jcjcgz.di.module;
+
+import com.jess.arms.di.scope.FragmentScope;
+
+import dagger.Binds;
+import dagger.Module;
+import dagger.Provides;
+
+import com.xwkj.jcjcgz.mvp.contract.TaskDxzpContract;
+import com.xwkj.jcjcgz.mvp.model.TaskDxzpModel;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/16/2024 14:19
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+@Module
+public abstract class TaskDxzpModule {
+
+    @Binds
+    abstract TaskDxzpContract.Model bindTaskDxzpModel(TaskDxzpModel model);
+}

+ 30 - 0
app/src/main/java/com/xwkj/jcjcgz/di/module/TaskTypeModule.java

@@ -0,0 +1,30 @@
+package com.xwkj.jcjcgz.di.module;
+
+import com.jess.arms.di.scope.FragmentScope;
+
+import dagger.Binds;
+import dagger.Module;
+import dagger.Provides;
+
+import com.xwkj.jcjcgz.mvp.contract.TaskTypeContract;
+import com.xwkj.jcjcgz.mvp.model.TaskTypeModel;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/11/2024 14:58
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+@Module
+public abstract class TaskTypeModule {
+
+    @Binds
+    abstract TaskTypeContract.Model bindTaskTypeModel(TaskTypeModel model);
+}

+ 29 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/contract/RwfxTaskStatusContract.java

@@ -0,0 +1,29 @@
+package com.xwkj.jcjcgz.mvp.contract;
+
+import com.jess.arms.mvp.IView;
+import com.jess.arms.mvp.IModel;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/12/2024 09:54
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+public interface RwfxTaskStatusContract {
+    //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
+    interface View extends IView {
+
+    }
+
+    //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
+    interface Model extends IModel {
+
+    }
+}

+ 29 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/contract/RwfxTaskTypeContract.java

@@ -0,0 +1,29 @@
+package com.xwkj.jcjcgz.mvp.contract;
+
+import com.jess.arms.mvp.IView;
+import com.jess.arms.mvp.IModel;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/12/2024 10:07
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+public interface RwfxTaskTypeContract {
+    //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
+    interface View extends IView {
+
+    }
+
+    //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
+    interface Model extends IModel {
+
+    }
+}

+ 1 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/contract/RwzxContract.java

@@ -20,6 +20,7 @@ public interface RwzxContract {
     //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
     interface View extends IView {
 
+        void onSuccess(String result);
     }
 
     //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存

+ 1 - 1
app/src/main/java/com/xwkj/jcjcgz/mvp/contract/TaskContract.java

@@ -19,7 +19,7 @@ import com.jess.arms.mvp.IModel;
 public interface TaskContract {
     //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
     interface View extends IView {
-
+        void onSuccess(String result);
     }
 
     //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存

+ 30 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/contract/TaskDxzpContract.java

@@ -0,0 +1,30 @@
+package com.xwkj.jcjcgz.mvp.contract;
+
+import com.jess.arms.mvp.IView;
+import com.jess.arms.mvp.IModel;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/16/2024 14:19
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+public interface TaskDxzpContract {
+    //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
+    interface View extends IView {
+
+        void onSuccess(String result);
+    }
+
+    //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
+    interface Model extends IModel {
+
+    }
+}

+ 29 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/contract/TaskTypeContract.java

@@ -0,0 +1,29 @@
+package com.xwkj.jcjcgz.mvp.contract;
+
+import com.jess.arms.mvp.IView;
+import com.jess.arms.mvp.IModel;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/11/2024 14:58
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+public interface TaskTypeContract {
+    //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
+    interface View extends IView {
+
+    }
+
+    //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
+    interface Model extends IModel {
+
+    }
+}

+ 46 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/model/RwfxTaskStatusModel.java

@@ -0,0 +1,46 @@
+package com.xwkj.jcjcgz.mvp.model;
+
+import android.app.Application;
+
+import com.google.gson.Gson;
+import com.jess.arms.integration.IRepositoryManager;
+import com.jess.arms.mvp.BaseModel;
+
+import com.jess.arms.di.scope.FragmentScope;
+
+import javax.inject.Inject;
+
+import com.xwkj.jcjcgz.mvp.contract.RwfxTaskStatusContract;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/12/2024 09:54
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+@FragmentScope
+public class RwfxTaskStatusModel extends BaseModel implements RwfxTaskStatusContract.Model {
+    @Inject
+    Gson mGson;
+    @Inject
+    Application mApplication;
+
+    @Inject
+    public RwfxTaskStatusModel(IRepositoryManager repositoryManager) {
+        super(repositoryManager);
+    }
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        this.mGson = null;
+        this.mApplication = null;
+    }
+}

+ 46 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/model/RwfxTaskTypeModel.java

@@ -0,0 +1,46 @@
+package com.xwkj.jcjcgz.mvp.model;
+
+import android.app.Application;
+
+import com.google.gson.Gson;
+import com.jess.arms.integration.IRepositoryManager;
+import com.jess.arms.mvp.BaseModel;
+
+import com.jess.arms.di.scope.FragmentScope;
+
+import javax.inject.Inject;
+
+import com.xwkj.jcjcgz.mvp.contract.RwfxTaskTypeContract;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/12/2024 10:07
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+@FragmentScope
+public class RwfxTaskTypeModel extends BaseModel implements RwfxTaskTypeContract.Model {
+    @Inject
+    Gson mGson;
+    @Inject
+    Application mApplication;
+
+    @Inject
+    public RwfxTaskTypeModel(IRepositoryManager repositoryManager) {
+        super(repositoryManager);
+    }
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        this.mGson = null;
+        this.mApplication = null;
+    }
+}

+ 46 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/model/TaskDxzpModel.java

@@ -0,0 +1,46 @@
+package com.xwkj.jcjcgz.mvp.model;
+
+import android.app.Application;
+
+import com.google.gson.Gson;
+import com.jess.arms.integration.IRepositoryManager;
+import com.jess.arms.mvp.BaseModel;
+
+import com.jess.arms.di.scope.FragmentScope;
+
+import javax.inject.Inject;
+
+import com.xwkj.jcjcgz.mvp.contract.TaskDxzpContract;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/16/2024 14:19
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+@FragmentScope
+public class TaskDxzpModel extends BaseModel implements TaskDxzpContract.Model {
+    @Inject
+    Gson mGson;
+    @Inject
+    Application mApplication;
+
+    @Inject
+    public TaskDxzpModel(IRepositoryManager repositoryManager) {
+        super(repositoryManager);
+    }
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        this.mGson = null;
+        this.mApplication = null;
+    }
+}

+ 46 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/model/TaskTypeModel.java

@@ -0,0 +1,46 @@
+package com.xwkj.jcjcgz.mvp.model;
+
+import android.app.Application;
+
+import com.google.gson.Gson;
+import com.jess.arms.integration.IRepositoryManager;
+import com.jess.arms.mvp.BaseModel;
+
+import com.jess.arms.di.scope.FragmentScope;
+
+import javax.inject.Inject;
+
+import com.xwkj.jcjcgz.mvp.contract.TaskTypeContract;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/11/2024 14:58
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+@FragmentScope
+public class TaskTypeModel extends BaseModel implements TaskTypeContract.Model {
+    @Inject
+    Gson mGson;
+    @Inject
+    Application mApplication;
+
+    @Inject
+    public TaskTypeModel(IRepositoryManager repositoryManager) {
+        super(repositoryManager);
+    }
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        this.mGson = null;
+        this.mApplication = null;
+    }
+}

+ 15 - 11
app/src/main/java/com/xwkj/jcjcgz/mvp/model/api/ReqToBus.java

@@ -61,8 +61,8 @@ public class ReqToBus {
 
         String resourceList = sp.getString("resourceList", "[{\n" +
                 "\"resourceRegionalismCode\":\"120000000000\",\n" +
-                "\"resourceAddress\":\"http://20.3.1.162:9105/drs/ppc/v1/appQuery.do\",\n" +
-                "\"resourceId\":\"120000000000-3-0100-b0e037d83ecc4d43be788a5e9ddcbbe5\",\"resourceServiceType\":\"10\"\n" +
+                "\"resourceAddress\":\"http://192.168.0.10/zf/transpond/request\",\n" +
+                "\"resourceId\":\"220000000000-3-0100-5262bf9ccd72456e802fe9a0b77097e5\",\"resourceServiceType\":\"10\"\n" +
                 "}\n" +
                 "]");
         List<AddressEntity> list = JSONObject.parseArray(resourceList, AddressEntity.class);
@@ -94,15 +94,19 @@ public class ReqToBus {
                 .subscribe(new ErrorHandleSubscriber<JsonObject>(ArmsUtils.obtainAppComponentFromContext(context).rxErrorHandler()) {
                     @Override
                     public void onNext(JsonObject jsonObject) {
-                        String json = jsonObject.toString();
-                        BusEntity busEntity = new Gson().fromJson(json, BusEntity.class);
-                        String code = busEntity.getCode();
-                        if (code.equals("200")) {
-                            String value = busEntity.getData().getDataList().get(0).getFieldValues().get(0).getValue();
-
-                            interFace.onSuccess(value);
-                        } else {
-                            ToastUtils.show(busEntity.getMessage());
+                        try {
+                            String json = jsonObject.toString();
+                            BusEntity busEntity = new Gson().fromJson(json, BusEntity.class);
+                            String code = busEntity.getCode();
+                            if (code.equals("200")) {
+                                String value = busEntity.getData().getDataList().get(0).getFieldValues().get(0).getValue();
+
+                                interFace.onSuccess(value);
+                            } else {
+                                ToastUtils.show(busEntity.getMessage());
+                            }
+                        } catch (Exception e) {
+                            e.printStackTrace();
                         }
                     }
 

+ 165 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/model/entity/ChannelEntity.java

@@ -0,0 +1,165 @@
+package com.xwkj.jcjcgz.mvp.model.entity;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ChannelEntity {
+    private int code;
+    private boolean success;
+    private List<Task> data;
+    private String msg;
+
+    public int getCode() {
+        return code;
+    }
+
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+    public boolean isSuccess() {
+        return success;
+    }
+
+    public void setSuccess(boolean success) {
+        this.success = success;
+    }
+
+    public List<Task> getData() {
+        return data;
+    }
+
+    public void setData(List<Task> data) {
+        this.data = data;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public static class Task implements Serializable {
+        private ArrayList<Task> children;
+        private String code;
+        private String dictKey;
+        private String dictValue;
+        private String hasChildren;
+        private String isDeleted;
+        private String isSealed;
+        private int num;
+        private String parentId;
+        private String parentName;
+        private String remark;
+        private String sort;
+        private String tenantId;
+
+        public String getCode() {
+            return code;
+        }
+
+        public void setCode(String code) {
+            this.code = code;
+        }
+
+        public String getDictKey() {
+            return dictKey;
+        }
+
+        public void setDictKey(String dictKey) {
+            this.dictKey = dictKey;
+        }
+
+        public String getDictValue() {
+            return dictValue;
+        }
+
+        public void setDictValue(String dictValue) {
+            this.dictValue = dictValue;
+        }
+
+        public String getHasChildren() {
+            return hasChildren;
+        }
+
+        public void setHasChildren(String hasChildren) {
+            this.hasChildren = hasChildren;
+        }
+
+        public String getIsDeleted() {
+            return isDeleted;
+        }
+
+        public void setIsDeleted(String isDeleted) {
+            this.isDeleted = isDeleted;
+        }
+
+        public String getIsSealed() {
+            return isSealed;
+        }
+
+        public void setIsSealed(String isSealed) {
+            this.isSealed = isSealed;
+        }
+
+        public int getNum() {
+            return num;
+        }
+
+        public void setNum(int num) {
+            this.num = num;
+        }
+
+        public String getParentId() {
+            return parentId;
+        }
+
+        public void setParentId(String parentId) {
+            this.parentId = parentId;
+        }
+
+        public String getParentName() {
+            return parentName;
+        }
+
+        public void setParentName(String parentName) {
+            this.parentName = parentName;
+        }
+
+        public String getRemark() {
+            return remark;
+        }
+
+        public void setRemark(String remark) {
+            this.remark = remark;
+        }
+
+        public String getSort() {
+            return sort;
+        }
+
+        public void setSort(String sort) {
+            this.sort = sort;
+        }
+
+        public String getTenantId() {
+            return tenantId;
+        }
+
+        public void setTenantId(String tenantId) {
+            this.tenantId = tenantId;
+        }
+
+        public ArrayList<Task> getChildren() {
+            return children;
+        }
+
+        public void setChildren(ArrayList<Task> children) {
+            this.children = children;
+        }
+    }
+
+}

+ 111 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/model/entity/TaskDxzpEntity.java

@@ -0,0 +1,111 @@
+package com.xwkj.jcjcgz.mvp.model.entity;
+
+import java.util.List;
+
+public class TaskDxzpEntity {
+    private int code;
+    private boolean success;
+    private DataBean data;
+    private String msg;
+
+    public int getCode() {
+        return code;
+    }
+
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+    public boolean isSuccess() {
+        return success;
+    }
+
+    public void setSuccess(boolean success) {
+        this.success = success;
+    }
+
+    public DataBean getData() {
+        return data;
+    }
+
+    public void setData(DataBean data) {
+        this.data = data;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public static class DataBean {
+        private List<Task> records;
+
+        public List<Task> getRecords() {
+            return records;
+        }
+
+        public void setRecords(List<Task> records) {
+            this.records = records;
+        }
+    }
+
+    public static class Task {
+        private String xfsj;
+        private String riskFeatures;
+        private String riskFeaturesIcon;
+        private String fkJzrq;
+        private String fkjg;
+        private String warnAccount;
+
+        public String getRiskFeaturesIcon() {
+            return riskFeaturesIcon;
+        }
+
+        public void setRiskFeaturesIcon(String riskFeaturesIcon) {
+            this.riskFeaturesIcon = riskFeaturesIcon;
+        }
+
+        public String getXfsj() {
+            return xfsj;
+        }
+
+        public void setXfsj(String xfsj) {
+            this.xfsj = xfsj;
+        }
+
+        public String getRiskFeatures() {
+            return riskFeatures;
+        }
+
+        public void setRiskFeatures(String riskFeatures) {
+            this.riskFeatures = riskFeatures;
+        }
+
+        public String getFkJzrq() {
+            return fkJzrq;
+        }
+
+        public void setFkJzrq(String fkJzrq) {
+            this.fkJzrq = fkJzrq;
+        }
+
+        public String getFkjg() {
+            return fkjg;
+        }
+
+        public void setFkjg(String fkjg) {
+            this.fkjg = fkjg;
+        }
+
+        public String getWarnAccount() {
+            return warnAccount;
+        }
+
+        public void setWarnAccount(String warnAccount) {
+            this.warnAccount = warnAccount;
+        }
+    }
+}

+ 51 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/model/entity/TaskEntity.java

@@ -1,6 +1,57 @@
 package com.xwkj.jcjcgz.mvp.model.entity;
 
+import java.util.List;
+
 public class TaskEntity {
+    private int code;
+    private boolean success;
+    private DataBean data;
+    private String msg;
+
+    public int getCode() {
+        return code;
+    }
+
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+    public boolean isSuccess() {
+        return success;
+    }
+
+    public void setSuccess(boolean success) {
+        this.success = success;
+    }
+
+    public DataBean getData() {
+        return data;
+    }
+
+    public void setData(DataBean data) {
+        this.data = data;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public static class DataBean {
+        private List<Task> records;
+
+        public List<Task> getRecords() {
+            return records;
+        }
+
+        public void setRecords(List<Task> records) {
+            this.records = records;
+        }
+    }
+
     public static class Task {
 
     }

+ 3 - 1
app/src/main/java/com/xwkj/jcjcgz/mvp/presenter/AppDetailPresenter.java

@@ -72,7 +72,9 @@ public class AppDetailPresenter extends BasePresenter<AppDetailContract.Model, A
                 .subscribe(new ErrorHandleSubscriber<JsonObject>(mErrorHandler) {
                     @Override
                     public void onNext(JsonObject jsonObject) {
-                        mRootView.onGetAppDetailSuccess(jsonObject.toString());
+                        if (mRootView != null) {
+                            mRootView.onGetAppDetailSuccess(jsonObject.toString());
+                        }
                     }
 
                     @Override

+ 3 - 1
app/src/main/java/com/xwkj/jcjcgz/mvp/presenter/AppListPresenter.java

@@ -75,7 +75,9 @@ public class AppListPresenter extends BasePresenter<AppListContract.Model, AppLi
                     @Override
                     public void onNext(JsonObject jsonObject) {
                         String result = jsonObject.toString();
-                        mRootView.onGetAppListSuccess(result);
+                        if (mRootView != null) {
+                            mRootView.onGetAppListSuccess(result);
+                        }
                     }
 
                     @Override

+ 29 - 2
app/src/main/java/com/xwkj/jcjcgz/mvp/presenter/LoginPresenter.java

@@ -19,8 +19,11 @@ import javax.inject.Inject;
 
 import com.jess.arms.utils.RxLifecycleUtils;
 import com.xwkj.jcjcgz.mvp.contract.LoginContract;
+import com.xwkj.jcjcgz.mvp.model.api.CommonInterFace;
+import com.xwkj.jcjcgz.mvp.model.api.ReqToBus;
 import com.zkjc.common.utils.JsonMapUtil;
 
+import java.util.HashMap;
 import java.util.Map;
 
 
@@ -63,7 +66,31 @@ public class LoginPresenter extends BasePresenter<LoginContract.Model, LoginCont
 
 
     public void login(Map<String,String> map){
-        mModel.login(map)
+        Map<String, Object> map1 = new HashMap<>();
+        map1.put("mappingName", "/oauth/token");
+        map1.put("serviceName", "blade-auth");
+        map1.put("params", map);
+        ReqToBus.getInstance().init(mApplication).getRequestV2(map1, new CommonInterFace() {
+            @Override
+            public void onSuccess(String result) {
+                if (mRootView !=null) {
+                    mRootView.onSuccess(result);
+                }
+            }
+
+            @Override
+            public void onError(Throwable throwable) {
+                if (mRootView != null) {
+                    mRootView.onError(throwable);
+                }
+            }
+
+            @Override
+            public void onFinsh() {
+
+            }
+        });
+       /* mModel.login(map)
                 .subscribeOn(Schedulers.io())
                 .doOnSubscribe(disposable -> {
                     Timber.v("requestLogin===doOnSubscribe:" + Thread.currentThread().getName());
@@ -85,6 +112,6 @@ public class LoginPresenter extends BasePresenter<LoginContract.Model, LoginCont
 
                         mRootView.onError(t);
                     }
-                });
+                });*/
     }
 }

+ 53 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/presenter/RwfxTaskStatusPresenter.java

@@ -0,0 +1,53 @@
+package com.xwkj.jcjcgz.mvp.presenter;
+
+import android.app.Application;
+
+import com.jess.arms.integration.AppManager;
+import com.jess.arms.di.scope.FragmentScope;
+import com.jess.arms.mvp.BasePresenter;
+import com.jess.arms.http.imageloader.ImageLoader;
+
+import me.jessyan.rxerrorhandler.core.RxErrorHandler;
+
+import javax.inject.Inject;
+
+import com.xwkj.jcjcgz.mvp.contract.RwfxTaskStatusContract;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/12/2024 09:54
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+@FragmentScope
+public class RwfxTaskStatusPresenter extends BasePresenter<RwfxTaskStatusContract.Model, RwfxTaskStatusContract.View> {
+    @Inject
+    RxErrorHandler mErrorHandler;
+    @Inject
+    Application mApplication;
+    @Inject
+    ImageLoader mImageLoader;
+    @Inject
+    AppManager mAppManager;
+
+    @Inject
+    public RwfxTaskStatusPresenter(RwfxTaskStatusContract.Model model, RwfxTaskStatusContract.View rootView) {
+        super(model, rootView);
+    }
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        this.mErrorHandler = null;
+        this.mAppManager = null;
+        this.mImageLoader = null;
+        this.mApplication = null;
+    }
+}

+ 53 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/presenter/RwfxTaskTypePresenter.java

@@ -0,0 +1,53 @@
+package com.xwkj.jcjcgz.mvp.presenter;
+
+import android.app.Application;
+
+import com.jess.arms.integration.AppManager;
+import com.jess.arms.di.scope.FragmentScope;
+import com.jess.arms.mvp.BasePresenter;
+import com.jess.arms.http.imageloader.ImageLoader;
+
+import me.jessyan.rxerrorhandler.core.RxErrorHandler;
+
+import javax.inject.Inject;
+
+import com.xwkj.jcjcgz.mvp.contract.RwfxTaskTypeContract;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/12/2024 10:07
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+@FragmentScope
+public class RwfxTaskTypePresenter extends BasePresenter<RwfxTaskTypeContract.Model, RwfxTaskTypeContract.View> {
+    @Inject
+    RxErrorHandler mErrorHandler;
+    @Inject
+    Application mApplication;
+    @Inject
+    ImageLoader mImageLoader;
+    @Inject
+    AppManager mAppManager;
+
+    @Inject
+    public RwfxTaskTypePresenter(RwfxTaskTypeContract.Model model, RwfxTaskTypeContract.View rootView) {
+        super(model, rootView);
+    }
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        this.mErrorHandler = null;
+        this.mAppManager = null;
+        this.mImageLoader = null;
+        this.mApplication = null;
+    }
+}

+ 29 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/presenter/RwzxPresenter.java

@@ -12,6 +12,11 @@ import me.jessyan.rxerrorhandler.core.RxErrorHandler;
 import javax.inject.Inject;
 
 import com.xwkj.jcjcgz.mvp.contract.RwzxContract;
+import com.xwkj.jcjcgz.mvp.model.api.CommonInterFace;
+import com.xwkj.jcjcgz.mvp.model.api.ReqToBus;
+
+import java.util.HashMap;
+import java.util.Map;
 
 
 /**
@@ -50,4 +55,28 @@ public class RwzxPresenter extends BasePresenter<RwzxContract.Model, RwzxContrac
         this.mImageLoader = null;
         this.mApplication = null;
     }
+
+    public void getMenu(Map<String,String> map){
+        Map<String, Object> map1 = new HashMap<>();
+        map1.put("mappingName", "/dict-biz/getTreeByCode");
+        map1.put("serviceName", "blade-system");
+        map1.put("params", map);
+        ReqToBus.getInstance().init(mApplication).getRequestV2(map1, new CommonInterFace() {
+            @Override
+            public void onSuccess(String result) {
+                if (mRootView != null) {
+                    mRootView.onSuccess(result);
+                }
+            }
+
+            @Override
+            public void onError(Throwable throwable) {
+            }
+
+            @Override
+            public void onFinsh() {
+
+            }
+        });
+    }
 }

+ 82 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/presenter/TaskDxzpPresenter.java

@@ -0,0 +1,82 @@
+package com.xwkj.jcjcgz.mvp.presenter;
+
+import android.app.Application;
+
+import com.jess.arms.integration.AppManager;
+import com.jess.arms.di.scope.FragmentScope;
+import com.jess.arms.mvp.BasePresenter;
+import com.jess.arms.http.imageloader.ImageLoader;
+
+import me.jessyan.rxerrorhandler.core.RxErrorHandler;
+
+import javax.inject.Inject;
+
+import com.xwkj.jcjcgz.mvp.contract.TaskDxzpContract;
+import com.xwkj.jcjcgz.mvp.model.api.CommonInterFace;
+import com.xwkj.jcjcgz.mvp.model.api.ReqToBus;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/16/2024 14:19
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+@FragmentScope
+public class TaskDxzpPresenter extends BasePresenter<TaskDxzpContract.Model, TaskDxzpContract.View> {
+    @Inject
+    RxErrorHandler mErrorHandler;
+    @Inject
+    Application mApplication;
+    @Inject
+    ImageLoader mImageLoader;
+    @Inject
+    AppManager mAppManager;
+
+    @Inject
+    public TaskDxzpPresenter(TaskDxzpContract.Model model, TaskDxzpContract.View rootView) {
+        super(model, rootView);
+    }
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        this.mErrorHandler = null;
+        this.mAppManager = null;
+        this.mImageLoader = null;
+        this.mApplication = null;
+    }
+
+    public void getList(Map<String,String> map){
+        Map<String, Object> map1 = new HashMap<>();
+        map1.put("mappingName", "/fzyj/pageByUser");
+        map1.put("serviceName", "command-center");
+        map1.put("params", map);
+        ReqToBus.getInstance().init(mApplication).getRequestV2(map1, new CommonInterFace() {
+            @Override
+            public void onSuccess(String result) {
+                if (mRootView != null) {
+                    mRootView.onSuccess(result);
+                }
+            }
+
+            @Override
+            public void onError(Throwable throwable) {
+            }
+
+            @Override
+            public void onFinsh() {
+
+            }
+        });
+    }
+}

+ 29 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/presenter/TaskPresenter.java

@@ -12,6 +12,11 @@ import me.jessyan.rxerrorhandler.core.RxErrorHandler;
 import javax.inject.Inject;
 
 import com.xwkj.jcjcgz.mvp.contract.TaskContract;
+import com.xwkj.jcjcgz.mvp.model.api.CommonInterFace;
+import com.xwkj.jcjcgz.mvp.model.api.ReqToBus;
+
+import java.util.HashMap;
+import java.util.Map;
 
 
 /**
@@ -50,4 +55,28 @@ public class TaskPresenter extends BasePresenter<TaskContract.Model, TaskContrac
         this.mImageLoader = null;
         this.mApplication = null;
     }
+
+    public void getList(Map<String,String> map){
+        Map<String, Object> map1 = new HashMap<>();
+        map1.put("mappingName", "/fzyj/pageByUser");
+        map1.put("serviceName", "command-center");
+        map1.put("params", map);
+        ReqToBus.getInstance().init(mApplication).getRequestV2(map1, new CommonInterFace() {
+            @Override
+            public void onSuccess(String result) {
+                if (mRootView != null) {
+                    mRootView.onSuccess(result);
+                }
+            }
+
+            @Override
+            public void onError(Throwable throwable) {
+            }
+
+            @Override
+            public void onFinsh() {
+
+            }
+        });
+    }
 }

+ 53 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/presenter/TaskTypePresenter.java

@@ -0,0 +1,53 @@
+package com.xwkj.jcjcgz.mvp.presenter;
+
+import android.app.Application;
+
+import com.jess.arms.integration.AppManager;
+import com.jess.arms.di.scope.FragmentScope;
+import com.jess.arms.mvp.BasePresenter;
+import com.jess.arms.http.imageloader.ImageLoader;
+
+import me.jessyan.rxerrorhandler.core.RxErrorHandler;
+
+import javax.inject.Inject;
+
+import com.xwkj.jcjcgz.mvp.contract.TaskTypeContract;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/11/2024 14:58
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+@FragmentScope
+public class TaskTypePresenter extends BasePresenter<TaskTypeContract.Model, TaskTypeContract.View> {
+    @Inject
+    RxErrorHandler mErrorHandler;
+    @Inject
+    Application mApplication;
+    @Inject
+    ImageLoader mImageLoader;
+    @Inject
+    AppManager mAppManager;
+
+    @Inject
+    public TaskTypePresenter(TaskTypeContract.Model model, TaskTypeContract.View rootView) {
+        super(model, rootView);
+    }
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        this.mErrorHandler = null;
+        this.mAppManager = null;
+        this.mImageLoader = null;
+        this.mApplication = null;
+    }
+}

+ 1 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/ui/activity/LoginActivity.java

@@ -166,6 +166,7 @@ public class LoginActivity extends ZkjcBaseActivity<LoginPresenter> implements L
         map.put("grant_type", "password");
         map.put("scope", "all");
         map.put("code", "asdf");
+
         mPresenter.login(map);
     }
     @Override

+ 2 - 2
app/src/main/java/com/xwkj/jcjcgz/mvp/ui/activity/MainActivity.java

@@ -54,7 +54,7 @@ public class MainActivity extends ZkjcBaseActivity<MainPresenter> implements Mai
     FrameLayout grzx;
     @BindView(R.id.ll_main_tab)
    public LinearLayout ll_main_tab;
-    private RwzxFragment homeFragment;
+    private Test1Fragment homeFragment;
     private GztFragment xqGkFragment;
     private GrzxFragment myFragment;
 
@@ -183,7 +183,7 @@ public class MainActivity extends ZkjcBaseActivity<MainPresenter> implements Mai
 
 
                 if (homeFragment == null) {
-                    homeFragment = new RwzxFragment();
+                    homeFragment = new Test1Fragment();
                     transaction.add(R.id.fl_container, homeFragment);
 
                 } else {

+ 1 - 1
app/src/main/java/com/xwkj/jcjcgz/mvp/ui/adapter/BaseRecycleAdapter.java

@@ -238,7 +238,7 @@ public abstract class BaseRecycleAdapter<T> extends RecyclerView.Adapter<BaseRec
      */
     public void setItemImageView(View view, int resId) {
         if (view instanceof ImageView) {
-            ((TextView) view).setBackgroundResource(resId);
+            view.setBackgroundResource(resId);
         }
     }
 

+ 21 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/ui/adapter/RwfxTaskTypeAdapter.java

@@ -0,0 +1,21 @@
+package com.xwkj.jcjcgz.mvp.ui.adapter;
+
+import com.xwkj.jcjcgz.R;
+
+import java.util.List;
+
+public class RwfxTaskTypeAdapter extends BaseRecycleAdapter<String> {
+    public RwfxTaskTypeAdapter(List<String> datas) {
+        super(datas);
+    }
+
+    @Override
+    protected void bindData(BaseViewHolder holder, int position) {
+
+    }
+
+    @Override
+    public int getLayoutId() {
+        return R.layout.item_rwfx_task_type;
+    }
+}

+ 76 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/ui/adapter/TaskDxzpAdapter.java

@@ -0,0 +1,76 @@
+package com.xwkj.jcjcgz.mvp.ui.adapter;
+
+import android.text.TextUtils;
+import android.util.Log;
+import android.widget.ImageView;
+
+import com.squareup.picasso.Picasso;
+import com.xwkj.jcjcgz.R;
+import com.xwkj.jcjcgz.app.utils.StringUtil;
+import com.xwkj.jcjcgz.mvp.model.entity.TaskDxzpEntity;
+import com.xwkj.jcjcgz.mvp.model.entity.TaskEntity;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+public class TaskDxzpAdapter extends BaseRecycleAdapter<TaskDxzpEntity.Task> {
+    public TaskDxzpAdapter(List<TaskDxzpEntity.Task> datas) {
+        super(datas);
+    }
+
+    @Override
+    protected void bindData(BaseViewHolder holder, int position) {
+        TaskDxzpEntity.Task task = datas.get(position);
+        if (!TextUtils.isEmpty(task.getWarnAccount()) && task.getWarnAccount().length() == 18) {
+            setItemImageView(holder.getView(R.id.item_dxzp_iv_phone), R.drawable.icon_phone);
+            setItemText(holder.getView(R.id.item_dxzp_tv_phone), StringUtil.replaceId(task.getWarnAccount()));
+        } else {
+            setItemImageView(holder.getView(R.id.item_dxzp_iv_phone), R.drawable.icon_id);
+            setItemText(holder.getView(R.id.item_dxzp_tv_phone), StringUtil.replaceString(task.getWarnAccount()));
+        }
+        Picasso.with(holder.getView(R.id.item_dxzp_iv_type).getContext()).load(task.getRiskFeaturesIcon()).into(((ImageView) holder.getView(R.id.item_dxzp_iv_type)));
+        setItemText(holder.getView(R.id.item_dxzp_tv_type), task.getRiskFeatures());
+        setItemText(holder.getView(R.id.item_dxzp_tv_status), TextUtils.isEmpty(task.getFkjg()) ? "待反馈" : task.getFkjg());
+        String tip;
+        if (!TextUtils.isEmpty(task.getFkjg())) {
+            tip = "";
+        } else {
+            tip = calculateTime(task.getFkJzrq());
+        }
+        setItemText(holder.getView(R.id.item_dxzp_tv_time), "下发时间:" + task.getXfsj() + tip);
+
+    }
+
+    private String calculateTime(String end) {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        Date date = null;
+        try {
+            date = sdf.parse(end);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        if (date == null) {
+            return "";
+        }
+        long diffInMillies = new Date(date.getTime() + 1 * 24 * 60 * 60 * 1000).getTime() - System.currentTimeMillis();
+        if (diffInMillies < 0) {
+            return " (已超时)";
+        } else {
+            long num = diffInMillies / (1000 * 60 * 60 * 24);
+            if (num < 1) {
+                return " (需当天反馈)";
+            } else {
+                return " (需" + num + "天内反馈)";
+            }
+        }
+    }
+
+    @Override
+    public int getLayoutId() {
+        return R.layout.item_dxzp;
+    }
+}

+ 176 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/ui/fragment/RwfxTaskStatusFragment.java

@@ -0,0 +1,176 @@
+package com.xwkj.jcjcgz.mvp.ui.fragment;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Message;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.viewpager2.adapter.FragmentStateAdapter;
+import androidx.viewpager2.widget.ViewPager2;
+
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.google.android.material.tabs.TabLayout;
+import com.google.android.material.tabs.TabLayoutMediator;
+import com.jess.arms.base.BaseFragment;
+import com.jess.arms.di.component.AppComponent;
+import com.jess.arms.utils.ArmsUtils;
+
+import com.xwkj.jcjcgz.di.component.DaggerRwfxTaskStatusComponent;
+import com.xwkj.jcjcgz.mvp.contract.RwfxTaskStatusContract;
+import com.xwkj.jcjcgz.mvp.presenter.RwfxTaskStatusPresenter;
+
+import com.xwkj.jcjcgz.R;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
+import butterknife.BindView;
+
+import static com.jess.arms.utils.Preconditions.checkNotNull;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/12/2024 09:54
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+public class RwfxTaskStatusFragment extends BaseFragment<RwfxTaskStatusPresenter> implements RwfxTaskStatusContract.View {
+
+    @BindView(R.id.rwzx_task_status_tab)
+    TabLayout tabLayout;
+    @BindView(R.id.rwzx_task_status_vp)
+    ViewPager2 viewPager;
+
+    public static RwfxTaskStatusFragment newInstance() {
+        RwfxTaskStatusFragment fragment = new RwfxTaskStatusFragment();
+        return fragment;
+    }
+
+    @Override
+    public void setupFragmentComponent(@NonNull AppComponent appComponent) {
+        DaggerRwfxTaskStatusComponent //如找不到该类,请编译一下项目
+                .builder()
+                .appComponent(appComponent)
+                .view(this)
+                .build()
+                .inject(this);
+    }
+
+    @Override
+    public View initView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+        return inflater.inflate(R.layout.fragment_rwfx_task_status, container, false);
+    }
+
+    @Override
+    public void initData(@Nullable Bundle savedInstanceState) {
+        List<Fragment> fragments = new ArrayList<>();
+        fragments.add(RwfxTaskTypeFragment.newInstance());
+        fragments.add(RwfxTaskTypeFragment.newInstance());
+        fragments.add(RwfxTaskTypeFragment.newInstance());
+        List<String> titles = new ArrayList<>();
+        titles.add("指令任务");
+        titles.add("规定任务");
+        titles.add("推送任务");
+        FragmentStateAdapter mAdapter = new FragmentStateAdapter(this) {
+            @Override
+            public int getItemCount() {
+                return fragments.size();
+            }
+
+            @NonNull
+            @Override
+            public Fragment createFragment(int position) {
+                return fragments.get(position);
+            }
+
+        };
+        viewPager.setAdapter(mAdapter);
+        new TabLayoutMediator(tabLayout, viewPager, new TabLayoutMediator.TabConfigurationStrategy() {
+            @Override
+            public void onConfigureTab(@NonNull TabLayout.Tab tab, int position) {
+                tab.setText(titles.get(position));
+            }
+        }).attach();
+    }
+
+    /**
+     * 通过此方法可以使 Fragment 能够与外界做一些交互和通信, 比如说外部的 Activity 想让自己持有的某个 Fragment 对象执行一些方法,
+     * 建议在有多个需要与外界交互的方法时, 统一传 {@link Message}, 通过 what 字段来区分不同的方法, 在 {@link #setData(Object)}
+     * 方法中就可以 {@code switch} 做不同的操作, 这样就可以用统一的入口方法做多个不同的操作, 可以起到分发的作用
+     * <p>
+     * 调用此方法时请注意调用时 Fragment 的生命周期, 如果调用 {@link #setData(Object)} 方法时 {@link Fragment#onCreate(Bundle)} 还没执行
+     * 但在 {@link #setData(Object)} 里却调用了 Presenter 的方法, 是会报空的, 因为 Dagger 注入是在 {@link Fragment#onCreate(Bundle)} 方法中执行的
+     * 然后才创建的 Presenter, 如果要做一些初始化操作,可以不必让外部调用 {@link #setData(Object)}, 在 {@link #initData(Bundle)} 中初始化就可以了
+     * <p>
+     * Example usage:
+     * <pre>
+     * public void setData(@Nullable Object data) {
+     *     if (data != null && data instanceof Message) {
+     *         switch (((Message) data).what) {
+     *             case 0:
+     *                 loadData(((Message) data).arg1);
+     *                 break;
+     *             case 1:
+     *                 refreshUI();
+     *                 break;
+     *             default:
+     *                 //do something
+     *                 break;
+     *         }
+     *     }
+     * }
+     *
+     * // call setData(Object):
+     * Message data = new Message();
+     * data.what = 0;
+     * data.arg1 = 1;
+     * fragment.setData(data);
+     * </pre>
+     *
+     * @param data 当不需要参数时 {@code data} 可以为 {@code null}
+     */
+    @Override
+    public void setData(@Nullable Object data) {
+
+    }
+
+    @Override
+    public void showLoading() {
+
+    }
+
+    @Override
+    public void hideLoading() {
+
+    }
+
+    @Override
+    public void showMessage(@NonNull String message) {
+        checkNotNull(message);
+        ArmsUtils.snackbarText(message);
+    }
+
+    @Override
+    public void launchActivity(@NonNull Intent intent) {
+        checkNotNull(intent);
+        ArmsUtils.startActivity(intent);
+    }
+
+    @Override
+    public void killMyself() {
+
+    }
+}

+ 193 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/ui/fragment/RwfxTaskTypeFragment.java

@@ -0,0 +1,193 @@
+package com.xwkj.jcjcgz.mvp.ui.fragment;
+
+import android.content.Intent;
+import android.graphics.Color;
+import android.os.Bundle;
+import android.os.Message;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.github.mikephil.charting.charts.PieChart;
+import com.github.mikephil.charting.data.PieData;
+import com.github.mikephil.charting.data.PieDataSet;
+import com.github.mikephil.charting.data.PieEntry;
+import com.jess.arms.base.BaseFragment;
+import com.jess.arms.di.component.AppComponent;
+import com.jess.arms.utils.ArmsUtils;
+
+import com.xwkj.jcjcgz.di.component.DaggerRwfxTaskTypeComponent;
+import com.xwkj.jcjcgz.mvp.contract.RwfxTaskTypeContract;
+import com.xwkj.jcjcgz.mvp.presenter.RwfxTaskTypePresenter;
+
+import com.xwkj.jcjcgz.R;
+import com.xwkj.jcjcgz.mvp.ui.adapter.RwfxTaskTypeAdapter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import butterknife.BindView;
+
+import static com.jess.arms.utils.Preconditions.checkNotNull;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/12/2024 10:07
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+public class RwfxTaskTypeFragment extends BaseFragment<RwfxTaskTypePresenter> implements RwfxTaskTypeContract.View {
+
+    @BindView(R.id.rwfx_task_type_rv)
+    RecyclerView recyclerView;
+    @BindView(R.id.rwfx_task_type_chart)
+    PieChart chart;
+
+    public static RwfxTaskTypeFragment newInstance() {
+        RwfxTaskTypeFragment fragment = new RwfxTaskTypeFragment();
+        return fragment;
+    }
+
+    @Override
+    public void setupFragmentComponent(@NonNull AppComponent appComponent) {
+        DaggerRwfxTaskTypeComponent //如找不到该类,请编译一下项目
+                .builder()
+                .appComponent(appComponent)
+                .view(this)
+                .build()
+                .inject(this);
+    }
+
+    @Override
+    public View initView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+        return inflater.inflate(R.layout.fragment_rwfx_task_type, container, false);
+    }
+
+    @Override
+    public void initData(@Nullable Bundle savedInstanceState) {
+        recyclerView.setNestedScrollingEnabled(false);
+        recyclerView.setFocusable(false);
+        recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
+        List<String> list = new ArrayList<>();
+        list.add("1");
+        list.add("1");
+        list.add("1");
+        RwfxTaskTypeAdapter adapter = new RwfxTaskTypeAdapter(list);
+        recyclerView.setAdapter(adapter);
+        init();
+    }
+    private void init() {
+        List<PieEntry> list = new ArrayList<>();
+        list.add(new PieEntry(2f,"米饭"));
+        list.add(new PieEntry(3f,"鸡肉"));
+        list.add(new PieEntry(5f,"鱼肉"));
+        PieDataSet pieDataSet=new PieDataSet(list,"吃的饭菜");
+        //为每个分组设置颜色,如果不为每个都设置颜色最后饼图只会有一个颜色,这样无法有效看出占比
+        pieDataSet.setColors(Color.GREEN,Color.BLUE,Color.RED);
+        PieData pieData=new PieData(pieDataSet);
+        chart.setData(pieData);
+
+
+        //设置图形上文字的大小
+        pieDataSet.setValueTextSize(16f);
+        //设置图形上数值的颜色
+        pieDataSet.setValueTextColor(Color.YELLOW);
+        //是否绘制饼图上的文字
+        // pieDataSet.setDrawValues(true);
+        //文字绘制在图形内还是图形外(这里绘制在外部。默认在内部)
+        pieDataSet.setXValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE);
+        //图形上的数值绘制在图形内还是图形外(这里绘制在外部。默认在内部)
+        pieDataSet.setYValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE);
+        //连线的颜色
+        pieDataSet.setValueLineColor(getResources().getColor(R.color.colorAccent));
+        // 设置图形上文字的颜色
+        chart.setEntryLabelColor(getResources().getColor(R.color.colorAccent));
+        //设置连线长度
+        pieDataSet.setValueLinePart1Length(1f);
+        //设置连线长度是否可变
+        pieDataSet.setValueLineVariableLength(false);
+        //设置连接线距离饼图的距离
+        pieDataSet.setValueLinePart1OffsetPercentage(100f);
+    }
+    /**
+     * 通过此方法可以使 Fragment 能够与外界做一些交互和通信, 比如说外部的 Activity 想让自己持有的某个 Fragment 对象执行一些方法,
+     * 建议在有多个需要与外界交互的方法时, 统一传 {@link Message}, 通过 what 字段来区分不同的方法, 在 {@link #setData(Object)}
+     * 方法中就可以 {@code switch} 做不同的操作, 这样就可以用统一的入口方法做多个不同的操作, 可以起到分发的作用
+     * <p>
+     * 调用此方法时请注意调用时 Fragment 的生命周期, 如果调用 {@link #setData(Object)} 方法时 {@link Fragment#onCreate(Bundle)} 还没执行
+     * 但在 {@link #setData(Object)} 里却调用了 Presenter 的方法, 是会报空的, 因为 Dagger 注入是在 {@link Fragment#onCreate(Bundle)} 方法中执行的
+     * 然后才创建的 Presenter, 如果要做一些初始化操作,可以不必让外部调用 {@link #setData(Object)}, 在 {@link #initData(Bundle)} 中初始化就可以了
+     * <p>
+     * Example usage:
+     * <pre>
+     * public void setData(@Nullable Object data) {
+     *     if (data != null && data instanceof Message) {
+     *         switch (((Message) data).what) {
+     *             case 0:
+     *                 loadData(((Message) data).arg1);
+     *                 break;
+     *             case 1:
+     *                 refreshUI();
+     *                 break;
+     *             default:
+     *                 //do something
+     *                 break;
+     *         }
+     *     }
+     * }
+     *
+     * // call setData(Object):
+     * Message data = new Message();
+     * data.what = 0;
+     * data.arg1 = 1;
+     * fragment.setData(data);
+     * </pre>
+     *
+     * @param data 当不需要参数时 {@code data} 可以为 {@code null}
+     */
+    @Override
+    public void setData(@Nullable Object data) {
+
+    }
+
+    @Override
+    public void showLoading() {
+
+    }
+
+    @Override
+    public void hideLoading() {
+
+    }
+
+    @Override
+    public void showMessage(@NonNull String message) {
+        checkNotNull(message);
+        ArmsUtils.snackbarText(message);
+    }
+
+    @Override
+    public void launchActivity(@NonNull Intent intent) {
+        checkNotNull(intent);
+        ArmsUtils.startActivity(intent);
+    }
+
+    @Override
+    public void killMyself() {
+
+    }
+}

+ 202 - 39
app/src/main/java/com/xwkj/jcjcgz/mvp/ui/fragment/RwzxFragment.java

@@ -6,24 +6,23 @@ import android.os.Message;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
-import android.widget.FrameLayout;
 import android.widget.ImageView;
-import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
-import android.widget.ScrollView;
-import android.widget.TableLayout;
 import android.widget.TextView;
 import android.widget.Toast;
 
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentTransaction;
 import androidx.viewpager2.adapter.FragmentStateAdapter;
 import androidx.viewpager2.widget.ViewPager2;
 
-import com.google.android.material.appbar.AppBarLayout;
+import com.bumptech.glide.Glide;
 import com.google.android.material.tabs.TabLayout;
 import com.google.android.material.tabs.TabLayoutMediator;
+import com.google.gson.Gson;
+import com.hjq.toast.ToastUtils;
 import com.jess.arms.base.BaseFragment;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
@@ -34,11 +33,14 @@ import com.scwang.smart.refresh.layout.SmartRefreshLayout;
 import com.scwang.smart.refresh.layout.api.RefreshLayout;
 import com.scwang.smart.refresh.layout.constant.RefreshState;
 import com.scwang.smart.refresh.layout.simple.SimpleMultiListener;
+import com.squareup.picasso.Picasso;
 import com.xwkj.jcjcgz.R;
 import com.xwkj.jcjcgz.di.component.DaggerRwzxComponent;
 import com.xwkj.jcjcgz.mvp.contract.RwzxContract;
 import com.xwkj.jcjcgz.mvp.model.api.CommonInterFace;
 import com.xwkj.jcjcgz.mvp.model.api.ReqToBus;
+import com.xwkj.jcjcgz.mvp.model.entity.ChannelEntity;
+import com.xwkj.jcjcgz.mvp.model.entity.TaskEntity;
 import com.xwkj.jcjcgz.mvp.presenter.RwzxPresenter;
 import com.xwkj.jcjcgz.mvp.ui.activity.MainActivity;
 
@@ -46,8 +48,10 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Random;
 
 import butterknife.BindView;
+import butterknife.OnClick;
 
 import static com.jess.arms.utils.Preconditions.checkNotNull;
 
@@ -68,12 +72,24 @@ public class RwzxFragment extends BaseFragment<RwzxPresenter> implements RwzxCon
 
     @BindView(R.id.rwzx_tv_search)
     TextView tvSearch;
+    @BindView(R.id.rwzx_layout_task_1)
+    View layoutTask1;
+    @BindView(R.id.rwzx_layout_task_2)
+    View layoutTask2;
+    @BindView(R.id.rwzx_layout_task_3)
+    View layoutTask3;
     @BindView(R.id.rwzx_tv_task_1)
     TextView tvTask1;
     @BindView(R.id.rwzx_tv_task_2)
     TextView tvTask2;
     @BindView(R.id.rwzx_tv_task_3)
     TextView tvTask3;
+    @BindView(R.id.rwzx_tv_task_num_1)
+    TextView tvTaskNum1;
+    @BindView(R.id.rwzx_tv_task_num_2)
+    TextView tvTaskNum2;
+    @BindView(R.id.rwzx_tv_task_num_3)
+    TextView tvTaskNum3;
     @BindView(R.id.rwzx_iv_task_1)
     ImageView ivTask1;
     @BindView(R.id.rwzx_iv_task_2)
@@ -86,10 +102,7 @@ public class RwzxFragment extends BaseFragment<RwzxPresenter> implements RwzxCon
     ImageView ivTriangle2;
     @BindView(R.id.rwzx_iv_triangle_3)
     ImageView ivTriangle3;
-    @BindView(R.id.rwzx_tab)
-    TabLayout tabLayout;
-    @BindView(R.id.rwzx_vp)
-    ViewPager2 viewPager;
+
     @BindView(R.id.second_floor)
     ImageView secondFloor;
     @BindView(R.id.second_floor_content)
@@ -102,8 +115,19 @@ public class RwzxFragment extends BaseFragment<RwzxPresenter> implements RwzxCon
     TwoLevelHeader header;
     @BindView(R.id.refreshLayout)
     SmartRefreshLayout refreshLayout;
-/*    @BindView(R.id.rwzx_appbar)
-    AppBarLayout appBarLayout;*/
+    @BindView(R.id.rwzx_container)
+    View container;
+    @BindView(R.id.layout_rwzx)
+    View layoutRwzx;
+    @BindView(R.id.rwfx_tab)
+    TabLayout tabLayout;
+    @BindView(R.id.rwfx_vp)
+    ViewPager2 viewPager;
+
+    private TaskTypeFragment taskTypeFragment1;
+    private TaskTypeFragment taskTypeFragment2;
+    private TaskTypeFragment taskTypeFragment3;
+    private List<ChannelEntity.Task> tasks;
 
     public static RwzxFragment newInstance() {
         RwzxFragment fragment = new RwzxFragment();
@@ -127,6 +151,7 @@ public class RwzxFragment extends BaseFragment<RwzxPresenter> implements RwzxCon
 
     @Override
     public void initData(@Nullable Bundle savedInstanceState) {
+
         refreshLayout.setEnableAutoLoadMore(false);
         refreshLayout.setEnableLoadMore(false);
         refreshLayout.setOnMultiListener(new SimpleMultiListener() {
@@ -157,45 +182,25 @@ public class RwzxFragment extends BaseFragment<RwzxPresenter> implements RwzxCon
                 Toast.makeText(getActivity(), "打开二楼", Toast.LENGTH_SHORT).show();
                 secondFloorContent.animate().alpha(1).setDuration(2000);
                 getActivity().findViewById(R.id.ll_main_tab).setVisibility(View.GONE);
+                layoutRwzx.setVisibility(View.GONE);
                 return true;
             }
         });
         rl_back.setOnClickListener(v -> {
             header.finishTwoLevel();
             getActivity().findViewById(R.id.ll_main_tab).setVisibility(View.VISIBLE);
+            layoutRwzx.setVisibility(View.VISIBLE);
         });
-        //网络请求示例
-        Map<String, String> map = new HashMap<>();
-        map.put("startTime", "77778787878787");
-        map.put("endTime", "545454545454545");
-        Map<String, Object> map1 = new HashMap<>();
-        map1.put("className", "appMenuController");
-        map1.put("methodName", "getsssj");
-        map1.put("params", map);
-        ReqToBus.getInstance().init(getActivity()).getRequestV2(map1, new CommonInterFace() {
-            @Override
-            public void onSuccess(String result) {
-
-            }
+        layoutTask1.performClick();
 
-            @Override
-            public void onError(Throwable throwable) {
 
-            }
-
-            @Override
-            public void onFinsh() {
-
-            }
-        });
+        // 二楼页面
         List<Fragment> fragments = new ArrayList<>();
-        fragments.add(TaskFragment.newInstance());
-        fragments.add(TaskFragment.newInstance());
-        fragments.add(TaskFragment.newInstance());
+        fragments.add(RwfxTaskStatusFragment.newInstance());
+        fragments.add(RwfxTaskStatusFragment.newInstance());
         List<String> titles = new ArrayList<>();
-        titles.add("111111111111");
-        titles.add("222222222");
-        titles.add("333333333333333");
+        titles.add("已签收");
+        titles.add("已反馈");
         FragmentStateAdapter mAdapter = new FragmentStateAdapter(this) {
             @Override
             public int getItemCount() {
@@ -216,8 +221,95 @@ public class RwzxFragment extends BaseFragment<RwzxPresenter> implements RwzxCon
                 tab.setText(titles.get(position));
             }
         }).attach();
+
+        Map<String, String> map = new HashMap<>();
+        map.put("code", "app_menu");
+        mPresenter.getMenu(map);
+    }
+
+
+    @OnClick({R.id.rwzx_layout_task_1, R.id.rwzx_layout_task_2, R.id.rwzx_layout_task_3})
+    public void onViewClicked(View view) {
+        switch (view.getId()) {
+            case R.id.rwzx_layout_task_1:
+                setTabSelection(0);
+                break;
+            case R.id.rwzx_layout_task_2:
+                setTabSelection(1);
+                break;
+            case R.id.rwzx_layout_task_3:
+                setTabSelection(2);
+                break;
+        }
+    }
+
+    public void setTabSelection(int index) {
+        tvTask1.setTextColor(getResources().getColor(R.color.color_666666));
+        tvTask2.setTextColor(getResources().getColor(R.color.color_666666));
+        tvTask3.setTextColor(getResources().getColor(R.color.color_666666));
+        ivTriangle1.setVisibility(View.GONE);
+        ivTriangle2.setVisibility(View.GONE);
+        ivTriangle3.setVisibility(View.GONE);
+        // 开启一个Fragment事务
+        FragmentTransaction transaction = getActivity().getSupportFragmentManager().beginTransaction();
+        // 先隐藏掉所有的Fragment,
+        hideFragments(transaction);
+        switch (index) {
+            case 0:
+                if (taskTypeFragment1 == null) {
+                    taskTypeFragment1 = TaskTypeFragment.newInstance(new ArrayList<>());
+                    transaction.add(R.id.rwzx_container, taskTypeFragment1);
+                } else {
+                    transaction.show(taskTypeFragment1);
+                }
+                tvTask1.setTextColor(getResources().getColor(R.color.color_111111));
+                ivTriangle1.setVisibility(View.VISIBLE);
+                break;
+
+            case 1:
+                if (taskTypeFragment2 == null) {
+                    if (tasks != null && tasks.size() > 1) {
+                        taskTypeFragment2 = TaskTypeFragment.newInstance(tasks.get(1).getChildren());
+                        transaction.add(R.id.rwzx_container, taskTypeFragment2);
+                    }
+                } else {
+                    transaction.show(taskTypeFragment2);
+                }
+                tvTask2.setTextColor(getResources().getColor(R.color.color_111111));
+                ivTriangle2.setVisibility(View.VISIBLE);
+                break;
+            case 2:
+                if (taskTypeFragment3 == null) {
+                    if (tasks != null && tasks.size() > 2) {
+                        taskTypeFragment3 = TaskTypeFragment.newInstance(tasks.get(2).getChildren());
+                        transaction.add(R.id.rwzx_container, taskTypeFragment3);
+                    }
+                } else {
+                    transaction.show(taskTypeFragment3);
+                }
+                tvTask3.setTextColor(getResources().getColor(R.color.color_111111));
+                ivTriangle3.setVisibility(View.VISIBLE);
+                break;
+
+        }
+        transaction.commit();
     }
 
+    private void hideFragments(FragmentTransaction transaction) {
+
+        if (taskTypeFragment1 != null) {
+            transaction.hide(taskTypeFragment1);
+        }
+        if (taskTypeFragment2 != null) {
+            transaction.hide(taskTypeFragment2);
+        }
+
+        if (taskTypeFragment3 != null) {
+            transaction.hide(taskTypeFragment3);
+        }
+
+
+    }
     /**
      * 通过此方法可以使 Fragment 能够与外界做一些交互和通信, 比如说外部的 Activity 想让自己持有的某个 Fragment 对象执行一些方法,
      * 建议在有多个需要与外界交互的方法时, 统一传 {@link Message}, 通过 what 字段来区分不同的方法, 在 {@link #setData(Object)}
@@ -285,4 +377,75 @@ public class RwzxFragment extends BaseFragment<RwzxPresenter> implements RwzxCon
     public void killMyself() {
 
     }
+
+    @Override
+    public void onSuccess(String result) {
+        try {
+            ChannelEntity entity = new Gson().fromJson(result, ChannelEntity.class);
+            if (entity.getCode() == 200) {
+                tasks = entity.getData();
+                for (int i = 0; i < tasks.size(); i++) {
+                    initFragment(i, tasks.get(i));
+                }
+                /*FragmentTransaction transaction = getActivity().getSupportFragmentManager().beginTransaction();
+                if (taskTypeFragment1 != null) {
+                    transaction.add(R.id.rwzx_container, taskTypeFragment1);
+                }
+                if (taskTypeFragment2 != null) {
+                    transaction.add(R.id.rwzx_container, taskTypeFragment2);
+                }
+                if (taskTypeFragment3 != null) {
+                    transaction.add(R.id.rwzx_container, taskTypeFragment3);
+                }
+                transaction.show(taskTypeFragment1);
+                transaction.commit();*/
+                layoutTask1.performClick();
+            } else {
+                ToastUtils.show("获取数据出错,请重试");
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    private void initFragment(int i, ChannelEntity.Task task) {
+        switch (i) {
+            case 0: {
+//                taskTypeFragment1 = TaskTypeFragment.newInstance(task.getChildren());
+                int num = 0;
+                for (ChannelEntity.Task task1: task.getChildren()) {
+                    num = num + task1.getNum();
+                }
+                tvTaskNum1.setText(num + "");
+                tvTask1.setText(task.getDictValue());
+                Picasso.with(getActivity()).load(task.getRemark()).into(ivTask1);
+                taskTypeFragment1.initFragment(task.getChildren());
+            }
+                break;
+            case 1: {
+//                taskTypeFragment2 = TaskTypeFragment.newInstance(task.getChildren());
+                tvTask2.setText(task.getDictValue());
+                Picasso.with(getActivity()).load(task.getRemark()).into(ivTask2);
+                int num = 0;
+                for (ChannelEntity.Task task1: task.getChildren()) {
+                    num = num + task1.getNum();
+                }
+                tvTaskNum2.setText(num + "");
+            }
+                break;
+            case 2: {
+//                taskTypeFragment3 = TaskTypeFragment.newInstance(task.getChildren());
+                tvTask3.setText(task.getDictValue());
+                Picasso.with(getActivity()).load(task.getRemark()).into(ivTask3);
+                int num = 0;
+                for (ChannelEntity.Task task1: task.getChildren()) {
+                    num = num + task1.getNum();
+                }
+                tvTaskNum3.setText(num + "");
+            }
+                break;
+            default:
+                break;
+        }
+    }
 }

+ 222 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/ui/fragment/TaskDxzpFragment.java

@@ -0,0 +1,222 @@
+package com.xwkj.jcjcgz.mvp.ui.fragment;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Message;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.google.gson.Gson;
+import com.hjq.toast.ToastUtils;
+import com.jess.arms.base.BaseFragment;
+import com.jess.arms.di.component.AppComponent;
+import com.jess.arms.utils.ArmsUtils;
+
+import com.scwang.smart.refresh.footer.ClassicsFooter;
+import com.scwang.smart.refresh.header.ClassicsHeader;
+import com.scwang.smart.refresh.layout.SmartRefreshLayout;
+import com.scwang.smart.refresh.layout.api.RefreshLayout;
+import com.scwang.smart.refresh.layout.constant.SpinnerStyle;
+import com.scwang.smart.refresh.layout.listener.OnLoadMoreListener;
+import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
+import com.xwkj.jcjcgz.di.component.DaggerTaskDxzpComponent;
+import com.xwkj.jcjcgz.mvp.contract.TaskDxzpContract;
+import com.xwkj.jcjcgz.mvp.model.entity.TaskDxzpEntity;
+import com.xwkj.jcjcgz.mvp.model.entity.TaskEntity;
+import com.xwkj.jcjcgz.mvp.presenter.TaskDxzpPresenter;
+
+import com.xwkj.jcjcgz.R;
+import com.xwkj.jcjcgz.mvp.ui.adapter.TaskAdapter;
+import com.xwkj.jcjcgz.mvp.ui.adapter.TaskDxzpAdapter;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import butterknife.BindView;
+
+import static com.jess.arms.utils.Preconditions.checkNotNull;
+
+
+/**
+ * ================================================
+ * Description: 电信诈骗
+ * <p>
+ * Created by MVPArmsTemplate on 07/16/2024 14:19
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+public class TaskDxzpFragment extends BaseFragment<TaskDxzpPresenter> implements TaskDxzpContract.View, OnRefreshListener, OnLoadMoreListener {
+    @BindView(R.id.task_rv)
+    RecyclerView rv;
+    @BindView(R.id.smart_refresh)
+    SmartRefreshLayout smart_refresh;
+
+    private List<TaskDxzpEntity.Task> list;
+    private TaskDxzpAdapter mAdapter;
+    private int pageNo = 1;
+    private int pageSize = 10;
+    public static TaskDxzpFragment newInstance() {
+        TaskDxzpFragment fragment = new TaskDxzpFragment();
+        return fragment;
+    }
+
+    @Override
+    public void setupFragmentComponent(@NonNull AppComponent appComponent) {
+        DaggerTaskDxzpComponent //如找不到该类,请编译一下项目
+                .builder()
+                .appComponent(appComponent)
+                .view(this)
+                .build()
+                .inject(this);
+    }
+
+    @Override
+    public View initView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+        return inflater.inflate(R.layout.fragment_task_dxzp, container, false);
+    }
+
+    @Override
+    public void initData(@Nullable Bundle savedInstanceState) {
+        smart_refresh.setEnableRefresh(false);
+        //设置 Header
+        smart_refresh.setRefreshHeader(new ClassicsHeader(getActivity()).setEnableLastTime(true));
+        //设置 Footer
+        smart_refresh.setRefreshFooter(new ClassicsFooter(getActivity()).setSpinnerStyle(SpinnerStyle.FixedBehind));
+
+        smart_refresh.setOnRefreshListener(this);
+        smart_refresh.setOnLoadMoreListener(this);
+        rv.setNestedScrollingEnabled(false);
+        rv.setFocusable(false);
+        rv.setLayoutManager(new LinearLayoutManager(getActivity()));
+        list = new ArrayList<>();
+        mAdapter = new TaskDxzpAdapter(list);
+        rv.setAdapter(mAdapter);
+        requestData(pageNo = 1, pageSize);
+    }
+
+    /**
+     * 通过此方法可以使 Fragment 能够与外界做一些交互和通信, 比如说外部的 Activity 想让自己持有的某个 Fragment 对象执行一些方法,
+     * 建议在有多个需要与外界交互的方法时, 统一传 {@link Message}, 通过 what 字段来区分不同的方法, 在 {@link #setData(Object)}
+     * 方法中就可以 {@code switch} 做不同的操作, 这样就可以用统一的入口方法做多个不同的操作, 可以起到分发的作用
+     * <p>
+     * 调用此方法时请注意调用时 Fragment 的生命周期, 如果调用 {@link #setData(Object)} 方法时 {@link Fragment#onCreate(Bundle)} 还没执行
+     * 但在 {@link #setData(Object)} 里却调用了 Presenter 的方法, 是会报空的, 因为 Dagger 注入是在 {@link Fragment#onCreate(Bundle)} 方法中执行的
+     * 然后才创建的 Presenter, 如果要做一些初始化操作,可以不必让外部调用 {@link #setData(Object)}, 在 {@link #initData(Bundle)} 中初始化就可以了
+     * <p>
+     * Example usage:
+     * <pre>
+     * public void setData(@Nullable Object data) {
+     *     if (data != null && data instanceof Message) {
+     *         switch (((Message) data).what) {
+     *             case 0:
+     *                 loadData(((Message) data).arg1);
+     *                 break;
+     *             case 1:
+     *                 refreshUI();
+     *                 break;
+     *             default:
+     *                 //do something
+     *                 break;
+     *         }
+     *     }
+     * }
+     *
+     * // call setData(Object):
+     * Message data = new Message();
+     * data.what = 0;
+     * data.arg1 = 1;
+     * fragment.setData(data);
+     * </pre>
+     *
+     * @param data 当不需要参数时 {@code data} 可以为 {@code null}
+     */
+    @Override
+    public void setData(@Nullable Object data) {
+
+    }
+
+    @Override
+    public void showLoading() {
+
+    }
+
+    @Override
+    public void hideLoading() {
+
+    }
+
+    @Override
+    public void showMessage(@NonNull String message) {
+        checkNotNull(message);
+        ArmsUtils.snackbarText(message);
+    }
+
+    @Override
+    public void launchActivity(@NonNull Intent intent) {
+        checkNotNull(intent);
+        ArmsUtils.startActivity(intent);
+    }
+
+    @Override
+    public void killMyself() {
+
+    }
+    @Override
+    public void onRefresh(@NonNull RefreshLayout refreshLayout) {
+        list.clear();
+        mAdapter.notifyDataSetChanged();
+        requestData(pageNo = 1, pageSize);
+    }
+
+    @Override
+    public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
+
+        requestData(++pageNo, pageSize);
+    }
+
+    private void requestData(int pageNo, int pageSize) {
+
+        Map<String, String> map = new HashMap<>();
+        map.put("current", pageNo + "");
+        map.put("size", pageSize + "");
+        if (mPresenter != null) {
+            mPresenter.getList(map);
+        }
+
+    }
+
+    @Override
+    public void onSuccess(String result) {
+        smart_refresh.finishLoadMore();
+        smart_refresh.finishRefresh();
+        TaskDxzpEntity taskEntity = new Gson().fromJson(result, TaskDxzpEntity.class);
+        if (taskEntity.getCode() == 200) {
+            List<TaskDxzpEntity.Task> records = taskEntity.getData().getRecords();
+            if (records.size() > 0 && records != null) {
+                list.addAll(records);
+                list.addAll(records);
+                list.addAll(records);
+                list.addAll(records);
+                mAdapter.notifyDataSetChanged();
+            } else {
+                ToastUtils.show("没有更多数据了");
+            }
+        } else {
+            ToastUtils.show("获取数据出错,请重试");
+        }
+    }
+}

+ 24 - 4
app/src/main/java/com/xwkj/jcjcgz/mvp/ui/fragment/TaskFragment.java

@@ -15,6 +15,8 @@ import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 
+import com.google.gson.Gson;
+import com.hjq.toast.ToastUtils;
 import com.jess.arms.base.BaseFragment;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
@@ -97,13 +99,13 @@ public class TaskFragment extends BaseFragment<TaskPresenter> implements TaskCon
 
         smart_refresh.setOnRefreshListener(this);
         smart_refresh.setOnLoadMoreListener(this);
+        rv.setNestedScrollingEnabled(false);
+        rv.setFocusable(false);
         rv.setLayoutManager(new LinearLayoutManager(getActivity()));
         list = new ArrayList<>();
-        list.add(new TaskEntity.Task());
-        list.add(new TaskEntity.Task());
-        list.add(new TaskEntity.Task());
         mAdapter = new TaskAdapter(list);
         rv.setAdapter(mAdapter);
+        requestData(pageNo = 1, pageSize);
     }
 
     /**
@@ -193,8 +195,26 @@ public class TaskFragment extends BaseFragment<TaskPresenter> implements TaskCon
         map.put("current", pageNo + "");
         map.put("size", pageSize + "");
         if (mPresenter != null) {
-
+            mPresenter.getList(map);
         }
 
     }
+
+    @Override
+    public void onSuccess(String result) {
+        smart_refresh.finishLoadMore();
+        smart_refresh.finishRefresh();
+        TaskEntity taskEntity = new Gson().fromJson(result, TaskEntity.class);
+        if (taskEntity.getCode() == 200) {
+            List<TaskEntity.Task> records = taskEntity.getData().getRecords();
+            if (records.size() > 0 && records != null) {
+                list.addAll(records);
+                mAdapter.notifyDataSetChanged();
+            } else {
+                ToastUtils.show("没有更多数据了");
+            }
+        } else {
+            ToastUtils.show("获取数据出错,请重试");
+        }
+    }
 }

+ 191 - 0
app/src/main/java/com/xwkj/jcjcgz/mvp/ui/fragment/TaskTypeFragment.java

@@ -0,0 +1,191 @@
+package com.xwkj.jcjcgz.mvp.ui.fragment;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Message;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.viewpager2.adapter.FragmentStateAdapter;
+import androidx.viewpager2.widget.ViewPager2;
+
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.google.android.material.tabs.TabLayout;
+import com.google.android.material.tabs.TabLayoutMediator;
+import com.jess.arms.base.BaseFragment;
+import com.jess.arms.di.component.AppComponent;
+import com.jess.arms.utils.ArmsUtils;
+
+import com.xwkj.jcjcgz.di.component.DaggerTaskTypeComponent;
+import com.xwkj.jcjcgz.mvp.contract.TaskTypeContract;
+import com.xwkj.jcjcgz.mvp.model.entity.ChannelEntity;
+import com.xwkj.jcjcgz.mvp.presenter.TaskTypePresenter;
+
+import com.xwkj.jcjcgz.R;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
+import butterknife.BindView;
+
+import static com.jess.arms.utils.Preconditions.checkNotNull;
+
+
+/**
+ * ================================================
+ * Description:
+ * <p>
+ * Created by MVPArmsTemplate on 07/11/2024 14:58
+ * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
+ * <a href="https://github.com/JessYanCoding">Follow me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
+ * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
+ * ================================================
+ */
+public class TaskTypeFragment extends BaseFragment<TaskTypePresenter> implements TaskTypeContract.View {
+    @BindView(R.id.rwzx_tab)
+    TabLayout tabLayout;
+    @BindView(R.id.rwzx_vp)
+    ViewPager2 viewPager;
+    public static TaskTypeFragment newInstance(ArrayList<ChannelEntity.Task> tasks) {
+        TaskTypeFragment fragment = new TaskTypeFragment();
+        Bundle bundle = new Bundle();
+        bundle.putSerializable("tasks", tasks);
+        fragment.setArguments(bundle);
+        return fragment;
+    }
+
+    @Override
+    public void setupFragmentComponent(@NonNull AppComponent appComponent) {
+        DaggerTaskTypeComponent //如找不到该类,请编译一下项目
+                .builder()
+                .appComponent(appComponent)
+                .view(this)
+                .build()
+                .inject(this);
+    }
+
+    @Override
+    public View initView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+        return inflater.inflate(R.layout.fragment_task_type, container, false);
+    }
+
+    @Override
+    public void initData(@Nullable Bundle savedInstanceState) {
+//        ArrayList<ChannelEntity.Task> tasks = (ArrayList<ChannelEntity.Task>) getArguments().getSerializable("tasks");
+        ArrayList<ChannelEntity.Task> tasks = new ArrayList<>();
+        for (int i = 0; i < 3; i++) {
+            ChannelEntity.Task task = new ChannelEntity.Task();
+            task.setDictValue(i + " ::::: " + i);
+            task.setNum(i);
+            tasks.add(task);
+        }
+        if (!tasks.isEmpty()) {
+            initFragment(tasks);
+        }
+    }
+
+    public void initFragment(ArrayList<ChannelEntity.Task> tasks) {
+        List<Fragment> fragments = new ArrayList<>();
+        List<String> titles = new ArrayList<>();
+        for (ChannelEntity.Task task: tasks) {
+            fragments.add(TaskDxzpFragment.newInstance());
+            titles.add(task.getDictValue() + "  " + task.getNum());
+        }
+        FragmentStateAdapter mAdapter = new FragmentStateAdapter(this) {
+            @Override
+            public int getItemCount() {
+                return fragments.size();
+            }
+
+            @NonNull
+            @Override
+            public Fragment createFragment(int position) {
+                return fragments.get(position);
+            }
+
+        };
+        viewPager.setAdapter(mAdapter);
+        new TabLayoutMediator(tabLayout, viewPager, new TabLayoutMediator.TabConfigurationStrategy() {
+            @Override
+            public void onConfigureTab(@NonNull TabLayout.Tab tab, int position) {
+                tab.setText(titles.get(position));
+            }
+        }).attach();
+    }
+
+    /**
+     * 通过此方法可以使 Fragment 能够与外界做一些交互和通信, 比如说外部的 Activity 想让自己持有的某个 Fragment 对象执行一些方法,
+     * 建议在有多个需要与外界交互的方法时, 统一传 {@link Message}, 通过 what 字段来区分不同的方法, 在 {@link #setData(Object)}
+     * 方法中就可以 {@code switch} 做不同的操作, 这样就可以用统一的入口方法做多个不同的操作, 可以起到分发的作用
+     * <p>
+     * 调用此方法时请注意调用时 Fragment 的生命周期, 如果调用 {@link #setData(Object)} 方法时 {@link Fragment#onCreate(Bundle)} 还没执行
+     * 但在 {@link #setData(Object)} 里却调用了 Presenter 的方法, 是会报空的, 因为 Dagger 注入是在 {@link Fragment#onCreate(Bundle)} 方法中执行的
+     * 然后才创建的 Presenter, 如果要做一些初始化操作,可以不必让外部调用 {@link #setData(Object)}, 在 {@link #initData(Bundle)} 中初始化就可以了
+     * <p>
+     * Example usage:
+     * <pre>
+     * public void setData(@Nullable Object data) {
+     *     if (data != null && data instanceof Message) {
+     *         switch (((Message) data).what) {
+     *             case 0:
+     *                 loadData(((Message) data).arg1);
+     *                 break;
+     *             case 1:
+     *                 refreshUI();
+     *                 break;
+     *             default:
+     *                 //do something
+     *                 break;
+     *         }
+     *     }
+     * }
+     *
+     * // call setData(Object):
+     * Message data = new Message();
+     * data.what = 0;
+     * data.arg1 = 1;
+     * fragment.setData(data);
+     * </pre>
+     *
+     * @param data 当不需要参数时 {@code data} 可以为 {@code null}
+     */
+    @Override
+    public void setData(@Nullable Object data) {
+
+    }
+
+    @Override
+    public void showLoading() {
+
+    }
+
+    @Override
+    public void hideLoading() {
+
+    }
+
+    @Override
+    public void showMessage(@NonNull String message) {
+        checkNotNull(message);
+        ArmsUtils.snackbarText(message);
+    }
+
+    @Override
+    public void launchActivity(@NonNull Intent intent) {
+        checkNotNull(intent);
+        ArmsUtils.startActivity(intent);
+    }
+
+    @Override
+    public void killMyself() {
+
+    }
+}

+ 233 - 35
app/src/main/java/com/xwkj/jcjcgz/mvp/ui/fragment/Test1Fragment.java

@@ -6,16 +6,27 @@ import android.os.Message;
 
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
+import androidx.coordinatorlayout.widget.CoordinatorLayout;
 import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentTransaction;
+import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
+import androidx.viewpager2.adapter.FragmentStateAdapter;
+import androidx.viewpager2.widget.ViewPager2;
 
+import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.ImageView;
 import android.widget.RelativeLayout;
 import android.widget.ScrollView;
+import android.widget.TextView;
 import android.widget.Toast;
 
+import com.google.android.material.tabs.TabLayout;
+import com.google.android.material.tabs.TabLayoutMediator;
+import com.google.gson.Gson;
+import com.hjq.toast.ToastUtils;
 import com.jess.arms.base.BaseFragment;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
@@ -27,18 +38,27 @@ import com.scwang.smart.refresh.layout.SmartRefreshLayout;
 import com.scwang.smart.refresh.layout.api.RefreshLayout;
 import com.scwang.smart.refresh.layout.constant.RefreshState;
 import com.scwang.smart.refresh.layout.simple.SimpleMultiListener;
+import com.squareup.picasso.Picasso;
+import com.wuyr.secondfloorbehavior.OnBeforeEnterSecondFloorListener;
+import com.wuyr.secondfloorbehavior.OnStateChangeListener;
+import com.wuyr.secondfloorbehavior.SecondFloorBehavior;
+import com.xwkj.jcjcgz.di.component.DaggerRwzxComponent;
 import com.xwkj.jcjcgz.di.component.DaggerTest1Component;
 import com.xwkj.jcjcgz.mvp.contract.Test1Contract;
 import com.xwkj.jcjcgz.mvp.model.api.CommonInterFace;
 import com.xwkj.jcjcgz.mvp.model.api.ReqToBus;
+import com.xwkj.jcjcgz.mvp.model.entity.ChannelEntity;
 import com.xwkj.jcjcgz.mvp.presenter.Test1Presenter;
 
 import com.xwkj.jcjcgz.R;
 
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import butterknife.BindView;
+import butterknife.OnClick;
 
 import static com.jess.arms.utils.Preconditions.checkNotNull;
 
@@ -56,24 +76,60 @@ import static com.jess.arms.utils.Preconditions.checkNotNull;
  * ================================================
  */
 public class Test1Fragment extends BaseFragment<Test1Presenter> implements Test1Contract.View {
-    @BindView(R.id.second_floor)
-    ImageView secondFloor;
-    @BindView(R.id.second_floor_content)
-    RelativeLayout secondFloorContent;
+    @BindView(R.id.rwzx_tv_search)
+    TextView tvSearch;
+    @BindView(R.id.rwzx_layout_task_1)
+    View layoutTask1;
+    @BindView(R.id.rwzx_layout_task_2)
+    View layoutTask2;
+    @BindView(R.id.rwzx_layout_task_3)
+    View layoutTask3;
+    @BindView(R.id.rwzx_tv_task_1)
+    TextView tvTask1;
+    @BindView(R.id.rwzx_tv_task_2)
+    TextView tvTask2;
+    @BindView(R.id.rwzx_tv_task_3)
+    TextView tvTask3;
+    @BindView(R.id.rwzx_tv_task_num_1)
+    TextView tvTaskNum1;
+    @BindView(R.id.rwzx_tv_task_num_2)
+    TextView tvTaskNum2;
+    @BindView(R.id.rwzx_tv_task_num_3)
+    TextView tvTaskNum3;
+    @BindView(R.id.rwzx_iv_task_1)
+    ImageView ivTask1;
+    @BindView(R.id.rwzx_iv_task_2)
+    ImageView ivTask2;
+    @BindView(R.id.rwzx_iv_task_3)
+    ImageView ivTask3;
+    @BindView(R.id.rwzx_iv_triangle_1)
+    ImageView ivTriangle1;
+    @BindView(R.id.rwzx_iv_triangle_2)
+    ImageView ivTriangle2;
+    @BindView(R.id.rwzx_iv_triangle_3)
+    ImageView ivTriangle3;
+/*    @BindView(R.id.secondFloorView)
+    View secondFloorView;*/
+
     @BindView(R.id.rl_back)
     RelativeLayout rl_back;
-    @BindView(R.id.classics)
-    ClassicsHeader classics;
-    @BindView(R.id.header)
-    TwoLevelHeader header;
-    @BindView(R.id.contentPanel)
-    RelativeLayout contentPanel;
-    @BindView(R.id.scrollView)
-    ScrollView scrollView;
-    @BindView(R.id.refreshLayout)
-    SmartRefreshLayout refreshLayout;
-    public static Test1Fragment newInstance() {
-        Test1Fragment fragment = new Test1Fragment();
+    @BindView(R.id.rwzx_container)
+    View container;
+    @BindView(R.id.layout_rwzx)
+    View layoutRwzx;
+/*    @BindView(R.id.rwfx_tab)
+    TabLayout tabLayout;
+    @BindView(R.id.rwfx_vp)
+    ViewPager2 viewPager;*/
+/*    @BindView(R.id.firstFloorView)
+    SwipeRefreshLayout firstFloorView;*/
+
+    private TaskTypeFragment taskTypeFragment1;
+    private TaskTypeFragment taskTypeFragment2;
+    private TaskTypeFragment taskTypeFragment3;
+
+    public static RwzxFragment newInstance() {
+        RwzxFragment fragment = new RwzxFragment();
         return fragment;
     }
 
@@ -94,6 +150,9 @@ public class Test1Fragment extends BaseFragment<Test1Presenter> implements Test1
 
     @Override
     public void initData(@Nullable Bundle savedInstanceState) {
+
+        /*refreshLayout.setEnableAutoLoadMore(false);
+        refreshLayout.setEnableLoadMore(false);
         refreshLayout.setOnMultiListener(new SimpleMultiListener() {
             @Override
             public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
@@ -115,44 +174,142 @@ public class Test1Fragment extends BaseFragment<Test1Presenter> implements Test1
             }
         });
 
-
+        View viewById = getActivity().findViewById(R.id.ll_main_tab);
         header.setOnTwoLevelListener(new OnTwoLevelListener() {
             @Override
             public boolean onTwoLevel(@NonNull RefreshLayout refreshLayout) {
                 Toast.makeText(getActivity(), "打开二楼", Toast.LENGTH_SHORT).show();
                 secondFloorContent.animate().alpha(1).setDuration(2000);
+                getActivity().findViewById(R.id.ll_main_tab).setVisibility(View.GONE);
+                layoutRwzx.setVisibility(View.GONE);
                 return true;
             }
-        });
+        });*/
         rl_back.setOnClickListener(v -> {
-            header.finishTwoLevel();
+            /*header.finishTwoLevel();
+            getActivity().findViewById(R.id.ll_main_tab).setVisibility(View.VISIBLE);
+            layoutRwzx.setVisibility(View.VISIBLE);*/
         });
-        //网络请求示例
-        Map<String, String> map = new HashMap<>();
-        map.put("startTime", "77778787878787");
-        map.put("endTime", "545454545454545");
-        Map<String, Object> map1 = new HashMap<>();
-        map1.put("className", "appMenuController");
-        map1.put("methodName", "getsssj");
-        map1.put("params", map);
-        ReqToBus.getInstance().init(getActivity()).getRequestV2(map1, new CommonInterFace() {
-            @Override
-            public void onSuccess(String result) {
+        layoutTask1.performClick();
 
-            }
 
+        // 二楼页面
+      /*  List<Fragment> fragments = new ArrayList<>();
+        fragments.add(RwfxTaskStatusFragment.newInstance());
+        fragments.add(RwfxTaskStatusFragment.newInstance());
+        List<String> titles = new ArrayList<>();
+        titles.add("已签收");
+        titles.add("已反馈");
+        FragmentStateAdapter mAdapter = new FragmentStateAdapter(this) {
             @Override
-            public void onError(Throwable throwable) {
-
+            public int getItemCount() {
+                return fragments.size();
             }
 
+            @NonNull
             @Override
-            public void onFinsh() {
+            public Fragment createFragment(int position) {
+                return fragments.get(position);
+            }
 
+        };
+        viewPager.setAdapter(mAdapter);
+        new TabLayoutMediator(tabLayout, viewPager, new TabLayoutMediator.TabConfigurationStrategy() {
+            @Override
+            public void onConfigureTab(@NonNull TabLayout.Tab tab, int position) {
+                tab.setText(titles.get(position));
             }
-        });
+        }).attach();*/
+
+        Map<String, String> map = new HashMap<>();
+        map.put("code", "app_menu");
+//        mPresenter.getMenu(map);
+    }
+
+    public void onEnterSecondFloor() {
+
+    }
+
+    @OnClick({R.id.rwzx_layout_task_1, R.id.rwzx_layout_task_2, R.id.rwzx_layout_task_3})
+    public void onViewClicked(View view) {
+        switch (view.getId()) {
+            case R.id.rwzx_layout_task_1:
+                setTabSelection(0);
+                break;
+            case R.id.rwzx_layout_task_2:
+                setTabSelection(1);
+                break;
+            case R.id.rwzx_layout_task_3:
+                setTabSelection(2);
+                break;
+        }
+    }
+
+    public void setTabSelection(int index) {
+        tvTask1.setTextColor(getResources().getColor(R.color.color_666666));
+        tvTask2.setTextColor(getResources().getColor(R.color.color_666666));
+        tvTask3.setTextColor(getResources().getColor(R.color.color_666666));
+        ivTriangle1.setVisibility(View.GONE);
+        ivTriangle2.setVisibility(View.GONE);
+        ivTriangle3.setVisibility(View.GONE);
+        // 开启一个Fragment事务
+        FragmentTransaction transaction = getActivity().getSupportFragmentManager().beginTransaction();
+        // 先隐藏掉所有的Fragment,
+        hideFragments(transaction);
+        switch (index) {
+            case 0:
+                if (taskTypeFragment1 == null) {
+                    taskTypeFragment1 = new TaskTypeFragment();
+                    transaction.add(R.id.rwzx_container, taskTypeFragment1);
+                } else {
+                    transaction.show(taskTypeFragment1);
+                }
+                tvTask1.setTextColor(getResources().getColor(R.color.color_111111));
+                ivTriangle1.setVisibility(View.VISIBLE);
+                break;
+
+            case 1:
+                if (taskTypeFragment2 == null) {
+                    taskTypeFragment2 = new TaskTypeFragment();
+                    transaction.add(R.id.rwzx_container, taskTypeFragment2);
+//                    return;
+                } else {
+                    transaction.show(taskTypeFragment2);
+                }
+                tvTask2.setTextColor(getResources().getColor(R.color.color_111111));
+                ivTriangle2.setVisibility(View.VISIBLE);
+                break;
+            case 2:
+                if (taskTypeFragment3 == null) {
+                    taskTypeFragment3 = new TaskTypeFragment();
+                    transaction.add(R.id.rwzx_container, taskTypeFragment3);
+//                    return;
+                } else {
+                    transaction.show(taskTypeFragment3);
+                }
+                tvTask3.setTextColor(getResources().getColor(R.color.color_111111));
+                ivTriangle3.setVisibility(View.VISIBLE);
+                break;
+
+        }
+        transaction.commit();
     }
 
+    private void hideFragments(FragmentTransaction transaction) {
+
+        if (taskTypeFragment1 != null) {
+            transaction.hide(taskTypeFragment1);
+        }
+        if (taskTypeFragment2 != null) {
+            transaction.hide(taskTypeFragment2);
+        }
+
+        if (taskTypeFragment3 != null) {
+            transaction.hide(taskTypeFragment3);
+        }
+
+
+    }
     /**
      * 通过此方法可以使 Fragment 能够与外界做一些交互和通信, 比如说外部的 Activity 想让自己持有的某个 Fragment 对象执行一些方法,
      * 建议在有多个需要与外界交互的方法时, 统一传 {@link Message}, 通过 what 字段来区分不同的方法, 在 {@link #setData(Object)}
@@ -220,4 +377,45 @@ public class Test1Fragment extends BaseFragment<Test1Presenter> implements Test1
     public void killMyself() {
 
     }
+
+
+    private void initFragment(int i, ChannelEntity.Task task) {
+        switch (i) {
+            case 0: {
+                taskTypeFragment1 = TaskTypeFragment.newInstance(task.getChildren());
+                int num = 0;
+                for (ChannelEntity.Task task1: task.getChildren()) {
+                    num = num + task1.getNum();
+                }
+                tvTaskNum1.setText(num + "");
+                tvTask1.setText(task.getDictValue());
+                Picasso.with(getActivity()).load(task.getRemark()).into(ivTask1);
+            }
+            break;
+            case 1: {
+                taskTypeFragment2 = TaskTypeFragment.newInstance(task.getChildren());
+                tvTask2.setText(task.getDictValue());
+                Picasso.with(getActivity()).load(task.getRemark()).into(ivTask2);
+                int num = 0;
+                for (ChannelEntity.Task task1: task.getChildren()) {
+                    num = num + task1.getNum();
+                }
+                tvTaskNum2.setText(num + "");
+            }
+            break;
+            case 2: {
+                taskTypeFragment3 = TaskTypeFragment.newInstance(task.getChildren());
+                tvTask3.setText(task.getDictValue());
+                Picasso.with(getActivity()).load(task.getRemark()).into(ivTask3);
+                int num = 0;
+                for (ChannelEntity.Task task1: task.getChildren()) {
+                    num = num + task1.getNum();
+                }
+                tvTaskNum3.setText(num + "");
+            }
+            break;
+            default:
+                break;
+        }
+    }
 }

TEMPAT SAMPAH
app/src/main/res/drawable-xxxhdpi/bg_red.9.png


TEMPAT SAMPAH
app/src/main/res/drawable-xxxhdpi/bj_btn_home.png


TEMPAT SAMPAH
app/src/main/res/drawable-xxxhdpi/icon_head_default.png


TEMPAT SAMPAH
app/src/main/res/drawable-xxxhdpi/icon_id.png


TEMPAT SAMPAH
app/src/main/res/drawable-xxxhdpi/icon_phone.png


+ 5 - 0
app/src/main/res/drawable/bg_shape_1a9a5eff_corner10.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="#1a9a5eff" />
+    <corners android:radius="10dp" />
+</shape>

+ 21 - 0
app/src/main/res/drawable/task_type_progress_style.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <!--设置ProgressBar背景色-->
+    <item android:id="@android:id/background">
+        <shape>
+            <!--设置ProgressBar进度条圆角半径-->
+            <corners android:radius="8dp" />
+            <solid android:color="#f8f8f8" />
+        </shape>
+    </item>
+
+    <!--设置ProgressBar进度条颜色-->
+    <item android:id="@android:id/progress">
+        <clip android:clipOrientation="horizontal">
+            <shape>
+                <corners android:radius="8dp" />
+                <solid android:color="@color/blue" />
+            </shape>
+        </clip>
+    </item>
+</layer-list>

+ 26 - 0
app/src/main/res/layout/fragment_rwfx_task_status.xml

@@ -0,0 +1,26 @@
+<?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"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <com.google.android.material.tabs.TabLayout
+        android:id="@+id/rwzx_task_status_tab"
+        android:layout_width="match_parent"
+        android:layout_height="40dp"
+        android:layout_below="@id/title_bar"
+        android:paddingLeft="8dp"
+        android:paddingRight="8dp"
+        app:tabIndicatorHeight="0dp"
+        app:tabMode="fixed"
+        app:tabSelectedTextColor="@color/blue"
+        app:tabTextColor="#666666" />
+
+    <androidx.viewpager2.widget.ViewPager2
+        android:id="@+id/rwzx_task_status_vp"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"/>
+
+</LinearLayout>

+ 19 - 0
app/src/main/res/layout/fragment_rwfx_task_type.xml

@@ -0,0 +1,19 @@
+<?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="match_parent"
+    android:orientation="vertical">
+
+    <com.github.mikephil.charting.charts.PieChart
+        android:id="@+id/rwfx_task_type_chart"
+        android:layout_width="match_parent"
+        android:layout_height="208dp"/>
+
+    <androidx.recyclerview.widget.RecyclerView
+        android:id="@+id/rwfx_task_type_rv"
+        android:layout_width="match_parent"
+        android:layout_marginBottom="12dp"
+        android:layout_height="wrap_content"/>
+
+</LinearLayout>

+ 253 - 199
app/src/main/res/layout/fragment_rwzx.xml

@@ -40,11 +40,23 @@
                     android:layout_height="wrap_content"
                     android:layout_marginTop="25dp" />
 
+                <androidx.core.widget.NestedScrollView
+                    android:layout_width="match_parent"
+                    android:layout_below="@id/title_bar"
+                    android:focusableInTouchMode="false"
+                    android:focusable="true"
+                    android:layout_above="@id/rl_back"
+                    android:layout_height="match_parent">
+
+                    <include layout="@layout/layout_rwfx"/>
+
+                </androidx.core.widget.NestedScrollView>
+
                 <RelativeLayout
                     android:id="@+id/rl_back"
                     android:layout_width="match_parent"
                     android:layout_height="70dp"
-                    android:background="#E8C591"
+                    android:background="@drawable/bj_btn_home"
                     android:layout_alignParentBottom="true">
 
                     <TextView
@@ -66,235 +78,277 @@
 
         <FrameLayout
             android:layout_width="match_parent"
+            android:overScrollMode="never"
+            android:id="@+id/layout_rwzx"
             android:layout_height="match_parent">
 
-            <View
+            <FrameLayout
                 android:layout_width="match_parent"
-                android:background="@drawable/bg_rwzx"
-                android:layout_height="480dp"/>
-
-            <LinearLayout
-                android:orientation="vertical"
-                android:id="@+id/rwzx_appbar"
-                android:layout_width="match_parent"
-                android:background="@color/transparent"
                 android:layout_height="match_parent">
 
-                <RelativeLayout
+                <View
                     android:layout_width="match_parent"
-                    android:layout_marginTop="48dp"
-                    android:layout_marginLeft="16dp"
-                    app:layout_scrollFlags="scroll|enterAlways"
-                    android:layout_marginRight="16dp"
-                    android:background="@drawable/bg_rwzx_search"
-                    android:layout_height="36dp">
-
-                    <ImageView
-                        android:layout_width="16dp"
-                        android:layout_marginLeft="12dp"
-                        android:layout_centerVertical="true"
-                        android:background="@drawable/icon_rwzx_search"
-                        android:layout_height="16sp"/>
-
-                    <TextView
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:id="@+id/rwzx_tv_search"
-                        android:text="请输入信息查询"
-                        android:paddingLeft="36dp"
-                        android:gravity="center_vertical"
-                        android:textColor="#ff999999"
-                        android:textSize="13sp"
-                        />
+                    android:background="@drawable/bg_rwzx"
+                    android:layout_height="480dp"/>
 
-                </RelativeLayout>
-                <FrameLayout
+                <LinearLayout
+                    android:orientation="vertical"
+                    android:id="@+id/rwzx_appbar"
                     android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:orientation="vertical">
+                    android:background="@color/transparent"
+                    android:layout_height="match_parent">
+
+                    <RelativeLayout
+                        android:layout_width="match_parent"
+                        android:layout_marginTop="48dp"
+                        android:layout_marginLeft="16dp"
+                        android:focusable="true"
+                        android:focusableInTouchMode="true"
+                        app:layout_scrollFlags="scroll|enterAlways"
+                        android:layout_marginRight="16dp"
+                        android:background="@drawable/bg_rwzx_search"
+                        android:layout_height="36dp">
+
+                        <ImageView
+                            android:layout_width="16dp"
+                            android:layout_marginLeft="12dp"
+                            android:layout_centerVertical="true"
+                            android:background="@drawable/icon_rwzx_search"
+                            android:layout_height="16sp"/>
+
+                        <TextView
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:id="@+id/rwzx_tv_search"
+                            android:text="请输入信息查询"
+                            android:paddingLeft="36dp"
+                            android:gravity="center_vertical"
+                            android:textColor="#ff999999"
+                            android:textSize="13sp"
+                            />
 
+                    </RelativeLayout>
 
                     <LinearLayout
                         android:layout_width="match_parent"
-                        android:orientation="vertical"
+                        android:overScrollMode="never"
                         android:layout_height="match_parent">
 
-
-                        <LinearLayout
+                        <FrameLayout
                             android:layout_width="match_parent"
-                            android:orientation="horizontal"
-                            android:layout_marginTop="12dp"
-                            android:layout_marginLeft="10dp"
-                            android:layout_marginRight="10dp"
-                            android:layout_height="wrap_content">
-
-                            <LinearLayout
-                                android:layout_width="match_parent"
-                                android:layout_weight="1"
-                                android:layout_marginLeft="6dp"
-                                android:layout_marginRight="6dp"
-                                android:orientation="vertical"
-                                android:layout_height="122dp">
+                            android:layout_height="match_parent"
+                            android:orientation="vertical">
 
-                                <RelativeLayout
-                                    android:layout_width="match_parent"
-                                    android:background="@drawable/bg_shape_white_corner8"
-                                    android:layout_height="104dp">
-
-                                    <ImageView
-                                        android:layout_width="53dp"
-                                        android:id="@+id/rwzx_iv_task_1"
-                                        android:layout_centerHorizontal="true"
-                                        android:layout_marginTop="11dp"
-                                        android:layout_height="53dp"/>
-
-                                    <TextView
-                                        android:id="@+id/rwzx_tv_task_1"
-                                        android:layout_width="wrap_content"
-                                        android:layout_centerHorizontal="true"
-                                        android:layout_below="@id/rwzx_iv_task_1"
-                                        android:layout_height="wrap_content"
-                                        android:layout_marginTop="4dp"
-                                        android:text="指令任务"
-                                        android:textColor="#ff111111"
-                                        android:textSize="14sp"
-                                        />
-
-
-                                </RelativeLayout>
-
-                                <ImageView
-                                    android:id="@+id/rwzx_iv_triangle_1"
-                                    android:layout_width="44dp"
-                                    android:layout_gravity="center_horizontal"
-                                    android:layout_marginTop="8dp"
-                                    android:background="@drawable/pic_triangle"
-                                    android:layout_height="13dp"/>
-
-                            </LinearLayout>
 
                             <LinearLayout
                                 android:layout_width="match_parent"
-                                android:layout_weight="1"
-                                android:layout_marginLeft="6dp"
-                                android:layout_marginRight="6dp"
                                 android:orientation="vertical"
-                                android:layout_height="122dp">
+                                android:layout_height="match_parent">
 
-                                <RelativeLayout
-                                    android:layout_width="match_parent"
-                                    android:background="@drawable/bg_shape_white_corner8"
-                                    android:layout_height="104dp">
-
-                                    <ImageView
-                                        android:layout_width="53dp"
-                                        android:id="@+id/rwzx_iv_task_2"
-                                        android:layout_centerHorizontal="true"
-                                        android:layout_marginTop="11dp"
-                                        android:layout_height="53dp"/>
-
-                                    <TextView
-                                        android:id="@+id/rwzx_tv_task_2"
-                                        android:layout_width="wrap_content"
-                                        android:layout_centerHorizontal="true"
-                                        android:layout_below="@id/rwzx_iv_task_2"
-                                        android:layout_height="wrap_content"
-                                        android:layout_marginTop="4dp"
-                                        android:text="规定任务"
-                                        android:textColor="#ff666666"
-                                        android:textSize="14sp"
-                                        />
-
-
-                                </RelativeLayout>
-
-                                <ImageView
-                                    android:id="@+id/rwzx_iv_triangle_2"
-                                    android:layout_width="44dp"
-                                    android:layout_gravity="center_horizontal"
-                                    android:layout_marginTop="8dp"
-                                    android:background="@drawable/pic_triangle"
-                                    android:layout_height="13dp"/>
-
-                            </LinearLayout>
-
-                            <LinearLayout
-                                android:layout_width="match_parent"
-                                android:layout_weight="1"
-                                android:layout_marginLeft="6dp"
-                                android:layout_marginRight="6dp"
-                                android:orientation="vertical"
-                                android:layout_height="122dp">
 
-                                <RelativeLayout
+                                <LinearLayout
+                                    android:layout_width="match_parent"
+                                    android:orientation="horizontal"
+                                    android:layout_marginTop="12dp"
+                                    android:layout_marginLeft="10dp"
+                                    android:layout_marginRight="10dp"
+                                    android:layout_height="wrap_content">
+
+                                    <LinearLayout
+                                        android:layout_width="match_parent"
+                                        android:layout_weight="1"
+                                        android:layout_marginLeft="6dp"
+                                        android:layout_marginRight="6dp"
+                                        android:orientation="vertical"
+                                        android:layout_height="122dp">
+
+                                        <RelativeLayout
+                                            android:layout_width="match_parent"
+                                            android:id="@+id/rwzx_layout_task_1"
+                                            android:background="@drawable/bg_shape_white_corner8"
+                                            android:layout_height="104dp">
+
+                                            <ImageView
+                                                android:layout_width="53dp"
+                                                android:id="@+id/rwzx_iv_task_1"
+                                                android:layout_centerHorizontal="true"
+                                                android:layout_marginTop="11dp"
+                                                android:layout_height="53dp"/>
+
+                                            <TextView
+                                                android:layout_width="wrap_content"
+                                                android:layout_marginLeft="60dp"
+                                                android:text="9"
+                                                android:textColor="#ffffffff"
+                                                android:id="@+id/rwzx_tv_task_num_1"
+                                                android:textSize="12sp"
+                                                android:layout_marginTop="16dp"
+                                                android:background="@drawable/bg_red"
+                                                android:layout_height="wrap_content"/>
+
+                                            <TextView
+                                                android:id="@+id/rwzx_tv_task_1"
+                                                android:layout_width="wrap_content"
+                                                android:layout_centerHorizontal="true"
+                                                android:layout_below="@id/rwzx_iv_task_1"
+                                                android:layout_height="wrap_content"
+                                                android:layout_marginTop="4dp"
+                                                android:text="指令任务"
+                                                android:textStyle="bold"
+                                                android:textColor="#ff111111"
+                                                android:textSize="14sp"
+                                                />
+
+
+                                        </RelativeLayout>
+
+                                        <ImageView
+                                            android:id="@+id/rwzx_iv_triangle_1"
+                                            android:layout_width="44dp"
+                                            android:layout_gravity="center_horizontal"
+                                            android:layout_marginTop="8dp"
+                                            android:background="@drawable/pic_triangle"
+                                            android:layout_height="13dp"/>
+
+                                    </LinearLayout>
+
+                                    <LinearLayout
+                                        android:layout_width="match_parent"
+                                        android:layout_weight="1"
+                                        android:layout_marginLeft="6dp"
+                                        android:layout_marginRight="6dp"
+                                        android:orientation="vertical"
+                                        android:layout_height="122dp">
+
+                                        <RelativeLayout
+                                            android:layout_width="match_parent"
+                                            android:id="@+id/rwzx_layout_task_2"
+                                            android:background="@drawable/bg_shape_white_corner8"
+                                            android:layout_height="104dp">
+
+                                            <ImageView
+                                                android:layout_width="53dp"
+                                                android:id="@+id/rwzx_iv_task_2"
+                                                android:layout_centerHorizontal="true"
+                                                android:layout_marginTop="11dp"
+                                                android:layout_height="53dp"/>
+
+                                            <TextView
+                                                android:layout_width="wrap_content"
+                                                android:layout_marginLeft="60dp"
+                                                android:text="9"
+                                                android:textColor="#ffffffff"
+                                                android:id="@+id/rwzx_tv_task_num_2"
+                                                android:textSize="12sp"
+                                                android:layout_marginTop="16dp"
+                                                android:background="@drawable/bg_red"
+                                                android:layout_height="wrap_content"/>
+                                            <TextView
+                                                android:id="@+id/rwzx_tv_task_2"
+                                                android:layout_width="wrap_content"
+                                                android:layout_centerHorizontal="true"
+                                                android:layout_below="@id/rwzx_iv_task_2"
+                                                android:layout_height="wrap_content"
+                                                android:layout_marginTop="4dp"
+                                                android:textStyle="bold"
+                                                android:text="规定任务"
+                                                android:textColor="#ff666666"
+                                                android:textSize="14sp"
+                                                />
+
+
+                                        </RelativeLayout>
+
+                                        <ImageView
+                                            android:id="@+id/rwzx_iv_triangle_2"
+                                            android:layout_width="44dp"
+                                            android:visibility="gone"
+                                            android:layout_gravity="center_horizontal"
+                                            android:layout_marginTop="8dp"
+                                            android:background="@drawable/pic_triangle"
+                                            android:layout_height="13dp"/>
+
+                                    </LinearLayout>
+
+                                    <LinearLayout
+                                        android:layout_width="match_parent"
+                                        android:layout_weight="1"
+                                        android:layout_marginLeft="6dp"
+                                        android:layout_marginRight="6dp"
+                                        android:orientation="vertical"
+                                        android:layout_height="122dp">
+
+                                        <RelativeLayout
+                                            android:layout_width="match_parent"
+                                            android:id="@+id/rwzx_layout_task_3"
+                                            android:background="@drawable/bg_shape_white_corner8"
+                                            android:layout_height="104dp">
+
+                                            <ImageView
+                                                android:layout_width="53dp"
+                                                android:id="@+id/rwzx_iv_task_3"
+                                                android:layout_centerHorizontal="true"
+                                                android:layout_marginTop="11dp"
+                                                android:layout_height="53dp"/>
+
+                                            <TextView
+                                                android:layout_width="wrap_content"
+                                                android:layout_marginLeft="60dp"
+                                                android:text="99+"
+                                                android:textColor="#ffffffff"
+                                                android:id="@+id/rwzx_tv_task_num_3"
+                                                android:textSize="12sp"
+                                                android:layout_marginTop="16dp"
+                                                android:background="@drawable/bg_red"
+                                                android:layout_height="wrap_content"/>
+                                            <TextView
+                                                android:id="@+id/rwzx_tv_task_3"
+                                                android:layout_width="wrap_content"
+                                                android:layout_centerHorizontal="true"
+                                                android:layout_below="@id/rwzx_iv_task_3"
+                                                android:layout_height="wrap_content"
+                                                android:layout_marginTop="4dp"
+                                                android:textStyle="bold"
+                                                android:text="推送任务"
+                                                android:textColor="#666666"
+                                                android:textSize="14sp"
+                                                />
+
+
+                                        </RelativeLayout>
+
+                                        <ImageView
+                                            android:id="@+id/rwzx_iv_triangle_3"
+                                            android:layout_width="44dp"
+                                            android:visibility="gone"
+                                            android:layout_gravity="center_horizontal"
+                                            android:layout_marginTop="8dp"
+                                            android:background="@drawable/pic_triangle"
+                                            android:layout_height="13dp"/>
+
+                                    </LinearLayout>
+
+                                </LinearLayout>
+
+                                <LinearLayout
                                     android:layout_width="match_parent"
-                                    android:background="@drawable/bg_shape_white_corner8"
-                                    android:layout_height="104dp">
-
-                                    <ImageView
-                                        android:layout_width="53dp"
-                                        android:id="@+id/rwzx_iv_task_3"
-                                        android:layout_centerHorizontal="true"
-                                        android:layout_marginTop="11dp"
-                                        android:layout_height="53dp"/>
-
-                                    <TextView
-                                        android:id="@+id/rwzx_tv_task_3"
-                                        android:layout_width="wrap_content"
-                                        android:layout_centerHorizontal="true"
-                                        android:layout_below="@id/rwzx_iv_task_3"
-                                        android:layout_height="wrap_content"
-                                        android:layout_marginTop="4dp"
-                                        android:text="推送任务"
-                                        android:textColor="#666666"
-                                        android:textSize="14sp"
-                                        />
-
-
-                                </RelativeLayout>
-
-                                <ImageView
-                                    android:id="@+id/rwzx_iv_triangle_3"
-                                    android:layout_width="44dp"
-                                    android:layout_gravity="center_horizontal"
-                                    android:layout_marginTop="8dp"
-                                    android:background="@drawable/pic_triangle"
-                                    android:layout_height="13dp"/>
+                                    android:orientation="vertical"
+                                    android:id="@+id/rwzx_container"
+                                    android:background="@drawable/bg_shape_f8f8f8_corner12"
+                                    android:layout_height="match_parent">
 
-                            </LinearLayout>
 
-                        </LinearLayout>
 
-                        <LinearLayout
-                            android:layout_width="match_parent"
-                            android:orientation="vertical"
-                            android:background="@drawable/bg_shape_f8f8f8_corner12"
-                            android:layout_height="match_parent">
+                                </LinearLayout>
 
-                            <com.google.android.material.tabs.TabLayout
-                                android:id="@+id/rwzx_tab"
-                                android:layout_width="match_parent"
-                                android:layout_height="40dp"
-                                android:layout_below="@id/title_bar"
-                                android:paddingLeft="8dp"
-                                android:paddingRight="8dp"
-                                app:tabIndicatorHeight="0dp"
-                                app:tabMode="fixed"
-                                app:tabSelectedTextColor="@color/blue"
-                                app:tabTextColor="#666666" />
-
-                            <androidx.viewpager2.widget.ViewPager2
-                                android:id="@+id/rwzx_vp"
-                                android:layout_width="match_parent"
-                                android:layout_height="match_parent"/>
+                            </LinearLayout>
 
-                        </LinearLayout>
+                        </FrameLayout>
 
                     </LinearLayout>
 
-                </FrameLayout>
-
-            </LinearLayout>
+                </LinearLayout>
+            </FrameLayout>
 
         </FrameLayout>
 

+ 24 - 0
app/src/main/res/layout/fragment_task_dxzp.xml

@@ -0,0 +1,24 @@
+<?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"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+    <com.scwang.smart.refresh.layout.SmartRefreshLayout
+        android:id="@+id/smart_refresh"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        >
+
+        <androidx.recyclerview.widget.RecyclerView
+            android:layout_width="match_parent"
+            android:nestedScrollingEnabled="false"
+            app:layout_behavior="@string/appbar_scrolling_view_behavior"
+            android:id="@+id/task_rv"
+            android:layout_height="match_parent"/>
+
+    </com.scwang.smart.refresh.layout.SmartRefreshLayout>
+
+
+</LinearLayout>

+ 55 - 0
app/src/main/res/layout/fragment_task_type.xml

@@ -0,0 +1,55 @@
+<?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"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="40dp">
+
+        <LinearLayout
+            android:layout_width="60dp"
+            android:id="@+id/rwzx_layout_filter"
+            android:layout_alignParentRight="true"
+            android:orientation="horizontal"
+            android:layout_centerVertical="true"
+            android:gravity="center_vertical"
+            android:layout_height="wrap_content">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="8dp"
+                android:text="筛选"
+                android:textColor="@color/color_666666"
+                android:textSize="12sp"/>
+            
+            <ImageView
+                android:layout_width="16dp"
+                android:background="@mipmap/icon_screening"
+                android:layout_height="16dp"/>
+
+        </LinearLayout>
+
+        <com.google.android.material.tabs.TabLayout
+            android:id="@+id/rwzx_tab"
+            android:layout_width="match_parent"
+            android:layout_height="40dp"
+            android:paddingLeft="8dp"
+            android:layout_toLeftOf="@id/rwzx_layout_filter"
+            android:paddingRight="8dp"
+            app:tabIndicatorHeight="0dp"
+            app:tabMode="scrollable"
+            app:tabSelectedTextColor="@color/blue"
+            app:tabTextColor="#666666" />
+
+    </RelativeLayout>
+
+    <androidx.viewpager2.widget.ViewPager2
+        android:id="@+id/rwzx_vp"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"/>
+</LinearLayout>

+ 284 - 185
app/src/main/res/layout/fragment_test.xml

@@ -40,11 +40,23 @@
                     android:layout_height="wrap_content"
                     android:layout_marginTop="25dp" />
 
+                <androidx.core.widget.NestedScrollView
+                    android:layout_width="match_parent"
+                    android:layout_below="@id/title_bar"
+                    android:focusableInTouchMode="false"
+                    android:focusable="true"
+                    android:layout_above="@id/rl_back"
+                    android:layout_height="match_parent">
+
+                    <include layout="@layout/layout_rwfx"/>
+
+                </androidx.core.widget.NestedScrollView>
+
                 <RelativeLayout
                     android:id="@+id/rl_back"
                     android:layout_width="match_parent"
                     android:layout_height="70dp"
-                    android:background="#E8C591"
+                    android:background="@drawable/bj_btn_home"
                     android:layout_alignParentBottom="true">
 
                     <TextView
@@ -64,232 +76,319 @@
                 android:layout_height="wrap_content" />
         </com.scwang.smart.refresh.header.TwoLevelHeader>
 
-        <ScrollView
-            android:id="@+id/scrollView"
+
+        <androidx.coordinatorlayout.widget.CoordinatorLayout
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="#fff"
-            android:fillViewport="true"
-            android:overScrollMode="never"
-           >
-            <FrameLayout
+            android:id="@+id/layout_rwzx"
+            android:layout_height="match_parent">
+            <com.google.android.material.appbar.AppBarLayout
+                android:id="@+id/layout_app_bar"
                 android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:orientation="vertical">
-
-                <View
-                    android:layout_width="match_parent"
-                    android:background="@drawable/bg_rwzx"
-                    android:layout_height="480dp"/>
+                android:layout_height="wrap_content"
+                android:background="#F5F5F7"
+                app:elevation="0dp"
+                app:layout_behavior=".app.view.AppBarLayoutBehavior"
+                >
 
-                <LinearLayout
+                <com.google.android.material.appbar.CollapsingToolbarLayout
                     android:layout_width="match_parent"
-                    android:orientation="vertical"
-                    android:layout_height="match_parent">
+                    app:expandedTitleMarginEnd="60dp"
+                    app:contentScrim="#FF0000"
+                    app:layout_scrollFlags="scroll|exitUntilCollapsed"
+                    android:layout_height="wrap_content">
 
-                    <RelativeLayout
+                    <View
                         android:layout_width="match_parent"
-                        android:layout_marginTop="48dp"
-                        android:layout_marginLeft="16dp"
-                        android:layout_marginRight="16dp"
-                        android:background="@drawable/bg_rwzx_search"
-                        android:layout_height="36dp">
-
-                        <ImageView
-                            android:layout_width="16dp"
-                            android:layout_marginLeft="12dp"
-                            android:layout_centerVertical="true"
-                            android:background="@drawable/icon_rwzx_search"
-                            android:layout_height="16sp"/>
-
-                        <TextView
-                            android:layout_width="match_parent"
-                            android:layout_height="match_parent"
-                            android:id="@+id/rwzx_tv_search"
-                            android:text="请输入信息查询"
-                            android:paddingLeft="36dp"
-                            android:gravity="center_vertical"
-                            android:textColor="#ff999999"
-                            android:textSize="13sp"
-                            />
-
-                    </RelativeLayout>
+                        app:layout_collapseMode="parallax"
+                        app:layout_constraintStart_toStartOf="parent"
+                        app:layout_constraintTop_toTopOf="parent"
+                        android:background="@drawable/bg_rwzx"
+                        android:layout_height="480dp"/>
 
-                    <LinearLayout
+                    <androidx.constraintlayout.widget.ConstraintLayout
                         android:layout_width="match_parent"
-                        android:orientation="horizontal"
-                        android:layout_marginTop="12dp"
-                        android:layout_marginLeft="10dp"
-                        android:layout_marginRight="10dp"
+                        android:layout_marginTop="55dp"
+                        android:layout_marginBottom="19dp"
+                        app:layout_collapseParallaxMultiplier="0.5"
                         android:layout_height="wrap_content">
 
                         <LinearLayout
-                            android:layout_width="match_parent"
-                            android:layout_weight="1"
-                            android:layout_marginLeft="6dp"
-                            android:layout_marginRight="6dp"
                             android:orientation="vertical"
-                            android:layout_height="122dp">
-
-                            <RelativeLayout
-                                android:layout_width="match_parent"
-                                android:background="@drawable/bg_shape_white_corner8"
-                                android:layout_height="104dp">
-
-                                <ImageView
-                                    android:layout_width="53dp"
-                                    android:id="@+id/rwzx_iv_task_1"
-                                    android:layout_centerHorizontal="true"
-                                    android:layout_marginTop="11dp"
-                                    android:layout_height="53dp"/>
-
-                                <TextView
-                                    android:id="@+id/rwzx_tv_task_1"
-                                    android:layout_width="wrap_content"
-                                    android:layout_centerHorizontal="true"
-                                    android:layout_below="@id/rwzx_iv_task_1"
-                                    android:layout_height="wrap_content"
-                                    android:layout_marginTop="4dp"
-                                    android:text="指令任务"
-                                    android:textColor="#ff111111"
-                                    android:textSize="14sp"
-                                    />
-
-
-                            </RelativeLayout>
-
-                            <ImageView
-                                android:id="@+id/rwzx_iv_triangle_1"
-                                android:layout_width="44dp"
-                                android:layout_gravity="center_horizontal"
-                                android:layout_marginTop="8dp"
-                                android:background="@drawable/pic_triangle"
-                                android:layout_height="13dp"/>
-
-                        </LinearLayout>
-
-                        <LinearLayout
+                            android:id="@+id/rwzx_appbar"
                             android:layout_width="match_parent"
-                            android:layout_weight="1"
-                            android:layout_marginLeft="6dp"
-                            android:layout_marginRight="6dp"
-                            android:orientation="vertical"
-                            android:layout_height="122dp">
+                            android:background="@color/transparent"
+                            android:layout_height="match_parent">
 
                             <RelativeLayout
                                 android:layout_width="match_parent"
-                                android:background="@drawable/bg_shape_white_corner8"
-                                android:layout_height="104dp">
+                                android:layout_marginTop="48dp"
+                                android:layout_marginLeft="16dp"
+                                android:focusable="true"
+                                android:focusableInTouchMode="true"
+                                app:layout_scrollFlags="scroll|enterAlways"
+                                android:layout_marginRight="16dp"
+                                android:background="@drawable/bg_rwzx_search"
+                                android:layout_height="36dp">
 
                                 <ImageView
-                                    android:layout_width="53dp"
-                                    android:id="@+id/rwzx_iv_task_2"
-                                    android:layout_centerHorizontal="true"
-                                    android:layout_marginTop="11dp"
-                                    android:layout_height="53dp"/>
+                                    android:layout_width="16dp"
+                                    android:layout_marginLeft="12dp"
+                                    android:layout_centerVertical="true"
+                                    android:background="@drawable/icon_rwzx_search"
+                                    android:layout_height="16sp"/>
 
                                 <TextView
-                                    android:id="@+id/rwzx_tv_task_2"
-                                    android:layout_width="wrap_content"
-                                    android:layout_centerHorizontal="true"
-                                    android:layout_below="@id/rwzx_iv_task_2"
-                                    android:layout_height="wrap_content"
-                                    android:layout_marginTop="4dp"
-                                    android:text="规定任务"
-                                    android:textColor="#ff666666"
-                                    android:textSize="14sp"
+                                    android:layout_width="match_parent"
+                                    android:layout_height="match_parent"
+                                    android:id="@+id/rwzx_tv_search"
+                                    android:text="请输入信息查询"
+                                    android:paddingLeft="36dp"
+                                    android:gravity="center_vertical"
+                                    android:textColor="#ff999999"
+                                    android:textSize="13sp"
                                     />
 
-
                             </RelativeLayout>
 
-                            <ImageView
-                                android:id="@+id/rwzx_iv_triangle_2"
-                                android:layout_width="44dp"
-                                android:layout_gravity="center_horizontal"
-                                android:layout_marginTop="8dp"
-                                android:background="@drawable/pic_triangle"
-                                android:layout_height="13dp"/>
-
-                        </LinearLayout>
-
-                        <LinearLayout
-                            android:layout_width="match_parent"
-                            android:layout_weight="1"
-                            android:layout_marginLeft="6dp"
-                            android:layout_marginRight="6dp"
-                            android:orientation="vertical"
-                            android:layout_height="122dp">
-
-                            <RelativeLayout
+                            <LinearLayout
                                 android:layout_width="match_parent"
-                                android:background="@drawable/bg_shape_white_corner8"
-                                android:layout_height="104dp">
+                                android:overScrollMode="never"
+                                android:layout_height="match_parent">
+
+                                <FrameLayout
+                                    android:layout_width="match_parent"
+                                    android:layout_height="match_parent"
+                                    android:orientation="vertical">
+
+
+                                    <LinearLayout
+                                        android:layout_width="match_parent"
+                                        android:orientation="vertical"
+                                        android:layout_height="match_parent">
+
+
+                                        <LinearLayout
+                                            android:layout_width="match_parent"
+                                            android:orientation="horizontal"
+                                            android:layout_marginTop="12dp"
+                                            android:layout_marginLeft="10dp"
+                                            android:layout_marginRight="10dp"
+                                            android:layout_height="wrap_content">
+
+                                            <LinearLayout
+                                                android:layout_width="match_parent"
+                                                android:layout_weight="1"
+                                                android:layout_marginLeft="6dp"
+                                                android:layout_marginRight="6dp"
+                                                android:orientation="vertical"
+                                                android:layout_height="122dp">
+
+                                                <RelativeLayout
+                                                    android:layout_width="match_parent"
+                                                    android:id="@+id/rwzx_layout_task_1"
+                                                    android:background="@drawable/bg_shape_white_corner8"
+                                                    android:layout_height="104dp">
+
+                                                    <ImageView
+                                                        android:layout_width="53dp"
+                                                        android:id="@+id/rwzx_iv_task_1"
+                                                        android:layout_centerHorizontal="true"
+                                                        android:layout_marginTop="11dp"
+                                                        android:layout_height="53dp"/>
+
+                                                    <TextView
+                                                        android:layout_width="wrap_content"
+                                                        android:layout_marginLeft="60dp"
+                                                        android:text="9"
+                                                        android:textColor="#ffffffff"
+                                                        android:id="@+id/rwzx_tv_task_num_1"
+                                                        android:textSize="12sp"
+                                                        android:layout_marginTop="16dp"
+                                                        android:background="@drawable/bg_red"
+                                                        android:layout_height="wrap_content"/>
+
+                                                    <TextView
+                                                        android:id="@+id/rwzx_tv_task_1"
+                                                        android:layout_width="wrap_content"
+                                                        android:layout_centerHorizontal="true"
+                                                        android:layout_below="@id/rwzx_iv_task_1"
+                                                        android:layout_height="wrap_content"
+                                                        android:layout_marginTop="4dp"
+                                                        android:text="指令任务"
+                                                        android:textStyle="bold"
+                                                        android:textColor="#ff111111"
+                                                        android:textSize="14sp"
+                                                        />
+
+
+                                                </RelativeLayout>
+
+                                                <ImageView
+                                                    android:id="@+id/rwzx_iv_triangle_1"
+                                                    android:layout_width="44dp"
+                                                    android:layout_gravity="center_horizontal"
+                                                    android:layout_marginTop="8dp"
+                                                    android:background="@drawable/pic_triangle"
+                                                    android:layout_height="13dp"/>
+
+                                            </LinearLayout>
+
+                                            <LinearLayout
+                                                android:layout_width="match_parent"
+                                                android:layout_weight="1"
+                                                android:layout_marginLeft="6dp"
+                                                android:layout_marginRight="6dp"
+                                                android:orientation="vertical"
+                                                android:layout_height="122dp">
+
+                                                <RelativeLayout
+                                                    android:layout_width="match_parent"
+                                                    android:id="@+id/rwzx_layout_task_2"
+                                                    android:background="@drawable/bg_shape_white_corner8"
+                                                    android:layout_height="104dp">
+
+                                                    <ImageView
+                                                        android:layout_width="53dp"
+                                                        android:id="@+id/rwzx_iv_task_2"
+                                                        android:layout_centerHorizontal="true"
+                                                        android:layout_marginTop="11dp"
+                                                        android:layout_height="53dp"/>
+
+                                                    <TextView
+                                                        android:layout_width="wrap_content"
+                                                        android:layout_marginLeft="60dp"
+                                                        android:text="9"
+                                                        android:textColor="#ffffffff"
+                                                        android:id="@+id/rwzx_tv_task_num_2"
+                                                        android:textSize="12sp"
+                                                        android:layout_marginTop="16dp"
+                                                        android:background="@drawable/bg_red"
+                                                        android:layout_height="wrap_content"/>
+                                                    <TextView
+                                                        android:id="@+id/rwzx_tv_task_2"
+                                                        android:layout_width="wrap_content"
+                                                        android:layout_centerHorizontal="true"
+                                                        android:layout_below="@id/rwzx_iv_task_2"
+                                                        android:layout_height="wrap_content"
+                                                        android:layout_marginTop="4dp"
+                                                        android:textStyle="bold"
+                                                        android:text="规定任务"
+                                                        android:textColor="#ff666666"
+                                                        android:textSize="14sp"
+                                                        />
+
+
+                                                </RelativeLayout>
+
+                                                <ImageView
+                                                    android:id="@+id/rwzx_iv_triangle_2"
+                                                    android:layout_width="44dp"
+                                                    android:visibility="gone"
+                                                    android:layout_gravity="center_horizontal"
+                                                    android:layout_marginTop="8dp"
+                                                    android:background="@drawable/pic_triangle"
+                                                    android:layout_height="13dp"/>
+
+                                            </LinearLayout>
+
+                                            <LinearLayout
+                                                android:layout_width="match_parent"
+                                                android:layout_weight="1"
+                                                android:layout_marginLeft="6dp"
+                                                android:layout_marginRight="6dp"
+                                                android:orientation="vertical"
+                                                android:layout_height="122dp">
+
+                                                <RelativeLayout
+                                                    android:layout_width="match_parent"
+                                                    android:id="@+id/rwzx_layout_task_3"
+                                                    android:background="@drawable/bg_shape_white_corner8"
+                                                    android:layout_height="104dp">
+
+                                                    <ImageView
+                                                        android:layout_width="53dp"
+                                                        android:id="@+id/rwzx_iv_task_3"
+                                                        android:layout_centerHorizontal="true"
+                                                        android:layout_marginTop="11dp"
+                                                        android:layout_height="53dp"/>
+
+                                                    <TextView
+                                                        android:layout_width="wrap_content"
+                                                        android:layout_marginLeft="60dp"
+                                                        android:text="99+"
+                                                        android:textColor="#ffffffff"
+                                                        android:id="@+id/rwzx_tv_task_num_3"
+                                                        android:textSize="12sp"
+                                                        android:layout_marginTop="16dp"
+                                                        android:background="@drawable/bg_red"
+                                                        android:layout_height="wrap_content"/>
+                                                    <TextView
+                                                        android:id="@+id/rwzx_tv_task_3"
+                                                        android:layout_width="wrap_content"
+                                                        android:layout_centerHorizontal="true"
+                                                        android:layout_below="@id/rwzx_iv_task_3"
+                                                        android:layout_height="wrap_content"
+                                                        android:layout_marginTop="4dp"
+                                                        android:textStyle="bold"
+                                                        android:text="推送任务"
+                                                        android:textColor="#666666"
+                                                        android:textSize="14sp"
+                                                        />
+
+
+                                                </RelativeLayout>
+
+                                                <ImageView
+                                                    android:id="@+id/rwzx_iv_triangle_3"
+                                                    android:layout_width="44dp"
+                                                    android:visibility="gone"
+                                                    android:layout_gravity="center_horizontal"
+                                                    android:layout_marginTop="8dp"
+                                                    android:background="@drawable/pic_triangle"
+                                                    android:layout_height="13dp"/>
+
+                                            </LinearLayout>
+
+                                        </LinearLayout>
+
+
+                                    </LinearLayout>
+
+                                </FrameLayout>
+
+                            </LinearLayout>
 
-                                <ImageView
-                                    android:layout_width="53dp"
-                                    android:id="@+id/rwzx_iv_task_3"
-                                    android:layout_centerHorizontal="true"
-                                    android:layout_marginTop="11dp"
-                                    android:layout_height="53dp"/>
-
-                                <TextView
-                                    android:id="@+id/rwzx_tv_task_3"
-                                    android:layout_width="wrap_content"
-                                    android:layout_centerHorizontal="true"
-                                    android:layout_below="@id/rwzx_iv_task_3"
-                                    android:layout_height="wrap_content"
-                                    android:layout_marginTop="4dp"
-                                    android:text="推送任务"
-                                    android:textColor="#666666"
-                                    android:textSize="14sp"
-                                    />
+                        </LinearLayout>
 
+                    </androidx.constraintlayout.widget.ConstraintLayout>
 
-                            </RelativeLayout>
 
-                            <ImageView
-                                android:id="@+id/rwzx_iv_triangle_3"
-                                android:layout_width="44dp"
-                                android:layout_gravity="center_horizontal"
-                                android:layout_marginTop="8dp"
-                                android:background="@drawable/pic_triangle"
-                                android:layout_height="13dp"/>
 
-                        </LinearLayout>
-
-                    </LinearLayout>
+                </com.google.android.material.appbar.CollapsingToolbarLayout>
 
+                <androidx.core.widget.NestedScrollView
+                    android:id="@+id/nestedScrollView"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:background="#FFFFFFFF"
+                    android:fillViewport="true"
+                    app:layout_behavior="@string/appbar_scrolling_view_behavior">
                     <LinearLayout
                         android:layout_width="match_parent"
                         android:orientation="vertical"
+                        android:id="@+id/rwzx_container"
                         android:background="@drawable/bg_shape_f8f8f8_corner12"
                         android:layout_height="match_parent">
 
-                        <com.google.android.material.tabs.TabLayout
-                            android:id="@+id/rwzx_tab"
-                            android:layout_width="match_parent"
-                            android:layout_height="40dp"
-                            android:layout_below="@id/title_bar"
-                            android:paddingLeft="8dp"
-                            android:paddingRight="8dp"
-                            app:tabIndicatorHeight="0dp"
-                            app:tabMode="fixed"
-                            app:tabSelectedTextColor="@color/blue"
-                            app:tabTextColor="#666666" />
-
-                        <androidx.viewpager2.widget.ViewPager2
-                            android:id="@+id/rwzx_vp"
-                            android:layout_width="match_parent"
-                            android:layout_height="match_parent"/>
+
 
                     </LinearLayout>
+                </androidx.core.widget.NestedScrollView>
 
-                </LinearLayout>
+            </com.google.android.material.appbar.AppBarLayout>
 
-            </FrameLayout>
+        </androidx.coordinatorlayout.widget.CoordinatorLayout>
 
-        </ScrollView>
 
         <com.scwang.smart.refresh.header.ClassicsHeader
             android:layout_width="match_parent"

+ 101 - 0
app/src/main/res/layout/item_dxzp.xml

@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_marginTop="12dp"
+    android:layout_marginLeft="16dp"
+    android:layout_marginRight="16dp"
+    android:paddingBottom="12dp"
+    android:background="@drawable/bg_shape_white_corner8"
+    android:layout_height="wrap_content">
+
+    <LinearLayout
+        android:layout_width="wrap_content"
+        android:orientation="horizontal"
+        android:id="@+id/item_dxzp_layout_phone"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintLeft_toLeftOf="parent"
+        android:layout_height="wrap_content">
+
+        <ImageView
+            android:layout_width="16dp"
+            android:layout_marginTop="15dp"
+            android:id="@+id/item_dxzp_iv_phone"
+            android:background="@drawable/icon_phone"
+            android:layout_marginLeft="12dp"
+            android:layout_height="16dp"/>
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_marginTop="12dp"
+            android:text="133 7878 5679"
+            android:id="@+id/item_dxzp_tv_phone"
+            android:layout_marginLeft="8dp"
+            android:textColor="#ff111111"
+            android:textSize="16sp"
+            android:layout_height="wrap_content"/>
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="wrap_content"
+        app:layout_constraintLeft_toLeftOf="parent"
+        android:orientation="horizontal"
+        android:layout_marginLeft="12dp"
+        android:id="@+id/item_dxzp_layout_type"
+        android:layout_marginTop="10dp"
+        android:background="@drawable/bg_shape_1a9a5eff_corner10"
+        app:layout_constraintTop_toBottomOf="@id/item_dxzp_layout_phone"
+        android:layout_height="20dp">
+
+        <ImageView
+            android:layout_width="16dp"
+            android:id="@+id/item_dxzp_iv_type"
+            android:layout_marginLeft="2dp"
+            android:layout_gravity="center_vertical"
+            android:layout_height="16dp"/>
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:id="@+id/item_dxzp_tv_type"
+            android:layout_marginLeft="4dp"
+            android:layout_gravity="center_vertical"
+            android:text="冒充公检法及政府机关类"
+            android:layout_marginRight="8dp"
+            android:textColor="#ff9a5eff"
+            android:textSize="12sp" />
+
+    </LinearLayout>
+
+    <TextView
+        android:layout_width="match_parent"
+        app:layout_constraintTop_toBottomOf="@id/item_dxzp_layout_type"
+        app:layout_constraintLeft_toLeftOf="parent"
+        android:layout_marginTop="8dp"
+        android:id="@+id/item_dxzp_tv_time"
+        android:layout_marginLeft="12dp"
+        android:layout_marginRight="12dp"
+        android:text="下发时间:2024-07-17 10:20:33(需当天反馈)"
+        android:textColor="#ff666666"
+        android:textSize="12sp"
+        android:layout_height="wrap_content"/>
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="20dp"
+        android:gravity="center"
+        android:id="@+id/item_dxzp_tv_status"
+        android:paddingLeft="4dp"
+        android:background="@drawable/bg_shape_1afc9127_corner4"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintRight_toRightOf="parent"
+        android:paddingRight="4dp"
+        android:layout_marginTop="12dp"
+        android:layout_marginRight="12dp"
+        android:text="待反馈"
+        android:textColor="#fffc9127"
+        android:textSize="12sp"
+        />
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 74 - 0
app/src/main/res/layout/item_rwfx_task_type.xml

@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
+    android:layout_marginLeft="12dp"
+    android:layout_marginRight="12dp"
+    android:layout_marginTop="12dp"
+    android:layout_height="wrap_content">
+
+    <ImageView
+        android:layout_width="24dp"
+        android:id="@+id/item_rwfx_task_type_iv_icon"
+        android:layout_height="24dp"/>
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:text="情指"
+        android:id="@+id/item_rwfx_task_type_tv_name"
+        android:layout_toRightOf="@id/item_rwfx_task_type_iv_icon"
+        android:layout_marginLeft="8dp"
+        android:textColor="#ff111111"
+        android:textSize="14sp"
+        android:layout_height="wrap_content"/>
+
+    <LinearLayout
+        android:layout_width="wrap_content"
+        android:id="@+id/item_rwfx_task_type_layout_percent"
+        android:layout_marginTop="2dp"
+        android:layout_toRightOf="@id/item_rwfx_task_type_tv_name"
+        android:layout_height="wrap_content">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_marginLeft="8dp"
+            android:text="占总量"
+            android:textColor="#ff999999"
+            android:textSize="12sp"
+            android:layout_height="wrap_content"/>
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:id="@+id/item_rwfx_task_type_tv_percent"
+            android:text="50%"
+            android:textColor="@color/blue"
+            android:textSize="12sp"
+            android:layout_height="wrap_content"/>
+    </LinearLayout>
+
+    <ProgressBar
+        android:id="@+id/progress_horizontal"
+        style="@style/Widget.AppCompat.ProgressBar.Horizontal"
+        android:layout_width="match_parent"
+        android:layout_marginRight="31dp"
+        android:layout_below="@id/item_rwfx_task_type_layout_percent"
+        android:layout_toRightOf="@id/item_rwfx_task_type_tv_name"
+        android:layout_height="4dp"
+        android:layout_marginTop="4dp"
+        android:secondaryProgress="50"
+        android:layout_marginLeft="8dp"
+        android:layout_centerVertical="true"
+        android:max="100"
+        android:progress="93"
+        android:progressDrawable="@drawable/task_type_progress_style" />
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:id="@+id/item_rwfx_task_type_tv_count"
+        android:layout_alignParentRight="true"
+        android:layout_marginRight="12dp"
+        android:text="12"
+        android:textColor="#ff111111"
+        android:textSize="16sp"
+        android:layout_height="wrap_content"/>
+
+</RelativeLayout>

+ 1 - 0
app/src/main/res/layout/item_task.xml

@@ -15,6 +15,7 @@
         app:layout_constraintTop_toTopOf="parent"
         app:layout_constraintLeft_toLeftOf="parent"
         android:layout_marginLeft="12dp"
+        android:background="@drawable/icon_head_default"
         android:layout_marginTop="12dp"
         android:layout_height="64dp"/>
 

+ 227 - 0
app/src/main/res/layout/layout_rwfx.xml

@@ -0,0 +1,227 @@
+<?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="match_parent"
+    android:orientation="vertical"
+    xmlns:app="http://schemas.android.com/apk/res-auto">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        app:layout_constraintTop_toTopOf="parent"
+        app:layout_constraintLeft_toLeftOf="parent"
+        android:id="@+id/rwzx_layout_top"
+        android:layout_marginTop="10dp"
+        android:layout_height="118dp"
+        android:layout_margin="16dp"
+        android:background="@drawable/rwfx_shape"
+        android:orientation="vertical">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="44dp"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:focusable="true"
+                android:focusableInTouchMode="true"
+                android:layout_marginLeft="16dp"
+                android:text="任务完成率"
+                android:textColor="@color/white"
+                android:textSize="14sp" />
+
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="4dp"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:id="@+id/tv_ywc"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:text="24"
+                    android:textColor="@color/white"
+                    android:textSize="18sp" />
+
+                <TextView
+                    android:id="@+id/tv_zrw"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:text="/26"
+                    android:textColor="#b3ffffff"
+                    android:textSize="12sp" />
+            </LinearLayout>
+
+            <RelativeLayout
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent">
+
+                <RelativeLayout
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:layout_alignParentRight="true">
+
+                    <ProgressBar
+                        android:id="@+id/progress_horizontal"
+                        style="@style/Widget.AppCompat.ProgressBar.Horizontal"
+                        android:layout_width="80dp"
+                        android:layout_height="4dp"
+                        android:layout_centerVertical="true"
+                        android:max="100"
+                        android:progress="93"
+                        android:progressDrawable="@drawable/progress_style" />
+
+                    <TextView
+                        android:id="@+id/tv_bfb"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_centerVertical="true"
+                        android:layout_marginLeft="4dp"
+                        android:layout_marginRight="16dp"
+                        android:layout_toRightOf="@id/progress_horizontal"
+                        android:text="90%"
+                        android:textColor="@color/white"
+                        android:textSize="12sp" />
+                </RelativeLayout>
+
+
+            </RelativeLayout>
+
+
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_marginLeft="4dp"
+            android:layout_marginRight="4dp"
+            android:layout_marginBottom="4dp"
+            android:layout_weight="1"
+            android:background="@drawable/white_shape"
+            android:orientation="horizontal">
+
+            <FrameLayout
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_weight="1">
+
+                <TextView
+                    android:id="@+id/tv_zlrrw"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_horizontal"
+                    android:layout_marginTop="12dp"
+                    android:text="24"
+                    android:textColor="#ff111111"
+                    android:textSize="20sp"
+                    android:textStyle="bold" />
+
+                <TextView
+
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_horizontal|bottom"
+                    android:layout_marginBottom="12dp"
+                    android:text="指令任务"
+                    android:textColor="#ff111111"
+                    android:textSize="12sp" />
+            </FrameLayout>
+
+            <View
+                android:layout_width="1dp"
+                android:layout_height="match_parent"
+                android:layout_marginTop="12dp"
+                android:layout_marginBottom="10dp"
+                android:background="#ffeef2f9" />
+
+            <FrameLayout
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_weight="1">
+
+                <TextView
+                    android:id="@+id/tv_gdrw"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_horizontal"
+                    android:layout_marginTop="12dp"
+                    android:text="0"
+                    android:textColor="#ff111111"
+                    android:textSize="20sp"
+                    android:textStyle="bold" />
+
+                <TextView
+
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_horizontal|bottom"
+                    android:layout_marginBottom="12dp"
+                    android:text="规定任务"
+                    android:textColor="#ff111111"
+                    android:textSize="12sp" />
+            </FrameLayout>
+
+            <View
+                android:layout_width="1dp"
+                android:layout_height="match_parent"
+                android:layout_marginTop="12dp"
+                android:layout_marginBottom="10dp"
+                android:background="#ffeef2f9" />
+
+            <FrameLayout
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_weight="1">
+
+                <TextView
+                    android:id="@+id/tv_tsrw"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_horizontal"
+                    android:layout_marginTop="12dp"
+                    android:text="2"
+                    android:textColor="#ff111111"
+                    android:textSize="20sp"
+                    android:textStyle="bold" />
+
+                <TextView
+
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_horizontal|bottom"
+                    android:layout_marginBottom="12dp"
+                    android:text="推送任务"
+                    android:textColor="#ff111111"
+                    android:textSize="12sp" />
+            </FrameLayout>
+        </LinearLayout>
+
+    </LinearLayout>
+
+    <com.google.android.material.tabs.TabLayout
+        android:id="@+id/rwfx_tab"
+        app:layout_constraintTop_toBottomOf="@id/rwzx_layout_top"
+        android:layout_width="match_parent"
+        android:layout_height="44dp"
+        android:layout_marginTop="16dp"
+        android:paddingLeft="8dp"
+        android:paddingRight="8dp"
+        app:tabIndicatorHeight="3dp"
+        app:tabIndicatorColor="@color/blue"
+        app:tabIndicatorFullWidth="false"
+        app:tabMode="fixed"
+        app:tabSelectedTextColor="@color/blue"
+        app:tabTextColor="#666666" />
+
+    <androidx.viewpager2.widget.ViewPager2
+        android:id="@+id/rwfx_vp"
+        app:layout_constraintTop_toBottomOf="@id/rwfx_tab"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"/>
+
+</LinearLayout>

TEMPAT SAMPAH
app/src/main/res/mipmap-xxxhdpi/icon_screening.png


+ 3 - 0
app/src/main/res/values/colors.xml

@@ -6,4 +6,7 @@
     <color name="white">#FFFFFF</color>
     <color name="transparent">#00000000</color>
     <color name="blue">#ff106dff</color>
+    <color name="color_666666">#666666</color>
+    <color name="color_999999">#999999</color>
+    <color name="color_111111">#111111</color>
 </resources>

+ 4 - 0
app/src/main/res/xml/network_security_config.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+    <base-config cleartextTrafficPermitted="true" />
+</network-security-config>