Jelajahi Sumber

入户走访,消防检查互联网完成;

lichao 2 bulan lalu
induk
melakukan
35f886eb2f
100 mengubah file dengan 1796 tambahan dan 336 penghapusan
  1. 2 0
      common/src/main/java/com/zkjc/common/utils/ApkUtils.java
  2. 1 1
      common/src/main/java/com/zkjc/common/utils/ShareInfo.java
  3. 4 4
      rhzf/build.gradle
  4. 6 1
      rhzf/src/main/AndroidManifest.xml
  5. TEMPAT SAMPAH
      rhzf/src/main/assets/aip-ocr.license
  6. 1 1
      rhzf/src/main/java/com/xwkj/rhzf/app/utils/ReqToBus.java
  7. 3 3
      rhzf/src/main/java/com/xwkj/rhzf/app/utils/SignatureDialogV2.java
  8. 7 1
      rhzf/src/main/java/com/xwkj/rhzf/app/utils/StringUtil.java
  9. 5 5
      rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/AddCzrkPresenter.java
  10. 5 5
      rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/AddJfPresenter.java
  11. 3 3
      rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/AddPersonPresenter.java
  12. 3 3
      rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/AddWgrkPresenter.java
  13. 4 4
      rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/AddWlhRkPresenter.java
  14. 5 5
      rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/AddZzrkPresenter.java
  15. 2 2
      rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/HfPresenter.java
  16. 4 4
      rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/MdDjXqPresenter.java
  17. 2 2
      rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/MdTjLbPresenter.java
  18. 2 2
      rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/MdgzPresenter.java
  19. 2 2
      rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/MdhfjlPresenter.java
  20. 3 3
      rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/RhzfMainNewPresenter.java
  21. 3 3
      rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/RhzfPresenter.java
  22. 2 2
      rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/TjJfPresenter.java
  23. 2 2
      rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/WtjPresenter.java
  24. 2 2
      rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/YflPresenter.java
  25. 2 2
      rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/YtjPresenter.java
  26. 8 8
      rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/AddCzrkActivity.java
  27. 10 7
      rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/AddJfActivity.java
  28. 6 7
      rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/AddPersonActivity.java
  29. 3 4
      rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/AddWgrkActivity.java
  30. 5 5
      rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/AddWlhRkActivity.java
  31. 7 7
      rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/AddZzrkActivity.java
  32. 5 6
      rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/FwZpActivity.java
  33. 45 11
      rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/LoginActivity.java
  34. 9 10
      rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/RhzfActivity.java
  35. 6 7
      rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/RhzfAddRoomActivity.java
  36. 4 5
      rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/RhzfLdActivity.java
  37. 3 4
      rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/RhzfMainNewActivity.java
  38. 5 6
      rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/RhzfRyListActivity.java
  39. 2 3
      rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/TjJfActivity.java
  40. 5 6
      rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/TjjfNewActivity.java
  41. 1 1
      rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/holder/PersonHolder.java
  42. 4 0
      rhzf/src/main/res/layout/activity_login.xml
  43. 4 4
      rwsp/build.gradle
  44. 4 0
      rwsp/src/main/AndroidManifest.xml
  45. 3 4
      rwsp/src/main/java/com/xwkj/rwsp/mvp/presenter/FjGlySpMdXqPresenter.java
  46. 2 2
      rwsp/src/main/java/com/xwkj/rwsp/mvp/presenter/FjGlyWspMdPresenter.java
  47. 4 4
      rwsp/src/main/java/com/xwkj/rwsp/mvp/presenter/FjGlyWspPresenter.java
  48. 2 3
      rwsp/src/main/java/com/xwkj/rwsp/mvp/ui/activity/FjGlySpMdXqActivity.java
  49. 2 4
      rwsp/src/main/java/com/xwkj/rwsp/mvp/ui/activity/MainActivity.java
  50. 8 8
      rwsp/src/main/java/com/xwkj/rwsp/mvp/ui/fragment/FjGlyWspFragment.java
  51. 4 4
      rwxffk/build.gradle
  52. 3 0
      rwxffk/src/main/AndroidManifest.xml
  53. 1 1
      rwxffk/src/main/java/com/xwkj/rwxffk/app/utils/ReqToBus.java
  54. 4 5
      rwxffk/src/main/java/com/xwkj/rwxffk/mvp/ui/activity/MainActivity.java
  55. 12 0
      rwxffk/src/main/java/com/xwkj/rwxffk/mvp/ui/fragment/YqsRwFragment.java
  56. TEMPAT SAMPAH
      sqjw/libs/uniMPSDK-V2-release.aar
  57. TEMPAT SAMPAH
      sqjw/libs/uniapp-v8-release.aar
  58. 5 3
      sqjw/src/main/AndroidManifest.xml
  59. 1 1
      sqjw/src/main/assets/data/dcloud_control.xml
  60. 2 2
      sqjw/src/main/java/com/xwkj/sqjw/app/AppLifecyclesImpl.java
  61. 7 0
      sqjw/src/main/java/com/xwkj/sqjw/app/GlobalHttpHandlerImpl.java
  62. 4 3
      sqjw/src/main/java/com/xwkj/sqjw/app/db/DBHelper.java
  63. 35 8
      sqjw/src/main/java/com/xwkj/sqjw/app/provider/DataProvider.java
  64. 6 0
      sqjw/src/main/java/com/xwkj/sqjw/mvp/contract/JdrhLoginContract.java
  65. 2 1
      sqjw/src/main/java/com/xwkj/sqjw/mvp/model/api/Api.java
  66. 18 7
      sqjw/src/main/java/com/xwkj/sqjw/mvp/model/api/ReqToBus.java
  67. 20 0
      sqjw/src/main/java/com/xwkj/sqjw/mvp/model/entity/AppEntity.java
  68. 305 0
      sqjw/src/main/java/com/xwkj/sqjw/mvp/model/entity/Login.java
  69. 40 0
      sqjw/src/main/java/com/xwkj/sqjw/mvp/model/entity/NormalEntity.java
  70. 1 1
      sqjw/src/main/java/com/xwkj/sqjw/mvp/presenter/HomePresenter.java
  71. 64 0
      sqjw/src/main/java/com/xwkj/sqjw/mvp/presenter/JdrhLoginPresenter.java
  72. 312 2
      sqjw/src/main/java/com/xwkj/sqjw/mvp/ui/activity/JdrhLoginActivity.java
  73. 36 23
      sqjw/src/main/java/com/xwkj/sqjw/mvp/ui/activity/MainActivity.java
  74. 2 0
      sqjw/src/main/java/com/xwkj/sqjw/mvp/ui/activity/SqjwLoginActivity.java
  75. 7 0
      sqjw/src/main/java/com/xwkj/sqjw/mvp/ui/adapter/HomeAppAdapter.java
  76. 267 31
      sqjw/src/main/java/com/xwkj/sqjw/mvp/ui/fragment/HomeFragment.java
  77. 60 10
      sqjw/src/main/java/com/xwkj/sqjw/mvp/ui/fragment/MyFragment.java
  78. TEMPAT SAMPAH
      sqjw/src/main/res/drawable-xxxhdpi/icon_login_protect.png
  79. TEMPAT SAMPAH
      sqjw/src/main/res/drawable-xxxhdpi/lgon_bg.png
  80. TEMPAT SAMPAH
      sqjw/src/main/res/drawable-xxxhdpi/pwd_eye.png
  81. TEMPAT SAMPAH
      sqjw/src/main/res/drawable-xxxhdpi/pwd_no_eye.png
  82. 9 0
      sqjw/src/main/res/drawable/bg_shape_hs.xml
  83. 9 0
      sqjw/src/main/res/drawable/line_shape.xml
  84. 8 0
      sqjw/src/main/res/drawable/shape_login.xml
  85. 10 0
      sqjw/src/main/res/drawable/sq_shape.xml
  86. 245 0
      sqjw/src/main/res/layout/activity_jdrh_login.xml
  87. 8 0
      sqjw/src/main/res/layout/fragment_my.xml
  88. TEMPAT SAMPAH
      sqjw/src/main/res/mipmap-xxxhdpi/jh.png
  89. 9 18
      thirdparty/src/main/java/com/zkjc/common/utils/ThirdUtils.java
  90. 4 4
      wgrhc/build.gradle
  91. 7 0
      wgrhc/src/main/AndroidManifest.xml
  92. 4 5
      wgrhc/src/main/java/com/xwkj/wgrhc/mvp/ui/activity/MainActivity.java
  93. 7 0
      xfjc/src/main/AndroidManifest.xml
  94. TEMPAT SAMPAH
      xfjc/src/main/assets/aip-ocr.license
  95. 1 2
      xfjc/src/main/java/com/xwkj/xfjc/app/utils/ReqToBus.java
  96. 8 1
      xfjc/src/main/java/com/xwkj/xfjc/app/utils/StringUtil.java
  97. 1 0
      xfjc/src/main/java/com/xwkj/xfjc/mvp/model/api/Api.java
  98. 6 6
      xfjc/src/main/java/com/xwkj/xfjc/mvp/presenter/CsJcLbPresenter.java
  99. 8 8
      xfjc/src/main/java/com/xwkj/xfjc/mvp/presenter/JxcsCjPresenter.java
  100. 2 2
      xfjc/src/main/java/com/xwkj/xfjc/mvp/presenter/MainPresenter.java

+ 2 - 0
common/src/main/java/com/zkjc/common/utils/ApkUtils.java

@@ -7,6 +7,7 @@ import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.net.Uri;
+import android.util.Log;
 
 import java.io.File;
 
@@ -119,6 +120,7 @@ public class ApkUtils {
 		return false;
 	}
 	public static boolean isSqjw(Context context) {
+		Log.e("eee", "getChannel(context) ====== " + getChannel(context));
 		if ("sqjw".equals(getChannel(context))) {
 			return true;
 		}

+ 1 - 1
sqjw/src/main/java/com/xwkj/sqjw/app/utils/ShareInfo.java → common/src/main/java/com/zkjc/common/utils/ShareInfo.java

@@ -1,4 +1,4 @@
-package com.xwkj.sqjw.app.utils;
+package com.zkjc.common.utils;
 
 import java.util.List;
 

+ 4 - 4
rhzf/build.gradle

@@ -68,17 +68,17 @@ android {
     }
     productFlavors {
         //应用商店版本
-        appstore {
+        sqjw {
             resValue "string", "app_name", "入户走访"
             signingConfig signingConfigs.release
-            manifestPlaceholders = [UMENG_CHANNEL: "appstore", CATEGORY: "android.intent.category.DEFAULT", APP_ICON: "@mipmap/ic_launcher"]
+            manifestPlaceholders = [UMENG_CHANNEL: "sqjw", CATEGORY: "android.intent.category.DEFAULT", APP_ICON: "@mipmap/ic_launcher"]
         }
         //非应用商店版本
-        unappstore {
+        jdrh {
 
             resValue "string", "app_name", "入户走访"
             signingConfig signingConfigs.release
-            manifestPlaceholders = [UMENG_CHANNEL: "unappstore", CATEGORY: "android.intent.category.LAUNCHER", APP_ICON: "@mipmap/ic_launcher"]
+            manifestPlaceholders = [UMENG_CHANNEL: "jdrh", CATEGORY: "android.intent.category.LAUNCHER", APP_ICON: "@mipmap/ic_launcher"]
         }
 
 

+ 6 - 1
rhzf/src/main/AndroidManifest.xml

@@ -26,7 +26,8 @@
         <activity android:name=".mvp.ui.activity.MdjfActivity" />
         <activity android:name=".mvp.ui.activity.GdMapActivity" />
         <activity android:name=".mvp.ui.activity.AddPersonActivity" />
-        <activity android:name=".mvp.ui.activity.AddJfActivity" /> <!-- <activity android:name=".mvp.ui.activity.LoginActivity" /> -->
+        <activity android:name=".mvp.ui.activity.AddJfActivity"
+            android:exported="true"/> <!-- <activity android:name=".mvp.ui.activity.LoginActivity" /> -->
         <activity android:name=".mvp.ui.activity.RhzfAddRoomActivity" />
         <activity android:name=".mvp.ui.activity.RhzfRyHistoryActivity" />
         <activity android:name=".mvp.ui.activity.RhzfRyListActivity" />
@@ -71,6 +72,10 @@
             android:value="b025bf22ed196988a14e63896003dd81" />
 
         <service android:name="com.amap.api.location.APSService" />
+
+        <meta-data
+            android:name="UMENG_CHANNEL"
+            android:value="${UMENG_CHANNEL_VALUE}" />
     </application>
 
 </manifest>

TEMPAT SAMPAH
rhzf/src/main/assets/aip-ocr.license


+ 1 - 1
rhzf/src/main/java/com/xwkj/rhzf/app/utils/ReqToBus.java

@@ -78,7 +78,7 @@ public class ReqToBus {
         String token = sp.getString("token", " ");
         reqValue.put("token", "bearer " + token);
         reqValue.put("version_code", ApkUtils.getVersionCode(context));
-        reqValue.put("appId", "1846809831194980354");
+        reqValue.put("appId", sp.getString("appId", ""));
         if (!reqValue.containsKey("username")) {
 //        param.put("username", "admin");
 //        param.put("password", "937b0ec364aff24c011307493f5155b4");

+ 3 - 3
rhzf/src/main/java/com/xwkj/rhzf/app/utils/SignatureDialogV2.java

@@ -19,7 +19,7 @@ import com.google.gson.JsonParser;
 import com.hjq.toast.ToastUtils;
 import com.jess.arms.integration.AppManager;
 import com.xwkj.rhzf.R;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.io.File;
 import java.io.FileOutputStream;
@@ -62,7 +62,7 @@ public class SignatureDialogV2 {
             dialog.findViewById(R.id.dialog_confirm_confirm_tv).setOnClickListener(new View.OnClickListener() {
                 @Override
                 public void onClick(View v) {
-                    Utils.getInstances().showDialog(AppManager.getAppManager().getCurrentActivity(),"正在上传请勿退出");
+                    ThirdUtils.getInstances().showDialog(AppManager.getAppManager().getCurrentActivity(),"正在上传请勿退出");
                     if (!mSignaturePad.isEmpty()) {
                         Bitmap signatureBitmap = mSignaturePad.getSignatureBitmap();
                         String imagePath = addJpgSignatureToGallery(signatureBitmap);
@@ -76,7 +76,7 @@ public class SignatureDialogV2 {
                                     if (jsonObject.has("link")) {
                                         String url = jsonObject.get("link").getAsString();
                                         mListener.onSignImage(url);
-                                        Utils.getInstances().dismissDialog();
+                                        ThirdUtils.getInstances().dismissDialog();
                                     }
                                 }
 

+ 7 - 1
rhzf/src/main/java/com/xwkj/rhzf/app/utils/StringUtil.java

@@ -1,7 +1,10 @@
 package com.xwkj.rhzf.app.utils;
 
+import android.content.Context;
 import android.text.TextUtils;
 
+import com.zkjc.common.utils.ApkUtils;
+
 public class StringUtil {
 
     /**
@@ -21,7 +24,10 @@ public class StringUtil {
      * @param str
      * @return
      */
-    public static String replaceString(String str) {
+    public static String replaceString(String str, Context context) {
+        if (ApkUtils.isSqjw(context)) {
+            return str;
+        }
         if (TextUtils.isEmpty(str) || str.length() < 6) {
             return str;
         }

+ 5 - 5
rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/AddCzrkPresenter.java

@@ -17,7 +17,7 @@ import com.xwkj.rhzf.app.utils.CommonInterFace;
 import com.xwkj.rhzf.app.utils.ReqToBus;
 import com.xwkj.rhzf.mvp.contract.AddCzrkContract;
 import com.xwkj.rhzf.mvp.model.entity.NormalEntity;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -74,7 +74,7 @@ public class AddCzrkPresenter extends BasePresenter<AddCzrkContract.Model, AddCz
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
             }
 
             @Override
@@ -97,7 +97,7 @@ public class AddCzrkPresenter extends BasePresenter<AddCzrkContract.Model, AddCz
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
             }
 
             @Override
@@ -115,7 +115,7 @@ public class AddCzrkPresenter extends BasePresenter<AddCzrkContract.Model, AddCz
         ReqToBus.getInstance().init(mApplication).getRequest(map1, new CommonInterFace() {
             @Override
             public void onSuccess(String result) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 NormalEntity entity = new Gson().fromJson(result, NormalEntity.class);
                 int code = entity.getCode();
                 if (code == 200) {
@@ -147,7 +147,7 @@ public class AddCzrkPresenter extends BasePresenter<AddCzrkContract.Model, AddCz
         ReqToBus.getInstance().init(mApplication).getRequest(map1, new CommonInterFace() {
             @Override
             public void onSuccess(String result) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 NormalEntity entity = new Gson().fromJson(result, NormalEntity.class);
                 int code = entity.getCode();
                 if (code == 200) {

+ 5 - 5
rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/AddJfPresenter.java

@@ -26,7 +26,7 @@ import com.xwkj.rhzf.app.utils.ReqToBus;
 import com.xwkj.rhzf.mvp.contract.AddJfContract;
 import com.xwkj.rhzf.mvp.model.entity.MdjfXqEntity;
 import com.xwkj.rhzf.mvp.model.entity.NormalEntity;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -103,7 +103,7 @@ public class AddJfPresenter extends BasePresenter<AddJfContract.Model, AddJfCont
             @Override
             public void onSuccess(String result) {
 
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 if (mRootView != null) {
                     NormalEntity entity = new Gson().fromJson(result, NormalEntity.class);
                     int code = entity.getCode();
@@ -169,7 +169,7 @@ public class AddJfPresenter extends BasePresenter<AddJfContract.Model, AddJfCont
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
             }
 
             @Override
@@ -202,7 +202,7 @@ public class AddJfPresenter extends BasePresenter<AddJfContract.Model, AddJfCont
                     @Override
                     public void onError(Throwable t) {
                         super.onError(t);
-                        Utils.getInstances().dismissDialog();
+                        ThirdUtils.getInstances().dismissDialog();
                         ToastUtils.show("网络异常,请稍后再试" + t.getMessage());
                     }
                 });
@@ -253,7 +253,7 @@ public class AddJfPresenter extends BasePresenter<AddJfContract.Model, AddJfCont
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("网络异常!");
             }
 

+ 3 - 3
rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/AddPersonPresenter.java

@@ -22,7 +22,7 @@ import com.jess.arms.utils.RxLifecycleUtils;
 import com.xwkj.rhzf.app.utils.CommonInterFace;
 import com.xwkj.rhzf.app.utils.ReqToBus;
 import com.xwkj.rhzf.mvp.contract.AddPersonContract;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -90,7 +90,7 @@ public class AddPersonPresenter extends BasePresenter<AddPersonContract.Model, A
                     @Override
                     public void onError(Throwable t) {
                         super.onError(t);
-                        Utils.getInstances().dismissDialog();
+                        ThirdUtils.getInstances().dismissDialog();
                         ToastUtils.show("网络异常,请稍后再试" + t.getMessage());
                     }
                 });
@@ -134,7 +134,7 @@ public class AddPersonPresenter extends BasePresenter<AddPersonContract.Model, A
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
             }
 
             @Override

+ 3 - 3
rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/AddWgrkPresenter.java

@@ -17,7 +17,7 @@ import com.xwkj.rhzf.app.utils.CommonInterFace;
 import com.xwkj.rhzf.app.utils.ReqToBus;
 import com.xwkj.rhzf.mvp.contract.AddWgrkContract;
 import com.xwkj.rhzf.mvp.model.entity.NormalEntity;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -69,7 +69,7 @@ public class AddWgrkPresenter extends BasePresenter<AddWgrkContract.Model, AddWg
         ReqToBus.getInstance().init(mApplication).getRequest(map1, new CommonInterFace() {
             @Override
             public void onSuccess(String result) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 NormalEntity entity = new Gson().fromJson(result, NormalEntity.class);
                 int code = entity.getCode();
                 if (code == 200) {
@@ -101,7 +101,7 @@ public class AddWgrkPresenter extends BasePresenter<AddWgrkContract.Model, AddWg
         ReqToBus.getInstance().init(mApplication).getRequest(map1, new CommonInterFace() {
             @Override
             public void onSuccess(String result) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 NormalEntity entity = new Gson().fromJson(result, NormalEntity.class);
                 int code = entity.getCode();
                 if (code == 200) {

+ 4 - 4
rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/AddWlhRkPresenter.java

@@ -17,7 +17,7 @@ import com.xwkj.rhzf.app.utils.CommonInterFace;
 import com.xwkj.rhzf.app.utils.ReqToBus;
 import com.xwkj.rhzf.mvp.contract.AddWlhRkContract;
 import com.xwkj.rhzf.mvp.model.entity.NormalEntity;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -75,7 +75,7 @@ public class AddWlhRkPresenter extends BasePresenter<AddWlhRkContract.Model, Add
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
             }
 
             @Override
@@ -94,7 +94,7 @@ public class AddWlhRkPresenter extends BasePresenter<AddWlhRkContract.Model, Add
         ReqToBus.getInstance().init(mApplication).getRequest(map1, new CommonInterFace() {
             @Override
             public void onSuccess(String result) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 NormalEntity entity = new Gson().fromJson(result, NormalEntity.class);
                 int code = entity.getCode();
                 if (code == 200) {
@@ -126,7 +126,7 @@ public class AddWlhRkPresenter extends BasePresenter<AddWlhRkContract.Model, Add
         ReqToBus.getInstance().init(mApplication).getRequest(map1, new CommonInterFace() {
             @Override
             public void onSuccess(String result) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 NormalEntity entity = new Gson().fromJson(result, NormalEntity.class);
                 int code = entity.getCode();
                 if (code == 200) {

+ 5 - 5
rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/AddZzrkPresenter.java

@@ -17,7 +17,7 @@ import com.xwkj.rhzf.app.utils.CommonInterFace;
 import com.xwkj.rhzf.app.utils.ReqToBus;
 import com.xwkj.rhzf.mvp.contract.AddZzrkContract;
 import com.xwkj.rhzf.mvp.model.entity.NormalEntity;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -74,7 +74,7 @@ public class AddZzrkPresenter extends BasePresenter<AddZzrkContract.Model, AddZz
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
             }
 
             @Override
@@ -98,7 +98,7 @@ public class AddZzrkPresenter extends BasePresenter<AddZzrkContract.Model, AddZz
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
             }
 
             @Override
@@ -116,7 +116,7 @@ public class AddZzrkPresenter extends BasePresenter<AddZzrkContract.Model, AddZz
         ReqToBus.getInstance().init(mApplication).getRequest(map1, new CommonInterFace() {
             @Override
             public void onSuccess(String result) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 NormalEntity entity = new Gson().fromJson(result, NormalEntity.class);
                 int code = entity.getCode();
                 if (code == 200) {
@@ -148,7 +148,7 @@ public class AddZzrkPresenter extends BasePresenter<AddZzrkContract.Model, AddZz
         ReqToBus.getInstance().init(mApplication).getRequest(map1, new CommonInterFace() {
             @Override
             public void onSuccess(String result) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 NormalEntity entity = new Gson().fromJson(result, NormalEntity.class);
                 int code = entity.getCode();
                 if (code == 200) {

+ 2 - 2
rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/HfPresenter.java

@@ -15,7 +15,7 @@ import javax.inject.Inject;
 import com.xwkj.rhzf.app.utils.CommonInterFace;
 import com.xwkj.rhzf.app.utils.ReqToBus;
 import com.xwkj.rhzf.mvp.contract.HfContract;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -73,7 +73,7 @@ public class HfPresenter extends BasePresenter<HfContract.Model, HfContract.View
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("网络异常!");
             }
 

+ 4 - 4
rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/MdDjXqPresenter.java

@@ -22,7 +22,7 @@ import com.jess.arms.utils.RxLifecycleUtils;
 import com.xwkj.rhzf.app.utils.CommonInterFace;
 import com.xwkj.rhzf.app.utils.ReqToBus;
 import com.xwkj.rhzf.mvp.contract.MdDjXqContract;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -91,7 +91,7 @@ public class MdDjXqPresenter extends BasePresenter<MdDjXqContract.Model, MdDjXqC
                     @Override
                     public void onError(Throwable t) {
                         super.onError(t);
-                        Utils.getInstances().dismissDialog();
+                        ThirdUtils.getInstances().dismissDialog();
                         ToastUtils.show("网络异常,请稍后再试" + t.getMessage());
                     }
                 });
@@ -112,7 +112,7 @@ public class MdDjXqPresenter extends BasePresenter<MdDjXqContract.Model, MdDjXqC
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("网络异常!");
             }
 
@@ -166,7 +166,7 @@ public class MdDjXqPresenter extends BasePresenter<MdDjXqContract.Model, MdDjXqC
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("回访上传失败");
             }
 

+ 2 - 2
rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/MdTjLbPresenter.java

@@ -15,7 +15,7 @@ import javax.inject.Inject;
 import com.xwkj.rhzf.app.utils.CommonInterFace;
 import com.xwkj.rhzf.app.utils.ReqToBus;
 import com.xwkj.rhzf.mvp.contract.MdTjLbContract;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -72,7 +72,7 @@ public class MdTjLbPresenter extends BasePresenter<MdTjLbContract.Model, MdTjLbC
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("网络异常!");
             }
 

+ 2 - 2
rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/MdgzPresenter.java

@@ -15,7 +15,7 @@ import javax.inject.Inject;
 import com.xwkj.rhzf.app.utils.CommonInterFace;
 import com.xwkj.rhzf.app.utils.ReqToBus;
 import com.xwkj.rhzf.mvp.contract.MdgzContract;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -73,7 +73,7 @@ public class MdgzPresenter extends BasePresenter<MdgzContract.Model, MdgzContrac
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("网络异常!");
             }
 

+ 2 - 2
rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/MdhfjlPresenter.java

@@ -15,7 +15,7 @@ import javax.inject.Inject;
 import com.xwkj.rhzf.app.utils.CommonInterFace;
 import com.xwkj.rhzf.app.utils.ReqToBus;
 import com.xwkj.rhzf.mvp.contract.MdhfjlContract;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -73,7 +73,7 @@ public class MdhfjlPresenter extends BasePresenter<MdhfjlContract.Model, MdhfjlC
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("网络异常!");
             }
 

+ 3 - 3
rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/RhzfMainNewPresenter.java

@@ -17,7 +17,7 @@ import com.xwkj.rhzf.app.utils.CommonInterFace;
 import com.xwkj.rhzf.app.utils.ReqToBus;
 import com.xwkj.rhzf.mvp.contract.RhzfMainNewContract;
 import com.xwkj.rhzf.mvp.model.entity.RhzfMainNewEntity;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -69,7 +69,7 @@ public class RhzfMainNewPresenter extends BasePresenter<RhzfMainNewContract.Mode
         ReqToBus.getInstance().init(mApplication).getRequest(param, new CommonInterFace() {
             @Override
             public void onSuccess(String result) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 RhzfMainNewEntity entity = new Gson().fromJson(result, RhzfMainNewEntity.class);
                 int code = entity.getCode();
                 if (code == 200) {
@@ -83,7 +83,7 @@ public class RhzfMainNewPresenter extends BasePresenter<RhzfMainNewContract.Mode
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("网络异常!");
             }
 

+ 3 - 3
rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/RhzfPresenter.java

@@ -18,7 +18,7 @@ import com.xwkj.rhzf.app.utils.ReqToBus;
 import com.xwkj.rhzf.mvp.contract.RhzfContract;
 import com.xwkj.rhzf.mvp.model.entity.RhzfRoomEntity;
 import com.xwkj.rhzf.mvp.model.entity.ZdAllEntity;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -171,7 +171,7 @@ public class RhzfPresenter extends BasePresenter<RhzfContract.Model, RhzfContrac
         ReqToBus.getInstance().init(mApplication).getRequest(map1, new CommonInterFace() {
             @Override
             public void onSuccess(String result) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 try {
                     RhzfRoomEntity entity = new Gson().fromJson(result, RhzfRoomEntity.class);
                     int code = entity.getCode();
@@ -228,7 +228,7 @@ public class RhzfPresenter extends BasePresenter<RhzfContract.Model, RhzfContrac
         ReqToBus.getInstance().init(mApplication).getRequest(map1, new CommonInterFace() {
             @Override
             public void onSuccess(String result) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 try {
                     RhzfRoomEntity entity = new Gson().fromJson(result, RhzfRoomEntity.class);
                     int code = entity.getCode();

+ 2 - 2
rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/TjJfPresenter.java

@@ -23,7 +23,7 @@ import com.jess.arms.utils.RxLifecycleUtils;
 import com.xwkj.rhzf.app.utils.CommonInterFace;
 import com.xwkj.rhzf.app.utils.ReqToBus;
 import com.xwkj.rhzf.mvp.contract.TjJfContract;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -93,7 +93,7 @@ public class TjJfPresenter extends BasePresenter<TjJfContract.Model, TjJfContrac
                     @Override
                     public void onError(Throwable t) {
                         super.onError(t);
-                        Utils.getInstances().dismissDialog();
+                        ThirdUtils.getInstances().dismissDialog();
                         ToastUtils.show("网络异常,请稍后再试" + t.getMessage());
                     }
                 });

+ 2 - 2
rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/WtjPresenter.java

@@ -15,7 +15,7 @@ import javax.inject.Inject;
 import com.xwkj.rhzf.app.utils.CommonInterFace;
 import com.xwkj.rhzf.app.utils.ReqToBus;
 import com.xwkj.rhzf.mvp.contract.WtjContract;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -72,7 +72,7 @@ public class WtjPresenter extends BasePresenter<WtjContract.Model, WtjContract.V
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("网络异常!");
             }
 

+ 2 - 2
rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/YflPresenter.java

@@ -15,7 +15,7 @@ import javax.inject.Inject;
 import com.xwkj.rhzf.app.utils.CommonInterFace;
 import com.xwkj.rhzf.app.utils.ReqToBus;
 import com.xwkj.rhzf.mvp.contract.YflContract;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -74,7 +74,7 @@ public class YflPresenter extends BasePresenter<YflContract.Model, YflContract.V
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("网络异常!");
             }
 

+ 2 - 2
rhzf/src/main/java/com/xwkj/rhzf/mvp/presenter/YtjPresenter.java

@@ -15,7 +15,7 @@ import javax.inject.Inject;
 import com.xwkj.rhzf.app.utils.CommonInterFace;
 import com.xwkj.rhzf.app.utils.ReqToBus;
 import com.xwkj.rhzf.mvp.contract.YtjContract;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -73,7 +73,7 @@ public class YtjPresenter extends BasePresenter<YtjContract.Model, YtjContract.V
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("网络异常!");
             }
 

+ 8 - 8
rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/AddCzrkActivity.java

@@ -43,7 +43,6 @@ import com.google.android.flexbox.FlexboxLayout;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
 import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
 
@@ -72,12 +71,13 @@ import com.xwkj.rhzf.R;
 import com.xwkj.rhzf.mvp.ui.fragment.RhzfCzrkDeleteDialog;
 import com.xwkj.rhzf.mvp.ui.fragment.RhzfRyDeleteDialog;
 import com.zkjc.common.base.ZkjcBaseActivity;
+import com.zkjc.common.utils.ApkUtils;
 import com.zkjc.common.utils.DevicesUtils;
 import com.zkjc.common.utils.IdCardUtil;
 import com.zkjc.common.utils.MyKeyBoardView;
 import com.zkjc.common.utils.RegexUtils;
 import com.zkjc.common.utils.ScreenUtils;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 import com.zkjc.common.view.CommonTitleBar;
 
 
@@ -602,7 +602,7 @@ public class AddCzrkActivity extends ZkjcBaseActivity<AddCzrkPresenter> implemen
                     @Override
                     public void onConfirmClick(Fwtd selectZxyy, String bcyy, String bcrq, String xzqh, String desc) {
                         if (mNeedUpdate) {
-                            Utils.getInstances().showDialog(AddCzrkActivity.this, "正在删除,请稍等");
+                            ThirdUtils.getInstances().showDialog(AddCzrkActivity.this, "正在删除,请稍等");
                             mInfo.setIsDeleted(1);
                             mInfo.setZxyy(selectZxyy.getValue());
                             mInfo.setBcyy(bcyy);
@@ -637,7 +637,7 @@ public class AddCzrkActivity extends ZkjcBaseActivity<AddCzrkPresenter> implemen
                     @Override
                     public void onConfirmClick(Fwtd selectZxyy, String xzqh, String desc) {
                         if (mNeedUpdate) {
-                            Utils.getInstances().showDialog(AddCzrkActivity.this, "正在删除,请稍等");
+                            ThirdUtils.getInstances().showDialog(AddCzrkActivity.this, "正在删除,请稍等");
                             mInfo.setIsDeleted(1);
                             mInfo.setZxyy(selectZxyy.getValue());
                             mInfo.setQwdzssxq(xzqh);
@@ -782,7 +782,7 @@ public class AddCzrkActivity extends ZkjcBaseActivity<AddCzrkPresenter> implemen
     private void setData(RhxxBean info) {
         setCommonData(info);
         etXm.setText(info.getRyXm());
-        if (TextUtils.isEmpty(info.getId())) {
+        if (TextUtils.isEmpty(info.getId()) || ApkUtils.isSqjw(this)) {
             etSfzh.setText(info.getRySfzh());
             etDh.setText(info.getRyDh());
         }
@@ -923,7 +923,7 @@ public class AddCzrkActivity extends ZkjcBaseActivity<AddCzrkPresenter> implemen
             Gson gson = new Gson();
             Type mapType = new TypeToken<Map<String, Object>>(){}.getType();
             Map<String, Object> map = gson.fromJson(gson.toJson(mInfo), mapType);
-            Utils.getInstances().showDialog(this, "正在上传,请稍等");
+            ThirdUtils.getInstances().showDialog(this, "正在上传,请稍等");
             mPresenter.add(map);
         } else {
             Intent intent = new Intent();
@@ -1081,7 +1081,7 @@ public class AddCzrkActivity extends ZkjcBaseActivity<AddCzrkPresenter> implemen
         runOnUiThread(new Runnable() {
             @Override
             public void run() {
-                Utils.getInstances().showDialog(AddCzrkActivity.this, "正在解析身份信息");
+                ThirdUtils.getInstances().showDialog(AddCzrkActivity.this, "正在解析身份信息");
             }
         });
 
@@ -1102,7 +1102,7 @@ public class AddCzrkActivity extends ZkjcBaseActivity<AddCzrkPresenter> implemen
                 if (result != null) {
                     String string = result.toString();
                     System.out.println("string = " + string);
-                    Utils.getInstances().dismissDialog();
+                    ThirdUtils.getInstances().dismissDialog();
                     // etXb.setText(result.getGender().toString());
                     etXm.setText(result.getName().toString());
                     etSfzh.setText(result.getIdNumber().toString());

+ 10 - 7
rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/AddJfActivity.java

@@ -22,7 +22,6 @@ import com.google.gson.Gson;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
 import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
 import com.jess.arms.base.DefaultAdapter;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
@@ -59,7 +58,7 @@ import com.zkjc.common.utils.DevicesUtils;
 import com.zkjc.common.utils.IdCardUtil;
 import com.zkjc.common.utils.JsonMapUtil;
 import com.zkjc.common.utils.UUIDUtils;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 import com.zkjc.common.view.CommonTitleBarV3;
 
 
@@ -402,7 +401,7 @@ public class AddJfActivity extends ZkjcBaseActivity<AddJfPresenter> implements A
                 for (int i = 0; i < fjList.size(); i++) {
                     String path = fjList.get(i).path;
                     File file = new File(path);
-                    Utils.getInstances().showDialog(AddJfActivity.this, "正在上传");
+                    ThirdUtils.getInstances().showDialog(AddJfActivity.this, "正在上传");
                     MultipartBody.Builder builder = new MultipartBody.Builder()
                             .setType(MultipartBody.FORM);
                     String zh = sys.getString("zh", "");
@@ -411,7 +410,7 @@ public class AddJfActivity extends ZkjcBaseActivity<AddJfPresenter> implements A
                     mPresenter.uploadImg(multipartBody, 1);
                 }
             } else {
-                Utils.getInstances().showDialog(AddJfActivity.this, "正在上传数据");
+                ThirdUtils.getInstances().showDialog(AddJfActivity.this, "正在上传数据");
                 if (mItem == null) {
                     map.put("mdjfDj", map1);
                     mPresenter.mdkfDj(map);
@@ -428,7 +427,11 @@ public class AddJfActivity extends ZkjcBaseActivity<AddJfPresenter> implements A
         initLocal();
         initZd("1686566442075504641", 0);
 
-        mRwxfBean = (RwEntity.DataBean.RecordsBean) getIntent().getSerializableExtra("rwxf");
+        String jsonData = getIntent().getStringExtra("json_data");
+        if (!TextUtils.isEmpty(jsonData)) {
+            mRwxfBean = new Gson().fromJson(jsonData, RwEntity.DataBean.RecordsBean.class);
+        }
+//        mRwxfBean = (RwEntity.DataBean.RecordsBean) getIntent().getSerializableExtra("rwxf");
         if (mRwxfBean != null) {
             setRwxfData(mRwxfBean);
         }
@@ -804,7 +807,7 @@ public class AddJfActivity extends ZkjcBaseActivity<AddJfPresenter> implements A
             String url = jsonObject.get("link").getAsString();
             fjPath.add(url);
             if (fjList.size() == fjPath.size()) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 StringBuffer sbzp = new StringBuffer();
                 for (int i = 0; i < fjPath.size(); i++) {
                     if (i == fjPath.size() - 1) {
@@ -1013,6 +1016,6 @@ public class AddJfActivity extends ZkjcBaseActivity<AddJfPresenter> implements A
     @Override
     protected void onDestroy() {
         super.onDestroy();
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
     }
 }

+ 6 - 7
rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/AddPersonActivity.java

@@ -37,7 +37,6 @@ import com.google.gson.Gson;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
 import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
 
@@ -66,7 +65,7 @@ import com.zkjc.common.utils.IdCardUtil;
 import com.zkjc.common.utils.MyKeyBoardView;
 import com.zkjc.common.utils.RegexUtils;
 import com.zkjc.common.utils.UUIDUtils;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 import com.zkjc.common.view.CommonTitleBar;
 
 
@@ -331,7 +330,7 @@ public class AddPersonActivity extends ZkjcBaseActivity<AddPersonPresenter> impl
                 for (int i = 0; i < fjList.size(); i++) {
                     String path = fjList.get(i).path;
                     File file = new File(path);
-                    Utils.getInstances().showDialog(AddPersonActivity.this, "正在上传");
+                    ThirdUtils.getInstances().showDialog(AddPersonActivity.this, "正在上传");
                     MultipartBody.Builder builder = new MultipartBody.Builder()
                             .setType(MultipartBody.FORM);
                     SharedPreferences sys = getSharedPreferences("sys", MODE_PRIVATE);
@@ -415,7 +414,7 @@ public class AddPersonActivity extends ZkjcBaseActivity<AddPersonPresenter> impl
                     for (int i = 0; i < fjList.size(); i++) {
                         String path = fjList.get(i).path;
                         File file = new File(path);
-                        Utils.getInstances().showDialog(AddPersonActivity.this, "正在上传");
+                        ThirdUtils.getInstances().showDialog(AddPersonActivity.this, "正在上传");
                         MultipartBody.Builder builder = new MultipartBody.Builder()
                                 .setType(MultipartBody.FORM);
                         SharedPreferences sys = getSharedPreferences("sys", MODE_PRIVATE);
@@ -588,7 +587,7 @@ public class AddPersonActivity extends ZkjcBaseActivity<AddPersonPresenter> impl
         runOnUiThread(new Runnable() {
             @Override
             public void run() {
-                Utils.getInstances().showDialog(AddPersonActivity.this, "正在解析身份信息");
+                ThirdUtils.getInstances().showDialog(AddPersonActivity.this, "正在解析身份信息");
             }
         });
 
@@ -609,7 +608,7 @@ public class AddPersonActivity extends ZkjcBaseActivity<AddPersonPresenter> impl
                 if (result != null) {
                     String string = result.toString();
                     System.out.println("string = " + string);
-                    Utils.getInstances().dismissDialog();
+                    ThirdUtils.getInstances().dismissDialog();
                     etXb.setText(result.getGender().toString());
                     etXm.setText(result.getName().toString());
                     etIdcard.setText(result.getIdNumber().toString());
@@ -705,7 +704,7 @@ public class AddPersonActivity extends ZkjcBaseActivity<AddPersonPresenter> impl
             String url = jsonObject.get("link").getAsString();
             fjPath.add(url);
             if (fjList.size() == fjPath.size()) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 StringBuffer sbzp = new StringBuffer();
                 for (int i = 0; i < fjPath.size(); i++) {
                     if (i == fjPath.size() - 1) {

+ 3 - 4
rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/AddWgrkActivity.java

@@ -24,7 +24,6 @@ import com.google.android.flexbox.FlexboxLayout;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
 import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
 
@@ -43,7 +42,7 @@ import com.xwkj.rhzf.R;
 import com.xwkj.rhzf.mvp.ui.fragment.RhzfRyDeleteDialog;
 import com.zkjc.common.base.ZkjcBaseActivity;
 import com.zkjc.common.utils.ScreenUtils;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 import com.zkjc.common.view.CommonTitleBar;
 
 
@@ -300,7 +299,7 @@ public class AddWgrkActivity extends ZkjcBaseActivity<AddWgrkPresenter> implemen
                 @Override
                 public void onConfirmClick(Fwtd selectZxyy, String xzqh, String desc) {
                     if (mNeedUpdate) {
-                        Utils.getInstances().showDialog(AddWgrkActivity.this, "正在删除,请稍等");
+                        ThirdUtils.getInstances().showDialog(AddWgrkActivity.this, "正在删除,请稍等");
                         mInfo.setIsDeleted(1);
                         mInfo.setZxyy(selectZxyy.getValue());
                         mInfo.setQwdzssxq(xzqh);
@@ -402,7 +401,7 @@ public class AddWgrkActivity extends ZkjcBaseActivity<AddWgrkPresenter> implemen
         mInfo.setRyLhsy(etLhsy.getText().toString());
         mInfo.setBz(etBz.getText().toString());
         if (mNeedUpdate) {
-            Utils.getInstances().showDialog(this, "正在上传,请稍等");
+            ThirdUtils.getInstances().showDialog(this, "正在上传,请稍等");
             mInfo.setFwId(getIntent().getStringExtra("fwId"));
             mInfo.setDzbm(getIntent().getStringExtra("dzbm"));
             mInfo.setCommitData();

+ 5 - 5
rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/AddWlhRkActivity.java

@@ -40,7 +40,6 @@ import com.google.android.flexbox.FlexboxLayout;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
 import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
 import com.xwkj.rhzf.R;
@@ -64,12 +63,13 @@ import com.xwkj.rhzf.mvp.model.entity.ZdAllEntity;
 import com.xwkj.rhzf.mvp.presenter.AddWlhRkPresenter;
 import com.xwkj.rhzf.mvp.ui.fragment.RhzfRyDeleteDialog;
 import com.zkjc.common.base.ZkjcBaseActivity;
+import com.zkjc.common.utils.ApkUtils;
 import com.zkjc.common.utils.DevicesUtils;
 import com.zkjc.common.utils.IdCardUtil;
 import com.zkjc.common.utils.MyKeyBoardView;
 import com.zkjc.common.utils.RegexUtils;
 import com.zkjc.common.utils.ScreenUtils;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 import com.zkjc.common.view.CommonTitleBar;
 
 import org.json.JSONArray;
@@ -569,7 +569,7 @@ public class AddWlhRkActivity extends ZkjcBaseActivity<AddWlhRkPresenter> implem
                 @Override
                 public void onConfirmClick(Fwtd selectZxyy, String xzqh, String desc) {
                     if (mNeedUpdate) {
-                        Utils.getInstances().showDialog(AddWlhRkActivity.this, "正在删除,请稍等");
+                        ThirdUtils.getInstances().showDialog(AddWlhRkActivity.this, "正在删除,请稍等");
                         mInfo.setIsDeleted(1);
                         mInfo.setZxyy(selectZxyy.getValue());
                         mInfo.setQwdzssxq(xzqh);
@@ -748,7 +748,7 @@ public class AddWlhRkActivity extends ZkjcBaseActivity<AddWlhRkPresenter> implem
         if (mSelectMz != null) {
             tvMz.setText(mSelectMz.getLabel());
         }
-        if (TextUtils.isEmpty(info.getId())) {
+        if (TextUtils.isEmpty(info.getId()) || ApkUtils.isSqjw(this)) {
             etSfzh.setText(info.getRySfzh());
             etDh.setText(info.getRyDh());
         }
@@ -862,7 +862,7 @@ public class AddWlhRkActivity extends ZkjcBaseActivity<AddWlhRkPresenter> implem
             mInfo.setRyTsJtqk("");
         }
         if (mNeedUpdate) {
-            Utils.getInstances().showDialog(this, "正在上传,请稍等");
+            ThirdUtils.getInstances().showDialog(this, "正在上传,请稍等");
             mInfo.setFwId(getIntent().getStringExtra("fwId"));
             mInfo.setDzbm(getIntent().getStringExtra("dzbm"));
             mInfo.setCommitData();

+ 7 - 7
rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/AddZzrkActivity.java

@@ -43,7 +43,6 @@ import com.google.android.flexbox.FlexboxLayout;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
 import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
 
@@ -71,12 +70,13 @@ import com.xwkj.rhzf.mvp.presenter.AddZzrkPresenter;
 import com.xwkj.rhzf.R;
 import com.xwkj.rhzf.mvp.ui.fragment.RhzfRyDeleteDialog;
 import com.zkjc.common.base.ZkjcBaseActivity;
+import com.zkjc.common.utils.ApkUtils;
 import com.zkjc.common.utils.DevicesUtils;
 import com.zkjc.common.utils.IdCardUtil;
 import com.zkjc.common.utils.MyKeyBoardView;
 import com.zkjc.common.utils.RegexUtils;
 import com.zkjc.common.utils.ScreenUtils;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 import com.zkjc.common.view.CommonTitleBar;
 
 
@@ -610,7 +610,7 @@ public class AddZzrkActivity extends ZkjcBaseActivity<AddZzrkPresenter> implemen
                 @Override
                 public void onConfirmClick(Fwtd selectZxyy, String xzqh, String desc) {
                     if (mNeedUpdate) {
-                        Utils.getInstances().showDialog(AddZzrkActivity.this, "正在删除,请稍等");
+                        ThirdUtils.getInstances().showDialog(AddZzrkActivity.this, "正在删除,请稍等");
                         mInfo.setIsDeleted(1);
                         mInfo.setZxyy(selectZxyy.getValue());
                         mInfo.setQwdzssxq(xzqh);
@@ -753,7 +753,7 @@ public class AddZzrkActivity extends ZkjcBaseActivity<AddZzrkPresenter> implemen
     private void setData(RhxxBean info) {
         setCommonData(info);
         etXm.setText(info.getRyXm());
-        if (TextUtils.isEmpty(info.getId())) {
+        if (TextUtils.isEmpty(info.getId()) || ApkUtils.isSqjw(this)) {
             etSfzh.setText(info.getRySfzh());
             etDh.setText(info.getRyDh());
         }
@@ -894,7 +894,7 @@ public class AddZzrkActivity extends ZkjcBaseActivity<AddZzrkPresenter> implemen
             mInfo.setRyTsJtqk("");
         }
         if (mNeedUpdate) {
-            Utils.getInstances().showDialog(this, "正在上传,请稍等");
+            ThirdUtils.getInstances().showDialog(this, "正在上传,请稍等");
             mInfo.setFwId(getIntent().getStringExtra("fwId"));
             mInfo.setDzbm(getIntent().getStringExtra("dzbm"));
             mInfo.setCommitData();
@@ -1109,7 +1109,7 @@ public class AddZzrkActivity extends ZkjcBaseActivity<AddZzrkPresenter> implemen
         runOnUiThread(new Runnable() {
             @Override
             public void run() {
-                Utils.getInstances().showDialog(AddZzrkActivity.this, "正在解析身份信息");
+                ThirdUtils.getInstances().showDialog(AddZzrkActivity.this, "正在解析身份信息");
             }
         });
 
@@ -1130,7 +1130,7 @@ public class AddZzrkActivity extends ZkjcBaseActivity<AddZzrkPresenter> implemen
                 if (result != null) {
                     String string = result.toString();
                     System.out.println("string = " + string);
-                    Utils.getInstances().dismissDialog();
+                    ThirdUtils.getInstances().dismissDialog();
                     // etXb.setText(result.getGender().toString());
                     etXm.setText(result.getName().toString());
                     etSfzh.setText(result.getIdNumber().toString());

+ 5 - 6
rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/FwZpActivity.java

@@ -15,7 +15,6 @@ import com.bumptech.glide.Glide;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
 import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
 
@@ -35,7 +34,7 @@ import com.xwkj.rhzf.mvp.presenter.FwZpPresenter;
 
 import com.xwkj.rhzf.R;
 import com.zkjc.common.base.ZkjcBaseActivity;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 import com.zkjc.common.view.CommonTitleBarV3;
 
 
@@ -133,11 +132,11 @@ public class FwZpActivity extends ZkjcBaseActivity<FwZpPresenter> implements FwZ
                     setResult(RESULT_OK, intent);
                     finish();
                 } else {
-                    Utils.getInstances().showDialog(FwZpActivity.this, "正在上传");
+                    ThirdUtils.getInstances().showDialog(FwZpActivity.this, "正在上传");
                     UploadUtil.getInstance().init(FwZpActivity.this).getRequest(mItem.path, new CommonInterFace() {
                         @Override
                         public void onSuccess(String result) {
-                            Utils.getInstances().dismissDialog();
+                            ThirdUtils.getInstances().dismissDialog();
                             System.out.println("result = " + result);
                             JsonObject jsonObject1 = new JsonParser().parse(result).getAsJsonObject();
                             JsonObject jsonObject = jsonObject1.get("data").getAsJsonObject();
@@ -164,11 +163,11 @@ public class FwZpActivity extends ZkjcBaseActivity<FwZpPresenter> implements FwZ
                 }
             } else {
                 if (!TextUtils.isEmpty(fwzpLocal)) {
-                    Utils.getInstances().showDialog(FwZpActivity.this, "正在上传");
+                    ThirdUtils.getInstances().showDialog(FwZpActivity.this, "正在上传");
                     UploadUtil.getInstance().init(FwZpActivity.this).getRequest(fwzpLocal, new CommonInterFace() {
                         @Override
                         public void onSuccess(String result) {
-                            Utils.getInstances().dismissDialog();
+                            ThirdUtils.getInstances().dismissDialog();
                             System.out.println("result = " + result);
                             JsonObject jsonObject1 = new JsonParser().parse(result).getAsJsonObject();
                             JsonObject jsonObject = jsonObject1.get("data").getAsJsonObject();

+ 45 - 11
rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/LoginActivity.java

@@ -3,11 +3,11 @@ package com.xwkj.rhzf.mvp.ui.activity;
 import android.Manifest;
 import android.content.Intent;
 import android.content.SharedPreferences;
+import android.net.Uri;
 import android.os.Bundle;
 import android.text.TextUtils;
 import android.text.method.HideReturnsTransformationMethod;
 import android.text.method.PasswordTransformationMethod;
-import android.util.Log;
 import android.widget.Button;
 import android.widget.EditText;
 import android.widget.ImageView;
@@ -23,13 +23,11 @@ import com.google.gson.Gson;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
 import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
 
 import com.xm.permissions.OnRequestPermissionsCallback;
 import com.xm.permissions.XmPermissions;
-import com.xwkj.rhzf.app.utils.ReqToBus;
 import com.xwkj.rhzf.di.component.DaggerLoginComponent;
 import com.xwkj.rhzf.mvp.contract.LoginContract;
 import com.xwkj.rhzf.mvp.model.entity.Login;
@@ -39,6 +37,8 @@ import com.xwkj.rhzf.R;
 import com.zkjc.common.base.ZkjcBaseActivity;
 import com.zkjc.common.utils.ApkUtils;
 import com.zkjc.common.utils.DevicesUtils;
+import com.zkjc.common.utils.ShareInfo;
+import com.zkjc.common.utils.ThirdUtils;
 import com.zkjc.common.utils.Utils;
 
 
@@ -119,7 +119,7 @@ public class LoginActivity extends ZkjcBaseActivity<LoginPresenter> implements L
         int oldCode = sys.getInt("app_version_code", 0);
         int nowCode = ApkUtils.getVersionCode(LoginActivity.this);
 
-        if (/*!isFirst*/false) {
+       /* if (*//*!isFirst*//*false) {
             if (oldCode != 50 && nowCode == 50) {
 
             } else {
@@ -128,7 +128,7 @@ public class LoginActivity extends ZkjcBaseActivity<LoginPresenter> implements L
                 finish();
             }
 
-        }
+        }*/
         DevicesUtils.getDeviceId(LoginActivity.this, new DevicesUtils.OnDeviceIdListener() {
             @Override
             public void onSuccess(String deviceId) {
@@ -137,6 +137,39 @@ public class LoginActivity extends ZkjcBaseActivity<LoginPresenter> implements L
                 tvCode.setText("设备码:" + deviceId);
             }
         });
+
+
+
+        sys.edit().putString("appId", getIntent().getStringExtra("appId")).commit();
+        String json = getIntent().getStringExtra("json");
+        ShareInfo shareInfo = new Gson().fromJson(json, ShareInfo.class);
+
+        if (ApkUtils.isSqjw(this)) {
+            Map<String, Object> map1 = new HashMap<>();
+            map1.put("className", "bladeTokenEndPoint");
+            map1.put("methodName", "token3");
+            map1.put("username", getIntent().getStringExtra("username"));
+            map1.put("password", MD5.md5("123456"));
+            mPresenter.login(map1);
+
+        } else {
+            Uri uri = Uri.parse("content://com.xwkj.dataprovider/data");
+            Bundle pararms = new Bundle();
+            pararms.putString("appId", getIntent().getStringExtra("appId"));
+            pararms.putString("packageName", getPackageName());
+            pararms.putBoolean("isSelf", true);
+            Bundle bundle = getContentResolver().call(uri, "", null, pararms);
+
+            String xwkjUserName = bundle.getString("xwkjUserName");
+            String password = bundle.getString("xwkjPassword");
+            Map<String, Object> map1 = new HashMap<>();
+            map1.put("className", "bladeTokenEndPoint");
+            map1.put("methodName", "token3");
+            map1.put("username", getIntent().getStringExtra("xwkjUserName"));
+            map1.put("password", getIntent().getStringExtra("xwkjPassword"));
+            mPresenter.login(map1);
+        }
+        Utils.getInstances().showDialog(LoginActivity.this, "正在获取数据");
         //String phone = DevicesUtils.getPhone(this);
       /*  System.out.println("++++"+phone);
         etZh.setText(phone);*/
@@ -152,7 +185,7 @@ public class LoginActivity extends ZkjcBaseActivity<LoginPresenter> implements L
 //                ToastUtils.show("密码不能为空");
 //                return;
 //            }
-            Map<String, String> map = new HashMap<>();
+            /*Map<String, String> map = new HashMap<>();
             map.put("username", zh);
             map.put("password", MD5.md5(mm));
             map.put("tenantId", "000000");
@@ -169,7 +202,7 @@ public class LoginActivity extends ZkjcBaseActivity<LoginPresenter> implements L
             map1.put("password", MD5.md5(mm));
             mPresenter.login(map1);
             Utils.getInstances().showDialog(LoginActivity.this, "正在登录");
-
+*/
             /*sys.edit().putBoolean("isFirst", false).commit();
             ArmsUtils.startActivity(MainActivity.class);
             finish();*/
@@ -276,7 +309,7 @@ public class LoginActivity extends ZkjcBaseActivity<LoginPresenter> implements L
     @Override
     public void onSuccess(String result) {
 
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         System.out.println("****" + result);
         try {
             System.out.println("用户信息" + result);
@@ -296,7 +329,7 @@ public class LoginActivity extends ZkjcBaseActivity<LoginPresenter> implements L
                     map.put("fjZh", etMjzh.getText().toString());
                     mPresenter.bindMj(map, entity);
                 } else {
-                    Utils.getInstances().dismissDialog();
+                    ThirdUtils.getInstances().dismissDialog();
                     saveLoginInfo(entity);
                 }
 
@@ -336,6 +369,7 @@ public class LoginActivity extends ZkjcBaseActivity<LoginPresenter> implements L
         edit.putString("sspcs", entity.getSspcs());
         edit.putString("zh", etZh.getText().toString().trim());
         edit.putString("mm", MD5.md5(etMm.getText().toString().trim()));
+        edit.putString("appId", getIntent().getStringExtra("appId"));
         edit.putInt("app_version_code", ApkUtils.getVersionCode(LoginActivity.this));
         String ancestors = entity.getAncestors();
         if (!TextUtils.isEmpty(ancestors) && ancestors.contains("220200000000")) {
@@ -345,7 +379,7 @@ public class LoginActivity extends ZkjcBaseActivity<LoginPresenter> implements L
         }
         //  edit.putLong("loginTime", System.currentTimeMillis() / 1000);
 
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         edit.commit();
         sys.edit().putBoolean("isFirst", false).commit();
         if (isRhzf) {
@@ -358,7 +392,7 @@ public class LoginActivity extends ZkjcBaseActivity<LoginPresenter> implements L
 
     @Override
     public void onError(Throwable mThrowable) {
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
     }
 
     @Override

+ 9 - 10
rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/RhzfActivity.java

@@ -44,7 +44,6 @@ import com.amap.api.maps.MapsInitializer;
 import com.google.android.material.bottomsheet.BottomSheetDialog;
 import com.google.gson.Gson;
 import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
 import com.jess.arms.base.DefaultAdapter;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
@@ -76,7 +75,7 @@ import com.zkjc.common.utils.IdCardUtil;
 import com.zkjc.common.utils.MyKeyBoardView;
 import com.zkjc.common.utils.RegexUtils;
 import com.zkjc.common.utils.ScreenUtils;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 import com.zkjc.common.view.CommonTitleBarV3;
 
 
@@ -1092,7 +1091,7 @@ public class RhzfActivity extends ZkjcBaseActivity<RhzfPresenter> implements Rhz
                     map.put("ldphxlh", ldphxlh);
                     mPresenter.getRoomData(map);
 
-                    Utils.getInstances().showDialog(RhzfActivity.this, "正在获取数据");
+                    ThirdUtils.getInstances().showDialog(RhzfActivity.this, "正在获取数据");
                 }
             } else {
                 ToastUtils.show("您本地有未上传服务器数据,请确认信息后提交");
@@ -1192,7 +1191,7 @@ public class RhzfActivity extends ZkjcBaseActivity<RhzfPresenter> implements Rhz
             if (mFzInfo.getType() == 1) {
                 tvZz.performClick();
                 etZzDwm.setText(mFzInfo.getFzXm());
-                if (TextUtils.isEmpty(mFzInfo.getId())) {
+                if (TextUtils.isEmpty(mFzInfo.getId()) || ApkUtils.isSqjw(this)) {
                     etZzLxdh.setText(mFzInfo.getFzDh());
                 }
                 etZzXydm.setText(mFzInfo.getFzSfzh());
@@ -1208,7 +1207,7 @@ public class RhzfActivity extends ZkjcBaseActivity<RhzfPresenter> implements Rhz
                         }
                     }
                 }
-                if (TextUtils.isEmpty(mFzInfo.getId())) {
+                if (TextUtils.isEmpty(mFzInfo.getId()) || ApkUtils.isSqjw(this)) {
                     if (TextUtils.isEmpty(mFzInfo.getZjzl())) {
                         etSfzh.setText(mFzInfo.getFzSfzh());
                     } else {
@@ -1573,7 +1572,7 @@ public class RhzfActivity extends ZkjcBaseActivity<RhzfPresenter> implements Rhz
             if (jxcsList != null && !jxcsList.isEmpty()) {
                 map.put("jxcsList", jxcsList);
             }
-            Utils.getInstances().showDialog(RhzfActivity.this, "正在上传数据");
+            ThirdUtils.getInstances().showDialog(RhzfActivity.this, "正在上传数据");
             mPresenter.commitRhxx(map);
         }
     }
@@ -1860,7 +1859,7 @@ public class RhzfActivity extends ZkjcBaseActivity<RhzfPresenter> implements Rhz
 
     @Override
     protected void onDestroy() {
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         if (mlocationClient != null) {
 
             mlocationClient.stopLocation();
@@ -1942,7 +1941,7 @@ public class RhzfActivity extends ZkjcBaseActivity<RhzfPresenter> implements Rhz
     public void onCommitSuccess(RhzfEntity.Room result) {
         mCommitSuccess = true;
         mSp.edit().remove(mRoom.getDzbm()).commit();
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         Intent intent = new Intent();
         int count = listJzry.size() - listDelete.size();
         intent.putExtra("count", count);
@@ -1955,7 +1954,7 @@ public class RhzfActivity extends ZkjcBaseActivity<RhzfPresenter> implements Rhz
 
     @Override
     public void onDataSuccess(RhzfEntity.Room result) {
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         mNetData = result;
         setData(result);
     }
@@ -1964,7 +1963,7 @@ public class RhzfActivity extends ZkjcBaseActivity<RhzfPresenter> implements Rhz
     public void onSecondCommitSuccess(RhzfEntity.Room data) {
         mCommitSuccess = true;
         mSp.edit().remove(mRoom.getDzbm()).commit();
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         Intent intent = new Intent();
         setResult(RESULT_OK, intent);
         finish();

+ 6 - 7
rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/RhzfAddRoomActivity.java

@@ -14,7 +14,6 @@ import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 
 import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
 
@@ -26,7 +25,7 @@ import com.xwkj.rhzf.mvp.presenter.RhzfAddRoomPresenter;
 import com.xwkj.rhzf.R;
 import com.xwkj.rhzf.mvp.ui.adapter.StringAdapter;
 import com.zkjc.common.base.ZkjcBaseActivity;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 import com.zkjc.common.view.CommonTitleBarV3;
 
 
@@ -313,7 +312,7 @@ public class RhzfAddRoomActivity extends ZkjcBaseActivity<RhzfAddRoomPresenter>
                     map.put("lcnpmhSuffix", mPsType);
                 }
 
-                Utils.getInstances().showDialog(RhzfAddRoomActivity.this, "正在加载数据");
+                ThirdUtils.getInstances().showDialog(RhzfAddRoomActivity.this, "正在加载数据");
                 if (mRoom == null) {
                     mPresenter.commit(map);
                 } else {
@@ -329,21 +328,21 @@ public class RhzfAddRoomActivity extends ZkjcBaseActivity<RhzfAddRoomPresenter>
     @Override
     public void onCommitSuccess(String result) {
         setResult(RESULT_OK);
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         finish();
     }
 
     @Override
     public void onModifySuccess(String result) {
         setResult(RESULT_OK);
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         finish();
     }
 
     @Override
     public void onDeleteSuccess(String result) {
         setResult(RESULT_OK);
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         finish();
     }
 
@@ -359,6 +358,6 @@ public class RhzfAddRoomActivity extends ZkjcBaseActivity<RhzfAddRoomPresenter>
 
     @Override
     public void onCommitFailed() {
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
     }
 }

+ 4 - 5
rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/RhzfLdActivity.java

@@ -14,7 +14,6 @@ import androidx.recyclerview.widget.RecyclerView;
 
 import com.google.android.material.tabs.TabLayout;
 import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
 
@@ -27,7 +26,7 @@ import com.xwkj.rhzf.mvp.presenter.RhzfLdPresenter;
 import com.xwkj.rhzf.R;
 import com.xwkj.rhzf.mvp.ui.adapter.RhzfUnitAdapter;
 import com.zkjc.common.base.ZkjcBaseActivity;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 import com.zkjc.common.view.CommonTitleBarV3;
 
 
@@ -155,7 +154,7 @@ public class RhzfLdActivity extends ZkjcBaseActivity<RhzfLdPresenter> implements
             map.put("dzjd", mInfo.getDzjd() + "");
             map.put("dzwd", mInfo.getDzwd() + "");
             map.put("ldphxlh", mInfo.getLdphxlh());
-            Utils.getInstances().showDialog(RhzfLdActivity.this, "正在加载数据");
+            ThirdUtils.getInstances().showDialog(RhzfLdActivity.this, "正在加载数据");
             mPresenter.getDetailData(map);
         }
     }
@@ -250,12 +249,12 @@ public class RhzfLdActivity extends ZkjcBaseActivity<RhzfLdPresenter> implements
     @Override
     protected void onDestroy() {
         super.onDestroy();
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
     }
 
     @Override
     public void onDetailDataSuccess(List<RhzfEntity.Unit> result) {
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         mUnits = result;
         mInfo.setUnit(result);
         tabLayout.removeAllTabs();

+ 3 - 4
rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/RhzfMainNewActivity.java

@@ -17,7 +17,6 @@ import androidx.recyclerview.widget.LinearLayoutManager;
 import androidx.recyclerview.widget.RecyclerView;
 
 import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
 
@@ -29,7 +28,7 @@ import com.xwkj.rhzf.mvp.presenter.RhzfMainNewPresenter;
 import com.xwkj.rhzf.R;
 import com.xwkj.rhzf.mvp.ui.adapter.RhzfMainNewAdapter;
 import com.zkjc.common.base.ZkjcBaseActivity;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 import com.zkjc.common.view.CommonTitleBarV3;
 
 
@@ -121,7 +120,7 @@ public class RhzfMainNewActivity extends ZkjcBaseActivity<RhzfMainNewPresenter>
         map.put("size", 10 + "");
         mPresenter.getData(map);
 
-        Utils.getInstances().showDialog(RhzfMainNewActivity.this, "正在加载数据");
+        ThirdUtils.getInstances().showDialog(RhzfMainNewActivity.this, "正在加载数据");
     }
 
 
@@ -237,7 +236,7 @@ public class RhzfMainNewActivity extends ZkjcBaseActivity<RhzfMainNewPresenter>
     @Override
     protected void onDestroy() {
         super.onDestroy();
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
     }
 
     @Override

+ 5 - 6
rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/RhzfRyListActivity.java

@@ -16,7 +16,6 @@ import com.google.android.material.bottomsheet.BottomSheetDialog;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
 import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
 
@@ -34,7 +33,7 @@ import com.xwkj.rhzf.mvp.ui.adapter.RhzfRyAdapter;
 import com.xwkj.rhzf.mvp.ui.fragment.RhzfCzrkDeleteDialog;
 import com.xwkj.rhzf.mvp.ui.fragment.RhzfRyDeleteDialog;
 import com.zkjc.common.base.ZkjcBaseActivity;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 import com.zkjc.common.view.CommonTitleBarV3;
 
 
@@ -136,7 +135,7 @@ public class RhzfRyListActivity extends ZkjcBaseActivity<RhzfRyListPresenter> im
                                 spDialog.setMyDialogListener(new RhzfCzrkDeleteDialog.MyDialogListener() {
                                     @Override
                                     public void onConfirmClick(Fwtd selectZxyy, String bcyy, String bcrq, String xzqh, String desc) {
-                                        Utils.getInstances().showDialog(RhzfRyListActivity.this, "正在删除,请稍等");
+                                        ThirdUtils.getInstances().showDialog(RhzfRyListActivity.this, "正在删除,请稍等");
                                         bean.setIsDeleted(1);
                                         bean.setZxyy(selectZxyy.getValue());
                                         bean.setBcyy(bcyy);
@@ -156,7 +155,7 @@ public class RhzfRyListActivity extends ZkjcBaseActivity<RhzfRyListPresenter> im
                                 spDialog.setMyDialogListener(new RhzfRyDeleteDialog.MyDialogListener() {
                                     @Override
                                     public void onConfirmClick(Fwtd selectZxyy, String xzqh, String desc) {
-                                        Utils.getInstances().showDialog(RhzfRyListActivity.this, "正在删除,请稍等");
+                                        ThirdUtils.getInstances().showDialog(RhzfRyListActivity.this, "正在删除,请稍等");
                                         bean.setIsDeleted(1);
                                         bean.setZxyy(selectZxyy.getValue());
                                         bean.setQwdzssxq(xzqh);
@@ -408,7 +407,7 @@ public class RhzfRyListActivity extends ZkjcBaseActivity<RhzfRyListPresenter> im
 
     @Override
     public void onDeleteSuccess(boolean result, int position) {
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         if (result) {
             if (mList != null && mAdapter != null) {
                 mList.remove(position);
@@ -424,7 +423,7 @@ public class RhzfRyListActivity extends ZkjcBaseActivity<RhzfRyListPresenter> im
 
     @Override
     public void finish() {
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         if (mList != null) {
             Intent intent = new Intent();
             intent.putExtra("count", mList.size());

+ 2 - 3
rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/TjJfActivity.java

@@ -22,7 +22,6 @@ import androidx.recyclerview.widget.RecyclerView;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
 import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
 import com.jess.arms.base.DefaultAdapter;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
@@ -49,7 +48,7 @@ import com.xwkj.rhzf.mvp.ui.adapter.MdqmAdapter;
 import com.zkjc.common.base.ZkjcBaseActivity;
 import com.zkjc.common.utils.DevicesUtils;
 import com.zkjc.common.utils.UUIDUtils;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 import com.zkjc.common.view.CommonTitleBarV3;
 
 
@@ -515,7 +514,7 @@ public class TjJfActivity extends ZkjcBaseActivity<TjJfPresenter> implements TjJ
                     praseJson(result, 1);
                     break;
                 case 2:
-                    Utils.getInstances().dismissDialog();
+                    ThirdUtils.getInstances().dismissDialog();
                     ToastUtils.show("上传成功");
                     finish();
                     break;

+ 5 - 6
rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/activity/TjjfNewActivity.java

@@ -19,7 +19,6 @@ import androidx.recyclerview.widget.RecyclerView;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
 import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
 
@@ -44,7 +43,7 @@ import com.xwkj.rhzf.mvp.ui.adapter.BaseRecycleAdapter;
 import com.xwkj.rhzf.mvp.ui.adapter.MdRyAdapter;
 import com.zkjc.common.base.ZkjcBaseActivity;
 import com.zkjc.common.utils.DevicesUtils;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 import com.zkjc.common.view.CommonTitleBarV3;
 
 
@@ -356,7 +355,7 @@ public class TjjfNewActivity extends ZkjcBaseActivity<TjjfNewPresenter> implemen
                 return;
             }
         }
-        Utils.getInstances().showDialog(TjjfNewActivity.this, "正在提交数据");
+        ThirdUtils.getInstances().showDialog(TjjfNewActivity.this, "正在提交数据");
         Map<String, Object> map = new HashMap<>();
         map.put("jfId", jf_id);
         if (tjzt.equals("已流转")) {
@@ -389,7 +388,7 @@ public class TjjfNewActivity extends ZkjcBaseActivity<TjjfNewPresenter> implemen
                 ArrayList<ImageItem> images = (ArrayList<ImageItem>) data.getSerializableExtra(ImagePicker.EXTRA_RESULT_ITEMS);
                 if (images != null && !images.isEmpty()) {
                     ImageItem item = images.get(0);
-                    Utils.getInstances().showDialog(TjjfNewActivity.this,"正在上传请勿退出");
+                    ThirdUtils.getInstances().showDialog(TjjfNewActivity.this,"正在上传请勿退出");
                     UploadUtil.getInstance().init(TjjfNewActivity.this).getRequest(item.path, new CommonInterFace() {
                         @Override
                         public void onSuccess(String result) {
@@ -402,7 +401,7 @@ public class TjjfNewActivity extends ZkjcBaseActivity<TjjfNewPresenter> implemen
                                 String ryid = mdRyBean.getRyid();
                                 ryzpMap.put(ryid, url);
                                 mAdapter.notifyItemChanged(requestCode);
-                                Utils.getInstances().dismissDialog();
+                                ThirdUtils.getInstances().dismissDialog();
                             }
                         }
 
@@ -423,7 +422,7 @@ public class TjjfNewActivity extends ZkjcBaseActivity<TjjfNewPresenter> implemen
 
     @Override
     public void onSuccess(String result) {
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         ToastUtils.show("上传成功");
         setResult(RESULT_OK);
         finish();

+ 1 - 1
rhzf/src/main/java/com/xwkj/rhzf/mvp/ui/holder/PersonHolder.java

@@ -38,7 +38,7 @@ public class PersonHolder extends BaseHolder<PersonEntity> {
         xm.setText(data.getXm());
         // xb.setText(data.getXb());
         sfzh.setText(StringUtil.replaceId(data.getSfzh()));
-        lxdh.setText(StringUtil.replaceString(data.getLxdh()));
+        lxdh.setText(StringUtil.replaceString(data.getLxdh(), lxdh.getContext()));
         rylb.setText(data.getLb());
         String zp = data.getRyzp();
         if (!TextUtils.isEmpty(zp)) {

+ 4 - 0
rhzf/src/main/res/layout/activity_login.xml

@@ -8,9 +8,12 @@
     android:clipChildren="false"
     android:orientation="vertical">
 
+
+
     <RelativeLayout
         android:layout_width="match_parent"
         android:layout_height="0dp"
+        android:visibility="gone"
         android:layout_weight="1"
         android:background="@drawable/lgon_bg">
 
@@ -37,6 +40,7 @@
     <RelativeLayout
         android:layout_width="match_parent"
         android:layout_height="0dp"
+        android:visibility="gone"
         android:layout_marginTop="-28dp"
         android:layout_weight="2"
         android:background="@drawable/shape_login">

+ 4 - 4
rwsp/build.gradle

@@ -60,17 +60,17 @@ android {
     }
     productFlavors {
         //应用商店版本
-        appstore {
+        sqjw {
             resValue "string", "app_name", "任务审批"
             signingConfig signingConfigs.release
-            manifestPlaceholders = [UMENG_CHANNEL: "appstore", CATEGORY: "android.intent.category.DEFAULT", APP_ICON: "@mipmap/ic_launcher"]
+            manifestPlaceholders = [UMENG_CHANNEL: "sqjw", CATEGORY: "android.intent.category.DEFAULT", APP_ICON: "@mipmap/ic_launcher"]
         }
         //非应用商店版本
-        unappstore {
+        jdrh {
 
             resValue "string", "app_name", "任务审批"
             signingConfig signingConfigs.release
-            manifestPlaceholders = [UMENG_CHANNEL: "unappstore", CATEGORY: "android.intent.category.LAUNCHER", APP_ICON: "@mipmap/ic_launcher"]
+            manifestPlaceholders = [UMENG_CHANNEL: "jdrh", CATEGORY: "android.intent.category.LAUNCHER", APP_ICON: "@mipmap/ic_launcher"]
         }
 
 

+ 4 - 0
rwsp/src/main/AndroidManifest.xml

@@ -51,6 +51,10 @@
         <meta-data
             android:name="com.xwkj.rwsp.app.GlobalConfiguration"
             android:value="ConfigModule" />
+
+        <meta-data
+            android:name="UMENG_CHANNEL"
+            android:value="${UMENG_CHANNEL_VALUE}" />
     </application>
 
 </manifest>

+ 3 - 4
rwsp/src/main/java/com/xwkj/rwsp/mvp/presenter/FjGlySpMdXqPresenter.java

@@ -16,9 +16,8 @@ import javax.inject.Inject;
 import com.xwkj.rwsp.app.utils.CommonInterFace;
 import com.xwkj.rwsp.app.utils.ReqToBus;
 import com.xwkj.rwsp.mvp.contract.FjGlySpMdXqContract;
-import com.xwkj.rwsp.mvp.model.entity.FjGlySpEntity;
 import com.xwkj.rwsp.mvp.model.entity.NormalEntity;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -75,7 +74,7 @@ public class FjGlySpMdXqPresenter extends BasePresenter<FjGlySpMdXqContract.Mode
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("网络异常!");
             }
 
@@ -108,7 +107,7 @@ public class FjGlySpMdXqPresenter extends BasePresenter<FjGlySpMdXqContract.Mode
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("网络异常!");
             }
 

+ 2 - 2
rwsp/src/main/java/com/xwkj/rwsp/mvp/presenter/FjGlyWspMdPresenter.java

@@ -17,7 +17,7 @@ import com.xwkj.rwsp.app.utils.CommonInterFace;
 import com.xwkj.rwsp.app.utils.ReqToBus;
 import com.xwkj.rwsp.mvp.contract.FjGlyWspMdContract;
 import com.xwkj.rwsp.mvp.model.entity.FjGlySpEntity;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -80,7 +80,7 @@ public class FjGlyWspMdPresenter extends BasePresenter<FjGlyWspMdContract.Model,
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("网络异常!");
             }
 

+ 4 - 4
rwsp/src/main/java/com/xwkj/rwsp/mvp/presenter/FjGlyWspPresenter.java

@@ -18,7 +18,7 @@ import com.xwkj.rwsp.app.utils.ReqToBus;
 import com.xwkj.rwsp.mvp.contract.FjGlyWspContract;
 import com.xwkj.rwsp.mvp.model.entity.FjGlySpEntity;
 import com.xwkj.rwsp.mvp.model.entity.NormalEntity;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -81,7 +81,7 @@ public class FjGlyWspPresenter extends BasePresenter<FjGlyWspContract.Model, FjG
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("网络异常!");
             }
 
@@ -113,7 +113,7 @@ public class FjGlyWspPresenter extends BasePresenter<FjGlyWspContract.Model, FjG
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("网络异常!");
             }
 
@@ -145,7 +145,7 @@ public class FjGlyWspPresenter extends BasePresenter<FjGlyWspContract.Model, FjG
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("网络异常!");
             }
 

+ 2 - 3
rwsp/src/main/java/com/xwkj/rwsp/mvp/ui/activity/FjGlySpMdXqActivity.java

@@ -20,7 +20,6 @@ import androidx.recyclerview.widget.RecyclerView;
 
 import com.google.gson.Gson;
 import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
 
@@ -34,7 +33,7 @@ import com.xwkj.rwsp.R;
 import com.xwkj.rwsp.mvp.ui.adapter.MdRySpAdapter;
 import com.zkjc.common.base.ZkjcBaseActivity;
 import com.zkjc.common.utils.FlowRadioGroup;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 import com.zkjc.common.view.CommonTitleBarV3;
 
 
@@ -162,7 +161,7 @@ public class FjGlySpMdXqActivity extends ZkjcBaseActivity<FjGlySpMdXqPresenter>
                 ToastUtils.show("请填写驳回原因");
                 return;
             }
-            Utils.getInstances().showDialog(FjGlySpMdXqActivity.this, "正在提交,请稍等");
+            ThirdUtils.getInstances().showDialog(FjGlySpMdXqActivity.this, "正在提交,请稍等");
             Map<String, String> submitMap = new HashMap<>();
             submitMap.put("id", fjGlySp.getId());
             submitMap.put("ywlb", fjGlySp.getYwlb() + "");

+ 2 - 4
rwsp/src/main/java/com/xwkj/rwsp/mvp/ui/activity/MainActivity.java

@@ -23,7 +23,6 @@ import com.google.gson.Gson;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
 import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
 
@@ -38,8 +37,7 @@ import com.xwkj.rwsp.R;
 import com.xwkj.rwsp.mvp.ui.fragment.FjGlyWspFragment;
 import com.xwkj.rwsp.mvp.ui.fragment.FjGlyWspMdFragment;
 import com.zkjc.common.base.ZkjcBaseActivity;
-import com.zkjc.common.utils.ApkUtils;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 import com.zkjc.common.view.CommonTitleBarV3;
 
 
@@ -293,7 +291,7 @@ public class MainActivity extends ZkjcBaseActivity<MainPresenter> implements Mai
     @Override
     public void onSuccess(String result) {
 
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         System.out.println("****" + result);
         try {
             System.out.println("用户信息" + result);

+ 8 - 8
rwsp/src/main/java/com/xwkj/rwsp/mvp/ui/fragment/FjGlyWspFragment.java

@@ -38,7 +38,7 @@ import com.xwkj.rwsp.mvp.presenter.FjGlyWspPresenter;
 import com.xwkj.rwsp.R;
 import com.xwkj.rwsp.mvp.ui.adapter.BaseRecycleAdapter;
 import com.xwkj.rwsp.mvp.ui.adapter.FjGlySpAdapter;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -127,7 +127,7 @@ public class FjGlyWspFragment extends BaseFragment<FjGlyWspPresenter> implements
                         spDialog.setMyDialogListener(new SpDialog.MyDialogListener() {
                             @Override
                             public void onConfirmClick(String desc) {
-                                Utils.getInstances().showDialog(getActivity(), "正在提交,请稍等");
+                                ThirdUtils.getInstances().showDialog(getActivity(), "正在提交,请稍等");
                                 Map<String, String> map = new HashMap<>();
                                 map.put("id", fjGlySp.getId());
                                 map.put("ywlb", fjGlySp.getYwlb() + "");
@@ -148,14 +148,14 @@ public class FjGlyWspFragment extends BaseFragment<FjGlyWspPresenter> implements
                         FjGlySpEntity.DataBean.FjGlySp fjGlySp = datas.get(position);
 
                         if ("0".equals(fjGlySp.getYyzt()) && "2".equals(fjGlySp.getParams())) {
-                            Utils.getInstances().showDialog(getActivity(), "正在请求数据,请稍等");
+                            ThirdUtils.getInstances().showDialog(getActivity(), "正在请求数据,请稍等");
                             Map<String, String> map = new HashMap<>();
                             map.put("current", pageNo + "");
                             map.put("size", pageSize + "");
                             map.put("csId", fjGlySp.getCsId());
                             mPresenter.getJlList(map, fjGlySp, position);
                         } else {
-                            Utils.getInstances().showDialog(getActivity(), "正在提交,请稍等");
+                            ThirdUtils.getInstances().showDialog(getActivity(), "正在提交,请稍等");
                             Map<String, String> map = new HashMap<>();
                             map.put("id", fjGlySp.getId());
                             map.put("ywlb", fjGlySp.getYwlb() + "");
@@ -237,14 +237,14 @@ public class FjGlyWspFragment extends BaseFragment<FjGlyWspPresenter> implements
 
     @Override
     public void onSpSuccess(String result, int position) {
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         datas.remove(position);
         mAdapter.notifyDataSetChanged();
     }
 
     @Override
     public void onGetJlSuccess(String result, FjGlySpEntity.DataBean.FjGlySp fjGlySp, int position) {
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         JcjlEntity kqBean = new Gson().fromJson(result, JcjlEntity.class);
         ArrayList<JcjlEntity.DataBean.RecordsBean> records = (ArrayList<JcjlEntity.DataBean.RecordsBean>) kqBean.getData().getRecords();
         if (records.size() > 0 && records != null) {
@@ -253,7 +253,7 @@ public class FjGlyWspFragment extends BaseFragment<FjGlyWspPresenter> implements
                 @Override
                 public void onConfirmClick() {
 
-                    Utils.getInstances().showDialog(getActivity(), "正在提交,请稍等");
+                    ThirdUtils.getInstances().showDialog(getActivity(), "正在提交,请稍等");
                     Map<String, String> map = new HashMap<>();
                     map.put("id", fjGlySp.getId());
                     map.put("ywlb", fjGlySp.getYwlb() + "");
@@ -268,7 +268,7 @@ public class FjGlyWspFragment extends BaseFragment<FjGlyWspPresenter> implements
             dialog.show(getChildFragmentManager(), "dialog");
             dialog.setCancelable(true);
         } else {
-            Utils.getInstances().showDialog(getActivity(), "正在提交,请稍等");
+            ThirdUtils.getInstances().showDialog(getActivity(), "正在提交,请稍等");
             Map<String, String> map = new HashMap<>();
             map.put("id", fjGlySp.getId());
             map.put("ywlb", fjGlySp.getYwlb() + "");

+ 4 - 4
rwxffk/build.gradle

@@ -59,17 +59,17 @@ android {
     }
     productFlavors {
         //应用商店版本
-        appstore {
+        sqjw {
             resValue "string", "app_name", "任务下发反馈"
             signingConfig signingConfigs.release
-            manifestPlaceholders = [UMENG_CHANNEL: "appstore", CATEGORY: "android.intent.category.DEFAULT", APP_ICON: "@mipmap/ic_launcher"]
+            manifestPlaceholders = [UMENG_CHANNEL: "sqjw", CATEGORY: "android.intent.category.DEFAULT", APP_ICON: "@mipmap/ic_launcher"]
         }
         //非应用商店版本
-        unappstore {
+        jdrh {
 
             resValue "string", "app_name", "任务下发反馈"
             signingConfig signingConfigs.release
-            manifestPlaceholders = [UMENG_CHANNEL: "unappstore", CATEGORY: "android.intent.category.LAUNCHER", APP_ICON: "@mipmap/ic_launcher"]
+            manifestPlaceholders = [UMENG_CHANNEL: "jdrh", CATEGORY: "android.intent.category.LAUNCHER", APP_ICON: "@mipmap/ic_launcher"]
         }
 
 

+ 3 - 0
rwxffk/src/main/AndroidManifest.xml

@@ -48,6 +48,9 @@
         <meta-data
             android:name="com.xwkj.rwxffk.app.GlobalConfiguration"
             android:value="ConfigModule" />
+        <meta-data
+            android:name="UMENG_CHANNEL"
+            android:value="${UMENG_CHANNEL_VALUE}" />
     </application>
 
 </manifest>

+ 1 - 1
rwxffk/src/main/java/com/xwkj/rwxffk/app/utils/ReqToBus.java

@@ -75,7 +75,7 @@ public class ReqToBus {
         String token = sp.getString("token", " ");
         reqValue.put("token", "bearer " + token);
         reqValue.put("version_code", ApkUtils.getVersionCode(context));
-        reqValue.put("appId", "1846809831194980354");
+        reqValue.put("appId", "1849646329015513090");
         if (!reqValue.containsKey("username")) {
 //        param.put("username", "admin");
 //        param.put("password", "937b0ec364aff24c011307493f5155b4");

+ 4 - 5
rwxffk/src/main/java/com/xwkj/rwxffk/mvp/ui/activity/MainActivity.java

@@ -18,7 +18,6 @@ import com.google.gson.Gson;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
 import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
 
@@ -33,7 +32,7 @@ import com.xwkj.rwxffk.R;
 import com.xwkj.rwxffk.mvp.ui.fragment.WqsRwFragment;
 import com.xwkj.rwxffk.mvp.ui.fragment.YqsRwFragment;
 import com.zkjc.common.base.ZkjcBaseActivity;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 import com.zkjc.common.view.CommonTitleBar;
 
 
@@ -128,7 +127,7 @@ public class MainActivity extends ZkjcBaseActivity<MainPresenter> implements Mai
     @Override
     public void onSuccess(String result) {
 
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         System.out.println("****" + result);
         try {
             System.out.println("用户信息" + result);
@@ -144,7 +143,7 @@ public class MainActivity extends ZkjcBaseActivity<MainPresenter> implements Mai
                     return;
                 }*/
 
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 saveLoginInfo(entity);
 
 
@@ -193,7 +192,7 @@ public class MainActivity extends ZkjcBaseActivity<MainPresenter> implements Mai
         }
         //  edit.putLong("loginTime", System.currentTimeMillis() / 1000);
 
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         edit.commit();
         sharedPreferences.edit().putBoolean("isFirst", false).commit();
 

+ 12 - 0
rwxffk/src/main/java/com/xwkj/rwxffk/mvp/ui/fragment/YqsRwFragment.java

@@ -1,5 +1,6 @@
 package com.xwkj.rwxffk.mvp.ui.fragment;
 
+import android.content.ComponentName;
 import android.content.Intent;
 import android.os.Bundle;
 import android.os.Message;
@@ -108,6 +109,17 @@ public class YqsRwFragment extends BaseFragment<YqsRwPresenter> implements YqsRw
                 /*Intent intent = new Intent(getActivity(), AddJfActivity.class);
                 intent.putExtra("rwxf", datas.get(position));
                 startActivity(intent);*/
+
+                // 跳转时是否要登录
+                ComponentName componetName = new ComponentName("com.xwkj.rhzf","com.xwkj.rhzf.mvp.ui.activity.AddJfActivity");
+                try {
+                    Intent intent = new Intent();
+                    intent.setComponent(componetName);
+                    intent.putExtra("json_data", new Gson().toJson(datas.get(position)));
+                    startActivity(intent);
+                } catch (Exception e) {
+                    ToastUtils.show("未找到应用");
+                }
             }
 
             @Override

TEMPAT SAMPAH
sqjw/libs/uniMPSDK-V2-release.aar


TEMPAT SAMPAH
sqjw/libs/uniapp-v8-release.aar


+ 5 - 3
sqjw/src/main/AndroidManifest.xml

@@ -41,8 +41,8 @@
         android:supportsRtl="true"
         android:theme="@style/AppTheme">
         <activity android:name=".mvp.ui.activity.JdrhLoginActivity" />
-        <activity android:name=".mvp.ui.activity.SqjwLoginActivity" />
-        <activity android:name=".mvp.ui.activity.MainActivity">
+        <activity android:name=".mvp.ui.activity.MainActivity" />
+        <activity android:name=".mvp.ui.activity.SqjwLoginActivity">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 
@@ -78,7 +78,9 @@
                 android:name="android.support.FILE_PROVIDER_PATHS"
                 android:resource="@xml/file_paths" />
         </provider>
-
+        <meta-data
+            android:name="UMENG_CHANNEL"
+            android:value="${UMENG_CHANNEL_VALUE}" />
     </application>
 
 </manifest>

+ 1 - 1
sqjw/src/main/assets/data/dcloud_control.xml

@@ -1,4 +1,4 @@
-<hbuilder version="1.9.9.80110" debug="false" syncDebug ="false">
+<hbuilder version="1.9.9.80110" debug="true" syncDebug ="true">
     <apps>
         <app appid="unimp" appver="1.0"/>
     </apps>

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

@@ -59,11 +59,11 @@ public class AppLifecyclesImpl implements AppLifecycles {
         sheetItems.add(item2);
         Log.i("unimp", "onCreate----");
         DCSDKInitConfig config = new DCSDKInitConfig.Builder()
-                .setCapsule(false)
+                .setCapsule(true)
                 .setMenuDefFontSize("16px")
                 .setMenuDefFontColor("#ff00ff")
                 .setMenuDefFontWeight("normal")
-                .setMenuActionSheetItems(sheetItems)
+//                .setMenuActionSheetItems(sheetItems)
                 .setEnableBackground(true)//开启后台运行
                 .setUniMPFromRecents(false)
                 .build();

+ 7 - 0
sqjw/src/main/java/com/xwkj/sqjw/app/GlobalHttpHandlerImpl.java

@@ -1,6 +1,8 @@
 package com.xwkj.sqjw.app;
 
 import android.content.Context;
+import android.content.SharedPreferences;
+import android.text.TextUtils;
 
 import com.jess.arms.http.GlobalHttpHandler;
 
@@ -63,8 +65,13 @@ public class GlobalHttpHandlerImpl implements GlobalHttpHandler {
         return chain.request().newBuilder().header("token", tokenId)
                               .build(); */
 
+        SharedPreferences sharedPreferences = context.getSharedPreferences("sys", Context.MODE_PRIVATE);
+        String token = sharedPreferences.getString("token", "");
         Request.Builder builder = chain.request().newBuilder();
         builder.header("Authorization", "Basic c2FiZXI6c2FiZXJfc2VjcmV0");
+        if (!TextUtils.isEmpty(token)) {
+            builder.header("Blade-Auth", "bearer " + token);
+        }
         return builder.build();
     }
 }

+ 4 - 3
sqjw/src/main/java/com/xwkj/sqjw/app/db/DBHelper.java

@@ -12,8 +12,9 @@ public class DBHelper extends SQLiteOpenHelper {
     public static final String DATA_TABLE_NAME = "data";
 
     public static final String DATA_ID = "_id";
-    public static final String DATA_USER_NAME = "user_name";
-    public static final String DATA_USER_ID = "user_id";
+    public static final String DATA_JSON = "json";
+    public static final String DATA_USER_NAME = "name";
+    public static final String DATA_PASSWORD = "password";
     private static final int DATABASE_VERSION = 1;
     //数据库版本号
 
@@ -25,7 +26,7 @@ public class DBHelper extends SQLiteOpenHelper {
     public void onCreate(SQLiteDatabase db) {
 
         db.execSQL("CREATE TABLE IF NOT EXISTS " + DATA_TABLE_NAME + "(" + DATA_ID +" INTEGER PRIMARY KEY AUTOINCREMENT,"
-                + " " + DATA_USER_ID + " TEXT, " + DATA_USER_NAME + " TEXT)");
+                + " " + DATA_JSON + " TEXT, " + DATA_USER_NAME + " TEXT, " + DATA_PASSWORD + " TEXT)");
     }
 
     @Override

+ 35 - 8
sqjw/src/main/java/com/xwkj/sqjw/app/provider/DataProvider.java

@@ -4,6 +4,7 @@ import android.annotation.SuppressLint;
 import android.content.ContentProvider;
 import android.content.ContentValues;
 import android.content.Context;
+import android.content.SharedPreferences;
 import android.content.UriMatcher;
 import android.database.Cursor;
 import android.database.sqlite.SQLiteDatabase;
@@ -15,7 +16,12 @@ import android.util.Log;
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
 import com.xwkj.sqjw.app.db.DBHelper;
+import com.xwkj.sqjw.mvp.model.entity.AppEntity;
+
+import java.util.List;
 
 public class DataProvider extends ContentProvider {
     private Context mContext;
@@ -119,8 +125,9 @@ public class DataProvider extends ContentProvider {
      */
     @Override
     public int delete(Uri uri, String selection, String[] selectionArgs) {
-        // 由于不展示,此处不作展开
-        return 0;
+        int number = db.delete(getTableName(uri), selection, selectionArgs);
+        getContext().getContentResolver().notifyChange(uri, null);
+        return number;
     }
 
     @Override
@@ -160,16 +167,36 @@ public class DataProvider extends ContentProvider {
                         callback.sendResult(new Bundle("you want send info"));
                     }
                 };
-            }
+            }        pararms.putString("id", "1");
+        pararms.putString("name", "name");
+        pararms.putString("packageName", "com.xwkj.test");
         }
         query(DBHelper.DATA_TABLE_NAME, new String[]{"_id", "name"}, null, null, null, null, null, null);*/
-        Cursor cursor = db.query(DBHelper.DATA_TABLE_NAME, new String[]{DBHelper.DATA_ID, DBHelper.DATA_USER_ID, DBHelper.DATA_USER_NAME}, null, null, null, null, null, null);
+        Log.e("eee", "id ======== " + extras.getString("appId"));
+        Log.e("eee", "name ======== " + extras.getString("name"));
+        Log.e("eee", "packageName ======== " + extras.getString("packageName"));
+        Log.e("eee", "isSelf ======== " + extras.getBoolean("isSelf"));
+        SharedPreferences sys = getContext().getSharedPreferences("sys", Context.MODE_PRIVATE);
+        String appList = sys.getString("appList", "");
+        List<AppEntity.App> list = new Gson().fromJson(appList, new TypeToken<List<AppEntity.App>>(){}.getType());
+        boolean verify = false;
+        for (int i = 0; i < list.size(); i++) {
+            if (list.get(i).getId().equals(extras.getString("appId"))) {
+                verify = true;
+                break;
+            }
+        }
+        if (!verify) {
+            return new Bundle();
+        }
+        Cursor cursor = db.query(DBHelper.DATA_TABLE_NAME, new String[]{DBHelper.DATA_ID, DBHelper.DATA_JSON, DBHelper.DATA_USER_NAME, DBHelper.DATA_PASSWORD}, null, null, null, null, null, null);
         Bundle bundle = new Bundle();
         while (cursor.moveToNext()) {
-            Log.e("eee","call:" + cursor.getInt(0) + " " + cursor.getString(1));
-            bundle.putInt("0", cursor.getInt(0));
-            bundle.putString("1", cursor.getString(1));
-            bundle.putString("2", cursor.getString(2));
+            bundle.putString("json", cursor.getString(1));
+            if (extras.getBoolean("isSelf")) {
+                bundle.putString("xwkjUserName", cursor.getString(2));
+                bundle.putString("xwkjPassword", cursor.getString(3));
+            }
         }
         cursor.close();
         return bundle;

+ 6 - 0
sqjw/src/main/java/com/xwkj/sqjw/mvp/contract/JdrhLoginContract.java

@@ -2,6 +2,7 @@ package com.xwkj.sqjw.mvp.contract;
 
 import com.jess.arms.mvp.IView;
 import com.jess.arms.mvp.IModel;
+import com.xwkj.sqjw.mvp.model.entity.Login;
 
 
 /**
@@ -20,6 +21,11 @@ public interface JdrhLoginContract {
     //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
     interface View extends IView {
 
+        void onSuccess(String result);
+
+        void onError(Throwable throwable);
+
+        void onBindMjSuccess(Login login);
     }
 
     //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存

+ 2 - 1
sqjw/src/main/java/com/xwkj/sqjw/mvp/model/api/Api.java

@@ -10,5 +10,6 @@ package com.xwkj.sqjw.mvp.model.api;
  * ================================================
  */
 public interface Api {
-    String APP_DOMAIN = "http://192.168.0.12:1234";
+    String APP_DOMAIN = "http://192.168.0.12:1234"; // 300586
+//    String APP_DOMAIN = "http://192.168.20.228:7022/yysd/";
 }

+ 18 - 7
sqjw/src/main/java/com/xwkj/sqjw/mvp/model/api/ReqToBus.java

@@ -54,7 +54,7 @@ public class ReqToBus {
         return this;
     }
 
-    public void getRequestV2(Object reqValue, CommonInterFace interFace) {
+    public void getRequestV2(Object reqValue, boolean isLogin, CommonInterFace interFace) {
         // String url = "http://192.168.0.63:8090/jlyqfk/request/getData";
         // String dataObjId="220000000000-3-0100-74b66b22b1524937ac713c10489a55fc";
         String dataObjId = "220000000000-3-0100-5262bf9ccd72456e802fe9a0b77097e5";
@@ -66,12 +66,23 @@ public class ReqToBus {
                 "\"resourceId\":\"220000000000-3-0100-5262bf9ccd72456e802fe9a0b77097e5\",\"resourceServiceType\":\"10\"\n" +
                 "}\n" +
                 "]");*/
-        String resourceList = sp.getString("resourceList", "[{\n" +
-                "\"resourceRegionalismCode\":\"120000000000\",\n" +
-                "\"resourceAddress\":\"" + Api.APP_DOMAIN + "/zf/reflect\",\n" +
-                "\"resourceId\":\"220000000000-3-0100-5262bf9ccd72456e802fe9a0b77097e5\",\"resourceServiceType\":\"10\"\n" +
-                "}\n" +
-                "]");
+        String resourceList;
+        if (isLogin) {
+            resourceList = sp.getString("resourceList", "[{\n" +
+                    "\"resourceRegionalismCode\":\"120000000000\",\n" +
+                    "\"resourceAddress\":\"" + Api.APP_DOMAIN + "/zf/request\",\n" +
+                    "\"resourceId\":\"220000000000-3-0100-5262bf9ccd72456e802fe9a0b77097e5\",\"resourceServiceType\":\"10\"\n" +
+                    "}\n" +
+                    "]");
+        } else {
+            resourceList = sp.getString("resourceList", "[{\n" +
+                    "\"resourceRegionalismCode\":\"120000000000\",\n" +
+                    "\"resourceAddress\":\"" + Api.APP_DOMAIN + "/zf/reflect\",\n" +
+                    "\"resourceId\":\"220000000000-3-0100-5262bf9ccd72456e802fe9a0b77097e5\",\"resourceServiceType\":\"10\"\n" +
+                    "}\n" +
+                    "]");
+        }
+
         List<AddressEntity> list = JSONObject.parseArray(resourceList, AddressEntity.class);
         String url = "";
         String resourceRegionalismCode = "";

+ 20 - 0
sqjw/src/main/java/com/xwkj/sqjw/mvp/model/entity/AppEntity.java

@@ -54,6 +54,8 @@ public class AppEntity {
     }
 
     public static class App {
+        public static final int TYPE_APP = 1; // 原生
+        public static final int TYPE_UNI = 2; // UNI APP
         /*
         * {"createDept":"1123598813738675201","createTime":"2024-10-17 15:06:53","createUser":"1123598821738675201",
         "icon":"应用图标地址","id":"1846810096518262786","isDeleted":0,"jkdz":"统一接口地址修改后","link":"应用地址",
@@ -75,6 +77,24 @@ public class AppEntity {
         private int versionCode;
         private String versionDescription;
         private String versionName;
+        private int yyType;
+        private int wlType;
+
+        public int getYyType() {
+            return yyType;
+        }
+
+        public void setYyType(int yyType) {
+            this.yyType = yyType;
+        }
+
+        public int getWlType() {
+            return wlType;
+        }
+
+        public void setWlType(int wlType) {
+            this.wlType = wlType;
+        }
 
         public String getIcon() {
             return icon;

+ 305 - 0
sqjw/src/main/java/com/xwkj/sqjw/mvp/model/entity/Login.java

@@ -0,0 +1,305 @@
+package com.xwkj.sqjw.mvp.model.entity;
+
+public class Login {
+    /**
+     * tenant_id : 000000
+     * user_id : 1598502999054856194
+     * dept_id : 1465202794308374530
+     * post_id : 1123598817738675208
+     * role_id : 1123598816738675202,1123598816738675203
+     * oauth_id :
+     * account : 111146
+     * user_name : 111146
+     * nick_name : 龙腾
+     * role_name : user,hr
+     * avatar :
+     * access_token : eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJpc3N1c2VyIiwiYXVkIjoiYXVkaWVuY2UiLCJ0ZW5hbnRfaWQiOiIwMDAwMDAiLCJ1c2VyX25hbWUiOiIxMTExNDYiLCJ0b2tlbl90eXBlIjoiYWNjZXNzX3Rva2VuIiwicm9sZV9uYW1lIjoidXNlcixociIsInBvbGljZU51bWJlciI6IjExMTE0NiIsInBvc3RfaWQiOiIxMTIzNTk4ODE3NzM4Njc1MjA4IiwidXNlcl9pZCI6IjE1OTg1MDI5OTkwNTQ4NTYxOTQiLCJyb2xlX2lkIjoiMTEyMzU5ODgxNjczODY3NTIwMiwxMTIzNTk4ODE2NzM4Njc1MjAzIiwicGhvbmUiOiIxMzExMjMxMTIzMSIsIm5pY2tfbmFtZSI6Ium-meiFviIsImRldGFpbCI6eyJ0eXBlIjoid2ViIn0sImRlcHRfaWQiOiIxNDY1MjAyNzk0MzA4Mzc0NTMwIiwiYWNjb3VudCI6IjExMTE0NiIsImNsaWVudF9pZCI6InNhYmVyIiwiZXhwIjoxNjcwMjAyMzQwLCJuYmYiOjE2NzAyMDIzMTB9._93vK9m5436tzFaXGcciCKOHEacGv8PNhZ57c9DpOUpGbI-qh8e62ht4T2PBmkEXsAhuEy1b-7u9R3Qicdh9Xw
+     * refresh_token : eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJpc3N1c2VyIiwiYXVkIjoiYXVkaWVuY2UiLCJ1c2VyX2lkIjoiMTU5ODUwMjk5OTA1NDg1NjE5NCIsInJvbGVfaWQiOiIxMTIzNTk4ODE2NzM4Njc1MjAyLDExMjM1OTg4MTY3Mzg2NzUyMDMiLCJ0b2tlbl90eXBlIjoicmVmcmVzaF90b2tlbiIsImRlcHRfaWQiOiIxNDY1MjAyNzk0MzA4Mzc0NTMwIiwiY2xpZW50X2lkIjoic2FiZXIiLCJleHAiOjE2NzA4MDcxMTAsIm5iZiI6MTY3MDIwMjMxMH0.KOY_zzX-QPt8BqDlLrFTZ1bK7WCmNzWey-f62BrCJ-_To7wo4LIfkogtjOkgIorEFFOXP7i-mbpzHFWbfnIfqQ
+     * token_type : bearer
+     * expires_in : 30
+     * detail : {"type":"web"}
+     * license : powered by bladex
+     * phone : 13112311231
+     * policeNumber : 111146
+     */
+
+    private String tenant_id;
+    private String user_id;
+    private String dept_id;
+    private String post_id;
+    private String role_id;
+    private String oauth_id;
+    private String account;
+    private String user_name;
+    private String nick_name;
+    private String role_name;
+    private String real_name;
+    private String pcsDm;
+    private String zp;
+    private String mjname;
+    private String mjId;
+    private String deptCategory; // 7代表社区
+    private String sspcs;
+    private String ancestors;
+
+    public String getAncestors() {
+        return ancestors;
+    }
+
+    public void setAncestors(String ancestors) {
+        this.ancestors = ancestors;
+    }
+
+    public String getDeptCategory() {
+        return deptCategory;
+    }
+
+    public void setDeptCategory(String deptCategory) {
+        this.deptCategory = deptCategory;
+    }
+
+    public String getMjname() {
+        return mjname;
+    }
+
+    public void setMjname(String mjname) {
+        this.mjname = mjname;
+    }
+
+    public String getMjId() {
+        return mjId;
+    }
+
+    public void setMjId(String mjId) {
+        this.mjId = mjId;
+    }
+
+    public String getSspcs() {
+        return sspcs;
+    }
+
+    public void setSspcs(String sspcs) {
+        this.sspcs = sspcs;
+    }
+
+    public String getReal_name() {
+        return real_name;
+    }
+
+    public String getPcsDm() {
+        return pcsDm;
+    }
+
+    public String getZp() {
+        return zp;
+    }
+
+    public void setZp(String zp) {
+        this.zp = zp;
+    }
+
+    public void setPcsDm(String pcsDm) {
+        this.pcsDm = pcsDm;
+    }
+
+    public void setReal_name(String real_name) {
+        this.real_name = real_name;
+    }
+
+    private String avatar;
+    private String access_token;
+    private String refresh_token;
+    private String token_type;
+    private int expires_in;
+    private DetailBean detail;
+    private String license;
+    private String phone;
+    private String policeNumber;
+    private String pcsmc;
+
+    public String getPcsmc() {
+        return pcsmc;
+    }
+
+    public void setPcsmc(String pcsmc) {
+        this.pcsmc = pcsmc;
+    }
+
+    public String getDept_name() {
+        return dept_name;
+    }
+
+    public void setDept_name(String dept_name) {
+        this.dept_name = dept_name;
+    }
+
+    private String dept_name;
+
+    public String getTenant_id() {
+        return tenant_id;
+    }
+
+    public void setTenant_id(String tenant_id) {
+        this.tenant_id = tenant_id;
+    }
+
+    public String getUser_id() {
+        return user_id;
+    }
+
+    public void setUser_id(String user_id) {
+        this.user_id = user_id;
+    }
+
+    public String getDept_id() {
+        return dept_id;
+    }
+
+    public void setDept_id(String dept_id) {
+        this.dept_id = dept_id;
+    }
+
+    public String getPost_id() {
+        return post_id;
+    }
+
+    public void setPost_id(String post_id) {
+        this.post_id = post_id;
+    }
+
+    public String getRole_id() {
+        return role_id;
+    }
+
+    public void setRole_id(String role_id) {
+        this.role_id = role_id;
+    }
+
+    public String getOauth_id() {
+        return oauth_id;
+    }
+
+    public void setOauth_id(String oauth_id) {
+        this.oauth_id = oauth_id;
+    }
+
+    public String getAccount() {
+        return account;
+    }
+
+    public void setAccount(String account) {
+        this.account = account;
+    }
+
+    public String getUser_name() {
+        return user_name;
+    }
+
+    public void setUser_name(String user_name) {
+        this.user_name = user_name;
+    }
+
+    public String getNick_name() {
+        return nick_name;
+    }
+
+    public void setNick_name(String nick_name) {
+        this.nick_name = nick_name;
+    }
+
+    public String getRole_name() {
+        return role_name;
+    }
+
+    public void setRole_name(String role_name) {
+        this.role_name = role_name;
+    }
+
+    public String getAvatar() {
+        return avatar;
+    }
+
+    public void setAvatar(String avatar) {
+        this.avatar = avatar;
+    }
+
+    public String getAccess_token() {
+        return access_token;
+    }
+
+    public void setAccess_token(String access_token) {
+        this.access_token = access_token;
+    }
+
+    public String getRefresh_token() {
+        return refresh_token;
+    }
+
+    public void setRefresh_token(String refresh_token) {
+        this.refresh_token = refresh_token;
+    }
+
+    public String getToken_type() {
+        return token_type;
+    }
+
+    public void setToken_type(String token_type) {
+        this.token_type = token_type;
+    }
+
+    public int getExpires_in() {
+        return expires_in;
+    }
+
+    public void setExpires_in(int expires_in) {
+        this.expires_in = expires_in;
+    }
+
+    public DetailBean getDetail() {
+        return detail;
+    }
+
+    public void setDetail(DetailBean detail) {
+        this.detail = detail;
+    }
+
+    public String getLicense() {
+        return license;
+    }
+
+    public void setLicense(String license) {
+        this.license = license;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public String getPoliceNumber() {
+        return policeNumber;
+    }
+
+    public void setPoliceNumber(String policeNumber) {
+        this.policeNumber = policeNumber;
+    }
+
+    public static class DetailBean {
+        /**
+         * type : web
+         */
+
+        private String type;
+
+        public String getType() {
+            return type;
+        }
+
+        public void setType(String type) {
+            this.type = type;
+        }
+    }
+}

+ 40 - 0
sqjw/src/main/java/com/xwkj/sqjw/mvp/model/entity/NormalEntity.java

@@ -0,0 +1,40 @@
+package com.xwkj.sqjw.mvp.model.entity;
+
+public class NormalEntity {
+    private int code;
+    private boolean success;
+    private Object 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 Object getData() {
+        return data;
+    }
+
+    public void setData(Object data) {
+        this.data = data;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+}

+ 1 - 1
sqjw/src/main/java/com/xwkj/sqjw/mvp/presenter/HomePresenter.java

@@ -64,7 +64,7 @@ public class HomePresenter extends BasePresenter<HomeContract.Model, HomeContrac
         map1.put("className", "applicationInfoController");
         map1.put("methodName", "page");
         map1.put("params", map);
-        ReqToBus.getInstance().init(mApplication).getRequestV2(map1, new CommonInterFace() {
+        ReqToBus.getInstance().init(mApplication).getRequestV2(map1, false, new CommonInterFace() {
             @Override
             public void onSuccess(String result) {
                 if (mRootView != null) {

+ 64 - 0
sqjw/src/main/java/com/xwkj/sqjw/mvp/presenter/JdrhLoginPresenter.java

@@ -2,6 +2,8 @@ package com.xwkj.sqjw.mvp.presenter;
 
 import android.app.Application;
 
+import com.google.gson.Gson;
+import com.hjq.toast.ToastUtils;
 import com.jess.arms.integration.AppManager;
 import com.jess.arms.di.scope.ActivityScope;
 import com.jess.arms.mvp.BasePresenter;
@@ -12,6 +14,13 @@ import me.jessyan.rxerrorhandler.core.RxErrorHandler;
 import javax.inject.Inject;
 
 import com.xwkj.sqjw.mvp.contract.JdrhLoginContract;
+import com.xwkj.sqjw.mvp.model.api.CommonInterFace;
+import com.xwkj.sqjw.mvp.model.api.ReqToBus;
+import com.xwkj.sqjw.mvp.model.entity.Login;
+import com.xwkj.sqjw.mvp.model.entity.NormalEntity;
+
+import java.util.HashMap;
+import java.util.Map;
 
 
 /**
@@ -50,4 +59,59 @@ public class JdrhLoginPresenter extends BasePresenter<JdrhLoginContract.Model, J
         this.mImageLoader = null;
         this.mApplication = null;
     }
+
+    public void login(Map<String, Object> map) {
+        ReqToBus.getInstance().init(mApplication).getRequestV2(map, true, 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() {
+
+            }
+        });
+    }
+
+    public void bindMj(Map<String, String> map, Login login) {
+        Map<String, Object> map1 = new HashMap<>();
+        map1.put("className", "userInfoController");
+        map1.put("methodName", "mfjgl");
+        map1.put("params", map);
+        ReqToBus.getInstance().init(mApplication).getRequestV2(map1,true, new CommonInterFace() {
+            @Override
+            public void onSuccess(String result) {
+                NormalEntity entity = new Gson().fromJson(result, NormalEntity.class);
+                int code = entity.getCode();
+                if (code == 200) {
+                    if (mRootView != null) {
+                        mRootView.onBindMjSuccess(login);
+                    }
+                } else {
+                    ToastUtils.show(entity.getMsg());
+                }
+            }
+
+            @Override
+            public void onError(Throwable throwable) {
+                ToastUtils.show("获取数据失败,请重试!");
+            }
+
+            @Override
+            public void onFinsh() {
+
+            }
+        });
+    }
+
 }

+ 312 - 2
sqjw/src/main/java/com/xwkj/sqjw/mvp/ui/activity/JdrhLoginActivity.java

@@ -1,22 +1,59 @@
 package com.xwkj.sqjw.mvp.ui.activity;
 
+import android.Manifest;
+import android.content.ContentResolver;
+import android.content.ContentValues;
 import android.content.Intent;
+import android.content.SharedPreferences;
+import android.database.Cursor;
+import android.net.Uri;
 import android.os.Bundle;
+import android.text.TextUtils;
+import android.text.method.HideReturnsTransformationMethod;
+import android.text.method.PasswordTransformationMethod;
+import android.util.Log;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.RadioGroup;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
 
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 
-import com.jess.arms.base.BaseActivity;
+import com.google.gson.Gson;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import com.hjq.toast.ToastUtils;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
 
+import com.xm.permissions.OnRequestPermissionsCallback;
+import com.xm.permissions.XmPermissions;
+import com.xwkj.sqjw.app.db.DBHelper;
+import com.xwkj.sqjw.app.provider.DataProvider;
 import com.xwkj.sqjw.di.component.DaggerJdrhLoginComponent;
 import com.xwkj.sqjw.mvp.contract.JdrhLoginContract;
+import com.xwkj.sqjw.mvp.model.entity.Login;
 import com.xwkj.sqjw.mvp.presenter.JdrhLoginPresenter;
 
 import com.xwkj.sqjw.R;
+import com.zkjc.common.base.ZkjcBaseActivity;
+import com.zkjc.common.utils.ApkUtils;
+import com.zkjc.common.utils.DevicesUtils;
+import com.zkjc.common.utils.ThirdUtils;
 
 
+import org.jetbrains.annotations.NotNull;
+import org.xutils.common.util.MD5;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import butterknife.BindView;
+
 import static com.jess.arms.utils.Preconditions.checkNotNull;
 
 
@@ -32,7 +69,31 @@ import static com.jess.arms.utils.Preconditions.checkNotNull;
  * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
  * ================================================
  */
-public class JdrhLoginActivity extends BaseActivity<JdrhLoginPresenter> implements JdrhLoginContract.View {
+public class JdrhLoginActivity extends ZkjcBaseActivity<JdrhLoginPresenter> implements JdrhLoginContract.View, OnRequestPermissionsCallback {
+
+    @BindView(R.id.iv_jh)
+    ImageView ivJh;
+    @BindView(R.id.pwd_state)
+    ImageView pwd_state;
+    @BindView(R.id.tv_code)
+    TextView tvCode;
+    @BindView(R.id.et_zh)
+    EditText etZh;
+    @BindView(R.id.ll_wybs)
+    LinearLayout llWybs;
+    @BindView(R.id.et_mm)
+    EditText etMm;
+    @BindView(R.id.et_mjzh)
+    EditText etMjzh;
+    @BindView(R.id.bt_apply)
+    Button btApply;
+    @BindView(R.id.rl)
+    RelativeLayout rl;
+    @BindView(R.id.rg_role)
+    RadioGroup rgRole;
+    private XmPermissions xmPermissions;
+    private SharedPreferences sys;
+    private boolean isFj; // 目前取消此功能
 
     @Override
     public void setupActivityComponent(@NonNull AppComponent appComponent) {
@@ -49,8 +110,150 @@ public class JdrhLoginActivity extends BaseActivity<JdrhLoginPresenter> implemen
         return R.layout.activity_jdrh_login; //如果你不需要框架帮你设置 setContentView(id) 需要自行设置,请返回 0
     }
 
+    String wybs = "";
+
     @Override
     public void initData(@Nullable Bundle savedInstanceState) {
+        xmPermissions = XmPermissions.Companion.newInstance(this);
+        xmPermissions.setOnRequestPermissionsCallback(this);
+        xmPermissions.requestPermissions(Manifest.permission.RECORD_AUDIO, Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION);
+//        xmPermissions.requestAllPermissions();
+        sys = getSharedPreferences("sys", MODE_PRIVATE);
+        boolean isFirst = sys.getBoolean("isFirst", true);
+        int oldCode = sys.getInt("app_version_code", 0);
+        int nowCode = ApkUtils.getVersionCode(JdrhLoginActivity.this);
+        if (!isFirst) {
+            if (oldCode != 50 && nowCode == 50) {
+
+            } else {
+
+                ArmsUtils.startActivity(MainActivity.class);
+                finish();
+            }
+            /*System.out.println("System.currentTimeMillis() = " + System.currentTimeMillis());
+            long currentTime = System.currentTimeMillis() / 1000;
+            Long loginTime = sys.getLong("loginTime", 0);
+            if (currentTime - loginTime >= 604800) {
+                return;
+            } else {
+
+            }*/
+
+        }
+        DevicesUtils.getDeviceId(JdrhLoginActivity.this, new DevicesUtils.OnDeviceIdListener() {
+            @Override
+            public void onSuccess(String deviceId) {
+                System.out.println("wybs" + deviceId);
+                wybs = deviceId;
+                tvCode.setText("设备码:" + deviceId);
+            }
+        });
+        //String phone = DevicesUtils.getPhone(this);
+      /*  System.out.println("++++"+phone);
+        etZh.setText(phone);*/
+        btApply.setOnClickListener(view -> {
+
+            String zh = etZh.getText().toString();
+            String mm = etMm.getText().toString();
+//            if (TextUtils.isEmpty(zh)) {
+//                ToastUtils.show("账号不能为空");
+//                return;
+//            }
+//            if (TextUtils.isEmpty(mm)) {
+//                ToastUtils.show("密码不能为空");
+//                return;
+//            }
+            Map<String, String> map = new HashMap<>();
+            map.put("username", zh);
+            map.put("password", MD5.md5(mm));
+            map.put("tenantId", "000000");
+            /*if (TextUtils.isEmpty(wybs)) {
+                ToastUtils.show("唯一标识正在获取中,请稍后再试");
+                return;
+            }*/
+            map.put("code", wybs);
+            Map<String, Object> map1 = new HashMap<>();
+            map1.put("className", "bladeTokenEndPoint");
+            map1.put("methodName", "token3");
+            map1.put("params", map);
+
+            map1.put("username", zh);
+            map1.put("password", MD5.md5(mm));
+            mPresenter.login(map1);
+            ThirdUtils.getInstances().showDialog(JdrhLoginActivity.this, "正在登录");
+
+            /*sys.edit().putBoolean("isFirst", false).commit();
+            ArmsUtils.startActivity(MainActivity.class);
+            finish();*/
+        });
+        pwd_state.setOnClickListener(view -> {
+            int tag = Integer.valueOf(pwd_state.getTag().toString());
+            if (tag == 1) {
+                //显示密码吗
+                pwd_state.setTag(2);
+                pwd_state.setImageResource(R.drawable.pwd_no_eye);
+                etMm.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
+            } else {
+                //隐藏密码
+                pwd_state.setTag(1);
+                pwd_state.setImageResource(R.drawable.pwd_eye);
+                etMm.setTransformationMethod(PasswordTransformationMethod.getInstance());
+            }
+
+        });
+
+        rgRole.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(RadioGroup group, int checkedId) {
+                switch (checkedId) {
+                    case R.id.rb_role_mj:
+                        isFj = false;
+                        break;
+                    case R.id.rb_role_fj:
+                        isFj = true;
+                        break;
+                    default:
+                        break;
+                }
+            }
+        });
+    }
+
+    @Override
+    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
+        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
+        xmPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults);
+/*        if (isFinishing()) {
+            return;
+        }
+        if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+        } else {
+        }*/
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        xmPermissions.onActivityResult(requestCode);
+    }
+
+    @Override
+    public void onDenied(@NotNull String[] strings) {
+
+    }
+
+    @Override
+    public void onGranted() {
+
+    }
+
+    @Override
+    public void onPermanentlyDenied(@NotNull String[] strings) {
+
+    }
+
+    @Override
+    public void onSettingBackDenied(@NotNull String[] strings) {
 
     }
 
@@ -80,4 +283,111 @@ public class JdrhLoginActivity extends BaseActivity<JdrhLoginPresenter> implemen
     public void killMyself() {
         finish();
     }
+
+
+    @Override
+    public void onSuccess(String result) {
+
+        ThirdUtils.getInstances().dismissDialog();
+        System.out.println("****" + result);
+        try {
+            System.out.println("用户信息" + result);
+            JsonObject jsonObject = new JsonParser().parse(result).getAsJsonObject();
+
+            if (jsonObject.has("access_token")) {
+                Gson gson = new Gson();
+                Login entity = gson.fromJson(result, Login.class);
+                String role_name = entity.getRole_name();
+                /*if (!TextUtils.isEmpty(role_name) && role_name.contains("派出所管理员")) {
+                    Utils.getInstances().dismissDialog();
+                    ToastUtils.show("该账户暂不可登录APP,请换其他账号登录");
+                    return;
+                }*/
+                if (isFj) {
+                    Map<String, String> map = new HashMap<>();
+                    map.put("fjZh", etMjzh.getText().toString());
+                    mPresenter.bindMj(map, entity);
+                } else {
+                    ThirdUtils.getInstances().dismissDialog();
+                    saveLoginInfo(entity);
+                }
+
+            } else {
+                String error_description = jsonObject.get("error_description").getAsString();
+                ToastUtils.show(error_description);
+            }
+        } catch (Exception e) {
+            ToastUtils.show("登录失败!" + e.getMessage());
+            e.printStackTrace();
+        }
+
+    }
+
+    private void saveLoginInfo(Login entity) {
+        SharedPreferences sharedPreferences = getSharedPreferences("sys", MODE_PRIVATE);
+        SharedPreferences.Editor edit = sharedPreferences.edit();
+        edit.putString("token", entity.getAccess_token());
+        edit.putString("refresh_token", entity.getRefresh_token());
+        edit.putString("userName", entity.getReal_name());
+        edit.putString("tenantId", entity.getTenant_id());
+        edit.putString("account", entity.getAccount());
+        edit.putString("tokenType", entity.getToken_type());
+        edit.putString("userId", entity.getUser_id());
+        edit.putInt("expires_in", entity.getExpires_in());
+        edit.putString("dept_id", entity.getDept_id());
+        edit.putString("phone", entity.getPhone());
+        edit.putString("pcsmc", entity.getPcsmc());
+        edit.putString("dept_name", entity.getDept_name());
+        edit.putString("jh", entity.getPoliceNumber());
+        edit.putString("role_name", entity.getRole_name());
+        edit.putString("pcsDm", entity.getPcsDm());
+        edit.putString("xqt_image", entity.getZp());
+        edit.putString("mj_id", entity.getMjId());
+        edit.putString("deptCategory", entity.getDeptCategory()); // 7是社区
+        edit.putString("mj_name", entity.getMjname());
+        edit.putString("sspcs", entity.getSspcs());
+        edit.putString("zh", etZh.getText().toString().trim());
+        edit.putString("mm", MD5.md5(etMm.getText().toString().trim()));
+        edit.putInt("app_version_code", ApkUtils.getVersionCode(JdrhLoginActivity.this));
+        String ancestors = entity.getAncestors();
+        if (!TextUtils.isEmpty(ancestors) && ancestors.contains("220200000000")) {
+            edit.putBoolean("isJlUser", true);
+        } else {
+            edit.putBoolean("isJlUser", false);
+        }
+        //  edit.putLong("loginTime", System.currentTimeMillis() / 1000);
+
+        ThirdUtils.getInstances().dismissDialog();
+
+        Uri uri_user = Uri.parse("content://" + DataProvider.AUTOHORITY + "/data");
+        ContentResolver resolver = getContentResolver();
+        resolver.delete(uri_user, null, null);
+
+        ContentValues values = new ContentValues();
+        values.put(DBHelper.DATA_USER_NAME, etZh.getText().toString().trim());
+        values.put(DBHelper.DATA_PASSWORD, MD5.md5(etMm.getText().toString().trim()));
+        resolver.insert(uri_user, values);
+        Cursor cursor = resolver.query(uri_user, new String[]{DBHelper.DATA_ID, DBHelper.DATA_JSON, DBHelper.DATA_USER_NAME, DBHelper.DATA_PASSWORD}, null, null, null);
+        while (cursor.moveToNext()) {
+            Log.e("eee","query info: 0 ========== " + cursor.getInt(0));
+            Log.e("eee","query info: 1 ========== " + cursor.getString(1));
+            Log.e("eee","query info: 2 ========== " + cursor.getString(2));
+            Log.e("eee","query info: 3 ========== " + cursor.getString(3));
+        }
+        cursor.close();
+        edit.commit();
+        sys.edit().putBoolean("isFirst", false).commit();
+        ArmsUtils.startActivity(MainActivity.class);
+        finish();
+    }
+
+    @Override
+    public void onError(Throwable mThrowable) {
+        ThirdUtils.getInstances().dismissDialog();
+    }
+
+    @Override
+    public void onBindMjSuccess(Login login) {
+        saveLoginInfo(login);
+    }
 }

+ 36 - 23
sqjw/src/main/java/com/xwkj/sqjw/mvp/ui/activity/MainActivity.java

@@ -1,53 +1,39 @@
 package com.xwkj.sqjw.mvp.ui.activity;
 
-import android.Manifest;
 import android.content.ContentResolver;
 import android.content.ContentValues;
 import android.content.Intent;
-import android.content.pm.PackageInfo;
-import android.content.pm.PackageManager;
 import android.database.Cursor;
 import android.net.Uri;
-import android.os.Build;
 import android.os.Bundle;
-import android.os.Handler;
 import android.util.Log;
 import android.view.View;
-import android.widget.Button;
 import android.widget.FrameLayout;
 import android.widget.LinearLayout;
 
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
-import androidx.core.app.ActivityCompat;
-import androidx.core.content.ContextCompat;
 import androidx.fragment.app.FragmentTransaction;
 
-import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
+import com.google.gson.Gson;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
 import com.xwkj.sqjw.R;
 import com.xwkj.sqjw.app.db.DBHelper;
 import com.xwkj.sqjw.app.provider.DataProvider;
-import com.xwkj.sqjw.app.utils.DownloadUtil;
 import com.xwkj.sqjw.di.component.DaggerMainComponent;
 import com.xwkj.sqjw.mvp.contract.MainContract;
+import com.xwkj.sqjw.mvp.model.api.Api;
 import com.xwkj.sqjw.mvp.presenter.MainPresenter;
 import com.xwkj.sqjw.mvp.ui.fragment.HomeFragment;
 import com.xwkj.sqjw.mvp.ui.fragment.MyFragment;
 import com.zkjc.common.base.ZkjcBaseActivity;
+import com.zkjc.common.utils.ApkUtils;
 
-import java.io.File;
-import java.util.HashMap;
+import java.util.ArrayList;
+import java.util.List;
 
 import butterknife.BindView;
-import butterknife.ButterKnife;
-import io.dcloud.feature.sdk.DCUniMPSDK;
-import io.dcloud.feature.sdk.Interface.IUniMP;
-import io.dcloud.feature.unimp.config.IUniMPReleaseCallBack;
-import io.dcloud.feature.unimp.config.UniMPOpenConfiguration;
-import io.dcloud.feature.unimp.config.UniMPReleaseConfiguration;
 
 import static com.jess.arms.utils.Preconditions.checkNotNull;
 
@@ -98,6 +84,7 @@ public class MainActivity extends ZkjcBaseActivity<MainPresenter> implements Mai
         home.setOnClickListener(this);
         my.setOnClickListener(this);
         home.performClick();
+        test();
     }
 
 
@@ -139,8 +126,34 @@ public class MainActivity extends ZkjcBaseActivity<MainPresenter> implements Mai
 
         // 插入表中数据
         ContentValues values = new ContentValues();
-        values.put(DBHelper.DATA_USER_ID, "id");
-        values.put(DBHelper.DATA_USER_NAME, "name");
+
+        ShareInfo shareInfo = new ShareInfo();
+        shareInfo.setAppCredential("应用凭证");
+        shareInfo.setDataObjId("资源id");
+        shareInfo.setDepCode("220000000000");
+        shareInfo.setDepName("吉林省公安厅");
+        shareInfo.setMobile("13122223331");
+        shareInfo.setPersonCode("106470");
+        shareInfo.setPersonId("410000000000");
+        shareInfo.setPersonIdentifier("12010119610707201X");
+        shareInfo.setPersonName("张胜男");
+        shareInfo.setPersonType("10");
+        shareInfo.setPolice("101470");
+        shareInfo.setSex("男");
+        shareInfo.setFields("data");
+        shareInfo.setNetworkCode("3");
+        List<ShareInfo.Resource> resourceList = new ArrayList<>();
+        ShareInfo.Resource resource = new ShareInfo.Resource();
+
+        resource.setResourceAddress(ApkUtils.isSqjw(this) ? "http://20.3.1.162:9105/drs/ppc/v1/appQuery.do" : Api.APP_DOMAIN);
+        resource.setResourceRegionalismCode("220000000000");
+        resource.setResourceId(" 120000000000-3-0100-b0e037d83ecc4d43be788a5e9ddcbbe5");
+        resource.setResourceServiceType("10");
+        resourceList.add(resource);
+        shareInfo.setResourceList(resourceList);
+        shareInfo.setUserCredential("用户凭证");
+
+        values.put(DBHelper.DATA_JSON, new Gson().toJson(shareInfo));
 
 
         // 获取ContentResolver
@@ -149,9 +162,9 @@ public class MainActivity extends ZkjcBaseActivity<MainPresenter> implements Mai
         resolver.insert(uri_user, values);
 
         // 通过ContentResolver 向ContentProvider中查询数据
-        Cursor cursor = resolver.query(uri_user, new String[]{DBHelper.DATA_ID, DBHelper.DATA_USER_ID, DBHelper.DATA_USER_NAME}, null, null, null);
+        Cursor cursor = resolver.query(uri_user, new String[]{DBHelper.DATA_ID, DBHelper.DATA_JSON}, null, null, null);
         while (cursor.moveToNext()) {
-            Log.e("eee","query info:" + cursor.getInt(0) + " " + cursor.getString(1) + " " + cursor.getString(2));
+            Log.e("eee","query info:" + cursor.getInt(0) + " " + cursor.getString(1));
             // 将表中数据全部输出
         }
         cursor.close();

+ 2 - 0
sqjw/src/main/java/com/xwkj/sqjw/mvp/ui/activity/SqjwLoginActivity.java

@@ -64,6 +64,8 @@ public class SqjwLoginActivity extends BaseActivity<SqjwLoginPresenter> implemen
             onTime(0L);
         }else {
             //警地融合 可以跳转或者当前页
+            ArmsUtils.startActivity(new Intent(SqjwLoginActivity.this, JdrhLoginActivity.class));
+            finish();
         }
     }
     private Handler handler = new Handler();

+ 7 - 0
sqjw/src/main/java/com/xwkj/sqjw/mvp/ui/adapter/HomeAppAdapter.java

@@ -1,5 +1,9 @@
 package com.xwkj.sqjw.mvp.ui.adapter;
 
+import android.text.TextUtils;
+import android.widget.ImageView;
+
+import com.squareup.picasso.Picasso;
 import com.xwkj.sqjw.R;
 import com.xwkj.sqjw.mvp.model.entity.AppEntity;
 
@@ -18,6 +22,9 @@ public class HomeAppAdapter extends BaseRecycleAdapter<AppEntity.App> {
             holder.setOnItemClickListenerV2(R.id.item_app_root, position, listener);
         }
         setItemText(holder.getView(R.id.item_tv_app_name), app.getName());
+        if (!TextUtils.isEmpty(app.getIcon())) {
+            Picasso.with(holder.getView(R.id.item_iv_icon).getContext()).load(app.getIcon()).into((ImageView) holder.getView(R.id.item_iv_icon));
+        }
     }
 
     @Override

+ 267 - 31
sqjw/src/main/java/com/xwkj/sqjw/mvp/ui/fragment/HomeFragment.java

@@ -1,20 +1,24 @@
 package com.xwkj.sqjw.mvp.ui.fragment;
 
+import android.Manifest;
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
-import android.content.pm.ApplicationInfo;
+import android.content.SharedPreferences;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
 import android.net.Uri;
 import android.os.Build;
 import android.os.Bundle;
+import android.os.Handler;
 import android.os.Message;
 
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
+import androidx.core.app.ActivityCompat;
+import androidx.core.content.ContextCompat;
 import androidx.core.content.FileProvider;
 import androidx.fragment.app.Fragment;
 import androidx.recyclerview.widget.GridLayoutManager;
@@ -25,17 +29,18 @@ import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
-import android.widget.Toast;
 
-import com.dcloud.android.downloader.domain.DownloadInfo;
+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.xwkj.sqjw.BuildConfig;
+import com.xwkj.sqjw.app.utils.DownloadUtil;
 import com.xwkj.sqjw.di.component.DaggerHomeComponent;
 import com.xwkj.sqjw.mvp.contract.HomeContract;
+import com.xwkj.sqjw.mvp.model.api.Api;
 import com.xwkj.sqjw.mvp.model.entity.AppEntity;
 import com.xwkj.sqjw.mvp.presenter.HomePresenter;
 
@@ -46,6 +51,13 @@ import com.yaoxiaowen.download.DownloadConstant;
 import com.yaoxiaowen.download.DownloadHelper;
 import com.yaoxiaowen.download.DownloadStatus;
 import com.yaoxiaowen.download.FileInfo;
+import com.zkjc.common.utils.ApkUtils;
+import com.zkjc.common.utils.ShareInfo;
+import com.zkjc.common.utils.ThirdUtils;
+
+import org.jetbrains.annotations.NotNull;
+import org.json.JSONException;
+import org.json.JSONObject;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -54,6 +66,11 @@ import java.util.List;
 import java.util.Map;
 
 import butterknife.BindView;
+import io.dcloud.feature.sdk.DCUniMPSDK;
+import io.dcloud.feature.sdk.Interface.IUniMPOnCloseCallBack;
+import io.dcloud.feature.unimp.config.IUniMPReleaseCallBack;
+import io.dcloud.feature.unimp.config.UniMPOpenConfiguration;
+import io.dcloud.feature.unimp.config.UniMPReleaseConfiguration;
 
 import static com.jess.arms.utils.Preconditions.checkNotNull;
 
@@ -108,15 +125,11 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements HomeCon
             list.add(new AppEntity.App());
         }*/
 
-        Map<String, String> map = new HashMap<>();
-        map.put("current", "1");
-        map.put("size", "10");
-        mPresenter.getAppList(map);
-
+        checkPermission();
 
-        PackageManager manager = getActivity().getPackageManager();
+        /*PackageManager manager = getActivity().getPackageManager();
         List<ApplicationInfo> infoList = manager.getInstalledApplications(PackageManager.GET_META_DATA);
-        /*List<AppInfo> appInfoList = new ArrayList<>();
+        List<AppInfo> appInfoList = new ArrayList<>();
         for (ApplicationInfo info: infoList) {
             AppInfo appInfo = new AppInfo();
             appInfo.setAppId(info.packageName);
@@ -131,6 +144,58 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements HomeCon
         }*/
     }
 
+    @Override
+    public void onResume() {
+        super.onResume();
+        Map<String, String> map = new HashMap<>();
+        map.put("current", "1");
+        map.put("size", "10");
+        mPresenter.getAppList(map);
+    }
+
+    /**
+     * 检查并申请权限
+     */
+    public void checkPermission() {
+        int targetSdkVersion = 0;
+        String[] PermissionString = {Manifest.permission.WRITE_EXTERNAL_STORAGE};
+        try {
+            final PackageInfo info = this.getActivity().getPackageManager().getPackageInfo(this.getActivity().getPackageName(), 0);
+            targetSdkVersion = info.applicationInfo.targetSdkVersion;//获取应用的Target版本
+        } catch (PackageManager.NameNotFoundException e) {
+            e.printStackTrace();
+        }
+
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+            //Build.VERSION.SDK_INT是获取当前手机版本 Build.VERSION_CODES.M为6.0系统
+            //如果系统>=6.0
+            if (targetSdkVersion >= Build.VERSION_CODES.M) {
+                //第 1 步: 检查是否有相应的权限
+                boolean isAllGranted = checkPermissionAllGranted(PermissionString);
+                if (isAllGranted) {
+                    Log.e("err", "所有权限已经授权!");
+                    return;
+                }
+                // 一次请求多个权限, 如果其他有权限是已经授予的将会自动忽略掉
+                ActivityCompat.requestPermissions(getActivity(), PermissionString, 1);
+            }
+        }
+    }
+
+    /**
+     * 检查是否拥有指定的所有权限
+     */
+    private boolean checkPermissionAllGranted(String[] permissions) {
+        for (String permission : permissions) {
+            if (ContextCompat.checkSelfPermission(getActivity(), permission) != PackageManager.PERMISSION_GRANTED) {
+                // 只要有一个权限没有被授予, 则直接返回 false
+                //Log.e("err","权限"+permission+"没有授权");
+                return false;
+            }
+        }
+        return true;
+    }
+
     /**
      * 通过此方法可以使 Fragment 能够与外界做一些交互和通信, 比如说外部的 Activity 想让自己持有的某个 Fragment 对象执行一些方法,
      * 建议在有多个需要与外界交互的方法时, 统一传 {@link Message}, 通过 what 字段来区分不同的方法, 在 {@link #setData(Object)}
@@ -206,46 +271,215 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements HomeCon
             HomeAppAdapter adapter = new HomeAppAdapter(result);
             adapter.setListener(this);
             recyclerView.setAdapter(adapter);
+            SharedPreferences sys = getActivity().getSharedPreferences("sys", Context.MODE_PRIVATE);
+            sys.edit().putString("appList", new Gson().toJson(result)).commit();
+
         }
     }
 
     @Override
     public void onItemClick(View view, int position) {
+
         AppEntity.App app = mData.get(position);
-        switch (getPackageInfo(/*app.getPackageName()*/"com.xwkj.rhzf", /*app.getVersionCode()*/1)) {
-            case UNINSTALL:
-            case NEED_UPDATE:
-//                ToastUtils.show("正在下载");
-                download(app);
+        switch (app.getYyType()) {
+            case AppEntity.App.TYPE_APP:
+                switch (getPackageInfo(app.getPackageName(), app.getVersionCode())) {
+                    case UNINSTALL:
+                    case NEED_UPDATE:
+        //                ToastUtils.show("正在下载");
+
+                        download(app);
+                        break;
+                    case INSTALL:
+                        ComponentName componetName = new ComponentName(app.getPackageName(), app.getQdlj());
+                        try {
+                            Intent intent = new Intent();
+                            intent.setComponent(componetName);
+                            if ("com.xwkj.rhzf".equals(app.getPackageName())) {
+                                intent.putExtra("isRhzf", true);
+                            } else {
+                                intent.putExtra("isRhzf", false);
+                            }
+                            intent.putExtra("appId", app.getId());
+                            // sqjw
+                            intent.putExtra("username", "sqmj1");
+                            intent.putExtra("json", new Gson().toJson(getShareInfo()));
+
+                            // jdrh
+                            SharedPreferences sys = getActivity().getSharedPreferences("sys", Context.MODE_PRIVATE);
+                            String userName = sys.getString("zh", "");
+                            String password = sys.getString("mm", "");
+                            intent.putExtra("xwkjUserName", userName);
+                            intent.putExtra("xwkjPassword", password);
+                            startActivity(intent);
+                        } catch (Exception e) {
+                            ToastUtils.show("未找到应用");
+                        }
+                        break;
+                    default:
+                        break;
+                }
                 break;
-            case INSTALL:
-                ComponentName componetName = new ComponentName("com.xwkj.rhzf","com.xwkj.rhzf.mvp.ui.activity.LoginActivity");
-                try {
-                    Intent intent = new Intent();
-                    intent.setComponent(componetName);
-                    if (position == 0) {
-                        intent.putExtra("isRhzf", true);
-                    } else {
-                        intent.putExtra("isRhzf", false);
+            case AppEntity.App.TYPE_UNI:
+                DCUniMPSDK.getInstance().setUniMPOnCloseCallBack(new IUniMPOnCloseCallBack() {
+                    @Override
+                    public void onClose(String s) {
+                        Log.e("eee", "onClose is run !!!!!!");
+                    }
+                });
+                JSONObject uniApp = DCUniMPSDK.getInstance().getAppVersionInfo(app.getPackageName());
+                if (uniApp != null) {
+                    try {
+                        int code = uniApp.getInt("code");
+                        Log.e("eee", "info ===== " + uniApp.toString());
+                        if (app.getVersionCode() > code) {
+                            updateWgt(app.getLink(), app.getPackageName(), app.getId());
+                        } else {
+                            open(app.getPackageName(), app.getId());
+                        }
+                    } catch (JSONException e) {
+                        e.printStackTrace();
                     }
-                    startActivity(intent);
-                } catch (Exception e) {
-//                    ToastUtils.show("未找到应用");
+                } else {
+                    Log.e("eee", "info ===== null");
+                    updateWgt(app.getLink(), app.getPackageName(), app.getId());
                 }
                 break;
             default:
                 break;
         }
+
+    }
+
+    private void open(String packageName, String appId) {
+
+        try {
+            UniMPOpenConfiguration uniMPOpenConfiguration = new UniMPOpenConfiguration();
+//                                        uniMPOpenConfiguration.extraData.put("darkmode", "auto");
+            ShareInfo shareInfo = getShareInfo();
+
+//            uniMPOpenConfiguration.extraData.put("data", new Gson().toJson(shareInfo));
+            uniMPOpenConfiguration.extraData.put("data", new JSONObject(new Gson().toJson(shareInfo)));
+            uniMPOpenConfiguration.extraData.put("internet", !ApkUtils.isSqjw(getActivity()));
+            SharedPreferences sys = getActivity().getSharedPreferences("sys", Context.MODE_PRIVATE);
+            String userName = sys.getString("zh", "");
+            String password = sys.getString("mm", "");
+            uniMPOpenConfiguration.extraData.put("xwkjUserName", userName);
+            uniMPOpenConfiguration.extraData.put("xwkjPassword", password);
+            uniMPOpenConfiguration.extraData.put("appId", appId);
+
+            Log.e("eee", uniMPOpenConfiguration.extraData.toString());
+            DCUniMPSDK.getInstance().openUniMP(getActivity(), packageName, uniMPOpenConfiguration);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    @NotNull
+    private ShareInfo getShareInfo() {
+        ShareInfo shareInfo = new ShareInfo();
+        shareInfo.setAppCredential("应用凭证");
+        shareInfo.setDataObjId("资源id");
+        shareInfo.setDepCode("220000000000");
+        shareInfo.setDepName("吉林省公安厅");
+        shareInfo.setMobile("13122223331");
+        shareInfo.setPersonCode("106470");
+        shareInfo.setPersonId("410000000000");
+        shareInfo.setPersonIdentifier("12010119610707201X");
+        shareInfo.setPersonName("张胜男");
+        shareInfo.setPersonType("10");
+        shareInfo.setPolice("101470");
+        shareInfo.setSex("男");
+        shareInfo.setFields("data");
+        shareInfo.setNetworkCode("3");
+        List<ShareInfo.Resource> resourceList = new ArrayList<>();
+        ShareInfo.Resource resource = new ShareInfo.Resource();
+
+        resource.setResourceAddress(ApkUtils.isSqjw(getActivity()) ? "http://20.3.1.162:9105/drs/ppc/v1/appQuery.do" : Api.APP_DOMAIN);
+        resource.setResourceRegionalismCode("220000000000");
+        resource.setResourceId(" 120000000000-3-0100-b0e037d83ecc4d43be788a5e9ddcbbe5");
+        resource.setResourceServiceType("10");
+        resourceList.add(resource);
+        shareInfo.setResourceList(resourceList);
+        shareInfo.setUserCredential("用户凭证");
+        return shareInfo;
+    }
+
+    private void updateWgt(String url, String name, String appId) {
+
+        ThirdUtils.getInstances().showDialog(getActivity(), "正在加载数据");
+        //
+        // final String wgtUrl = "https://native-res.dcloud.net.cn/unimp-sdk/__UNI__7AEA00D.wgt";
+        // final String wgtUrl = "https://native-res.dcloud.net.cn/unimp-sdk/__UNI__7AEA00D.wgt";
+        final String wgtUrl = url;
+        final String wgtName = name + ".wgt";
+
+        String downFilePath = getActivity().getExternalCacheDir().getPath();
+
+        Handler uiHandler = new Handler();
+        JSONObject uniApp = DCUniMPSDK.getInstance().getAppVersionInfo(name);
+        if (uniApp != null) {
+            Log.e("eee", "info ===== " + uniApp.toString());
+        }
+        DownloadUtil.get().download(getActivity(), wgtUrl, downFilePath, wgtName, new DownloadUtil.OnDownloadListener() {
+
+            @Override
+            public void onDownloadSuccess(File file) {
+
+                ThirdUtils.getInstances().dismissDialog();
+
+                UniMPReleaseConfiguration uniMPReleaseConfiguration = new UniMPReleaseConfiguration();
+                uniMPReleaseConfiguration.wgtPath = file.getPath();
+                uniMPReleaseConfiguration.password = "789456123";
+
+                uiHandler.post(new Runnable() {
+                    @Override
+                    public void run() {
+                        DCUniMPSDK.getInstance().releaseWgtToRunPath(name, uniMPReleaseConfiguration, new IUniMPReleaseCallBack() {
+                            @Override
+                            public void onCallBack(int code, Object pArgs) {
+                                if (code == 1) {
+                                    //释放wgt完成
+
+                                    try {
+                                        open(name, appId);
+                                    } catch (Exception e) {
+                                        e.printStackTrace();
+                                    }
+                                } else {
+                                    //释放wgt失败
+                                    Log.e("eee", "code ======= " + code);
+                                }
+                            }
+                        });
+                    }
+                });
+
+
+            }
+
+            @Override
+            public void onDownloading(int progress) {
+
+            }
+
+            @Override
+            public void onDownloadFailed() {
+                Log.e("unimp", "downFilePath  ===  onDownloadFailed");
+            }
+        });
     }
 
     private void download(AppEntity.App app) {
+
+        ThirdUtils.getInstances().showDialog(getActivity(), "正在加载数据");
         String ACTION = app.getPackageName();
-        File apkFile = new File(getDir(), /*app.getName() + */"test.apk");
+        File apkFile = new File(getDir(), app.getName() + ".apk");
         IntentFilter filter = new IntentFilter();
         filter.addAction(ACTION);
         getActivity().registerReceiver(receiver, filter);
         DownloadHelper helper = DownloadHelper.getInstance();
-        helper.addTask("http://118.195.196.59:9000/jdrh/upload/20240704/2fe3c1a6992b109e20efdc991fd9a2cf.apk", apkFile, ACTION).submit(getActivity());
+        helper.addTask(app.getLink().replace("10.106.38.18:9000", "192.168.20.228:7022/downloadApk/"), apkFile, ACTION).submit(getActivity());
     }
     private File getDir(){
         if (dir!=null && dir.exists()){
@@ -267,14 +501,14 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements HomeCon
             PackageInfo packageInfo = mContext.getPackageManager().getPackageInfo(pkgName, 0);
             int versionCode = packageInfo.versionCode;
             if (version > versionCode) {
-                return 2;
+                return NEED_UPDATE;
             }
             Log.e("eee", "版本号:" + versionCode);
         } catch (PackageManager.NameNotFoundException e) {
             e.printStackTrace();
             return UNINSTALL;
         }
-        return 1;
+        return INSTALL;
     }
     @Override
     public boolean onItemLongClick(View view, int position) {
@@ -293,6 +527,8 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements HomeCon
 
 //            progressBar.setProgress(progress);
             if (firstFileInfo.getDownloadStatus() == DownloadStatus.COMPLETE) {
+
+                ThirdUtils.getInstances().dismissDialog();
                 File file = new File(firstFileInfo.getFilePath());
 
 

+ 60 - 10
sqjw/src/main/java/com/xwkj/sqjw/mvp/ui/fragment/MyFragment.java

@@ -1,6 +1,7 @@
 package com.xwkj.sqjw.mvp.ui.fragment;
 
 import android.Manifest;
+import android.content.ComponentName;
 import android.content.Intent;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
@@ -27,13 +28,13 @@ import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
 
 import com.xwkj.sqjw.app.utils.DownloadUtil;
-import com.xwkj.sqjw.app.utils.ShareInfo;
 import com.xwkj.sqjw.di.component.DaggerMyComponent;
 import com.xwkj.sqjw.mvp.contract.MyContract;
 import com.xwkj.sqjw.mvp.presenter.MyPresenter;
 
 import com.xwkj.sqjw.R;
-import com.xwkj.sqjw.mvp.ui.activity.MainActivity;
+
+import org.json.JSONObject;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -65,6 +66,8 @@ import static com.jess.arms.utils.Preconditions.checkNotNull;
 public class MyFragment extends BaseFragment<MyPresenter> implements MyContract.View {
     @BindView(R.id.bt_open)
     Button btOpen;
+    @BindView(R.id.bt_logout)
+    Button btLogout;
     public static MyFragment newInstance() {
         MyFragment fragment = new MyFragment();
         return fragment;
@@ -115,14 +118,29 @@ public class MyFragment extends BaseFragment<MyPresenter> implements MyContract.
         System.out.println(gson.toJson(shareInfo));
         checkPermission();
         btOpen.setOnClickListener(view -> {
-            /*try {
-                IUniMP uniMP = DCUniMPSDK.getInstance().openUniMP(MainActivity.this,"__UNI__F743940");
+           /* try {
+                IUniMP uniMP = DCUniMPSDK.getInstance().openUniMP(getActivity(),"__UNI__B61D13B");
                 mUniMPCaches.put(uniMP.getAppid(), uniMP);
             } catch (Exception e) {
                 e.printStackTrace();
             }*/
             updateWgt();
         });
+
+        btLogout.setOnClickListener(view -> {
+//            getActivity().getSharedPreferences("sys", Context.MODE_PRIVATE).edit().putBoolean("isFirst", true).commit();
+//            getActivity().finish();
+            ComponentName componetName = new ComponentName("com.xwkj.xfjc", "com.xwkj.xfjc.mvp.ui.activity.LoginActivity");
+            try {
+                Intent intent = new Intent();
+                intent.setComponent(componetName);
+                intent.putExtra("username", "207919");
+                startActivity(intent);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        });
+
     }
 
     /** unimp小程序实例缓存**/
@@ -134,14 +152,16 @@ public class MyFragment extends BaseFragment<MyPresenter> implements MyContract.
         //
         // final String wgtUrl = "https://native-res.dcloud.net.cn/unimp-sdk/__UNI__7AEA00D.wgt";
         // final String wgtUrl = "https://native-res.dcloud.net.cn/unimp-sdk/__UNI__7AEA00D.wgt";
-        final String wgtUrl = "http://111.26.204.4:9000/jdrh/upload/20241017/__UNI__0308C60.wgt";
+        final String wgtUrl = "http://118.195.196.59:9000/jdrh/upload/20241025/fe7a9598b5bda3cc9e5a734c89567b0d.wgt";
         final String wgtName = "__UNI__0308C60.wgt";
 
         String downFilePath = getActivity().getExternalCacheDir().getPath();
 
         Handler uiHandler = new Handler();
-
-
+        JSONObject uni__0308C60 = DCUniMPSDK.getInstance().getAppVersionInfo("__UNI__0308C60");
+        if (uni__0308C60 != null) {
+            Log.e("eee", "info ===== " + uni__0308C60.toString());
+        }
         DownloadUtil.get().download(getActivity(), wgtUrl, downFilePath, wgtName, new DownloadUtil.OnDownloadListener() {
 
             @Override
@@ -155,7 +175,7 @@ public class MyFragment extends BaseFragment<MyPresenter> implements MyContract.
                 uiHandler.post(new Runnable() {
                     @Override
                     public void run() {
-                        DCUniMPSDK.getInstance().releaseWgtToRunPath("__UNI__7AEA00D", uniMPReleaseConfiguration, new IUniMPReleaseCallBack() {
+                        DCUniMPSDK.getInstance().releaseWgtToRunPath("__UNI__0308C60", uniMPReleaseConfiguration, new IUniMPReleaseCallBack() {
                             @Override
                             public void onCallBack(int code, Object pArgs) {
                                 if (code == 1) {
@@ -163,13 +183,43 @@ public class MyFragment extends BaseFragment<MyPresenter> implements MyContract.
 
                                     try {
                                         UniMPOpenConfiguration uniMPOpenConfiguration = new UniMPOpenConfiguration();
-                                        uniMPOpenConfiguration.extraData.put("darkmode", "auto");
-                                        DCUniMPSDK.getInstance().openUniMP(getActivity(), "__UNI__7AEA00D", uniMPOpenConfiguration);
+//                                        uniMPOpenConfiguration.extraData.put("darkmode", "auto");
+                                        Gson gson = new Gson();
+                                        ShareInfo shareInfo = new ShareInfo();
+                                        shareInfo.setAppCredential("应用凭证");
+                                        shareInfo.setDataObjId("资源id");
+                                        shareInfo.setDepCode("220000000000");
+                                        shareInfo.setDepName("吉林省公安厅");
+                                        shareInfo.setMobile("13122223331");
+                                        shareInfo.setPersonCode("106470");
+                                        shareInfo.setPersonId("410000000000");
+                                        shareInfo.setPersonIdentifier("12010119610707201X");
+                                        shareInfo.setPersonName("张胜男");
+                                        shareInfo.setPersonType("10");
+                                        shareInfo.setPolice("101470");
+                                        shareInfo.setSex("男");
+                                        shareInfo.setFields("data");
+                                        shareInfo.setNetworkCode("3");
+                                        List<ShareInfo.Resource> resourceList = new ArrayList<>();
+                                        ShareInfo.Resource resource = new ShareInfo.Resource();
+                                        resource.setResourceAddress("http://20.3.1.162:9105/drs/ppc/v1/appQuery.do");
+                                        resource.setResourceRegionalismCode("220000000000");
+                                        resource.setResourceId(" 120000000000-3-0100-b0e037d83ecc4d43be788a5e9ddcbbe5");
+                                        resource.setResourceServiceType("10");
+                                        resourceList.add(resource);
+                                        shareInfo.setResourceList(resourceList);
+                                        shareInfo.setUserCredential("用户凭证");
+
+                                        uniMPOpenConfiguration.extraData.put("data", new Gson().toJson(shareInfo));
+
+                                        DCUniMPSDK.getInstance().openUniMP(getActivity(), "__UNI__0308C60", uniMPOpenConfiguration);
+//                                        DCUniMPSDK.getInstance().openUniMP(getActivity(), "__UNI__7AEA00D", new JSONObject());
                                     } catch (Exception e) {
                                         e.printStackTrace();
                                     }
                                 } else {
                                     //释放wgt失败
+                                    Log.e("eee", "code ======= " + code);
                                 }
                             }
                         });

TEMPAT SAMPAH
sqjw/src/main/res/drawable-xxxhdpi/icon_login_protect.png


TEMPAT SAMPAH
sqjw/src/main/res/drawable-xxxhdpi/lgon_bg.png


TEMPAT SAMPAH
sqjw/src/main/res/drawable-xxxhdpi/pwd_eye.png


TEMPAT SAMPAH
sqjw/src/main/res/drawable-xxxhdpi/pwd_no_eye.png


+ 9 - 0
sqjw/src/main/res/drawable/bg_shape_hs.xml

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

+ 9 - 0
sqjw/src/main/res/drawable/line_shape.xml

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

+ 8 - 0
sqjw/src/main/res/drawable/shape_login.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+
+            <solid android:color="#ffffffff" />
+            <corners android:topLeftRadius="24dp" android:topRightRadius="24dp" android:bottomLeftRadius="0dp" android:bottomRightRadius="0dp" />
+
+</shape>

+ 10 - 0
sqjw/src/main/res/drawable/sq_shape.xml

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

+ 245 - 0
sqjw/src/main/res/layout/activity_jdrh_login.xml

@@ -1,8 +1,253 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:background="@color/white"
+    android:clipChildren="false"
     android:orientation="vertical">
 
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        android:background="@drawable/lgon_bg">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentBottom="true"
+            android:layout_marginLeft="32dp"
+            android:layout_marginBottom="54dp"
+            android:text="您好!\n欢迎使用警地融合"
+            android:textColor="#ff111111"
+            android:textSize="24sp" />
+
+        <ImageView
+            android:layout_width="143dp"
+            android:layout_height="135dp"
+            android:layout_alignParentRight="true"
+            android:layout_alignParentBottom="true"
+            android:layout_marginRight="15dp"
+            android:layout_marginBottom="18dp"
+            android:background="@drawable/icon_login_protect" />
+    </RelativeLayout>
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_marginTop="-28dp"
+        android:layout_weight="2"
+        android:background="@drawable/shape_login">
+
+        <RelativeLayout
+            android:id="@+id/rl_title"
+            android:layout_width="match_parent"
+            android:layout_height="30dp"
+            android:layout_marginTop="12dp">
+
+            <ImageView
+                android:visibility="gone"
+                android:id="@+id/iv_jh"
+                android:layout_width="40dp"
+                android:layout_height="40dp"
+                android:layout_centerVertical="true"
+                android:layout_marginLeft="15dp"
+                android:src="@mipmap/jh" />
+
+            <TextView
+                android:visibility="gone"
+                android:id="@+id/tv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:layout_marginLeft="5dp"
+                android:layout_toRightOf="@id/iv_jh"
+                android:text="吉林市公安局"
+                android:textColor="#000"
+                android:textSize="16sp"
+                android:textStyle="bold" />
+            <TextView
+                android:layout_width="96dp"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:text="账号密码登录"
+                android:textColor="#ff111111"
+                android:textSize="16sp"
+                android:layout_marginLeft="32dp"
+                />
+        </RelativeLayout>
+
+
+        <RelativeLayout
+            android:id="@+id/rl"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/rl_title"
+            android:layout_marginBottom="20dp">
+
+            <LinearLayout
+                android:id="@+id/rl_wybs"
+                android:orientation="vertical"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+                <TextView
+                    android:id="@+id/tv_code"
+                    android:layout_width="wrap_content"
+                    android:layout_height="22dp"
+                    android:visibility="gone"
+                    android:text="设备码"
+                    android:textColor="#ff333333"
+                    android:textSize="14sp"
+                    android:layout_marginLeft="32dp"
+                    />
+                <LinearLayout
+                    android:id="@+id/ll_wybs"
+                    android:layout_width="match_parent"
+                    android:layout_height="45dp"
+                    android:layout_below="@id/tv_code"
+                    android:layout_marginTop="10dp"
+                    android:layout_marginLeft="32dp"
+                    android:layout_marginRight="32dp"
+                    android:background="@drawable/bg_shape_hs"
+                    android:orientation="horizontal">
+
+                    <EditText
+                        android:id="@+id/et_zh"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:layout_gravity="center"
+                        android:background="@null"
+                        android:focusable="true"
+                        android:focusableInTouchMode="true"
+                        android:gravity="center_vertical"
+                        android:hint="请输入警号"
+                        android:inputType="text"
+                        android:paddingLeft="10dp"
+                        android:textColor="#000"
+                        android:textCursorDrawable="@drawable/line_shape"
+                        android:textSize="16sp" />
+                    <!-- <TextView
+                         android:id="@+id/tv_wybs"
+                         android:layout_width="wrap_content"
+                         android:layout_height="wrap_content"
+                         android:text="Wwdsdssd4455555555"
+                         android:textColor="#1D6FFF "
+                         android:textSize="14sp" />-->
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="45dp"
+                    android:layout_below="@id/ll_wybs"
+                    android:layout_marginLeft="32dp"
+                    android:layout_marginTop="16dp"
+                    android:layout_marginRight="32dp"
+                    android:background="@drawable/bg_shape_hs"
+                    android:orientation="horizontal">
+
+
+                    <EditText
+                        android:id="@+id/et_mm"
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_gravity="center"
+
+                        android:layout_weight="1"
+                        android:background="@null"
+                        android:focusable="true"
+                        android:focusableInTouchMode="true"
+                        android:gravity="center_vertical"
+                        android:hint="请输入密码"
+                        android:inputType="textPassword"
+                        android:paddingLeft="10dp"
+                        android:textColor="#000"
+                        android:textCursorDrawable="@drawable/line_shape"
+                        android:textSize="16sp" />
+
+                    <ImageView
+                        android:id="@+id/pwd_state"
+                        android:layout_width="25dp"
+                        android:layout_height="25dp"
+                        android:layout_gravity="center"
+                        android:layout_marginRight="10dp"
+                        android:background="@drawable/pwd_eye"
+                        android:tag="1" />
+                </LinearLayout>
+
+                <com.zkjc.common.utils.FlowRadioGroup
+                    android:id="@+id/rg_role"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:visibility="gone"
+                    android:layout_centerVertical="true"
+                    android:layout_marginLeft="5dp"
+                    android:layout_gravity="right"
+                    android:layout_marginRight="32dp"
+                    android:layout_marginTop="5dp"
+                    android:layout_marginBottom="5dp"
+                    android:orientation="horizontal">
+
+                    <RadioButton
+                        android:id="@+id/rb_role_mj"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:checked="true"
+                        android:text="我是民警"
+                        android:textSize="14sp" />
+
+                    <RadioButton
+                        android:id="@+id/rb_role_fj"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="我是辅警"
+                        android:textSize="14sp" />
+                </com.zkjc.common.utils.FlowRadioGroup>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="45dp"
+                    android:layout_below="@id/tv_code"
+                    android:visibility="gone"
+                    android:layout_marginLeft="32dp"
+                    android:layout_marginRight="32dp"
+                    android:background="@drawable/bg_shape_hs"
+                    android:orientation="horizontal">
+
+                    <EditText
+                        android:id="@+id/et_mjzh"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:layout_gravity="center"
+                        android:background="@null"
+                        android:focusable="true"
+                        android:focusableInTouchMode="true"
+                        android:gravity="center_vertical"
+                        android:hint="请输入你从属民警的警号"
+                        android:inputType="text"
+                        android:paddingLeft="10dp"
+                        android:textColor="#000"
+                        android:textCursorDrawable="@drawable/line_shape"
+                        android:textSize="16sp" />
+                </LinearLayout>
+
+            </LinearLayout>
+
+        </RelativeLayout>
+
+        <Button
+            android:id="@+id/bt_apply"
+            android:layout_width="262dp"
+            android:layout_height="50dp"
+            android:layout_below="@id/rl"
+            android:layout_centerHorizontal="true"
+            android:layout_marginTop="72dp"
+            android:background="@drawable/sq_shape"
+            android:text="登录"
+            android:textColor="#FFF"
+            android:textSize="14sp" />
+    </RelativeLayout>
+
+
 </LinearLayout>

+ 8 - 0
sqjw/src/main/res/layout/fragment_my.xml

@@ -8,7 +8,15 @@
     <Button
         android:layout_width="match_parent"
         android:text="小程序"
+        android:layout_marginTop="26dp"
         android:id="@+id/bt_open"
         android:layout_height="40dp"/>
 
+    <Button
+        android:layout_width="match_parent"
+        android:text="退出登录"
+        android:layout_marginTop="26dp"
+        android:id="@+id/bt_logout"
+        android:layout_height="40dp"/>
+
 </LinearLayout>

TEMPAT SAMPAH
sqjw/src/main/res/mipmap-xxxhdpi/jh.png


+ 9 - 18
thirdparty/src/main/java/com/zkjc/common/utils/Utils.java → thirdparty/src/main/java/com/zkjc/common/utils/ThirdUtils.java

@@ -19,17 +19,11 @@ import android.text.TextUtils;
 import android.util.Base64;
 import android.view.View;
 import android.view.WindowManager;
-import android.widget.AdapterView;
 import android.widget.TextView;
 import android.widget.Toast;
 
-import com.alibaba.fastjson.JSON;
 import com.zkjc.common.R;
 
-import org.xutils.common.Callback;
-import org.xutils.http.RequestParams;
-import org.xutils.x;
-
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
@@ -43,22 +37,19 @@ import java.net.NetworkInterface;
 import java.net.SocketException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
 import java.util.Date;
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Locale;
-import java.util.Map;
 
 /**
  * Created by cuiMarker on 2017/3/13.
  */
 
-public class Utils {
+public class ThirdUtils {
 
-    private static Utils instances;
+    private static ThirdUtils instances;
 
     private Toast toast = null;
 
@@ -66,11 +57,11 @@ public class Utils {
 
     private TextView msg;
 
-    public static Utils getInstances() {
+    public static ThirdUtils getInstances() {
         if (instances == null) {
-            synchronized (Utils.class) {
+            synchronized (ThirdUtils.class) {
                 if (instances == null) {
-                    instances = new Utils();
+                    instances = new ThirdUtils();
                 }
             }
         }
@@ -376,7 +367,7 @@ public class Utils {
 
     public static String stopRecordSound(Context context) {
         mMediaRecorder.stop();
-        return Utils.getStorageDirectory(context) + "/JingWuTong/" + soundName + ".amr";
+        return ThirdUtils.getStorageDirectory(context) + "/JingWuTong/" + soundName + ".amr";
     }
 
     /**
@@ -400,7 +391,7 @@ public class Utils {
             folderFile.mkdir();//比如:a://xxx/yyy只有xxx存在才能生成yyy。mkdirs()生成全部生成
         }
 
-        File mSoundFile = new File(Utils.getStorageDirectory(context) + "/JingWuTong/" + soundName + ".amr");//获取外存目录
+        File mSoundFile = new File(ThirdUtils.getStorageDirectory(context) + "/JingWuTong/" + soundName + ".amr");//获取外存目录
         //设定录制音频文件的保存位置
         mMediaRecorder.setOutputFile(mSoundFile.getAbsolutePath());//路径/sdcard/soundName.amr
         //
@@ -470,11 +461,11 @@ public class Utils {
         String path = "";
         try {
             bytes = Base64.decode(voiceStr, Base64.DEFAULT);
-            File folderFile = new File(Utils.getStorageDirectory(context) + "/JingWuTong");
+            File folderFile = new File(ThirdUtils.getStorageDirectory(context) + "/JingWuTong");
             if (!folderFile.exists()) {
                 folderFile.mkdir();//比如:a://xxx/yyy只有xxx存在才能生成yyy。mkdirs()生成全部生成
             }
-            path = Utils.getStorageDirectory(context) + "/JingWuTong/" + System.currentTimeMillis() + ".amr";
+            path = ThirdUtils.getStorageDirectory(context) + "/JingWuTong/" + System.currentTimeMillis() + ".amr";
             FileOutputStream fos = new FileOutputStream(
                     new File(path));
             fos.write(bytes);

+ 4 - 4
wgrhc/build.gradle

@@ -66,17 +66,17 @@ android {
     }
     productFlavors {
         //应用商店版本
-        appstore {
+        jdrh {
             resValue "string", "app_name", "外国人核查"
             signingConfig signingConfigs.release
-            manifestPlaceholders = [UMENG_CHANNEL: "appstore", CATEGORY: "android.intent.category.DEFAULT", APP_ICON: "@mipmap/ic_launcher"]
+            manifestPlaceholders = [UMENG_CHANNEL: "jdrh", CATEGORY: "android.intent.category.DEFAULT", APP_ICON: "@mipmap/ic_launcher"]
         }
         //非应用商店版本
-        unappstore {
+        jdrh {
 
             resValue "string", "app_name", "外国人核查"
             signingConfig signingConfigs.release
-            manifestPlaceholders = [UMENG_CHANNEL: "unappstore", CATEGORY: "android.intent.category.LAUNCHER", APP_ICON: "@mipmap/ic_launcher"]
+            manifestPlaceholders = [UMENG_CHANNEL: "jdrh", CATEGORY: "android.intent.category.LAUNCHER", APP_ICON: "@mipmap/ic_launcher"]
         }
 
 

+ 7 - 0
wgrhc/src/main/AndroidManifest.xml

@@ -51,6 +51,13 @@
         <meta-data
             android:name="com.xwkj.wgrhc.app.GlobalConfiguration"
             android:value="ConfigModule" />
+
+        <meta-data
+            android:name="com.amap.api.v2.apikey"
+            android:value="31bdee4c691658c84d7372d646b9c957" />
+        <meta-data
+            android:name="UMENG_CHANNEL"
+            android:value="${UMENG_CHANNEL_VALUE}" />
     </application>
 
 </manifest>

+ 4 - 5
wgrhc/src/main/java/com/xwkj/wgrhc/mvp/ui/activity/MainActivity.java

@@ -18,7 +18,6 @@ import com.google.gson.Gson;
 import com.google.gson.JsonObject;
 import com.google.gson.JsonParser;
 import com.hjq.toast.ToastUtils;
-import com.jess.arms.base.BaseActivity;
 import com.jess.arms.di.component.AppComponent;
 import com.jess.arms.utils.ArmsUtils;
 
@@ -33,7 +32,7 @@ import com.xwkj.wgrhc.R;
 import com.xwkj.wgrhc.mvp.ui.fragment.WhcWgrFragment;
 import com.xwkj.wgrhc.mvp.ui.fragment.YhcWgrFragment;
 import com.zkjc.common.base.ZkjcBaseActivity;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 import com.zkjc.common.view.CommonTitleBar;
 
 
@@ -183,7 +182,7 @@ public class MainActivity extends ZkjcBaseActivity<MainPresenter> implements Mai
     @Override
     public void onSuccess(String result) {
 
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         System.out.println("****" + result);
         try {
             System.out.println("用户信息" + result);
@@ -199,7 +198,7 @@ public class MainActivity extends ZkjcBaseActivity<MainPresenter> implements Mai
                     return;
                 }*/
 
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 saveLoginInfo(entity);
 
 
@@ -247,7 +246,7 @@ public class MainActivity extends ZkjcBaseActivity<MainPresenter> implements Mai
         }
         //  edit.putLong("loginTime", System.currentTimeMillis() / 1000);
 
-        Utils.getInstances().dismissDialog();
+        ThirdUtils.getInstances().dismissDialog();
         edit.commit();
         sharedPreferences.edit().putBoolean("isFirst", false).commit();
 

+ 7 - 0
xfjc/src/main/AndroidManifest.xml

@@ -135,6 +135,13 @@
         <meta-data
             android:name="com.xwkj.xfjc.app.GlobalConfiguration"
             android:value="ConfigModule" />
+
+        <meta-data
+            android:name="com.amap.api.v2.apikey"
+            android:value="1395bd40aaec40fa26732399fd0fc2f6" />
+        <meta-data
+            android:name="UMENG_CHANNEL"
+            android:value="${UMENG_CHANNEL_VALUE}" />
     </application>
 
 </manifest>

TEMPAT SAMPAH
xfjc/src/main/assets/aip-ocr.license


+ 1 - 2
xfjc/src/main/java/com/xwkj/xfjc/app/utils/ReqToBus.java

@@ -74,7 +74,7 @@ public class ReqToBus {
         String token = sp.getString("token", " ");
         reqValue.put("token", "bearer " + token);
         reqValue.put("version_code", ApkUtils.getVersionCode(context));
-        reqValue.put("appId", "1846809831194980354");
+        reqValue.put("appId", sp.getString("appId", ""));
         if (!reqValue.containsKey("username")) {
 //        param.put("username", "admin");
 //        param.put("password", "937b0ec364aff24c011307493f5155b4");
@@ -211,7 +211,6 @@ public class ReqToBus {
                     public void onError(Throwable t) {
                         super.onError(t);
                         interFace.onError(t);
-
                     }
 
                     @Override

+ 8 - 1
xfjc/src/main/java/com/xwkj/xfjc/app/utils/StringUtil.java

@@ -1,7 +1,11 @@
 package com.xwkj.xfjc.app.utils;
 
+import android.content.Context;
 import android.text.TextUtils;
 
+import com.jess.arms.base.BaseApplication;
+import com.zkjc.common.utils.ApkUtils;
+
 public class StringUtil {
 
     /**
@@ -21,7 +25,10 @@ public class StringUtil {
      * @param str
      * @return
      */
-    public static String replaceString(String str) {
+    public static String replaceString(String str, Context context) {
+        if (ApkUtils.isSqjw(context)) {
+            return str;
+        }
         if (TextUtils.isEmpty(str) || str.length() < 6) {
             return str;
         }

+ 1 - 0
xfjc/src/main/java/com/xwkj/xfjc/mvp/model/api/Api.java

@@ -11,4 +11,5 @@ package com.xwkj.xfjc.mvp.model.api;
  */
 public interface Api {
     String APP_DOMAIN = "http://192.168.0.12:1234";
+//    String APP_DOMAIN = "http://192.168.20.228:7022/yysd/";
 }

+ 6 - 6
xfjc/src/main/java/com/xwkj/xfjc/mvp/presenter/CsJcLbPresenter.java

@@ -26,7 +26,7 @@ import com.xwkj.xfjc.app.utils.ReqToBus;
 import com.xwkj.xfjc.mvp.contract.CsJcLbContract;
 import com.xwkj.xfjc.mvp.model.entity.NormalEntity;
 import com.xwkj.xfjc.mvp.model.entity.YjcxEntity;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -86,7 +86,7 @@ public class CsJcLbPresenter extends BasePresenter<CsJcLbContract.Model, CsJcLbC
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
 
             }
 
@@ -114,7 +114,7 @@ public class CsJcLbPresenter extends BasePresenter<CsJcLbContract.Model, CsJcLbC
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
 
             }
 
@@ -139,7 +139,7 @@ public class CsJcLbPresenter extends BasePresenter<CsJcLbContract.Model, CsJcLbC
                 .subscribe(new ErrorHandleSubscriber<JsonObject>(mErrorHandler) {
                     @Override
                     public void onNext(JsonObject jsonObject) {
-                        Utils.getInstances().dismissDialog();
+                        ThirdUtils.getInstances().dismissDialog();
                         Log.e("eee", "jsonObject === " + jsonObject);
                         NormalEntity entity = new Gson().fromJson(jsonObject.toString(), NormalEntity.class);
                         if (entity.getCode() == 200) {
@@ -199,7 +199,7 @@ public class CsJcLbPresenter extends BasePresenter<CsJcLbContract.Model, CsJcLbC
         ReqToBus.getInstance().init(mApplication).getRequest(param, new CommonInterFace() {
             @Override
             public void onSuccess(String result) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 YjcxEntity entity = new Gson().fromJson(result, YjcxEntity.class);
                 if ("200".equals(entity.getStatus())) {
                     if (mRootView != null) {
@@ -212,7 +212,7 @@ public class CsJcLbPresenter extends BasePresenter<CsJcLbContract.Model, CsJcLbC
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
 
             }
 

+ 8 - 8
xfjc/src/main/java/com/xwkj/xfjc/mvp/presenter/JxcsCjPresenter.java

@@ -23,7 +23,7 @@ import com.xwkj.xfjc.app.utils.CommonInterFace;
 import com.xwkj.xfjc.app.utils.ReqToBus;
 import com.xwkj.xfjc.mvp.contract.JxcsCjContract;
 import com.xwkj.xfjc.mvp.model.entity.NormalEntity;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -75,7 +75,7 @@ public class JxcsCjPresenter extends BasePresenter<JxcsCjContract.Model, JxcsCjC
             @Override
             public void onSuccess(String result) {
 
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 NormalEntity entity = new Gson().fromJson(result, NormalEntity.class);
                 int code = entity.getCode();
                 if (code == 200) {
@@ -89,7 +89,7 @@ public class JxcsCjPresenter extends BasePresenter<JxcsCjContract.Model, JxcsCjC
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("上报失败,请重试");
             }
 
@@ -115,7 +115,7 @@ public class JxcsCjPresenter extends BasePresenter<JxcsCjContract.Model, JxcsCjC
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("上报失败,请重试");
             }
 
@@ -135,7 +135,7 @@ public class JxcsCjPresenter extends BasePresenter<JxcsCjContract.Model, JxcsCjC
         ReqToBus.getInstance().init(mApplication).getRequest(map1, new CommonInterFace() {
             @Override
             public void onSuccess(String result) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 NormalEntity entity = new Gson().fromJson(result, NormalEntity.class);
                 int code = entity.getCode();
                 if (code == 200) {
@@ -149,7 +149,7 @@ public class JxcsCjPresenter extends BasePresenter<JxcsCjContract.Model, JxcsCjC
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
                 ToastUtils.show("上报失败,请重试");
             }
 
@@ -176,7 +176,7 @@ public class JxcsCjPresenter extends BasePresenter<JxcsCjContract.Model, JxcsCjC
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
             }
 
             @Override
@@ -211,7 +211,7 @@ public class JxcsCjPresenter extends BasePresenter<JxcsCjContract.Model, JxcsCjC
                     @Override
                     public void onError(Throwable t) {
                         super.onError(t);
-                        Utils.getInstances().dismissDialog();
+                        ThirdUtils.getInstances().dismissDialog();
                         //  ToastUtils.show("上报失败,请重试");
                     }
 

+ 2 - 2
xfjc/src/main/java/com/xwkj/xfjc/mvp/presenter/MainPresenter.java

@@ -14,7 +14,7 @@ import javax.inject.Inject;
 import com.xwkj.xfjc.app.utils.CommonInterFace;
 import com.xwkj.xfjc.app.utils.ReqToBus;
 import com.xwkj.xfjc.mvp.contract.MainContract;
-import com.zkjc.common.utils.Utils;
+import com.zkjc.common.utils.ThirdUtils;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -71,7 +71,7 @@ public class MainPresenter extends BasePresenter<MainContract.Model, MainContrac
 
             @Override
             public void onError(Throwable throwable) {
-                Utils.getInstances().dismissDialog();
+                ThirdUtils.getInstances().dismissDialog();
             }
 
             @Override

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini