|
|
|
@ -48,6 +48,7 @@ public class WriteUserActivity extends BaseActivity implements DataReturnCall, P
|
|
|
|
|
private List<ReadTyreNoResult> list;
|
|
|
|
|
private PopupMenu popupMenu;
|
|
|
|
|
private MyAlertDialog myAlertDialog;
|
|
|
|
|
|
|
|
|
|
@SuppressLint("UnspecifiedRegisterReceiverFlag")
|
|
|
|
|
@Override
|
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
@ -131,14 +132,19 @@ public class WriteUserActivity extends BaseActivity implements DataReturnCall, P
|
|
|
|
|
public void onSuccess(Response<MyResult> response) {
|
|
|
|
|
super.onSuccess(response);
|
|
|
|
|
var body = response.body();
|
|
|
|
|
// 如果=1 直接是成功
|
|
|
|
|
if (body.getSaveFlag().equals("1")) {
|
|
|
|
|
Toast.makeText(WriteUserActivity.this, getString(R.string.binding_success), Toast.LENGTH_SHORT).show();
|
|
|
|
|
// Toast.makeText(WriteUserActivity.this, getString(R.string.binding_success), Toast.LENGTH_SHORT).show();
|
|
|
|
|
writeUserState = true;
|
|
|
|
|
writeUser(user, epcStr);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
} else if (body.getSaveFlagCF().equals("0")) {// 等于0的情况属于绑定后写入失败,可重新写入
|
|
|
|
|
writeUserState = true;
|
|
|
|
|
writeUser(user, epcStr);
|
|
|
|
|
}else {
|
|
|
|
|
tipDialog.shouDialog(false, body.getSaveMessage());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|