Selaa lähdekoodia

SMT作业---上料页面[SCSMTInFragment.java]---使用 | 分割符号过滤站位

shuij 4 vuotta sitten
vanhempi
commit
d8b56c21ba

+ 13 - 3
app/src/main/java/com/uas/uaspda/fragment/SCSMTInFragment.java

@@ -325,12 +325,17 @@ public class SCSMTInFragment extends BaseFragment implements View.OnClickListene
                                             JSONObject notCheckObject = notFeedArray.optJSONObject(i);
                                             if (notCheckObject != null) {
                                                 String psl_location = JsonUtils.optStringNotNull(notCheckObject, "PSL_LOCATION");
+                                                notice = notice + psl_location + "\n";
+                                                noticeStr = noticeStr + psl_location + "\n";
                                                 if (i == 0 && mOrderSwitch) {
+                                                    //过滤|,取前面的字段
+                                                    if(!TextUtils.isEmpty(psl_location)&&psl_location.contains("|")){
+                                                        String[] strLocation=psl_location.split("\\|");
+                                                        psl_location=strLocation[0];
+                                                    }
                                                     mCollectEditText.setText(psl_location);
                                                     confirmEvent(psl_location);
                                                 }
-                                                notice = notice + psl_location + "\n";
-                                                noticeStr = noticeStr + psl_location + "\n";
                                             }
                                         }
                                         notice = notice.substring(0, notice.length() - 1);
@@ -440,11 +445,16 @@ public class SCSMTInFragment extends BaseFragment implements View.OnClickListene
                                             JSONObject notCheckObject = notFeedArray.optJSONObject(i);
                                             if (notCheckObject != null) {
                                                 String psl_location = JsonUtils.optStringNotNull(notCheckObject, "PSL_LOCATION");
+                                                notice = notice + psl_location + "\n";
                                                 if (i == 0 && mOrderSwitch) {
+                                                    //过滤|,取前面的字段
+                                                    if(!TextUtils.isEmpty(psl_location)&&psl_location.contains("|")){
+                                                        String[] strLocation=psl_location.split("\\|");
+                                                        psl_location=strLocation[0];
+                                                    }
                                                     mCollectEditText.setText(psl_location);
                                                     confirmEvent(psl_location);
                                                 }
-                                                notice = notice + psl_location + "\n";
                                             }
                                         }
                                         notice = notice.substring(0, notice.length() - 1);

+ 17 - 11
app/src/main/java/com/uas/uaspda/fragment/SCSMTIndexFragment.java

@@ -242,16 +242,6 @@ public class SCSMTIndexFragment extends BaseFragment implements AdapterView.OnIt
                         fragment = new SCSMTInFragment();
                         FragmentUtils.switchFragment(this, fragment);
                         break;
-                    //校验
-                    case GloableParams.LISTNAME_FEEDER_CHECK:
-                        fragment = new SCSMTCheckFragment();
-                        FragmentUtils.switchFragment(this, fragment);
-                        break;
-                    //下料
-                    case GloableParams.LISTNAME_FEEDER_DOWN:
-                        fragment = new SCSMTDownFragment();
-                        FragmentUtils.switchFragment(this, fragment);
-                        break;
                     //接料
                     case GloableParams.LISTNAME_FEEDER_JOIN:
                         fragment = new SCSMTJointFragment();
@@ -262,38 +252,54 @@ public class SCSMTIndexFragment extends BaseFragment implements AdapterView.OnIt
                         fragment = new SCSMTChangeFragment();
                         FragmentUtils.switchFragment(this, fragment);
                         break;
+                    //下料
+                    case GloableParams.LISTNAME_FEEDER_DOWN:
+                        fragment = new SCSMTDownFragment();
+                        FragmentUtils.switchFragment(this, fragment);
+                        break;
                     //全部下料
                     case GloableParams.LISTNAME_FEEDER_DOWNALL:
                         queryMakeqty(1);
-
                         break;
                     //料卷查询
                     case GloableParams.LISTNAME_FEEDER_QUERY:
                         fragment = new SCSMTQueryFragment();
                         FragmentUtils.switchFragment(this, fragment);
                         break;
+                     //工单切片
                     case GloableParams.LISTNAME_FEEDER_SWITCH:
                         queryMakeqty(2);
                         break;
+                    //校验
+                    case GloableParams.LISTNAME_FEEDER_CHECK:
+                        fragment = new SCSMTCheckFragment();
+                        FragmentUtils.switchFragment(this, fragment);
+                        break;
+                     //机台操作
                     case GloableParams.LISTNAME_FEEDER_MACHINE:
                         operationMachine();
                         break;
+                    //叫料
                     case GloableParams.LISTNAME_REQUEST_MACHINE:
                         fragment = new SCSMTRequestFragment();
                         FragmentUtils.switchFragment(this, fragment);
                         break;
+                    //站位反查
                     case GloableParams.LISTNAME_LOCATION_QUERY:
                         fragment = new SMTLocationQueryFragment();
                         FragmentUtils.switchFragment(this, fragment);
                         break;
+                    //备料查询
                     case GloableParams.LISTNAME_PREMATERIAL_QUERY:
                         fragment = new SMTPreMaterialQueryFragment();
                         FragmentUtils.switchFragment(this, fragment);
                         break;
+                    //飞达料盘绑定
                     case GloableParams.LISTNAME_FEEDER_BIND:
                         fragment = new SCSMTBindFragment();
                         FragmentUtils.switchFragment(this, fragment);
                         break;
+                    //飞达料盘解绑
                     case GloableParams.LISTNAME_FEEDER_UNBIND:
                         fragment = new SCSMTUnBindFragment();
                         FragmentUtils.switchFragment(this, fragment);

+ 5 - 1
app/src/main/res/layout/fragment_scmake_smtfeeder.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?><!--SMT上料-->
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="@drawable/bg_main"
@@ -132,7 +133,10 @@
             android:id="@+id/tv_notice_smt"
             style="@style/CardContentTextStyle"
             android:layout_marginLeft="@dimen/space_left_16"
-            android:visibility="gone" />
+            android:visibility="gone"
+            tools:text="Result Result Result Result Result Result Result Result Result ResultResult ResultResult ResultResult Result"
+            tools:visibility="visible"
+            />
 
         <Button
             android:id="@+id/btn_device_ok_smt"

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

@@ -108,7 +108,8 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:orientation="vertical"
-        android:visibility="gone">
+        android:visibility="gone"
+        tools:visibility="visible">
 
         <RelativeLayout
             android:layout_width="match_parent"

+ 11 - 5
app/src/main/res/layout/innermsg_collect_scmake.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:orientation="vertical" android:layout_width="match_parent"
     android:layout_height="wrap_content">
 
@@ -24,26 +25,31 @@
             android:layout_width="wrap_content"
             android:id="@+id/tv_innernotice_1_scmake"
             android:layout_below="@id/tv_innernotice_msgtitle_scmake"
-            style="@style/CardContentTextStyle" />
+            style="@style/CardContentTextStyle"
+            tools:text="1站位"/>
         <!--2数量-->
         <TextView
             android:id="@+id/tv_innernotice_2_scmake"
             android:layout_below="@id/tv_innernotice_1_scmake"
-            style="@style/CardContentTextStyle" />
+            style="@style/CardContentTextStyle"
+            tools:text="2数量"/>
         <!--3料卷号-->
         <TextView
             android:id="@+id/tv_innernotice_3_scmake"
             android:layout_below="@id/tv_innernotice_2_scmake"
-            style="@style/CardContentTextStyle" />
+            style="@style/CardContentTextStyle"
+            tools:text="3料卷号"/>
         <!--4料号-->
         <TextView
             android:id="@+id/tv_innernotice_4_scmake"
             android:layout_below="@id/tv_innernotice_3_scmake"
-            style="@style/CardContentTextStyle" />
+            style="@style/CardContentTextStyle"
+            tools:text="4料号"/>
         <!--5名称规格-->
         <TextView
             android:id="@+id/tv_innernotice_5_scmake"
             android:layout_below="@id/tv_innernotice_4_scmake"
-            style="@style/CardContentTextStyle" />
+            style="@style/CardContentTextStyle"
+            tools:text="5名称规格"/>
     </RelativeLayout>
 </RelativeLayout>

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

@@ -149,7 +149,8 @@
             android:layout_alignTop="@id/pop_switch_jobs_operation_ll"
             android:background="@drawable/bg_line_edittext"
             android:orientation="vertical"
-            android:visibility="gone">
+            android:visibility="gone"
+            tools:visibility="visible">
 
             <TextView
                 android:id="@+id/pop_switch_jobs_exception_msg_tv"