|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.example.jingyuan_mes.entity.device;
|
|
|
|
|
|
|
|
|
|
import android.util.Log;
|
|
|
|
|
import android.view.View;
|
|
|
|
|
import android.widget.AdapterView;
|
|
|
|
|
|
|
|
|
@ -87,6 +88,7 @@ public class DeviceRepair extends BaseObservable {
|
|
|
|
|
private List<Outsourcing> outsourcingList;
|
|
|
|
|
private List<String> outsourcingNameList;
|
|
|
|
|
private int outsrcId;
|
|
|
|
|
private int outsrcIdIndex;
|
|
|
|
|
private String outsrcName;
|
|
|
|
|
|
|
|
|
|
public List<String> getOutsourcingNameList() {
|
|
|
|
@ -105,16 +107,30 @@ public class DeviceRepair extends BaseObservable {
|
|
|
|
|
public void setOutsourcingList(List<Outsourcing> outsourcingList) {
|
|
|
|
|
this.outsourcingList = outsourcingList;
|
|
|
|
|
outsourcingNameList=new ArrayList<>(outsourcingList.size());
|
|
|
|
|
outsourcingList.forEach(t->{
|
|
|
|
|
outsourcingNameList.add(t.getOutsrcName());
|
|
|
|
|
if (t.getOutsrcId()==outsrcId){
|
|
|
|
|
this.outsrcName=t.getOutsrcName();
|
|
|
|
|
for (int i = 0; i < outsourcingList.size(); i++) {
|
|
|
|
|
Outsourcing outsourcing = outsourcingList.get(i);
|
|
|
|
|
outsourcingNameList.add(outsourcing.getOutsrcName());
|
|
|
|
|
if (outsourcing.getOutsrcId()==outsrcId){
|
|
|
|
|
// this.outsrcName=t.getOutsrcName();
|
|
|
|
|
this.outsrcIdIndex = i;
|
|
|
|
|
Log.e("TAG", "setOutsourcingList:" + i);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
/* (t->{
|
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
});*/
|
|
|
|
|
notifyChange();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getOutsrcIdIndex() {
|
|
|
|
|
|
|
|
|
|
return outsrcIdIndex;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void selectOutSourcingID(AdapterView<?> parent, View view, int position, long id) {
|
|
|
|
|
this.outsrcId = outsourcingList.get(position).getOutsrcId();
|
|
|
|
|
this.outsrcIdIndex = position;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getOutsrcName() {
|
|
|
|
@ -139,6 +155,11 @@ public class DeviceRepair extends BaseObservable {
|
|
|
|
|
return repairType;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setOutsrcIdIndex(int outsrcIdIndex) {
|
|
|
|
|
this.outsrcIdIndex = outsrcIdIndex;
|
|
|
|
|
notifyChange();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setRepairType(int repairType) {
|
|
|
|
|
this.repairType = repairType;
|
|
|
|
|
}
|
|
|
|
@ -149,6 +170,7 @@ public class DeviceRepair extends BaseObservable {
|
|
|
|
|
repairType = type;
|
|
|
|
|
// radioState = (type == 2);
|
|
|
|
|
if (type==1){
|
|
|
|
|
|
|
|
|
|
setRadioState1(true);
|
|
|
|
|
setRadioState2(false);
|
|
|
|
|
}else {
|
|
|
|
@ -238,6 +260,7 @@ public class DeviceRepair extends BaseObservable {
|
|
|
|
|
|
|
|
|
|
public void setFaultSourceType(String faultSourceType) {
|
|
|
|
|
this.faultSourceType = faultSourceType;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Long getFaultSourceId() {
|
|
|
|
|