|
|
|
@ -43,19 +43,14 @@ public class HomePageActivity extends AppCompatActivity {
|
|
|
|
|
user.setTeamCode(SharedPreferencesUtils.getstring("teamCode", null));
|
|
|
|
|
stationCode = user.getStationCode();
|
|
|
|
|
infoDialog.setInfoData(infoBeen, user);
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// String final StationCode = stationCode;
|
|
|
|
|
String finalStationCode = stationCode;
|
|
|
|
|
binding.homeButton1.setOnClickListener(v -> {
|
|
|
|
|
if (!roles.contains("quality_inspection")) {
|
|
|
|
|
Toast.makeText(this, "暂无权限", Toast.LENGTH_SHORT).show();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
intent = new Intent(this, CheckActivity.class);
|
|
|
|
|
intent.putExtra("stationCode", "2001");
|
|
|
|
|
intent.putExtra("stationCode", finalStationCode);
|
|
|
|
|
startActivity(intent);
|
|
|
|
|
});
|
|
|
|
|
binding.homeButton2.setOnClickListener(v -> {
|
|
|
|
@ -87,7 +82,10 @@ public class HomePageActivity extends AppCompatActivity {
|
|
|
|
|
binding.homeButton5.setOnClickListener(v -> {
|
|
|
|
|
infoDialog.show();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
Toast.makeText(this, "暂无权限", Toast.LENGTH_SHORT).show();
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|