diff --git a/app/src/main/java/com/example/aucma_mes/BindingActivity.java b/app/src/main/java/com/example/aucma_mes/BindingActivity.java index ade6c90..4758a7a 100644 --- a/app/src/main/java/com/example/aucma_mes/BindingActivity.java +++ b/app/src/main/java/com/example/aucma_mes/BindingActivity.java @@ -67,7 +67,7 @@ public class BindingActivity extends BaseActivity { OkGo.post(url + s).tag(this).headers("Authorization", SharedPreferencesUtils.getstring("token", "")) .params("boxCode", boxCode.get()) .params("innerCode", innerCode.get()) - .params("loginName", SharedPreferencesUtils.getstring("loginName", "")) + .params("loginName", SharedPreferencesUtils.getstring("pdaName", "")) .execute(new StringCallback() { @Override public void onSuccess(Response response) { diff --git a/app/src/main/java/com/example/aucma_mes/CheckActivity.java b/app/src/main/java/com/example/aucma_mes/CheckActivity.java index 01cc8a0..59d704b 100644 --- a/app/src/main/java/com/example/aucma_mes/CheckActivity.java +++ b/app/src/main/java/com/example/aucma_mes/CheckActivity.java @@ -124,11 +124,12 @@ public class CheckActivity extends BaseActivity implements CheckAdapter.CheckIte if (checkViewModel.getName() == null || checkViewModel.getName().isEmpty()) return; checkViewModel.setList(submitList); checkViewModel.setMeasure(submitList.isEmpty() ? "3" : "1"); - checkViewModel.setUserName(SharedPreferencesUtils.getstring("userName", "pda01")); + checkViewModel.setUserName(SharedPreferencesUtils.getstring("pdaName", "pda01")); checkViewModel.setTeamCode(SharedPreferencesUtils.getstring("teamCode",null)); OkGo.post(url + "/api/checkSubmit").tag(this) .headers("Authorization", SharedPreferencesUtils.getstring("token", "")) - .upRequestBody(RequestBody.create(JSON, gson.toJson(checkViewModel))).execute(new MyRecultCall(dialog, this) { + .upRequestBody(RequestBody.create(JSON, gson.toJson(checkViewModel))) + .execute(new MyRecultCall(dialog, this) { @Override public void onSuccess(Response response) { super.onSuccess(response); diff --git a/app/src/main/java/com/example/aucma_mes/HomePageActivity.java b/app/src/main/java/com/example/aucma_mes/HomePageActivity.java index 33f777a..626b103 100644 --- a/app/src/main/java/com/example/aucma_mes/HomePageActivity.java +++ b/app/src/main/java/com/example/aucma_mes/HomePageActivity.java @@ -38,7 +38,7 @@ public class HomePageActivity extends AppCompatActivity { InfoDialog infoDialog = new InfoDialog(this); try { User user = infoBeen.getUser(); - user.setUsername(SharedPreferencesUtils.getstring("loginName", "")); + user.setUsername(SharedPreferencesUtils.getstring("pdaName", "")); user.setTeamName(SharedPreferencesUtils.getstring("teamName", null)); user.setTeamCode(SharedPreferencesUtils.getstring("teamCode", null)); infoDialog.setInfoData(infoBeen, user); diff --git a/app/src/main/java/com/example/aucma_mes/MainActivity.java b/app/src/main/java/com/example/aucma_mes/MainActivity.java index 0a1483c..cedfdb0 100644 --- a/app/src/main/java/com/example/aucma_mes/MainActivity.java +++ b/app/src/main/java/com/example/aucma_mes/MainActivity.java @@ -47,8 +47,8 @@ public class MainActivity extends BaseActivity { ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main); String loginName = SharedPreferencesUtils.getstring("loginName", ""); user = new User(); - user.setUsername(loginName); - user.setPassword("123456"); + // user.setUsername(loginName); + // user.setPassword("123456"); getSupportActionBar().hide(); // 隐藏原生标题栏 binding.setUser(user); @@ -76,7 +76,8 @@ public class MainActivity extends BaseActivity { // 查询PDA Mac 地址列表 private void getPda() { - OkGo.get(url + "/report/pdaRecord/getPdaRecord").tag(this).headers("Authorization", SharedPreferencesUtils.getstring("token", "")).execute(new MyRecultCall(dialog, this) { + OkGo.get(url + "/report/pdaRecord/getPdaRecord").tag(this).headers("Authorization", SharedPreferencesUtils.getstring("token", "")) + .execute(new MyRecultCall(dialog, this) { @Override public void onSuccess(Response response) { super.onSuccess(response); @@ -175,7 +176,7 @@ public class MainActivity extends BaseActivity { Intent intent = new Intent(MainActivity.this, HomePageActivity.class); intent.putExtra("role", loginBack.getRoles()); intent.putExtra("info", body); - SharedPreferencesUtils.putstring("loginName", user.username); + SharedPreferencesUtils.putstring("pdaName", user.username); SharedPreferencesUtils.putstring("teamCode", user.getTeamCode()); SharedPreferencesUtils.putstring("teamName", user.getTeamName()); SharedPreferencesUtils.putstring("token", token); diff --git a/app/src/main/java/com/example/aucma_mes/RepairActivity.java b/app/src/main/java/com/example/aucma_mes/RepairActivity.java index dd1c542..54ad468 100644 --- a/app/src/main/java/com/example/aucma_mes/RepairActivity.java +++ b/app/src/main/java/com/example/aucma_mes/RepairActivity.java @@ -97,7 +97,7 @@ public class RepairActivity extends BaseActivity { public void repairSubmit(View view) { if (submitList.isEmpty()) return; RepairSubmitInfo repairSubmitInfo =new RepairSubmitInfo(submitList, - SharedPreferencesUtils.getstring("userName", "pda01") + SharedPreferencesUtils.getstring("pdaName", "pda01") ,repairVm.getRepairName(),repairVm.getIsFlag()); MediaType JSON = MediaType.parse("application/json; charset=utf-8"); RequestBody body = RequestBody.create(JSON,gson.toJson(repairSubmitInfo) );