|
|
@ -16,6 +16,9 @@ import com.lzy.okgo.OkGo;
|
|
|
|
import com.lzy.okgo.callback.StringCallback;
|
|
|
|
import com.lzy.okgo.callback.StringCallback;
|
|
|
|
import com.lzy.okgo.model.Response;
|
|
|
|
import com.lzy.okgo.model.Response;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
import butterknife.BindView;
|
|
|
|
import butterknife.BindView;
|
|
|
|
import butterknife.ButterKnife;
|
|
|
|
import butterknife.ButterKnife;
|
|
|
|
import butterknife.OnClick;
|
|
|
|
import butterknife.OnClick;
|
|
|
@ -35,6 +38,7 @@ public class ZBActivity extends BaseActivity {
|
|
|
|
private boolean exist;
|
|
|
|
private boolean exist;
|
|
|
|
private String dbCode = null;
|
|
|
|
private String dbCode = null;
|
|
|
|
private String findGoodesCode = null;
|
|
|
|
private String findGoodesCode = null;
|
|
|
|
|
|
|
|
List<String> stringList;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
@ -42,6 +46,7 @@ public class ZBActivity extends BaseActivity {
|
|
|
|
setContentView(R.layout.activity_zb);
|
|
|
|
setContentView(R.layout.activity_zb);
|
|
|
|
ButterKnife.bind(this);
|
|
|
|
ButterKnife.bind(this);
|
|
|
|
sanType = 0;
|
|
|
|
sanType = 0;
|
|
|
|
|
|
|
|
stringList=new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -117,6 +122,7 @@ public class ZBActivity extends BaseActivity {
|
|
|
|
planView.setWeighbridge(dbaname);
|
|
|
|
planView.setWeighbridge(dbaname);
|
|
|
|
planView.setCylinderBarCode("00000000");
|
|
|
|
planView.setCylinderBarCode("00000000");
|
|
|
|
planView.setRate("0");
|
|
|
|
planView.setRate("0");
|
|
|
|
|
|
|
|
planView.setBarCodeList(stringList);
|
|
|
|
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json;"),
|
|
|
|
RequestBody requestBody = RequestBody.create(MediaType.parse("application/json;"),
|
|
|
|
JSONObject.toJSONString(planView));
|
|
|
|
JSONObject.toJSONString(planView));
|
|
|
|
OkGo.<Resust>post("http://" + SharedPreferencesUtils.getstring("ip", null) + "/api/Solvent/ExecPlcState")
|
|
|
|
OkGo.<Resust>post("http://" + SharedPreferencesUtils.getstring("ip", null) + "/api/Solvent/ExecPlcState")
|
|
|
@ -132,6 +138,7 @@ public class ZBActivity extends BaseActivity {
|
|
|
|
zbGoodsCode.setText(null);
|
|
|
|
zbGoodsCode.setText(null);
|
|
|
|
planView = null;
|
|
|
|
planView = null;
|
|
|
|
zbGoodsName.setText(null);
|
|
|
|
zbGoodsName.setText(null);
|
|
|
|
|
|
|
|
stringList.clear();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -164,6 +171,8 @@ public class ZBActivity extends BaseActivity {
|
|
|
|
tipDialog.showMsg(false, "物料不匹配");
|
|
|
|
tipDialog.showMsg(false, "物料不匹配");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stringList.add(zbGoodsCode.getText().toString().trim());
|
|
|
|
|
|
|
|
|
|
|
|
//品名
|
|
|
|
//品名
|
|
|
|
int index = scanInfo.indexOf("-", scanInfo.indexOf("-", scanInfo.indexOf("-") + 1) + 1) + 1;
|
|
|
|
int index = scanInfo.indexOf("-", scanInfo.indexOf("-", scanInfo.indexOf("-") + 1) + 1) + 1;
|
|
|
|
int endIndex = scanInfo.indexOf("|");
|
|
|
|
int endIndex = scanInfo.indexOf("|");
|
|
|
|