浏览代码

修改正则判断,扫一扫增加储位显示,下拉刷新,修改保养类型

ChengJH 2 年之前
父节点
当前提交
a7ddc5f0bf

+ 3 - 1
app/build.gradle

@@ -59,7 +59,9 @@ android {
         sourceCompatibility 1.8
     }
 }
-
+android {
+    ndkVersion "22.1.7171670"
+}
 dependencies {
     implementation fileTree(include: ['*.jar'], dir: 'libs')
     implementation 'com.android.support.constraint:constraint-layout:2.0.1'

+ 7 - 6
app/src/main/java/com/uas/equipment/bean/MaintainitemBean.java

@@ -7,7 +7,7 @@ public class MaintainitemBean {
     private String mi_id;
     private String mi_detno;
     private String mi_item;
-    private String mi_desc;
+    private String MI_DESC;
     private String mi_deid;
     private String mi_isweek;
     private String mi_ismonth;
@@ -19,10 +19,11 @@ public class MaintainitemBean {
     private String mi_recentmaStringdate;
     private boolean isChecked;
 
-    public MaintainitemBean(String mi_id, String mi_item,String mi_detno) {
+    public MaintainitemBean(String mi_id, String mi_item,String mi_detno,String MI_DESC) {
         this.mi_id = mi_id;
         this.mi_item = mi_item;
         this.mi_detno = mi_detno;
+        this.MI_DESC = MI_DESC;
     }
 
     public boolean isChecked() {
@@ -57,12 +58,12 @@ public class MaintainitemBean {
         this.mi_item = mi_item;
     }
 
-    public String getMi_desc() {
-        return mi_desc;
+    public String getMI_DESC() {
+        return MI_DESC;
     }
 
-    public void setMi_desc(String mi_desc) {
-        this.mi_desc = mi_desc;
+    public void setMI_DESC(String MI_DESC) {
+        this.MI_DESC = MI_DESC;
     }
 
     public String getMi_deid() {

+ 95 - 63
app/src/main/java/com/uas/equipment/fragment/StorageInFragment.java

@@ -27,6 +27,8 @@ import com.bin.david.form.data.column.Column;
 import com.bin.david.form.data.format.bg.BaseCellBackgroundFormat;
 import com.bin.david.form.data.style.FontStyle;
 import com.bin.david.form.data.table.TableData;
+import com.scwang.smartrefresh.layout.api.RefreshLayout;
+import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
 import com.uas.equipment.R;
 import com.uas.equipment.activity.FunctionActivity;
 import com.uas.equipment.bean.BeanitemsBean;
@@ -34,7 +36,9 @@ import com.uas.equipment.bean.Items1Bean;
 import com.uas.equipment.bean.MessageEvents;
 import com.uas.equipment.bean.itemdata;
 import com.uas.equipment.global.GloableParams;
+import com.uas.equipment.tools.SharedPreUtil;
 import com.uas.equipment.util.CommonUtil;
+import com.uas.equipment.util.Constants;
 import com.uas.equipment.util.FastjsonUtil;
 import com.uas.equipment.util.FragmentUtils;
 import com.uas.equipment.util.HttpCallback;
@@ -74,6 +78,8 @@ public class StorageInFragment extends BaseFragment implements View.OnClickListe
     private String de_name1;
     private SmartTable mSmartTable2;
     private List<Items1Bean> beanitemsList2;
+    private RefreshLayout mRefreshLayout;
+    private TextView tv_de_location;
 
     @Override
     protected int getLayout() {
@@ -92,6 +98,7 @@ public class StorageInFragment extends BaseFragment implements View.OnClickListe
 
     @Override
     protected void initEvents() {
+        mRefreshLayout = mActivity.findViewById(R.id.pda_wms_in_filter_list_srl);
         tv_de_code = root.findViewById(R.id.tv_de_code);
         tv_de_vendor = root.findViewById(R.id.tv_de_vendor);
         tv_de_name = root.findViewById(R.id.tv_de_name);
@@ -99,6 +106,7 @@ public class StorageInFragment extends BaseFragment implements View.OnClickListe
         tv_de_currentcentername = root.findViewById(R.id.tv_de_currentcentername);
         tv_de_contact = root.findViewById(R.id.tv_de_contact);
         tv_de_telvendor = root.findViewById(R.id.tv_de_telvendor);
+        tv_de_location = root.findViewById(R.id.tv_de_location);
         mMenuButton = (Button) mActivity.findViewById(R.id.btn_actionbar_more);
 
         mSmartTable = root.findViewById(R.id.pda_wms_in_filter_list_st);
@@ -183,6 +191,19 @@ public class StorageInFragment extends BaseFragment implements View.OnClickListe
         mDE_DCKIND = new Column<String>("保养类型", "DE_DCKIND");
         mDE_NEXTDATEBYWEEK = new Column<String>("下次保养日期", "DE_NEXTDATEBYWEEK");
         initPopupWindow();
+
+
+
+        mRefreshLayout.setOnRefreshListener(new OnRefreshListener() {
+            @Override
+            public void onRefresh(RefreshLayout refreshLayout) {
+                String scanResult = SharedPreUtil.getString(getActivity().getApplicationContext(), Constants.FLAG.SWEEP, null);
+                getNewData(scanResult);
+            }
+        });
+
+
+
     }
     @Subscribe
     public void onMessageEvent(MessageEvents event) {
@@ -295,74 +316,84 @@ public class StorageInFragment extends BaseFragment implements View.OnClickListe
             @Override
             public void onSuccess(int flag, Object o) throws Exception {
                 progressDialog.dismiss();
-                beanitemsList.clear();
-                beanitemsList2.clear();
-                String result = o.toString();
-                JSONObject resultObject = JSON.parseObject(result);
-                JSONObject dataObject = resultObject.getJSONObject("device");
-                de_code1 = FastjsonUtil.getText(dataObject, "DE_CODE");
-                tv_de_code.setText(FastjsonUtil.getText(dataObject, "DE_CODE"));
-                tv_de_vendor.setText(FastjsonUtil.getText(dataObject, "DE_VENDOR"));
-                de_name1 = FastjsonUtil.getText(dataObject, "DE_NAME");
-                tv_de_name.setText(FastjsonUtil.getText(dataObject, "DE_NAME"));
-                tv_de_spec.setText(FastjsonUtil.getText(dataObject, "DE_SPEC"));
-                tv_de_currentcentername.setText(FastjsonUtil.getText(dataObject, "DE_CURRENTCENTERNAME"));
-                tv_de_contact.setText(FastjsonUtil.getText(dataObject, "DE_CONTACT"));
-                tv_de_telvendor.setText(FastjsonUtil.getText(dataObject, "DE_TELVENDOR"));
-
-                JSONArray items = resultObject.getJSONArray("items");
-                for (int i=0;i<items.size();i++){
-                    JSONObject dataObjectitems = items.getJSONObject(i);
-
-                    BeanitemsBean beanitemsBean=new BeanitemsBean();
-                    beanitemsBean.setDC_KIND(FastjsonUtil.getText(dataObjectitems, "DC_KIND"));
-                    beanitemsBean.setDC_ACTIONDATE(FastjsonUtil.getText(dataObjectitems, "DC_ACTIONDATE"));
-                    beanitemsBean.setDC_INMAN(FastjsonUtil.getText(dataObjectitems, "DC_INMAN"));
-//                    beanitemsBean.setMI_DETNO(FastjsonUtil.getText(dataObjectitems, "MI_DETNO"));
-//                    beanitemsBean.setMI_ITEM(FastjsonUtil.getText(dataObjectitems, "MI_ITEM"));
-//                    if (!FastjsonUtil.getText(dataObjectitems, "MI_DESC").equals("0")){
-//                        beanitemsBean.setMI_DESC("√");
-//                    }
-////                    FastjsonUtil.getText(dataObjectitems, "MI_DESC")
-//                    if (!FastjsonUtil.getText(dataObjectitems, "MI_ISWEEK").equals("0")){
-//                        beanitemsBean.setMI_ISWEEK("√");
-//                    }
-//                    if (!FastjsonUtil.getText(dataObjectitems, "MI_ISMONTH").equals("0")){
-//                        beanitemsBean.setMI_ISMONTH("√");
-//                    }
-//                    if (!FastjsonUtil.getText(dataObjectitems, "MI_ISSEASON").equals("0")){
-//                        beanitemsBean.setMI_ISSEASON("√");
-//                    }
-//
-//                    if (!FastjsonUtil.getText(dataObjectitems, "MI_YEAR").equals("0")){
-//                        beanitemsBean.setMI_YEAR("√");
-//                    }
-//                    if (!FastjsonUtil.getText(dataObjectitems, "MI_TALLY").equals("0")){
-//                        beanitemsBean.setMI_TALLY("√");
-//                    }
-//                    if (!FastjsonUtil.getText(dataObjectitems, "MI_CALIBRATION").equals("0")){
-//                        beanitemsBean.setMI_CALIBRATION("√");
-//                    }
-
-                    beanitemsList.add(beanitemsBean);
-                }
-                setFilterTableData(beanitemsList);
-
-                JSONArray items2 = resultObject.getJSONArray("items1");
-                for (int i=0;i<items2.size();i++) {
-                    JSONObject dataObjectitems = items2.getJSONObject(i);
-                    Items1Bean items1Bean=new Items1Bean();
-                    items1Bean.setDE_DCKIND(FastjsonUtil.getText(dataObjectitems, "DE_DCKIND"));
-                    items1Bean.setDE_NEXTDATEBYWEEK(FastjsonUtil.getText(dataObjectitems, "DE_NEXTDATEBYWEEK"));
-
-                    beanitemsList2.add(items1Bean);
-                }
-                setFilterTableData2(beanitemsList2);
+                try {
+                    beanitemsList.clear();
+                    beanitemsList2.clear();
+                    String result = o.toString();
+                    JSONObject resultObject = JSON.parseObject(result);
+                    JSONObject dataObject = resultObject.getJSONObject("device");
+                    de_code1 = FastjsonUtil.getText(dataObject, "DE_CODE");
+                    tv_de_code.setText(FastjsonUtil.getText(dataObject, "DE_CODE"));
+                    tv_de_vendor.setText(FastjsonUtil.getText(dataObject, "DE_VENDOR"));
+                    de_name1 = FastjsonUtil.getText(dataObject, "DE_NAME");
+                    tv_de_name.setText(FastjsonUtil.getText(dataObject, "DE_NAME"));
+                    tv_de_spec.setText(FastjsonUtil.getText(dataObject, "DE_SPEC"));
+                    tv_de_currentcentername.setText(FastjsonUtil.getText(dataObject, "DE_CURRENTCENTERNAME"));
+                    tv_de_contact.setText(FastjsonUtil.getText(dataObject, "DE_CONTACT"));
+                    tv_de_telvendor.setText(FastjsonUtil.getText(dataObject, "DE_TELVENDOR"));
+                    tv_de_location.setText(FastjsonUtil.getText(dataObject, "DE_LOCATION"));
+
+                    JSONArray items = resultObject.getJSONArray("items");
+                    for (int i=0;i<items.size();i++){
+                        JSONObject dataObjectitems = items.getJSONObject(i);
+
+                        BeanitemsBean beanitemsBean=new BeanitemsBean();
+                        beanitemsBean.setDC_KIND(FastjsonUtil.getText(dataObjectitems, "DC_KIND"));
+                        beanitemsBean.setDC_ACTIONDATE(FastjsonUtil.getText(dataObjectitems, "DC_ACTIONDATE"));
+                        beanitemsBean.setDC_INMAN(FastjsonUtil.getText(dataObjectitems, "DC_INMAN"));
+    //                    beanitemsBean.setMI_DETNO(FastjsonUtil.getText(dataObjectitems, "MI_DETNO"));
+    //                    beanitemsBean.setMI_ITEM(FastjsonUtil.getText(dataObjectitems, "MI_ITEM"));
+    //                    if (!FastjsonUtil.getText(dataObjectitems, "MI_DESC").equals("0")){
+    //                        beanitemsBean.setMI_DESC("√");
+    //                    }
+    ////                    FastjsonUtil.getText(dataObjectitems, "MI_DESC")
+    //                    if (!FastjsonUtil.getText(dataObjectitems, "MI_ISWEEK").equals("0")){
+    //                        beanitemsBean.setMI_ISWEEK("√");
+    //                    }
+    //                    if (!FastjsonUtil.getText(dataObjectitems, "MI_ISMONTH").equals("0")){
+    //                        beanitemsBean.setMI_ISMONTH("√");
+    //                    }
+    //                    if (!FastjsonUtil.getText(dataObjectitems, "MI_ISSEASON").equals("0")){
+    //                        beanitemsBean.setMI_ISSEASON("√");
+    //                    }
+    //
+    //                    if (!FastjsonUtil.getText(dataObjectitems, "MI_YEAR").equals("0")){
+    //                        beanitemsBean.setMI_YEAR("√");
+    //                    }
+    //                    if (!FastjsonUtil.getText(dataObjectitems, "MI_TALLY").equals("0")){
+    //                        beanitemsBean.setMI_TALLY("√");
+    //                    }
+    //                    if (!FastjsonUtil.getText(dataObjectitems, "MI_CALIBRATION").equals("0")){
+    //                        beanitemsBean.setMI_CALIBRATION("√");
+    //                    }
+
+                        beanitemsList.add(beanitemsBean);
+                    }
+                    setFilterTableData(beanitemsList);
+
+                    JSONArray items2 = resultObject.getJSONArray("items1");
+                    for (int i=0;i<items2.size();i++) {
+                        JSONObject dataObjectitems = items2.getJSONObject(i);
+                        Items1Bean items1Bean=new Items1Bean();
+                        items1Bean.setDE_DCKIND(FastjsonUtil.getText(dataObjectitems, "DE_DCKIND"));
+                        items1Bean.setDE_NEXTDATEBYWEEK(FastjsonUtil.getText(dataObjectitems, "DE_NEXTDATEBYWEEK"));
+
+                        beanitemsList2.add(items1Bean);
+                    }
+                    setFilterTableData2(beanitemsList2);
+                    mRefreshLayout.finishRefresh(0);
+                } catch (Exception e) {
+                        e.printStackTrace();
+                        progressDialog.dismiss();
+                        mRefreshLayout.finishRefresh(0);
+                    }
+
             }
 
             @Override
             public void onFail(int flag, String failStr) throws Exception {
                 progressDialog.dismiss();
+                mRefreshLayout.finishRefresh(0);
                 CommonUtil.toastNoRepeat(mActivity, failStr);
 
             }
@@ -413,6 +444,7 @@ public class StorageInFragment extends BaseFragment implements View.OnClickListe
     public void onActivityResult(int requestCode, int resultCode, Intent data) {
         if (requestCode == 0x10 && resultCode == Activity.RESULT_OK) {
             String scanResult = CommonUtil.getScanResult(data);
+            SharedPreUtil.saveString(getActivity().getApplicationContext(), Constants.FLAG.SWEEP, scanResult);
             getNewData(scanResult);
         }
     }

+ 73 - 53
app/src/main/java/com/uas/equipment/fragment/StorageRechargeListFragment.java

@@ -62,7 +62,7 @@ import java.util.Map;
  * @describe
  * @date 2023/1/15 17:34
  */
-public class StorageRechargeListFragment extends BaseFragment{
+public class StorageRechargeListFragment extends BaseFragment implements AdapterView.OnItemSelectedListener{
 
     private Spinner spinner;
     private ArrayAdapter<String> adapter;
@@ -119,7 +119,7 @@ public class StorageRechargeListFragment extends BaseFragment{
             tv_de_name.setText("名称:"+de_name);
         }
 
-
+        spinner.setOnItemSelectedListener(this);
 
         ce_de_code.setOnEditorActionListener(new TextView.OnEditorActionListener() {
             @Override
@@ -221,7 +221,7 @@ public class StorageRechargeListFragment extends BaseFragment{
         });
 
     }
-
+    private List<String> linecodeBeanList;
     //返回保养类型(下拉框的值)
     public void getNewData(){
         progressDialog.show();
@@ -237,32 +237,56 @@ public class StorageRechargeListFragment extends BaseFragment{
                 JSONObject dataObject = resultObject.getJSONObject("items");
                 String mi_year = FastjsonUtil.getText(dataObject, "MI_YEAR");
                 String mi_tally = FastjsonUtil.getText(dataObject, "MI_TALLY");
+                String mi_isday = FastjsonUtil.getText(dataObject, "MI_ISDAY");//正大信维无此类型
                 String mi_isweek = FastjsonUtil.getText(dataObject, "MI_ISWEEK");
                 String mi_ismonth = FastjsonUtil.getText(dataObject, "MI_ISMONTH");
                 String mi_isseason = FastjsonUtil.getText(dataObject, "MI_ISSEASON");
                 String mi_calibration = FastjsonUtil.getText(dataObject, "MI_CALIBRATION");
                 String mi_ishalfmonth_user = FastjsonUtil.getText(dataObject, "MI_ISHALFMONTH_USER");
-//                HashMap<String,String> map=new HashMap<>();
-//                map.put("MI_YEAR",mi_year);
-//                map.put("MI_TALLY",mi_tally);
-//                map.put("MI_ISWEEK",mi_isweek);
-//                map.put("MI_ISMONTH",mi_ismonth);
-//
-//                map.put("MI_ISSEASON",mi_isseason);
-//                map.put("MI_CALIBRATION",mi_calibration);
-//                map.put("MI_ISHALFMONTH_USER",mi_ishalfmonth_user);
+
+
+
+                linecodeBeanList = new ArrayList<>();
+                linecodeBeanList.clear();
+
+                if (!mi_tally.isEmpty()){
+                    linecodeBeanList.add(mi_tally);
+                }
+                if (!mi_isday.isEmpty()){
+                    linecodeBeanList.add(mi_isday);
+                }
+                if (!mi_isweek.isEmpty()){
+                    linecodeBeanList.add(mi_isweek);
+                }
+                if (!mi_ismonth.isEmpty()){
+                    linecodeBeanList.add(mi_ismonth);
+                }
+                if (!mi_isseason.isEmpty()){
+                    linecodeBeanList.add(mi_isseason);
+                }
+                if (!mi_year.isEmpty()){
+                    linecodeBeanList.add(mi_year);
+                }
+
+                if (!mi_calibration.isEmpty()){
+                    linecodeBeanList.add(mi_calibration);
+                }
+                if (!mi_ishalfmonth_user.isEmpty()){
+                    linecodeBeanList.add(mi_ishalfmonth_user);
+                }
+
                 m = new String[]{mi_year,mi_tally,mi_isweek,mi_ismonth,mi_isseason,mi_calibration,mi_ishalfmonth_user};
 
                 //将可选内容与ArrayAdapter连接起来
-                adapter = new ArrayAdapter<String>(mActivity,android.R.layout.simple_spinner_item,m);
+                adapter = new ArrayAdapter(mActivity,R.layout.item_spinner,R.id.text_spinner, linecodeBeanList);
 
                 //设置下拉列表的风格
-                adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);//风格一
+//                adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);//风格一
                 //adapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line); 风格二
                 //将adapter 添加到spinner中
                 spinner.setAdapter(adapter);
                 //添加事件Spinner事件监听
-                spinner.setOnItemSelectedListener(new SpinnerSelectedListener());
+//                spinner.setOnItemSelectedListener(new SpinnerSelectedListener());
                 //设置默认值
                 spinner.setVisibility(View.VISIBLE);
 
@@ -321,7 +345,8 @@ public class StorageRechargeListFragment extends BaseFragment{
             bean= new MaintainitemBean(
                     data.getString("MI_ID"),
                     data.getString("MI_ITEM"),
-                    data.getString("MI_DETNO"));
+                    data.getString("MI_DETNO"),
+                    data.getString("MI_DESC"));
             mFeededList.add(bean);
         }
         setAdapter(mFeededList);
@@ -429,38 +454,36 @@ public class StorageRechargeListFragment extends BaseFragment{
     }
 
 
-    //使用数组形式操作
-    class SpinnerSelectedListener implements AdapterView.OnItemSelectedListener {
-
-        public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,
-                                   long arg3) {
-            commit_maintenanceType = m[arg2];
-            maintenanceType = m[arg2];
-            if (maintenanceType.equals("年保养")){
-                maintenanceType="MI_YEAR";
-            }else if (maintenanceType.equals("点检")){
-                maintenanceType="MI_TALLY";
-            }else if (maintenanceType.equals("周保养")){
-                maintenanceType="MI_ISWEEK";
-            }else if (maintenanceType.equals("月保养")){
-                maintenanceType="MI_ISMONTH";
-            }else if (maintenanceType.equals("季度保养")){
-                maintenanceType="MI_ISSEASON";
-            }else if (maintenanceType.equals("校准")){
-                maintenanceType="MI_CALIBRATION";
-            }else if (maintenanceType.equals("半月校准")){
-                maintenanceType="MI_ISHALFMONTH_USER";
-            }else {
-                maintenanceType="";
-            }
-
+    @Override
+    public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+        maintenanceType=linecodeBeanList.get(position);
+        commit_maintenanceType=maintenanceType;
+        if (maintenanceType.equals("年保养")){
+            maintenanceType="MI_YEAR";
+        }else if (maintenanceType.equals("点检")){
+            maintenanceType="MI_TALLY";
+        }else if (maintenanceType.equals("日保养")){
+            maintenanceType="MI_ISDAY";
+        }else if (maintenanceType.equals("周保养")){
+            maintenanceType="MI_ISWEEK";
+        }else if (maintenanceType.equals("月保养")){
+            maintenanceType="MI_ISMONTH";
+        }else if (maintenanceType.equals("季度保养")){
+            maintenanceType="MI_ISSEASON";
+        }else if (maintenanceType.equals("校准")){
+            maintenanceType="MI_CALIBRATION";
+        }else if (maintenanceType.equals("半月校准")){
+            maintenanceType="MI_ISHALFMONTH_USER";
+        }else {
+            maintenanceType="";
+        }
 
+        getNewNameData(maintenanceType +"");
+    }
 
-            getNewNameData(maintenanceType +"");
-        }
+    @Override
+    public void onNothingSelected(AdapterView<?> parent) {
 
-        public void onNothingSelected(AdapterView<?> arg0) {
-        }
     }
 
     @Override
@@ -571,7 +594,8 @@ public class StorageRechargeListFragment extends BaseFragment{
         @Override
         public void onBindViewHolder(final RecyclerView.ViewHolder holder, @SuppressLint("RecyclerView") final int i) {
             //设置条目状态
-            ((ListItemViewHolder) holder).mainTitle.setText(mList.get(i).getMi_item());
+            ((ListItemViewHolder) holder).mainTitle.setText("项目:"+mList.get(i).getMi_item());
+            ((ListItemViewHolder) holder).tv_mi_desc.setText("标准:"+mList.get(i).getMI_DESC());
             ((ListItemViewHolder) holder).checkBox.setChecked(isItemChecked(i));
 
             //checkBox的监听
@@ -583,11 +607,6 @@ public class StorageRechargeListFragment extends BaseFragment{
                     } else {
                         setItemChecked(i, true);
                     }
-//                    for (int i2=0;i2<mList.size();i2++){
-//                        setItemChecked(i2, true);
-//                    }
-
-//                    ab.setTitle("已选择" + getSelectedItem().size() + "项");
                 }
             });
 
@@ -617,12 +636,12 @@ public class StorageRechargeListFragment extends BaseFragment{
             //ViewHolder
             CheckBox checkBox;
             TextView mainTitle;
-
+            TextView tv_mi_desc;
             ListItemViewHolder(View view) {
                 super(view);
                 this.mainTitle = (TextView) view.findViewById(R.id.text);
+                this.tv_mi_desc = (TextView) view.findViewById(R.id.tv_mi_desc);
                 this.checkBox = (CheckBox) view.findViewById(R.id.select_checkbox);
-
             }
         }
     }
@@ -639,6 +658,7 @@ public class StorageRechargeListFragment extends BaseFragment{
                 String result = o.toString();
                 JSONObject resultObject = JSON.parseObject(result);
                 JSONObject dataObject = resultObject.getJSONObject("device");
+
                 String de_code1 = FastjsonUtil.getText(dataObject, "DE_CODE");
                 String de_name1 = FastjsonUtil.getText(dataObject, "DE_NAME");
                 de_code=de_code1;

+ 1 - 1
app/src/main/java/com/uas/equipment/tools/RegexUtil.java

@@ -10,7 +10,7 @@ public class RegexUtil {
     //正则表达式
 //    public static String IP_FORMAT = "((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){3}(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)";
     public static String IP_FORMAT = "^((25[0-5])|(2[0-4]\\d)|(1\\d\\d)|([1-9]\\d)|\\d)(\\.((25[0-5])|(2[0-4]\\d)|(1\\d\\d)|([1-9]\\d)|\\d)){3}$|^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}$";
-    public static String PORT_FORMAT = "^[1-9]$|(^[1-9][0-9]$)|(^[1-9][0-9][0-9]$)|(^[1-9][0-9][0-9][0-9]$)|(^[1-6][0-5][0-5][0-3][0-9]$)";
+    public static String PORT_FORMAT = "^[1-9]$|(^[1-9][0-9]$)|(^[0-9][0-9][0-9]$)|(^[1-9][0-9][0-9][0-9]$)|(^[0-9][0-9][0-9][0-9][0-9]$)";
     // public static String PORT_FORMAT = "(\\d)+";
 
     public static boolean checkString(String str, String regx) {

+ 5 - 0
app/src/main/java/com/uas/equipment/util/Constants.java

@@ -121,6 +121,11 @@ public interface Constants {
         //保存登录密码
         String LOGINPASSOWRD = "loginpassowrd";
 
+        /**
+         * 扫一扫
+         **/
+        String SWEEP = "sweep_usaer";
+
         /******************************************
          * 材料入库
          */

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

@@ -17,6 +17,7 @@
             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"
@@ -24,7 +25,7 @@
                 innerrect:inner_height="260dp"
                 innerrect:inner_margintop="120dp"
                 innerrect:inner_scan_speed="60"
-                innerrect:inner_width="260dp"/>
+                innerrect:inner_width="260dp" />
 
             <TextView
                 android:layout_width="wrap_content"

+ 162 - 132
app/src/main/res/layout/fragment_storage_in.xml

@@ -3,153 +3,183 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     xmlns:tools="http://schemas.android.com/tools"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:background="@color/white"
     android:orientation="vertical">
-    <LinearLayout
-        android:background="@color/white"
+    <com.scwang.smartrefresh.layout.SmartRefreshLayout
+        android:id="@+id/pda_wms_in_filter_list_srl"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:orientation="vertical">
+        android:layout_height="0dp"
+        android:layout_weight="1">
 
-
-
-        <LinearLayout
-            android:background="@color/white"
+        <com.scwang.smartrefresh.layout.header.ClassicsHeader
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="@dimen/dp_10"
-            android:orientation="horizontal">
-            <TextView
-                android:text="设备号:"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"/>
-            <TextView
-                android:id="@+id/tv_de_code"
-                android:text=""
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"/>
-        </LinearLayout>
+            android:layout_height="wrap_content" />
         <LinearLayout
             android:background="@color/white"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="@dimen/dp_10"
-            android:orientation="horizontal">
-            <TextView
-                android:text="品牌:"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"/>
-            <TextView
-                android:id="@+id/tv_de_vendor"
-                android:text=""
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"/>
-        </LinearLayout>
-
-        <LinearLayout
-            android:background="@color/white"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="@dimen/dp_10"
-            android:orientation="horizontal">
-            <TextView
-                android:text="名称:"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"/>
-            <TextView
-                android:id="@+id/tv_de_name"
-                android:text=""
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"/>
-        </LinearLayout>
-        <LinearLayout
-            android:background="@color/white"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="@dimen/dp_10"
-            android:orientation="horizontal">
-            <TextView
-                android:text="规格:"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"/>
-            <TextView
-                android:id="@+id/tv_de_spec"
-                android:text=""
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"/>
-        </LinearLayout>
-
-        <LinearLayout
-            android:background="@color/white"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="@dimen/dp_10"
-            android:orientation="horizontal">
-            <TextView
-                android:text="当前部门名称:"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"/>
-            <TextView
-                android:id="@+id/tv_de_currentcentername"
-                android:text=""
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"/>
-        </LinearLayout>
+            android:layout_height="match_parent"
+            android:orientation="vertical">
+            <LinearLayout
+                android:background="@color/white"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:orientation="horizontal">
+                <TextView
+                    android:text="设备号:"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+                <TextView
+                    android:id="@+id/tv_de_code"
+                    android:text=""
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+            </LinearLayout>
+            <LinearLayout
+                android:background="@color/white"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:orientation="horizontal">
+                <TextView
+                    android:text="品牌:"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+                <TextView
+                    android:id="@+id/tv_de_vendor"
+                    android:text=""
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+            </LinearLayout>
 
-        <LinearLayout
-            android:background="@color/white"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="@dimen/dp_10"
-            android:orientation="horizontal">
-            <TextView
-                android:text="厂商联系人:"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"/>
-            <TextView
-                android:id="@+id/tv_de_contact"
-                android:text=""
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"/>
-        </LinearLayout>
-        <LinearLayout
-            android:background="@color/white"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="@dimen/dp_10"
-            android:orientation="horizontal">
-            <TextView
-                android:text="厂商电话:"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"/>
-            <TextView
-                android:id="@+id/tv_de_telvendor"
-                android:text=""
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"/>
-        </LinearLayout>
-        <LinearLayout
-            android:layout_marginTop="@dimen/dp_10"
-            android:orientation="vertical"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent">
-            <com.bin.david.form.core.SmartTable
-                android:id="@+id/smar_item1"
+            <LinearLayout
+                android:background="@color/white"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:orientation="horizontal">
+                <TextView
+                    android:text="名称:"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+                <TextView
+                    android:id="@+id/tv_de_name"
+                    android:text=""
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+            </LinearLayout>
+            <LinearLayout
+                android:background="@color/white"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:orientation="horizontal">
+                <TextView
+                    android:text="规格:"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+                <TextView
+                    android:id="@+id/tv_de_spec"
+                    android:text=""
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+            </LinearLayout>
+            <LinearLayout
+                android:background="@color/white"
                 android:layout_width="match_parent"
-                android:layout_height="0dp"
-                android:layout_weight="1"
-                android:layout_marginBottom="5dp"/>
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:orientation="horizontal">
+                <TextView
+                    android:text="储位:"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+                <TextView
+                    android:id="@+id/tv_de_location"
+                    android:text=""
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+            </LinearLayout>
+            <LinearLayout
+                android:background="@color/white"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:orientation="horizontal">
+                <TextView
+                    android:text="当前部门名称:"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+                <TextView
+                    android:id="@+id/tv_de_currentcentername"
+                    android:text=""
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+            </LinearLayout>
 
-            <com.bin.david.form.core.SmartTable
-                android:layout_marginTop="5dp"
-                android:id="@+id/pda_wms_in_filter_list_st"
+            <LinearLayout
+                android:background="@color/white"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:orientation="horizontal">
+                <TextView
+                    android:text="厂商联系人:"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+                <TextView
+                    android:id="@+id/tv_de_contact"
+                    android:text=""
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+            </LinearLayout>
+            <LinearLayout
+                android:background="@color/white"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:orientation="horizontal">
+                <TextView
+                    android:text="厂商电话:"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+                <TextView
+                    android:id="@+id/tv_de_telvendor"
+                    android:text=""
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+            </LinearLayout>
+            <LinearLayout
+                android:layout_marginTop="@dimen/dp_10"
+                android:orientation="vertical"
                 android:layout_width="match_parent"
-                android:layout_height="0dp"
-                android:layout_weight="1.7" />
+                android:layout_height="match_parent">
+                <com.bin.david.form.core.SmartTable
+                    android:id="@+id/smar_item1"
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_weight="1"
+                    android:layout_marginBottom="5dp"/>
+
+                <com.bin.david.form.core.SmartTable
+                    android:layout_marginTop="5dp"
+                    android:id="@+id/pda_wms_in_filter_list_st"
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_weight="1.7" />
+
+            </LinearLayout>
+
+
 
         </LinearLayout>
 
+        <com.scwang.smartrefresh.layout.footer.ClassicsFooter
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            app:srlAccentColor="@android:color/darker_gray" />
+    </com.scwang.smartrefresh.layout.SmartRefreshLayout>
 
 
-    </LinearLayout>
 </LinearLayout>

+ 4 - 2
app/src/main/res/layout/popwin_whbatch_breakpackage.xml

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-   android:layout_width="match_parent"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
     android:layout_height="match_parent">
 
     <RelativeLayout
@@ -60,7 +61,8 @@
                 android:id="@+id/btn_print"
                 android:layout_toLeftOf="@id/btn_dialog_confirm_ok"
                 style="@style/PopwinCancleButtonStyle"
-                android:text="@string/text_btn_print"/>
+                android:text="@string/text_btn_print"
+                tools:ignore="NotSibling" />
         </RelativeLayout>
     </RelativeLayout>
 </RelativeLayout>

+ 43 - 18
app/src/main/res/layout/recyclerview_item.xml

@@ -3,24 +3,49 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:paddingTop="10dp"
-    android:paddingBottom="10dp">
-    <CheckBox
-        android:layout_gravity="center_vertical"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:id="@+id/select_checkbox"/>
-    <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:textAlignment="center"
-        android:layout_gravity="center_vertical"
-        android:textSize="15sp"
-        android:text="条目"
-        android:id="@+id/text"
-        android:gravity="left"
-        tools:ignore="RtlCompat">
-    </TextView>
+    android:orientation="horizontal">
+
+    <LinearLayout
+        android:layout_marginTop="5dp"
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+        <CheckBox
+            android:layout_gravity="center_vertical"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:id="@+id/select_checkbox"/>
+        <LinearLayout
+            android:orientation="vertical"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="left"
+                android:textSize="15sp"
+                android:text="1111111"
+                android:id="@+id/text"
+                android:gravity="left"
+                tools:ignore="RtlCompat">
+            </TextView>
+            <TextView
+                android:layout_marginTop="5dp"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="left"
+                android:textSize="15sp"
+                android:text="111111"
+                android:id="@+id/tv_mi_desc"
+                android:gravity="left"
+                tools:ignore="RtlCompat">
+            </TextView>
+
+        </LinearLayout>
+
+    </LinearLayout>
+
+
 
 
 </LinearLayout>

+ 1 - 0
build.gradle

@@ -46,6 +46,7 @@ allprojects {
     }
 }
 
+
 task clean(type: Delete) {
     delete rootProject.buildDir
 }

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

@@ -1,4 +1,4 @@
-#Fri Mar 10 17:11:22 CST 2023
+#Mon Jun 19 16:58:43 CST 2023
 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