|
|
@@ -6,11 +6,13 @@ import android.app.Dialog;
|
|
|
import android.content.Intent;
|
|
|
import android.graphics.drawable.BitmapDrawable;
|
|
|
import android.support.annotation.Nullable;
|
|
|
+import android.support.v7.widget.DefaultItemAnimator;
|
|
|
import android.support.v7.widget.DividerItemDecoration;
|
|
|
import android.support.v7.widget.LinearLayoutManager;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
import android.text.TextUtils;
|
|
|
import android.util.Log;
|
|
|
+import android.util.SparseBooleanArray;
|
|
|
import android.view.Gravity;
|
|
|
import android.view.KeyEvent;
|
|
|
import android.view.LayoutInflater;
|
|
|
@@ -20,6 +22,7 @@ import android.view.Window;
|
|
|
import android.view.inputmethod.EditorInfo;
|
|
|
import android.widget.AutoCompleteTextView;
|
|
|
import android.widget.Button;
|
|
|
+import android.widget.CheckBox;
|
|
|
import android.widget.EditText;
|
|
|
import android.widget.FrameLayout;
|
|
|
import android.widget.ImageView;
|
|
|
@@ -42,6 +45,7 @@ import com.chad.library.adapter.base.BaseViewHolder;
|
|
|
import com.uas.jc_workstation.R;
|
|
|
import com.uas.jc_workstation.activity.FunctionActivity;
|
|
|
import com.uas.jc_workstation.bean.LinecodeBean;
|
|
|
+import com.uas.jc_workstation.bean.WorkOrderFlow;
|
|
|
import com.uas.jc_workstation.global.GloableParams;
|
|
|
import com.uas.jc_workstation.util.CameraUtil;
|
|
|
import com.uas.jc_workstation.util.CommonUtil;
|
|
|
@@ -58,6 +62,7 @@ import com.uas.jc_workstation.view.ClearableEditText;
|
|
|
import com.uuzuche.lib_zxing.activity.CaptureActivity;
|
|
|
import com.uuzuche.lib_zxing.activity.CodeUtils;
|
|
|
|
|
|
+import org.jetbrains.annotations.NotNull;
|
|
|
import org.json.JSONException;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
@@ -114,7 +119,10 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
private IpAndlinecodePortAdapter ipAndlinecodePortAdapter;
|
|
|
private List<LinecodeBean> linecodeBeanList;
|
|
|
private MyArrayAdapter<String> mAutoStringAdapter;
|
|
|
+ private ArrayList<WorkOrderFlow> mFeededList;
|
|
|
private String ma_code;
|
|
|
+ private SelectAdapter myAdapter;
|
|
|
+ private RecyclerView mRecyclerView;
|
|
|
|
|
|
@Override
|
|
|
protected int getLayout() {
|
|
|
@@ -146,12 +154,13 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
tv_pc_nnt = mActivity.findViewById(R.id.tv_pc_nnt);
|
|
|
tv_pepoer = mActivity.findViewById(R.id.tv_pepoer);
|
|
|
|
|
|
- mMoreBtn = (Button)mActivity.findViewById(R.id.btn_actionbar_more);
|
|
|
+ mMoreBtn = (Button) mActivity.findViewById(R.id.btn_actionbar_more);
|
|
|
+ mRecyclerView = root.findViewById(R.id.feeded_rv);
|
|
|
|
|
|
- et_linecode_smts = (AutoCompleteTextView)mActivity.findViewById(R.id.et_linecode_smts);
|
|
|
- iv_gongdan_search = (ImageView)mActivity.findViewById(R.id.iv_gongdan_search);
|
|
|
+ et_linecode_smts = (AutoCompleteTextView) mActivity.findViewById(R.id.et_linecode_smts);
|
|
|
+ iv_gongdan_search = (ImageView) mActivity.findViewById(R.id.iv_gongdan_search);
|
|
|
|
|
|
- rb_changetext="良品";
|
|
|
+ rb_changetext = "签到";
|
|
|
String nowTime = getNowTime();
|
|
|
storage_recharge_collect_ets.setText(nowTime);
|
|
|
ct_qty.requestFocus();
|
|
|
@@ -172,7 +181,7 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
@SuppressLint("NonConstantResourceId")
|
|
|
@Override
|
|
|
public void onCheckedChanged(RadioGroup radioGroup, int checkid) {
|
|
|
- switch (checkid){
|
|
|
+ switch (checkid) {
|
|
|
case R.id.rb_ok:
|
|
|
rb_changetext = "签到";
|
|
|
break;
|
|
|
@@ -224,7 +233,7 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
@Override
|
|
|
public void onClick(View view) {
|
|
|
String s = modifyEditText.getText().toString();
|
|
|
- getnntPunching(s,alertDialog);
|
|
|
+ getnntPunching(s, alertDialog);
|
|
|
|
|
|
}
|
|
|
});
|
|
|
@@ -244,6 +253,14 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
protected void initDatas() {
|
|
|
ComDataBeanList = new ArrayList<>();
|
|
|
linecodeBeanList = new ArrayList<>();
|
|
|
+ mFeededList = new ArrayList<>();
|
|
|
+ myAdapter = new SelectAdapter(mFeededList);
|
|
|
+ mRecyclerView.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
|
|
|
+ mRecyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
|
|
|
+ //设置Item增加、移除动画
|
|
|
+ mRecyclerView.setItemAnimator(new DefaultItemAnimator());
|
|
|
+ setAdapter(mFeededList);
|
|
|
+ mRecyclerView.setAdapter(myAdapter);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -264,7 +281,7 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
ipAndlinecodePortAdapter.setmList(linecodeBeanList);
|
|
|
rv_ip_port_data.setAdapter(ipAndlinecodePortAdapter);
|
|
|
|
|
|
- getfuzzySearchData(edit_et.getText().toString().trim(),"弹框");
|
|
|
+ getfuzzySearchData(edit_et.getText().toString().trim(), "弹框");
|
|
|
|
|
|
editPW = new PopupWindow(contView, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
|
|
|
editPW.setTouchable(true);
|
|
|
@@ -281,7 +298,7 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
search_im.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
- getfuzzySearchData(edit_et.getText().toString().trim(),"弹框");
|
|
|
+ getfuzzySearchData(edit_et.getText().toString().trim(), "弹框");
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -303,11 +320,13 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
sure_tv.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
- if(StringUtil.isEmpty(ma_code)){
|
|
|
- CommonUtil.toastNoRepeat(mActivity,"请选择工单流水");
|
|
|
+ if (StringUtil.isEmpty(ma_code)) {
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "请选择工单流水");
|
|
|
return;
|
|
|
}
|
|
|
et_linecode_smts.setText(ma_code);
|
|
|
+ //增加一个调用接口
|
|
|
+ getMakeMan(ma_code);
|
|
|
closeListPopupWindow();
|
|
|
}
|
|
|
});
|
|
|
@@ -322,6 +341,51 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
|
|
|
}
|
|
|
|
|
|
+ private void getMakeMan(String ma_code) {
|
|
|
+ progressDialog.show();
|
|
|
+ VollyRequest.getInstance().stringRequest(mStringRequest,
|
|
|
+ new HttpParams.Builder()
|
|
|
+ .url(GloableParams.ADDRESS_GET_MAKEMAN)
|
|
|
+ .method(Request.Method.GET)
|
|
|
+ .tag(TAG + "getMaCode")
|
|
|
+ .addParam("macode", ma_code)
|
|
|
+ .flag(0)
|
|
|
+ .build(), new HttpCallback() {
|
|
|
+ @Override
|
|
|
+ public void onSuccess(int flag, Object o) throws Exception {
|
|
|
+ progressDialog.dismiss();
|
|
|
+ Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(), "success");
|
|
|
+ JSONArray dataArray = FastjsonUtil.getJSONArray(o.toString(), "data");
|
|
|
+ if (isSuccess) {
|
|
|
+ if (dataArray != null) {
|
|
|
+ handleFeededData(dataArray);
|
|
|
+ } else {
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "未搜索到匹配数据");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onFail(int flag, String failStr) throws Exception {
|
|
|
+ progressDialog.dismiss();
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, failStr);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ private void handleFeededData(JSONArray dataArray) {
|
|
|
+ mFeededList.clear();
|
|
|
+ for (Object index : dataArray) {
|
|
|
+ JSONObject data = (JSONObject) index;
|
|
|
+ WorkOrderFlow workOrderFlow = new WorkOrderFlow();
|
|
|
+ workOrderFlow.setPCD_CARDCODE(data.getString("PCD_CARDCODE"));
|
|
|
+ workOrderFlow.setPCD_CARDNAME(data.getString("PCD_CARDNAME"));
|
|
|
+ workOrderFlow.setPCD_DATE(data.getString("PCD_DATE"));
|
|
|
+ mFeededList.add(workOrderFlow);
|
|
|
+ }
|
|
|
+ setAdapter(mFeededList);
|
|
|
+ }
|
|
|
+
|
|
|
private void getRepairStep(String trim) {
|
|
|
progressDialog.show();
|
|
|
VollyRequest.getInstance().stringRequest(mStringRequest,
|
|
|
@@ -334,17 +398,17 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
@Override
|
|
|
public void onSuccess(int flag, Object o) throws Exception {
|
|
|
progressDialog.dismiss();
|
|
|
- Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
|
|
|
+ Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(), "success");
|
|
|
JSONArray dataArray = FastjsonUtil.getJSONArray(o.toString(), "data");
|
|
|
- if (isSuccess){
|
|
|
- if (dataArray == null){
|
|
|
- CommonUtil.toastNoRepeat(mActivity,"未搜索到匹配数据");
|
|
|
- }else {
|
|
|
+ if (isSuccess) {
|
|
|
+ if (dataArray == null) {
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "未搜索到匹配数据");
|
|
|
+ } else {
|
|
|
handleFeededlineData(dataArray);
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
@Override
|
|
|
public void onFail(int flag, String failStr) throws Exception {
|
|
|
progressDialog.dismiss();
|
|
|
@@ -353,7 +417,7 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- public void getfuzzySearchData(String inoutNo,String sone){
|
|
|
+ public void getfuzzySearchData(String inoutNo, String sone) {
|
|
|
VollyRequest.getInstance().stringRequest(new HttpParams.Builder()
|
|
|
.url(GloableParams.ADDRESS_SMT_FUZZY_SEARCH)
|
|
|
.method(Request.Method.GET)
|
|
|
@@ -374,13 +438,13 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
org.json.JSONObject resultObject = new org.json.JSONObject(s);
|
|
|
org.json.JSONArray dataArray = resultObject.optJSONArray("data");
|
|
|
|
|
|
- JSONArray dataArrayone = FastjsonUtil.getJSONArray(o.toString(),"data");
|
|
|
- if (sone.equals("弹框")){
|
|
|
- if (dataArrayone == null|| dataArrayone.size() == 0){
|
|
|
- CommonUtil.toastNoRepeat(mActivity,"未搜索到匹配数据");
|
|
|
+ JSONArray dataArrayone = FastjsonUtil.getJSONArray(o.toString(), "data");
|
|
|
+ if (sone.equals("弹框")) {
|
|
|
+ if (dataArrayone == null || dataArrayone.size() == 0) {
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "未搜索到匹配数据");
|
|
|
}
|
|
|
|
|
|
- for(Object index:dataArrayone){
|
|
|
+ for (Object index : dataArrayone) {
|
|
|
JSONObject data = (JSONObject) index;
|
|
|
LinecodeBean bean = new LinecodeBean();
|
|
|
bean.setMA_CODE(data.getString("MA_CODE"));
|
|
|
@@ -394,8 +458,7 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
ipAndlinecodePortAdapter.setmList(linecodeBeanList);
|
|
|
ipAndlinecodePortAdapter.notifyDataSetChanged();
|
|
|
|
|
|
- }
|
|
|
- else {
|
|
|
+ } else {
|
|
|
if (dataArray != null) {
|
|
|
for (int i = 0; i < dataArray.length(); i++) {
|
|
|
org.json.JSONObject dataObject = dataArray.optJSONObject(i);
|
|
|
@@ -434,7 +497,7 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
ComDataBeanList.clear();
|
|
|
for (Object index : dataArray) {
|
|
|
JSONObject data = (JSONObject) index;
|
|
|
- bean= new ComDataBean();
|
|
|
+ bean = new ComDataBean();
|
|
|
bean.setItemName(data.getString("SC_NAME"));
|
|
|
bean.setItemremark(data.getString("SC_CODE"));
|
|
|
ComDataBeanList.add(bean);
|
|
|
@@ -481,11 +544,11 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
String mSearchStr = edit_et.getText().toString().trim();
|
|
|
if (!mSearchStr.isEmpty()) {
|
|
|
List<ComDataBean> thisList = new ArrayList<>();
|
|
|
- for(int i=0;i<ComDataBeanList.size();i++){
|
|
|
- if(ComDataBeanList.get(i).getItemremark().contains(mSearchStr)||ComDataBeanList.get(i).getItemName().contains(mSearchStr)){
|
|
|
+ for (int i = 0; i < ComDataBeanList.size(); i++) {
|
|
|
+ if (ComDataBeanList.get(i).getItemremark().contains(mSearchStr) || ComDataBeanList.get(i).getItemName().contains(mSearchStr)) {
|
|
|
thisList.add(ComDataBeanList.get(i));
|
|
|
}
|
|
|
- if(i == ComDataBeanList.size() -1){
|
|
|
+ if (i == ComDataBeanList.size() - 1) {
|
|
|
ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(thisList);
|
|
|
rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
|
|
|
LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
|
|
|
@@ -536,11 +599,11 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
String mSearchStr = edit_et.getText().toString().trim();
|
|
|
if (!mSearchStr.isEmpty()) {
|
|
|
List<ComDataBean> thisList = new ArrayList<>();
|
|
|
- for(int i=0;i<ComDataBeanList.size();i++){
|
|
|
- if(ComDataBeanList.get(i).getItemremark().contains(mSearchStr)||ComDataBeanList.get(i).getItemName().contains(mSearchStr)){
|
|
|
+ for (int i = 0; i < ComDataBeanList.size(); i++) {
|
|
|
+ if (ComDataBeanList.get(i).getItemremark().contains(mSearchStr) || ComDataBeanList.get(i).getItemName().contains(mSearchStr)) {
|
|
|
thisList.add(ComDataBeanList.get(i));
|
|
|
}
|
|
|
- if(i == ComDataBeanList.size() -1){
|
|
|
+ if (i == ComDataBeanList.size() - 1) {
|
|
|
ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(thisList);
|
|
|
rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
|
|
|
LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
|
|
|
@@ -583,16 +646,15 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
});
|
|
|
|
|
|
|
|
|
-
|
|
|
- List<String> list=new ArrayList<>();
|
|
|
+ List<String> list = new ArrayList<>();
|
|
|
//确定
|
|
|
sure_tv.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
list.clear();
|
|
|
|
|
|
- if (StringUtil.isEmpty(sc_code)){
|
|
|
- CommonUtil.toastNoRepeat(mActivity,"请选择工序");
|
|
|
+ if (StringUtil.isEmpty(sc_code)) {
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "请选择工序");
|
|
|
return;
|
|
|
}
|
|
|
ct_qty.setText(sc_code);
|
|
|
@@ -705,22 +767,20 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 岗位资源enter事件
|
|
|
*/
|
|
|
private void getSourcePunchInfo(String sccode) {
|
|
|
String timestring = storage_recharge_collect_ets.getText().toString().trim();
|
|
|
- if (timestring.isEmpty()){
|
|
|
+ if (timestring.isEmpty()) {
|
|
|
CommonUtil.toastNoRepeat(mActivity, "请选择打卡时间");
|
|
|
return;
|
|
|
}
|
|
|
- if (rb_changetext.isEmpty()){
|
|
|
+ if (rb_changetext.isEmpty()) {
|
|
|
CommonUtil.toastNoRepeat(mActivity, "请选择操作");
|
|
|
return;
|
|
|
}
|
|
|
- if (sccode.isEmpty()){
|
|
|
+ if (sccode.isEmpty()) {
|
|
|
CommonUtil.toastNoRepeat(mActivity, "请输入岗位编号");
|
|
|
return;
|
|
|
}
|
|
|
@@ -733,30 +793,30 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
.tag(TAG + "getMaCode")
|
|
|
.flag(0)
|
|
|
.addParam("dkdate", timestring)//打卡时间
|
|
|
- .addParam("oprtype",rb_changetext)//打卡类型,签到或者签退
|
|
|
- .addParam("sccode",sccode)//岗位资源编号
|
|
|
+ .addParam("oprtype", rb_changetext)//打卡类型,签到或者签退
|
|
|
+ .addParam("sccode", sccode)//岗位资源编号
|
|
|
.build(), new HttpCallback() {
|
|
|
@Override
|
|
|
public void onSuccess(int flag, Object o) throws Exception {
|
|
|
tv_hint.setVisibility(View.GONE);
|
|
|
line_text.setVisibility(View.VISIBLE);
|
|
|
progressDialog.dismiss();
|
|
|
- Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
|
|
|
- if (isSuccess){
|
|
|
- JSONObject dataObject = FastjsonUtil.getJSONObject(o.toString(),"data");
|
|
|
- if (dataObject == null){
|
|
|
+ Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(), "success");
|
|
|
+ if (isSuccess) {
|
|
|
+ JSONObject dataObject = FastjsonUtil.getJSONObject(o.toString(), "data");
|
|
|
+ if (dataObject == null) {
|
|
|
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
String pc_id = dataObject.getString("PC_ID") == null ? "" : dataObject.getString("PC_ID");
|
|
|
String ws_name = dataObject.getString("WS_NAME") == null ? "" : dataObject.getString("WS_NAME");
|
|
|
String sc_name = dataObject.getString("SC_NAME") == null ? "" : dataObject.getString("SC_NAME");
|
|
|
int pc_nnt = dataObject.getInteger("PC_NNT") == null ? -0 : dataObject.getInteger("PC_NNT");
|
|
|
String pc_sccode = dataObject.getString("PC_SCCODE") == null ? "" : dataObject.getString("PC_SCCODE");
|
|
|
String pc_wscode = dataObject.getString("PC_WSCODE") == null ? "" : dataObject.getString("PC_WSCODE");
|
|
|
- tv_sccode.setText("岗位:"+pc_sccode+"("+sc_name+")");
|
|
|
- tv_wscode.setText("当前班次:"+pc_wscode+"("+ws_name+")");
|
|
|
+ tv_sccode.setText("岗位:" + pc_sccode + "(" + sc_name + ")");
|
|
|
+ tv_wscode.setText("当前班次:" + pc_wscode + "(" + ws_name + ")");
|
|
|
tv_nnt.setTextColor(getResources().getColor(R.color.blue));
|
|
|
- tv_nnt.setText("目前在线人数:"+pc_nnt);
|
|
|
+ tv_nnt.setText("目前在线人数:" + pc_nnt);
|
|
|
tv_changetext.setVisibility(View.GONE);
|
|
|
tv_pc_nnt.setVisibility(View.GONE);
|
|
|
tv_pepoer.setVisibility(View.GONE);
|
|
|
@@ -767,6 +827,7 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
@Override
|
|
|
public void onFail(int flag, String failStr) throws Exception {
|
|
|
progressDialog.dismiss();
|
|
|
@@ -785,29 +846,36 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
* 卡号enter事件或确认按钮点击事件
|
|
|
*/
|
|
|
private void getcardPunching() {
|
|
|
+ ArrayList<WorkOrderFlow> selectedItem = myAdapter.getSelectedItem();
|
|
|
+ String sunmdata = "";
|
|
|
+ for (int i = 0; i < selectedItem.size(); i++) {
|
|
|
+ WorkOrderFlow workOrderFlow = selectedItem.get(i);
|
|
|
+ sunmdata += workOrderFlow.getPCD_CARDCODE() + ",";
|
|
|
+ }
|
|
|
+ Log.e("aaa", "人员卡号的值是:" + sunmdata);
|
|
|
String timestring = storage_recharge_collect_ets.getText().toString().trim();
|
|
|
String sccode = ct_qty.getText().toString().trim();
|
|
|
String cardcode = ce_yuanyin.getText().toString().trim();
|
|
|
- if (timestring.isEmpty()){
|
|
|
+ if (rb_changetext.isEmpty()) {
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "请选择操作");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (timestring.isEmpty()) {
|
|
|
CommonUtil.toastNoRepeat(mActivity, "请选择打卡时间");
|
|
|
return;
|
|
|
}
|
|
|
- if (rb_changetext.isEmpty()){
|
|
|
- CommonUtil.toastNoRepeat(mActivity, "请选择操作");
|
|
|
+ if (TextUtils.isEmpty(et_linecode_smts.getText().toString().trim())) {
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "请输入工单流水");
|
|
|
return;
|
|
|
}
|
|
|
- if (sccode.isEmpty()){
|
|
|
+ if (sccode.isEmpty()) {
|
|
|
CommonUtil.toastNoRepeat(mActivity, "请输入岗位编号");
|
|
|
return;
|
|
|
}
|
|
|
- if (cardcode.isEmpty()){
|
|
|
+ if (cardcode.isEmpty() && TextUtils.isEmpty(sunmdata)) {
|
|
|
CommonUtil.toastNoRepeat(mActivity, "请输入卡号");
|
|
|
return;
|
|
|
}
|
|
|
- if (TextUtils.isEmpty(et_linecode_smts.getText().toString().trim())) {
|
|
|
- CommonUtil.toastNoRepeat(mActivity, "请输入工单流水");
|
|
|
- return;
|
|
|
- }
|
|
|
progressDialog.show();
|
|
|
VollyRequest.getInstance().stringRequest(mStringRequest,
|
|
|
new HttpParams.Builder()
|
|
|
@@ -816,52 +884,54 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
.tag(TAG + "getMaCode")
|
|
|
.flag(0)
|
|
|
.addParam("dkdate", timestring)//打卡时间
|
|
|
- .addParam("oprtype",rb_changetext)//打卡类型,签到或者签退
|
|
|
- .addParam("sccode",sccode)//岗位资源编号
|
|
|
- .addParam("cardcode",cardcode)//岗位资源编号
|
|
|
- .addParam("makecode",et_linecode_smts.getText().toString().trim())//工单流水
|
|
|
+ .addParam("oprtype", rb_changetext)//打卡类型,签到或者签退
|
|
|
+ .addParam("sccode", sccode)//岗位资源编号
|
|
|
+ .addParam("cardcode", cardcode)//岗位资源编号
|
|
|
+ // .addParam("makecode",et_linecode_smts.getText().toString().trim())//工单流水
|
|
|
+ .addParam("macode", et_linecode_smts.getText().toString().trim())//工单流水
|
|
|
+ .addParam("downmans", sunmdata) //人员卡号合集
|
|
|
.build(), new HttpCallback() {
|
|
|
@Override
|
|
|
public void onSuccess(int flag, Object o) throws Exception {
|
|
|
tv_hint.setVisibility(View.GONE);
|
|
|
line_text.setVisibility(View.VISIBLE);
|
|
|
progressDialog.dismiss();
|
|
|
- Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
|
|
|
- if (isSuccess){
|
|
|
- JSONObject dataObject = FastjsonUtil.getJSONObject(o.toString(),"data");
|
|
|
- if (dataObject == null){
|
|
|
+ Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(), "success");
|
|
|
+ if (isSuccess) {
|
|
|
+ JSONObject dataObject = FastjsonUtil.getJSONObject(o.toString(), "data");
|
|
|
+ if (dataObject == null) {
|
|
|
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
String pc_id = dataObject.getString("PC_ID") == null ? "" : dataObject.getString("PC_ID");
|
|
|
String ws_name = dataObject.getString("WS_NAME") == null ? "" : dataObject.getString("WS_NAME");
|
|
|
String cardcode = dataObject.getString("CARDCODE") == null ? "" : dataObject.getString("CARDCODE");
|
|
|
String sc_name = dataObject.getString("SC_NAME") == null ? "" : dataObject.getString("SC_NAME");
|
|
|
- int pc_nnt = dataObject.getInteger("PC_NNT") == null ? -0 : dataObject.getInteger("PC_NNT");
|
|
|
+ int pc_nnt = dataObject.getInteger("PC_NNT") == null ? -0 : dataObject.getInteger("PC_NNT");
|
|
|
String cardname = dataObject.getString("CARDNAME") == null ? "" : dataObject.getString("CARDNAME");
|
|
|
String pc_sccode = dataObject.getString("PC_SCCODE") == null ? "" : dataObject.getString("PC_SCCODE");
|
|
|
String pc_wscode = dataObject.getString("PC_WSCODE") == null ? "" : dataObject.getString("PC_WSCODE");
|
|
|
String dkdate = dataObject.getString("PC_WSCODE") == null ? "" : dataObject.getString("DKDATE");
|
|
|
|
|
|
- tv_sccode.setText("岗位:"+pc_sccode+"("+sc_name+")");
|
|
|
- tv_wscode.setText("当前班次:"+pc_wscode+"("+ws_name+")");
|
|
|
+ tv_sccode.setText("岗位:" + pc_sccode + "(" + sc_name + ")");
|
|
|
+ tv_wscode.setText("当前班次:" + pc_wscode + "(" + ws_name + ")");
|
|
|
tv_nnt.setTextColor(getResources().getColor(R.color.black));
|
|
|
- tv_nnt.setText("卡号:"+cardcode);
|
|
|
+ tv_nnt.setText("卡号:" + cardcode);
|
|
|
tv_changetext.setVisibility(View.VISIBLE);
|
|
|
- tv_changetext.setText("打卡时间:"+dkdate);
|
|
|
+ tv_changetext.setText("打卡时间:" + dkdate);
|
|
|
tv_pc_nnt.setTextColor(getResources().getColor(R.color.black));
|
|
|
- tv_pc_nnt.setText("打卡"+rb_changetext+"成功");
|
|
|
- tv_pepoer.setText("目前在线人数:"+pc_nnt);
|
|
|
+ tv_pc_nnt.setText("打卡" + rb_changetext + "成功");
|
|
|
+ tv_pepoer.setText("目前在线人数:" + pc_nnt);
|
|
|
tv_pepoer.setTextColor(getResources().getColor(R.color.blue));
|
|
|
tv_changetext.setVisibility(View.VISIBLE);
|
|
|
tv_pc_nnt.setVisibility(View.VISIBLE);
|
|
|
tv_pepoer.setVisibility(View.VISIBLE);
|
|
|
ce_yuanyin.setText("");
|
|
|
ce_yuanyin.requestFocus();
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
+ getMakeMan(et_linecode_smts.getText().toString().trim());
|
|
|
}
|
|
|
+
|
|
|
@Override
|
|
|
public void onFail(int flag, String failStr) throws Exception {
|
|
|
progressDialog.dismiss();
|
|
|
@@ -871,34 +941,32 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
tv_hint.setText(failStr);
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 弹出框提示输入人数确认
|
|
|
*/
|
|
|
- private void getnntPunching(String nnt,AlertDialog alertDialog) {
|
|
|
+ private void getnntPunching(String nnt, AlertDialog alertDialog) {
|
|
|
String timestring = storage_recharge_collect_ets.getText().toString().trim();
|
|
|
String sccode = ct_qty.getText().toString().trim();
|
|
|
- if (timestring.isEmpty()){
|
|
|
+ if (timestring.isEmpty()) {
|
|
|
CommonUtil.toastNoRepeat(mActivity, "请选择打卡时间");
|
|
|
return;
|
|
|
}
|
|
|
- if (rb_changetext.isEmpty()){
|
|
|
+ if (rb_changetext.isEmpty()) {
|
|
|
CommonUtil.toastNoRepeat(mActivity, "请选择操作");
|
|
|
return;
|
|
|
}
|
|
|
- if (sccode.isEmpty()){
|
|
|
+ if (sccode.isEmpty()) {
|
|
|
CommonUtil.toastNoRepeat(mActivity, "请输入岗位编号");
|
|
|
return;
|
|
|
}
|
|
|
- if (nnt.isEmpty()){
|
|
|
+ if (nnt.isEmpty()) {
|
|
|
CommonUtil.toastNoRepeat(mActivity, "请输入数量");
|
|
|
return;
|
|
|
}
|
|
|
Integer integer = Integer.valueOf(nnt);
|
|
|
- if (integer<=0){
|
|
|
+ if (integer <= 0) {
|
|
|
CommonUtil.toastNoRepeat(mActivity, "数量必须大于0");
|
|
|
return;
|
|
|
}
|
|
|
@@ -911,21 +979,21 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
.tag(TAG + "getMaCode")
|
|
|
.flag(0)
|
|
|
.addParam("dkdate", timestring)//打卡时间
|
|
|
- .addParam("oprtype",rb_changetext)//打卡类型,签到或者签退
|
|
|
- .addParam("sccode",sccode)//打卡类型,签到或者签退
|
|
|
- .addParam("nnt",nnt)//岗位资源编号
|
|
|
+ .addParam("oprtype", rb_changetext)//打卡类型,签到或者签退
|
|
|
+ .addParam("sccode", sccode)//打卡类型,签到或者签退
|
|
|
+ .addParam("nnt", nnt)//岗位资源编号
|
|
|
.build(), new HttpCallback() {
|
|
|
@Override
|
|
|
public void onSuccess(int flag, Object o) throws Exception {
|
|
|
tv_hint.setVisibility(View.GONE);
|
|
|
line_text.setVisibility(View.VISIBLE);
|
|
|
progressDialog.dismiss();
|
|
|
- Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
|
|
|
- if (isSuccess){
|
|
|
- JSONObject dataObject = FastjsonUtil.getJSONObject(o.toString(),"data");
|
|
|
- if (dataObject == null){
|
|
|
+ Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(), "success");
|
|
|
+ if (isSuccess) {
|
|
|
+ JSONObject dataObject = FastjsonUtil.getJSONObject(o.toString(), "data");
|
|
|
+ if (dataObject == null) {
|
|
|
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
String pc_id = dataObject.getString("PC_ID") == null ? "" : dataObject.getString("PC_ID");
|
|
|
String ws_name = dataObject.getString("WS_NAME") == null ? "" : dataObject.getString("WS_NAME");
|
|
|
String sc_name = dataObject.getString("SC_NAME") == null ? "" : dataObject.getString("SC_NAME");
|
|
|
@@ -933,24 +1001,22 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
String nnt = dataObject.getString("NNT") == null ? "" : dataObject.getString("NNT");
|
|
|
String pc_sccode = dataObject.getString("PC_SCCODE") == null ? "" : dataObject.getString("PC_SCCODE");
|
|
|
String pc_wscode = dataObject.getString("PC_WSCODE") == null ? "" : dataObject.getString("PC_WSCODE");
|
|
|
- tv_sccode.setText("岗位:"+pc_sccode+"("+sc_name+")");
|
|
|
- tv_wscode.setText("当前班次:"+pc_wscode+"("+ws_name+")");
|
|
|
+ tv_sccode.setText("岗位:" + pc_sccode + "(" + sc_name + ")");
|
|
|
+ tv_wscode.setText("当前班次:" + pc_wscode + "(" + ws_name + ")");
|
|
|
tv_nnt.setTextColor(getResources().getColor(R.color.blue));
|
|
|
- tv_nnt.setText("打卡人数:"+nnt);
|
|
|
- tv_changetext.setText("打卡"+rb_changetext+"成功");
|
|
|
+ tv_nnt.setText("打卡人数:" + nnt);
|
|
|
+ tv_changetext.setText("打卡" + rb_changetext + "成功");
|
|
|
tv_pc_nnt.setTextColor(getResources().getColor(R.color.blue));
|
|
|
- tv_pc_nnt.setText("目前在线人数:"+pc_nnt);
|
|
|
+ tv_pc_nnt.setText("目前在线人数:" + pc_nnt);
|
|
|
tv_changetext.setVisibility(View.VISIBLE);
|
|
|
tv_pc_nnt.setVisibility(View.VISIBLE);
|
|
|
tv_pepoer.setVisibility(View.VISIBLE);
|
|
|
tv_pepoer.setVisibility(View.GONE);
|
|
|
tv_pepoer.setText("");
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
@Override
|
|
|
public void onFail(int flag, String failStr) throws Exception {
|
|
|
progressDialog.dismiss();
|
|
|
@@ -1013,10 +1079,10 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
public void onTimeSelect(Date date, View v) {
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
|
String result = format.format(date);
|
|
|
- storage_recharge_collect_ets.setText(result+":00");
|
|
|
+ storage_recharge_collect_ets.setText(result + ":00");
|
|
|
|
|
|
}
|
|
|
- }) .setType(new boolean[]{true, true, true, true, true, false})//分别对应年月日时分秒,默认全部显示
|
|
|
+ }).setType(new boolean[]{true, true, true, true, true, false})//分别对应年月日时分秒,默认全部显示
|
|
|
.isDialog(true)
|
|
|
.setRangDate(startDate, endDate)
|
|
|
.setLunarCalendar(false)
|
|
|
@@ -1034,7 +1100,7 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
|
|
|
Window dialogWindow = mDialog.getWindow();
|
|
|
if (dialogWindow != null) {
|
|
|
- dialogWindow.setWindowAnimations(com.bigkoo.pickerview.R.style.picker_view_slide_anim);//修改动画样式
|
|
|
+ dialogWindow.setWindowAnimations(R.style.picker_view_slide_anim);//修改动画样式
|
|
|
dialogWindow.setGravity(Gravity.BOTTOM);//改成Bottom,底部显示
|
|
|
}
|
|
|
}
|
|
|
@@ -1043,6 +1109,7 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
|
|
|
/**
|
|
|
* 当前时间
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
public static String getNowTime() {
|
|
|
@@ -1052,7 +1119,7 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
Date today = calendar.getTime();
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
|
String result = format.format(today);
|
|
|
- timeString=result+":00";
|
|
|
+ timeString = result + ":00";
|
|
|
return timeString;
|
|
|
}
|
|
|
|
|
|
@@ -1168,6 +1235,7 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
@Override
|
|
|
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
|
|
super.onActivityResult(requestCode, resultCode, data);
|
|
|
@@ -1206,6 +1274,7 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
private class IpAndResourcesPortAdapter extends BaseQuickAdapter<ComDataBean, BaseViewHolder> {
|
|
|
private List<ComDataBean> mmmmList;
|
|
|
|
|
|
@@ -1216,7 +1285,8 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
public void setmList(List<ComDataBean> mList) {
|
|
|
this.mmmmList = mList;
|
|
|
}
|
|
|
- public ComDataBean getBeanByPositon(int position){
|
|
|
+
|
|
|
+ public ComDataBean getBeanByPositon(int position) {
|
|
|
return mmmmList.get(position);
|
|
|
}
|
|
|
|
|
|
@@ -1224,9 +1294,10 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
super(R.layout.fuzzy_ipandport_item, data);
|
|
|
this.mmmmList = data;
|
|
|
}
|
|
|
+
|
|
|
@Override
|
|
|
protected void convert(BaseViewHolder helper, ComDataBean item) {
|
|
|
- helper.setText(R.id.macode_ip__Tv,item.getItemremark()+"-("+item.getItemName()+")");
|
|
|
+ helper.setText(R.id.macode_ip__Tv, item.getItemremark() + "-(" + item.getItemName() + ")");
|
|
|
LinearLayout line_true = helper.itemView.findViewById(R.id.line_true);
|
|
|
if (item.getChecked()) {
|
|
|
line_true.setSelected(true);
|
|
|
@@ -1237,7 +1308,7 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
}
|
|
|
|
|
|
|
|
|
- private class ComDataBean{
|
|
|
+ private class ComDataBean {
|
|
|
String itemName = null;
|
|
|
String itemremark = null;
|
|
|
boolean Checked;
|
|
|
@@ -1277,7 +1348,8 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
public void setmList(List<LinecodeBean> mList) {
|
|
|
this.mmmmList = mList;
|
|
|
}
|
|
|
- public LinecodeBean getBeanByPositon(int position){
|
|
|
+
|
|
|
+ public LinecodeBean getBeanByPositon(int position) {
|
|
|
return mmmmList.get(position);
|
|
|
}
|
|
|
|
|
|
@@ -1285,9 +1357,10 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
super(R.layout.fuzzy_ipandport_item, data);
|
|
|
this.mmmmList = data;
|
|
|
}
|
|
|
+
|
|
|
@Override
|
|
|
protected void convert(BaseViewHolder helper, LinecodeBean item) {
|
|
|
- helper.setText(R.id.macode_ip__Tv,item.getMA_ID()+" | "+item.getMA_CODE()+" | "+item.getPR_CODE()+" | "+item.getPR_DETAIL());
|
|
|
+ helper.setText(R.id.macode_ip__Tv, item.getMA_ID() + " | " + item.getMA_CODE() + " | " + item.getPR_CODE() + " | " + item.getPR_DETAIL());
|
|
|
LinearLayout line_true = helper.itemView.findViewById(R.id.line_true);
|
|
|
if (item.isChecked()) {
|
|
|
line_true.setSelected(true);
|
|
|
@@ -1297,5 +1370,134 @@ public class PostPunchFragment extends BaseFragment implements View.OnClickListe
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public class SelectAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
|
|
+
|
|
|
+ private ArrayList<WorkOrderFlow> mList = new ArrayList<>();
|
|
|
+ private SparseBooleanArray mSelectedPositions = new SparseBooleanArray();
|
|
|
+ private boolean mIsSelectable = false;
|
|
|
+
|
|
|
+
|
|
|
+ public SelectAdapter(ArrayList<WorkOrderFlow> list) {
|
|
|
+ if (list == null) {
|
|
|
+ throw new IllegalArgumentException("model Data must not be null");
|
|
|
+ }
|
|
|
+ mList = list;
|
|
|
+ }
|
|
|
+
|
|
|
+ //更新adpter的数据和选择状态
|
|
|
+ public void updateDataSet(ArrayList<WorkOrderFlow> list) {
|
|
|
+ this.mList = list;
|
|
|
+ mSelectedPositions = new SparseBooleanArray();
|
|
|
+ // ab.setTitle("已选择" + 0 + "项");
|
|
|
+ }
|
|
|
+
|
|
|
+ //获得选中条目的结果
|
|
|
+ public ArrayList<WorkOrderFlow> getSelectedItem() {
|
|
|
+ ArrayList<WorkOrderFlow> selectList = new ArrayList<>();
|
|
|
+ for (int i = 0; i < mList.size(); i++) {
|
|
|
+ if (isItemChecked(i)) {
|
|
|
+ selectList.add(mList.get(i));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return selectList;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
|
|
+ View itemView = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.recyclerview_item2, viewGroup, false);
|
|
|
+ return new ListItemViewHolder(itemView);
|
|
|
+ }
|
|
|
+
|
|
|
+ //设置给定位置条目的选择状态
|
|
|
+ private void setItemChecked(int position, boolean isChecked) {
|
|
|
+ mSelectedPositions.put(position, isChecked);
|
|
|
+ }
|
|
|
+
|
|
|
+ //根据位置判断条目是否选中
|
|
|
+ private boolean isItemChecked(int position) {
|
|
|
+ return mSelectedPositions.get(position);
|
|
|
+ }
|
|
|
+
|
|
|
+ //根据位置判断条目是否可选
|
|
|
+ private boolean isSelectable() {
|
|
|
+ return mIsSelectable;
|
|
|
+ }
|
|
|
+
|
|
|
+ //设置给定位置条目的可选与否的状态
|
|
|
+ private void setSelectable(boolean selectable) {
|
|
|
+ mIsSelectable = selectable;
|
|
|
+ }
|
|
|
+
|
|
|
+ //绑定界面,设置监听
|
|
|
+ @Override
|
|
|
+ public void onBindViewHolder(final RecyclerView.@NotNull ViewHolder holder, @SuppressLint("RecyclerView") int i) {
|
|
|
+ //设置条目状态
|
|
|
+ ((SelectAdapter.ListItemViewHolder) holder).tv_liaocode.setText("人员卡号:" + mList.get(i).getPCD_CARDCODE());
|
|
|
+ ((SelectAdapter.ListItemViewHolder) holder).tv_liaotetall.setText("人员名称:" + mList.get(i).getPCD_CARDNAME());
|
|
|
+ ((SelectAdapter.ListItemViewHolder) holder).tv_liaospec.setText("上线时间:" + mList.get(i).getPCD_DATE());
|
|
|
+
|
|
|
+ ((SelectAdapter.ListItemViewHolder) holder).checkBox.setChecked(isItemChecked(i));
|
|
|
+
|
|
|
+ ((SelectAdapter.ListItemViewHolder) holder).checkBox.setOnClickListener(new View.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+ if (isItemChecked(i)) {
|
|
|
+ setItemChecked(i, false);
|
|
|
+ } else {
|
|
|
+ setItemChecked(i, true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+// ((ListItemViewHolder) holder).checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
+// @Override
|
|
|
+// public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
|
|
+// if (buttonView.isPressed()) { //只有当用户主动点击时才处理选中状态变化
|
|
|
+// }
|
|
|
+// }
|
|
|
+// });
|
|
|
+
|
|
|
+// //条目view的监听
|
|
|
+// ((SelectAdapter.ListItemViewHolder) holder).itemView.setOnClickListener(new View.OnClickListener() {
|
|
|
+// @Override
|
|
|
+// public void onClick(View v) {
|
|
|
+// if (isItemChecked(i)) {
|
|
|
+// setItemChecked(i, false);
|
|
|
+// } else {
|
|
|
+// setItemChecked(i, true);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// });
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int getItemCount() {
|
|
|
+ return mList == null ? 0 : mList.size();
|
|
|
+ }
|
|
|
+
|
|
|
+ public class ListItemViewHolder extends RecyclerView.ViewHolder {
|
|
|
+ //ViewHolder
|
|
|
+ CheckBox checkBox;
|
|
|
+ TextView tv_liaocode;
|
|
|
+ TextView tv_liaotetall;
|
|
|
+ TextView tv_liaospec;
|
|
|
+
|
|
|
+ ListItemViewHolder(View view) {
|
|
|
+ super(view);
|
|
|
+ this.tv_liaocode = (TextView) view.findViewById(R.id.tv_liaocode);
|
|
|
+ this.tv_liaotetall = (TextView) view.findViewById(R.id.tv_liaotetall);
|
|
|
+ this.tv_liaospec = (TextView) view.findViewById(R.id.tv_liaospec);
|
|
|
+ this.checkBox = (CheckBox) view.findViewById(R.id.select_checkbox);
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void setAdapter(ArrayList<WorkOrderFlow> mList) {
|
|
|
+ LogUtil.i("mList", JSON.toJSONString(mList));
|
|
|
+ myAdapter = new SelectAdapter(mList);
|
|
|
+ mRecyclerView.setAdapter(myAdapter);
|
|
|
+ }
|
|
|
|
|
|
}
|