增加 设备管理

master
wanghao 9 months ago
parent 2e6e278d8a
commit ca234551f3

@ -57,4 +57,5 @@ dependencies {
implementation 'io.github.scwang90:refresh-layout-kernel:2.0.6' //
implementation 'io.github.scwang90:refresh-footer-classics:2.0.6' //
implementation 'com.contrarywind:Android-PickerView:4.1.9'
implementation 'com.github.bumptech.glide:glide:4.16.0'
}

@ -2,7 +2,21 @@
<manifest 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">
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-permission android:name="android.permission.INTERNET" /> <!-- //震动权限 -->
<uses-permission android:name="android.permission.VIBRATE" /> <!-- //外部存储器权限 -->
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="32"
tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.CAMERA" /> <!-- 相机权限 -->
<application
android:name=".base.MyApplication"
android:allowBackup="true"
@ -15,6 +29,9 @@
android:theme="@style/Theme.Haiweimom"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".wms.semi.BindingActivity"
android:exported="false" />
<activity
android:name=".wms.semi.SeimMoveActivity"
android:exported="false" />
@ -69,6 +86,28 @@
<activity
android:name=".HomePageActivity"
android:exported="false" />
<activity
android:name=".device.DeviceRepairInfoActivity"
android:exported="false" />
<activity
android:name=".device.LubricationActivity"
android:exported="false" />
<activity
android:name=".device.DeviceRepairListActivity"
android:exported="false" />
<activity
android:name=".device.MaintainActivity"
android:exported="false" />
<activity
android:name=".device.DeviceCheckInfoActivity"
android:exported="false" />
<activity
android:name=".device.DeviceCheckActivity"
android:exported="false" />
<activity
android:name=".device.BxActivity"
android:exported="false" />
<activity
android:name=".MainActivity"
android:exported="true">
@ -78,6 +117,17 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.example.haiwei_mom"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
</manifest>

@ -13,6 +13,11 @@ import com.example.haiwei_mom.base.MyResult;
import com.example.haiwei_mom.data.MenuBeen;
import com.example.haiwei_mom.data.PdaRouters;
import com.example.haiwei_mom.databinding.ActivityHomePageBinding;
import com.example.haiwei_mom.device.BxActivity;
import com.example.haiwei_mom.device.DeviceCheckActivity;
import com.example.haiwei_mom.device.DeviceRepairListActivity;
import com.example.haiwei_mom.device.LubricationActivity;
import com.example.haiwei_mom.device.MaintainActivity;
import com.example.haiwei_mom.ipc.FeedingMaterialsActivity;
import com.example.haiwei_mom.qm.CheckActivity;
import com.example.haiwei_mom.uitls.SharedPreferencesUtils;
@ -23,6 +28,7 @@ import com.example.haiwei_mom.wms.raw.RawInActivity;
import com.example.haiwei_mom.wms.raw.RawOutActivity;
import com.example.haiwei_mom.wms.raw.RawReturnActivity;
import com.example.haiwei_mom.wms.raw.StoreCheckActivity;
import com.example.haiwei_mom.wms.semi.BindingActivity;
import com.example.haiwei_mom.wms.semi.SeimMoveActivity;
import com.example.haiwei_mom.wms.semi.SemiInActivity;
import com.example.haiwei_mom.wms.semi.SemiOutActivity;
@ -59,6 +65,7 @@ public class HomePageActivity extends BaseActivity implements ItemClickCall {
map.put("半成品调拨", SeimMoveActivity.class);
map.put("半成品盘点", StoreCheckActivity.class);
map.put("半成品退库", RawReturnActivity.class);
map.put("绑定", BindingActivity.class);
map.put("入库工装绑定", BindVehicleActivity.class);
map.put("成品批量入库", ProductInActivity.class);
map.put("成品出库", ProductOutActivity.class);
@ -73,6 +80,11 @@ public class HomePageActivity extends BaseActivity implements ItemClickCall {
map.put("载具绑定", FeedingMaterialsActivity.class);
map.put("系统配置", ConfigActivity.class);
map.put("班组管理", ClassItemActivity.class);
map.put("故障报修", BxActivity.class);
map.put("故障维修", DeviceRepairListActivity.class);
map.put("设备巡检", DeviceCheckActivity.class);
map.put("设备保养", MaintainActivity.class);
map.put("设备润滑", LubricationActivity.class);
}
private void initRequest() {

@ -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;
}
}
}

@ -41,7 +41,6 @@ import okhttp3.MediaType;
public class BaseActivity extends AppCompatActivity implements MyScannerCall {
public static final int CAMERA_PHOTO = 1;
// public static String url = "http://172.20.10.4:6080";
public static String url = "http://10.11.180.67:6080";
// public static String url = "http://1.13.177.47:6080";
public ProgressDialog dialog;

@ -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,118 @@
package com.example.haiwei_mom.data.check;
import java.util.List;
import java.util.Optional;
/**
* @author wanghao
* @date 2024/3/11 10:09
*/
public class CheckDisposalBeen {
/**
* batchAmount : 0
* passAmount : 0
* failAmount : 1
* checkMode : 1
* checkSample : 10
* materialCode : 111
* materialName :
*/
private int batchAmount;
private int passAmount;
private int failAmount;
private String checkMode;
private int checkSample;
private String materialCode;
private String materialName;
private List<CheckInstanceFiles> qmsCheckInstanceFiles;
private String checkRuleType;
private List<CheckActivitieBeen> qmsQualityInstanceActivities;
/**
* 1,2,3,4
*
* @return
*/
public String getCheckRuleType() {
return checkRuleType;
}
public List<CheckActivitieBeen> getQmsQualityInstanceActivities() {
return qmsQualityInstanceActivities;
}
public void setQmsQualityInstanceActivities(List<CheckActivitieBeen> qmsQualityInstanceActivities) {
this.qmsQualityInstanceActivities = qmsQualityInstanceActivities;
}
public void setCheckRuleType(String checkRuleType) {
this.checkRuleType = checkRuleType;
}
public List<CheckInstanceFiles> getQmsCheckInstanceFiles() {
return qmsCheckInstanceFiles;
}
public void setQmsCheckInstanceFiles(List<CheckInstanceFiles> qmsCheckInstanceFiles) {
this.qmsCheckInstanceFiles = qmsCheckInstanceFiles;
}
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 String getCheckMode() {
return Optional.ofNullable(checkMode).map(t->t.equals("1") ? "全检" : "抽检").orElse(null);
}
public void setCheckMode(String checkMode) {
this.checkMode = checkMode;
}
public int getCheckSample() {
return checkSample;
}
public void setCheckSample(int checkSample) {
this.checkSample = checkSample;
}
public String getMaterialCode() {
return materialCode;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
public String getMaterialName() {
return materialName;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
}

@ -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,260 @@
package com.example.haiwei_mom.data.check;
import androidx.databinding.BaseObservable;
import java.util.List;
/**
* @author wanghao
* @date 2024/3/1 8:56
*/
public class CheckResult extends BaseObservable {
/**
* createBy :
* createTime : 2024-02-27 15:05:30
* updateBy :
* updateTime : 2024-02-27 15:06:49
* remark : null
* checkResultDetailId : 17
* checkResultId : 2
* materialBarcode : 12
* materialId : 2
* checkRuleId : 1
* checkRuleType : 3
* checkRuleName : 1
* checkMode : 2
* checkSample : 1.0
* checkStatus : 3
* materialCode : null
* materialName : null
* poNo : null
* saleorderCode : null
*/
private int checkResultDetailId;
private int checkResultId;
private String materialBarcode;
private int materialId;
private int checkRuleId;
private String checkRuleType;
private String checkRuleName;
private String checkMode;
private double checkSample;
private String checkStatus;
private String materialCode;
private String materialName;
private String poNo;
private String saleorderCode;
private String materialType;
private boolean visbleStatus=true;
public boolean isVisbleStatus() {
return visbleStatus;
}
public void setVisbleStatus(boolean visbleStatus) {
this.visbleStatus = visbleStatus;
notifyChange();
}
public String getMaterialType() {
switch (materialType){
case "1" : return "原材料";
case "2" : return "半成品";
case "3" : return "成品";
}
return null;
}
public void setMaterialType(String materialType) {
this.materialType = materialType;
}
private List<CheckResultDetal> qmsCheckResultDetailProjectList;
private List<CheckResultDetal> qmsCheckRuleProjectList;
public List<CheckResultDetal> getQmsCheckRuleProjectList() {
return qmsCheckRuleProjectList;
}
public void setQmsCheckRuleProjectList(List<CheckResultDetal> qmsCheckRuleProjectList) {
this.qmsCheckRuleProjectList = qmsCheckRuleProjectList;
}
/**
*
*/
private String materialBatch;
public String getMaterialBatch() {
return materialBatch;
}
public void setMaterialBatch(String materialBatch) {
this.materialBatch = materialBatch;
}
public int getCheckResultDetailId() {
return checkResultDetailId;
}
public void setCheckResultDetailId(int checkResultDetailId) {
this.checkResultDetailId = checkResultDetailId;
}
public int getCheckResultId() {
return checkResultId;
}
public void setCheckResultId(int checkResultId) {
this.checkResultId = checkResultId;
}
public String getMaterialBarcode() {
return materialBarcode;
}
public void setMaterialBarcode(String materialBarcode) {
this.materialBarcode = materialBarcode;
}
public int getMaterialId() {
return materialId;
}
public void setMaterialId(int materialId) {
this.materialId = materialId;
}
public int getCheckRuleId() {
return checkRuleId;
}
public void setCheckRuleId(int checkRuleId) {
this.checkRuleId = checkRuleId;
}
/**
* 1,2,3,4
* @return
*/
public String getCheckRuleType() {
switch (checkRuleType){
case "1" : return "来料检验";
case "2" : return "半成品检验";
case "3" : return "成品检验";
case "4" : return "工序检验";
}
return checkRuleType;
}
public String getCheckRuleTypeVel() {
return checkRuleType;
}
public void setCheckRuleType(String checkRuleType) {
this.checkRuleType = checkRuleType;
}
public String getCheckRuleName() {
return checkRuleName;
}
public void setCheckRuleName(String checkRuleName) {
this.checkRuleName = checkRuleName;
}
public String getCheckMode() {
return checkMode.equals("1") ? "全检" : "抽检";
}
public String getCheckModeText() {
return checkMode;
}
public void setCheckMode(String checkMode) {
this.checkMode = checkMode;
}
public double getCheckSample() {
return checkSample;
}
public void setCheckSample(double checkSample) {
this.checkSample = checkSample;
}
public String getCheckStatus() {
if (checkStatus==null) return "";
switch (checkStatus) {
case "0":
setCheckStatus("待检验");
break;
case "1":
setCheckStatus("检验中");
break;
case "2":
setCheckStatus("质检通过");
break;
case "3":
setCheckStatus("质检不通过");
break;
}
return checkStatus;
}
public void setCheckStatus(String checkStatus) {
this.checkStatus = checkStatus;
notifyChange();
}
public String getMaterialCode() {
return materialCode;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
public String getMaterialName() {
return materialName;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public String getPoNo() {
return poNo;
}
public void setPoNo(String poNo) {
this.poNo = poNo;
}
public String getSaleorderCode() {
return saleorderCode;
}
public void setSaleorderCode(String saleorderCode) {
this.saleorderCode = saleorderCode;
}
public List<CheckResultDetal> getQmsCheckResultDetailProjectList() {
return qmsCheckResultDetailProjectList;
}
public void setQmsCheckResultDetailProjectList(List<CheckResultDetal> qmsCheckResultDetailProjectList) {
this.qmsCheckResultDetailProjectList = qmsCheckResultDetailProjectList;
}
}

@ -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,261 @@
package com.example.haiwei_mom.data.check;
import android.text.Editable;
import android.util.Log;
import androidx.databinding.BaseObservable;
/**
* @author wanghao
* @date 2024/3/1 9:27
*/
public class CheckResultDetal extends BaseObservable {
private int index;
/**
* ID
*/
private Long resultDetailProjectId;
/**
* IDqms_check_result_detailcheck_result_detail_id
*/
private Long checkResultDetailId;
/**
* IDqms_check_projectcheck_project_id
*/
private Long checkProjectId;
/**
* (1,0);
*/
private String checkProjectStatus;
/**
* ,
*/
private String checkProjectResult;
/**
*
*/
private Long projectStepOrder;
/**
*
*/
private double standardValue;
/**
*
*/
private String checkProjectName;
/**
* (1,2),
*/
private String checkProjectProperty;
/**
*
*/
private double upperDiff;
/**
*
*/
private double downDiff;
private String checkStatusShow;
private String checkStatus;
/** 创建者 */
private String createBy;
/** 创建时间 */
private String createTime;
private String materialCode;
private String materialBarcode;
public String getMaterialBarcode() {
return materialBarcode;
}
public void setMaterialBarcode(String materialBarcode) {
this.materialBarcode = materialBarcode;
}
public String getMaterialCode() {
return materialCode;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
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 getCheckStatus() {
switch (checkStatus) {
case "0":
setCheckStatus("待检验");
break;
case "1":
setCheckStatus("检验中");
break;
case "2":
setCheckStatus("质检通过");
break;
case "3":
setCheckStatus("质检不通过");
break;
}
return checkStatus;
}
public void setCheckStatus(String checkStatus) {
this.checkStatus = checkStatus;
}
public int getIndex() {
return index;
}
public void setIndex(int index) {
this.index = index;
}
public Long getResultDetailProjectId() {
return resultDetailProjectId;
}
public void setResultDetailProjectId(Long resultDetailProjectId) {
this.resultDetailProjectId = resultDetailProjectId;
}
public Long getCheckResultDetailId() {
return checkResultDetailId;
}
public void setCheckResultDetailId(Long checkResultDetailId) {
this.checkResultDetailId = checkResultDetailId;
}
public Long getCheckProjectId() {
return checkProjectId;
}
public void setCheckProjectId(Long checkProjectId) {
this.checkProjectId = checkProjectId;
}
public String getCheckProjectStatus() {
return checkProjectStatus;
}
public void setCheckProjectStatus(String checkProjectStatus) {
this.checkProjectStatus = checkProjectStatus;
}
public String getCheckProjectResult() {
return checkProjectResult;
}
public void setCheckProjectResult(String checkProjectResult) {
this.checkProjectResult = checkProjectResult;
}
public Long getProjectStepOrder() {
return projectStepOrder;
}
public void setProjectStepOrder(Long projectStepOrder) {
this.projectStepOrder = projectStepOrder;
}
public double getStandardValue() {
return standardValue;
}
public void setStandardValue(double standardValue) {
this.standardValue = standardValue;
}
public String getCheckProjectName() {
return checkProjectName;
}
public void setCheckProjectName(String checkProjectName) {
this.checkProjectName = checkProjectName;
}
public String getCheckProjectProperty() {
return checkProjectProperty;
}
public void setCheckProjectProperty(String checkProjectProperty) {
this.checkProjectProperty = checkProjectProperty;
}
public double getUpperDiff() {
return upperDiff;
}
public void setUpperDiff(double upperDiff) {
this.upperDiff = upperDiff;
}
public double getDownDiff() {
return downDiff;
}
public void setDownDiff(double downDiff) {
this.downDiff = downDiff;
}
public String getCheckStatusShow() {
if (checkProjectStatus==null||checkProjectStatus.isEmpty()){
setCheckStatusShow("");
// setCheckStatusShow("未检验");
}else if (checkProjectStatus.equals("1")){
setCheckStatusShow("合格");
} else if (checkProjectStatus.equals("0")) {
setCheckStatusShow("不合格");
}
return checkStatusShow;
}
public void setCheckStatusShow(String checkStatusShow) {
this.checkStatusShow = checkStatusShow;
notifyChange();
}
public void click(String status){
Log.e("TAG", "click:" + status);
setCheckProjectStatus(status);
// if (status.equals("1")){
// setCheckStatusShow("合格");
// } else if (checkProjectStatus.equals("0")) {
// setCheckStatusShow("不合格");
// }
}
public void textChanged(Editable s){
double result=Double.parseDouble(s.toString());
checkProjectResult=result+"";
if (result>=downDiff && result<= upperDiff){
setCheckProjectStatus("1");
}else {
setCheckProjectStatus("0");
}
}
}

@ -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,122 @@
package com.example.haiwei_mom.data.device;
import java.util.List;
/**
* @author wanghao
* @date 2024/3/20 16:33
*/
public class DeviceInspectionDetail {
private int instanceDetailId;
private int inspectInstanceId;
private int deviceId;
/**
* 1-2-3-
*/
private String instanceDetailStatus;
private String instanceDetailStatusName;
/**
*
*/
private String inspectDesc;
/**
* 1 0
*/
private String inspectStatus;
private String deviceCode;
private String deviceName;
private List<DeviceInspectionItem> dmsInspectInstanceDetailProjectList;
public String getInstanceDetailStatusName() {
switch (instanceDetailStatus) {
case "1":
instanceDetailStatusName = "待巡检";
break;
case "2":
instanceDetailStatusName = "巡检中";
break;
case "3":
instanceDetailStatusName = "已完成";
break;
}
return instanceDetailStatusName;
}
public List<DeviceInspectionItem> getDmsInspectInstanceDetailProjectList() {
return dmsInspectInstanceDetailProjectList;
}
public void setDmsInspectInstanceDetailProjectList(List<DeviceInspectionItem> dmsInspectInstanceDetailProjectList) {
this.dmsInspectInstanceDetailProjectList = dmsInspectInstanceDetailProjectList;
}
public int getInstanceDetailId() {
return instanceDetailId;
}
public void setInstanceDetailId(int instanceDetailId) {
this.instanceDetailId = instanceDetailId;
}
public int getInspectInstanceId() {
return inspectInstanceId;
}
public void setInspectInstanceId(int inspectInstanceId) {
this.inspectInstanceId = inspectInstanceId;
}
public int getDeviceId() {
return deviceId;
}
public void setDeviceId(int deviceId) {
this.deviceId = deviceId;
}
public String getInstanceDetailStatus() {
return instanceDetailStatus;
}
public void setInstanceDetailStatus(String instanceDetailStatus) {
this.instanceDetailStatus = instanceDetailStatus;
}
public String getInspectDesc() {
return inspectDesc;
}
public void setInspectDesc(String inspectDesc) {
this.inspectDesc = inspectDesc;
}
public String getInspectStatus() {
return inspectStatus;
}
public void setInspectStatus(String inspectStatus) {
this.inspectStatus = inspectStatus;
}
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;
}
}

@ -0,0 +1,145 @@
package com.example.haiwei_mom.data.device;
import androidx.databinding.BaseObservable;
/**
* @author wanghao
* @date 2024/3/21 16:03
*/
public class DeviceInspectionItem extends BaseObservable {
/**
* instanceDetailProjectId : null
* defValue : 10
* upLimit : 12
* lowLimit : 9
* inspectProjectProperty : 2
* inspectProjectResult : 11
* inspectProjectStatus :
* inspectProjectDesc : 121
*/
private int index;
private Long instanceDetailProjectId;
private double defValue;
private double upLimit;
private double lowLimit;
private String inspectProjectProperty;
private String inspectProjectName;
/**
*
*/
private String inspectProjectResult;
/**
* 0 1
*/
private String inspectProjectStatus;
private String statusName;
/**
*
*/
private String inspectProjectDesc;
public String getStatusName() {
if (inspectProjectStatus==null) return "";
else if (inspectProjectStatus.equals("0"))
return "异常";
else if (inspectProjectStatus.equals("1")) return "正常";
return "";
}
public int getIndex() {
return index;
}
public void setIndex(int index) {
this.index = index;
}
public Long getInstanceDetailProjectId() {
return instanceDetailProjectId;
}
public void setInstanceDetailProjectId(Long instanceDetailProjectId) {
this.instanceDetailProjectId = instanceDetailProjectId;
}
public String getInspectProjectName() {
return inspectProjectName;
}
public void setInspectProjectName(String inspectProjectName) {
this.inspectProjectName = inspectProjectName;
}
public double getDefValue() {
return defValue;
}
public void setDefValue(double defValue) {
this.defValue = defValue;
}
public double getUpLimit() {
return upLimit;
}
public void setUpLimit(double upLimit) {
this.upLimit = upLimit;
}
public double getLowLimit() {
return lowLimit;
}
public void setLowLimit(double lowLimit) {
this.lowLimit = lowLimit;
}
public String getInspectProjectProperty() {
return inspectProjectProperty;
}
public void setInspectProjectProperty(String inspectProjectProperty) {
this.inspectProjectProperty = inspectProjectProperty;
}
public String getInspectProjectResult() {
return inspectProjectResult;
}
public void setInspectProjectResult(String inspectProjectResult) {
this.inspectProjectResult = inspectProjectResult;
}
public String getInspectProjectStatus() {
return inspectProjectStatus;
}
public void setInspectProjectStatus(String inspectProjectStatus) {
this.inspectProjectStatus = inspectProjectStatus;
}
public String getInspectProjectDesc() {
return inspectProjectDesc;
}
public void setInspectProjectDesc(String inspectProjectDesc) {
this.inspectProjectDesc = inspectProjectDesc;
}
@Override
public String toString() {
return "DeviceInspectionItem{" +
"index=" + index +
", instanceDetailProjectId=" + instanceDetailProjectId +
", defValue=" + defValue +
", upLimit=" + upLimit +
", lowLimit=" + lowLimit +
", inspectProjectProperty='" + inspectProjectProperty + '\'' +
", inspectProjectName='" + inspectProjectName + '\'' +
", inspectProjectResult='" + inspectProjectResult + '\'' +
", inspectProjectStatus='" + inspectProjectStatus + '\'' +
", inspectProjectDesc='" + inspectProjectDesc + '\'' +
'}';
}
}

@ -0,0 +1,508 @@
package com.example.haiwei_mom.data.device;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import androidx.databinding.BaseObservable;
import java.util.ArrayList;
import java.util.List;
/**
* @author wanghao
* @date 2024/3/22 14:46
*/
public class DeviceRepair extends BaseObservable {
/**
* repairInstanceId : 17
* faultSourceType : 1
* faultSourceId : 15
* wfProcessId : 102
* billsFaultCode : 202402281121
* billsStatus : 2
* applyUser : null
* applyTime : 2024-02-28
* realBeginTime : 2024-02-28
* realEndTime : 2024-02-28
* requireEndTime : 2024-02-29
* instanceType : null
* deviceCode : 22601
* deviceName :
* deviceLocation :
* deviceSpec : 111
*/
private Long repairInstanceId;
private Long faultSourceId;
private Long wfProcessId;
private String billsFaultCode;
/**
* 0-1-2-
*/
private String billsStatus;
private String applyUser;
private String applyTime;
private String deviceCode;
private String deviceName;
//
private String deviceLocation;
private String deviceSpec;
private String realBeginTime;
private String realEndTime;
private String requireEndTime;
private String instanceType;
// 显示数据
private String billsStatusName;
private boolean selectStatus;
/**
* isFlag : 1
* instanceActivityId : null
* faultType : 2
* faultDescription :
* designOperations : ,
*/
private String isFlag;
private String faultType;
private String faultDescription;
private String designOperations;
// 图片
private List<InstanceFile> dmsInstanceFiles;
// 提交
private Long instanceActivityId;
private int repairType;
// 故障类别
private String faultSourceType;
private String faultSourceTypeName;
// 外协单位
private List<Outsourcing> outsourcingList;
private List<String> outsourcingNameList;
private int outsrcId;
private int outsrcIdIndex;
private String outsrcName;
// 新增 待审批字段1是待审批2成功3失败不是2的情况下才可以修改只有2的时候才可以开始
private String approveStatus;
public List<String> getOutsourcingNameList() {
return outsourcingNameList;
}
public String getApproveStatus() {
return approveStatus;
}
public void setApproveStatus(String approveStatus) {
this.approveStatus = approveStatus;
}
public void setOutsourcingNameList(List<String> outsourcingNameList) {
this.outsourcingNameList = outsourcingNameList;
notifyChange();
}
public List<Outsourcing> getOutsourcingList() {
return outsourcingList;
}
private String checkedFault;// 检查后的故障判断
public void setOutsourcingList(List<Outsourcing> outsourcingList) {
this.outsourcingList = outsourcingList;
outsourcingNameList = new ArrayList<>(outsourcingList.size());
for (int i = 0; i < outsourcingList.size(); i++) {
Outsourcing outsourcing = outsourcingList.get(i);
outsourcingNameList.add(outsourcing.getOutsrcName());
if (outsourcing.getOutsrcId() == outsrcId) {
// this.outsrcName=t.getOutsrcName();
this.outsrcIdIndex = i;
Log.e("TAG", "setOutsourcingList:" + i);
}
}
/* (t->{
;
});*/
notifyChange();
}
public int getOutsrcIdIndex() {
return outsrcIdIndex;
}
public void selectOutSourcingID(AdapterView<?> parent, View view, int position, long id) {
this.outsrcId = outsourcingList.get(position).getOutsrcId();
this.outsrcIdIndex = position;
}
public String getOutsrcName() {
return outsrcName;
}
public void setOutsrcName(String outsrcName) {
this.outsrcName = outsrcName;
}
public String getFaultSourceTypeName() {
return faultSourceTypeName;
}
public void setFaultSourceTypeName(String faultSourceTypeName) {
this.faultSourceTypeName = faultSourceTypeName;
notifyChange();
}
public int getRepairType() {
return repairType;
}
public String getCheckedFault() {
return checkedFault;
}
public void setCheckedFault(String checkedFault) {
this.checkedFault = checkedFault;
}
public void setOutsrcIdIndex(int outsrcIdIndex) {
this.outsrcIdIndex = outsrcIdIndex;
notifyChange();
}
public void setRepairType(int repairType) {
this.repairType = repairType;
}
private boolean radioState1;
private boolean radioState2;
public void repairTypeSelect(int type) {
repairType = type;
// radioState = (type == 2);
if (type == 1) {
setRadioState1(true);
setRadioState2(false);
} else {
setRadioState1(false);
setRadioState2(true);
}
// notifyChange();
}
public boolean isRadioState1() {
return radioState1;
}
public void setRadioState1(boolean radioState1) {
this.radioState1 = radioState1;
notifyChange();
}
public boolean isRadioState2() {
return radioState2;
}
public void setRadioState2(boolean radioState2) {
this.radioState2 = radioState2;
notifyChange();
}
public Long getInstanceActivityId() {
return instanceActivityId;
}
public void setInstanceActivityId(Long instanceActivityId) {
this.instanceActivityId = instanceActivityId;
}
public int getOutsrcId() {
return outsrcId;
}
public void setOutsrcId(int outsrcId) {
this.outsrcId = outsrcId;
}
public List<InstanceFile> getDmsInstanceFiles() {
return dmsInstanceFiles;
}
public void setDmsInstanceFiles(List<InstanceFile> dmsInstanceFiles) {
this.dmsInstanceFiles = dmsInstanceFiles;
}
public String getBillsStatusName() {
switch (billsStatus) {
case "0":
return "待维修";
case "1":
return "维修中";
case "2":
return "维修完成";
}
return billsStatusName;
}
public boolean isSelectStatus() {
try {
// Log.e("TAG", billsFaultCode+"-" + billsStatus+"-"+approveStatus);
if (billsStatus.equals("0")&& !approveStatus.equals("2")) {
selectStatus = true;
} else {
selectStatus = false;
}
}catch (NullPointerException e){
// e.printStackTrace();
Log.e("TAG", "状态字段为null单号:" +billsFaultCode );
return false;
}
return selectStatus;
}
public Long getRepairInstanceId() {
return repairInstanceId;
}
public void setRepairInstanceId(Long repairInstanceId) {
this.repairInstanceId = repairInstanceId;
}
public String getFaultSourceType() {
return faultSourceType;
}
public void setFaultSourceType(String faultSourceType) {
this.faultSourceType = faultSourceType;
}
public Long getFaultSourceId() {
return faultSourceId;
}
public void setFaultSourceId(Long faultSourceId) {
this.faultSourceId = faultSourceId;
}
public Long getWfProcessId() {
return wfProcessId;
}
public void setWfProcessId(Long wfProcessId) {
this.wfProcessId = wfProcessId;
}
public String getBillsFaultCode() {
return billsFaultCode;
}
public void setBillsFaultCode(String billsFaultCode) {
this.billsFaultCode = billsFaultCode;
}
public String getBillsStatus() {
return billsStatus;
}
public void setBillsStatus(String billsStatus) {
this.billsStatus = billsStatus;
}
public String getApplyUser() {
return applyUser;
}
public void setApplyUser(String applyUser) {
this.applyUser = applyUser;
}
public String getApplyTime() {
return applyTime;
}
public void setApplyTime(String applyTime) {
this.applyTime = applyTime;
}
public String getRealBeginTime() {
return realBeginTime;
}
public void setRealBeginTime(String realBeginTime) {
this.realBeginTime = realBeginTime;
}
public String getRealEndTime() {
return realEndTime;
}
public void setRealEndTime(String realEndTime) {
this.realEndTime = realEndTime;
}
public String getRequireEndTime() {
return requireEndTime;
}
public void setRequireEndTime(String requireEndTime) {
this.requireEndTime = requireEndTime;
}
public String getInstanceType() {
return instanceType;
}
public void setInstanceType(String instanceType) {
this.instanceType = instanceType;
}
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 String getDeviceSpec() {
return deviceSpec;
}
public void setDeviceSpec(String deviceSpec) {
this.deviceSpec = deviceSpec;
}
public String getIsFlag() {
return isFlag;
}
public void setIsFlag(String isFlag) {
this.isFlag = isFlag;
}
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 String getDesignOperations() {
return designOperations;
}
public void setDesignOperations(String designOperations) {
this.designOperations = designOperations;
notifyChange();
}
private String processHandleResolution;// 维修描述
public String getProcessHandleResolution() {
return processHandleResolution;
}
public void setProcessHandleResolution(String processHandleResolution) {
this.processHandleResolution = processHandleResolution;
}
/**
* 11-19
*
*/
private String repairContent; // 维修内容
private String protectedMethod;// 保护措施
private List<DeviceRepairPart> parts;// 所用零部件
private List<InstanceFile> dmsInstanceFiles1;//维修完成的图片
public List<InstanceFile> getDmsInstanceFiles1() {
return dmsInstanceFiles1;
}
public void setDmsInstanceFiles1(List<InstanceFile> dmsInstanceFiles1) {
this.dmsInstanceFiles1 = dmsInstanceFiles1;
}
public List<DeviceRepairPart> getParts() {
return parts;
}
public void setParts(List<DeviceRepairPart> parts) {
this.parts = parts;
}
public String getRepairContent() {
return repairContent;
}
public void setRepairContent(String repairContent) {
this.repairContent = repairContent;
}
public String getProtectedMethod() {
return protectedMethod;
}
public void setProtectedMethod(String protectedMethod) {
this.protectedMethod = protectedMethod;
}
/**
*
*/
private String deviceCodeTag;// 开始前 验证的设备编码
public String getDeviceCodeTag() {
return deviceCodeTag;
}
public void setDeviceCodeTag(String deviceCodeTag) {
this.deviceCodeTag = deviceCodeTag;
notifyChange();
}
}

@ -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,180 @@
package com.example.haiwei_mom.data.device;
import java.util.List;
/**
* @author wanghao
* @date 2024/3/27 15:48
*/
public class MaintainBeen {
/**
* createBy : null
* createTime : 2024-03-21 15:49:38
* updateBy : null
* updateTime : null
* remark : null
* maintInstanceId : 9
* planMaintId : null
* wfProcessId : 103
* billsMaintCode : 20240321154938MI005
* planBeginTime : 2024-03-21
* realBeginTime : null
* planEndTime : 2024-03-22
* realEndTime : null
* maintStatus : 1
* maintCompRate : null
* isFlag : null
* maintLevel : 1
* maintGroup : 1
* maintSupervisor :
* maintStatusStr : null
* dmsBillsMaintDetailList : []
*/
private String createTime;
private int maintInstanceId;
private int wfProcessId;
private String billsMaintCode;
private String planEndTime;
private Long maintLevel;
private String maintLevelName;
private String maintGroup;
private String maintSupervisor;
private String maintStatusStr;
private Long maintStatus;
private List<MaintainDetail> dmsBillsMaintDetailList;
public void setMaintLevelName(String maintLevelName) {
this.maintLevelName = maintLevelName;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public int getMaintInstanceId() {
return maintInstanceId;
}
public void setMaintInstanceId(int maintInstanceId) {
this.maintInstanceId = maintInstanceId;
}
public int getWfProcessId() {
return wfProcessId;
}
public void setWfProcessId(int wfProcessId) {
this.wfProcessId = wfProcessId;
}
public String getBillsMaintCode() {
return billsMaintCode;
}
public void setBillsMaintCode(String billsMaintCode) {
this.billsMaintCode = billsMaintCode;
}
public String getPlanEndTime() {
return planEndTime;
}
public void setPlanEndTime(String planEndTime) {
this.planEndTime = planEndTime;
}
public Long getMaintLevel() {
// 保养级别1-日常保养2-月度保养3-年度保养
return maintLevel;
}
public String getMaintLevelName() {
if (maintLevel==null) return "";
if (maintLevel ==1 ) {
return "日常保养";
} else if (maintLevel ==2) {
return "月度保养";
} else if (maintLevel ==3) {
return "年度保养";
}
return maintLevelName;
}
public void setMaintLevel(Long maintLevel) {
this.maintLevel = maintLevel;
}
public Long getMaintStatus() {
return maintStatus;
}
public void setMaintStatus(Long maintStatus) {
this.maintStatus = maintStatus;
}
public String getMaintGroup() {
return maintGroup;
}
public void setMaintGroup(String maintGroup) {
this.maintGroup = maintGroup;
}
public String getMaintSupervisor() {
return maintSupervisor;
}
public void setMaintSupervisor(String maintSupervisor) {
this.maintSupervisor = maintSupervisor;
}
public String getMaintStatusStr() {
if (maintStatus==null) return "null";
if (maintStatus==1) {
return "待保养";
} else if (maintStatus==2) {
return "保养中";
} else if (maintStatus ==3) {
return "保养完成";
}
return maintStatusStr;
}
public void setMaintStatusStr(String maintStatusStr) {
this.maintStatusStr = maintStatusStr;
}
public List<MaintainDetail> getDmsBillsMaintDetailList() {
return dmsBillsMaintDetailList;
}
public void setDmsBillsMaintDetailList(List<MaintainDetail> dmsBillsMaintDetailList) {
this.dmsBillsMaintDetailList = dmsBillsMaintDetailList;
}
@Override
public String toString() {
return "MaintainBeen{" +
"createTime='" + createTime + '\'' +
", maintInstanceId=" + maintInstanceId +
", wfProcessId=" + wfProcessId +
", billsMaintCode='" + billsMaintCode + '\'' +
", planEndTime='" + planEndTime + '\'' +
", maintLevel='" + maintLevel + '\'' +
", maintLevelName='" + maintLevelName + '\'' +
", maintGroup='" + maintGroup + '\'' +
", maintSupervisor='" + maintSupervisor + '\'' +
", maintStatusStr='" + maintStatusStr + '\'' +
", maintStatus='" + maintStatus + '\'' +
", dmsBillsMaintDetailList=" + dmsBillsMaintDetailList +
'}';
}
}

@ -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);
}
}

@ -90,7 +90,6 @@ public class RawReturnActivity extends BaseActivity {
sub.setOutstockRecordId(params.getOutstockRecordId());
// 修改出库
sub.setOutstockRecordId(params.getOutstockRecordId());
OkGo.<MyResult>post(url + "/wms/pda/raw/returnSubmit")
.upRequestBody(RequestBody.create(JSON, gson.toJson(sub)))
.execute(new MyRecultCall(dialog, context) {
@ -110,9 +109,7 @@ public class RawReturnActivity extends BaseActivity {
@Override
public void getScannerData(String data) {
super.getScannerData(data);
binding.rawReturnCode.setText(data);
selectCode();
}

@ -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>

Binary file not shown.

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="扫描设备&amp;开始" />
</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>

@ -124,9 +124,9 @@
style="@style/text_edit"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:hint="输入退回数量"
android:inputType="numberDecimal"
android:text="@={vo.planAmount}"
android:hint="输入退回数量"/>
android:text="@={vo.planAmount}" />
</LinearLayout>
<Button

@ -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,73 @@
<?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="vm"
type="com.example.haiwei_mom.data.check.CheckActivitieBeen" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="151dp"
android:background="@color/white"
android:paddingTop="5dp">
<TextView
android:id="@+id/textView"
style="@style/item_title"
android:layout_width="70dp"
android:layout_height="30dp"
android:layout_marginStart="40dp"
android:text='@{"处理人"+vm.processStepOrder +""}'
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView2"
style="@style/item_title"
android:layout_width="40dp"
android:layout_height="30dp"
android:text='@{vm.createBy??"你"}'
app:layout_constraintStart_toEndOf="@+id/textView"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView3"
style="@style/item_title"
android:layout_width="140dp"
android:layout_height="30dp"
android:text="@{vm.createTime}"
app:layout_constraintStart_toEndOf="@+id/textView2"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/editText"
android:layout_width="0dp"
android:layout_height="100dp"
android:background="@drawable/san_text_bg"
android:gravity="left"
android:padding="5dp"
android:text="@={vm.processHandleResolution}"
android:enabled="@{vm.editedAble}"
android:layout_marginRight="40dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="@+id/textView"
app:layout_constraintTop_toBottomOf="@+id/textView" />
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:background="@color/item_bg"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 877 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

@ -5,4 +5,5 @@
<color name="activity_bg">#F2F3F5</color>
<color name="blue">#3073ff</color>
<color name="item_bg">#DEE3E6</color>
<color name="yellow">#FFC107</color>
</resources>

@ -83,4 +83,36 @@
<item name="android:background">#e1e1e1</item>
<item name="android:layout_gravity">center</item>
</style>
<style name="item_title">
<item name="android:textSize">13sp</item>
<item name="android:gravity">center</item>
<item name="android:textColor">@color/black</item>
</style>
<style name="dialog_style" parent="@android:style/Theme.Dialog">
<!-- 边框 -->
<item name="android:windowFrame">@null</item>
<!-- 是否浮现在activity之上 -->
<item name="android:windowIsFloating">true</item>
<!-- 半透明 -->
<item name="android:windowIsTranslucent">true</item>
<!-- 无标题 -->
<item name="android:windowNoTitle">true</item>
<item name="android:background">@android:color/transparent</item>
<!-- 背景透明 -->
<item name="android:windowBackground">@android:color/transparent</item>
<!-- 模糊 -->
<item name="android:backgroundDimEnabled">true</item>
<!-- 遮罩层 -->
<item name="android:backgroundDimAmount">0.5</item>
<!--对话框动画-->
<!-- <item name="android:windowAnimationStyle">@style/dialog_anim_bottom2top</item>-->
</style>
<style name="item_info">
<item name="android:textSize">13sp</item>
<item name="android:gravity">center</item>
<item name="android:textColor">@color/black</item>
<item name="android:background">@drawable/text_bg</item>
</style>
</resources>

@ -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>
Loading…
Cancel
Save