Переглянути джерело

本地结果页
成功显示人员信息列表

Shangyp 2 місяців тому
батько
коміт
6cbcb368aa

+ 27 - 13
app/src/main/java/com/hanghui/senic/activity/view/BaiDuFaceView.java

@@ -150,6 +150,7 @@ public class BaiDuFaceView {
     TextView loadingLocally_ThrLabel;
     ImageView loadingLocally_ThrValue;
     RelativeLayout outcomeActivity_Outcome;
+    RelativeLayout outcomeActivity_FloatingButton;
     //大图结果页
     RelativeLayout outcomeActivity_OutcomeMAXPicture;
     ImageView outcomeActivity_OutcomeImageMAXPicture;
@@ -404,6 +405,9 @@ public class BaiDuFaceView {
         loadingLocally_ThrLabel = view.findViewById(R.id.LoadingLocally_ThrLabel);
         loadingLocally_ThrValue = view.findViewById(R.id.LoadingLocally_ThrValue);
         outcomeActivity_Outcome = view.findViewById(R.id.OutcomeActivity_Outcome);
+        if (ConfigManager.isFloatingPages()) {
+            outcomeActivity_FloatingButton = view.findViewById(R.id.outcomeActivity_FloatingButton);
+        }
         //大图成功结果页
         outcomeActivity_OutcomeImageMAXPicture = view.findViewById(R.id.OutcomeActivity_OutcomeImageMAXPicture);
         outcomeActivity_OutcomeTextViewMAXPicture = view.findViewById(R.id.OutcomeActivity_OutcomeTextViewMAXPicture);
@@ -2305,6 +2309,11 @@ public class BaiDuFaceView {
             outcomeActivity_PAGE_TYPE_CLOSING_PENDING_MULTIPLE.setVisibility(View.GONE);
             loadingLocally_TopLinearLayout.setVisibility(View.VISIBLE);
             loadingLocally_TopLinearLayoutImageRelativeLayout.setVisibility(View.VISIBLE);
+            if (ConfigManager.getAuthenticationBeanListBean().getSuccessShowPersenalInfoList() == null ){
+                outcomeActivity_FloatingButton.setVisibility(View.GONE);
+            }else {
+                outcomeActivity_FloatingButton.setVisibility(View.VISIBLE);
+            }
         }
         outcomeActivity_PAGE_TYPE_CLOSING_PENDING_MULTIPLE.setVisibility(View.GONE);
         String name = federatedPlatformsResponseBean.getData().getName();
@@ -2367,16 +2376,21 @@ public class BaiDuFaceView {
         if (ConfigManager.isFloatingPages()) {
 //            outcomeActivity_LocalError_idNumberLinear2.setVisibility(View.GONE);
             RequestOptions options = new RequestOptions().bitmapTransform(new RoundedCorners(10));
-            if (!StringIsNull.IsStringNull(ScenePhoto)) {
-                ImageLoaderUtils.loadImage(ScenePhoto,outcomeActivity_OutcomeImage,options);
-            } else if (!StringIsNull.IsStringNull(IDPhoto)) {
-                ImageLoaderUtils.loadImage(IDPhoto,outcomeActivity_OutcomeImage,options);
-            }else if (bitmap != null) {
-                Drawable drawable=new BitmapDrawable(outcomeActivity_OutcomeImage.getResources(),bitmap);
-                options.placeholder(drawable).diskCacheStrategy(DiskCacheStrategy.NONE).skipMemoryCache(true);
-                ImageLoaderUtils.loadImage(bitmap,outcomeActivity_OutcomeImage,options);
-            } else {
-                ImageLoaderUtils.loadImage(R.mipmap.outcomeactivity_outcomeimagemax_picture,outcomeActivity_OutcomeImage);
+            if (ConfigManager.isSuccessShowPersenalInfoPhoto){
+                outcomeActivity_OutcomeImage.setVisibility(View.VISIBLE);
+                if (!StringIsNull.IsStringNull(ScenePhoto)) {
+                    ImageLoaderUtils.loadImage(ScenePhoto,outcomeActivity_OutcomeImage,options);
+                } else if (!StringIsNull.IsStringNull(IDPhoto)) {
+                    ImageLoaderUtils.loadImage(IDPhoto,outcomeActivity_OutcomeImage,options);
+                }else if (bitmap != null) {
+                    Drawable drawable=new BitmapDrawable(outcomeActivity_OutcomeImage.getResources(),bitmap);
+                    options.placeholder(drawable).diskCacheStrategy(DiskCacheStrategy.NONE).skipMemoryCache(true);
+                    ImageLoaderUtils.loadImage(bitmap,outcomeActivity_OutcomeImage,options);
+                } else {
+                    ImageLoaderUtils.loadImage(R.mipmap.outcomeactivity_outcomeimagemax_picture,outcomeActivity_OutcomeImage);
+                }
+            }else {
+                outcomeActivity_OutcomeImage.setVisibility(View.GONE);
             }
             if (!StringIsNull.IsStringNull(federatedPlatformsResponseBean.getData().getALineThrValue())) {
                 ImageLoaderUtils.loadImage(federatedPlatformsResponseBean.getData().getALineThrValue(),loadingLocally_ThrValue,options);
@@ -2384,19 +2398,19 @@ public class BaiDuFaceView {
             ImageLoaderUtils.loadImage(R.mipmap.blue_background_gradient,loadingLocally_TopLinearLayoutImage);
             ImageLoaderUtils.loadImage(R.mipmap.mainactivity_aicon,loadingLocally_Image);
             loadingLocally_TopLinearLayoutImageRelativeLayout.setVisibility(View.VISIBLE);
-            if (!StringIsNull.IsStringNull(name)) {
+            if (!StringIsNull.IsStringNull(name) && ConfigManager.isSuccessShowPersenalInfoName) {
                 outcomeActivity_OutcomeName.setVisibility(View.VISIBLE);
                 outcomeActivity_OutcomeName.setText(name);
             } else {
                 outcomeActivity_OutcomeName.setVisibility(View.GONE);
             }
-            if (!StringIsNull.IsStringNull(idCard)) {
+            if (!StringIsNull.IsStringNull(idCard) && ConfigManager.isSuccessShowPersenalInfoIDCard) {
                 outcomeActivity_OutcomeSecond.setVisibility(View.VISIBLE);
                 outcomeActivity_OutcomeSecond.setText(idCard);
             } else {
                 outcomeActivity_OutcomeSecond.setVisibility(View.GONE);
             }
-            if (!StringIsNull.IsStringNull(phone)) {
+            if (!StringIsNull.IsStringNull(phone) && ConfigManager.isSuccessShowPersenalInfoPhone) {
                 OutcomeActivity_Phone.setVisibility(View.VISIBLE);
                 OutcomeActivity_Phone.setText(phone);
             } else {

+ 10 - 0
app/src/main/java/com/hanghui/senic/bean/AuthenticationBean.java

@@ -494,6 +494,16 @@ public class AuthenticationBean {
         private long serverTime;//服务器时间
         @SerializedName("setPersonalList")
         List<Integer> setPersonalList; //设置——人员列表”【控制设置页里的人员数据的信息】 1-照片,2-证件号,3-手机号
+        @SerializedName("successShowPersenalInfoList")
+        List<Integer> successShowPersenalInfoList;//成功显示人员信息列表1-照片,2-姓名,3-证件号,4-手机号
+
+        public List<Integer> getSuccessShowPersenalInfoList() {
+            return successShowPersenalInfoList;
+        }
+
+        public void setSuccessShowPersenalInfoList(List<Integer> successShowPersenalInfoList) {
+            this.successShowPersenalInfoList = successShowPersenalInfoList;
+        }
 
         public Integer getSameFaceInterval() {
             return sameFaceInterval;

+ 4 - 0
app/src/main/java/com/hanghui/senic/common/gson/CompleteDataUtil.java

@@ -475,6 +475,10 @@ public class CompleteDataUtil {
 
     //补全在线配置数据类型为int、boolean类型的字段
     public static void completeData(AuthenticationBean authenticationBean) {
+        if (authenticationBean.getData().get(0).getSuccessShowPersenalInfoList() == null ||
+                authenticationBean.getData().get(0).getSuccessShowPersenalInfoList().size() == 0){
+            authenticationBean.getData().get(0).setSuccessShowPersenalInfoList(null);
+        }
         if (authenticationBean.getData().get(0).getSameFaceInterval() == null){
             authenticationBean.getData().get(0).setSameFaceInterval(0);
         }

+ 2 - 1
app/src/main/java/com/hanghui/senic/network/HttpRequest.java

@@ -264,7 +264,8 @@ public class HttpRequest {
         setMediaVolume();
         //设置下拉通知栏及导航栏
         setNotificationAndNavigationBar();
-
+        //设置本地结果页证件照片等信息是否显示
+//        ConfigManager.isSuccessShowPersenalInfo();
         //补光灯设置
         RelaysAndLedUtile.getInstance().setLedLight(ConfigManager.getAuthenticationBeanListBean().getLightMode(), false);
 

+ 27 - 0
app/src/main/java/com/hanghui/senic/service/usbserialdemo/utile/ConfigManager.java

@@ -1539,4 +1539,31 @@ public class ConfigManager {
         }
 
     }
+
+    /**
+     * 1-照片,2-姓名,3-证件号,4-手机号
+     * @param type
+     * @return
+     */
+    public static boolean isSuccessShowPersenalInfoName = false;
+    public static boolean isSuccessShowPersenalInfoPhone = false;
+    public static boolean isSuccessShowPersenalInfoPhoto = false;
+    public static boolean isSuccessShowPersenalInfoIDCard = false;
+    public static void isSuccessShowPersenalInfo(){
+        if (ConfigManager.getAuthenticationBeanListBean().getSuccessShowPersenalInfoList() ==null ||
+                ConfigManager.getAuthenticationBeanListBean().getSuccessShowPersenalInfoList().size() == 0){
+            return;
+        }
+        for (int i = 0; i < ConfigManager.getAuthenticationBeanListBean().getSuccessShowPersenalInfoList().size(); i++) {
+            if (ConfigManager.getAuthenticationBeanListBean().getSuccessShowPersenalInfoList().get(i) == 1){
+                isSuccessShowPersenalInfoPhoto = true;
+            } else if (ConfigManager.getAuthenticationBeanListBean().getSuccessShowPersenalInfoList().get(i) == 2){
+                isSuccessShowPersenalInfoName = true;
+            } else if (ConfigManager.getAuthenticationBeanListBean().getSuccessShowPersenalInfoList().get(i) == 3) {
+                isSuccessShowPersenalInfoIDCard = true;
+            } else if (ConfigManager.getAuthenticationBeanListBean().getSuccessShowPersenalInfoList().get(i) == 4) {
+                isSuccessShowPersenalInfoPhone = true;
+            }
+        }
+    }
 }

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

@@ -391,6 +391,7 @@
                 </LinearLayout>
 
                 <RelativeLayout
+                    android:id="@+id/outcomeActivity_FloatingButton"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_alignParentBottom="true"