Browse Source

1.工单ID填写完后换行到人员ID
2.数据采集 增加线体 炉前目检,检焊目检,组装测试,组装外观目检,包装外观目检 线材目检
3.外观维修 增加线体 组装外观目检,包装外观目检 填写线体
4.性能维修 增加线体 插件测试 组装测试 老化 包装测试
5.清除工单的时候去除后面信息
6.保存后清除之前的数据
人员照片展示背景为圆角

ChengJH 2 years ago
parent
commit
c6ba41aa20

+ 5 - 5
app/src/main/AndroidManifest.xml

@@ -11,7 +11,7 @@
     <application
         android:name="com.uas.collection.application.PdaApplication"
         android:allowBackup="true"
-        android:icon="@mipmap/icon"
+        android:icon="@mipmap/select"
         android:label="@string/app_name_mes"
         android:theme="@style/AppTheme"
         android:usesCleartextTraffic="true"
@@ -25,7 +25,7 @@
             android:launchMode="singleTask"/>
         <activity
             android:name="com.uas.collection.activity.SplashActivity"
-            android:icon="@mipmap/icon"
+            android:icon="@mipmap/select"
             android:theme="@style/NoOverLayStyle">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
@@ -35,17 +35,17 @@
         </activity>
         <activity
             android:name="com.uas.collection.activity.MainActivity"
-            android:icon="@mipmap/icon"
+            android:icon="@mipmap/select"
             android:label="@string/title_activity_menu"
             android:windowSoftInputMode="adjustPan|stateHidden" />
         <activity
             android:name="com.uas.collection.activity.PdfsActivity"
-            android:icon="@mipmap/icon"
+            android:icon="@mipmap/select"
             android:label="@string/title_activity_menu"
             android:windowSoftInputMode="adjustPan|stateHidden" />
         <activity
             android:name="com.uas.collection.activity.BannerActivity"
-            android:icon="@mipmap/icon"
+            android:icon="@mipmap/select"
             android:label="@string/title_activity_menu"
             android:windowSoftInputMode="adjustPan|stateHidden" />
         <activity

+ 129 - 49
app/src/main/java/com/uas/collection/fragment/BreakdownRepairFragment.java

@@ -50,6 +50,7 @@ import com.uas.collection.util.Constants;
 import com.uas.collection.util.FastjsonUtil;
 import com.uas.collection.util.HttpCallback;
 import com.uas.collection.util.HttpParams;
+import com.uas.collection.util.JsonUtils;
 import com.uas.collection.util.LogUtil;
 import com.uas.collection.util.MyArrayAdapter;
 import com.uas.collection.util.MyLayoutManager;
@@ -111,6 +112,9 @@ public class BreakdownRepairFragment extends BaseFragment{
     private TextView tv_pr_detail;
     private ClearableEditText tv_hintshow;
     private List<String> stringList;
+    private String sc_name;
+    private RecyclerView rv_line_ip_port_data;
+
 
     @Override
     protected int getLayout() {
@@ -165,7 +169,7 @@ public class BreakdownRepairFragment extends BaseFragment{
 
 
 /**--------------------------------工单号----------------------------**/
-
+        linecodeBeanList = new ArrayList<>();
         ce_work_code.setOnEditorActionListener(new TextView.OnEditorActionListener() {
             @Override
             public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
@@ -188,9 +192,7 @@ public class BreakdownRepairFragment extends BaseFragment{
 
             @Override
             public void onTextChanged(CharSequence s, int start, int before, int count) {
-                if (s.length() >=2) {
-                    getfuzzySearchData(ce_work_code.getText().toString().trim(),"");
-                }
+
             }
 
             @Override
@@ -209,6 +211,11 @@ public class BreakdownRepairFragment extends BaseFragment{
             public void onClick(View v) {
                 ce_work_code.setText("");
                 ce_work_code.requestFocus();
+                tv_pr_code.setText("产品编号");
+                tv_pr_detail.setText("产品名称");
+                tv_macode.setText("工单号");
+
+
             }
         });
         iv_popuwindow.setOnClickListener(new View.OnClickListener() {
@@ -220,7 +227,7 @@ public class BreakdownRepairFragment extends BaseFragment{
 
 
         /**--------------------------------岗位资源----------------------------**/
-
+        resourcesBeanList = new ArrayList<>();
         at_station.setOnEditorActionListener(new TextView.OnEditorActionListener() {
             @Override
             public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
@@ -242,9 +249,7 @@ public class BreakdownRepairFragment extends BaseFragment{
 
             @Override
             public void onTextChanged(CharSequence s, int start, int before, int count) {
-                if (s.length() >=2) {
-                    getfuzzySearchSourceData(at_station.getText().toString().trim(),"");
-                }
+
             }
 
             @Override
@@ -375,6 +380,7 @@ public class BreakdownRepairFragment extends BaseFragment{
 
         sc_codecollethree = SharedPreUtil.getString(mActivity, "sc_codecollethree", null);
         at_station.setText(sc_codecollethree);
+        getfuzzySearchSourceData(sc_codecollethree,"");
     }
     public void getOrImage(String em_code){
         progressDialog.show();
@@ -402,6 +408,9 @@ public class BreakdownRepairFragment extends BaseFragment{
                                     String path = data2.getString("path");
                                     String str2 = new String(Base64.decode(path.getBytes(),Base64.DEFAULT));
                                     Glide.with(mActivity).load(str2).into(iv_personnel_data);
+                                    at_station.clearFocus();
+                                    ce_work_code.clearFocus();
+                                    tv_dc_emcode.clearFocus();
                                 }
 
                             }
@@ -462,22 +471,27 @@ public class BreakdownRepairFragment extends BaseFragment{
                         ipAndlinecodePortAdapter.notifyDataSetChanged();
 
                     }
-//                    else {
-//                        if (dataArray != null) {
-//                            for (int i = 0; i < dataArray.length(); i++) {
-//                                org.json.JSONObject dataObject = dataArray.optJSONObject(i);
-//                                if (dataObject != null) {
-//                                    String pi_inoutno = JsonUtils.optStringNotNull(dataObject, "MA_CODE");
-//                                    String pr_code = JsonUtils.optStringNotNull(dataObject, "PR_CODE");
-//                                    String pr_detail = JsonUtils.optStringNotNull(dataObject, "PR_DETAIL");
-//                                    if (!TextUtils.isEmpty(pi_inoutno))
-//                                        mAutoStringAdapter.add(pi_inoutno);
-//                                    tv_pr_code.setText("产品编号  "+pr_code);
-//                                    tv_pr_detail.setText("产品名称  "+pr_detail);
-//                                }
-//                            }
-//                        }
-//                    }
+                    else {
+                        if (dataArray != null) {
+                            for (int i = 0; i < dataArray.length(); i++) {
+                                org.json.JSONObject dataObject = dataArray.optJSONObject(i);
+                                if (dataObject != null) {
+                                    String ma_code = JsonUtils.optStringNotNull(dataObject, "MA_CODE");
+                                    String pr_code = JsonUtils.optStringNotNull(dataObject, "PR_CODE");
+                                    String pr_detail = JsonUtils.optStringNotNull(dataObject, "PR_DETAIL");
+                                    String ma_id = JsonUtils.optStringNotNull(dataObject, "MA_ID");
+                                    ce_work_code.setText(ma_id);
+                                    tv_gonema_code.setText(ma_code);
+                                    tv_pr_code.setText("产品编号  "+pr_code);
+                                    tv_pr_detail.setText("产品名称  "+pr_detail);
+                                    tv_macode.setText("工单号  "+ma_code);
+                                    at_station.clearFocus();
+                                    ce_work_code.clearFocus();
+                                    tv_dc_emcode.clearFocus();
+                                }
+                            }
+                        }
+                    }
 
 
                 } catch (JSONException e) {
@@ -543,19 +557,25 @@ public class BreakdownRepairFragment extends BaseFragment{
 
 
                     }
-//                    else {
-//                        if (dataArray != null) {
-//                            for (int i = 0; i < dataArray.length(); i++) {
-//                                org.json.JSONObject dataObject = dataArray.optJSONObject(i);
-//                                if (dataObject != null) {
-//                                    String pi_inoutno = JsonUtils.optStringNotNull(dataObject, "SC_CODE");
-//                                    String st_remark = JsonUtils.optStringNotNull(dataObject, "ST_REMARK");
-//                                    if (!TextUtils.isEmpty(pi_inoutno))
-//                                        mAutoStringAdapte.add(pi_inoutno);
-//                                }
-//                            }
-//                        }
-//                    }
+                    else {
+                        if (dataArray != null) {
+                            for (int i = 0; i < dataArray.length(); i++) {
+                                org.json.JSONObject dataObject = dataArray.optJSONObject(i);
+                                if (dataObject != null) {
+                                    String sc_code = JsonUtils.optStringNotNull(dataObject, "SC_CODE");
+                                    String sc_name = JsonUtils.optStringNotNull(dataObject, "SC_NAME");
+
+                                    at_station.setText(sc_code);
+                                    if (!StringUtil.isEmpty(sc_code)){
+                                        SharedPreUtil.saveString(mActivity,"sc_codecollethree",sc_code);
+                                    }
+                                    at_station.clearFocus();
+                                    ce_work_code.clearFocus();
+                                    tv_dc_emcode.clearFocus();
+                                }
+                            }
+                        }
+                    }
 
                 } catch (JSONException e) {
                     e.printStackTrace();
@@ -579,6 +599,10 @@ public class BreakdownRepairFragment extends BaseFragment{
             CommonUtil.toastNoRepeat(mActivity, "产品长度和产品条码长度不符");
             return;
         }
+        if (tv_dc_emcode.getText().toString().trim().isEmpty()){
+            CommonUtil.toastNoRepeat(mActivity, "请采集人员编号");
+            return;
+        }
 
         JSONArray jsonArray = new JSONArray();
         JSONObject object_1 = new JSONObject();
@@ -653,6 +677,7 @@ public class BreakdownRepairFragment extends BaseFragment{
         object_1.put("SR_REMARK", "");//备注/其他
         object_1.put("SR_INMAN", "");//录入人
         object_1.put("SR_INDATE", "");//录入时间
+        object_1.put("SR_EMCODE", tv_dc_emcode.getText().toString().trim());//人员编号
         jsonArray.add(object_1);
         progressDialog.show();
         VollyRequest.getInstance().stringRequest(new HttpParams.Builder()
@@ -686,6 +711,10 @@ public class BreakdownRepairFragment extends BaseFragment{
             CommonUtil.toastNoRepeat(mActivity, "产品长度和产品条码长度不符");
             return;
         }
+        if (tv_dc_emcode.getText().toString().trim().isEmpty()){
+            CommonUtil.toastNoRepeat(mActivity, "请采集人员编号");
+            return;
+        }
         JSONArray jsonArray = new JSONArray();
         JSONObject object_1 = new JSONObject();
         String alonedataone = null;
@@ -768,6 +797,7 @@ public class BreakdownRepairFragment extends BaseFragment{
         object_1.put("SR_REMARK", "");//备注/其他
         object_1.put("SR_INMAN", "");//录入人
         object_1.put("SR_INDATE", "");//录入时间
+        object_1.put("SR_EMCODE", tv_dc_emcode.getText().toString().trim());//人员编号
         jsonArray.add(object_1);
         Log.e("jsonArray=====",jsonArray.toJSONString());
         progressDialog.show();
@@ -809,6 +839,7 @@ public class BreakdownRepairFragment extends BaseFragment{
                 setAdapterone(mFeededListone);
                 setAdaptertwo(mFeededListtwo);
                 setAdapterthree(mFeededListthree);
+
             }
 
             @Override
@@ -1005,9 +1036,9 @@ public class BreakdownRepairFragment extends BaseFragment{
     private IpAndlinecodePortAdapter ipAndlinecodePortAdapter;
     private ClearableEditText edit_et;
     private PopupWindow editPW;
-    private List<ResourcesBean> resourcesBeanList;
+    private ArrayList<ResourcesBean> resourcesBeanList;
     private void initlinecodePopupWindow() {
-        linecodeBeanList = new ArrayList<>();
+
         ipAndlinecodePortAdapter = new IpAndlinecodePortAdapter(linecodeBeanList);
         View contView = LayoutInflater.from(mActivity).inflate(R.layout.index_edit_pup, null);
         edit_et = (ClearableEditText) contView.findViewById(R.id.edit_et);
@@ -1070,6 +1101,10 @@ public class BreakdownRepairFragment extends BaseFragment{
                 tv_pr_code.setText("产品编号  "+pr_code);
                 tv_pr_detail.setText("产品名称  "+pr_detail);
                 tv_macode.setText("工单号  "+ma_code);
+                at_station.clearFocus();
+                ce_work_code.clearFocus();
+                tv_dc_emcode.clearFocus();
+
                 closeListPopupWindow();
             }
         });
@@ -1132,27 +1167,68 @@ public class BreakdownRepairFragment extends BaseFragment{
 //        });
 
 
+    }
+    private void getlineDataList(){
+        List<String> linelist=new ArrayList<>();
+        linelist.add("炉前目检");
+        linelist.add("检焊目检");
+        linelist.add("组装测试");
+        linelist.add("组装外观目检");
+        linelist.add("包装外观目检");
+        JSONObject jsonObject = new JSONObject();
+        JSONArray jsonArray = new JSONArray();
+        JSONObject object_1 = new JSONObject();
+        for (int i=0;i<linelist.size();i++){
+            StorageRechargeAloneBean bean=new StorageRechargeAloneBean(linelist.get(i));
+            object_1.put("alone", linelist.get(i));
+            jsonArray.add(bean);
+        }
+
+        jsonObject.put("formStore", jsonArray);
+        Log.e("alone===2",jsonObject.toString());
+
+        JSONArray dataArray = FastjsonUtil.getJSONArray(jsonObject.toString(), "formStore");
+        handleFeededlineData(dataArray);
+    }
+    private void handleFeededlineData(JSONArray dataArray) {
+        ResourcesBean bean;
+        resourcesBeanList.clear();
+        for (Object index : dataArray) {
+            JSONObject data = (JSONObject) index;
+            bean= new ResourcesBean();
+            bean.setSC_CODE(data.getString("alonedata"));
+            resourcesBeanList.add(bean);
+        }
+        setlineAdapter(resourcesBeanList);
+    }
+    private void setlineAdapter(ArrayList<ResourcesBean> mList) {
+        LogUtil.i("mList", JSON.toJSONString(mList));
+        ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(mList);
+        ipAndResourcesPortAdapter.setmList(resourcesBeanList);
+        ipAndResourcesPortAdapter.notifyDataSetChanged();
+        rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
     }
 
     /**
      * 关于岗位资源弹框
      */
     private void initresourcesPopupWindow() {
-        resourcesBeanList = new ArrayList<>();
+
         ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(resourcesBeanList);
         View contView = LayoutInflater.from(mActivity).inflate(R.layout.index_edit_pup, null);
         edit_et = (ClearableEditText) contView.findViewById(R.id.edit_et);
         TextView sure_tv = (TextView) contView.findViewById(R.id.sure_tv);
         TextView cancle_tv = (TextView) contView.findViewById(R.id.cancle_tv);
         ImageView search_im = contView.findViewById(R.id.search_im);
-
-        RecyclerView rv_ip_port_data = contView.findViewById(R.id.rv_ip_port_data);
-        rv_ip_port_data.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
-        rv_ip_port_data.setLayoutManager(new LinearLayoutManager(mActivity));
+        LinearLayout line_top = contView.findViewById(R.id.line_top);
+        line_top.setVisibility(View.GONE);
+        rv_line_ip_port_data = contView.findViewById(R.id.rv_ip_port_data);
+        rv_line_ip_port_data.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
+        rv_line_ip_port_data.setLayoutManager(new LinearLayoutManager(mActivity));
         ipAndResourcesPortAdapter.setmList(resourcesBeanList);
-        rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
-        getfuzzySearchSourceData(edit_et.getText().toString().trim(),"弹框");
-
+        rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+//        getfuzzySearchSourceData(edit_et.getText().toString().trim(),"弹框");
+        getlineDataList();
         editPW = new PopupWindow(contView, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
         editPW.setTouchable(true);
         editPW.setBackgroundDrawable(new BitmapDrawable());
@@ -1168,7 +1244,7 @@ public class BreakdownRepairFragment extends BaseFragment{
         search_im.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                getfuzzySearchSourceData(edit_et.getText().toString().trim(),"弹框");
+//                getfuzzySearchSourceData(edit_et.getText().toString().trim(),"弹框");
             }
         });
 
@@ -1178,6 +1254,7 @@ public class BreakdownRepairFragment extends BaseFragment{
             public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
                 List<ResourcesBean> ipAndPortBeans = ipAndResourcesPortAdapter.getmList();
                 sc_code = ipAndPortBeans.get(position).getSC_CODE();
+                sc_name = ipAndPortBeans.get(position).getSC_NAME();
                 for (int i = 0; i < ipAndPortBeans.size(); i++) {
                     ipAndPortBeans.get(i).setChecked(false);
                 }
@@ -1195,6 +1272,9 @@ public class BreakdownRepairFragment extends BaseFragment{
                 if (!StringUtil.isEmpty(sc_code)){
                     SharedPreUtil.saveString(mActivity,"sc_codecollethree",sc_code);
                 }
+                at_station.clearFocus();
+                ce_work_code.clearFocus();
+                tv_dc_emcode.clearFocus();
                 closeListPopupWindow();
             }
         });
@@ -1671,7 +1751,7 @@ public class BreakdownRepairFragment extends BaseFragment{
         }
         @Override
         protected void convert(BaseViewHolder helper, ResourcesBean item) {
-            helper.setText(R.id.macode_ip__Tv,item.getSC_NAME()+"("+item.getSC_CODE()+")");
+            helper.setText(R.id.macode_ip__Tv,item.getSC_CODE());
             LinearLayout line_true = helper.itemView.findViewById(R.id.line_true);
             if (item.getChecked()) {
                 line_true.setSelected(true);

+ 3 - 3
app/src/main/java/com/uas/collection/fragment/ConnectServerFragment.java

@@ -142,13 +142,13 @@ public class ConnectServerFragment extends BaseFragment implements View.OnClickL
         submitButton = (Button) root.findViewById(R.id.btn_submit_conncetserver_fragment);
         ipEditText = (EditText) root.findViewById(R.id.et_ip_connectserver_fragment);
 //        ipEditText.setText("10.1.80.50");
-        ipEditText.setText("10.1.81.2");
+        ipEditText.setText("192.168.6.253");
         portEditText = (EditText) root.findViewById(R.id.et_port_connectserver_fragment);
-        portEditText.setText("9443");
+        portEditText.setText("8099");
 //        portEditText.setText("8083");
         siteEditText = (EditText) root.findViewById(R.id.et_site_connectserver_fragment);
 //        siteEditText.setText("ERP");
-        siteEditText.setText("uas_dev");
+        siteEditText.setText("mes");
         noticeTextView = (TextView) root.findViewById(R.id.textview_notice);
         mSystemSpinner = (Spinner) root.findViewById(R.id.connect_system_sp);
         mHttpSpinner = (Spinner) root.findViewById(R.id.connect_http_sp);

+ 537 - 84
app/src/main/java/com/uas/collection/fragment/DataCollectionFragment.java

@@ -12,6 +12,7 @@ import android.support.v7.widget.GridLayoutManager;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.text.Editable;
+import android.text.TextUtils;
 import android.text.TextWatcher;
 import android.util.Base64;
 import android.util.Log;
@@ -63,6 +64,7 @@ import com.uas.collection.util.Constants;
 import com.uas.collection.util.FastjsonUtil;
 import com.uas.collection.util.HttpCallback;
 import com.uas.collection.util.HttpParams;
+import com.uas.collection.util.JsonUtils;
 import com.uas.collection.util.LogUtil;
 import com.uas.collection.util.MyArrayAdapter;
 import com.uas.collection.util.StringUtil;
@@ -73,7 +75,6 @@ import org.jetbrains.annotations.NotNull;
 import org.json.JSONException;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
@@ -108,7 +109,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
     private PopupWindow editPW;
     private List<IpAndPortBean> delists;
     private List<LinecodeBean> linecodeBeanList;
-    private List<ResourcesBean> resourcesBeanList;
+    private ArrayList<ResourcesBean> resourcesBeanList;
     private IpAndPortAdapter andPortAdapter;
     private IpAndlinecodePortAdapter ipAndlinecodePortAdapter;
     private IpAndResourcesPortAdapter ipAndResourcesPortAdapter;
@@ -126,9 +127,12 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
     private String pr_code;
     private String pr_detail;
     private ClearableEditText tv_dc_emcode;
+    private ClearableEditText tv_dc_line;
     private ImageView iv_dc_emcode;
+    private ImageView iv_dc_line;
     private int mFocusId;
     private static final int SCAN_BARCODE_CODESD = 925;
+    private static final int SCAN_BARCODE_LINE = 888;
     private RecyclerView rv_datachange;
     private ArrayList<StorageRechargeAloneBean> mFeededList;
     private SelectAdapter selectAdapter;
@@ -139,9 +143,12 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
     private String sc_codecolleone;
     private String ma_id;
     private TextView tv_macode;
-    private String va_codechushihua;
     private String st_remarkce;
-    private List<String> listce;
+    private RecyclerView rv_line_ip_port_data;
+    private RecyclerView rv_undesirable;
+    private SelectAdapterundesirable myAdapterundesirable;
+    private ArrayList<StorageRechargeAloneBean> mFeededListundesirable;
+    private String undesirablalone;
 
     @Override
     protected int getLayout() {
@@ -174,7 +181,6 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         ce_bit_number = root.findViewById(R.id.ce_bit_number);
         iv_unhealthy_delete = root.findViewById(R.id.iv_unhealthy_delete);
         iv_personnel_data = root.findViewById(R.id.iv_personnel_data);
-
         mSmartTable = root.findViewById(R.id.jlt_storage_in_filter_list_st);
         rv_data = root.findViewById(R.id.rv_data);
         tv_em_name = root.findViewById(R.id.tv_em_name);
@@ -184,6 +190,9 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         rv_datachange = root.findViewById(R.id.rv_datachange);
         rv_datapassqty = root.findViewById(R.id.rv_datapassqty);
         tv_macode = root.findViewById(R.id.tv_macode);
+        tv_dc_line = root.findViewById(R.id.tv_dc_line);
+        iv_dc_line = root.findViewById(R.id.iv_dc_line);
+        rv_undesirable = root.findViewById(R.id.rv_undesirable);
 
         mFilterStorageInBeans = Collections.synchronizedList(new ArrayList<>());
 
@@ -256,9 +265,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
 
             @Override
             public void onTextChanged(CharSequence s, int start, int before, int count) {
-                if (s.length() >=2) {
-                    getfuzzySearchData(et_linecode_smts.getText().toString().trim(),"");
-                }
+
             }
 
             @Override
@@ -277,6 +284,9 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
             public void onClick(View v) {
                 et_linecode_smts.setText("");
                 et_linecode_smts.requestFocus();
+                tv_macode.setText("");
+                tv_pr_code.setText("产品编号");
+                tv_pr_detail.setText("产品名称");
             }
         });
         linecodeBeanList = new ArrayList<>();
@@ -294,8 +304,8 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
                 if (actionId == EditorInfo.IME_ACTION_DONE
                         || actionId == EditorInfo.IME_ACTION_SEND
                         || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
-                    String va_code = ce_resources.getText().toString().trim();
-                    getfuzzySearchSourceData(va_code,"");
+//                    String va_code = ce_resources.getText().toString().trim();
+//                    getfuzzySearchSourceData(va_code,"");
                     return true;
                 }
                 return false;
@@ -309,9 +319,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
 
             @Override
             public void onTextChanged(CharSequence s, int start, int before, int count) {
-                if (s.length() >=2) {
-                    getfuzzySearchSourceData(ce_resources.getText().toString().trim(),"");
-                }
+
             }
 
             @Override
@@ -353,7 +361,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         LinearLayoutManager layoutmanager = new LinearLayoutManager(mActivity);
 //        MyLayoutManager layout = new MyLayoutManager();
 //        layout.setAutoMeasureEnabled(true);//防止recyclerview高度为wrap时测量item高度0(一定要加这个属性,否则显示不出来)
-        GridLayoutManager gridLayoutManager=new GridLayoutManager(mActivity,3);
+        GridLayoutManager gridLayoutManager=new GridLayoutManager(mActivity,5);
         layoutmanager.setOrientation(LinearLayoutManager.HORIZONTAL);//列表横向显示
         rv_datachange.setLayoutManager(gridLayoutManager);
         setAdapter(mFeededList);
@@ -433,14 +441,34 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
                 }
             }
         });
-
+        iv_dc_line.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                tv_dc_line.requestFocus();
+                if (CameraUtil.hasCamera()) {
+                    if (root.findFocus() != null) {
+                        mFocusId = root.findFocus().getId();
+                        Intent intent = new Intent();
+                        intent.setClass(mActivity, CaptureActivity.class);
+                        startActivityForResult(intent, SCAN_BARCODE_LINE);
+                        SharedPreUtil.saveString(mActivity, Constants.STORAGEERECHADD, "NO");
+                    } else {
+                        CommonUtil.toastNoRepeat(mActivity, "请选择您要操作的输入框");
+                    }
+                } else {
+                    CommonUtil.toastNoRepeat(mActivity, getString(R.string.no_camera_detected));
+                }
+            }
+        });
 
         sc_codecolleone = SharedPreUtil.getString(mActivity, "sc_codecolleone", null);
         ce_resources.setText(sc_codecolleone);
         tv_station.setText(sc_codecolleone);
-        va_codechushihua = ce_resources.getText().toString().trim();
-        listce = new ArrayList<>();
-            getfuzzySearchSourceData(va_codechushihua,"不良");
+        getunhealthyDataList(sc_codecolleone);
+        recycleDataundesirable(sc_codecolleone);
+
+
+//            getfuzzySearchSourceData(va_codechushihua,"不良");
 //            for (int i=0;i<resourcesBeanList.size();i++){
 //                st_remarkce = resourcesBeanList.get(i).getST_REMARK();
 //            }
@@ -509,6 +537,9 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
                                     String path = data2.getString("path");
                                     String str2 = new String(Base64.decode(path.getBytes(),Base64.DEFAULT));
                                     Glide.with(mActivity).load(str2).into(iv_personnel_data);
+                                    et_linecode_smts.clearFocus();
+                                    tv_dc_emcode.clearFocus();
+                                    ce_resources.clearFocus();
                                 }
 
                             }
@@ -720,7 +751,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         }
         @Override
         protected void convert(BaseViewHolder helper, ResourcesBean item) {
-            helper.setText(R.id.macode_ip__Tv,item.getSC_NAME()+"("+item.getSC_CODE()+")");
+            helper.setText(R.id.macode_ip__Tv,item.getSC_CODE());
             LinearLayout line_true = helper.itemView.findViewById(R.id.line_true);
             if (item.getChecked()) {
                 line_true.setSelected(true);
@@ -804,22 +835,28 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
                         ipAndlinecodePortAdapter.notifyDataSetChanged();
 
                     }
-//                    else {
-//                        if (dataArray != null) {
-//                            for (int i = 0; i < dataArray.length(); i++) {
-//                                org.json.JSONObject dataObject = dataArray.optJSONObject(i);
-//                                if (dataObject != null) {
-//                                    String pi_inoutno = JsonUtils.optStringNotNull(dataObject, "MA_CODE");
-//                                    String pr_code = JsonUtils.optStringNotNull(dataObject, "PR_CODE");
-//                                    String pr_detail = JsonUtils.optStringNotNull(dataObject, "PR_DETAIL");
-//                                    if (!TextUtils.isEmpty(pi_inoutno))
-//                                        mAutoStringAdapter.add(pi_inoutno);
-//                                    tv_pr_code.setText("产品编号  "+pr_code);
-//                                    tv_pr_detail.setText("产品名称  "+pr_detail);
-//                                }
-//                            }
-//                        }
-//                    }
+                    else {
+                        if (dataArray != null) {
+                            for (int i = 0; i < dataArray.length(); i++) {
+                                org.json.JSONObject dataObject = dataArray.optJSONObject(i);
+                                if (dataObject != null) {
+                                    String ma_code = JsonUtils.optStringNotNull(dataObject, "MA_CODE");
+                                    String pr_code = JsonUtils.optStringNotNull(dataObject, "PR_CODE");
+                                    String pr_detail = JsonUtils.optStringNotNull(dataObject, "PR_DETAIL");
+                                    String ma_id = JsonUtils.optStringNotNull(dataObject, "MA_ID");
+                                    if (!TextUtils.isEmpty(ma_id))
+                                        mAutoStringAdapter.add(ma_code);
+                                    tv_pr_code.setText("产品编号  "+pr_code);
+                                    tv_pr_detail.setText("产品名称  "+pr_detail);
+                                    tv_macode.setText(""+ma_code);
+                                    et_linecode_smts.setText(ma_id);
+                                    et_linecode_smts.clearFocus();
+                                    tv_dc_emcode.clearFocus();
+                                    ce_resources.clearFocus();
+                                }
+                            }
+                        }
+                    }
 
 
                 } catch (JSONException e) {
@@ -894,7 +931,6 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
                             for (int i = 0; i< resourcesBeanList.size(); i++){
                                 StorageRechargeAloneBean bean=new StorageRechargeAloneBean(resourcesBeanList.get(i).getST_REMARK());
                                 object_1ce.put("alone", resourcesBeanList.get(i).getST_REMARK());
-                                Log.e("listce===",resourcesBeanList.get(i).getST_REMARK()+"!");
                                 jsonArrayce.add(bean);
                             }
 
@@ -917,19 +953,52 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
                         }
 
                     }
-//                    else {
-//                        if (dataArray != null) {
-//                            for (int i = 0; i < dataArray.length(); i++) {
-//                                org.json.JSONObject dataObject = dataArray.optJSONObject(i);
-//                                if (dataObject != null) {
-//                                    String pi_inoutno = JsonUtils.optStringNotNull(dataObject, "SC_CODE");
-//                                    String st_remark = JsonUtils.optStringNotNull(dataObject, "ST_REMARK");
-//                                    if (!TextUtils.isEmpty(pi_inoutno))
-//                                        mAutoStringAdapte.add(pi_inoutno);
-//                                }
-//                            }
-//                        }
-//                    }
+                    else {
+                        if (dataArray != null) {
+                            for (int i = 0; i < dataArray.length(); i++) {
+                                org.json.JSONObject dataObject = dataArray.optJSONObject(i);
+                                if (dataObject != null) {
+                                    String sc_code = JsonUtils.optStringNotNull(dataObject, "SC_CODE");
+                                    String st_remark = JsonUtils.optStringNotNull(dataObject, "ST_REMARK");
+                                    ce_resources.setText(sc_code);
+                                    if (!StringUtil.isEmpty(sc_code)){
+                                        SharedPreUtil.saveString(mActivity,"sc_codecolleone",sc_code);
+                                    }
+
+                                    tv_station.setText("当前岗位:"+sc_code);
+                                    if (!StringUtil.isEmpty(st_remark)){
+                                        if (st_remark.contains("|")){
+                                            String[] split = st_remark.split("\\|");
+                                            for (int j=0;j<split.length;j++){
+                                                ResourcesBean bean = new ResourcesBean();
+                                                bean.setST_REMARK(split[j]);
+                                                resourcesBeanList.add(bean);
+                                            }
+
+                                        }
+                                    }
+
+                                    JSONObject jsonObjectce = new JSONObject();
+                                    JSONArray jsonArrayce = new JSONArray();
+                                    JSONObject object_1ce = new JSONObject();
+                                    for (int f = 0; f< resourcesBeanList.size(); f++){
+                                        StorageRechargeAloneBean bean=new StorageRechargeAloneBean(resourcesBeanList.get(f).getST_REMARK());
+                                        object_1ce.put("alone", resourcesBeanList.get(f).getST_REMARK());
+                                        jsonArrayce.add(bean);
+                                    }
+
+                                    jsonObjectce.put("formStore", jsonArrayce);
+                                    JSONArray dataArrayce = FastjsonUtil.getJSONArray(jsonObjectce.toString(), "formStore");
+                                    handleFeededData(dataArrayce);
+                                    ipAndunhealthyPortAdapter.setmList(resourcesBeanList);
+                                    ipAndunhealthyPortAdapter.notifyDataSetChanged();
+                                    tv_dc_emcode.clearFocus();
+                                    ce_resources.clearFocus();
+                                    ce_bit_number.clearFocus();
+                                }
+                            }
+                        }
+                    }
 
                 } catch (JSONException e) {
                     e.printStackTrace();
@@ -1006,6 +1075,12 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
     }
     String ec_passqtytrim;
     public void getNewData(){
+        if (tv_dc_emcode.getText().toString().trim().isEmpty()){
+            CommonUtil.toastNoRepeat(mActivity, "请采集人员编号");
+            return;
+        }
+
+
         String ce_work_codetrim = tv_macode.getText().toString().trim();
         String at_stationtrim = ce_resources.getText().toString().trim();
         String ce_bit_numbertrim = ce_bit_number.getText().toString().trim();
@@ -1020,6 +1095,17 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         for (int i=0;i<selectedItem.size();i++){
             alonedata = selectedItem.get(i).getAlonedata();
         }
+        ArrayList<StorageRechargeAloneBean> selectedundesirablItem = myAdapterundesirable.getSelectedItem();
+        if (selectedundesirablItem.size()==0){
+            undesirablalone=null;
+        }else {
+            for (int i=0;i<selectedundesirablItem.size();i++){
+                undesirablalone = selectedundesirablItem.get(i).getAlonedata();
+            }
+        }
+
+
+
         ArrayList<StorageRechargeAloneBean> selectAdapterQtySelectedItem = selectAdapterQty.getSelectedItem();
         if (selectAdapterQtySelectedItem.size()==0){
             ec_passqtytrim="1";
@@ -1039,11 +1125,12 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         object_1.put("SR_BADNAME",alonedata);//不良现象
         object_1.put("SR_TYPE", "数据采集");//种类(数据采集/、外观维修/性能维修)
         object_1.put("SR_LOCATION", ce_bit_numbertrim);//位号
-        object_1.put("SR_REASON", "");//原因
+        object_1.put("SR_REASON", undesirablalone);//原因
         object_1.put("SR_SN", "");//SN号
         object_1.put("SR_REMARK", "");//备注/其他
         object_1.put("SR_INMAN", "");//录入人
         object_1.put("SR_INDATE", "");//录入时间
+        object_1.put("SR_EMCODE", tv_dc_emcode.getText().toString().trim());//人员编号
         jsonArray.add(object_1);
         Log.e("jsonArray=====",jsonArray.toJSONString());
         progressDialog.show();
@@ -1056,7 +1143,17 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
             public void onSuccess(int flag, Object o) throws Exception {
                 progressDialog.dismiss();
                 CommonUtil.toastYESRepeat(mActivity, "保存成功");
+                et_linecode_smts.clearFocus();
+                tv_dc_emcode.clearFocus();
+                ce_resources.clearFocus();
+                ce_bit_number.clearFocus();
+                setAdaptertwo(passFeededListQty);
                 getTestcollectdata(tv_macode.getText().toString().trim(),ce_resources.getText().toString().trim());
+                getunhealthyDataList(ce_resources.getText().toString().trim());
+                recycleDataundesirable(ce_resources.getText().toString().trim());
+                setAdaptertwo(passFeededListQty);
+                ce_bit_number.setText("");
+
             }
 
             @Override
@@ -1134,6 +1231,9 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
                 tv_pr_code.setText("产品编号  "+pr_code);
                 tv_pr_detail.setText("产品名称  "+pr_detail);
                 tv_macode.setText(""+ma_code);
+                et_linecode_smts.clearFocus();
+                tv_dc_emcode.clearFocus();
+                ce_resources.clearFocus();
                 closeListPopupWindow();
             }
         });
@@ -1194,29 +1294,233 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
 //            }
 //
 //        });
+    }
+
+
+    /**
+     * 不良原因
+     */
+    public void recycleDataundesirable(String sc_code){
+        mFeededListundesirable = new ArrayList<>();
+        myAdapterundesirable = new SelectAdapterundesirable(mFeededListundesirable);
+        GridLayoutManager gridLayoutManager=new GridLayoutManager(mActivity,5);
+        LinearLayoutManager layoutmanager = new LinearLayoutManager(mActivity);
+//        MyLayoutManager layout = new MyLayoutManager();
+//        layout.setAutoMeasureEnabled(true);//防止recyclerview高度为wrap时测量item高度0(一定要加这个属性,否则显示不出来)
+        layoutmanager.setOrientation(LinearLayoutManager.HORIZONTAL);//列表横向显示
+        rv_undesirable.setLayoutManager(gridLayoutManager);
+        setAdapterundesirable(mFeededListundesirable);
+        rv_undesirable.setAdapter(myAdapterundesirable);
+        JSONObject jsonObject = new JSONObject();
+        JSONArray jsonArray = new JSONArray();
+        JSONObject object_1 = new JSONObject();
+        List<String> list=new ArrayList<>();
+
+        if (sc_code.equals("炉前目检")){
+            list.add("少件");
+            list.add("错件");
+            list.add("反向");
+            list.add("歪斜");
+            list.add("错孔");
+            list.add("不出脚");
+        }else if (sc_code.equals("检焊目检")){
+            list.add("少件");
+            list.add("错件");
+            list.add("反向");
+            list.add("歪斜");
+            list.add("错孔");
+            list.add("空焊");
+            list.add("连锡");
+            list.add("少锡");
+            list.add("不出脚");
+        }else if (sc_code.equals("线材目检")){
+            list.add("空焊");
+            list.add("连锡");
+            list.add("少锡");
+            list.add("反向");
+            list.add("错孔");
+            list.add("不出脚");
+        }else {
+            list.clear();
+        }
+
+        for (int i=0;i<list.size();i++){
+            StorageRechargeAloneBean bean=new StorageRechargeAloneBean(list.get(i));
+            object_1.put("alone", list.get(i));
+            jsonArray.add(bean);
+        }
+
+        jsonObject.put("formStore", jsonArray);
+
+        JSONArray dataArray = FastjsonUtil.getJSONArray(jsonObject.toString(), "formStore");
+        handleFeededDataundesirable(dataArray);
+
+    }
+
+    private void handleFeededDataundesirable(JSONArray dataArray) {
+        StorageRechargeAloneBean bean;
+        mFeededListundesirable.clear();
+        for (Object index : dataArray) {
+            JSONObject data = (JSONObject) index;
+            bean= new StorageRechargeAloneBean(
+                    data.getString("alonedata"));
+            mFeededListundesirable.add(bean);
+        }
+        setAdapterundesirable(mFeededListundesirable);
+    }
+    private void setAdapterundesirable(ArrayList<StorageRechargeAloneBean> mList) {
+        LogUtil.i("mList", JSON.toJSONString(mList));
+        myAdapterundesirable = new SelectAdapterundesirable(mList);
+        rv_undesirable.setAdapter(myAdapterundesirable);
+    }
+
+
+
+
+
+
 
 
+
+
+
+
+    /**
+     * 不良现象
+     */
+    private void getunhealthyDataList(String sc_code){
+        List<String> linelist=new ArrayList<>();
+        JSONObject jsonObjectce = new JSONObject();
+        JSONArray jsonArrayce = new JSONArray();
+        JSONObject object_1ce = new JSONObject();
+        if (sc_code.equals("炉前目检")||sc_code.equals("检焊目检")){
+            linelist.add("电阻");
+            linelist.add("电容");
+            linelist.add("电感");
+            linelist.add("保险");
+            linelist.add("桥堆");
+            linelist.add("二极管");
+            linelist.add("三极管");
+            linelist.add("IC");
+            linelist.add("共模电感");
+            linelist.add("变压器");
+            linelist.add("热敏");
+            linelist.add("安规电容");
+            linelist.add("其他");
+        }else if (sc_code.equals("组装外观目检")||sc_code.equals("包装外观目检")){
+            linelist.add("磕伤");
+            linelist.add("划伤");
+            linelist.add("白胶");
+            linelist.add("黄胶");
+            linelist.add("断差");
+            linelist.add("压伤");
+            linelist.add("脏污");
+            linelist.add("缝隙大");
+            linelist.add("USB错位");
+            linelist.add("贴标");
+            linelist.add("镭雕");
+            linelist.add("来料");
+            linelist.add("其他");
+        }else if (sc_code.equals("线材目检")){
+            linelist.add("AC线");
+            linelist.add("DC线");
+        }else if (sc_code.equals("组装测试")){
+            linelist.add("无输出");
+            linelist.add("电压高");
+            linelist.add("电压低");
+            linelist.add("电流高");
+            linelist.add("电流低");
+            linelist.add("纹波大");
+            linelist.add("纹波小");
+            linelist.add("起机慢");
+            linelist.add("AC短路");
+            linelist.add("DC短路");
+            linelist.add("OCP不保护");
+            linelist.add("电压跳变");
+            linelist.add("拐点不良");
+            linelist.add("耐压不良");
+            linelist.add("绝缘电阻");
+            linelist.add("其他");
+        }
+        else {
+            linelist.clear();
+        }
+
+        for (int i = 0; i< linelist.size(); i++){
+            StorageRechargeAloneBean bean=new StorageRechargeAloneBean(linelist.get(i));
+            object_1ce.put("alone", linelist.get(i));
+            jsonArrayce.add(bean);
+        }
+
+        jsonObjectce.put("formStore", jsonArrayce);
+        JSONArray dataArrayce = FastjsonUtil.getJSONArray(jsonObjectce.toString(), "formStore");
+        handleFeededData(dataArrayce);
     }
 
 
+
     /**
-     * 关于岗位资源弹框
+     * 岗位资源
      */
-    private void initresourcesPopupWindow() {
+    private void getlineDataList(){
+        List<String> linelist=new ArrayList<>();
+        linelist.add("炉前目检");
+        linelist.add("检焊目检");
+        linelist.add("组装测试");
+        linelist.add("组装外观目检");
+        linelist.add("包装外观目检");
+        linelist.add("线材目检");
+        JSONObject jsonObject = new JSONObject();
+        JSONArray jsonArray = new JSONArray();
+        JSONObject object_1 = new JSONObject();
+        for (int i=0;i<linelist.size();i++){
+            StorageRechargeAloneBean bean=new StorageRechargeAloneBean(linelist.get(i));
+            object_1.put("alone", linelist.get(i));
+            jsonArray.add(bean);
+        }
 
+        jsonObject.put("formStore", jsonArray);
+        Log.e("alone===2",jsonObject.toString());
 
+        JSONArray dataArray = FastjsonUtil.getJSONArray(jsonObject.toString(), "formStore");
+        handleFeededlineData(dataArray);
+    }
+    private void handleFeededlineData(JSONArray dataArray) {
+        ResourcesBean bean;
+        resourcesBeanList.clear();
+        for (Object index : dataArray) {
+            JSONObject data = (JSONObject) index;
+            bean= new ResourcesBean();
+            bean.setSC_CODE(data.getString("alonedata"));
+            resourcesBeanList.add(bean);
+        }
+        setlineAdapter(resourcesBeanList);
+    }
+    private void setlineAdapter(ArrayList<ResourcesBean> mList) {
+        LogUtil.i("mList", JSON.toJSONString(mList));
+        ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(mList);
+        ipAndResourcesPortAdapter.setmList(resourcesBeanList);
+        ipAndResourcesPortAdapter.notifyDataSetChanged();
+        rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+    }
+        /**
+         * 关于岗位资源弹框
+         */
+    private void initresourcesPopupWindow() {
         View contView = LayoutInflater.from(mActivity).inflate(R.layout.index_edit_pup, null);
         edit_et = (ClearableEditText) contView.findViewById(R.id.edit_et);
         TextView sure_tv = (TextView) contView.findViewById(R.id.sure_tv);
         TextView cancle_tv = (TextView) contView.findViewById(R.id.cancle_tv);
         ImageView search_im = contView.findViewById(R.id.search_im);
-
-        RecyclerView rv_ip_port_data = contView.findViewById(R.id.rv_ip_port_data);
-        rv_ip_port_data.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
-        rv_ip_port_data.setLayoutManager(new LinearLayoutManager(mActivity));
+        LinearLayout line_top = contView.findViewById(R.id.line_top);
+        line_top.setVisibility(View.GONE);
+        rv_line_ip_port_data = contView.findViewById(R.id.rv_ip_port_data);
+        rv_line_ip_port_data.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
+        rv_line_ip_port_data.setLayoutManager(new LinearLayoutManager(mActivity));
         ipAndResourcesPortAdapter.setmList(resourcesBeanList);
-        rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
-        getfuzzySearchSourceData(edit_et.getText().toString().trim(),"弹框");
+        rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+//        getfuzzySearchSourceData(edit_et.getText().toString().trim(),"弹框");
+        getlineDataList();
 
         editPW = new PopupWindow(contView, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
         editPW.setTouchable(true);
@@ -1233,7 +1537,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         search_im.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                getfuzzySearchSourceData(edit_et.getText().toString().trim(),"弹框");
+//                getfuzzySearchSourceData(edit_et.getText().toString().trim(),"弹框");
             }
         });
 
@@ -1264,27 +1568,12 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
                 }
 
                 tv_station.setText("当前岗位:"+sc_code);
-                if (!StringUtil.isEmpty(st_remark)){
-                    if (st_remark.contains("|")){
-                        String[] split = st_remark.split("\\|");
-                        list.addAll(Arrays.asList(split));
-                    }else {
-                        list.add(st_remark);
-                    }
-                }
-                JSONObject jsonObject = new JSONObject();
-                JSONArray jsonArray = new JSONArray();
-                JSONObject object_1 = new JSONObject();
-                for (int i=0;i<list.size();i++){
-                    StorageRechargeAloneBean bean=new StorageRechargeAloneBean(list.get(i));
-                    object_1.put("alone", list.get(i));
-                    jsonArray.add(bean);
-                }
-
-                jsonObject.put("formStore", jsonArray);
-                JSONArray dataArray = FastjsonUtil.getJSONArray(jsonObject.toString(), "formStore");
-                handleFeededData(dataArray);
+                tv_station.clearFocus();
+                tv_dc_emcode.clearFocus();
+                ce_resources.clearFocus();
 
+                getunhealthyDataList(sc_code);
+                recycleDataundesirable(sc_code);
 
                 closeListPopupWindow();
             }
@@ -1612,11 +1901,166 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
             }
         }
     }
-    
-    
-    
-    
-    
+
+
+
+    public class  SelectAdapterundesirable extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
+        private int checkedPosition = -1;
+        private boolean onBind;
+        private ArrayList<StorageRechargeAloneBean> mList = new ArrayList<>();
+        private SparseBooleanArray mSelectedPositions = new SparseBooleanArray();
+        private boolean mIsSelectable = false;
+
+
+        public  SelectAdapterundesirable(ArrayList<StorageRechargeAloneBean> list) {
+            if (list == null) {
+                throw new IllegalArgumentException("model Data must not be null");
+            }
+            mList = list;
+        }
+
+        //更新adpter的数据和选择状态
+        public void updateDataSet(ArrayList<StorageRechargeAloneBean> list) {
+            this.mList = list;
+            mSelectedPositions = new SparseBooleanArray();
+//            ab.setTitle("已选择" + 0 + "项");
+        }
+
+
+        @Override
+        public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
+            View itemView = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.recyclerview_item, viewGroup, false);
+            return new    SelectAdapterundesirable.ListItemViewHolder(itemView);
+        }
+
+        private Map<Integer, Boolean> map = new HashMap<>();
+        //绑定界面,设置监听
+        @SuppressLint("SetTextI18n")
+        @Override
+        public void onBindViewHolder(final RecyclerView.@NotNull ViewHolder holder, @SuppressLint("RecyclerView") int i) {
+
+            //设置条目状态
+            ((SelectAdapterundesirable.ListItemViewHolder) holder).mainTitle.setText(mList.get(i).getAlonedata());
+            ((SelectAdapterundesirable.ListItemViewHolder) holder).ce_other.setVisibility(View.GONE);
+            ((SelectAdapterundesirable.ListItemViewHolder) holder).ce_qty.setVisibility(View.GONE);
+
+//            ((ListItemViewHolder) holder).checkBox.setChecked();
+            //checkBox的监听
+            ((SelectAdapterundesirable.ListItemViewHolder) holder).checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+                @Override
+                public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+                    if (isChecked == true) {
+                        map.clear();
+                        map.put(i, true);
+                        checkedPosition = i;
+                    } else {
+                        map.remove(i);
+                        if (map.size() == 0) {
+                            checkedPosition = -1; //-1 代表一个都未选择
+                        }
+                    }
+                    if (!onBind) {
+                        notifyDataSetChanged();
+                    }
+                }
+            });
+            onBind = true;
+            if (map != null && map.containsKey(i)) {
+                ((SelectAdapterundesirable.ListItemViewHolder) holder).checkBox.setChecked(true);
+            } else {
+                ((SelectAdapterundesirable.ListItemViewHolder) holder).checkBox.setChecked(false);
+            }
+            onBind = false;
+
+            (( SelectAdapterundesirable.ListItemViewHolder) holder).ce_other.addTextChangedListener(new TextWatcher() {
+                @Override
+                public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+
+                }
+
+                @Override
+                public void onTextChanged(CharSequence s, int start, int before, int count) {
+                    mList.get(i).setInputce((( SelectAdapterundesirable.ListItemViewHolder) holder).ce_other.getText().toString().trim());
+                }
+
+                @Override
+                public void afterTextChanged(Editable s) {
+
+                }
+            });
+            (( SelectAdapterundesirable.ListItemViewHolder) holder).ce_qty.addTextChangedListener(new TextWatcher() {
+                @Override
+                public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+
+                }
+
+                @Override
+                public void onTextChanged(CharSequence s, int start, int before, int count) {
+                    mList.get(i).setQtyce((( SelectAdapterundesirable.ListItemViewHolder) holder).ce_qty.getText().toString().trim());
+                }
+
+                @Override
+                public void afterTextChanged(Editable s) {
+
+                }
+            });
+        }
+
+        //获得选中条目的结果
+        public ArrayList<StorageRechargeAloneBean> getSelectedItem() {
+            ArrayList<StorageRechargeAloneBean> selectList = new ArrayList<>();
+            int checkedPosition = getCheckedPosition();
+            if (checkedPosition==-1){
+                selectList.clear();
+            }else {
+                selectList.add(mList.get(checkedPosition));
+            }
+            return selectList;
+        }
+        //设置给定位置条目的选择状态
+        private void setItemChecked(int position, boolean isChecked) {
+            mSelectedPositions.put(position, isChecked);
+        }
+
+
+        //根据位置判断条目是否选中
+        private boolean isItemChecked(int position) {
+            return mSelectedPositions.get(position);
+        }
+
+        //得到当前选中的位置
+        public int getCheckedPosition() {
+            return checkedPosition;
+        }
+        @Override
+        public int getItemCount() {
+            return mList == null ? 0 : mList.size();
+        }
+        //根据位置判断条目是否可选
+        private boolean isSelectable() {
+            return mIsSelectable;
+        }
+        //设置给定位置条目的可选与否的状态
+        private void setSelectable(boolean selectable) {
+            mIsSelectable = selectable;
+        }
+        public class ListItemViewHolder extends RecyclerView.ViewHolder{
+            //ViewHolder
+            CheckBox checkBox;
+            TextView mainTitle;
+            ClearableEditText ce_other;
+            AutoCompleteTextView ce_qty;
+            ListItemViewHolder(View view) {
+                super(view);
+                this.mainTitle = (TextView) view.findViewById(R.id.text);
+                this.checkBox = (CheckBox) view.findViewById(R.id.select_checkbox);
+                this.ce_other = (ClearableEditText) view.findViewById(R.id.ce_other);
+                this.ce_qty = (AutoCompleteTextView) view.findViewById(R.id.ce_qty);
+
+            }
+        }
+    }
+
     
 
     @Override
@@ -1663,6 +2107,15 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
                 }
             }
         }
+        if (requestCode == SCAN_BARCODE_LINE && data != null) {
+            if (data.getExtras() != null) {
+                String result = data.getExtras().getString(com.uas.collection.camera.CodeUtils.RESULT_STRING);
+                if (mFocusId == R.id.tv_dc_line) {
+                    tv_dc_line.setText(result);
+                    tv_dc_line.setSelection(result.length());
+                }
+            }
+        }
 
     }
     @Override

+ 124 - 57
app/src/main/java/com/uas/collection/fragment/StorageRechargeListFragment.java

@@ -50,6 +50,7 @@ import com.uas.collection.util.Constants;
 import com.uas.collection.util.FastjsonUtil;
 import com.uas.collection.util.HttpCallback;
 import com.uas.collection.util.HttpParams;
+import com.uas.collection.util.JsonUtils;
 import com.uas.collection.util.LogUtil;
 import com.uas.collection.util.MyArrayAdapter;
 import com.uas.collection.util.MyLayoutManager;
@@ -106,10 +107,10 @@ public class StorageRechargeListFragment extends BaseFragment{
     private TextView tv_pr_detail;
     private String pr_code;
     private String pr_detail;
-    private TextView tv_station;
     private String sc_name;
     private ClearableEditText tv_hintshow;
     private List<String> stringList;
+    private RecyclerView rv_line_ip_port_data;
 
     @Override
     protected int getLayout() {
@@ -145,7 +146,6 @@ public class StorageRechargeListFragment extends BaseFragment{
         tv_macode = root.findViewById(R.id.tv_macode);
         tv_pr_code = root.findViewById(R.id.tv_pr_code);
         tv_pr_detail = root.findViewById(R.id.tv_pr_detail);
-        tv_station = root.findViewById(R.id.tv_station);
         tv_hintshow = root.findViewById(R.id.tv_hintshow);
 
 
@@ -194,7 +194,7 @@ public class StorageRechargeListFragment extends BaseFragment{
         //不良原因
         recycleDatatwo();
         /**--------------------------------工单号----------------------------**/
-
+        linecodeBeanList = new ArrayList<>();
         ce_work_code.setOnEditorActionListener(new TextView.OnEditorActionListener() {
             @Override
             public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
@@ -217,9 +217,7 @@ public class StorageRechargeListFragment extends BaseFragment{
 
             @Override
             public void onTextChanged(CharSequence s, int start, int before, int count) {
-                if (s.length() >=2) {
-                    getfuzzySearchData(ce_work_code.getText().toString().trim(),"");
-                }
+
             }
 
             @Override
@@ -237,6 +235,9 @@ public class StorageRechargeListFragment extends BaseFragment{
             public void onClick(View v) {
                 ce_work_code.setText("");
                 ce_work_code.requestFocus();
+                tv_pr_code.setText("产品编号");
+                tv_pr_detail.setText("产品名称");
+                tv_macode.setText("工单号");
             }
         });
 
@@ -250,15 +251,15 @@ public class StorageRechargeListFragment extends BaseFragment{
 
 
         /**--------------------------------岗位资源----------------------------**/
-
+        resourcesBeanList = new ArrayList<>();
         at_station.setOnEditorActionListener(new TextView.OnEditorActionListener() {
             @Override
             public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
                 if (actionId == EditorInfo.IME_ACTION_DONE
                         || actionId == EditorInfo.IME_ACTION_SEND
                         || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
-                    String va_code = at_station.getText().toString().trim();
-                    getfuzzySearchSourceData(va_code,"");
+//                    String va_code = at_station.getText().toString().trim();
+//                    getfuzzySearchSourceData(va_code,"");
                     return true;
                 }
                 return false;
@@ -272,9 +273,7 @@ public class StorageRechargeListFragment extends BaseFragment{
 
             @Override
             public void onTextChanged(CharSequence s, int start, int before, int count) {
-                if (s.length() >=2) {
-                    getfuzzySearchSourceData(at_station.getText().toString().trim(),"");
-                }
+
             }
 
             @Override
@@ -420,7 +419,7 @@ public class StorageRechargeListFragment extends BaseFragment{
 
         sc_codecolletwo = SharedPreUtil.getString(mActivity, "sc_codecolletwo", null);
         at_station.setText(sc_codecolletwo);
-
+//        getfuzzySearchSourceData(sc_codecolletwo,"");
 
 
     }
@@ -450,6 +449,9 @@ public class StorageRechargeListFragment extends BaseFragment{
                                     String path = data2.getString("path");
                                     String str2 = new String(Base64.decode(path.getBytes(),Base64.DEFAULT));
                                     Glide.with(mActivity).load(str2).into(iv_personnel_data);
+                                    at_station.clearFocus();
+                                    ce_work_code.clearFocus();
+                                    tv_dc_emcode.clearFocus();
                                 }
 
                             }
@@ -508,22 +510,28 @@ public class StorageRechargeListFragment extends BaseFragment{
                         ipAndlinecodePortAdapter.notifyDataSetChanged();
 
                     }
-//                    else {
-//                        if (dataArray != null) {
-//                            for (int i = 0; i < dataArray.length(); i++) {
-//                                org.json.JSONObject dataObject = dataArray.optJSONObject(i);
-//                                if (dataObject != null) {
-//                                    String pi_inoutno = JsonUtils.optStringNotNull(dataObject, "MA_CODE");
-//                                    String pr_code = JsonUtils.optStringNotNull(dataObject, "PR_CODE");
-//                                    String pr_detail = JsonUtils.optStringNotNull(dataObject, "PR_DETAIL");
-//                                    if (!TextUtils.isEmpty(pi_inoutno))
-//                                        mAutoStringAdapter.add(pi_inoutno);
-//                                    tv_pr_code.setText("产品编号  "+pr_code);
-//                                    tv_pr_detail.setText("产品名称  "+pr_detail);
-//                                }
-//                            }
-//                        }
-//                    }
+                    else {
+                        if (dataArray != null) {
+                            for (int i = 0; i < dataArray.length(); i++) {
+                                org.json.JSONObject dataObject = dataArray.optJSONObject(i);
+                                if (dataObject != null) {
+                                    String ma_code = JsonUtils.optStringNotNull(dataObject, "MA_CODE");
+                                    String pr_code = JsonUtils.optStringNotNull(dataObject, "PR_CODE");
+                                    String pr_detail = JsonUtils.optStringNotNull(dataObject, "PR_DETAIL");
+                                    String ma_id = JsonUtils.optStringNotNull(dataObject, "MA_ID");
+                                    ce_work_code.setText(ma_id);
+                                    tv_gonema_code.setText(ma_code);
+                                    tv_pr_code.setText("产品编号  "+pr_code);
+                                    tv_pr_detail.setText("产品名称  "+pr_detail);
+                                    tv_macode.setText("工单号  "+ma_code);
+                                    at_station.clearFocus();
+                                    ce_work_code.clearFocus();
+                                    tv_dc_emcode.clearFocus();
+
+                                }
+                            }
+                        }
+                    }
 
 
                 } catch (JSONException e) {
@@ -592,19 +600,23 @@ public class StorageRechargeListFragment extends BaseFragment{
 
 
                     }
-//                    else {
-//                        if (dataArray != null) {
-//                            for (int i = 0; i < dataArray.length(); i++) {
-//                                org.json.JSONObject dataObject = dataArray.optJSONObject(i);
-//                                if (dataObject != null) {
-//                                    String pi_inoutno = JsonUtils.optStringNotNull(dataObject, "SC_CODE");
-//                                    String st_remark = JsonUtils.optStringNotNull(dataObject, "ST_REMARK");
-//                                    if (!TextUtils.isEmpty(pi_inoutno))
-//                                        mAutoStringAdapte.add(pi_inoutno);
-//                                }
-//                            }
-//                        }
-//                    }
+                    else {
+                        if (dataArray != null) {
+                            for (int i = 0; i < dataArray.length(); i++) {
+                                org.json.JSONObject dataObject = dataArray.optJSONObject(i);
+                                if (dataObject != null) {
+                                    String sc_code = JsonUtils.optStringNotNull(dataObject, "SC_CODE");
+                                    at_station.setText(sc_code);
+                                    at_station.clearFocus();
+                                    ce_work_code.clearFocus();
+                                    tv_dc_emcode.clearFocus();
+                                    if (!StringUtil.isEmpty(sc_code)){
+                                        SharedPreUtil.saveString(mActivity,"sc_codecolletwo",sc_code);
+                                    }
+                                }
+                            }
+                        }
+                    }
 
                 } catch (JSONException e) {
                     e.printStackTrace();
@@ -648,6 +660,10 @@ public class StorageRechargeListFragment extends BaseFragment{
             CommonUtil.toastNoRepeat(mActivity, "产品长度和产品条码长度不符");
             return;
         }
+        if (tv_dc_emcode.getText().toString().trim().isEmpty()){
+            CommonUtil.toastNoRepeat(mActivity, "请采集人员编号");
+            return;
+        }
         String input_Aloneda = null;
         JSONArray jsonArray = new JSONArray();
         JSONObject object_1 = new JSONObject();
@@ -684,6 +700,7 @@ public class StorageRechargeListFragment extends BaseFragment{
         object_1.put("SR_REMARK", "");//备注/其他
         object_1.put("SR_INMAN", "");//录入人
         object_1.put("SR_INDATE", "");//录入时间
+        object_1.put("SR_EMCODE", tv_dc_emcode.getText().toString().trim());//人员编号
         jsonArray.add(object_1);
         progressDialog.show();
         VollyRequest.getInstance().stringRequest(new HttpParams.Builder()
@@ -717,6 +734,10 @@ public class StorageRechargeListFragment extends BaseFragment{
             CommonUtil.toastNoRepeat(mActivity, "产品长度和产品条码长度不符");
             return;
         }
+        if (tv_dc_emcode.getText().toString().trim().isEmpty()){
+            CommonUtil.toastNoRepeat(mActivity, "请采集人员编号");
+            return;
+        }
         String input_Aloneda = null;
         String input_AlonedaTwo = null;
 //        if (myAdapter.getCheckedPosition()==-1){
@@ -768,6 +789,7 @@ public class StorageRechargeListFragment extends BaseFragment{
         object_1.put("SR_REMARK", "");//备注/其他
         object_1.put("SR_INMAN", "");//录入人
         object_1.put("SR_INDATE", "");//录入时间
+        object_1.put("SR_EMCODE",tv_dc_emcode.getText().toString().trim());//人员编号
         jsonArray.add(object_1);
         Log.e("jsonArray=====",jsonArray.toJSONString());
         progressDialog.show();
@@ -808,8 +830,6 @@ public class StorageRechargeListFragment extends BaseFragment{
                 tv_hintshow.setSelection(tv_hintshow.getText().toString().length());
                 setAdapter(mFeededList);
                 setAdaptertwo(mFeededListtwo);
-
-
             }
 
             @Override
@@ -829,9 +849,9 @@ public class StorageRechargeListFragment extends BaseFragment{
     private IpAndlinecodePortAdapter ipAndlinecodePortAdapter;
     private ClearableEditText edit_et;
     private PopupWindow editPW;
-    private List<ResourcesBean> resourcesBeanList;
+    private ArrayList<ResourcesBean> resourcesBeanList;
     private void initlinecodePopupWindow() {
-        linecodeBeanList = new ArrayList<>();
+
         ipAndlinecodePortAdapter = new IpAndlinecodePortAdapter(linecodeBeanList);
         View contView = LayoutInflater.from(mActivity).inflate(R.layout.index_edit_pup, null);
         edit_et = (ClearableEditText) contView.findViewById(R.id.edit_et);
@@ -891,6 +911,9 @@ public class StorageRechargeListFragment extends BaseFragment{
                 tv_pr_code.setText("产品编号  "+pr_code);
                 tv_pr_detail.setText("产品名称  "+pr_detail);
                 tv_macode.setText("工单号  "+ma_code);
+                at_station.clearFocus();
+                ce_work_code.clearFocus();
+                tv_dc_emcode.clearFocus();
                 closeListPopupWindow();
             }
         });
@@ -954,26 +977,68 @@ public class StorageRechargeListFragment extends BaseFragment{
 
 
     }
+    private void getlineDataList(){
+        List<String> linelist=new ArrayList<>();
+        linelist.add("炉前目检");
+        linelist.add("检焊目检");
+        linelist.add("组装测试");
+        linelist.add("组装外观目检");
+        linelist.add("包装外观目检");
+        JSONObject jsonObject = new JSONObject();
+        JSONArray jsonArray = new JSONArray();
+        JSONObject object_1 = new JSONObject();
+        for (int i=0;i<linelist.size();i++){
+            StorageRechargeAloneBean bean=new StorageRechargeAloneBean(linelist.get(i));
+            object_1.put("alone", linelist.get(i));
+            jsonArray.add(bean);
+        }
+
+        jsonObject.put("formStore", jsonArray);
+        Log.e("alone===2",jsonObject.toString());
+
+        JSONArray dataArray = FastjsonUtil.getJSONArray(jsonObject.toString(), "formStore");
+        handleFeededlineData(dataArray);
+    }
+    private void handleFeededlineData(JSONArray dataArray) {
+        ResourcesBean bean;
+        resourcesBeanList.clear();
+        for (Object index : dataArray) {
+            JSONObject data = (JSONObject) index;
+            bean= new ResourcesBean();
+            bean.setSC_CODE(data.getString("alonedata"));
+            resourcesBeanList.add(bean);
+        }
+        setlineAdapter(resourcesBeanList);
+    }
+    private void setlineAdapter(ArrayList<ResourcesBean> mList) {
+        LogUtil.i("mList", JSON.toJSONString(mList));
+        ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(mList);
+        ipAndResourcesPortAdapter.setmList(resourcesBeanList);
+        ipAndResourcesPortAdapter.notifyDataSetChanged();
+        rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+    }
+
 
     /**
      * 关于岗位资源弹框
      */
     private void initresourcesPopupWindow() {
-        resourcesBeanList = new ArrayList<>();
+
         ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(resourcesBeanList);
         View contView = LayoutInflater.from(mActivity).inflate(R.layout.index_edit_pup, null);
         edit_et = (ClearableEditText) contView.findViewById(R.id.edit_et);
         TextView sure_tv = (TextView) contView.findViewById(R.id.sure_tv);
         TextView cancle_tv = (TextView) contView.findViewById(R.id.cancle_tv);
         ImageView search_im = contView.findViewById(R.id.search_im);
-
-        RecyclerView rv_ip_port_data = contView.findViewById(R.id.rv_ip_port_data);
-        rv_ip_port_data.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
-        rv_ip_port_data.setLayoutManager(new LinearLayoutManager(mActivity));
+        LinearLayout line_top = contView.findViewById(R.id.line_top);
+        line_top.setVisibility(View.GONE);
+        rv_line_ip_port_data = contView.findViewById(R.id.rv_ip_port_data);
+        rv_line_ip_port_data.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
+        rv_line_ip_port_data.setLayoutManager(new LinearLayoutManager(mActivity));
         ipAndResourcesPortAdapter.setmList(resourcesBeanList);
-        rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
-        getfuzzySearchSourceData(edit_et.getText().toString().trim(),"弹框");
-
+        rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+//        getfuzzySearchSourceData(edit_et.getText().toString().trim(),"弹框");
+        getlineDataList();
         editPW = new PopupWindow(contView, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
         editPW.setTouchable(true);
         editPW.setBackgroundDrawable(new BitmapDrawable());
@@ -989,7 +1054,7 @@ public class StorageRechargeListFragment extends BaseFragment{
         search_im.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                getfuzzySearchSourceData(edit_et.getText().toString().trim(),"弹框");
+//                getfuzzySearchSourceData(edit_et.getText().toString().trim(),"弹框");
             }
         });
 
@@ -1014,7 +1079,9 @@ public class StorageRechargeListFragment extends BaseFragment{
             @Override
             public void onClick(View v) {
                 at_station.setText(sc_code);
-                tv_station.setText("岗位名称  "+sc_name);
+                at_station.clearFocus();
+                ce_work_code.clearFocus();
+                tv_dc_emcode.clearFocus();
                 if (!StringUtil.isEmpty(sc_code)){
                     SharedPreUtil.saveString(mActivity,"sc_codecolletwo",sc_code);
                 }
@@ -1351,7 +1418,7 @@ public class StorageRechargeListFragment extends BaseFragment{
         }
         @Override
         protected void convert(BaseViewHolder helper, ResourcesBean item) {
-            helper.setText(R.id.macode_ip__Tv,item.getSC_NAME()+"("+item.getSC_CODE()+")");
+            helper.setText(R.id.macode_ip__Tv,item.getSC_CODE());
             LinearLayout line_true = helper.itemView.findViewById(R.id.line_true);
             if (item.getChecked()) {
                 line_true.setSelected(true);

+ 14 - 0
app/src/main/res/drawable/bg_imageview_rauide.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--获得焦点的EditText-->
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="oval"
+    android:useLevel="false">
+
+    <solid android:color="#ffffff" />
+<!--    <corners android:radius="0dip" />-->
+    <size android:width="50dp"
+        android:height="50dp"/>
+    <stroke
+        android:width="0.5dp"
+        android:color="@color/gray1" />
+</shape>

+ 3 - 3
app/src/main/res/layout-large/fragment_breakdownrepair.xml

@@ -27,9 +27,9 @@
                 <ImageView
                     android:id="@+id/iv_personnel_data"
                     android:layout_width="100dp"
-                    android:layout_height="120dp"
+                    android:layout_height="100dp"
                     android:scaleType="fitXY"
-                    android:background="@drawable/bg_line_edittext">
+                    android:background="@drawable/bg_imageview_rauide">
                 </ImageView>
 
             </LinearLayout>
@@ -348,7 +348,7 @@
     <TextView
         android:id="@+id/tv_gonema_code"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
+        android:layout_height="wrap_content"
         android:visibility="gone">
     </TextView>
 </LinearLayout>

+ 65 - 2
app/src/main/res/layout-large/fragment_datacollection.xml

@@ -172,6 +172,45 @@
 
 
 
+                                        </TableRow>
+                                        <TableRow
+                                            android:layout_marginTop="@dimen/dp_10">
+                                            <TextView
+                                                android:layout_width="wrap_content"
+                                                android:layout_height="wrap_content"
+                                                android:text="线体"
+                                                android:layout_gravity="center"
+                                                android:textColor="@color/black">
+                                            </TextView>
+                                            <LinearLayout
+                                                android:layout_width="match_parent"
+                                                android:layout_height="wrap_content"
+                                                android:layout_marginLeft="23dp">
+                                                <com.uas.collection.view.ClearableEditText
+                                                    android:id="@+id/tv_dc_line"
+                                                    style="@style/EditTextLineStyle"
+                                                    android:text=""
+                                                    android:hint="请输入线体"
+                                                    android:layout_width="match_parent"
+                                                    android:layout_height="30dp"
+                                                    android:layout_weight="1"
+                                                    android:textColor="@color/black"
+                                                    />
+
+                                                <ImageView
+                                                    android:id="@+id/iv_dc_line"
+                                                    android:layout_width="30dp"
+                                                    android:layout_height="wrap_content"
+                                                    android:layout_gravity="center"
+                                                    android:layout_marginRight="10dp"
+                                                    android:layout_marginLeft="5dp"
+                                                    android:clickable="false"
+                                                    android:src="@drawable/ic_edittext_scan" />
+                                            </LinearLayout>
+
+
+
+
                                         </TableRow>
 
                                         <TableRow
@@ -320,9 +359,10 @@
                                     <ImageView
                                         android:id="@+id/iv_personnel_data"
                                         android:layout_width="match_parent"
-                                        android:layout_height="match_parent"
+                                        android:layout_height="180dp"
                                         android:scaleType="fitXY"
-                                        android:background="@drawable/bg_line_edittext">
+                                        android:background="@drawable/bg_imageview_rauide"
+                                        >
                                     </ImageView>
                                     <android.support.v7.widget.RecyclerView
                                         android:visibility="gone"
@@ -352,6 +392,28 @@
                                         android:layout_height="wrap_content">
                                     </android.support.v7.widget.RecyclerView>
                                 </TableRow>
+                                <TableRow
+                                    android:layout_marginTop="@dimen/dp_10">
+                                    <TextView
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="wrap_content"
+                                        android:text="不良原因"
+                                        android:layout_gravity="center"
+                                        android:textColor="@color/black">
+                                    </TextView>
+                                    <LinearLayout
+                                        android:orientation="horizontal"
+                                        android:layout_width="match_parent"
+                                        android:layout_height="wrap_content">
+
+
+                                        <android.support.v7.widget.RecyclerView
+                                            android:id="@+id/rv_undesirable"
+                                            android:layout_width="match_parent"
+                                            android:layout_height="wrap_content">
+                                        </android.support.v7.widget.RecyclerView>
+                                    </LinearLayout>
+                                </TableRow>
                                 <TableRow
                                     android:layout_marginTop="@dimen/dp_10">
                                     <TextView
@@ -374,6 +436,7 @@
                                         </android.support.v7.widget.RecyclerView>
                                     </LinearLayout>
                                 </TableRow>
+
                             </TableLayout>
                             <TextView
                                 android:layout_marginTop="@dimen/dp_10"

+ 3 - 11
app/src/main/res/layout-large/fragment_storage_recharge_list.xml

@@ -24,9 +24,9 @@
             <ImageView
                 android:id="@+id/iv_personnel_data"
                 android:layout_width="100dp"
-                android:layout_height="120dp"
+                android:layout_height="100dp"
                 android:scaleType="fitXY"
-                android:background="@drawable/bg_line_edittext">
+                android:background="@drawable/bg_imageview_rauide">
             </ImageView>
 
         </LinearLayout>
@@ -194,15 +194,7 @@
                     android:layout_gravity="center"
                     android:textColor="@color/black">
                 </TextView>
-                <TextView
-                    android:id="@+id/tv_station"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="1"
-                    android:text="岗位名称"
-                    android:layout_gravity="center"
-                    android:textColor="@color/black">
-                </TextView>
+
             </LinearLayout>
 
             <TextView

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

@@ -49,7 +49,8 @@
         android:layout_marginLeft="@dimen/dp_10"
         android:layout_marginRight="@dimen/dp_10"
         android:layout_below="@+id/line_top"
-        android:layout_height="200dp">
+        android:layout_height="200dp"
+        android:layout_marginTop="30dp">
     </android.support.v7.widget.RecyclerView>
     <LinearLayout
         android:layout_below="@+id/rv_ip_port_data"

+ 1 - 1
app/src/main/res/layout-large/recyclerview_item.xml

@@ -22,7 +22,7 @@
             android:layout_height="wrap_content"
             android:layout_gravity="center"
             android:text="1111111"
-            android:textSize="@dimen/dp_10"
+            android:textSize="20dp"
             android:textColor="@color/black"
             android:id="@+id/text"
             android:gravity="left"

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

@@ -29,7 +29,7 @@
                     android:layout_width="100dp"
                     android:layout_height="120dp"
                     android:scaleType="fitXY"
-                    android:background="@drawable/bg_line_edittext">
+                    android:background="@drawable/bg_imageview_rauide">
                 </ImageView>
 
             </LinearLayout>
@@ -199,6 +199,7 @@
                         android:layout_gravity="center"
                         android:textColor="@color/black">
                     </TextView>
+
                 </LinearLayout>
                 <TextView
                     android:layout_marginLeft="@dimen/dp_10"

+ 62 - 1
app/src/main/res/layout/fragment_datacollection.xml

@@ -172,6 +172,45 @@
 
 
 
+                                        </TableRow>
+                                        <TableRow
+                                            android:layout_marginTop="@dimen/dp_10">
+                                            <TextView
+                                                android:layout_width="wrap_content"
+                                                android:layout_height="wrap_content"
+                                                android:text="线体"
+                                                android:layout_gravity="center"
+                                                android:textColor="@color/black">
+                                            </TextView>
+                                            <LinearLayout
+                                                android:layout_width="match_parent"
+                                                android:layout_height="wrap_content"
+                                                android:layout_marginLeft="23dp">
+                                                <com.uas.collection.view.ClearableEditText
+                                                    android:id="@+id/tv_dc_line"
+                                                    style="@style/EditTextLineStyle"
+                                                    android:text=""
+                                                    android:hint="请输入线体"
+                                                    android:layout_width="match_parent"
+                                                    android:layout_height="30dp"
+                                                    android:layout_weight="1"
+                                                    android:textColor="@color/black"
+                                                    />
+
+                                                <ImageView
+                                                    android:id="@+id/iv_dc_line"
+                                                    android:layout_width="30dp"
+                                                    android:layout_height="wrap_content"
+                                                    android:layout_gravity="center"
+                                                    android:layout_marginRight="10dp"
+                                                    android:layout_marginLeft="5dp"
+                                                    android:clickable="false"
+                                                    android:src="@drawable/ic_edittext_scan" />
+                                            </LinearLayout>
+
+
+
+
                                         </TableRow>
 
                                         <TableRow
@@ -322,7 +361,7 @@
                                         android:layout_width="match_parent"
                                         android:layout_height="match_parent"
                                         android:scaleType="fitXY"
-                                        android:background="@drawable/bg_line_edittext">
+                                        android:background="@drawable/bg_imageview_rauide">
                                     </ImageView>
                                     <android.support.v7.widget.RecyclerView
                                         android:visibility="gone"
@@ -374,6 +413,28 @@
                                         </android.support.v7.widget.RecyclerView>
                                     </LinearLayout>
                                 </TableRow>
+                                <TableRow
+                                    android:layout_marginTop="@dimen/dp_10">
+                                    <TextView
+                                        android:layout_width="wrap_content"
+                                        android:layout_height="wrap_content"
+                                        android:text="不良原因"
+                                        android:layout_gravity="center"
+                                        android:textColor="@color/black">
+                                    </TextView>
+                                    <LinearLayout
+                                        android:orientation="horizontal"
+                                        android:layout_width="match_parent"
+                                        android:layout_height="wrap_content">
+
+
+                                        <android.support.v7.widget.RecyclerView
+                                            android:id="@+id/rv_undesirable"
+                                            android:layout_width="match_parent"
+                                            android:layout_height="wrap_content">
+                                        </android.support.v7.widget.RecyclerView>
+                                    </LinearLayout>
+                                </TableRow>
                             </TableLayout>
                             <TextView
                                 android:layout_marginTop="@dimen/dp_10"

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

@@ -26,7 +26,7 @@
                 android:layout_width="100dp"
                 android:layout_height="120dp"
                 android:scaleType="fitXY"
-                android:background="@drawable/bg_line_edittext">
+                android:background="@drawable/bg_imageview_rauide">
             </ImageView>
 
         </LinearLayout>
@@ -194,15 +194,6 @@
                     android:layout_gravity="center"
                     android:textColor="@color/black">
                 </TextView>
-                <TextView
-                    android:id="@+id/tv_station"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="1"
-                    android:text="岗位名称"
-                    android:layout_gravity="center"
-                    android:textColor="@color/black">
-                </TextView>
             </LinearLayout>
 
             <TextView

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

@@ -49,7 +49,8 @@
         android:layout_marginLeft="@dimen/dp_10"
         android:layout_marginRight="@dimen/dp_10"
         android:layout_below="@+id/line_top"
-        android:layout_height="200dp">
+        android:layout_height="200dp"
+        android:layout_marginTop="30dp">
     </android.support.v7.widget.RecyclerView>
     <LinearLayout
         android:layout_below="@+id/rv_ip_port_data"

+ 1 - 1
app/src/main/res/layout/recyclerview_item.xml

@@ -22,7 +22,7 @@
             android:layout_height="wrap_content"
             android:layout_gravity="center"
             android:text=""
-            android:textSize="@dimen/dp_10"
+            android:textSize="@dimen/textsize_20"
             android:textColor="@color/black"
             android:id="@+id/text"
             android:gravity="left"

BIN
app/src/main/res/mipmap-xxhdpi/select.png


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

@@ -1,4 +1,4 @@
-#Tue Jul 25 17:55:54 CST 2023
+#Wed Aug 02 16:25:32 CST 2023
 D\:\\AndroidData\\RD-DAATA-COLLECTION\\pda_libs\\pulltoreflashlibrary\\src\\main\\res\\drawable\\indicator_bg_bottom.xml=D\:\\AndroidData\\RD-DAATA-COLLECTION\\pda_libs\\pulltoreflashlibrary\\build\\intermediates\\packaged_res\\debug\\drawable\\indicator_bg_bottom.xml
 D\:\\AndroidData\\RD-DAATA-COLLECTION\\pda_libs\\pulltoreflashlibrary\\src\\main\\res\\drawable-mdpi\\indicator_arrow.png=D\:\\AndroidData\\RD-DAATA-COLLECTION\\pda_libs\\pulltoreflashlibrary\\build\\intermediates\\packaged_res\\debug\\drawable-mdpi-v4\\indicator_arrow.png
 D\:\\AndroidData\\RD-DAATA-COLLECTION\\pda_libs\\pulltoreflashlibrary\\src\\main\\res\\anim\\slide_out_to_bottom.xml=D\:\\AndroidData\\RD-DAATA-COLLECTION\\pda_libs\\pulltoreflashlibrary\\build\\intermediates\\packaged_res\\debug\\anim\\slide_out_to_bottom.xml