修改 - 质检

master
wangh 8 months ago
parent f12b4c9cd8
commit b7a63ab1f7

@ -67,7 +67,7 @@ public class BindingActivity extends BaseActivity {
OkGo.<String>post(url + s).tag(this).headers("Authorization", SharedPreferencesUtils.getstring("token", "")) OkGo.<String>post(url + s).tag(this).headers("Authorization", SharedPreferencesUtils.getstring("token", ""))
.params("boxCode", boxCode.get()) .params("boxCode", boxCode.get())
.params("innerCode", innerCode.get()) .params("innerCode", innerCode.get())
.params("loginName", SharedPreferencesUtils.getstring("loginName", "")) .params("loginName", SharedPreferencesUtils.getstring("pdaName", ""))
.execute(new StringCallback() { .execute(new StringCallback() {
@Override @Override
public void onSuccess(Response<String> response) { public void onSuccess(Response<String> response) {

@ -124,11 +124,12 @@ public class CheckActivity extends BaseActivity implements CheckAdapter.CheckIte
if (checkViewModel.getName() == null || checkViewModel.getName().isEmpty()) return; if (checkViewModel.getName() == null || checkViewModel.getName().isEmpty()) return;
checkViewModel.setList(submitList); checkViewModel.setList(submitList);
checkViewModel.setMeasure(submitList.isEmpty() ? "3" : "1"); checkViewModel.setMeasure(submitList.isEmpty() ? "3" : "1");
checkViewModel.setUserName(SharedPreferencesUtils.getstring("userName", "pda01")); checkViewModel.setUserName(SharedPreferencesUtils.getstring("pdaName", "pda01"));
checkViewModel.setTeamCode(SharedPreferencesUtils.getstring("teamCode",null)); checkViewModel.setTeamCode(SharedPreferencesUtils.getstring("teamCode",null));
OkGo.<Result>post(url + "/api/checkSubmit").tag(this) OkGo.<Result>post(url + "/api/checkSubmit").tag(this)
.headers("Authorization", SharedPreferencesUtils.getstring("token", "")) .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 @Override
public void onSuccess(Response<Result> response) { public void onSuccess(Response<Result> response) {
super.onSuccess(response); super.onSuccess(response);

@ -38,7 +38,7 @@ public class HomePageActivity extends AppCompatActivity {
InfoDialog infoDialog = new InfoDialog(this); InfoDialog infoDialog = new InfoDialog(this);
try { try {
User user = infoBeen.getUser(); User user = infoBeen.getUser();
user.setUsername(SharedPreferencesUtils.getstring("loginName", "")); user.setUsername(SharedPreferencesUtils.getstring("pdaName", ""));
user.setTeamName(SharedPreferencesUtils.getstring("teamName", null)); user.setTeamName(SharedPreferencesUtils.getstring("teamName", null));
user.setTeamCode(SharedPreferencesUtils.getstring("teamCode", null)); user.setTeamCode(SharedPreferencesUtils.getstring("teamCode", null));
infoDialog.setInfoData(infoBeen, user); infoDialog.setInfoData(infoBeen, user);

@ -47,8 +47,8 @@ public class MainActivity extends BaseActivity {
ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main); ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
String loginName = SharedPreferencesUtils.getstring("loginName", ""); String loginName = SharedPreferencesUtils.getstring("loginName", "");
user = new User(); user = new User();
user.setUsername(loginName); // user.setUsername(loginName);
user.setPassword("123456"); // user.setPassword("123456");
getSupportActionBar().hide(); // 隐藏原生标题栏 getSupportActionBar().hide(); // 隐藏原生标题栏
binding.setUser(user); binding.setUser(user);
@ -76,7 +76,8 @@ public class MainActivity extends BaseActivity {
// 查询PDA Mac 地址列表 // 查询PDA Mac 地址列表
private void getPda() { private void getPda() {
OkGo.<Result>get(url + "/report/pdaRecord/getPdaRecord").tag(this).headers("Authorization", SharedPreferencesUtils.getstring("token", "")).execute(new MyRecultCall(dialog, this) { OkGo.<Result>get(url + "/report/pdaRecord/getPdaRecord").tag(this).headers("Authorization", SharedPreferencesUtils.getstring("token", ""))
.execute(new MyRecultCall(dialog, this) {
@Override @Override
public void onSuccess(Response<Result> response) { public void onSuccess(Response<Result> response) {
super.onSuccess(response); super.onSuccess(response);
@ -175,7 +176,7 @@ public class MainActivity extends BaseActivity {
Intent intent = new Intent(MainActivity.this, HomePageActivity.class); Intent intent = new Intent(MainActivity.this, HomePageActivity.class);
intent.putExtra("role", loginBack.getRoles()); intent.putExtra("role", loginBack.getRoles());
intent.putExtra("info", body); intent.putExtra("info", body);
SharedPreferencesUtils.putstring("loginName", user.username); SharedPreferencesUtils.putstring("pdaName", user.username);
SharedPreferencesUtils.putstring("teamCode", user.getTeamCode()); SharedPreferencesUtils.putstring("teamCode", user.getTeamCode());
SharedPreferencesUtils.putstring("teamName", user.getTeamName()); SharedPreferencesUtils.putstring("teamName", user.getTeamName());
SharedPreferencesUtils.putstring("token", token); SharedPreferencesUtils.putstring("token", token);

@ -97,7 +97,7 @@ public class RepairActivity extends BaseActivity {
public void repairSubmit(View view) { public void repairSubmit(View view) {
if (submitList.isEmpty()) return; if (submitList.isEmpty()) return;
RepairSubmitInfo repairSubmitInfo =new RepairSubmitInfo(submitList, RepairSubmitInfo repairSubmitInfo =new RepairSubmitInfo(submitList,
SharedPreferencesUtils.getstring("userName", "pda01") SharedPreferencesUtils.getstring("pdaName", "pda01")
,repairVm.getRepairName(),repairVm.getIsFlag()); ,repairVm.getRepairName(),repairVm.getIsFlag());
MediaType JSON = MediaType.parse("application/json; charset=utf-8"); MediaType JSON = MediaType.parse("application/json; charset=utf-8");
RequestBody body = RequestBody.create(JSON,gson.toJson(repairSubmitInfo) ); RequestBody body = RequestBody.create(JSON,gson.toJson(repairSubmitInfo) );

Loading…
Cancel
Save