修改 外协单位上传、修改故障类别传参错误

master
wanghao 3 weeks ago
parent 220bce6f3e
commit 981abffcfd

@ -36,6 +36,7 @@ import com.example.jingyuan_mes.entity.device.BxSubmitBeen;
import com.example.jingyuan_mes.entity.device.DeviceBeen; import com.example.jingyuan_mes.entity.device.DeviceBeen;
import com.example.jingyuan_mes.entity.device.Dict; import com.example.jingyuan_mes.entity.device.Dict;
import com.example.jingyuan_mes.entity.device.MaintainBeen; import com.example.jingyuan_mes.entity.device.MaintainBeen;
import com.example.jingyuan_mes.entity.device.Outsourcing;
import com.example.jingyuan_mes.entity.store.PdaRouters; import com.example.jingyuan_mes.entity.store.PdaRouters;
import com.example.jingyuan_mes.uitls.SharedPreferencesUtils; import com.example.jingyuan_mes.uitls.SharedPreferencesUtils;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
@ -52,6 +53,9 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
/**
*
*/
public class BxActivity extends BaseActivity implements DisposalFileAdapter.ItemClickCall { public class BxActivity extends BaseActivity implements DisposalFileAdapter.ItemClickCall {
private DisposalFileAdapter adapter; private DisposalFileAdapter adapter;
private List<CheckInstanceFiles> filesList; private List<CheckInstanceFiles> filesList;
@ -73,6 +77,7 @@ public class BxActivity extends BaseActivity implements DisposalFileAdapter.Item
adapter.setList(filesList); adapter.setList(filesList);
binding.setAdapter1(adapter); binding.setAdapter1(adapter);
been = new BxSubmitBeen(); been = new BxSubmitBeen();
outStrRequest();
binding.setVm(been); binding.setVm(been);
initRequest("dms_fault_type"); initRequest("dms_fault_type");
lpw = new ListPopupWindow(this); lpw = new ListPopupWindow(this);
@ -98,6 +103,26 @@ public class BxActivity extends BaseActivity implements DisposalFileAdapter.Item
}); });
imgDialog = new ImgDialog(this); imgDialog = new ImgDialog(this);
} }
// 查询外协
private void outStrRequest() {
OkGo.<MyResult>get(url + "/dms/mobile/getOutsrcInfos").tag(this)
.headers("Authorization", SharedPreferencesUtils.getstring("access_token", ""))
.execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 200) {
List<Outsourcing> outsourcingList=gson.fromJson(body.getData().toString(),new TypeToken<List<Outsourcing>>() {
}.getType());
been.setOutsourcingList(outsourcingList);
return;
}
// Toast.makeText(BxActivity.this, "", Toast.LENGTH_SHORT).show();
}
});
}
// 维修 // 维修
private void initRequest(String uri) { private void initRequest(String uri) {

@ -16,7 +16,7 @@ import java.util.List;
public class BxSubmitBeen extends BaseObservable { public class BxSubmitBeen extends BaseObservable {
private int deviceld; private int deviceld;
private int faultType; private String faultType;
private String faultDescription; private String faultDescription;
private String designOperations; private String designOperations;
private int repairType; private int repairType;
@ -84,11 +84,11 @@ public class BxSubmitBeen extends BaseObservable {
this.deviceld = deviceld; this.deviceld = deviceld;
} }
public int getFaultType() { public String getFaultType() {
return faultType; return faultType;
} }
public void setFaultType(int faultType) { public void setFaultType(String faultType) {
this.faultType = faultType; this.faultType = faultType;
} }
@ -100,6 +100,10 @@ public class BxSubmitBeen extends BaseObservable {
this.faultDescription = faultDescription; this.faultDescription = faultDescription;
} }
public void selectFaultDescription(AdapterView<?> parent, View view, int position, long id) {
this.faultType = faultTypeList.get(position).getDictValue();
}
public String getDesignOperations() { public String getDesignOperations() {
return designOperations; return designOperations;
} }

@ -136,6 +136,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:entries="@{vm.faultTypeS}" android:entries="@{vm.faultTypeS}"
android:spinnerMode="dropdown" android:spinnerMode="dropdown"
android:onItemSelected="@{vm.selectFaultDescription}"
android:textAlignment="center"/> android:textAlignment="center"/>
</LinearLayout> </LinearLayout>

Loading…
Cancel
Save