Injury record report submission done
parent
ba7ae22220
commit
8e5b35e344
|
@ -275,7 +275,7 @@ public class InjuryFormThree extends AppCompatActivity implements EasyPermission
|
||||||
String jsonRequest = gson.toJson(hseTrainingRequest);
|
String jsonRequest = gson.toJson(hseTrainingRequest);
|
||||||
Log.e("RequestModel JSON", jsonRequest);*/
|
Log.e("RequestModel JSON", jsonRequest);*/
|
||||||
|
|
||||||
//loginViewModel.saveHSEData(hseTrainingRequest);
|
loginViewModel.saveHSEData(hseTrainingRequest);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,7 @@ public class InjuryFormTwo extends AppCompatActivity {
|
||||||
HseIncidentType clickedItem = incidentTypeArrayList.get(position);
|
HseIncidentType clickedItem = incidentTypeArrayList.get(position);
|
||||||
int selectedId = clickedItem.getId();
|
int selectedId = clickedItem.getId();
|
||||||
StorageManager.getInstance().getInjuryRecordModel().get(0).setIncidentId(selectedId);
|
StorageManager.getInstance().getInjuryRecordModel().get(0).setIncidentId(selectedId);
|
||||||
StorageManager.getInstance().getInjuryRecordModel().get(0).setIncidentTypeName(clickedItem.getTitle());
|
StorageManager.getInstance().getInjuryRecordModel().get(0).setIncidentName(clickedItem.getTitle());
|
||||||
//Near Miss = 1, Property Damage = 2, Fire = 5, RTA = 6
|
//Near Miss = 1, Property Damage = 2, Fire = 5, RTA = 6
|
||||||
//Personal Illness = 4
|
//Personal Illness = 4
|
||||||
//Accident = 3
|
//Accident = 3
|
||||||
|
@ -189,8 +189,8 @@ public class InjuryFormTwo extends AppCompatActivity {
|
||||||
@Override
|
@Override
|
||||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||||
hseInjury = personalIllnessArrayList.get(position).getTitle();
|
hseInjury = personalIllnessArrayList.get(position).getTitle();
|
||||||
StorageManager.getInstance().getInjuryRecordModel().get(0).setAccidentTypeId(personalIllnessArrayList.get(position).getId());
|
StorageManager.getInstance().getInjuryRecordModel().get(0).setInjuryId(personalIllnessArrayList.get(position).getId());
|
||||||
StorageManager.getInstance().getInjuryRecordModel().get(0).setAccidentTypeName(personalIllnessArrayList.get(position).getTitle());
|
StorageManager.getInstance().getInjuryRecordModel().get(0).setInjuryName(personalIllnessArrayList.get(position).getTitle());
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -290,8 +290,8 @@ public class InjuryFormTwo extends AppCompatActivity {
|
||||||
|
|
||||||
private void showPersistData() {
|
private void showPersistData() {
|
||||||
kpiTextview.post(() -> kpiTextview.setText(StorageManager.getInstance().getInjuryRecordModel().get(0).getKpiName(), false));
|
kpiTextview.post(() -> kpiTextview.setText(StorageManager.getInstance().getInjuryRecordModel().get(0).getKpiName(), false));
|
||||||
incidentTypeTextview.post(() -> incidentTypeTextview.setText(StorageManager.getInstance().getInjuryRecordModel().get(0).getIncidentTypeName(), false));
|
incidentTypeTextview.post(() -> incidentTypeTextview.setText(StorageManager.getInstance().getInjuryRecordModel().get(0).getIncidentName(), false));
|
||||||
personalIllnessTextview.post(() -> personalIllnessTextview.setText(StorageManager.getInstance().getInjuryRecordModel().get(0).getAccidentTypeName(), false));
|
personalIllnessTextview.post(() -> personalIllnessTextview.setText(StorageManager.getInstance().getInjuryRecordModel().get(0).getInjuryName(), false));
|
||||||
injuryTypeTextview.post(() -> injuryTypeTextview.setText(StorageManager.getInstance().getInjuryRecordModel().get(0).getInjuryTypeName(), false));
|
injuryTypeTextview.post(() -> injuryTypeTextview.setText(StorageManager.getInstance().getInjuryRecordModel().get(0).getInjuryTypeName(), false));
|
||||||
bodyPartTextview.post(() -> bodyPartTextview.setText(StorageManager.getInstance().getInjuryRecordModel().get(0).getBodyPartName(), false));
|
bodyPartTextview.post(() -> bodyPartTextview.setText(StorageManager.getInstance().getInjuryRecordModel().get(0).getBodyPartName(), false));
|
||||||
riskTypeTextview.post(() -> riskTypeTextview.setText(StorageManager.getInstance().getInjuryRecordModel().get(0).getRiskLevel(), false));
|
riskTypeTextview.post(() -> riskTypeTextview.setText(StorageManager.getInstance().getInjuryRecordModel().get(0).getRiskLevel(), false));
|
||||||
|
@ -314,9 +314,9 @@ public class InjuryFormTwo extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showLayouts() {
|
private void showLayouts() {
|
||||||
if (StorageManager.getInstance().getInjuryRecordModel().get(0).getAccidentTypeName() != null
|
if (StorageManager.getInstance().getInjuryRecordModel().get(0).getIncidentName() != null
|
||||||
&& !StorageManager.getInstance().getInjuryRecordModel().get(0).getAccidentTypeName().isEmpty()) {
|
&& !StorageManager.getInstance().getInjuryRecordModel().get(0).getIncidentName().isEmpty()) {
|
||||||
switch (StorageManager.getInstance().getInjuryRecordModel().get(0).getAccidentTypeName()) {
|
switch (StorageManager.getInstance().getInjuryRecordModel().get(0).getIncidentName()) {
|
||||||
case "Near Miss":
|
case "Near Miss":
|
||||||
case "Property Damage":
|
case "Property Damage":
|
||||||
case "RTA":
|
case "RTA":
|
||||||
|
|
|
@ -10,14 +10,11 @@ public class InjuryRecordModel {
|
||||||
private String KpiName;
|
private String KpiName;
|
||||||
|
|
||||||
private int incidentId;
|
private int incidentId;
|
||||||
private String incidentTypeName;
|
private String incidentName;
|
||||||
|
|
||||||
private int injuryId;
|
private int injuryId;
|
||||||
private String injuryName;
|
private String injuryName;
|
||||||
|
|
||||||
private int accidentTypeId;
|
|
||||||
private String accidentTypeName;
|
|
||||||
|
|
||||||
private int injuryTypeId;
|
private int injuryTypeId;
|
||||||
private String injuryTypeName;
|
private String injuryTypeName;
|
||||||
|
|
||||||
|
@ -95,28 +92,12 @@ public class InjuryRecordModel {
|
||||||
this.incidentId = incidentId;
|
this.incidentId = incidentId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getIncidentTypeName() {
|
public String getIncidentName() {
|
||||||
return incidentTypeName;
|
return incidentName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIncidentTypeName(String incidentTypeName) {
|
public void setIncidentName(String incidentName) {
|
||||||
this.incidentTypeName = incidentTypeName;
|
this.incidentName = incidentName;
|
||||||
}
|
|
||||||
|
|
||||||
public int getAccidentTypeId() {
|
|
||||||
return accidentTypeId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAccidentTypeId(int accidentTypeId) {
|
|
||||||
this.accidentTypeId = accidentTypeId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAccidentTypeName() {
|
|
||||||
return accidentTypeName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAccidentTypeName(String accidentTypeName) {
|
|
||||||
this.accidentTypeName = accidentTypeName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRiskLevelId() {
|
public int getRiskLevelId() {
|
||||||
|
@ -159,15 +140,29 @@ public class InjuryRecordModel {
|
||||||
this.kpiId = kpiId;
|
this.kpiId = kpiId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getInjuryId() {
|
||||||
|
return injuryId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInjuryId(int injuryId) {
|
||||||
|
this.injuryId = injuryId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInjuryName() {
|
||||||
|
return injuryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInjuryName(String injuryName) {
|
||||||
|
this.injuryName = injuryName;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "InjuryRecordModel{" +
|
return "InjuryRecordModel{" +
|
||||||
"employeeId=" + workerId +
|
"employeeId=" + workerId +
|
||||||
", Kpi='" + KpiName + '\'' +
|
", Kpi='" + KpiName + '\'' +
|
||||||
", incidentTypeId=" + incidentId +
|
", incidentTypeId=" + incidentId +
|
||||||
", incidentTypeName='" + incidentTypeName + '\'' +
|
", incidentTypeName='" + incidentName + '\'' +
|
||||||
", accidentTypeId=" + accidentTypeId +
|
|
||||||
", accidentTypeName='" + accidentTypeName + '\'' +
|
|
||||||
", injuryTypeId=" + injuryTypeId +
|
", injuryTypeId=" + injuryTypeId +
|
||||||
", injuryTypeName='" + injuryTypeName + '\'' +
|
", injuryTypeName='" + injuryTypeName + '\'' +
|
||||||
", bodyPartId=" + bodyPartId +
|
", bodyPartId=" + bodyPartId +
|
||||||
|
|
Loading…
Reference in New Issue