Browse Source

2022年10月19日 最近bug抢维修工单修改

yujialin 2 years ago
parent
commit
a7475a7f83
26 changed files with 997 additions and 327 deletions
  1. 5 2
      app/build.gradle
  2. 1 1
      app/src/main/java/com/tofly/dewater/factory/ItemHomeBeanFactory.java
  3. 22 18
      app/src/main/java/com/tofly/dewater/rs/imp/EventImpl.java
  4. 9 12
      app/src/main/java/com/tofly/dewater/rs/ui/avtivity/DispatchDetailActivity.java
  5. 26 5
      app/src/main/java/com/tofly/dewater/ui/activity/EmergeUploadDetailsActivity.java
  6. 44 26
      app/src/main/java/com/tofly/dewater/ui/activity/NormalUploadDetailsActivity.java
  7. 1 3
      app/src/main/java/com/tofly/dewater/ui/delegate/EventRecordFragment.java
  8. 2 0
      app/src/main/java/com/tofly/dewater/ui/delegate/MessageDelegate.java
  9. 2 1
      app/src/main/java/com/tofly/dewater/ui/delegate/TunnelRecordFragment.java
  10. 7 0
      app/src/main/java/com/tofly/dewater/ui/net/Api.java
  11. 13 2
      app/src/main/java/com/tofly/dewater/utils/RequestBodyUtils.java
  12. 76 0
      app/src/main/java/com/tofly/dewater/utils/VideoProcessorUtils.java
  13. 78 0
      app/src/main/java/com/tofly/route/bean/LocalItemMaterialEntity.java
  14. 9 0
      app/src/main/java/com/tofly/route/bean/repair/MaterialTypeBean.java
  15. 175 57
      app/src/main/java/com/tofly/route/ui/activity/MaterialActivity.java
  16. 25 3
      app/src/main/java/com/tofly/route/ui/activity/UiRepairJobProcess.java
  17. 37 0
      app/src/main/java/com/tofly/route/ui/adapter/MarerialLocalListAdapter.java
  18. 32 0
      app/src/main/java/com/tofly/route/ui/imp/MaterialImpl.java
  19. 1 1
      app/src/main/java/com/tofly/route/util/AmapUtils/AmapLocationUtils.java
  20. 23 0
      app/src/main/res/drawable/text_bg_delete.xml
  21. 228 182
      app/src/main/res/layout/activity_dispatch_detail.xml
  22. 74 14
      app/src/main/res/layout/activity_material.xml
  23. 92 0
      app/src/main/res/layout/item_metrial_local_list.xml
  24. 1 0
      app/src/main/res/layout/layout_repair_process_report_module.xml
  25. 11 0
      app/src/main/res/layout/ui_repair_found.xml
  26. 3 0
      app/src/main/res/values/strings.xml

+ 5 - 2
app/build.gradle

@@ -18,8 +18,8 @@ android {
         applicationId "com.tofly.dewater"
         minSdkVersion MIN_SDK_VERSION
         targetSdkVersion TARGET_SDK_VERSION as int
-        versionCode 14
-        versionName "1.4"
+        versionCode 15
+        versionName "1.5"
         flavorDimensions "versionCode"
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
 //        buildFeatures.dataBinding = true
@@ -156,4 +156,7 @@ dependencies {
     implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
     implementation 'androidx.core:core-ktx:1.3.1'
 
+
+    implementation 'com.github.yellowcath:VideoProcessor:2.3.0'
+
 }

+ 1 - 1
app/src/main/java/com/tofly/dewater/factory/ItemHomeBeanFactory.java

@@ -60,7 +60,7 @@ public class ItemHomeBeanFactory {
             setItemBean("隐患上报", R.mipmap.ic_main_trouble, UiTroubleList.class, false);
             /*抢维修工单 仁寿排水好像没有*/
             if (!NetRequestURL.isExternaRs)
-                setItemBean("抢维修工单", R.mipmap.icon_repir, UiRepair.class, true);
+                setItemBean("抢维修工单", R.mipmap.icon_repir, UiRepair.class, false);
         }
 
         if (MyApp.getInstance().getPower().isXunJianJiHua()) {

+ 22 - 18
app/src/main/java/com/tofly/dewater/rs/imp/EventImpl.java

@@ -95,28 +95,32 @@ public class EventImpl extends LattePresenterImpl {
     public void getResultSix(Context context, Map<String, RequestBody> files, Map<String, Object> map) {
         super.getResultSix(context, files, map);
         if (isViewAttached()) {
-            LatteNetWorkApi.getApiService(ApiRs.class)
-                    .postEventMange(files)
-                    .compose(RxHelper.observableIO2Main(Latte.getApplicationContext()))
-                    .subscribe(new MyObserver<BaseResponse>(context) {
-                        @Override
-                        public void onSuccess(BaseResponse demo) {
-                            if (isViewAttached()) {
-                                if (demo.getCode() == 1) {
-                                    getView().getResultSix(demo.getMessage());
-                                } else {
-                                    ToastUtil.showToast(demo.getMessage());
+            try {
+                LatteNetWorkApi.getApiService(ApiRs.class)
+                        .postEventMange(files)
+                        .compose(RxHelper.observableIO2Main(Latte.getApplicationContext()))
+                        .subscribe(new MyObserver<BaseResponse>(context) {
+                            @Override
+                            public void onSuccess(BaseResponse demo) {
+                                if (isViewAttached()) {
+                                    if (demo.getCode() == 1) {
+                                        getView().getResultSix(demo.getMessage());
+                                    } else {
+                                        ToastUtil.showToast(demo.getMessage());
+                                    }
                                 }
                             }
-                        }
 
-                        @Override
-                        public void onFailure(Throwable e, String errorMsg) {
-                            if (e != null) {
-                                ToastUtil.showToast(errorMsg);
+                            @Override
+                            public void onFailure(Throwable e, String errorMsg) {
+                                if (e != null) {
+                                    ToastUtil.showToast(errorMsg);
+                                }
                             }
-                        }
-                    });
+                        });
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
         }
     }
 }

+ 9 - 12
app/src/main/java/com/tofly/dewater/rs/ui/avtivity/DispatchDetailActivity.java

@@ -408,9 +408,6 @@ public class DispatchDetailActivity extends TakePhotoActivity {
                 }
 
 
-
-
-
                 if (detail.getMajorUserHandle() != null) {
                     if (detail.getMajorUserHandle().getUserName() != null) {
                         binding.tvTodoUser.setText(detail.getMajorUserHandle().getUserName());
@@ -495,18 +492,18 @@ public class DispatchDetailActivity extends TakePhotoActivity {
                 }
 
                 String filePathList = floodSeasonWVo.getFilePathList();
-//                if (filePathList != null ) {
+//                if (filePathList != null) {
 //
 //                    String[] split = filePathList.split(",");
 //                    for (String ss : split) {
-//                                    FilePathBean filePathBean = new FilePathBean();
-//                                    filePathBean.setId(ss.getId());
-//                                    filePathBean.setName(ss.getFileName());
-//                                    filePathBean.setPathUrl(AccountManager.getPictureUrl() + ss.getFilePath());
-//                                    djList.add(filePathBean);
-//                                }
-//                               adapter.setPhotos(djList);
-//                            }
+//                        FilePathBean filePathBean = new FilePathBean();
+//                        filePathBean.setId(ss.getId());
+//                        filePathBean.setName(ss.getFileName());
+//                        filePathBean.setPathUrl(AccountManager.getPictureUrl() + ss.getFilePath());
+//                        djList.add(filePathBean);
+//                    }
+//                    adapter.setPhotos(djList);
+//                }
 
 
                 if (detail.getMajorUserHandle() != null) {

+ 26 - 5
app/src/main/java/com/tofly/dewater/ui/activity/EmergeUploadDetailsActivity.java

@@ -8,6 +8,8 @@ import android.content.Context;
 import android.content.Intent;
 import android.net.Uri;
 import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
 import android.text.Editable;
 import android.text.TextUtils;
 import android.text.TextWatcher;
@@ -18,6 +20,7 @@ import android.view.Window;
 import android.view.WindowManager;
 import android.widget.AdapterView;
 
+import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 import androidx.appcompat.app.ActionBar;
 import androidx.databinding.DataBindingUtil;
@@ -45,6 +48,7 @@ import com.tofly.dewater.utils.DateUtils;
 import com.tofly.dewater.utils.RequestBodyUtils;
 import com.tofly.dewater.utils.SpinnerUtils;
 import com.tofly.dewater.utils.ToastUtil;
+import com.tofly.dewater.utils.VideoProcessorUtils;
 import com.tofly.dewater.utils.db.DaoUtilsStore;
 import com.tofly.dewater.utils.db.DbUtils;
 import com.tofly.latte_core.base.LatteContract;
@@ -342,7 +346,7 @@ public class EmergeUploadDetailsActivity extends TakePhotoActivity implements Au
             event.setDetail(desStr);
             // TODO: 2022/6/16  关联设备
             fileList.put("facility", RequestBodyUtils.toRequestBodyString(desStr + ""));
-            event.setFacility(binding.tvDevName.getText().toString().trim()+"");
+            event.setFacility(binding.tvDevName.getText().toString().trim() + "");
             fileList.put("name", RequestBodyUtils.toRequestBodyString(eventNameStr + ""));
             event.setName(eventNameStr);
             fileList.put("x", RequestBodyUtils.toRequestBodyString(mLocation.getX() + ""));
@@ -800,6 +804,19 @@ public class EmergeUploadDetailsActivity extends TakePhotoActivity implements Au
     }
 
 
+    Handler handler = new Handler() {
+        @Override
+        public void handleMessage(@NonNull Message msg) {
+            super.handleMessage(msg);
+            hideLoading();
+            String path = (String) msg.obj;
+            FilePathBean filePathBean = new FilePathBean();
+            filePathBean.setPathUrl(path);
+            videos.add(filePathBean);
+            videoAdapter.setPhotos(videos);
+        }
+    };
+
     @Override
     protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
         super.onActivityResult(requestCode, resultCode, data);
@@ -816,10 +833,14 @@ public class EmergeUploadDetailsActivity extends TakePhotoActivity implements Au
 
             } else if (requestCode == VIDEO_REQUEST_CODE) {
                 Uri data1 = data.getData();
-                FilePathBean filePathBean = new FilePathBean();
-                filePathBean.setPathUrl(data1.toString().replace("content://com.tofly.dewater.fileprovider/camera_photos", ""));
-                videos.add(filePathBean);
-                videoAdapter.setPhotos(videos);
+                String replace = data1.toString().replace("content://com.tofly.dewater.fileprovider/camera_photos", "");
+
+
+                showLoading("视频压缩中...");
+                VideoProcessorUtils.compressVideo2(this, replace, msg -> {
+                    handler.sendMessage(msg);
+                    return false;
+                });
             } else if (requestCode == C.REQUEST_CODE.SELECT_DEVICE_REQUEST_CODE_BY && resultCode == Activity.RESULT_OK) {
                 Bundle bundle = data.getExtras();
                 if (bundle != null) {

+ 44 - 26
app/src/main/java/com/tofly/dewater/ui/activity/NormalUploadDetailsActivity.java

@@ -8,10 +8,11 @@ import android.content.Context;
 import android.content.Intent;
 import android.net.Uri;
 import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
 import android.text.Editable;
 import android.text.TextUtils;
 import android.text.TextWatcher;
-import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.MotionEvent;
 import android.view.View;
@@ -19,6 +20,7 @@ import android.view.Window;
 import android.view.WindowManager;
 import android.widget.AdapterView;
 
+import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 import androidx.appcompat.app.ActionBar;
 import androidx.databinding.DataBindingUtil;
@@ -48,6 +50,7 @@ import com.tofly.dewater.utils.EventBusUtil;
 import com.tofly.dewater.utils.RequestBodyUtils;
 import com.tofly.dewater.utils.SpinnerUtils;
 import com.tofly.dewater.utils.ToastUtil;
+import com.tofly.dewater.utils.VideoProcessorUtils;
 import com.tofly.dewater.utils.db.DaoUtilsStore;
 import com.tofly.dewater.utils.db.DbUtils;
 import com.tofly.latte_core.base.LatteContract;
@@ -119,6 +122,7 @@ public class NormalUploadDetailsActivity extends TakePhotoActivity implements Au
     private String detailsStr;
     private String addressStr;
     private boolean isNeedSendSms;
+    private boolean isUpdate = false;
 
     @Override
     protected LatteContract.LattePresenter createPresenter() {
@@ -184,7 +188,10 @@ public class NormalUploadDetailsActivity extends TakePhotoActivity implements Au
 
 
         if (item != null) {
-            //绑定数据
+            //当前数据属于
+
+
+            isUpdate = true;
 
             //本地ID
             id = item.getId();
@@ -197,7 +204,7 @@ public class NormalUploadDetailsActivity extends TakePhotoActivity implements Au
 
     private void bindData(EventMangeBean item) {
 
-
+        initEventTypeAndViews((Integer.valueOf(item.getCategory()) - 1));
         binding.etInputEventName.setText(item.getName());
 
         binding.tvDevName.setText(item.getFacility());
@@ -218,7 +225,6 @@ public class NormalUploadDetailsActivity extends TakePhotoActivity implements Au
                 if (s.endsWith(".jpg")) {
                     //照片
                     FilePathBean filePathBean = new FilePathBean();
-
                     if (s.contains("event"))
                         filePathBean.setPathUrl(AccountManager.getPictureUrl() + s);
                     else
@@ -292,8 +298,6 @@ public class NormalUploadDetailsActivity extends TakePhotoActivity implements Au
                 if (eventMangeBean != null) {
                     eventMangeBean.setIsUpload(1);
                     boolean update = eventMangeBeanDao.delete(eventMangeBean);
-                    Log.e("TAG", "initListener: -----update-----" + update);
-
                     EventBusUtil.postSticky(new XjUserSelectActivity.XjUserSelectEvent(UPDATE_CODE, null));
 
                 }
@@ -307,22 +311,16 @@ public class NormalUploadDetailsActivity extends TakePhotoActivity implements Au
             if (isOverTime()) {
 
                 if (checkData()) {
-                    EventMangeBean eventMangeBean = eventMangeBeanDao.queryByQueryBuilderOne(EventMangeBeanDao.Properties.Name.eq(event.getName()),
-                            EventMangeBeanDao.Properties.Detail.eq(event.getDetail()));
-                    if (eventMangeBean != null) {
-                        eventMangeBeanDao.update(eventMangeBean);
+                    if (isUpdate) {
+                        event.setId(id);
+                        eventMangeBeanDao.update(event);
                         ToastUtil.showToast("更新成功");
-                        this.finish();
                         return;
+                    } else {
+                        boolean insert = eventMangeBeanDao.insert(event);
                     }
-
-                    boolean insert = eventMangeBeanDao.insert(event);
-
-                    if (insert) {
-                        setResult(RESULT_OK);
-                        this.finish();
-                    }
-
+                    this.finish();
+                    setResult(RESULT_OK);
                 }
 
             }
@@ -467,7 +465,7 @@ public class NormalUploadDetailsActivity extends TakePhotoActivity implements Au
 
 
                 List<String> filesPath = new ArrayList<>();
-                if (imgs.size() > 1) {
+                if (imgs.size() > 0) {
                     for (FilePathBean s : imgs) {
                         String pathUrl = s.getPathUrl();
                         if (pathUrl != null) {
@@ -479,7 +477,7 @@ public class NormalUploadDetailsActivity extends TakePhotoActivity implements Au
                         }
                     }
                 }
-                if (videos.size() > 1) {
+                if (videos.size() > 0) {
                     for (FilePathBean s : videos) {
                         String pathUrl = s.getPathUrl();
                         if (pathUrl != null) {
@@ -491,7 +489,7 @@ public class NormalUploadDetailsActivity extends TakePhotoActivity implements Au
 
                     }
                 }
-                if (audios.size() > 1) {
+                if (audios.size() > 0) {
                     for (FilePathBean s : audios) {
                         String pathUrl = s.getPathUrl();
                         if (pathUrl != null) {
@@ -818,6 +816,20 @@ public class NormalUploadDetailsActivity extends TakePhotoActivity implements Au
         mPresenter.getResultTwo(this, map);
     }
 
+
+    Handler handler = new Handler() {
+        @Override
+        public void handleMessage(@NonNull Message msg) {
+            super.handleMessage(msg);
+            hideLoading();
+            String path = (String) msg.obj;
+            FilePathBean filePathBean = new FilePathBean();
+            filePathBean.setPathUrl(path);
+            videos.add(filePathBean);
+            videoAdapter.setPhotos(videos);
+        }
+    };
+
     @Override
     protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
         super.onActivityResult(requestCode, resultCode, data);
@@ -834,10 +846,16 @@ public class NormalUploadDetailsActivity extends TakePhotoActivity implements Au
 
             } else if (requestCode == VIDEO_REQUEST_CODE) {
                 Uri data1 = data.getData();
-                FilePathBean filePathBean = new FilePathBean();
-                filePathBean.setPathUrl(data1.toString().replace("content://com.tofly.dewater.fileprovider/camera_photos", ""));
-                videos.add(filePathBean);
-                videoAdapter.setPhotos(videos);
+
+                String replace = data1.toString().replace("content://com.tofly.dewater.fileprovider/camera_photos", "");
+
+
+                showLoading("视频压缩中...");
+                VideoProcessorUtils.compressVideo2(this, replace, msg -> {
+                    handler.sendMessage(msg);
+                    return false;
+                });
+
             } else if (requestCode == C.REQUEST_CODE.SELECT_DEVICE_REQUEST_CODE_BY && resultCode == Activity.RESULT_OK) {
                 Bundle bundle = data.getExtras();
                 if (bundle != null) {

+ 1 - 3
app/src/main/java/com/tofly/dewater/ui/delegate/EventRecordFragment.java

@@ -127,6 +127,7 @@ public class EventRecordFragment extends LatteDelegate {
                         } else {
                             ToastUtil.showToast("删除失败,请重试");
                         }
+                      adapter1.getData().remove(position);
 
                         adapter.notifyDataSetChanged();
                     }
@@ -269,10 +270,7 @@ public class EventRecordFragment extends LatteDelegate {
     @Override
     public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
         super.onActivityResult(requestCode, resultCode, data);
-
-
         if (resultCode == RESULT_OK){
-
             if (requestCode==NEED_UPDATE_LOCAL_DATA){
                 //刷新数据
                 getDataByCondition();

+ 2 - 0
app/src/main/java/com/tofly/dewater/ui/delegate/MessageDelegate.java

@@ -5,6 +5,7 @@ import android.content.Intent;
 import android.os.Bundle;
 import android.text.TextUtils;
 import android.view.View;
+import android.widget.Toast;
 
 import androidx.recyclerview.widget.RecyclerView;
 import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
@@ -98,6 +99,7 @@ public class MessageDelegate extends LatteDelegate {
                 mapp.put("messageIds", messageEntity.getId());
                 mPresenter.getResultTwo(getContext(), mapp);
             }
+            //根据后台配置路由地址做跳转
             if (!TextUtils.isEmpty(messageEntity.getRouteIpApp())) {
                 intoActivity(messageEntity.getRouteIpApp(), messageEntity.getTableId());
             }

+ 2 - 1
app/src/main/java/com/tofly/dewater/ui/delegate/TunnelRecordFragment.java

@@ -237,7 +237,7 @@ public class TunnelRecordFragment extends LatteDelegate {
                 if (!TextUtils.isEmpty(input)) {
                     list = floodSeasonBeanDao.queryByQueryBuilderOr(FloodSeasonBeanDao.Properties.Id,
                             FloodSeasonBeanDao.Properties.Facility.like("%" + input + "%"),
-                            FloodSeasonBeanDao.Properties.Facility.like("%" + input + "%")
+                            FloodSeasonBeanDao.Properties.Address.like("%" + input + "%")
                     );
                 } else {
                     list = floodSeasonBeanDao.queryByQueryBuilderByOrderDes(FloodSeasonBeanDao.Properties.Id);
@@ -246,6 +246,7 @@ public class TunnelRecordFragment extends LatteDelegate {
                 if (!TextUtils.isEmpty(input)) {
                     list = floodSeasonBeanDao.queryByQueryBuilderOr(FloodSeasonBeanDao.Properties.Id,
                             FloodSeasonBeanDao.Properties.Facility.like("%" + input + "%"),
+                            FloodSeasonBeanDao.Properties.Address.like("%" + input + "%"),
                             // 0 1 代表是否警情
                             FloodSeasonBeanDao.Properties.Police.eq(checkTypeItemPosition - 1));
                 } else {

+ 7 - 0
app/src/main/java/com/tofly/dewater/ui/net/Api.java

@@ -573,6 +573,13 @@ public interface Api {
     @GET("/gps/repairmaterial/page")
     Observable<BaseResponse<PageInfo<MaterialTypeBean, OrdersEntity>>> getMaterialType();
 
+
+
+    /**
+     * 材料类型 repairmaterial
+     */
+    @GET("/gps/repairmaterial/page")
+    Observable<BaseResponse<PageInfo<MaterialTypeBean, OrdersEntity>>> getMaterialType(@QueryMap Map<String, Object> map);
     /**
      * 审核列表统计
      */

+ 13 - 2
app/src/main/java/com/tofly/dewater/utils/RequestBodyUtils.java

@@ -43,7 +43,7 @@ public class RequestBodyUtils {
             //首先判断是不是图片文件
             String name = value.getName();
             MediaType mediaType = MediaType.parse("multipart/form-data");
-            if (name.endsWith(".png") || name.endsWith(".jpg") || name.endsWith(".jpeg")) {
+            if (name.endsWith(".png") || name.endsWith(".jpg") || name.endsWith(".jpeg")/*||  name.endsWith(".mp4")*/) {
                 double fileOrFilesSize = FileSizeUtil.getFileOrFilesSize(value.getPath(), 5);
                 //在判断是否需要压缩5M以上就默认压缩
                 if (fileOrFilesSize >= 5) {
@@ -53,7 +53,18 @@ public class RequestBodyUtils {
                 } else {
                     body = RequestBody.create(mediaType, value);
                 }
-            } else {
+            }/*else if ( name.endsWith(".mp4")){
+                VideoProcessorUtils.compressVideo2(context,value.getPath(),msg -> {
+
+                    String path= (String) msg.obj;
+
+                    File compressFile = new File(path);
+                    body = RequestBody.create(mediaType, value);
+                    return false;
+                });
+            }*/
+
+            else {
                 body = RequestBody.create(mediaType, value);
             }
         } catch (IOException e) {

+ 76 - 0
app/src/main/java/com/tofly/dewater/utils/VideoProcessorUtils.java

@@ -0,0 +1,76 @@
+package com.tofly.dewater.utils;
+
+import android.content.Context;
+import android.media.MediaMetadataRetriever;
+import android.os.Environment;
+import android.os.Handler;
+import android.os.Message;
+import android.util.Log;
+
+import com.hw.videoprocessor.VideoProcessor;
+
+import java.io.File;
+
+/**
+ * 创建日期:2022/9/19 16:19
+ *
+ * @author YeJavon
+ * @version 1.0
+ * 包名: com.tofly.dewater.utils
+ * 类说明:
+ */
+public class VideoProcessorUtils {
+
+    private static long start;
+    private static long end;
+
+    public static void compressVideo2(Context context, String path, Handler.Callback callback) {
+        String compressPath = Environment.getExternalStorageDirectory() + File.separator + "tyuan_route/image/temp/" + System.currentTimeMillis() + ".mp4";
+        new Thread(() -> {
+            boolean success = true;
+            try {
+                MediaMetadataRetriever retriever = new MediaMetadataRetriever();
+                retriever.setDataSource(path);
+                int originWidth = Integer.parseInt(retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_WIDTH));
+                int originHeight = Integer.parseInt(retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT));
+                int bitrate = Integer.parseInt(retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_BITRATE));
+
+                int outWidth = originWidth / 2;
+                int outHeight = originHeight / 2;
+                start = System.currentTimeMillis();
+                VideoProcessor.processor(context)
+                        .input(path)
+                        .output(compressPath)
+                        .bitrate(bitrate / 2)//这个属性不加,有些小视频反而越压缩越大
+                        //以下参数全部为可选
+//                        .outWidth(outWidth)
+//                        .outHeight(outHeight)
+
+//                            .startTimeMs(startTimeMs)//用于剪辑视频
+//                            .endTimeMs(endTimeMs)    //用于剪辑视频
+//                            .speed(speed)            //改变视频速率,用于快慢放
+//                            .changeAudioSpeed(changeAudioSpeed) //改变视频速率时,音频是否同步变化
+//                            .bitrate(bitrate)       //输出视频比特率
+//                            .frameRate(frameRate)   //帧率
+//                            .iFrameInterval(iFrameInterval)  //关键帧距,为0时可输出全关键帧视频(部分机器上需为-1)
+//                            .progressListener(listener)      //可输出视频处理进度
+                        .process();
+            } catch (Exception e) {
+                success = false;
+                e.printStackTrace();
+            }
+            if (success) {
+                end = System.currentTimeMillis();
+                Log.e("aaa", "压缩耗时:" + (end - start) / 1000 + "秒");
+                Log.e("aaa", "视频压缩后大小:" + new File(compressPath).length() / 1024 / 1024 + "MB");
+                Log.e("aaa", "视频大小:" + new File(path).length() / 1024 / 1024 + "MB");
+                Message message = Message.obtain();
+                message.obj = compressPath;
+                callback.handleMessage(message);
+            } else {
+            }
+        }).start();
+
+
+    }
+}

+ 78 - 0
app/src/main/java/com/tofly/route/bean/LocalItemMaterialEntity.java

@@ -0,0 +1,78 @@
+package com.tofly.route.bean;
+
+import java.io.Serializable;
+
+/**
+ * 创建日期:2022/9/22 16:53
+ *
+ * @author YeJavon
+ * @version 1.0
+ * 包名: com.tofly.route.ui.model.meterial
+ * 类说明:
+ */
+public class LocalItemMaterialEntity implements Serializable{
+
+    private String typeId;
+    private String nameAndSpc;
+    private String count;
+    private String unit;
+    private String bore;//口径
+    private String material;//材质类型
+    private String materialCode;//材质名称
+
+    public String getBore() {
+        return bore;
+    }
+
+    public void setBore(String bore) {
+        this.bore = bore;
+    }
+
+    public String getMaterial() {
+        return material;
+    }
+
+    public void setMaterial(String material) {
+        this.material = material;
+    }
+
+    public String getMaterialCode() {
+        return materialCode;
+    }
+
+    public void setMaterialCode(String materialCode) {
+        this.materialCode = materialCode;
+    }
+
+    public String getTypeId() {
+        return typeId;
+    }
+
+    public void setTypeId(String typeId) {
+        this.typeId = typeId;
+    }
+
+    public String getNameAndSpc() {
+        return nameAndSpc;
+    }
+
+    public void setNameAndSpc(String nameAndSpc) {
+        this.nameAndSpc = nameAndSpc;
+    }
+
+    public String getCount() {
+        return count;
+    }
+
+    public void setCount(String count) {
+        this.count = count;
+    }
+
+    public String getUnit() {
+        return unit;
+    }
+
+    public void setUnit(String unit) {
+        this.unit = unit;
+    }
+}

+ 9 - 0
app/src/main/java/com/tofly/route/bean/repair/MaterialTypeBean.java

@@ -10,6 +10,15 @@ public class MaterialTypeBean {
     private String name;//材料名称
     private String unit;//单位
     private String notes;//备注说明
+    private String specification;//规格型号
+
+    public String getSpecification() {
+        return specification;
+    }
+
+    public void setSpecification(String specification) {
+        this.specification = specification;
+    }
 
     public Integer getId() {
         return id;

+ 175 - 57
app/src/main/java/com/tofly/route/ui/activity/MaterialActivity.java

@@ -1,5 +1,8 @@
 package com.tofly.route.ui.activity;
 
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
 import android.content.Intent;
 import android.text.TextUtils;
 import android.view.Menu;
@@ -7,29 +10,36 @@ import android.view.MenuItem;
 import android.view.View;
 import android.widget.AdapterView;
 import android.widget.EditText;
+import android.widget.TextView;
 
 import androidx.annotation.NonNull;
 import androidx.appcompat.app.ActionBar;
 import androidx.appcompat.widget.AppCompatSpinner;
 import androidx.appcompat.widget.Toolbar;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
 
+import com.tofly.dewater.R;
+import com.tofly.dewater.entity.cb.CbfsEntity;
+import com.tofly.dewater.utils.SpinnerUtils;
+import com.tofly.dewater.utils.ToastUtil;
 import com.tofly.latte_core.base.LatteActivity;
 import com.tofly.latte_core.base.LatteContract;
+import com.tofly.route.bean.LocalItemMaterialEntity;
 import com.tofly.route.bean.repair.MaterialBean;
 import com.tofly.route.bean.repair.MaterialTypeBean;
+import com.tofly.route.ui.adapter.MarerialLocalListAdapter;
 import com.tofly.route.ui.imp.MaterialImpl;
-import com.tofly.dewater.R;
-import com.tofly.dewater.entity.cb.CbfsEntity;
-import com.tofly.dewater.utils.DialogStirngUtils;
-import com.tofly.dewater.utils.SpinnerUtils;
-import com.tofly.dewater.utils.ToastUtil;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
-import java.util.Map;
+import java.util.Set;
 
 import butterknife.BindView;
+import butterknife.OnClick;
 
 /**
  * @author ychk
@@ -47,12 +57,24 @@ public class MaterialActivity extends LatteActivity {
     EditText etNum;
     @BindView(R.id.et_kj)
     EditText etKj;
+    @BindView(R.id.add_item)
+    TextView addItem;
+    @BindView(R.id.rv_added)
+    RecyclerView rvAdded;
+    @BindView(R.id.et_bore)
+    EditText etBore;
+    private MarerialLocalListAdapter adapter;
+
+    List<LocalItemMaterialEntity> itemLocalNameList = new ArrayList<>();
+
 
     private List<CbfsEntity> material;
-    private List<MaterialTypeBean> materialTypeBeanList;
+    private List<String> stringListType;
+    private List<MaterialTypeBean> materialTypeBeanList, materialTypeBeanList2;
     private MaterialBean materialBean;
     private String name, materCode, type, typeCode;
     private boolean isIdy = false;
+    private Context context;
 
     @Override
     protected LatteContract.LattePresenter createPresenter() {
@@ -66,9 +88,51 @@ public class MaterialActivity extends LatteActivity {
 
     @Override
     public void initView() {
+
+
+        context = this;
         initToolBar();
         setDarkStatusBar();
         mPresenter.getResultOne(this, null);
+
+
+        initAdapter();
+        initAdapterListener();
+
+    }
+
+
+    private void initAdapter() {
+        adapter = MarerialLocalListAdapter.create(itemLocalNameList, this);
+        LinearLayoutManager layout = new LinearLayoutManager(context);
+        layout.setOrientation(LinearLayoutManager.VERTICAL);
+        rvAdded.setLayoutManager(layout);
+        rvAdded.setAdapter(adapter);
+    }
+
+    private void initAdapterListener() {
+
+        adapter.setOnItemChildClickListener((adapter1, view, position) -> {
+
+            if (view.getId() == R.id.tv_delete) {
+
+                new AlertDialog.Builder(MaterialActivity.this)
+                        .setMessage("确认移除当前使用记录?")
+                        .setCancelable(true)
+                        .setPositiveButton("确定", new DialogInterface.OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialog, int which) {
+                                itemLocalNameList.remove(position);
+                                adapter.notifyDataSetChanged();
+                                dialog.dismiss();
+                            }
+                        })
+                        .setNegativeButton("取消", null)
+                        .create().show();
+
+
+            }
+        });
     }
 
     @Override
@@ -90,22 +154,14 @@ public class MaterialActivity extends LatteActivity {
         spinnerMaterialType.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
             @Override
             public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
-                if (materialTypeBeanList != null && materialTypeBeanList.size() > 0) {
-                    if (materialTypeBeanList.get(position).getId() == -1000) {
-                        DialogStirngUtils.show3(MaterialActivity.this, (type1, unit, note) -> {
-                            Map<String, Object> mss = new HashMap<>();
-                            mss.put("name", type1);
-                            mss.put("unit", unit);
-                            type = type1;
-                            typeCode = null;
-                            if (!TextUtils.isEmpty(note))
-                                mss.put("note", note);
-                            mPresenter.getResultThree(MaterialActivity.this, mss);
-                        });
-                    } else {
-                        type = materialTypeBeanList.get(position).getName();
-                        typeCode = String.valueOf(materialTypeBeanList.get(position).getId());
-                    }
+                if (stringListType != null && stringListType.size() > 0) {
+                    String materialTypeBean = stringListType.get(position);
+                    type = materialTypeBean;
+                    HashMap<String, Object> mss = new HashMap<>();
+                    mss.put("size", 1000);
+                    mss.put("name", type);
+                    mPresenter.getResultFive(context, mss);
+                    etKj.setText("");
                 }
             }
 
@@ -137,10 +193,12 @@ public class MaterialActivity extends LatteActivity {
     public boolean onOptionsItemSelected(@NonNull MenuItem item) {
         if (item.getItemId() == R.id.action_commit) {
             if (getMaterial() && isOverTime()) {
-                Intent intent = new Intent();
-                intent.putExtra("materialBean", materialBean);
-                setResult(1114, intent);
-                finish();
+                if (itemLocalNameList.size()==0){
+                    ToastUtil.showToast("请添加耗材信息");
+                }else{  Intent intent = new Intent();
+                    intent.putExtra("materialBean", (Serializable) itemLocalNameList);
+                    setResult(1114, intent);
+                    finish();}
             }
         }
         return super.onOptionsItemSelected(item);
@@ -150,10 +208,6 @@ public class MaterialActivity extends LatteActivity {
         boolean isSuccess = false;
         if (TextUtils.isEmpty(type)) {
             ToastUtil.showToast("材料类型不能为空");
-        } else if (TextUtils.isEmpty(name)) {
-            ToastUtil.showToast("材质不能为空");
-        } else if (TextUtils.isEmpty(etKj.getText())) {
-            ToastUtil.showToast("口径不能为空");
         } else if (TextUtils.isEmpty(etNum.getText())) {
             ToastUtil.showToast("数量不能为空");
         } else {
@@ -169,48 +223,112 @@ public class MaterialActivity extends LatteActivity {
         return isSuccess;
     }
 
+
+
+
+    @OnClick(R.id.add_item)
+    public void onViewClicked() {
+        //添加本地的使用记录
+        String trim = etNum.getText().toString().trim();
+        if (!TextUtils.isEmpty(trim)) {
+
+
+            LocalItemMaterialEntity entity = new LocalItemMaterialEntity();
+            entity.setTypeId(typeCode);
+            entity.setCount(trim);
+            entity.setUnit(etKj.getText().toString().trim());
+            entity.setNameAndSpc(type );
+
+            entity.setMaterial(name == null ? "":name);
+            entity.setMaterialCode(materCode);
+            String bore = etBore.getText().toString().trim();
+            entity.setBore(bore);
+
+
+            itemLocalNameList.add(entity);
+            adapter.notifyDataSetChanged();
+        } else {
+            ToastUtil.showToast("请输入耗材对应数量");
+        }
+
+    }
+
     @Override
     public <T> void getResultOne(T response) {
         if (response != null) {
             materialTypeBeanList = (List<MaterialTypeBean>) response;
             if (materialTypeBeanList.size() > 0) {
-                MaterialTypeBean ms = new MaterialTypeBean();
-                ms.setId(-1000);
-                ms.setName("自定义材料类型");
-                materialTypeBeanList.add(ms);
-                List<String> stringList = new ArrayList<>();
+                stringListType = new ArrayList<>();
+                Set nomores = new HashSet<>();
                 for (MaterialTypeBean materialTypeBean : materialTypeBeanList) {
-                    stringList.add(materialTypeBean.getName());
-                }
-                SpinnerUtils.setAdapter(this, spinnerMaterialType, stringList.toArray(new String[0]));
-                if (isIdy) {
-                    isIdy = false;
-                    int index = stringList.indexOf(type);
-                    spinnerMaterialType.setSelection(index);
+                    if (nomores.add(materialTypeBean.getName()))
+                        stringListType.add(materialTypeBean.getName() + "");
                 }
+                SpinnerUtils.setAdapter(this, spinnerMaterialType, stringListType.toArray(new String[0]));
+//                if (isIdy) {
+//                    isIdy = false;
+//                    int index = stringList.indexOf(type);
+//                    spinnerMaterialType.setSelection(index);
+//                }
+
+
             }
         }
     }
+//
+//    @Override
+//    public <T> void getResultTwo(T response) {
+//        super.getResultTwo(response);
+//        if (response != null) {
+//            material = (List<CbfsEntity>) response;
+//            if (material.size() > 0) {
+//                List<String> strings = new ArrayList<>();
+//                for (CbfsEntity materialBean : material) {
+//                    strings.add(materialBean.getCname());
+//                }
+//                SpinnerUtils.setAdapter(this, spinnerMaterial, strings.toArray(new String[0]));
+//            }
+//        }
+//    }
 
     @Override
-    public <T> void getResultTwo(T response) {
-        super.getResultTwo(response);
+    public <T> void getResultThree(T response) {
+        super.getResultThree(response);
+//        isIdy = true;
+//        mPresenter.getResultOne(this, null);
+    }
+
+
+    @Override
+    public <T> void getResultFive(T response) {
+        super.getResultFive(response);
+
+        List<String> stringList = new ArrayList<>();
+        stringList.add("请选择型号");
+
         if (response != null) {
-            material = (List<CbfsEntity>) response;
-            if (material.size() > 0) {
-                List<String> strings = new ArrayList<>();
-                for (CbfsEntity materialBean : material) {
-                    strings.add(materialBean.getCname());
+            materialTypeBeanList2 = (List<MaterialTypeBean>) response;
+            if (materialTypeBeanList2.size() > 0) {
+//                MaterialTypeBean ms = new MaterialTypeBean();
+//                ms.setId(-1000);
+//                ms.setName("自定义材料类型");
+//                materialTypeBeanList.add(ms);
+
+
+                for (MaterialTypeBean materialTypeBean : materialTypeBeanList2) {
+
+                    String specification = materialTypeBean.getSpecification();
+                    if (!TextUtils.isEmpty(specification))
+                        stringList.add(specification + "");
                 }
-                SpinnerUtils.setAdapter(this, spinnerMaterial, strings.toArray(new String[0]));
+
+
             }
         }
-    }
+        SpinnerUtils.setAdapter(this, spinnerMaterial, stringList.toArray(new String[0]));
 
-    @Override
-    public <T> void getResultThree(T response) {
-        super.getResultThree(response);
-        isIdy = true;
-        mPresenter.getResultOne(this, null);
+        if (materialTypeBeanList2 != null && materialTypeBeanList2.size() > 0) {
+            spinnerMaterial.setSelection(0);
+        }
     }
 }

+ 25 - 3
app/src/main/java/com/tofly/route/ui/activity/UiRepairJobProcess.java

@@ -44,6 +44,7 @@ import com.tofly.latte_core.base.LatteContract;
 import com.tofly.latte_core.utils.AccountManager;
 import com.tofly.latte_core.utils.NetworkUtil;
 import com.tofly.route.base.C;
+import com.tofly.route.bean.LocalItemMaterialEntity;
 import com.tofly.route.bean.repair.GegeryBean;
 import com.tofly.route.bean.repair.LayerBean;
 import com.tofly.route.bean.repair.MaterialBean;
@@ -798,7 +799,7 @@ public class UiRepairJobProcess extends TakePhotoActivity {
                 if (materialBeanList.size() > 0) {
                     for (int i = 0; i < materialBeanList.size(); i++) {
                         fiels.put("goods[" + i + "].bore", RequestBodyUtils.toRequestBodyString(materialBeanList.get(i).getBore()));
-                        fiels.put("goods[" + i + "].material", RequestBodyUtils.toRequestBodyString(materialBeanList.get(i).getMaterialCode()));
+//                        fiels.put("goods[" + i + "].material", RequestBodyUtils.toRequestBodyString(materialBeanList.get(i).getMaterialCode()));
                         fiels.put("goods[" + i + "].materialType", RequestBodyUtils.toRequestBodyString(materialBeanList.get(i).getMaterialType()));
                         fiels.put("goods[" + i + "].num", RequestBodyUtils.toRequestBodyString(String.valueOf(materialBeanList.get(i).getNum())));
                         fiels.put("goods[" + i + "].repairUserid", RequestBodyUtils.toRequestBodyString(String.valueOf(repairUserVo.getId())));
@@ -1112,10 +1113,31 @@ public class UiRepairJobProcess extends TakePhotoActivity {
                 }
             }
         } else if (requestCode == 1113 && resultCode == 1114) {
+//            if (data != null) {
+//                MaterialBean materialBean = (MaterialBean) data.getSerializableExtra("materialBean");
+//                if (materialBean != null) {
+//                    materialBeanList.add(materialBean);
+//                    materialAdapter.setNewData(materialBeanList);
+//                }
+//            }
+
             if (data != null) {
-                MaterialBean materialBean = (MaterialBean) data.getSerializableExtra("materialBean");
+                List<LocalItemMaterialEntity> materialBean = (List<LocalItemMaterialEntity>) data.getSerializableExtra("materialBean");
                 if (materialBean != null) {
-                    materialBeanList.add(materialBean);
+
+                    for (int i = 0; i < materialBean.size(); i++) {
+                        LocalItemMaterialEntity entity = materialBean.get(i);
+                        MaterialBean bean = new MaterialBean();
+                        bean.setMaterialType(entity.getTypeId());
+                        bean.setMaterialTypeName(entity.getNameAndSpc());
+                        bean.setNum(Integer.parseInt(entity.getCount()));
+                        bean.setBore(entity.getBore());
+                        bean.setMaterial(entity.getMaterial());
+                        bean.setMaterialCode(entity.getMaterialCode());
+                        materialBeanList.add(bean);
+                    }
+
+
                     materialAdapter.setNewData(materialBeanList);
                 }
             }

+ 37 - 0
app/src/main/java/com/tofly/route/ui/adapter/MarerialLocalListAdapter.java

@@ -0,0 +1,37 @@
+package com.tofly.route.ui.adapter;
+
+import android.content.Context;
+
+import androidx.annotation.Nullable;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.tofly.dewater.R;
+import com.tofly.route.bean.LocalItemMaterialEntity;
+
+import java.util.List;
+
+public class MarerialLocalListAdapter extends BaseQuickAdapter<LocalItemMaterialEntity, BaseViewHolder> {
+
+
+    private static Context context;
+
+    public static MarerialLocalListAdapter create(List<LocalItemMaterialEntity> data, Context mcontext) {
+
+        context = mcontext;
+        return new MarerialLocalListAdapter(R.layout.item_metrial_local_list, data);
+    }
+
+    public MarerialLocalListAdapter(int layoutResId, @Nullable List<LocalItemMaterialEntity> data) {
+        super(layoutResId, data);
+    }
+
+    @Override
+    protected void convert(BaseViewHolder helper, LocalItemMaterialEntity item) {
+
+        helper.setText(R.id.tv_name, item.getNameAndSpc() + " " + item.getMaterial() + " " + item.getCount() + " " + item.getUnit());
+
+        helper.addOnClickListener(R.id.tv_delete);
+
+    }
+}

+ 32 - 0
app/src/main/java/com/tofly/route/ui/imp/MaterialImpl.java

@@ -119,4 +119,36 @@ public class MaterialImpl extends LattePresenterImpl {
                     });
         }
     }
+
+
+
+    @Override
+    public void getResultFive(Context context, Map<String, Object> map) {
+        super.getResultFive(context, map);
+        LatteNetWorkApi.getApiService(Api.class)
+                .getMaterialType(map)
+                .compose(RxHelper.observableIO2Main(Latte.getApplicationContext()))
+                .subscribe(new BaseObserver<BaseResponse<PageInfo<MaterialTypeBean, OrdersEntity>>>() {
+                    @Override
+                    public void onSuccess(BaseResponse<PageInfo<MaterialTypeBean, OrdersEntity>> demo) {
+                        if (isViewAttached()) {
+                            if (demo.getCode() == 1) {
+                                if (demo.getResult() != null) {
+                                    getView().getResultFive(demo.getResult().getRecords());
+                                    //getResultTwo(context, null);
+                                }
+                            } else {
+                                ToastUtil.showToast(demo.getMessage());
+                            }
+                        }
+                    }
+
+                    @Override
+                    public void onFailure(Throwable e, String errorMsg) {
+                        if (e != null) {
+                            ToastUtil.showToast(errorMsg);
+                        }
+                    }
+                });
+    }
 }

+ 1 - 1
app/src/main/java/com/tofly/route/util/AmapUtils/AmapLocationUtils.java

@@ -186,7 +186,7 @@ public class AmapLocationUtils {
                     }
 
                     //上传坐标GPS
-                    uploadGps(location);
+                   // uploadGps(location);
                 }
             }
             mCheckGPSOpenTimes++;

+ 23 - 0
app/src/main/res/drawable/text_bg_delete.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <!--点击背景-->
+    <item android:state_pressed="false">
+        <shape xmlns:android="http://schemas.android.com/apk/res/android">
+
+            <corners android:radius="@dimen/dp_2"/>
+            <gradient android:startColor="@color/color_ea4e61"
+                android:endColor="@color/color_ea4e61"/>
+
+        </shape>
+    </item>
+    <!--默认背景-->
+    <item android:state_pressed="true">
+        <shape xmlns:android="http://schemas.android.com/apk/res/android">
+
+            <corners android:radius="@dimen/dp_2"/>
+            <gradient android:startColor="@color/color_999999"
+                android:endColor="@color/color_F5F6FC"/>
+
+        </shape>
+    </item>
+</selector>

+ 228 - 182
app/src/main/res/layout/activity_dispatch_detail.xml

@@ -52,8 +52,8 @@
                 </LinearLayout>
 
                 <LinearLayout
-                    android:visibility="gone"
-                    style="@style/layout_horizontal_base">
+                    style="@style/layout_horizontal_base"
+                    android:visibility="gone">
 
                     <TextView
                         android:layout_width="0dp"
@@ -74,16 +74,15 @@
                 </LinearLayout>
 
                 <LinearLayout
-                    android:gravity="center_vertical"
-                    style="@style/layout_horizontal_base2">
+                    style="@style/layout_horizontal_base2"
+                    android:gravity="center_vertical">
 
                     <TextView
-                        android:layout_width="0dp"
+                        android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_weight="1"
-                        android:text="事件名称 : "
                         android:gravity="center_vertical"
-                        android:textColor="@color/color_333"
+                        android:text="事件名称 : "
+                        android:textColor="@color/color_999999"
                         android:textSize="@dimen/sp_16" />
 
                     <TextView
@@ -91,20 +90,23 @@
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_weight="1"
-                        android:gravity="right"
                         android:text=""
-                        android:textColor="@color/color_999999"
+                        android:textColor="@color/color_333"
                         android:textSize="@dimen/sp_16" />
                 </LinearLayout>
 
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_1"
+                    android:background="@color/line_color" />
+
                 <LinearLayout style="@style/layout_horizontal_base">
 
                     <TextView
-                        android:layout_width="0dp"
+                        android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_weight="1"
                         android:text="发现时间 : "
-                        android:textColor="@color/color_333"
+                        android:textColor="@color/color_999999"
                         android:textSize="@dimen/sp_16" />
 
                     <TextView
@@ -112,19 +114,22 @@
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_weight="1"
-                        android:gravity="right"
-                        android:textColor="@color/color_999999"
+                        android:textColor="@color/color_333"
                         android:textSize="@dimen/sp_16" />
                 </LinearLayout>
 
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_1"
+                    android:background="@color/line_color" />
+
                 <LinearLayout style="@style/layout_horizontal_base">
 
                     <TextView
-                        android:layout_width="0dp"
+                        android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_weight="1"
                         android:text="发现人员 : "
-                        android:textColor="@color/color_333"
+                        android:textColor="@color/color_999999"
                         android:textSize="@dimen/sp_16" />
 
                     <TextView
@@ -132,20 +137,22 @@
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_weight="1"
-                        android:gravity="right"
-
-                        android:textColor="@color/color_999999"
+                        android:textColor="@color/color_333"
                         android:textSize="@dimen/sp_16" />
                 </LinearLayout>
 
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_1"
+                    android:background="@color/line_color" />
+
                 <LinearLayout style="@style/layout_horizontal_base">
 
                     <TextView
-                        android:layout_width="0dp"
+                        android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_weight="1"
                         android:text="联系电话 : "
-                        android:textColor="@color/color_333"
+                        android:textColor="@color/color_999999"
                         android:textSize="@dimen/sp_16" />
 
                     <TextView
@@ -153,20 +160,22 @@
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_weight="1"
-                        android:gravity="right"
-
-                        android:textColor="@color/color_999999"
+                        android:textColor="@color/color_333"
                         android:textSize="@dimen/sp_16" />
                 </LinearLayout>
 
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_1"
+                    android:background="@color/line_color" />
+
                 <LinearLayout style="@style/layout_horizontal_base">
 
                     <TextView
-                        android:layout_width="0dp"
+                        android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_weight="1"
                         android:text="事件地址 : "
-                        android:textColor="@color/color_333"
+                        android:textColor="@color/color_999999"
                         android:textSize="@dimen/sp_16" />
 
                     <TextView
@@ -174,20 +183,22 @@
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_weight="1"
-                        android:gravity="right"
-
-                        android:textColor="@color/color_999999"
+                        android:textColor="@color/color_333"
                         android:textSize="@dimen/sp_16" />
                 </LinearLayout>
 
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_1"
+                    android:background="@color/line_color" />
+
                 <LinearLayout style="@style/layout_horizontal_base">
 
                     <TextView
-                        android:layout_width="0dp"
+                        android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_weight="1"
                         android:text="关联设施 : "
-                        android:textColor="@color/color_333"
+                        android:textColor="@color/color_999999"
                         android:textSize="@dimen/sp_16" />
 
                     <TextView
@@ -195,20 +206,22 @@
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_weight="1"
-                        android:gravity="right"
-
-                        android:textColor="@color/color_999999"
+                        android:textColor="@color/color_333"
                         android:textSize="@dimen/sp_16" />
                 </LinearLayout>
 
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_1"
+                    android:background="@color/line_color" />
+
                 <LinearLayout style="@style/layout_horizontal_base">
 
                     <TextView
-                        android:layout_width="0dp"
+                        android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_weight="1"
-                        android:text="经纬度 : "
-                        android:textColor="@color/color_333"
+                        android:text="     经纬度 : "
+                        android:textColor="@color/color_999999"
                         android:textSize="@dimen/sp_16" />
 
                     <TextView
@@ -216,21 +229,23 @@
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_weight="1"
-                        android:gravity="right"
-
-                        android:textColor="@color/color_999999"
+                        android:textColor="@color/color_333"
                         android:textSize="@dimen/sp_16" />
                 </LinearLayout>
 
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_1"
+                    android:background="@color/line_color" />
+
                 <LinearLayout style="@style/layout_horizontal_base2">
 
                     <TextView
-                        android:layout_width="0dp"
-                        android:gravity="center_vertical"
+                        android:layout_width="wrap_content"
                         android:layout_height="@dimen/dp_40"
-                        android:layout_weight="1"
+                        android:gravity="center_vertical"
                         android:text="详细描述 : "
-                        android:textColor="@color/color_333"
+                        android:textColor="@color/color_999999"
                         android:textSize="@dimen/sp_16" />
 
                     <TextView
@@ -238,20 +253,23 @@
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_weight="1"
-                        android:gravity="right"
-                        android:textColor="@color/color_999999"
+                        android:textColor="@color/color_333"
                         android:textSize="@dimen/sp_16" />
                 </LinearLayout>
 
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_1"
+                    android:background="@color/line_color" />
+
                 <LinearLayout style="@style/layout_horizontal_base2">
 
                     <TextView
-                        android:layout_width="0dp"
+                        android:layout_width="wrap_content"
                         android:layout_height="@dimen/dp_40"
-                        android:layout_weight="1"
                         android:gravity="center_vertical"
                         android:text="处理意见 : "
-                        android:textColor="@color/color_333"
+                        android:textColor="@color/color_999999"
                         android:textSize="@dimen/sp_16" />
 
                     <TextView
@@ -259,11 +277,15 @@
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_weight="1"
-                        android:gravity="right"
-                        android:textColor="@color/color_999999"
+                        android:textColor="@color/color_333"
                         android:textSize="@dimen/sp_16" />
                 </LinearLayout>
 
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_1"
+                    android:background="@color/line_color" />
+
                 <!--  附件-->
 
                 <androidx.recyclerview.widget.RecyclerView
@@ -298,11 +320,10 @@
                 <LinearLayout style="@style/layout_horizontal_base">
 
                     <TextView
-                        android:layout_width="0dp"
+                        android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_weight="1"
                         android:text="处理人 : "
-                        android:textColor="@color/color_333"
+                        android:textColor="@color/color_999999"
                         android:textSize="@dimen/sp_16" />
 
                     <TextView
@@ -310,20 +331,23 @@
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_weight="1"
-                        android:gravity="right"
+                        android:textColor="@color/color_333"
 
-                        android:textColor="@color/color_999999"
                         android:textSize="@dimen/sp_16" />
                 </LinearLayout>
 
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_1"
+                    android:background="@color/line_color" />
+
                 <LinearLayout style="@style/layout_horizontal_base">
 
                     <TextView
-                        android:layout_width="0dp"
+                        android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_weight="1"
                         android:text="电话 : "
-                        android:textColor="@color/color_333"
+                        android:textColor="@color/color_999999"
                         android:textSize="@dimen/sp_16" />
 
                     <TextView
@@ -331,20 +355,22 @@
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_weight="1"
-                        android:gravity="right"
-
-                        android:textColor="@color/color_999999"
+                        android:textColor="@color/color_333"
                         android:textSize="@dimen/sp_16" />
                 </LinearLayout>
 
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_1"
+                    android:background="@color/line_color" />
+
                 <LinearLayout style="@style/layout_horizontal_base">
 
                     <TextView
-                        android:layout_width="0dp"
+                        android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_weight="1"
                         android:text="协同处理人 : "
-                        android:textColor="@color/color_333"
+                        android:textColor="@color/color_999999"
                         android:textSize="@dimen/sp_16" />
 
                     <TextView
@@ -352,14 +378,17 @@
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_weight="1"
-                        android:gravity="right"
-
-                        android:textColor="@color/color_999999"
+                        android:textColor="@color/color_333"
                         android:textSize="@dimen/sp_16" />
 
 
                 </LinearLayout>
 
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_1"
+                    android:background="@color/line_color" />
+
                 <LinearLayout
                     android:id="@+id/ll_sms"
                     android:layout_width="match_parent"
@@ -370,12 +399,11 @@
                     <LinearLayout style="@style/layout_horizontal_base2">
 
                         <TextView
-                            android:layout_width="0dp"
+                            android:layout_width="wrap_content"
                             android:layout_height="@dimen/dp_40"
-                            android:layout_weight="1"
-                            android:text="发送短信 : "
                             android:gravity="center_vertical"
-                            android:textColor="@color/color_333"
+                            android:text="发送短信 : "
+                            android:textColor="@color/color_999999"
                             android:textSize="@dimen/sp_16" />
 
                         <TextView
@@ -383,19 +411,22 @@
                             android:layout_width="0dp"
                             android:layout_height="wrap_content"
                             android:layout_weight="1"
-                            android:gravity="right"
-                            android:textColor="@color/color_999999"
+                            android:textColor="@color/color_333"
                             android:textSize="@dimen/sp_16" />
                     </LinearLayout>
 
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="@dimen/dp_1"
+                        android:background="@color/line_color" />
+
                     <LinearLayout style="@style/layout_horizontal_base">
 
                         <TextView
-                            android:layout_width="0dp"
+                            android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:layout_weight="1"
                             android:text="短信接收电话 : "
-                            android:textColor="@color/color_333"
+                            android:textColor="@color/color_999999"
                             android:textSize="@dimen/sp_16" />
 
                         <TextView
@@ -403,109 +434,124 @@
                             android:layout_width="0dp"
                             android:layout_height="wrap_content"
                             android:layout_weight="1"
-                            android:gravity="right"
-
-                            android:textColor="@color/color_999999"
+                            android:textColor="@color/color_333"
                             android:textSize="@dimen/sp_16" />
                     </LinearLayout>
 
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="@dimen/dp_1"
+                        android:background="@color/line_color" />
 
-                  <LinearLayout
-                      android:id="@+id/ll_type_handle"
-                      android:visibility="gone"
-                      android:layout_width="match_parent"
-                      android:layout_height="wrap_content"
-                      android:orientation="vertical">
-                      <LinearLayout style="@style/layout_horizontal_base">
-
-                          <TextView
-                              android:layout_width="wrap_content"
-                              android:layout_height="wrap_content"
-                              android:background="@drawable/bg_text_blue_round"
-                              android:padding="@dimen/dp_2"
-                              android:text="_"
-                              android:textColor="@color/text_sure"
-                              android:textSize="@dimen/sp_12" />
-
-                          <TextView
-                              android:layout_width="0dp"
-                              android:layout_height="wrap_content"
-                              android:layout_marginLeft="@dimen/dp_4"
-                              android:layout_weight="1"
-                              android:text="处理信息"
-                              android:textColor="@color/color_333"
-                              android:textSize="@dimen/sp_16"
-                              android:textStyle="bold" />
-
-                      </LinearLayout>
-
-                      <LinearLayout style="@style/layout_horizontal_base">
-
-                          <TextView
-                              android:layout_width="0dp"
-                              android:layout_height="wrap_content"
-                              android:layout_weight="1"
-                              android:text="处理意见 : "
-                              android:textColor="@color/color_333"
-                              android:textSize="@dimen/sp_16" />
-
-                          <TextView
-                              android:id="@+id/tv_todo_advice"
-                              android:layout_width="0dp"
-                              android:layout_height="wrap_content"
-                              android:layout_weight="1"
-                              android:gravity="right"
-
-                              android:textColor="@color/color_999999"
-                              android:textSize="@dimen/sp_16" />
-                      </LinearLayout> <LinearLayout style="@style/layout_horizontal_base">
-
-                      <TextView
-                          android:layout_width="0dp"
-                          android:layout_height="wrap_content"
-                          android:layout_weight="1"
-                          android:text="处理人员 : "
-                          android:textColor="@color/color_333"
-                          android:textSize="@dimen/sp_16" />
-
-                      <TextView
-                          android:id="@+id/tv_todo_handler"
-                          android:layout_width="0dp"
-                          android:layout_height="wrap_content"
-                          android:layout_weight="1"
-                          android:gravity="right"
-
-                          android:textColor="@color/color_999999"
-                          android:textSize="@dimen/sp_16" />
-                  </LinearLayout><LinearLayout style="@style/layout_horizontal_base">
-
-                      <TextView
-                          android:layout_width="0dp"
-                          android:layout_height="wrap_content"
-                          android:layout_weight="1"
-                          android:text="处理时间 : "
-                          android:textColor="@color/color_333"
-                          android:textSize="@dimen/sp_16" />
-
-                      <TextView
-                          android:id="@+id/tv_todo_handle_time"
-                          android:layout_width="0dp"
-                          android:layout_height="wrap_content"
-                          android:layout_weight="1"
-                          android:gravity="right"
-                          android:textColor="@color/color_999999"
-                          android:textSize="@dimen/sp_16" />
-                  </LinearLayout>
-
-
-
-                      <androidx.recyclerview.widget.RecyclerView
-                          android:id="@+id/rv_photo_advice"
-                          android:layout_width="match_parent"
-                          android:layout_marginLeft="@dimen/dp_10"
-                          android:layout_marginRight="@dimen/dp_10"
-                          android:layout_height="wrap_content" />
-                  </LinearLayout>
+                    <LinearLayout
+                        android:id="@+id/ll_type_handle"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:orientation="vertical"
+                        android:visibility="gone">
+
+                        <LinearLayout style="@style/layout_horizontal_base">
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:background="@drawable/bg_text_blue_round"
+                                android:padding="@dimen/dp_2"
+                                android:text="_"
+                                android:textColor="@color/text_sure"
+                                android:textSize="@dimen/sp_12" />
+
+                            <TextView
+                                android:layout_width="0dp"
+                                android:layout_height="wrap_content"
+                                android:layout_marginLeft="@dimen/dp_4"
+                                android:layout_weight="1"
+                                android:text="处理信息"
+                                android:textColor="@color/color_333"
+                                android:textSize="@dimen/sp_16"
+                                android:textStyle="bold" />
+
+                        </LinearLayout>
+
+                        <View
+                            android:layout_width="match_parent"
+                            android:layout_height="@dimen/dp_1"
+                            android:background="@color/line_color" />
+
+                        <LinearLayout style="@style/layout_horizontal_base">
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="处理意见 : "
+                                android:textColor="@color/color_999999"
+                                android:textSize="@dimen/sp_16" />
+
+                            <TextView
+                                android:id="@+id/tv_todo_advice"
+                                android:layout_width="0dp"
+                                android:layout_height="wrap_content"
+                                android:layout_weight="1"
+                                android:textColor="@color/color_333"
+                                android:textSize="@dimen/sp_16" />
+                        </LinearLayout>
+                        <View
+                            android:layout_width="match_parent"
+                            android:layout_height="@dimen/dp_1"
+                            android:background="@color/line_color"/>
+
+                        <LinearLayout style="@style/layout_horizontal_base">
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="处理人员 : "
+                                android:textColor="@color/color_999999"
+                                android:textSize="@dimen/sp_16" />
+
+                            <TextView
+                                android:id="@+id/tv_todo_handler"
+                                android:layout_width="0dp"
+                                android:layout_height="wrap_content"
+                                android:layout_weight="1"
+                                android:textColor="@color/color_333"
+                                android:textSize="@dimen/sp_16" />
+                        </LinearLayout>
+                        <View
+                            android:layout_width="match_parent"
+                            android:layout_height="@dimen/dp_1"
+                            android:background="@color/line_color"/>
+
+                        <LinearLayout style="@style/layout_horizontal_base">
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="处理时间 : "
+                                android:textColor="@color/color_999999"
+                                android:textSize="@dimen/sp_16" />
+
+                            <TextView
+                                android:id="@+id/tv_todo_handle_time"
+                                android:layout_width="0dp"
+                                android:layout_height="wrap_content"
+                                android:layout_weight="1"
+                                android:textColor="@color/color_333"
+                                android:textSize="@dimen/sp_16" />
+                        </LinearLayout>
+                        <View
+                            android:layout_width="match_parent"
+                            android:layout_height="@dimen/dp_1"
+                            android:background="@color/line_color"/>
+
+
+                        <androidx.recyclerview.widget.RecyclerView
+                            android:id="@+id/rv_photo_advice"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_marginLeft="@dimen/dp_10"
+                            android:layout_marginRight="@dimen/dp_10" />
+                    </LinearLayout>
                 </LinearLayout>
 
             </LinearLayout>

+ 74 - 14
app/src/main/res/layout/activity_material.xml

@@ -50,14 +50,15 @@
 
                         <TextView
                             style="@style/ReportDetail.Info.Title"
-                            android:text="材料类型:" />
+                            android:text="@string/device_name" />
 
                         <LinearLayout
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
                             android:background="@color/white"
-                            android:orientation="vertical"
-                            android:gravity="center">
+                            android:gravity="center"
+                            android:layout_marginTop="@dimen/dp_8"
+                            android:orientation="vertical">
 
                             <androidx.appcompat.widget.AppCompatSpinner
                                 android:id="@+id/spinner_material_type"
@@ -65,17 +66,18 @@
                                 android:layout_height="26dp"
                                 android:paddingLeft="0dp"
                                 android:prompt="@string/repair_repair_type_material" />
+
                             <View style="@style/ReportDetail.Line.Bottom" />
                         </LinearLayout>
                     </LinearLayout>
 
                     <LinearLayout
                         style="@style/ReportDetail.Info.LinearLayout"
-                        android:paddingLeft="6dp">
+                        android:paddingLeft="6dp" >
 
                         <TextView
                             style="@style/ReportDetail.Info.Title"
-                            android:text="材质:" />
+                            android:text="@string/spec_type" />
 
                         <LinearLayout
                             android:layout_width="match_parent"
@@ -86,8 +88,7 @@
                                 android:id="@+id/spinner_material"
                                 style="@style/DangerReport.Content.Spinner"
                                 android:layout_height="26dp"
-                                android:paddingLeft="0dp"
-                                android:prompt="@string/repair_repair_material" />
+                                android:paddingLeft="0dp" />
 
                             <View style="@style/ReportDetail.Line.Bottom" />
                         </LinearLayout>
@@ -99,7 +100,7 @@
 
                         <TextView
                             style="@style/ReportDetail.Info.Title"
-                            android:text="数量(个):" />
+                            android:text="数量:" />
 
                         <LinearLayout
                             android:layout_width="match_parent"
@@ -110,8 +111,8 @@
                                 android:id="@+id/et_num"
                                 style="@style/PointRepair.Content.EditText"
                                 android:digits="0123456789"
-                                android:inputType="phone"
-                                android:hint="请输入数量" />
+                                android:hint="请输入数量"
+                                android:inputType="phone" />
 
                             <View style="@style/ReportDetail.Line.Bottom" />
                         </LinearLayout>
@@ -123,7 +124,7 @@
 
                         <TextView
                             style="@style/ReportDetail.Info.Title"
-                            android:text="口径(mm):" />
+                            android:text="单位:" />
 
                         <LinearLayout
                             android:layout_width="match_parent"
@@ -133,16 +134,75 @@
                             <EditText
                                 android:id="@+id/et_kj"
                                 style="@style/PointRepair.Content.EditText"
+                                android:clickable="false"
                                 android:digits="0123456789"
-                                android:inputType="phone"
-                                android:hint="请输入口径" />
+                                android:focusable="false" />
 
                             <View style="@style/ReportDetail.Line.Bottom" />
                         </LinearLayout>
+
+
                     </LinearLayout>
 
-                </LinearLayout>
+                    <LinearLayout
+                        style="@style/ReportDetail.Info.LinearLayout"
+                        android:paddingLeft="6dp">
 
+                        <TextView
+                            style="@style/ReportDetail.Info.Title"
+                            android:text="口径:" />
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:orientation="vertical">
+
+                            <EditText
+                                android:id="@+id/et_bore"
+                                style="@style/PointRepair.Content.EditText"
+                                android:digits="0123456789"
+                                android:hint="请输入口径"
+                                android:inputType="phone" />
+
+                            <View style="@style/ReportDetail.Line.Bottom" />
+                        </LinearLayout>
+                    </LinearLayout>
+
+
+
+                    <LinearLayout
+                        style="@style/ReportDetail.Info.LinearLayout"
+                        android:layout_marginTop="@dimen/dp_30"
+                        android:layout_marginBottom="@dimen/dp_20"
+                        android:paddingLeft="6dp">
+
+
+                        <TextView
+                            android:id="@+id/add_item"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center"
+                            android:background="@drawable/edt_bg"
+                            android:gravity="center"
+                            android:padding="@dimen/dp_4"
+                            android:text="添加"
+                            android:textColor="@color/color_1F7DF7" />
+                    </LinearLayout>
+
+                    <TextView
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="@dimen/dp_10"
+                        android:layout_marginBottom="@dimen/dp_10"
+                        android:text="@string/used_list"
+                        android:textColor="@color/color_333"
+                        android:textStyle="bold" />
+
+                    <androidx.recyclerview.widget.RecyclerView
+                        android:id="@+id/rv_added"
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent" />
+                </LinearLayout>
             </androidx.core.widget.NestedScrollView>
         </androidx.cardview.widget.CardView>
     </LinearLayout>

+ 92 - 0
app/src/main/res/layout/item_metrial_local_list.xml

@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical">
+
+    <androidx.cardview.widget.CardView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="@dimen/dp_8"
+        android:layout_marginTop="@dimen/dp_4"
+        android:layout_marginRight="@dimen/dp_8"
+        android:layout_marginBottom="@dimen/dp_4">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal">
+
+
+            <CheckBox
+                android:id="@+id/cb_canMultiple"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:visibility="gone" />
+
+            <LinearLayout
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:background="@drawable/btn_bg_selector"
+                android:orientation="vertical"
+                android:padding="@dimen/dp_5">
+
+                <LinearLayout
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:gravity="center"
+                    android:orientation="horizontal">
+
+
+                    <TextView
+                        android:id="@+id/tv_name"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="@dimen/dp_20"
+                        android:textColor="@color/black"
+                        android:textSize="15sp"
+                        tools:text="张三" />
+
+
+                </LinearLayout>
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:gravity="center_vertical"
+                android:orientation="vertical">
+
+                <ImageView
+                    android:id="@+id/iv_delete"
+                    android:layout_width="20dp"
+                    android:layout_height="20dp"
+                    android:layout_gravity="end"
+                    android:src="@mipmap/icon_error" />
+                <androidx.appcompat.widget.AppCompatTextView
+                    android:id="@+id/tv_delete"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_alignParentEnd="true"
+                    android:layout_centerVertical="true"
+                    android:layout_margin="@dimen/dp_5"
+                    android:layout_marginEnd="@dimen/dp_10"
+                    android:background="@drawable/text_bg_delete"
+                    android:paddingLeft="@dimen/dp_10"
+                    android:paddingTop="2dp"
+                    android:paddingRight="@dimen/dp_10"
+                    android:paddingBottom="2dp"
+                    android:text="移除"
+                    android:textColor="@color/color_white"
+                    android:textSize="@dimen/sp_12" />
+
+            </LinearLayout>
+        </LinearLayout>
+
+    </androidx.cardview.widget.CardView>
+
+
+</LinearLayout>

+ 1 - 0
app/src/main/res/layout/layout_repair_process_report_module.xml

@@ -614,6 +614,7 @@
                       <TextView
                           android:layout_width="match_parent"
                           android:layout_height="wrap_content"
+                          android:textSize="@dimen/sp_16"
                           android:text="2.2 设施维护保养效果:" />
 
                       <LinearLayout

+ 11 - 0
app/src/main/res/layout/ui_repair_found.xml

@@ -288,6 +288,7 @@
                             android:id="@+id/layout_add_material"
                             android:layout_width="match_parent"
                             android:layout_height="36dp"
+                            android:layout_marginLeft="6dp"
                             android:gravity="center_vertical">
 
                             <TextView
@@ -476,8 +477,18 @@
                             android:id="@+id/layout_btn_add"
                             android:layout_width="match_parent"
                             android:layout_height="36dp"
+                            android:layout_marginLeft="6dp"
                             android:gravity="center_vertical">
 
+
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:gravity="center"
+                                android:text="*"
+                                android:visibility="invisible"
+                                android:textColor="@color/red" />
                             <TextView
                                 style="@style/ReportDetail.Info.Title"
                                 android:layout_width="wrap_content"

+ 3 - 0
app/src/main/res/values/strings.xml

@@ -102,4 +102,7 @@
     <string name="connect_error">连接错误</string>
     <string name="todo_gd">处理工单</string>
     <string name="trouble_query_search_hint_addr">请输入隐患地址</string>
+    <string name="device_name">产品名称:</string>
+    <string name="spec_type">规格:</string>
+    <string name="used_list">使用列表</string>
 </resources>