增加 设备管理
@ -0,0 +1,68 @@
|
||||
package com.example.haiwei_mom.adapter.check;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.haiwei_mom.BR;
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.adapter.ItemClickCall;
|
||||
import com.example.haiwei_mom.databinding.ItemCheckSelectBinding;
|
||||
import com.example.haiwei_mom.data.check.CheckResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/1/31 15:18
|
||||
*/
|
||||
public class CheckSelectAdapter extends RecyclerView.Adapter<CheckSelectAdapter.MyViewHolder> {
|
||||
private List<CheckResult> list;
|
||||
private Context context;
|
||||
private LayoutInflater inflater;
|
||||
private ItemClickCall clickCall;
|
||||
public CheckSelectAdapter(Context context, ItemClickCall clickCall) {
|
||||
this.context = context;
|
||||
this.clickCall = clickCall;
|
||||
inflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
public void setList(List<CheckResult> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ItemCheckSelectBinding binding = DataBindingUtil.inflate(inflater, R.layout.item_check_select, parent, false);
|
||||
return new MyViewHolder(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
|
||||
var outstock = list.get(position);
|
||||
var binding = holder.binding;
|
||||
binding.setVariable(BR.vm,outstock);
|
||||
binding.checkSelectClick.setOnClickListener(v -> clickCall.onClick(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list==null?0:list.size();
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
private ItemCheckSelectBinding binding;
|
||||
|
||||
public MyViewHolder(ItemCheckSelectBinding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package com.example.haiwei_mom.adapter.check;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.haiwei_mom.BR;
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.adapter.ItemClickCall;
|
||||
import com.example.haiwei_mom.databinding.ItemCheckSelectDetalBinding;
|
||||
import com.example.haiwei_mom.data.check.CheckResultDetal;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/1/31 15:18
|
||||
*/
|
||||
public class CheckSelectDetalAdapter extends RecyclerView.Adapter<CheckSelectDetalAdapter.MyViewHolder> {
|
||||
private List<CheckResultDetal> list;
|
||||
private Context context;
|
||||
private LayoutInflater inflater;
|
||||
private ItemClickCall clickCall;
|
||||
public CheckSelectDetalAdapter(Context context, ItemClickCall clickCall) {
|
||||
this.context = context;
|
||||
this.clickCall = clickCall;
|
||||
inflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
public void setList(List<CheckResultDetal> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ItemCheckSelectDetalBinding binding = DataBindingUtil.inflate(inflater, R.layout.item_check_select_detal, parent, false);
|
||||
return new MyViewHolder(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
|
||||
var outstock = list.get(position);
|
||||
var binding = holder.binding;
|
||||
binding.setVariable(BR.vm,outstock);
|
||||
binding.checkSelectDetalClick.setOnClickListener(v -> clickCall.onClick(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list==null?0:list.size();
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
private ItemCheckSelectDetalBinding binding;
|
||||
|
||||
public MyViewHolder(ItemCheckSelectDetalBinding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package com.example.haiwei_mom.adapter.check;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.databinding.ItemCheck1Binding;
|
||||
import com.example.haiwei_mom.databinding.ItemCheck2Binding;
|
||||
import com.example.haiwei_mom.data.check.CheckResultDetal;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/3/1 17:23
|
||||
*/
|
||||
public class CheckWorkAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
private List<CheckResultDetal> list;
|
||||
private Context context;
|
||||
private boolean enabledState;
|
||||
|
||||
public void setEnabledState(boolean enabledState) {
|
||||
this.enabledState = enabledState;
|
||||
}
|
||||
|
||||
public CheckWorkAdapter(Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public void setList(List<CheckResultDetal> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
var inflater = LayoutInflater.from(context);
|
||||
if (viewType==1){
|
||||
ItemCheck1Binding binding = DataBindingUtil.inflate(inflater, R.layout.item_check_1, parent, false);
|
||||
return new MyHolder1(binding);
|
||||
} else {
|
||||
ItemCheck2Binding binding = DataBindingUtil.inflate(inflater, R.layout.item_check_2, parent, false);
|
||||
return new MyHolder2(binding);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
var checkResultDetal = list.get(position);
|
||||
checkResultDetal.setIndex(position+1);
|
||||
if (holder instanceof MyHolder1){
|
||||
MyHolder1 holder1= (MyHolder1) holder;
|
||||
holder1.binding.setItem(checkResultDetal);
|
||||
holder1.binding.setEnabledState(enabledState);
|
||||
holder1.binding.executePendingBindings();
|
||||
}else {
|
||||
MyHolder2 holder2= (MyHolder2) holder;
|
||||
holder2.binding.setItem(checkResultDetal);
|
||||
holder2.binding.setEnabledState(enabledState);
|
||||
holder2.binding.executePendingBindings();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list==null?0:list.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
return Integer.parseInt(list.get(position).getCheckProjectProperty());
|
||||
}
|
||||
|
||||
class MyHolder1 extends RecyclerView.ViewHolder {
|
||||
private ItemCheck1Binding binding;
|
||||
|
||||
public MyHolder1(@NonNull ItemCheck1Binding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
}
|
||||
|
||||
class MyHolder2 extends RecyclerView.ViewHolder {
|
||||
private ItemCheck2Binding binding;
|
||||
|
||||
public MyHolder2(@NonNull ItemCheck2Binding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
package com.example.haiwei_mom.adapter.check;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.example.haiwei_mom.BR;
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.databinding.ItemDisposalImgBinding;
|
||||
import com.example.haiwei_mom.data.check.CheckInstanceFiles;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/3/11
|
||||
*/
|
||||
public class DisposalFileAdapter extends RecyclerView.Adapter<DisposalFileAdapter.MyViewHolder> {
|
||||
private List<CheckInstanceFiles> list;
|
||||
private static Context context;
|
||||
private LayoutInflater inflater;
|
||||
private ItemClickCall clickCall;
|
||||
public DisposalFileAdapter(Context context, ItemClickCall clickCall) {
|
||||
this.context = context;
|
||||
this.clickCall = clickCall;
|
||||
inflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
public void setList(List<CheckInstanceFiles> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ItemDisposalImgBinding binding = DataBindingUtil.inflate(inflater, R.layout.item_disposal_img, parent, false);
|
||||
return new MyViewHolder(binding);
|
||||
}
|
||||
|
||||
// @SuppressLint("CheckResult")
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
|
||||
var outstock = list.get(position);
|
||||
var binding = holder.binding;
|
||||
binding.setVariable(BR.vm,outstock);
|
||||
Log.e("TAG", "onBindViewHolder:" + outstock.isState());
|
||||
Glide.with(context)
|
||||
.load(outstock.getFaultFile())
|
||||
.into(binding.disFile);
|
||||
binding.disFile.setOnClickListener(v -> clickCall.onClick(position,true));
|
||||
binding.disposalDelect.setOnClickListener(v -> clickCall.onClick(position,false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list==null?0:list.size();
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
private ItemDisposalImgBinding binding;
|
||||
|
||||
public MyViewHolder(ItemDisposalImgBinding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public interface ItemClickCall {
|
||||
void onClick(int position,boolean type);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.example.haiwei_mom.adapter.check;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.haiwei_mom.BR;
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.databinding.ItemDisposalBinding;
|
||||
import com.example.haiwei_mom.data.check.CheckActivitieBeen;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/3/12 14:32
|
||||
*/
|
||||
public class DisposalInfoAdapter extends RecyclerView.Adapter<DisposalInfoAdapter.MyViewHoder> {
|
||||
|
||||
private Context context;
|
||||
private List<CheckActivitieBeen> list;
|
||||
private LayoutInflater from;
|
||||
public DisposalInfoAdapter(Context context) {
|
||||
this.context = context;
|
||||
|
||||
from = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
public void setList(List<CheckActivitieBeen> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public MyViewHoder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ItemDisposalBinding binding= DataBindingUtil.inflate(from, R.layout.item_disposal,parent,false);
|
||||
return new MyViewHoder(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MyViewHoder holder, int position) {
|
||||
holder.binding.setVariable(BR.vm,list.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list==null?0:list.size();
|
||||
}
|
||||
|
||||
public static class MyViewHoder extends RecyclerView.ViewHolder{
|
||||
private ItemDisposalBinding binding;
|
||||
public MyViewHoder(ItemDisposalBinding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding=binding;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.example.haiwei_mom.adapter.device;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.databinding.ItemDeviceInspection1Binding;
|
||||
import com.example.haiwei_mom.databinding.ItemDeviceInspection2Binding;
|
||||
import com.example.haiwei_mom.data.device.DeviceInspectionItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/3/1 17:23
|
||||
*/
|
||||
public class DeviceInspectionInfoAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
private List<DeviceInspectionItem> list;
|
||||
private Context context;
|
||||
private LayoutInflater inflater;
|
||||
public DeviceInspectionInfoAdapter(Context context,List<DeviceInspectionItem> list) {
|
||||
this.context = context;
|
||||
inflater = LayoutInflater.from(context);
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
|
||||
|
||||
if (viewType==1){
|
||||
ItemDeviceInspection1Binding binding = DataBindingUtil.inflate(inflater, R.layout.item_device_inspection_1, parent, false);
|
||||
return new MyHolder1(binding);
|
||||
} else {
|
||||
ItemDeviceInspection2Binding binding = DataBindingUtil.inflate(inflater, R.layout.item_device_inspection_2, parent, false);
|
||||
return new MyHolder2(binding);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
var checkResultDetal = list.get(position);
|
||||
checkResultDetal.setIndex(position+1);
|
||||
if (holder instanceof MyHolder1){
|
||||
MyHolder1 holder1= (MyHolder1) holder;
|
||||
holder1.binding.setItem(checkResultDetal);
|
||||
holder1.binding.executePendingBindings();
|
||||
}else {
|
||||
MyHolder2 holder2= (MyHolder2) holder;
|
||||
holder2.binding.setItem(checkResultDetal);
|
||||
holder2.binding.executePendingBindings();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list==null?0:list.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
return Integer.parseInt(list.get(position).getInspectProjectProperty());
|
||||
}
|
||||
|
||||
class MyHolder1 extends RecyclerView.ViewHolder {
|
||||
private ItemDeviceInspection1Binding binding;
|
||||
|
||||
public MyHolder1(@NonNull ItemDeviceInspection1Binding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
}
|
||||
|
||||
class MyHolder2 extends RecyclerView.ViewHolder {
|
||||
private ItemDeviceInspection2Binding binding;
|
||||
|
||||
public MyHolder2(@NonNull ItemDeviceInspection2Binding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package com.example.haiwei_mom.adapter.device;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.haiwei_mom.BR;
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.adapter.ItemClickCall;
|
||||
import com.example.haiwei_mom.databinding.ItemDeviceInspectionBinding;
|
||||
import com.example.haiwei_mom.data.device.DeviceInspectionDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/1/31 15:18
|
||||
*/
|
||||
public class DeviceInspectiontAdapter extends RecyclerView.Adapter<DeviceInspectiontAdapter.MyViewHolder> {
|
||||
private List<DeviceInspectionDetail> list;
|
||||
private Context context;
|
||||
private LayoutInflater inflater;
|
||||
private ItemClickCall clickCall;
|
||||
public DeviceInspectiontAdapter(Context context, ItemClickCall clickCall) {
|
||||
this.context = context;
|
||||
this.clickCall = clickCall;
|
||||
inflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
public void setList(List<DeviceInspectionDetail> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ItemDeviceInspectionBinding binding = DataBindingUtil.inflate(inflater, R.layout.item_device_inspection, parent, false);
|
||||
return new MyViewHolder(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
|
||||
var DeviceInspectionDetail = list.get(position);
|
||||
var binding = holder.binding;
|
||||
binding.setVariable(BR.vm,DeviceInspectionDetail);
|
||||
binding.deviceInspectionClick.setOnClickListener(v -> clickCall.onClick(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list==null?0:list.size();
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
private ItemDeviceInspectionBinding binding;
|
||||
|
||||
public MyViewHolder(ItemDeviceInspectionBinding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package com.example.haiwei_mom.adapter.device;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.haiwei_mom.BR;
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.databinding.ItemDeviceRepairBinding;
|
||||
import com.example.haiwei_mom.data.device.DeviceRepair;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/1/31 15:18
|
||||
*/
|
||||
public class DeviceRepairListAdapter extends RecyclerView.Adapter<DeviceRepairListAdapter.MyViewHolder> {
|
||||
private List<DeviceRepair> list;
|
||||
private Context context;
|
||||
private LayoutInflater inflater;
|
||||
private ItemClickCall clickCall;
|
||||
public DeviceRepairListAdapter(Context context, ItemClickCall clickCall) {
|
||||
this.context = context;
|
||||
this.clickCall = clickCall;
|
||||
inflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
public void setList(List<DeviceRepair> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ItemDeviceRepairBinding binding = DataBindingUtil.inflate(inflater, R.layout.item_device_repair, parent, false);
|
||||
return new MyViewHolder(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
|
||||
var outstock = list.get(position);
|
||||
|
||||
var binding = holder.binding;
|
||||
binding.setVariable(BR.vm,outstock);
|
||||
binding.deviceRepairModify.setOnClickListener(v -> clickCall.clickItemForModify(position));
|
||||
binding.deviceRepairSelect.setOnClickListener(v -> clickCall.clickItemForSelect(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list==null?0:list.size();
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
private ItemDeviceRepairBinding binding;
|
||||
|
||||
public MyViewHolder(ItemDeviceRepairBinding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public interface ItemClickCall{
|
||||
void clickItemForModify(int index);
|
||||
void clickItemForSelect(int index);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package com.example.haiwei_mom.adapter.device;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.haiwei_mom.BR;
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.adapter.ItemClickCall;
|
||||
import com.example.haiwei_mom.databinding.ItemRepairPartBinding;
|
||||
import com.example.haiwei_mom.data.device.DeviceRepairPart;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/1/31 15:18
|
||||
*/
|
||||
public class DeviceRepairPartAdapter extends RecyclerView.Adapter<DeviceRepairPartAdapter.MyViewHolder> {
|
||||
private List<DeviceRepairPart> list;
|
||||
private Context context;
|
||||
private LayoutInflater inflater;
|
||||
private ItemClickCall clickCall;
|
||||
public DeviceRepairPartAdapter(Context context, ItemClickCall clickCall) {
|
||||
this.context = context;
|
||||
this.clickCall = clickCall;
|
||||
inflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
public void setList(List<DeviceRepairPart> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ItemRepairPartBinding binding = DataBindingUtil.inflate(inflater, R.layout.item_repair_part, parent, false);
|
||||
return new MyViewHolder(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
|
||||
var DeviceInspectionDetail = list.get(position);
|
||||
var binding = holder.binding;
|
||||
binding.setVariable(BR.vm,DeviceInspectionDetail);
|
||||
binding.pairDelete.setOnClickListener(v -> clickCall.onClick(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list==null?0:list.size();
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
private ItemRepairPartBinding binding;
|
||||
|
||||
public MyViewHolder(ItemRepairPartBinding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package com.example.haiwei_mom.adapter.device;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.haiwei_mom.BR;
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.adapter.ItemClickCall;
|
||||
import com.example.haiwei_mom.databinding.ItemDeviceLubricationBinding;
|
||||
import com.example.haiwei_mom.data.device.LubricationDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/1/31 15:18
|
||||
*/
|
||||
public class LubricationAdapter extends RecyclerView.Adapter<LubricationAdapter.MyViewHolder> {
|
||||
private List<LubricationDetail> list;
|
||||
private Context context;
|
||||
private LayoutInflater inflater;
|
||||
private ItemClickCall clickCall;
|
||||
public LubricationAdapter(Context context, ItemClickCall clickCall) {
|
||||
this.context = context;
|
||||
this.clickCall = clickCall;
|
||||
inflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
public void setList(List<LubricationDetail> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ItemDeviceLubricationBinding binding = DataBindingUtil.inflate(inflater, R.layout.item_device_lubrication, parent, false);
|
||||
return new MyViewHolder(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
|
||||
var been = list.get(position);
|
||||
var binding = holder.binding;
|
||||
binding.setVariable(BR.vm,been);
|
||||
binding.deviceMaintainClick.setOnClickListener(v -> clickCall.onClick(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list==null?0:list.size();
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
private ItemDeviceLubricationBinding binding;
|
||||
|
||||
public MyViewHolder(ItemDeviceLubricationBinding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package com.example.haiwei_mom.adapter.device;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.haiwei_mom.BR;
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.adapter.ItemClickCall;
|
||||
import com.example.haiwei_mom.databinding.ItemDeviceMaintainBinding;
|
||||
import com.example.haiwei_mom.data.device.MaintainDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/1/31 15:18
|
||||
*/
|
||||
public class MaintainAdapter extends RecyclerView.Adapter<MaintainAdapter.MyViewHolder> {
|
||||
private List<MaintainDetail> list;
|
||||
private Context context;
|
||||
private LayoutInflater inflater;
|
||||
private ItemClickCall clickCall;
|
||||
public MaintainAdapter(Context context, ItemClickCall clickCall) {
|
||||
this.context = context;
|
||||
this.clickCall = clickCall;
|
||||
inflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
public void setList(List<MaintainDetail> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ItemDeviceMaintainBinding binding = DataBindingUtil.inflate(inflater, R.layout.item_device_maintain, parent, false);
|
||||
return new MyViewHolder(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
|
||||
MaintainDetail been = list.get(position);
|
||||
var binding = holder.binding;
|
||||
binding.setVariable(BR.vm,been);
|
||||
binding.deviceMaintainClick.setOnClickListener(v -> clickCall.onClick(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list==null?0:list.size();
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
private ItemDeviceMaintainBinding binding;
|
||||
|
||||
public MyViewHolder(ItemDeviceMaintainBinding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package com.example.haiwei_mom.adapter.device;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.example.haiwei_mom.BR;
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.databinding.ItemMaintainInfoProjectBinding;
|
||||
import com.example.haiwei_mom.data.device.MaintainProject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/1/31 15:18
|
||||
*/
|
||||
public class MaintainProjectAdapter extends RecyclerView.Adapter<MaintainProjectAdapter.MyViewHolder> {
|
||||
private List<MaintainProject> list;
|
||||
private Context context;
|
||||
private LayoutInflater inflater;
|
||||
public MaintainProjectAdapter(Context context) {
|
||||
this.context = context;
|
||||
inflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
public void setList(List<MaintainProject> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
ItemMaintainInfoProjectBinding binding = DataBindingUtil.inflate(inflater, R.layout.item_maintain_info_project, parent, false);
|
||||
return new MyViewHolder(binding);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
|
||||
var been = list.get(position);
|
||||
var binding = holder.binding;
|
||||
binding.setVariable(BR.item,been);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return list==null?0:list.size();
|
||||
}
|
||||
|
||||
class MyViewHolder extends RecyclerView.ViewHolder {
|
||||
private ItemMaintainInfoProjectBinding binding;
|
||||
|
||||
public MyViewHolder(ItemMaintainInfoProjectBinding binding) {
|
||||
super(binding.getRoot());
|
||||
this.binding = binding;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
package com.example.haiwei_mom.data.check;
|
||||
|
||||
import androidx.databinding.BaseObservable;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/3/11 10:12
|
||||
*/
|
||||
public class CheckActivitieBeen extends BaseObservable{
|
||||
|
||||
|
||||
private String createBy;
|
||||
private String createTime;
|
||||
private String processHandleResolution;
|
||||
private int processActivityId;
|
||||
private int processStepOrder;
|
||||
private boolean editedAble;
|
||||
|
||||
|
||||
|
||||
public boolean isEditedAble() {
|
||||
return editedAble;
|
||||
}
|
||||
|
||||
public void setEditedAble(boolean editedAble) {
|
||||
this.editedAble = editedAble;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
|
||||
}
|
||||
|
||||
public String getProcessHandleResolution() {
|
||||
return processHandleResolution;
|
||||
}
|
||||
|
||||
public void setProcessHandleResolution(String processHandleResolution) {
|
||||
this.processHandleResolution = processHandleResolution;
|
||||
}
|
||||
|
||||
public int getProcessActivityId() {
|
||||
return processActivityId;
|
||||
}
|
||||
|
||||
public void setProcessActivityId(int processActivityId) {
|
||||
this.processActivityId = processActivityId;
|
||||
}
|
||||
|
||||
public int getProcessStepOrder() {
|
||||
return processStepOrder;
|
||||
}
|
||||
|
||||
public void setProcessStepOrder(int processStepOrder) {
|
||||
this.processStepOrder = processStepOrder;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package com.example.haiwei_mom.data.check;
|
||||
|
||||
import androidx.databinding.BaseObservable;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* 图片用
|
||||
* @date 2024/3/11 10:00
|
||||
*/
|
||||
public class CheckInstanceFiles extends BaseObservable {
|
||||
private String faultFile;
|
||||
private boolean state=false;
|
||||
|
||||
public boolean isState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(boolean state) {
|
||||
this.state = state;
|
||||
|
||||
}
|
||||
|
||||
public String getFaultFile() {
|
||||
return faultFile;
|
||||
}
|
||||
|
||||
public void setFaultFile(String faultFile) {
|
||||
this.faultFile = faultFile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CheckInstanceFiles{" +
|
||||
"faultFile='" + faultFile + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
package com.example.haiwei_mom.data.check;
|
||||
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public class CheckResultDetailVo {
|
||||
|
||||
/**
|
||||
* 批次数量
|
||||
*/
|
||||
private int batchAmount;
|
||||
private int passAmount;
|
||||
private int failAmount;
|
||||
private int checkSample;
|
||||
private String checkMode;
|
||||
|
||||
public String getCheckMode() {
|
||||
return Optional.ofNullable(checkMode).map(t->t.equals("1") ? "全检" : "抽检").orElse(null);
|
||||
|
||||
}
|
||||
|
||||
public void setCheckMode(String checkMode) {
|
||||
this.checkMode = checkMode;
|
||||
}
|
||||
|
||||
public int getBatchAmount() {
|
||||
return batchAmount;
|
||||
}
|
||||
|
||||
public void setBatchAmount(int batchAmount) {
|
||||
this.batchAmount = batchAmount;
|
||||
}
|
||||
|
||||
public int getPassAmount() {
|
||||
return passAmount;
|
||||
}
|
||||
|
||||
public void setPassAmount(int passAmount) {
|
||||
this.passAmount = passAmount;
|
||||
}
|
||||
|
||||
public int getFailAmount() {
|
||||
return failAmount;
|
||||
}
|
||||
|
||||
public void setFailAmount(int failAmount) {
|
||||
this.failAmount = failAmount;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int getCheckSample() {
|
||||
return checkSample;
|
||||
}
|
||||
|
||||
public void setCheckSample(int checkSample) {
|
||||
this.checkSample = checkSample;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,145 @@
|
||||
package com.example.haiwei_mom.data.device;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
|
||||
import androidx.databinding.BaseObservable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/4/1 9:41
|
||||
*/
|
||||
public class BxSubmitBeen extends BaseObservable {
|
||||
|
||||
private int deviceld;
|
||||
private String faultType;
|
||||
private String faultDescription;
|
||||
private String designOperations;
|
||||
private int repairType;
|
||||
private int outsrcld;
|
||||
//
|
||||
private String deviceCode;
|
||||
private List<String> faultTypeS;
|
||||
private List<Dict> faultTypeList;
|
||||
private boolean outsrcVis;
|
||||
private List<Outsourcing> outsourcingList;
|
||||
private List<String> outsourcingStringList;
|
||||
private String selectName;
|
||||
|
||||
public List<String> getOutsourcingStringList() {
|
||||
return outsourcingStringList;
|
||||
}
|
||||
|
||||
public void setOutsourcingList(List<Outsourcing> outsourcingList) {
|
||||
this.outsourcingList = outsourcingList;
|
||||
outsourcingStringList=new ArrayList<>(outsourcingList.size());
|
||||
outsourcingList.forEach(t->outsourcingStringList.add(t.getOutsrcName()));
|
||||
notifyChange();
|
||||
}
|
||||
|
||||
public void setFaultTypeList(List<Dict> faultTypeList) {
|
||||
this.faultTypeList = faultTypeList;
|
||||
faultTypeS = new ArrayList<>();
|
||||
faultTypeList.forEach(t -> faultTypeS.add(t.getDictLabel()));
|
||||
notifyChange();
|
||||
}
|
||||
|
||||
public void repairTypeSelect(int type) {
|
||||
repairType = type;
|
||||
outsrcVis = (type == 2);
|
||||
notifyChange();
|
||||
|
||||
}
|
||||
public void setOutsrcld(AdapterView<?> parent, View view, int position, long id ) {
|
||||
this.outsrcld = outsourcingList.get(position).getOutsrcId();
|
||||
}
|
||||
public boolean isOutsrcVis() {
|
||||
return outsrcVis;
|
||||
}
|
||||
|
||||
public List<String> getFaultTypeS() {
|
||||
return faultTypeS;
|
||||
}
|
||||
|
||||
public void setFaultTypeS(List<String> faultTypeS) {
|
||||
this.faultTypeS = faultTypeS;
|
||||
}
|
||||
|
||||
public List<Dict> getFaultTypeList() {
|
||||
return faultTypeList;
|
||||
}
|
||||
|
||||
public void setOutsrcVis(boolean outsrcVis) {
|
||||
this.outsrcVis = outsrcVis;
|
||||
}
|
||||
|
||||
public int getDeviceld() {
|
||||
return deviceld;
|
||||
}
|
||||
|
||||
public void setDeviceld(int deviceld) {
|
||||
this.deviceld = deviceld;
|
||||
}
|
||||
|
||||
public String getFaultType() {
|
||||
return faultType;
|
||||
}
|
||||
|
||||
public void setFaultType(String faultType) {
|
||||
this.faultType = faultType;
|
||||
}
|
||||
|
||||
public String getFaultDescription() {
|
||||
return faultDescription;
|
||||
}
|
||||
|
||||
public void setFaultDescription(String faultDescription) {
|
||||
this.faultDescription = faultDescription;
|
||||
}
|
||||
|
||||
public void selectFaultDescription(AdapterView<?> parent, View view, int position, long id) {
|
||||
this.faultType = faultTypeList.get(position).getDictValue();
|
||||
}
|
||||
|
||||
public String getDesignOperations() {
|
||||
return designOperations;
|
||||
}
|
||||
|
||||
public void setDesignOperations(String designOperations) {
|
||||
this.designOperations = designOperations;
|
||||
notifyChange();
|
||||
}
|
||||
|
||||
public int getRepairType() {
|
||||
return repairType;
|
||||
}
|
||||
|
||||
public void setRepairType(int repairType) {
|
||||
this.repairType = repairType;
|
||||
}
|
||||
|
||||
public int getOutsrcld() {
|
||||
return outsrcld;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getDeviceCode() {
|
||||
return deviceCode;
|
||||
}
|
||||
|
||||
public void setDeviceCode(String deviceCode) {
|
||||
this.deviceCode = deviceCode;
|
||||
}
|
||||
|
||||
public String getSelectName() {
|
||||
return selectName;
|
||||
}
|
||||
|
||||
public void setSelectName(String selectName) {
|
||||
this.selectName = selectName;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package com.example.haiwei_mom.data.device;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/4/1 10:00
|
||||
*/
|
||||
public class DeviceBeen {
|
||||
|
||||
|
||||
private int deviceId;
|
||||
private String deviceCode;
|
||||
private String deviceName;
|
||||
private String deviceLocation;
|
||||
private Long deviceTypeId;
|
||||
private String deviceSpec;
|
||||
private int deviceStatus;
|
||||
|
||||
public int getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(int deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getDeviceCode() {
|
||||
return deviceCode;
|
||||
}
|
||||
|
||||
public void setDeviceCode(String deviceCode) {
|
||||
this.deviceCode = deviceCode;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getDeviceLocation() {
|
||||
return deviceLocation;
|
||||
}
|
||||
|
||||
public void setDeviceLocation(String deviceLocation) {
|
||||
this.deviceLocation = deviceLocation;
|
||||
}
|
||||
|
||||
public Long getDeviceTypeId() {
|
||||
return deviceTypeId;
|
||||
}
|
||||
|
||||
public void setDeviceTypeId(Long deviceTypeId) {
|
||||
this.deviceTypeId = deviceTypeId;
|
||||
}
|
||||
|
||||
public String getDeviceSpec() {
|
||||
return deviceSpec;
|
||||
}
|
||||
|
||||
public void setDeviceSpec(String deviceSpec) {
|
||||
this.deviceSpec = deviceSpec;
|
||||
}
|
||||
|
||||
public int getDeviceStatus() {
|
||||
return deviceStatus;
|
||||
}
|
||||
|
||||
public void setDeviceStatus(int deviceStatus) {
|
||||
this.deviceStatus = deviceStatus;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.example.haiwei_mom.data.device;
|
||||
|
||||
import androidx.databinding.BaseObservable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/3/20 16:32
|
||||
*/
|
||||
public class DeviceInspection extends BaseObservable {
|
||||
|
||||
/**
|
||||
* inspectInstanceId : 7
|
||||
* billsInspectCode : 123
|
||||
* createTime : 2024-02-19 17:35:43
|
||||
* inspectType : 1
|
||||
* inspectStatus : 1
|
||||
* routeName : 测试线路1
|
||||
*/
|
||||
|
||||
private int inspectInstanceId;
|
||||
private String billsInspectCode;
|
||||
private String createTime;
|
||||
private String inspectType;
|
||||
private String inspectStatus;
|
||||
private String inspectStatusName;
|
||||
private String routeName;
|
||||
private List<DeviceInspectionDetail> dmsInspectInstanceDetailList;
|
||||
|
||||
|
||||
public String getInspectStatusName() {
|
||||
switch (inspectStatus) {
|
||||
case "1":
|
||||
inspectStatusName = "待巡检";
|
||||
break;
|
||||
case "2":
|
||||
inspectStatusName = "巡检中";
|
||||
break;
|
||||
case "3":
|
||||
inspectStatusName = "已完成";
|
||||
break;
|
||||
|
||||
}
|
||||
return inspectStatusName;
|
||||
}
|
||||
|
||||
|
||||
public int getInspectInstanceId() {
|
||||
return inspectInstanceId;
|
||||
}
|
||||
|
||||
public void setInspectInstanceId(int inspectInstanceId) {
|
||||
this.inspectInstanceId = inspectInstanceId;
|
||||
}
|
||||
|
||||
public String getBillsInspectCode() {
|
||||
return billsInspectCode;
|
||||
}
|
||||
|
||||
public void setBillsInspectCode(String billsInspectCode) {
|
||||
this.billsInspectCode = billsInspectCode;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getInspectType() {
|
||||
return inspectType;
|
||||
}
|
||||
|
||||
public void setInspectType(String inspectType) {
|
||||
this.inspectType = inspectType;
|
||||
}
|
||||
|
||||
public String getInspectStatus() {
|
||||
return inspectStatus;
|
||||
}
|
||||
|
||||
public void setInspectStatus(String inspectStatus) {
|
||||
this.inspectStatus = inspectStatus;
|
||||
}
|
||||
|
||||
public String getRouteName() {
|
||||
return routeName;
|
||||
}
|
||||
|
||||
public void setRouteName(String routeName) {
|
||||
this.routeName = routeName;
|
||||
}
|
||||
|
||||
public List<DeviceInspectionDetail> getDmsInspectInstanceDetailList() {
|
||||
return dmsInspectInstanceDetailList;
|
||||
}
|
||||
|
||||
public void setDmsInspectInstanceDetailList(List<DeviceInspectionDetail> dmsInspectInstanceDetailList) {
|
||||
this.dmsInspectInstanceDetailList = dmsInspectInstanceDetailList;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package com.example.haiwei_mom.data.device;
|
||||
|
||||
public class DeviceRepairPart {
|
||||
|
||||
private String partName;
|
||||
private String partSpecifications;
|
||||
private String amount;
|
||||
|
||||
public String getPartName() {
|
||||
return partName;
|
||||
}
|
||||
|
||||
public void setPartName(String partName) {
|
||||
this.partName = partName;
|
||||
}
|
||||
|
||||
public String getPartSpecifications() {
|
||||
return partSpecifications;
|
||||
}
|
||||
|
||||
public void setPartSpecifications(String partSpecifications) {
|
||||
this.partSpecifications = partSpecifications;
|
||||
}
|
||||
|
||||
public String getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(String amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.example.haiwei_mom.data.device;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/3/22 10:36
|
||||
*/
|
||||
public class Dict {
|
||||
private String dictLabel;
|
||||
private String dictValue;
|
||||
private String dictType;
|
||||
private String dictCode;
|
||||
|
||||
public String getDictLabel() {
|
||||
return dictLabel;
|
||||
}
|
||||
|
||||
public void setDictLabel(String dictLabel) {
|
||||
this.dictLabel = dictLabel;
|
||||
}
|
||||
|
||||
public String getDictValue() {
|
||||
return dictValue;
|
||||
}
|
||||
|
||||
public void setDictValue(String dictValue) {
|
||||
this.dictValue = dictValue;
|
||||
}
|
||||
|
||||
public String getDictType() {
|
||||
return dictType;
|
||||
}
|
||||
|
||||
public void setDictType(String dictType) {
|
||||
this.dictType = dictType;
|
||||
}
|
||||
|
||||
public String getDictCode() {
|
||||
return dictCode;
|
||||
}
|
||||
|
||||
public void setDictCode(String dictCode) {
|
||||
this.dictCode = dictCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Dict{" +
|
||||
"dictLabel='" + dictLabel + '\'' +
|
||||
", dictValue='" + dictValue + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package com.example.haiwei_mom.data.device;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/3/25 14:41
|
||||
*/
|
||||
public class InstanceFile {
|
||||
|
||||
/**
|
||||
* createBy : null
|
||||
* createTime : null
|
||||
* updateBy : null
|
||||
* updateTime : null
|
||||
* remark : null
|
||||
* instanceFileId : 1
|
||||
* targetType : 1
|
||||
* targetId : 27
|
||||
* filePath : http://127.0.0.1:9300/statics/2024/03/13/1709885329511_20240313181334A001.png
|
||||
*/
|
||||
|
||||
private int instanceFileId;
|
||||
private String targetType;
|
||||
private int targetId;
|
||||
private String filePath;
|
||||
|
||||
public int getInstanceFileId() {
|
||||
return instanceFileId;
|
||||
}
|
||||
|
||||
public void setInstanceFileId(int instanceFileId) {
|
||||
this.instanceFileId = instanceFileId;
|
||||
}
|
||||
|
||||
public String getTargetType() {
|
||||
return targetType;
|
||||
}
|
||||
|
||||
public void setTargetType(String targetType) {
|
||||
this.targetType = targetType;
|
||||
}
|
||||
|
||||
public int getTargetId() {
|
||||
return targetId;
|
||||
}
|
||||
|
||||
public void setTargetId(int targetId) {
|
||||
this.targetId = targetId;
|
||||
}
|
||||
|
||||
public String getFilePath() {
|
||||
return filePath;
|
||||
}
|
||||
|
||||
public void setFilePath(String filePath) {
|
||||
this.filePath = filePath;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,135 @@
|
||||
package com.example.haiwei_mom.data.device;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/3/29 16:02
|
||||
*/
|
||||
public class LubricationBeen {
|
||||
|
||||
/**
|
||||
* createBy : null
|
||||
* createTime : null
|
||||
* updateBy : null
|
||||
* updateTime : null
|
||||
* remark : null
|
||||
* lubeInstanceId : 1
|
||||
* planLubeId : null
|
||||
* billsLubeCode : 1111
|
||||
* planBeginTime : null
|
||||
* realBeginTime : null
|
||||
* planEndTime : null
|
||||
* realEndTime : null
|
||||
* lubeStatus : 2
|
||||
* isFlag : null
|
||||
* lubeGroup : 23
|
||||
* lubeSupervisor : 233
|
||||
* lubeLevel : 1
|
||||
* lubeStatusStr : null
|
||||
* dmsBillsLubeDetailList : []
|
||||
*/
|
||||
|
||||
private int lubeInstanceId;
|
||||
private String billsLubeCode;
|
||||
private Long lubeStatus;
|
||||
private String lubeGroup;
|
||||
private String lubeSupervisor;
|
||||
private Long lubeLevel;
|
||||
private String lubeStatusStr;
|
||||
// 显示
|
||||
private String lubeLevelName;
|
||||
private String maintStatusStr;
|
||||
|
||||
public String getLubeLevelName() {
|
||||
if (lubeLevel == null) return "";
|
||||
if (lubeLevel == 1) {
|
||||
return "日常润滑";
|
||||
} else if (lubeLevel == 2) {
|
||||
return "月度润滑";
|
||||
} else if (lubeLevel == 3) {
|
||||
return "年度润滑";
|
||||
}
|
||||
return lubeLevelName;
|
||||
}
|
||||
|
||||
public String getMaintStatusStr() {
|
||||
if (lubeStatus == null) return "null";
|
||||
if (lubeStatus == 1) {
|
||||
return "待润滑";
|
||||
} else if (lubeStatus == 2) {
|
||||
return "润滑中";
|
||||
} else if (lubeStatus == 3) {
|
||||
return "润滑完成";
|
||||
}
|
||||
|
||||
return maintStatusStr;
|
||||
}
|
||||
|
||||
private List<LubricationDetail> dmsBillsLubeDetailList;
|
||||
|
||||
public int getLubeInstanceId() {
|
||||
return lubeInstanceId;
|
||||
}
|
||||
|
||||
public void setLubeInstanceId(int lubeInstanceId) {
|
||||
this.lubeInstanceId = lubeInstanceId;
|
||||
}
|
||||
|
||||
public String getBillsLubeCode() {
|
||||
return billsLubeCode;
|
||||
}
|
||||
|
||||
public void setBillsLubeCode(String billsLubeCode) {
|
||||
this.billsLubeCode = billsLubeCode;
|
||||
}
|
||||
|
||||
public Long getLubeStatus() {
|
||||
return lubeStatus;
|
||||
}
|
||||
|
||||
public void setLubeStatus(Long lubeStatus) {
|
||||
this.lubeStatus = lubeStatus;
|
||||
}
|
||||
|
||||
public String getLubeGroup() {
|
||||
return lubeGroup;
|
||||
}
|
||||
|
||||
public void setLubeGroup(String lubeGroup) {
|
||||
this.lubeGroup = lubeGroup;
|
||||
}
|
||||
|
||||
public String getLubeSupervisor() {
|
||||
return lubeSupervisor;
|
||||
}
|
||||
|
||||
public void setLubeSupervisor(String lubeSupervisor) {
|
||||
this.lubeSupervisor = lubeSupervisor;
|
||||
}
|
||||
|
||||
public Long getLubeLevel() {
|
||||
|
||||
return lubeLevel;
|
||||
}
|
||||
|
||||
public void setLubeLevel(Long lubeLevel) {
|
||||
this.lubeLevel = lubeLevel;
|
||||
}
|
||||
|
||||
public String getLubeStatusStr() {
|
||||
return lubeStatusStr;
|
||||
}
|
||||
|
||||
public void setLubeStatusStr(String lubeStatusStr) {
|
||||
this.lubeStatusStr = lubeStatusStr;
|
||||
}
|
||||
|
||||
public List<LubricationDetail> getDmsBillsLubeDetailList() {
|
||||
return dmsBillsLubeDetailList;
|
||||
}
|
||||
|
||||
public void setDmsBillsLubeDetailList(List<LubricationDetail> dmsBillsLubeDetailList) {
|
||||
this.dmsBillsLubeDetailList = dmsBillsLubeDetailList;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,176 @@
|
||||
package com.example.haiwei_mom.data.device;
|
||||
|
||||
import androidx.databinding.BaseObservable;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/3/29 15:54
|
||||
*/
|
||||
public class LubricationDetail extends BaseObservable {
|
||||
|
||||
/**
|
||||
* billsLubeDetailId : 1
|
||||
* lubeInstanceId : 1
|
||||
* deviceId : 1
|
||||
* lubeStationId : 1
|
||||
* lubeStandardId : 1
|
||||
* operationDescription : ddd1d
|
||||
* maintStatus : 3
|
||||
* isFlag : null
|
||||
* beginTime : null
|
||||
* endTime : null
|
||||
* typeName : 测试类型1
|
||||
* deviceCode : 22601
|
||||
* deviceName : 设备一号
|
||||
* lubeStationName : null
|
||||
* lubeProtocol : 标准1
|
||||
* lubeOperationDescription : null
|
||||
*/
|
||||
|
||||
private int billsLubeDetailId;
|
||||
private int lubeInstanceId;
|
||||
private int deviceId;
|
||||
private int lubeStationId;
|
||||
private int lubeStandardId;
|
||||
private String operationDescription;
|
||||
private Long maintStatus;
|
||||
private String typeName;
|
||||
private String deviceCode;
|
||||
private String deviceName;
|
||||
private String lubeStationName;
|
||||
private String lubeProtocol;
|
||||
private String lubeOperationDescription;
|
||||
// 显示
|
||||
private String maintStatusStr;
|
||||
private String buttonText;
|
||||
private boolean buttonVisb;
|
||||
|
||||
public boolean isButtonVisb() {
|
||||
if (maintStatus != null && maintStatus==3) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public String getButtonText() {
|
||||
if (maintStatus == null || maintStatus == 1) {
|
||||
return "开始润滑";
|
||||
}
|
||||
return "完成润滑";
|
||||
}
|
||||
public String getMaintStatusStr() {
|
||||
if (maintStatus == null){
|
||||
return "待润滑";
|
||||
} else if (maintStatus==1) {
|
||||
return "待润滑";
|
||||
} else if (maintStatus ==2) {
|
||||
return "润滑中";
|
||||
} else if (maintStatus ==3) {
|
||||
return "润滑完成";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
public int getBillsLubeDetailId() {
|
||||
return billsLubeDetailId;
|
||||
}
|
||||
|
||||
public void setBillsLubeDetailId(int billsLubeDetailId) {
|
||||
this.billsLubeDetailId = billsLubeDetailId;
|
||||
}
|
||||
|
||||
public int getLubeInstanceId() {
|
||||
return lubeInstanceId;
|
||||
}
|
||||
|
||||
public void setLubeInstanceId(int lubeInstanceId) {
|
||||
this.lubeInstanceId = lubeInstanceId;
|
||||
}
|
||||
|
||||
public int getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(int deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public int getLubeStationId() {
|
||||
return lubeStationId;
|
||||
}
|
||||
|
||||
public void setLubeStationId(int lubeStationId) {
|
||||
this.lubeStationId = lubeStationId;
|
||||
}
|
||||
|
||||
public int getLubeStandardId() {
|
||||
return lubeStandardId;
|
||||
}
|
||||
|
||||
public void setLubeStandardId(int lubeStandardId) {
|
||||
this.lubeStandardId = lubeStandardId;
|
||||
}
|
||||
|
||||
public String getOperationDescription() {
|
||||
return operationDescription;
|
||||
}
|
||||
|
||||
public void setOperationDescription(String operationDescription) {
|
||||
this.operationDescription = operationDescription;
|
||||
}
|
||||
|
||||
public Long getMaintStatus() {
|
||||
return maintStatus;
|
||||
}
|
||||
|
||||
public void setMaintStatus(Long maintStatus) {
|
||||
this.maintStatus = maintStatus;
|
||||
}
|
||||
|
||||
public String getTypeName() {
|
||||
return typeName;
|
||||
}
|
||||
|
||||
public void setTypeName(String typeName) {
|
||||
this.typeName = typeName;
|
||||
}
|
||||
|
||||
public String getDeviceCode() {
|
||||
return deviceCode;
|
||||
}
|
||||
|
||||
public void setDeviceCode(String deviceCode) {
|
||||
this.deviceCode = deviceCode;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getLubeStationName() {
|
||||
return lubeStationName;
|
||||
}
|
||||
|
||||
public void setLubeStationName(String lubeStationName) {
|
||||
this.lubeStationName = lubeStationName;
|
||||
}
|
||||
|
||||
public String getLubeProtocol() {
|
||||
return lubeProtocol;
|
||||
}
|
||||
|
||||
public void setLubeProtocol(String lubeProtocol) {
|
||||
this.lubeProtocol = lubeProtocol;
|
||||
}
|
||||
|
||||
public String getLubeOperationDescription() {
|
||||
return lubeOperationDescription;
|
||||
}
|
||||
|
||||
public void setLubeOperationDescription(String lubeOperationDescription) {
|
||||
this.lubeOperationDescription = lubeOperationDescription;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,241 @@
|
||||
package com.example.haiwei_mom.data.device;
|
||||
|
||||
import androidx.databinding.BaseObservable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/3/27 16:05
|
||||
*/
|
||||
public class MaintainDetail extends BaseObservable {
|
||||
|
||||
/**
|
||||
* createBy : null
|
||||
* createTime : null
|
||||
* updateBy : null
|
||||
* updateTime : null
|
||||
* remark : null
|
||||
* billsMaintDetailId : 18
|
||||
* maintInstanceId : 9
|
||||
* deviceId : 1
|
||||
* stationId : 2
|
||||
* maintStandardId : 2
|
||||
* operationDescription : null
|
||||
* maintStatus : null
|
||||
* isFlag : null
|
||||
* beginTime : null
|
||||
* endTime : null
|
||||
* deviceCode : 22601
|
||||
* deviceName : 设备一号
|
||||
* maintStationName : 部位2
|
||||
* maintProtocol : 2
|
||||
* maintOperationDescription : 2
|
||||
* typeName : 测试类型1
|
||||
*/
|
||||
|
||||
|
||||
private int billsMaintDetailId;
|
||||
private int maintInstanceId;
|
||||
private int deviceId;
|
||||
private int stationId;
|
||||
private int maintStandardId;
|
||||
private String operationDescription;
|
||||
private String deviceCode;
|
||||
private String deviceName;
|
||||
private String maintStationName;
|
||||
private String maintProtocol;
|
||||
private String maintOperationDescription;
|
||||
private String typeName;
|
||||
private Long maintStatus;
|
||||
private String maintStatusStr;
|
||||
// 显示数据
|
||||
private String buttonText;
|
||||
private boolean buttonVisb;
|
||||
|
||||
private List<MaintainProject> dmsBillsMaintDetailProjectList;
|
||||
|
||||
public List<MaintainProject> getDmsBillsMaintDetailProjectList() {
|
||||
return dmsBillsMaintDetailProjectList;
|
||||
}
|
||||
|
||||
public void setDmsBillsMaintDetailProjectList(List<MaintainProject> dmsBillsMaintDetailProjectList) {
|
||||
this.dmsBillsMaintDetailProjectList = dmsBillsMaintDetailProjectList;
|
||||
}
|
||||
|
||||
public String getButtonText() {
|
||||
try {
|
||||
if ( maintStatus !=3) {
|
||||
return "开始保养";
|
||||
}
|
||||
}catch (Exception exception){
|
||||
return "子表maintStatus报错";
|
||||
}
|
||||
|
||||
// return "完成保养";
|
||||
return "查看保养";
|
||||
|
||||
|
||||
}
|
||||
|
||||
public Long getMaintStatus() {
|
||||
return maintStatus;
|
||||
}
|
||||
|
||||
public void setMaintStatus(Long maintStatus) {
|
||||
this.maintStatus = maintStatus;
|
||||
}
|
||||
|
||||
public boolean isButtonVisb() {
|
||||
if (maintStatus != null && maintStatus==3) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getMaintStatusStr() {
|
||||
if (maintStatus == null){
|
||||
return "待保养";
|
||||
} else if (maintStatus==1) {
|
||||
return "待保养";
|
||||
} else if (maintStatus ==2) {
|
||||
return "保养中";
|
||||
} else if (maintStatus ==3) {
|
||||
return "保养完成";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public int getBillsMaintDetailId() {
|
||||
return billsMaintDetailId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setMaintStatusStr(String maintStatusStr) {
|
||||
this.maintStatusStr = maintStatusStr;
|
||||
}
|
||||
|
||||
public void setButtonText(String buttonText) {
|
||||
this.buttonText = buttonText;
|
||||
}
|
||||
|
||||
public void setButtonVisb(boolean buttonVisb) {
|
||||
this.buttonVisb = buttonVisb;
|
||||
}
|
||||
|
||||
public void setBillsMaintDetailId(int billsMaintDetailId) {
|
||||
this.billsMaintDetailId = billsMaintDetailId;
|
||||
}
|
||||
|
||||
public int getMaintInstanceId() {
|
||||
return maintInstanceId;
|
||||
}
|
||||
|
||||
public void setMaintInstanceId(int maintInstanceId) {
|
||||
this.maintInstanceId = maintInstanceId;
|
||||
}
|
||||
|
||||
public int getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(int deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public int getStationId() {
|
||||
return stationId;
|
||||
}
|
||||
|
||||
public void setStationId(int stationId) {
|
||||
this.stationId = stationId;
|
||||
}
|
||||
|
||||
public int getMaintStandardId() {
|
||||
return maintStandardId;
|
||||
}
|
||||
|
||||
public void setMaintStandardId(int maintStandardId) {
|
||||
this.maintStandardId = maintStandardId;
|
||||
}
|
||||
|
||||
public String getOperationDescription() {
|
||||
return operationDescription;
|
||||
}
|
||||
|
||||
public void setOperationDescription(String operationDescription) {
|
||||
this.operationDescription = operationDescription;
|
||||
}
|
||||
|
||||
public String getDeviceCode() {
|
||||
return deviceCode;
|
||||
}
|
||||
|
||||
public void setDeviceCode(String deviceCode) {
|
||||
this.deviceCode = deviceCode;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getMaintStationName() {
|
||||
return maintStationName;
|
||||
}
|
||||
|
||||
public void setMaintStationName(String maintStationName) {
|
||||
this.maintStationName = maintStationName;
|
||||
}
|
||||
|
||||
public String getMaintProtocol() {
|
||||
return maintProtocol;
|
||||
}
|
||||
|
||||
public void setMaintProtocol(String maintProtocol) {
|
||||
this.maintProtocol = maintProtocol;
|
||||
}
|
||||
|
||||
public String getMaintOperationDescription() {
|
||||
return maintOperationDescription;
|
||||
}
|
||||
|
||||
public void setMaintOperationDescription(String maintOperationDescription) {
|
||||
this.maintOperationDescription = maintOperationDescription;
|
||||
}
|
||||
|
||||
public String getTypeName() {
|
||||
return typeName;
|
||||
}
|
||||
|
||||
public void setTypeName(String typeName) {
|
||||
this.typeName = typeName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MaintainDetail{" +
|
||||
"billsMaintDetailId=" + billsMaintDetailId +
|
||||
", maintInstanceId=" + maintInstanceId +
|
||||
", deviceId=" + deviceId +
|
||||
", stationId=" + stationId +
|
||||
", maintStandardId=" + maintStandardId +
|
||||
", operationDescription='" + operationDescription + '\'' +
|
||||
", deviceCode='" + deviceCode + '\'' +
|
||||
", deviceName='" + deviceName + '\'' +
|
||||
", maintStationName='" + maintStationName + '\'' +
|
||||
", maintProtocol='" + maintProtocol + '\'' +
|
||||
", maintOperationDescription='" + maintOperationDescription + '\'' +
|
||||
", typeName='" + typeName + '\'' +
|
||||
", maintStatus='" + maintStatus + '\'' +
|
||||
", maintStatusStr='" + getMaintStatusStr() + '\'' +
|
||||
", buttonText='" + buttonText + '\'' +
|
||||
", buttonVisb=" + buttonVisb +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.example.haiwei_mom.data.device;
|
||||
|
||||
import androidx.databinding.BaseObservable;
|
||||
|
||||
public class MaintainProject extends BaseObservable {
|
||||
|
||||
private String remark;
|
||||
private int maintDetailProjectId;
|
||||
private int billsMaintDetailId;
|
||||
private int maintProjectId;
|
||||
private String maintProjectName;
|
||||
private String maintProjectDesc;
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public int getMaintDetailProjectId() {
|
||||
return maintDetailProjectId;
|
||||
}
|
||||
|
||||
public void setMaintDetailProjectId(int maintDetailProjectId) {
|
||||
this.maintDetailProjectId = maintDetailProjectId;
|
||||
}
|
||||
|
||||
public int getBillsMaintDetailId() {
|
||||
return billsMaintDetailId;
|
||||
}
|
||||
|
||||
public void setBillsMaintDetailId(int billsMaintDetailId) {
|
||||
this.billsMaintDetailId = billsMaintDetailId;
|
||||
}
|
||||
|
||||
public int getMaintProjectId() {
|
||||
return maintProjectId;
|
||||
}
|
||||
|
||||
public void setMaintProjectId(int maintProjectId) {
|
||||
this.maintProjectId = maintProjectId;
|
||||
}
|
||||
|
||||
public String getMaintProjectName() {
|
||||
return maintProjectName;
|
||||
}
|
||||
|
||||
public void setMaintProjectName(String maintProjectName) {
|
||||
this.maintProjectName = maintProjectName;
|
||||
}
|
||||
|
||||
public String getMaintProjectDesc() {
|
||||
return maintProjectDesc;
|
||||
}
|
||||
|
||||
public void setMaintProjectDesc(String maintProjectDesc) {
|
||||
this.maintProjectDesc = maintProjectDesc;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package com.example.haiwei_mom.data.device;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/4/1 14:02
|
||||
* 外协单位
|
||||
*/
|
||||
public class Outsourcing {
|
||||
|
||||
/**
|
||||
* outsrcId : 1
|
||||
* outsrcCode : code0001
|
||||
* outsrcName : 青岛软控
|
||||
*/
|
||||
|
||||
private int outsrcId;
|
||||
private String outsrcCode;
|
||||
private String outsrcName;
|
||||
|
||||
public int getOutsrcId() {
|
||||
return outsrcId;
|
||||
}
|
||||
|
||||
public void setOutsrcId(int outsrcId) {
|
||||
this.outsrcId = outsrcId;
|
||||
}
|
||||
|
||||
public String getOutsrcCode() {
|
||||
return outsrcCode;
|
||||
}
|
||||
|
||||
public void setOutsrcCode(String outsrcCode) {
|
||||
this.outsrcCode = outsrcCode;
|
||||
}
|
||||
|
||||
public String getOutsrcName() {
|
||||
return outsrcName;
|
||||
}
|
||||
|
||||
public void setOutsrcName(String outsrcName) {
|
||||
this.outsrcName = outsrcName;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,271 @@
|
||||
package com.example.haiwei_mom.device;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ListPopupWindow;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.adapter.check.DisposalFileAdapter;
|
||||
import com.example.haiwei_mom.base.BaseActivity;
|
||||
import com.example.haiwei_mom.base.MyRecultCall;
|
||||
import com.example.haiwei_mom.base.MyResult;
|
||||
import com.example.haiwei_mom.databinding.ActivityBxBinding;
|
||||
import com.example.haiwei_mom.dialog.ImgDialog;
|
||||
import com.example.haiwei_mom.data.check.CheckInstanceFiles;
|
||||
import com.example.haiwei_mom.data.device.BxSubmitBeen;
|
||||
import com.example.haiwei_mom.data.device.DeviceBeen;
|
||||
import com.example.haiwei_mom.data.device.Dict;
|
||||
import com.example.haiwei_mom.data.device.Outsourcing;
|
||||
import com.example.haiwei_mom.uitls.SharedPreferencesUtils;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.model.Response;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* 故障报修
|
||||
*/
|
||||
public class BxActivity extends BaseActivity implements DisposalFileAdapter.ItemClickCall {
|
||||
private DisposalFileAdapter adapter;
|
||||
private List<CheckInstanceFiles> filesList;
|
||||
private List<File> files;
|
||||
private BxSubmitBeen been;
|
||||
private ActivityBxBinding binding;
|
||||
private ListPopupWindow lpw;
|
||||
private ListPopupWindow deviceCodeLpw;
|
||||
private ArrayList<String> designList;
|
||||
private ImgDialog imgDialog;
|
||||
private boolean aBoolean;
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = DataBindingUtil.setContentView(this, R.layout.activity_bx);
|
||||
adapter = new DisposalFileAdapter(this, this);
|
||||
filesList = new ArrayList<>();
|
||||
files = new ArrayList<>();
|
||||
adapter.setList(filesList);
|
||||
binding.setAdapter1(adapter);
|
||||
been = new BxSubmitBeen();
|
||||
outStrRequest();
|
||||
binding.setVm(been);
|
||||
initSlectLpw();
|
||||
initRequestLpw();
|
||||
imgDialog = new ImgDialog(this);
|
||||
|
||||
}
|
||||
|
||||
private void initSlectLpw() {
|
||||
deviceCodeLpw = new ListPopupWindow(this);
|
||||
deviceCodeLpw.setAnchorView(binding.selectNameView);
|
||||
deviceCodeLpw.setOnItemClickListener((parent, view, position, id) -> {
|
||||
var deviceBeen = list.get(position);
|
||||
been.setDeviceld(deviceBeen.getDeviceId());
|
||||
binding.setDevice(deviceBeen);
|
||||
aBoolean = true;
|
||||
deviceCodeLpw.dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
private void initRequestLpw() {
|
||||
initRequest("dms_fault_type");
|
||||
lpw = new ListPopupWindow(this);
|
||||
lpw.setAnchorView(binding.bxDesOpe);
|
||||
designList = new ArrayList<>();
|
||||
aBoolean = false;
|
||||
initRequest("dms_device_design_operations");
|
||||
lpw.setOnItemClickListener((parent, view, position, id) -> {
|
||||
var designOperations = been.getDesignOperations();
|
||||
var addStr = designList.get(position);
|
||||
if (designOperations != null && designOperations.contains(addStr)) {
|
||||
String tagStr = null;
|
||||
if (designOperations.indexOf(addStr) == 0) {
|
||||
tagStr = addStr + ",";
|
||||
} else {
|
||||
tagStr = "," + addStr;
|
||||
}
|
||||
designOperations = designOperations.replace(tagStr, "")
|
||||
.replace(addStr, "");
|
||||
been.setDesignOperations(designOperations);
|
||||
} else {
|
||||
been.setDesignOperations(Optional.ofNullable(designOperations).map(t -> t.isEmpty() ? t : t + ",").orElse("") + addStr);
|
||||
}
|
||||
|
||||
lpw.dismiss();
|
||||
});
|
||||
binding.bxDesOpe.setOnTouchListener((v, event) -> {
|
||||
int clickX = (int) event.getX();
|
||||
if (clickX > 450) {
|
||||
lpw.show();
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 查询外协
|
||||
private void outStrRequest() {
|
||||
OkGo.<MyResult>get(url + "/dms/mobile/getOutsrcInfos").tag(this)
|
||||
.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;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 维修
|
||||
private void initRequest(String uri) {
|
||||
OkGo.<MyResult>get(url + "/system/dict/data/type/" + uri).tag(this)
|
||||
.execute(new MyRecultCall(dialog, this) {
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var body = response.body();
|
||||
if (body.getCode() == 200) {
|
||||
List<Dict> list = gson.fromJson(body.getData().toString(), new TypeToken<List<Dict>>() {
|
||||
}.getType());
|
||||
|
||||
if (uri.equals("dms_fault_type")) {
|
||||
been.setFaultTypeList(list);
|
||||
} else {
|
||||
list.forEach(t -> designList.add(t.getDictLabel()));
|
||||
lpw.setAdapter(new ArrayAdapter<>(context,
|
||||
androidx.appcompat.R.layout.support_simple_spinner_dropdown_item,
|
||||
designList));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
@Override
|
||||
public void onClick(int position, boolean type) {
|
||||
if (type) {
|
||||
imgDialog.setRawReturn(filesList.get(position).getFaultFile());
|
||||
return;
|
||||
}
|
||||
filesList.remove(position);
|
||||
files.remove(position);
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public void bxTackphoto(View view) {
|
||||
try {
|
||||
teke_photo();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
@Override
|
||||
public void tekePhotoResult(String fileUrl, File file) {
|
||||
super.tekePhotoResult(fileUrl, file);
|
||||
CheckInstanceFiles checkInstanceFiles = new CheckInstanceFiles();
|
||||
checkInstanceFiles.setFaultFile(fileUrl);
|
||||
checkInstanceFiles.setState(true);
|
||||
filesList.add(checkInstanceFiles);
|
||||
adapter.notifyDataSetChanged();
|
||||
files.add(file);
|
||||
}
|
||||
|
||||
private List<DeviceBeen> list;
|
||||
|
||||
// 模糊查询
|
||||
public void bxSelect(View view) {
|
||||
OkGo.<MyResult>get(url + "/dms/mobile/likeDeviceName").tag(this)
|
||||
.params("deviceName", been.getSelectName())
|
||||
.execute(new MyRecultCall(dialog, this) {
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var body = response.body();
|
||||
if (body.getCode() == 200) {
|
||||
list = gson.fromJson(body.getData().toString(), new TypeToken<List<DeviceBeen>>() {
|
||||
}.getType());
|
||||
if (list == null || list.isEmpty()) {
|
||||
aBoolean = false;
|
||||
return;
|
||||
}
|
||||
List<String> tagList = new ArrayList<>(list.size());
|
||||
list.forEach(deviceBeen -> tagList.add(deviceBeen.getDeviceName()));
|
||||
deviceCodeLpw.setAdapter(new ArrayAdapter<>(context,
|
||||
androidx.appcompat.R.layout.support_simple_spinner_dropdown_item,
|
||||
tagList));
|
||||
deviceCodeLpw.show();
|
||||
|
||||
} else {
|
||||
binding.setDevice(null);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void bxSelectCode(String code) {
|
||||
OkGo.<MyResult>get(url + "/dms/mobile/getDeviceByDeviceCode/" + code).tag(this)
|
||||
.execute(new MyRecultCall(dialog, this) {
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var body = response.body();
|
||||
aBoolean = (body.getCode() == 200);
|
||||
if (aBoolean) {
|
||||
DeviceBeen deviceBeen = gson.fromJson(body.getData().toString(), DeviceBeen.class);
|
||||
been.setDeviceld(deviceBeen.getDeviceId());
|
||||
binding.setDevice(deviceBeen);
|
||||
} else {
|
||||
binding.setDevice(null);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void bxSubmit(View view) {
|
||||
if (!aBoolean) {
|
||||
myToastUitls.show("数据异常,提交失败");
|
||||
return;
|
||||
}
|
||||
OkGo.<MyResult>post(url + "/dms/mobile/insertFaultInstsanceActivity")
|
||||
.params("deviceId", been.getDeviceld())
|
||||
.params("faultType", been.getFaultType())
|
||||
.params("faultDescription", been.getFaultDescription())
|
||||
.params("designOperations", been.getDesignOperations())
|
||||
.params("repairType", been.getRepairType())
|
||||
.params("outsrcId", been.getOutsrcld())
|
||||
.addFileParams("files", files)
|
||||
.execute(new MyRecultCall(dialog, this) {
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var body = response.body();
|
||||
if (body.getCode() == 200) {
|
||||
finish();
|
||||
}
|
||||
myToastUitls.show(body.getMsg());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.example.haiwei_mom.device;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.adapter.ItemClickCall;
|
||||
import com.example.haiwei_mom.adapter.device.DeviceInspectiontAdapter;
|
||||
import com.example.haiwei_mom.base.BaseActivity;
|
||||
import com.example.haiwei_mom.base.MyRecultCall;
|
||||
import com.example.haiwei_mom.base.MyResult;
|
||||
import com.example.haiwei_mom.databinding.ActivityDeviceCheckBinding;
|
||||
import com.example.haiwei_mom.data.device.DeviceInspection;
|
||||
import com.example.haiwei_mom.data.device.DeviceInspectionDetail;
|
||||
import com.example.haiwei_mom.uitls.SharedPreferencesUtils;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.model.Response;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DeviceCheckActivity extends BaseActivity implements ItemClickCall {
|
||||
private DeviceInspection deviceInspection;
|
||||
private List<DeviceInspectionDetail> list;
|
||||
private DeviceInspectiontAdapter adapter;
|
||||
|
||||
private ActivityDeviceCheckBinding binding;
|
||||
private Intent intent;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = DataBindingUtil.setContentView(this,R.layout.activity_device_check);
|
||||
adapter=new DeviceInspectiontAdapter(this,this);
|
||||
binding.setAdapter(adapter);
|
||||
|
||||
intent=new Intent(this, DeviceCheckInfoActivity.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
initRequest();
|
||||
}
|
||||
|
||||
private void initRequest() {
|
||||
OkGo.<MyResult>get(url+ "/dms/mobile/getNewestInspectInstance").tag(this)
|
||||
.params("inspectType",1/*getIntent().getStringExtra("inspectType")*/)
|
||||
.execute(new MyRecultCall(dialog, this) {
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var body = response.body();
|
||||
if (body.getCode() == 200) {
|
||||
deviceInspection= gson.fromJson(body.getData().toString(), DeviceInspection.class);
|
||||
binding.setVm(deviceInspection);
|
||||
list=deviceInspection.getDmsInspectInstanceDetailList();
|
||||
adapter.setList(list);
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(int position) {
|
||||
|
||||
}
|
||||
|
||||
public void deviceCheckSelect(View view){
|
||||
|
||||
}
|
||||
public void deviceCheckStart(View view){
|
||||
var code = binding.inspectionDeviceCode.getText().toString().trim();
|
||||
if (code==null || code.isEmpty()) return;
|
||||
OkGo.<MyResult>get(url+ "/dms/mobile/scanInspectInstanceDetail").tag(this)
|
||||
.params("inspectInstanceId",deviceInspection.getInspectInstanceId())
|
||||
.params("deviceCode",code)
|
||||
.execute(new MyRecultCall(dialog, this) {
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var body = response.body();
|
||||
if (body.getCode() == 200) {
|
||||
intent.putExtra("json",body.getData().toString());
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.example.haiwei_mom.device;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.adapter.device.DeviceInspectionInfoAdapter;
|
||||
import com.example.haiwei_mom.base.BaseActivity;
|
||||
import com.example.haiwei_mom.base.MyRecultCall;
|
||||
import com.example.haiwei_mom.base.MyResult;
|
||||
import com.example.haiwei_mom.databinding.ActivityDeviceCheckInfoBinding;
|
||||
import com.example.haiwei_mom.data.device.DeviceInspectionDetail;
|
||||
import com.example.haiwei_mom.uitls.SharedPreferencesUtils;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.model.Response;
|
||||
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
public class DeviceCheckInfoActivity extends BaseActivity {
|
||||
private DeviceInspectionDetail detail;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
ActivityDeviceCheckInfoBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_device_check_info);
|
||||
detail = gson.fromJson(getIntent().getStringExtra("json"), DeviceInspectionDetail.class);
|
||||
binding.setVm(detail);
|
||||
var list = detail.getDmsInspectInstanceDetailProjectList();
|
||||
// Log.e("TAG", "onCreate:" + list.toString());
|
||||
DeviceInspectionInfoAdapter adapter =new DeviceInspectionInfoAdapter(this,list);
|
||||
binding.setAdapter(adapter);
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
public void deviceCheckInfoSubmit(View view){
|
||||
OkGo.<MyResult>post(url+"/dms/mobile/saveInspectInstanceDetail")
|
||||
.upRequestBody(RequestBody.create(JSON,gson.toJson(detail)))
|
||||
.execute(new MyRecultCall(dialog,this){
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var body = response.body();
|
||||
if (body.getCode()==200){
|
||||
finish();
|
||||
}
|
||||
myToastUitls.show( body.getMsg());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,423 @@
|
||||
package com.example.haiwei_mom.device;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ListPopupWindow;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.adapter.check.DisposalFileAdapter;
|
||||
import com.example.haiwei_mom.adapter.device.DeviceRepairPartAdapter;
|
||||
import com.example.haiwei_mom.base.BaseActivity;
|
||||
import com.example.haiwei_mom.base.MyRecultCall;
|
||||
import com.example.haiwei_mom.base.MyResult;
|
||||
import com.example.haiwei_mom.databinding.ActivityDeviceRepairInfoBinding;
|
||||
import com.example.haiwei_mom.dialog.ImgDialog;
|
||||
import com.example.haiwei_mom.dialog.RepairPartAddDialog;
|
||||
import com.example.haiwei_mom.data.check.CheckInstanceFiles;
|
||||
import com.example.haiwei_mom.data.device.DeviceRepair;
|
||||
import com.example.haiwei_mom.data.device.DeviceRepairPart;
|
||||
import com.example.haiwei_mom.data.device.Dict;
|
||||
import com.example.haiwei_mom.data.device.Outsourcing;
|
||||
import com.example.haiwei_mom.uitls.SharedPreferencesUtils;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.model.Response;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
public class DeviceRepairInfoActivity extends BaseActivity {
|
||||
|
||||
private ImgDialog imgDialog;
|
||||
private DisposalFileAdapter fileAdapter;
|
||||
private ActivityDeviceRepairInfoBinding binding;
|
||||
private DeviceRepair deviceRepair;// 显示数据
|
||||
private boolean activityType;// 活动状态 true修改 false查看
|
||||
private ListPopupWindow faultTypeLpw;
|
||||
private ListPopupWindow opeLpw;
|
||||
private List<Dict> faultList;
|
||||
private List<Dict> opeList;
|
||||
// 图片
|
||||
private List<File> submitFileList;
|
||||
private List<CheckInstanceFiles> filesList;
|
||||
private int fileTagIndex = 0;
|
||||
// 维修部件
|
||||
private DeviceRepairPartAdapter deviceRepairPartAdapter;
|
||||
private RepairPartAddDialog repairPartAddDialog;// 添加
|
||||
// 维修完成拍照
|
||||
private List<CheckInstanceFiles> overRepairLookList;// 显示列表
|
||||
private DisposalFileAdapter fileAdapter2;
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = DataBindingUtil.setContentView(this, R.layout.activity_device_repair_info);
|
||||
var intent = getIntent();
|
||||
activityType = intent.getBooleanExtra("activityType", false);
|
||||
binding.setVisState(activityType);
|
||||
// 主要
|
||||
deviceRepair = gson.fromJson(intent.getStringExtra("json"), DeviceRepair.class);
|
||||
initfaultTypeSelect();
|
||||
initopeSelect();
|
||||
initRequest("dms_fault_type");
|
||||
binding.setVm(deviceRepair); // 显示数据
|
||||
deviceRepair.repairTypeSelect(deviceRepair.getRepairType());// 显示维修类型
|
||||
if (activityType) { // 报修修改
|
||||
initRequest("dms_device_design_operations");
|
||||
|
||||
} else {// 显示完成
|
||||
var billsStatus = deviceRepair.getBillsStatus();
|
||||
if (billsStatus.equals("0")) {
|
||||
if (deviceRepair.getApproveStatus() != null && deviceRepair.getApproveStatus().equals("2")) {
|
||||
binding.setStartState(true);
|
||||
}
|
||||
} else if (billsStatus.equals("1")) {
|
||||
binding.setSubmitState(true);
|
||||
binding.setOverState(true);
|
||||
} else if (billsStatus.equals("2")) {
|
||||
binding.setSubmitState(true);
|
||||
}
|
||||
|
||||
|
||||
deviceRepairPartAdapter = new DeviceRepairPartAdapter(this, position -> {
|
||||
deviceRepair.getParts().remove(position);
|
||||
deviceRepairPartAdapter.notifyDataSetChanged();
|
||||
});
|
||||
deviceRepairPartAdapter.setList(deviceRepair.getParts());
|
||||
binding.setPartAdapter(deviceRepairPartAdapter);
|
||||
repairPartAddDialog = new RepairPartAddDialog(this, deviceRepairPart -> {
|
||||
DeviceRepairPart addTag = new DeviceRepairPart();
|
||||
addTag.setAmount(deviceRepairPart.getAmount());
|
||||
addTag.setPartName(deviceRepairPart.getPartName());
|
||||
addTag.setPartSpecifications(deviceRepairPart.getPartSpecifications());
|
||||
deviceRepair.getParts().add(addTag);
|
||||
repairPartAddDialog.dismiss();
|
||||
deviceRepairPartAdapter.notifyDataSetChanged();
|
||||
});
|
||||
// 显示维修完成的图片
|
||||
var dmsInstanceFiles1 = deviceRepair.getDmsInstanceFiles1();
|
||||
overRepairLookList = new ArrayList<>();
|
||||
if (dmsInstanceFiles1 != null && !dmsInstanceFiles1.isEmpty()) {
|
||||
dmsInstanceFiles1.stream().forEach(t -> {
|
||||
CheckInstanceFiles files = new CheckInstanceFiles();
|
||||
files.setFaultFile(t.getFilePath());
|
||||
files.setState(false);
|
||||
overRepairLookList.add(files);
|
||||
});
|
||||
}
|
||||
|
||||
// 维修完成的图片
|
||||
|
||||
fileAdapter2 = new DisposalFileAdapter(this, (position, type) -> {
|
||||
CheckInstanceFiles checkInstanceFiles = overRepairLookList.get(position);
|
||||
if (type) {
|
||||
imgDialog.setRawReturn(checkInstanceFiles.getFaultFile());
|
||||
return;
|
||||
}
|
||||
overRepairLookList.remove(position);
|
||||
try {
|
||||
int index = position - fileTagIndex;
|
||||
Log.e("TAG", "file List delete:" + index);
|
||||
submitFileList.get(index).delete();
|
||||
submitFileList.remove(index);
|
||||
} catch (Exception er) {
|
||||
er.printStackTrace();
|
||||
}
|
||||
|
||||
fileAdapter2.notifyDataSetChanged();
|
||||
});
|
||||
fileAdapter2.setList(overRepairLookList);
|
||||
fileAdapter2.notifyDataSetChanged();
|
||||
binding.setAdapter2(fileAdapter2);
|
||||
}
|
||||
|
||||
outStrRequest(); // 查询外协
|
||||
|
||||
initFile(); // 初始化图片
|
||||
|
||||
}
|
||||
|
||||
private void initopeSelect() {
|
||||
opeLpw = new ListPopupWindow(context);
|
||||
opeLpw.setAnchorView(binding.operations);
|
||||
opeLpw.setOnItemClickListener((parent, view, position, id) -> {
|
||||
String designOperations = deviceRepair.getDesignOperations();
|
||||
var addStr = opeList.get(position).getDictLabel();
|
||||
if (designOperations != null && designOperations.contains(addStr)) {
|
||||
String tagStr = null;
|
||||
if (designOperations.indexOf(addStr) == 0) {
|
||||
tagStr = addStr + ",";
|
||||
} else {
|
||||
tagStr = "," + addStr;
|
||||
}
|
||||
designOperations = designOperations.replace(tagStr, "").replace(addStr, "");
|
||||
deviceRepair.setDesignOperations(designOperations);
|
||||
} else {
|
||||
deviceRepair.setDesignOperations(Optional.ofNullable(designOperations).map(t -> t.isEmpty() ? t : t + ",").orElse("") + addStr);
|
||||
}
|
||||
opeLpw.dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
private void initfaultTypeSelect() {
|
||||
faultTypeLpw = new ListPopupWindow(context);
|
||||
faultTypeLpw.setAnchorView(binding.faultType);
|
||||
faultTypeLpw.setOnItemClickListener((parent, view, position, id) -> {
|
||||
Dict dict = faultList.get(position);
|
||||
deviceRepair.setFaultSourceTypeName(dict.getDictLabel());
|
||||
Log.e("TAG", "onCreate:" + dict.getDictValue());
|
||||
deviceRepair.setFaultSourceType(dict.getDictValue());
|
||||
faultTypeLpw.dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
private void initFile() {
|
||||
fileAdapter = new DisposalFileAdapter(this, (position, type) -> {
|
||||
CheckInstanceFiles checkInstanceFiles = filesList.get(position);
|
||||
if (type) {
|
||||
imgDialog.setRawReturn(checkInstanceFiles.getFaultFile());
|
||||
return;
|
||||
}
|
||||
filesList.remove(position);
|
||||
try {
|
||||
int index = position - fileTagIndex;
|
||||
Log.e("TAG", "file List delete:" + index);
|
||||
submitFileList.get(index).delete();
|
||||
submitFileList.remove(index);
|
||||
} catch (Exception er) {
|
||||
er.printStackTrace();
|
||||
}
|
||||
|
||||
fileAdapter.notifyDataSetChanged();
|
||||
});
|
||||
filesList = new ArrayList<>();
|
||||
submitFileList = new ArrayList<>();
|
||||
var dmsInstanceFiles = deviceRepair.getDmsInstanceFiles();
|
||||
if (dmsInstanceFiles != null && !dmsInstanceFiles.isEmpty()) {
|
||||
dmsInstanceFiles.forEach(t -> {
|
||||
CheckInstanceFiles files = new CheckInstanceFiles();
|
||||
files.setFaultFile(t.getFilePath());
|
||||
files.setState(false);
|
||||
filesList.add(files);
|
||||
});
|
||||
fileTagIndex = filesList.size();
|
||||
}
|
||||
fileAdapter.setList(filesList);
|
||||
binding.setAdapter1(fileAdapter);
|
||||
imgDialog = new ImgDialog(this);
|
||||
}
|
||||
|
||||
// 查询故障 和 ope接口
|
||||
private void initRequest(String uri) {
|
||||
OkGo.<MyResult>get(url + "/system/dict/data/type/" + uri).tag(this)
|
||||
.execute(new MyRecultCall(dialog, this) {
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var body = response.body();
|
||||
if (body.getCode() == 200) {
|
||||
List<Dict> list = gson.fromJson(body.getData().toString(), new TypeToken<List<Dict>>() {
|
||||
}.getType());
|
||||
List<String> strings = new ArrayList<>();
|
||||
list.forEach(t -> strings.add(t.getDictLabel()));
|
||||
if (uri.equals("dms_fault_type")) {
|
||||
// 显示故障类别
|
||||
String faultSourceType = deviceRepair.getFaultSourceType();
|
||||
if (faultSourceType != null) {
|
||||
Optional<String> s = list.stream().filter(t -> t.getDictValue().equals(faultSourceType)).findFirst().map(Dict::getDictLabel);
|
||||
deviceRepair.setFaultSourceTypeName(s.get());
|
||||
}
|
||||
if (activityType) {
|
||||
faultList = new ArrayList<>();
|
||||
faultList.addAll(list);
|
||||
faultTypeLpw.setAdapter(new ArrayAdapter<>(context, androidx.appcompat.R.layout.support_simple_spinner_dropdown_item, strings));
|
||||
}
|
||||
} else {
|
||||
opeList = new ArrayList<>();
|
||||
opeList.addAll(list);
|
||||
opeLpw.setAdapter(new ArrayAdapter<>(context, androidx.appcompat.R.layout.support_simple_spinner_dropdown_item, strings));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 开始维修
|
||||
public void startRepair(View view) {
|
||||
String deviceCodeTag = deviceRepair.getDeviceCodeTag();
|
||||
if (deviceCodeTag == null) {
|
||||
myToastUitls.show("数据异常");
|
||||
return;
|
||||
}
|
||||
if (!deviceRepair.getDeviceCode().equals(deviceCodeTag)) {
|
||||
myToastUitls.show("设备扫描错误");
|
||||
return;
|
||||
}
|
||||
OkGo.<MyResult>post(url + "/dms/mobile/startRepair").headers("Authorization", SharedPreferencesUtils.getstring("access_token", "")).upRequestBody(RequestBody.create(JSON, gson.toJson(deviceRepair))).execute(new MyRecultCall(dialog, this) {
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
if (response.body().getCode() == 200) {
|
||||
binding.setSubmitState(true);
|
||||
binding.setOverState(true);
|
||||
binding.setStartState(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 完成维修
|
||||
public void endRepair(View view) {
|
||||
// try {
|
||||
// Log.e("TAG", "repairInstanceId" + deviceRepair.getRepairInstanceId());
|
||||
// Log.e("TAG", "instanceActivityId" + deviceRepair.getInstanceActivityId());
|
||||
|
||||
OkGo.<MyResult>post(url + "/dms/mobile/completeRepair")
|
||||
.params("repairInstanceId", deviceRepair.getRepairInstanceId())
|
||||
.params("instanceActivityId", deviceRepair.getInstanceActivityId())
|
||||
.params("designOperations", deviceRepair.getDesignOperations())
|
||||
.params("faultType", deviceRepair.getFaultSourceType())
|
||||
.params("processHandleResolution", deviceRepair.getProcessHandleResolution())
|
||||
.params("repairType", deviceRepair.getRepairType())
|
||||
.params("outsrcId", deviceRepair.getOutsrcId())
|
||||
.params("repairContent", deviceRepair.getRepairContent())
|
||||
.params("protectedMethod", deviceRepair.getProtectedMethod())
|
||||
.params("repairer", SharedPreferencesUtils.getstring("user", ""))
|
||||
.params("parts1", gson.toJson(deviceRepair.getParts()))
|
||||
.addFileParams("files", submitFileList)
|
||||
.execute(new MyRecultCall(dialog, this) {
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
MyResult body = response.body();
|
||||
if (body.getCode() == 200) {
|
||||
submitFileList.forEach(File::delete);
|
||||
finish();
|
||||
} else {
|
||||
myToastUitls.show(body.getMsg());
|
||||
}
|
||||
}
|
||||
});
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
// 选择故障类别
|
||||
public void selectFaultType(View view) {
|
||||
faultTypeLpw.show();
|
||||
}
|
||||
|
||||
// 选择涉及操作
|
||||
public void selectOperation(View view) {
|
||||
opeLpw.show();
|
||||
}
|
||||
|
||||
// 查询外协
|
||||
private void outStrRequest() {
|
||||
OkGo.<MyResult>get(url + "/dms/mobile/getOutsrcInfos").tag(this)
|
||||
.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());
|
||||
deviceRepair.setOutsourcingList(outsourcingList);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 拍照
|
||||
public void updateTackphoto(View view) {
|
||||
try {
|
||||
teke_photo();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
// 拍照 维修完成
|
||||
public void overRepairTackphoto(View view) {
|
||||
try {
|
||||
teke_photo();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
// 拍照回传
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
@Override
|
||||
public void tekePhotoResult(String fileUrl, File file) {
|
||||
super.tekePhotoResult(fileUrl, file);
|
||||
CheckInstanceFiles checkInstanceFiles = new CheckInstanceFiles();
|
||||
checkInstanceFiles.setFaultFile(fileUrl);
|
||||
checkInstanceFiles.setState(true);
|
||||
submitFileList.add(file);
|
||||
if (activityType) {
|
||||
// 修改时添加到上方
|
||||
filesList.add(checkInstanceFiles);
|
||||
fileAdapter.notifyDataSetChanged();
|
||||
|
||||
} else {
|
||||
// 查看时,添加到维修完成的列表
|
||||
overRepairLookList.add(checkInstanceFiles);
|
||||
fileAdapter2.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 提交修改 维修工单
|
||||
public void submitUpdateRepair(View view) {
|
||||
Log.e("TAG", "submitUpdateRepair:" + deviceRepair.getInstanceActivityId());
|
||||
int repairType = deviceRepair.getRepairType();
|
||||
OkGo.<MyResult>post(url + "/dms/mobile/updateFaultInstanceActivity")
|
||||
.params("instanceActivityId", deviceRepair.getInstanceActivityId())
|
||||
.params("faultSourceType", deviceRepair.getFaultSourceType())
|
||||
.params("faultDescription", deviceRepair.getFaultDescription())
|
||||
.params("designOperations", deviceRepair.getDesignOperations())
|
||||
.params("repairType", repairType)
|
||||
.params("checkedFault", deviceRepair.getCheckedFault())
|
||||
.params("outsrcId", deviceRepair.getOutsrcId())
|
||||
.addFileParams("files", submitFileList).execute(new MyRecultCall(dialog, this) {
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var body = response.body();
|
||||
if (body.getCode() == 200) {
|
||||
if (!submitFileList.isEmpty()) {
|
||||
submitFileList.forEach(File::delete);
|
||||
}
|
||||
finish();
|
||||
}
|
||||
myToastUitls.show(body.getMsg());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void addRepairPart(View view) {
|
||||
repairPartAddDialog.show();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
package com.example.haiwei_mom.device;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.adapter.device.DeviceRepairListAdapter;
|
||||
import com.example.haiwei_mom.base.BaseActivity;
|
||||
import com.example.haiwei_mom.base.MyRecultCall;
|
||||
import com.example.haiwei_mom.base.MyResult;
|
||||
import com.example.haiwei_mom.databinding.ActivityDeviceRepairListBinding;
|
||||
import com.example.haiwei_mom.data.device.DeviceRepair;
|
||||
import com.example.haiwei_mom.uitls.SharedPreferencesUtils;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.model.Response;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DeviceRepairListActivity extends BaseActivity implements DeviceRepairListAdapter.ItemClickCall {
|
||||
private DeviceRepairListAdapter adapter;
|
||||
private List<DeviceRepair> list;
|
||||
private Intent intent;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
ActivityDeviceRepairListBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_device_repair_list);
|
||||
adapter = new DeviceRepairListAdapter(this, this);
|
||||
binding.setAdapter(adapter);
|
||||
intent=new Intent(this, DeviceRepairInfoActivity.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
OkGo.<MyResult>get(url + "/dms/mobile/getBillsFaultInstances")
|
||||
.execute(new MyRecultCall(dialog, this) {
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var body = response.body();
|
||||
if (body.getTotal() == 0) {
|
||||
myToastUitls.show( body.getCode()==200?"暂无记录":body.getMsg() );
|
||||
return;
|
||||
}
|
||||
list=gson.fromJson(gson.toJson(body.getRows()),new TypeToken<List<DeviceRepair>>(){}.getType());
|
||||
adapter.setList(list);
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clickItemForModify(int index) {
|
||||
var repairInstanceId = list.get(index).getRepairInstanceId();
|
||||
// Toast.makeText(context, repairInstanceId+"", Toast.LENGTH_SHORT).show();
|
||||
OkGo.<MyResult>get(url+"/dms/mobile/getBillsFaultInstanceByRepairInstanceId/"+repairInstanceId)
|
||||
.execute(new MyRecultCall(dialog,this){
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var body = response.body();
|
||||
if (body.getCode()==200){
|
||||
intent.putExtra("json",body.getData().toString());
|
||||
intent.putExtra("activityType",true);
|
||||
startActivity(intent);
|
||||
return;
|
||||
}
|
||||
String msg = body.getMsg();
|
||||
myToastUitls.show(msg==null?"服务器500":msg );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clickItemForSelect(int index) {
|
||||
var repairInstanceId = list.get(index).getRepairInstanceId();
|
||||
OkGo.<MyResult>get(url+"/dms/mobile/getBillsFaultInstance4Repair/"+repairInstanceId)
|
||||
.execute(new MyRecultCall(dialog,this){
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var body = response.body();
|
||||
if (body.getCode()==200){
|
||||
intent.putExtra("json",body.getData().toString());
|
||||
intent.putExtra("activityType",false);
|
||||
startActivity(intent);
|
||||
return;
|
||||
}
|
||||
myToastUitls.show( body.getMsg());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,81 @@
|
||||
package com.example.haiwei_mom.device;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.adapter.ItemClickCall;
|
||||
import com.example.haiwei_mom.adapter.device.LubricationAdapter;
|
||||
import com.example.haiwei_mom.base.BaseActivity;
|
||||
import com.example.haiwei_mom.base.MyRecultCall;
|
||||
import com.example.haiwei_mom.base.MyResult;
|
||||
import com.example.haiwei_mom.databinding.ActivityLubricationBinding;
|
||||
import com.example.haiwei_mom.data.device.LubricationBeen;
|
||||
import com.example.haiwei_mom.data.device.LubricationDetail;
|
||||
import com.example.haiwei_mom.uitls.SharedPreferencesUtils;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.model.Response;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
public class LubricationActivity extends BaseActivity implements ItemClickCall {
|
||||
private LubricationAdapter adapter;
|
||||
private List<LubricationDetail> list;
|
||||
private ActivityLubricationBinding binding;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
binding = DataBindingUtil.setContentView(this, R.layout.activity_lubrication);
|
||||
adapter = new LubricationAdapter(this, this);
|
||||
binding.setAdapter(adapter);
|
||||
initRequest();
|
||||
}
|
||||
|
||||
private void initRequest() {
|
||||
OkGo.<MyResult>get(url + "/dms/mobile/getNewestLubeInstance").tag(this)
|
||||
.execute(new MyRecultCall(dialog, this) {
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var body = response.body();
|
||||
if (body.getCode() == 200) {
|
||||
LubricationBeen been = gson.fromJson(body.getData().toString(), LubricationBeen.class);
|
||||
|
||||
binding.setVm(been);
|
||||
list = been.getDmsBillsLubeDetailList();
|
||||
adapter.setList(list);
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(int position) {
|
||||
var maintainDetail = list.get(position);
|
||||
var uri = maintainDetail.getButtonText().equals("开始润滑") ? "/dms/mobile/startLube" : "/dms/mobile/completeLube";
|
||||
Map<String,String> map=new HashMap<>();
|
||||
|
||||
OkGo.<MyResult>post(url + uri)
|
||||
.upRequestBody(RequestBody.create(JSON, gson.toJson(maintainDetail)))
|
||||
.execute(new MyRecultCall(dialog, this) {
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var body = response.body();
|
||||
if (body.getCode() == 200) {
|
||||
initRequest();
|
||||
return;
|
||||
}
|
||||
myToastUitls.show( body.getMsg());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
package com.example.haiwei_mom.device;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.adapter.ItemClickCall;
|
||||
import com.example.haiwei_mom.adapter.device.MaintainAdapter;
|
||||
import com.example.haiwei_mom.base.BaseActivity;
|
||||
import com.example.haiwei_mom.base.MyRecultCall;
|
||||
import com.example.haiwei_mom.base.MyResult;
|
||||
import com.example.haiwei_mom.databinding.ActivityMaintainBinding;
|
||||
import com.example.haiwei_mom.data.device.MaintainBeen;
|
||||
import com.example.haiwei_mom.data.device.MaintainDetail;
|
||||
import com.example.haiwei_mom.uitls.SharedPreferencesUtils;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.model.Response;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MaintainActivity extends BaseActivity implements ItemClickCall {
|
||||
private MaintainAdapter adapter;
|
||||
private List<MaintainDetail> list;
|
||||
private ActivityMaintainBinding binding;
|
||||
private Intent intent;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = DataBindingUtil.setContentView(this, R.layout.activity_maintain);
|
||||
adapter = new MaintainAdapter(this, this);
|
||||
binding.setAdapter(adapter);
|
||||
intent=new Intent(this,MaintainInfoActivity.class);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
initRequest();
|
||||
}
|
||||
|
||||
private void initRequest() {
|
||||
OkGo.<MyResult>get(url + "/dms/mobile/getNewestMaintInstance").tag(this)
|
||||
.execute(new MyRecultCall(dialog, this) {
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var body = response.body();
|
||||
if (body.getCode() == 200) {
|
||||
MaintainBeen been = gson.fromJson(body.getData().toString(), MaintainBeen.class);
|
||||
|
||||
binding.setVm(been);
|
||||
list = been.getDmsBillsMaintDetailList();
|
||||
adapter.setList(list);
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(int position) {
|
||||
var maintainDetail = list.get(position);
|
||||
intent.putExtra("json", gson.toJson(maintainDetail));
|
||||
startActivity(intent);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,81 @@
|
||||
package com.example.haiwei_mom.device;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableBoolean;
|
||||
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.adapter.device.MaintainProjectAdapter;
|
||||
import com.example.haiwei_mom.base.BaseActivity;
|
||||
import com.example.haiwei_mom.base.MyRecultCall;
|
||||
import com.example.haiwei_mom.base.MyResult;
|
||||
import com.example.haiwei_mom.databinding.ActivityMaintainInfoBinding;
|
||||
import com.example.haiwei_mom.data.device.MaintainDetail;
|
||||
import com.example.haiwei_mom.data.device.MaintainProject;
|
||||
import com.example.haiwei_mom.uitls.SharedPreferencesUtils;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.model.Response;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
public class MaintainInfoActivity extends BaseActivity {
|
||||
private MaintainProjectAdapter adapter;
|
||||
private List<MaintainProject> list;
|
||||
private MaintainDetail maintainDetail;
|
||||
private ObservableBoolean state;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
ActivityMaintainInfoBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_maintain_info);
|
||||
adapter = new MaintainProjectAdapter(this);
|
||||
binding.setAdapter(adapter);
|
||||
state = new ObservableBoolean();
|
||||
state.set(false);
|
||||
binding.setState(state);
|
||||
// var uri = maintainDetail.getButtonText().equals("开始保养") ? "" : "/dms/mobile/completeMaint";
|
||||
OkGo.<MyResult>post(url + "/dms/mobile/startMaint")
|
||||
.upRequestBody(RequestBody.create(JSON, getIntent().getStringExtra("json")))
|
||||
.execute(new MyRecultCall(dialog, this) {
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var body = response.body();
|
||||
if (body.getCode() == 200) {
|
||||
maintainDetail = gson.fromJson(body.getData().toString(), MaintainDetail.class);
|
||||
state.set(maintainDetail.getMaintStatus() == 3);
|
||||
list = maintainDetail.getDmsBillsMaintDetailProjectList();
|
||||
adapter.setList(list);
|
||||
adapter.notifyDataSetChanged();
|
||||
return;
|
||||
}
|
||||
myToastUitls.show( body.getMsg());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void maintainInfoSubmit(View view) {
|
||||
OkGo.<MyResult>post(url + "/dms/mobile/completeMaint")
|
||||
.upRequestBody(RequestBody.create(JSON, gson.toJson(maintainDetail))).execute(new MyRecultCall(dialog, this) {
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
@Override
|
||||
public void onSuccess(Response<MyResult> response) {
|
||||
super.onSuccess(response);
|
||||
var body = response.body();
|
||||
if (body.getCode() == 200) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
myToastUitls.show( body.getMsg());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package com.example.haiwei_mom.dialog;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.databinding.DialogImgBinding;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/2/22 11:07
|
||||
*/
|
||||
public class ImgDialog extends Dialog {
|
||||
private DialogImgBinding binding;
|
||||
|
||||
private Context context;
|
||||
|
||||
public void setRawReturn(String url) {
|
||||
Glide.with(context).load(url).into(binding.dialogImg);
|
||||
binding.executePendingBindings();
|
||||
show();
|
||||
|
||||
}
|
||||
|
||||
public ImgDialog(@NonNull Context context) {
|
||||
super(context,R.style.dialog_style);
|
||||
this.context=context;
|
||||
binding = DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.dialog_img, null, false);
|
||||
setContentView(binding.getRoot());
|
||||
binding.dialogImgDis.setOnClickListener(v -> dismiss());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package com.example.haiwei_mom.dialog;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.example.haiwei_mom.R;
|
||||
import com.example.haiwei_mom.databinding.DialogAddPartBinding;
|
||||
import com.example.haiwei_mom.data.device.DeviceRepairPart;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/2/22 11:07
|
||||
*/
|
||||
public class RepairPartAddDialog extends Dialog {
|
||||
|
||||
|
||||
private RepairPartAddDialogCall stockReturnDialogCall;
|
||||
private Context context;
|
||||
|
||||
|
||||
public RepairPartAddDialog(@NonNull Context context, RepairPartAddDialogCall call) {
|
||||
super(context, R.style.dialog_style);
|
||||
this.context = context;
|
||||
this.stockReturnDialogCall = call;
|
||||
DialogAddPartBinding binding = DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.dialog_add_part, null, false);
|
||||
setContentView(binding.getRoot());
|
||||
DeviceRepairPart deviceRepairPart=new DeviceRepairPart();
|
||||
binding.setVm(deviceRepairPart);
|
||||
binding.dialogAddpartFalse.setOnClickListener(v -> dismiss());
|
||||
binding.dialogAddpartTrue.setOnClickListener(v -> call.returnResult(deviceRepairPart));
|
||||
}
|
||||
|
||||
public interface RepairPartAddDialogCall {
|
||||
void returnResult(DeviceRepairPart deviceRepairPart);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.example.haiwei_mom.wms.semi;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.example.haiwei_mom.R;
|
||||
|
||||
public class BindingActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_binding);
|
||||
}
|
||||
|
||||
public void submit(View view) {
|
||||
Toast.makeText(this, "绑定成功", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/blue"/>
|
||||
<corners android:radius="6dp"/>
|
||||
</shape>
|
||||
|
After Width: | Height: | Size: 262 B |
@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="title"
|
||||
type="String" />
|
||||
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".wms.semi.BindingActivity">
|
||||
|
||||
<include
|
||||
layout="@layout/toolbar"
|
||||
app:title='@{title??"半成品出库"}' />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="扫描胎胚:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/semi_out_code"
|
||||
style="@style/text_san"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:lines="1"
|
||||
android:inputType="text"
|
||||
android:imeOptions="actionSearch"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="扫描载具:" />
|
||||
|
||||
<EditText
|
||||
style="@style/text_san"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:lines="1"
|
||||
android:inputType="text"
|
||||
android:imeOptions="actionSearch"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
<Button
|
||||
style="@style/button_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="55dp"
|
||||
android:layout_margin="20dp"
|
||||
android:onClick="submit"
|
||||
android:text="提交" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,293 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="title"
|
||||
type="String" />
|
||||
<variable
|
||||
name="adapter1"
|
||||
type="com.example.haiwei_mom.adapter.check.DisposalFileAdapter" />
|
||||
|
||||
<variable
|
||||
name="vm"
|
||||
type="com.example.haiwei_mom.data.device.BxSubmitBeen" />
|
||||
<variable
|
||||
name="device"
|
||||
type="com.example.haiwei_mom.data.device.DeviceBeen" />
|
||||
<import type="android.view.View"/>
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:orientation="vertical"
|
||||
tools:context=".device.BxActivity">
|
||||
|
||||
<include
|
||||
layout="@layout/toolbar"
|
||||
app:title='@{title??"故障报修"}' />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/selectNameView"
|
||||
style="@style/text_san"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:hint="输入设备名称查询"
|
||||
android:text="@={vm.selectName}"/>
|
||||
<Button
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/button_bg"
|
||||
android:onClick="bxSelect"
|
||||
android:text="查询"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备名称:" />
|
||||
|
||||
<TextView
|
||||
style="@style/text_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{device.deviceName}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备规格:" />
|
||||
|
||||
<TextView
|
||||
style="@style/text_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{device.deviceSpec}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备位置:" />
|
||||
|
||||
<TextView
|
||||
style="@style/text_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{device.deviceLocation}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:background="@drawable/text_bg">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/activity_bg"
|
||||
android:text="故障类别:" />
|
||||
|
||||
<Spinner
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:entries="@{vm.faultTypeS}"
|
||||
android:spinnerMode="dropdown"
|
||||
android:onItemSelected="@{vm.selectFaultDescription}"
|
||||
android:textAlignment="center"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:background="@drawable/text_bg">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/activity_bg"
|
||||
android:text="涉及操作:" />
|
||||
|
||||
<TextView
|
||||
style="@style/text_info"
|
||||
android:id="@+id/bx_des_ope"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:spinnerMode="dropdown"
|
||||
android:textAlignment="center"
|
||||
android:drawableRight="@drawable/ic_xl"
|
||||
android:paddingRight="8dp"
|
||||
android:text="@={vm.designOperations}"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="top|center"
|
||||
android:text="故障情况:" />
|
||||
|
||||
<EditText
|
||||
style="@style/text_san"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@={vm.faultDescription}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="维修类型:" />
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:onClick="@{()->vm.repairTypeSelect(1)}"
|
||||
android:text="内部维修" />
|
||||
|
||||
<RadioButton
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:onClick="@{()->vm.repairTypeSelect(2)}"
|
||||
android:text="委外维修" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:visibility="@{vm.outsrcVis?View.VISIBLE: View.GONE}"
|
||||
android:background="@drawable/text_bg">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/activity_bg"
|
||||
android:text="外协单位:" />
|
||||
|
||||
<Spinner
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:spinnerMode="dropdown"
|
||||
android:entries="@{vm.outsourcingStringList}"
|
||||
android:onItemSelected="@{vm.setOutsrcld}"
|
||||
android:textAlignment="center" />
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="30dp"
|
||||
android:text="故障图片:"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:adapter="@{adapter1}"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/disposal_file_add"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="bxTackphoto"
|
||||
android:src="@mipmap/ic_add_file"/>
|
||||
</LinearLayout>
|
||||
<Button
|
||||
style="@style/button_style"
|
||||
android:layout_width="380dp"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_gravity="center"
|
||||
android:onClick="bxSubmit"
|
||||
android:text="提交"/>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="title"
|
||||
type="String" />
|
||||
<variable
|
||||
name="vm"
|
||||
type="com.example.haiwei_mom.data.device.DeviceInspection" />
|
||||
<variable
|
||||
name="adapter"
|
||||
type="com.example.haiwei_mom.adapter.device.DeviceInspectiontAdapter" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".device.DeviceCheckActivity">
|
||||
|
||||
<include
|
||||
layout="@layout/toolbar"
|
||||
app:title='@{title??"待巡检设备列表"}' />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/text_bg">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/activity_bg"
|
||||
android:text="选择巡检线路:" />
|
||||
|
||||
<Spinner
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:spinnerMode="dropdown"
|
||||
android:textAlignment="center" />
|
||||
|
||||
<Button
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/button_bg"
|
||||
android:onClick="deviceCheckSelect"
|
||||
android:text="查询" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="巡检工单:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.billsInspectCode}"/>
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="工单状态:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_info"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:text="@{vm.inspectStatusName}"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="创建时间:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.createTime}"/>
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="巡检线路:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_info"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{vm.routeName}"/>
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:adapter="@{adapter}"
|
||||
android:layout_weight="1"
|
||||
android:padding="5dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@drawable/text_bg">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/activity_bg"
|
||||
android:text="扫描设备:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/inspection_deviceCode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
style="@style/text_san"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="97dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/button_bg"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:textSize="12dp"
|
||||
android:onClick="deviceCheckStart"
|
||||
android:text="开始巡检" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,166 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="title"
|
||||
type="String" />
|
||||
|
||||
<variable
|
||||
name="vm"
|
||||
type="com.example.haiwei_mom.data.device.DeviceInspectionDetail" />
|
||||
|
||||
<variable
|
||||
name="adapter"
|
||||
type="com.example.haiwei_mom.adapter.device.DeviceInspectionInfoAdapter" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".device.DeviceCheckInfoActivity">
|
||||
|
||||
<include
|
||||
layout="@layout/toolbar"
|
||||
app:title='@{title??"设备巡检"}' />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备编号:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.deviceCode}" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备名称:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.deviceName}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备状态:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text='@{vm.inspectStatus.equals("1")?"正常":"异常"}' />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="检验状态:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.instanceDetailStatusName}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="巡检描述:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text='@{vm.inspectDesc}' />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="38dp"
|
||||
android:background="@color/white"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="序号" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="项目名称" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="值" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="结果" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/white"
|
||||
android:adapter="@{adapter}"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
android:padding="5dp" />
|
||||
|
||||
<Button
|
||||
style="@style/button_submit"
|
||||
android:onClick="deviceCheckInfoSubmit"
|
||||
android:text="提交" />
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,615 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="title"
|
||||
type="String" />
|
||||
|
||||
<variable
|
||||
name="visState"
|
||||
type="Boolean" />
|
||||
|
||||
<variable
|
||||
name="startState"
|
||||
type="Boolean" />
|
||||
|
||||
<variable
|
||||
name="overState"
|
||||
type="Boolean" />
|
||||
|
||||
<variable
|
||||
name="submitState"
|
||||
type="Boolean" />
|
||||
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="adapter1"
|
||||
type="com.example.haiwei_mom.adapter.check.DisposalFileAdapter" />
|
||||
|
||||
<variable
|
||||
name="adapter2"
|
||||
type="com.example.haiwei_mom.adapter.check.DisposalFileAdapter" />
|
||||
|
||||
<variable
|
||||
name="partAdapter"
|
||||
type="com.example.haiwei_mom.adapter.device.DeviceRepairPartAdapter" />
|
||||
|
||||
<variable
|
||||
name="vm"
|
||||
type="com.example.haiwei_mom.data.device.DeviceRepair" />
|
||||
|
||||
|
||||
</data>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".device.DeviceRepairInfoActivity">
|
||||
|
||||
<include
|
||||
layout="@layout/toolbar"
|
||||
app:title='@{title??visState?"报修修改":"设备维修"}' />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="工单编号:" />
|
||||
|
||||
<TextView
|
||||
style="@style/text_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{vm.billsFaultCode}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="工单状态:" />
|
||||
|
||||
<TextView
|
||||
style="@style/text_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{vm.billsStatusName}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备编号:" />
|
||||
|
||||
<TextView
|
||||
style="@style/text_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{vm.deviceCode}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备名称:" />
|
||||
|
||||
<TextView
|
||||
style="@style/text_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{vm.deviceName}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备规格:" />
|
||||
|
||||
<TextView
|
||||
style="@style/text_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{vm.deviceSpec}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备位置:" />
|
||||
|
||||
<TextView
|
||||
style="@style/text_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{vm.deviceLocation}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="故障类别:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fault_type"
|
||||
style="@style/text_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clickable="@{visState}"
|
||||
android:drawableRight='@{visState? @drawable/ic_xl:null}'
|
||||
android:onClick="selectFaultType"
|
||||
android:text="@{vm.faultSourceTypeName}"
|
||||
android:textAlignment="center" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="涉及操作:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/operations"
|
||||
style="@style/text_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="@{visState}"
|
||||
android:drawableRight='@{visState? @drawable/ic_xl:null}'
|
||||
android:minHeight="44dp"
|
||||
android:onClick="selectOperation"
|
||||
android:text="@{vm.designOperations}"
|
||||
android:textAlignment="center" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="top|center"
|
||||
android:text="故障情况:" />
|
||||
|
||||
<EditText
|
||||
style="@style/text_san"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:enabled="@{visState}"
|
||||
android:text="@={vm.faultDescription}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="top|center"
|
||||
android:text="检查故障 判断:" />
|
||||
|
||||
<EditText
|
||||
style="@style/text_san"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:enabled="@{visState}"
|
||||
android:text="@={vm.checkedFault}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="维修类型:" />
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:checked="@{vm.radioState1}"
|
||||
android:clickable="@{visState}"
|
||||
android:enabled="true"
|
||||
android:onClick="@{()->vm.repairTypeSelect(1)}"
|
||||
android:text="内部维修" />
|
||||
|
||||
<RadioButton
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:checked="@{vm.radioState2}"
|
||||
android:clickable="@{visState}"
|
||||
android:onClick="@{()->vm.repairTypeSelect(2)}"
|
||||
android:text="委外维修" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="44dp"-->
|
||||
<!-- android:layout_marginTop="8dp"-->
|
||||
<!-- android:layout_marginEnd="4dp"-->
|
||||
<!-- android:visibility='@{visState ? View.GONE:View.VISIBLE}'>>-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- style="@style/text_title"-->
|
||||
<!-- android:layout_width="90dp"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:text="外协单位:" />-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- style="@style/text_info"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:text="@{vm.outsrcName}" />-->
|
||||
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:background="@drawable/text_bg"
|
||||
android:visibility='@{vm.radioState2 ? View.VISIBLE:View.GONE}'>
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/activity_bg"
|
||||
android:text="外协单位:" />
|
||||
|
||||
<Spinner
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:enabled="@{visState}"
|
||||
android:entries="@{vm.outsourcingNameList}"
|
||||
android:onItemSelected="@{vm.selectOutSourcingID}"
|
||||
android:selection="@{vm.outsrcIdIndex}"
|
||||
android:spinnerMode="dropdown"
|
||||
android:textAlignment="center" />
|
||||
<!-- -->
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="30dp"
|
||||
android:text="故障图片:" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:adapter="@{adapter1}"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/disposal_file_add"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="updateTackphoto"
|
||||
android:src="@mipmap/ic_add_file"
|
||||
android:visibility="@{visState?View.VISIBLE:View.GONE}" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:visibility="@{startState?View.VISIBLE:View.GONE}">
|
||||
|
||||
|
||||
<EditText
|
||||
style="@style/text_san"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@={vm.deviceCodeTag}" />
|
||||
|
||||
<Button
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/button_bg"
|
||||
android:onClick="startRepair"
|
||||
android:text="扫描设备&开始" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="@{submitState?View.VISIBLE:View.GONE}">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="top|center"
|
||||
android:text="维修描述:" />
|
||||
|
||||
<EditText
|
||||
style="@style/text_san"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:text="@={vm.processHandleResolution}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="@{submitState?View.VISIBLE:View.GONE}">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="top|center"
|
||||
android:text="维修内容:" />
|
||||
|
||||
<EditText
|
||||
style="@style/text_san"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:text="@={vm.repairContent}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="@{submitState?View.VISIBLE:View.GONE}">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="top|center"
|
||||
android:text="安全防护 措施:" />
|
||||
|
||||
<EditText
|
||||
style="@style/text_san"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:text="@={vm.protectedMethod}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:visibility="@{overState?View.VISIBLE:View.GONE}">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="添加维修使用零部件"
|
||||
android:textColor="@color/blue" />
|
||||
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/button_bg"
|
||||
android:onClick="addRepairPart"
|
||||
android:text="添加" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="38dp"
|
||||
android:background="@color/white"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:visibility="@{submitState?View.VISIBLE:View.GONE}">
|
||||
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="物料名称" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="规格型号" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="数量" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="删除" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="300dp"
|
||||
android:adapter="@{partAdapter}"
|
||||
android:background="@color/white"
|
||||
android:padding="5dp"
|
||||
android:visibility="@{submitState?View.VISIBLE:View.GONE}"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="维修完成图片"
|
||||
android:textColor="@color/blue"
|
||||
android:visibility="@{submitState?View.VISIBLE:View.GONE}" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="@{submitState?View.VISIBLE:View.GONE}">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:adapter="@{adapter2}"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="overRepairTackphoto"
|
||||
android:src="@mipmap/ic_add_file"
|
||||
android:visibility="@{overState?View.VISIBLE:View.GONE}" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
style="@style/button_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="55dp"
|
||||
android:layout_margin="20dp"
|
||||
android:onClick="endRepair"
|
||||
android:text="维修完成"
|
||||
android:visibility="@{overState?View.VISIBLE:View.GONE}" />
|
||||
|
||||
<Button
|
||||
style="@style/button_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="55dp"
|
||||
android:layout_margin="20dp"
|
||||
android:onClick="submitUpdateRepair"
|
||||
android:text="提交修改"
|
||||
android:visibility="@{visState?View.VISIBLE:View.GONE}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
</layout>
|
||||
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="title"
|
||||
type="String" />
|
||||
|
||||
|
||||
|
||||
<variable
|
||||
name="adapter"
|
||||
type="com.example.haiwei_mom.adapter.device.DeviceRepairListAdapter" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".device.DeviceRepairListActivity">
|
||||
<include
|
||||
layout="@layout/toolbar"
|
||||
app:title='@{title??"设备报修工单"}' />
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:adapter="@{adapter}"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
android:padding="5dp" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,122 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="title"
|
||||
type="String" />
|
||||
<variable
|
||||
name="vm"
|
||||
type="com.example.haiwei_mom.data.device.LubricationBeen" />
|
||||
<variable
|
||||
name="adapter"
|
||||
type="com.example.haiwei_mom.adapter.device.LubricationAdapter" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".device.MaintainActivity">
|
||||
|
||||
<include
|
||||
layout="@layout/toolbar"
|
||||
app:title='@{title??"设备润滑"}' />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="工单编号"/>
|
||||
|
||||
<TextView
|
||||
style="@style/item_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.billsLubeCode}"/>
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="工单状态"/>
|
||||
|
||||
<TextView
|
||||
style="@style/item_info"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{vm.maintStatusStr}"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="润滑级别"/>
|
||||
|
||||
<TextView
|
||||
style="@style/item_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.lubeLevelName}"/>
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="润滑组别"/>
|
||||
|
||||
<TextView
|
||||
style="@style/item_info"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{vm.lubeGroup}"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="润滑负责人"/>
|
||||
|
||||
<TextView
|
||||
style="@style/item_info"
|
||||
android:layout_width="168dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{vm.lubeSupervisor}"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:padding="5dp"
|
||||
android:adapter="@{adapter}"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,122 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="title"
|
||||
type="String" />
|
||||
<variable
|
||||
name="vm"
|
||||
type="com.example.haiwei_mom.data.device.MaintainBeen" />
|
||||
<variable
|
||||
name="adapter"
|
||||
type="com.example.haiwei_mom.adapter.device.MaintainAdapter" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".device.MaintainActivity">
|
||||
|
||||
<include
|
||||
layout="@layout/toolbar"
|
||||
app:title='@{title??"设备保养"}' />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="工单编号"/>
|
||||
|
||||
<TextView
|
||||
style="@style/item_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.billsMaintCode}"/>
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="工单状态"/>
|
||||
|
||||
<TextView
|
||||
style="@style/item_info"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{vm.maintStatusStr}"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="保养级别"/>
|
||||
|
||||
<TextView
|
||||
style="@style/item_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.maintLevelName}"/>
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="保养组别"/>
|
||||
|
||||
<TextView
|
||||
style="@style/item_info"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{vm.maintGroup}"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="保养负责人"/>
|
||||
|
||||
<TextView
|
||||
style="@style/item_info"
|
||||
android:layout_width="168dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{vm.maintSupervisor}"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:adapter="@{adapter}"
|
||||
android:padding="5dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="title"
|
||||
type="String" />
|
||||
<import type="android.view.View"/>
|
||||
<variable
|
||||
name="state"
|
||||
type="androidx.databinding.ObservableBoolean" />
|
||||
<variable
|
||||
name="adapter"
|
||||
type="com.example.haiwei_mom.adapter.device.MaintainProjectAdapter" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".device.MaintainInfoActivity">
|
||||
<include
|
||||
layout="@layout/toolbar"
|
||||
app:title='@{title??"设备保养项目"}' />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:adapter="@{adapter}"
|
||||
android:background="@color/white"
|
||||
android:padding="5dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:text="完成保养"
|
||||
android:visibility="@{state?View.GONE:View.VISIBLE}"
|
||||
android:onClick="maintainInfoSubmit"
|
||||
style="@style/button_submit"/>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="vm"
|
||||
type="com.example.haiwei_mom.data.device.DeviceRepairPart" />
|
||||
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/text_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
|
||||
style="@style/text_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:text="添加零部件" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="#e1e1e1" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginTop="12dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="物料名称:" />
|
||||
|
||||
<EditText
|
||||
style="@style/text_san"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:text='@={vm.partName}' />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="规格型号:" />
|
||||
|
||||
<EditText
|
||||
style="@style/text_san"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:text='@={vm.partSpecifications}' />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="使用数量:" />
|
||||
|
||||
<EditText
|
||||
style="@style/text_san"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:inputType="numberDecimal"
|
||||
android:minHeight="45dp"
|
||||
android:text='@={vm.amount}' />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="55dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/dialog_addpart_false"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="match_parent"
|
||||
android:backgroundTint="@color/yellow"
|
||||
|
||||
android:text="取消" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/dialog_addpart_true"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="确定" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="400dp"
|
||||
android:background="@drawable/text_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
style="@style/text_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:text="查看图片" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:background="#e1e1e1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dialog_img"
|
||||
android:layout_width="380dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<Button
|
||||
style="@style/button_style"
|
||||
android:id="@+id/dialog_img_dis"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="关闭" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="item"
|
||||
type="com.example.haiwei_mom.data.check.CheckResultDetal" />
|
||||
<variable
|
||||
name="enabledState"
|
||||
type="Boolean" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{String.valueOf(item.index)}" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{item.checkProjectName}" />
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_weight="1" >
|
||||
<RadioButton
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:onClick='@{()-> item.click("1")}'
|
||||
android:enabled="@{enabledState}"
|
||||
android:text="合格"/>
|
||||
<RadioButton
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:enabled="@{enabledState}"
|
||||
android:onClick='@{()-> item.click("0")}'
|
||||
android:text="不合格"/>
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{item.checkStatusShow}" />
|
||||
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#e1e1e1"/>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="item"
|
||||
type="com.example.haiwei_mom.data.check.CheckResultDetal" />
|
||||
<variable
|
||||
name="enabledState"
|
||||
type="Boolean" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{String.valueOf(item.index)}" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{item.checkProjectName}" />
|
||||
|
||||
<EditText
|
||||
style="@style/item_title"
|
||||
android:background="@drawable/san_text_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:inputType="numberDecimal"
|
||||
android:enabled="@{enabledState}"
|
||||
android:text='@={item.checkProjectResult}' />
|
||||
<!-- android:afterTextChanged="@{item.textChanged}"-->
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{item.checkStatusShow}" />
|
||||
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#e1e1e1"/>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="vm"
|
||||
type="com.example.haiwei_mom.data.check.CheckResult" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/check_select_click"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="130dp"
|
||||
android:background="@drawable/san_text_bg"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="5dp"
|
||||
android:padding="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text='@{vm.checkRuleType.equals("来料检验")?"采购单号":"销售订单"}'
|
||||
/>
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text='@{vm.checkRuleType.equals("来料检验")?vm.poNo:vm.saleorderCode}' />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="批次号:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.materialBatch}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="物料编号:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.materialCode}" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="物料名称:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.materialName}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="检验类型:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text='@{vm.checkRuleType }' />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="检验状态:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.checkStatus}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="vm"
|
||||
type="com.example.haiwei_mom.data.check.CheckResultDetal" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/check_select_detal_click"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="92dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/san_text_bg"
|
||||
android:padding="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="物料条码:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.materialBarcode}" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="检验状态:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.checkStatus}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="创建人:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text='@{vm.createBy}' />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="创建时间:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.createTime}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_width="60dp"
|
||||
android:background="@color/blue"
|
||||
android:layout_height="match_parent"
|
||||
android:text='@{vm.checkStatus.equals("待检验")||vm.checkStatus.equals("检验中")?"处理":"查看" }'
|
||||
android:gravity="center"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/white"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="vm"
|
||||
type="com.example.haiwei_mom.data.device.DeviceInspectionDetail" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/device_inspection_click"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/san_text_bg"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="5dp"
|
||||
android:padding="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备编号:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.deviceCode}" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备名称:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.deviceName}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备状态:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text='@{vm.inspectStatus.equals("1")?"正常":"异常"}' />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="检验状态:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.instanceDetailStatusName}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="巡检描述:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text='@{vm.inspectDesc}' />
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="item"
|
||||
type="com.example.haiwei_mom.data.device.DeviceInspectionItem" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{String.valueOf(item.index)}" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{item.inspectProjectName}" />
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RadioButton
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:onClick='@{()-> item.setInspectProjectStatus("1")}'
|
||||
android:text="正常" />
|
||||
|
||||
<RadioButton
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:onClick='@{()-> item.setInspectProjectStatus("0")}'
|
||||
android:text="异常" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text='@{item.statusName}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="描述:" />
|
||||
|
||||
<EditText
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text='@={item.inspectProjectDesc}' />
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#e1e1e1" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="item"
|
||||
type="com.example.haiwei_mom.data.device.DeviceInspectionItem" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:layout_marginTop="5dp"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{String.valueOf(item.index)}" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{item.inspectProjectName}" />
|
||||
|
||||
<EditText
|
||||
style="@style/item_title"
|
||||
android:background="@drawable/san_text_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:inputType="number"
|
||||
android:text='@={item.inspectProjectResult}' />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text='@{item.statusName}' />
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="描述:" />
|
||||
|
||||
<EditText
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text='@={item.inspectProjectDesc}' />
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#e1e1e1"/>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,169 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="vm"
|
||||
type="com.example.haiwei_mom.data.device.LubricationDetail" />
|
||||
<import type="android.view.View"/>
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/san_text_bg"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备编号:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.deviceCode}" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备名称:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.deviceName}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备类型:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text='@{vm.typeName}' />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="润滑部位:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.lubeStationName}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="润滑标准:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text='@{vm.lubeProtocol}' />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="润滑状态:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.maintStatusStr}" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="操作描述:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text='@{vm.lubeOperationDescription}' />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="润滑描述:" />
|
||||
|
||||
<EditText
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:enabled="@{vm.buttonVisb}"
|
||||
android:text='@={vm.operationDescription}' />
|
||||
|
||||
<Button
|
||||
android:id="@+id/device_maintain_click"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="@{vm.buttonVisb?View.VISIBLE:View.GONE}"
|
||||
android:text="@{vm.buttonText}" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="vm"
|
||||
type="com.example.haiwei_mom.data.device.MaintainDetail" />
|
||||
<import type="android.view.View"/>
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/san_text_bg"
|
||||
android:orientation="vertical"
|
||||
android:padding="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备编号:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.deviceCode}" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备名称:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.deviceName}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备类型:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text='@{vm.typeName}' />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="保养部位:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.maintStationName}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="保养标准:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text='@{vm.maintProtocol}' />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="保养状态:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.maintStatusStr}" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<!--<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="操作描述:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text='@{vm.maintOperationDescription}' />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="保养描述:" />
|
||||
|
||||
<EditText
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:enabled="@{vm.buttonVisb}"
|
||||
android:text='@={vm.operationDescription}' />-->
|
||||
|
||||
<Button
|
||||
android:id="@+id/device_maintain_click"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="right"
|
||||
android:text="@{vm.buttonText}" />
|
||||
|
||||
<!-- android:visibility="@{vm.buttonVisb?View.VISIBLE:View.GONE}"-->
|
||||
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="vm"
|
||||
type="com.example.haiwei_mom.data.device.DeviceRepair" />
|
||||
|
||||
<import type="android.view.View"/>
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/text_bg"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="5dp"
|
||||
android:padding="5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="工单编号:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.billsFaultCode}" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="工单状态:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.billsStatusName}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备编号:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.deviceCode}" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="设备名称:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.deviceName}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="报修人:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text='@{vm.applyUser }' />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title_blue"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="报修时间:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.applyTime}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#e1e1e1"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/device_repair_modify"
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:visibility='@{vm.selectStatus?View.VISIBLE:View.GONE}'
|
||||
android:textColor="@color/yellow"
|
||||
android:textStyle="bold"
|
||||
android:letterSpacing="1"
|
||||
android:text="修改" />
|
||||
<View
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:visibility='@{vm.selectStatus?View.VISIBLE:View.GONE}'
|
||||
android:background="#e1e1e1"/>
|
||||
<TextView
|
||||
android:id="@+id/device_repair_select"
|
||||
style="@style/item_text_13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:letterSpacing="1"
|
||||
android:text="查看" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="vm"
|
||||
type="com.example.haiwei_mom.data.check.CheckInstanceFiles" />
|
||||
|
||||
<import type="android.view.View" />
|
||||
</data>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/ic_picture_err"
|
||||
android:padding="20dp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/dis_file"
|
||||
android:paddingTop="5dp"
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/disposal_delect"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="right"
|
||||
android:src="@mipmap/ic_cha2"
|
||||
android:visibility="@{vm.state?View.VISIBLE:View.GONE}" />
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="item"
|
||||
type="com.example.haiwei_mom.data.device.MaintainProject" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="5dp"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:background="@drawable/san_text_bg">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/item_title"
|
||||
android:text="保养名称:" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{item.maintProjectName}" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/item_title"
|
||||
android:text="保养描述:" />
|
||||
|
||||
<EditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="35dp"
|
||||
android:text="@={item.maintProjectDesc}" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/item_title"
|
||||
android:text="备注:" />
|
||||
|
||||
<EditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="35dp"
|
||||
android:text="@={item.remark}" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="vm"
|
||||
type="com.example.haiwei_mom.data.device.DeviceRepairPart" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:background="@color/item_bg">
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.partName}" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@{vm.partSpecifications}" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white" />
|
||||
|
||||
<TextView
|
||||
style="@style/item_title"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{vm.amount}" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/pair_delete"
|
||||
style="@style/item_title"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/ic_cha1" />
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 476 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 877 B |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<external-path
|
||||
name="my_images"
|
||||
path="."/>
|
||||
<!-- <files-path name="my_images" path="images/"/>-->
|
||||
</paths>
|
||||