2 Commitit a7ddc5f0bf ... b7bc0bb010

Tekijä SHA1 Viesti Päivämäärä
  ChengJH b7bc0bb010 恢复包名 1 kuukausi sitten
  ChengJH 788d0e2ee9 初始化项目,复用,更白包名 8 kuukautta sitten

+ 52 - 0
app/src/main/java/com/uas/equipment/bean/VersionUpgradeBean.java

@@ -0,0 +1,52 @@
+package com.uas.equipment.bean;
+
+/**
+ * Created by cjh-sail on 2023-06-25
+ */
+public class VersionUpgradeBean {
+    public String PP_PDACODE;
+    public String PP_VERSIONNUM;
+    public String PP_ATTACH;
+    public String PP_REMARK;
+    public String PP_VERSIONNAME;
+
+    public String getPP_PDACODE() {
+        return PP_PDACODE;
+    }
+
+    public void setPP_PDACODE(String PP_PDACODE) {
+        this.PP_PDACODE = PP_PDACODE;
+    }
+
+    public String getPP_VERSIONNUM() {
+        return PP_VERSIONNUM;
+    }
+
+    public void setPP_VERSIONNUM(String PP_VERSIONNUM) {
+        this.PP_VERSIONNUM = PP_VERSIONNUM;
+    }
+
+    public String getPP_ATTACH() {
+        return PP_ATTACH;
+    }
+
+    public void setPP_ATTACH(String PP_ATTACH) {
+        this.PP_ATTACH = PP_ATTACH;
+    }
+
+    public String getPP_REMARK() {
+        return PP_REMARK;
+    }
+
+    public void setPP_REMARK(String PP_REMARK) {
+        this.PP_REMARK = PP_REMARK;
+    }
+
+    public String getPP_VERSIONNAME() {
+        return PP_VERSIONNAME;
+    }
+
+    public void setPP_VERSIONNAME(String PP_VERSIONNAME) {
+        this.PP_VERSIONNAME = PP_VERSIONNAME;
+    }
+}

+ 39 - 9
app/src/main/java/com/uas/equipment/fragment/VersionUpgradeFragment.java

@@ -13,10 +13,12 @@ import android.widget.Button;
 import android.widget.TextView;
 
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.android.volley.Request;
 import com.android.volley.toolbox.StringRequest;
 import com.uas.equipment.R;
+import com.uas.equipment.bean.VersionUpgradeBean;
 import com.uas.equipment.global.GloableParams;
 import com.uas.equipment.util.AndroidUtil;
 import com.uas.equipment.util.CommonUtil;
@@ -32,6 +34,8 @@ import com.uas.equipment.util.down.ProgressResponseBody;
 
 import java.io.File;
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 import static com.uas.equipment.util.Constants.CONSTANT.APK_FILE_NAME;
 import static com.uas.equipment.util.Constants.CONSTANT.APK_FILE_PATH;
@@ -148,16 +152,42 @@ public class VersionUpgradeFragment extends BaseFragment implements ProgressResp
                         progressDialog.dismiss();
                         String result = o.toString();
                         JSONObject resultObject = JSON.parseObject(result);
-                        JSONObject dataObject = resultObject.getJSONObject("data");
-                        if (dataObject != null) {
-                            mNewVersionTv.setText(FastjsonUtil.getText(dataObject, "pp_versionname"));
-                            mMsgTextView.setText(FastjsonUtil.getText(dataObject, "pp_remark"));
+                        JSONArray dataArray = resultObject.getJSONArray("data");
+                        List<VersionUpgradeBean> list=new ArrayList<>();
+                        list.clear();
+                        if (dataArray != null && dataArray.size() > 0) {
+                            for (int i = 0; i < dataArray.size(); i++) {
+                                JSONObject dataObject = dataArray.getJSONObject(i);
+                                if (dataObject != null) {
+                                    VersionUpgradeBean jltStorageInBean = new VersionUpgradeBean();
+                                    if (FastjsonUtil.getText(dataObject, "PP_PDACODE").equals("UAS设备管理")){
+                                        jltStorageInBean.setPP_PDACODE(FastjsonUtil.getText(dataObject, "PP_PDACODE"));
+                                        jltStorageInBean.setPP_VERSIONNUM(FastjsonUtil.getText(dataObject, "PP_VERSIONNUM"));
+                                        jltStorageInBean.setPP_ATTACH(FastjsonUtil.getText(dataObject, "PP_ATTACH"));
+                                        jltStorageInBean.setPP_REMARK(FastjsonUtil.getText(dataObject, "PP_REMARK"));
+                                        jltStorageInBean.setPP_VERSIONNAME(FastjsonUtil.getText(dataObject, "PP_VERSIONNAME"));
+                                        list.add(jltStorageInBean);
+                                        mUpgradeButton.setVisibility(View.VISIBLE);
+                                    }else {
+                                        mUpgradeButton.setVisibility(View.GONE);
+                                    }
 
-                            mAttachId = FastjsonUtil.getText(dataObject, "pp_attach");
-                            if (!TextUtils.isEmpty(mAttachId)) {
-                                mUpgradeButton.setVisibility(View.VISIBLE);
-                            } else {
-                                mUpgradeButton.setVisibility(View.VISIBLE);
+                                }
+                            }
+                        }
+                        if (list == null || list.size() == 0){
+                            mUpgradeButton.setVisibility(View.GONE);
+                        }else {
+                            for (int i=0;i<list.size();i++){
+                                VersionUpgradeBean versionUpgradeBean = list.get(0);
+                                mNewVersionTv.setText(versionUpgradeBean.getPP_VERSIONNAME());
+                                mMsgTextView.setText(versionUpgradeBean.getPP_REMARK());
+                                mAttachId = versionUpgradeBean.getPP_ATTACH();
+                                if (!TextUtils.isEmpty(mAttachId)) {
+                                    mUpgradeButton.setVisibility(View.VISIBLE);
+                                } else {
+                                    mUpgradeButton.setVisibility(View.VISIBLE);
+                                }
                             }
                         }
                     }

+ 11 - 0
app/src/main/res/layout-large/camera.xml

@@ -0,0 +1,11 @@
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <FrameLayout
+        android:id="@+id/fl_zxing_container"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" />
+
+
+</RelativeLayout>

+ 90 - 0
app/src/main/res/layout-large/fragment_capture.xml

@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+                xmlns:innerrect="http://schemas.android.com/apk/res-auto"
+                android:layout_width="fill_parent"
+                android:layout_height="fill_parent"
+    >
+
+    <FrameLayout
+        android:id="@+id/scan_fl"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_centerInParent="true">
+        <SurfaceView
+            android:id="@+id/preview_view"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"/>
+        <RelativeLayout android:layout_width="wrap_content"
+                        android:layout_height="wrap_content">
+            <com.uas.equipment.camera.ViewfinderView
+                android:id="@+id/viewfinder_view"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                innerrect:inner_height="260dp"
+                innerrect:inner_margintop="120dp"
+                innerrect:inner_scan_speed="60"
+                innerrect:inner_width="260dp"/>
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerHorizontal="true"
+                android:layout_marginTop="400dp"
+                android:text="请将二维码/条形码置于扫描框内"
+                android:textColor="#FF8200"
+                android:textSize="20sp"
+                android:visibility="gone"
+                />
+            <ImageView
+                android:id="@+id/flashlight_iv"
+                android:layout_width="40dp"
+                android:layout_height="40dp"
+                android:layout_centerHorizontal="true"
+                android:layout_marginTop="400dp"
+                android:src="@drawable/ic_flashlight_off"/>
+        </RelativeLayout>
+
+    </FrameLayout>
+    <!--
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/scan_fl"
+            android:text="将二维码/条码置于扫描框内,即可自动扫描"
+            android:textSize="18sp"
+            android:layout_centerHorizontal="true"
+            android:textColor="#ffffff"/>-->
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="60dp"
+        android:background="@color/transparent"
+        android:padding="10dp">
+        <TextView
+            android:id="@+id/back_tv"
+            android:layout_width="wrap_content"
+            android:layout_height="40dp"
+            android:layout_marginLeft="5dp"
+            android:gravity="center"
+            android:text="取消"
+            android:textColor="#FF8200"
+            android:textSize="20sp"/>
+        <!--<ImageView
+            android:id="@+id/qrcode_iv"
+            android:layout_width="30dp"
+            android:layout_height="30dp"
+            android:layout_alignParentRight="true"
+            android:src="@drawable/scan_light"
+            android:layout_marginRight="5dp"/>-->
+
+        <TextView android:layout_width="wrap_content"
+                  android:layout_height="wrap_content"
+                  android:layout_centerInParent="true"
+                  android:text="二维码/条形码"
+                  android:textColor="#FF8200"
+                  android:textSize="20sp"/>
+
+    </RelativeLayout>
+
+</RelativeLayout>

+ 1 - 2
app/src/main/res/layout/fragment_storage_recharge_list.xml

@@ -40,7 +40,7 @@
         android:layout_height="wrap_content">
         <TextView
             android:id="@+id/tv_de_code"
-            android:text="名称:"
+            android:text="@string/recharge_name"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:textColor="@color/blueq">
@@ -140,7 +140,6 @@
             android:layout_height="wrap_content"
             android:background="@drawable/bg_button"
             android:layout_gravity="center"
-            android:layout_marginTop="50dp"
             android:text="提交"
             android:textColor="@color/white"
             android:layout_marginBottom="@dimen/textsize_20">

+ 1 - 0
app/src/main/res/values/strings.xml

@@ -432,6 +432,7 @@
     <string name="title_storage_recharge">收料</string>
 
     <string name="title_code_pihao">条码号/生产批号</string>
+    <string name="recharge_name">名称:</string>
     <!--hi-->
     <string-array name="material_collect_menu">
         <item>已采集列表</item>

+ 1 - 1
pda_libs/pulltoreflashlibrary/build/intermediates/incremental/packageDebugResources/compile-file-map.properties

@@ -1,4 +1,4 @@
-#Mon Jun 19 16:58:43 CST 2023
+#Mon Jan 22 14:44:47 CST 2024
 D\:\\AndroidData\\NewEquipmentManagement\\pda_libs\\pulltoreflashlibrary\\src\\main\\res\\anim\\slide_in_from_top.xml=D\:\\AndroidData\\NewEquipmentManagement\\pda_libs\\pulltoreflashlibrary\\build\\intermediates\\packaged_res\\debug\\anim\\slide_in_from_top.xml
 D\:\\AndroidData\\NewEquipmentManagement\\pda_libs\\pulltoreflashlibrary\\src\\main\\res\\drawable\\indicator_bg_bottom.xml=D\:\\AndroidData\\NewEquipmentManagement\\pda_libs\\pulltoreflashlibrary\\build\\intermediates\\packaged_res\\debug\\drawable\\indicator_bg_bottom.xml
 D\:\\AndroidData\\NewEquipmentManagement\\pda_libs\\pulltoreflashlibrary\\src\\main\\res\\layout\\pull_to_refresh_header_vertical.xml=D\:\\AndroidData\\NewEquipmentManagement\\pda_libs\\pulltoreflashlibrary\\build\\intermediates\\packaged_res\\debug\\layout\\pull_to_refresh_header_vertical.xml