Jelajahi Sumber

事件反馈

zhanghongrui 5 hari lalu
induk
melakukan
d50e7fdbb5
42 mengubah file dengan 1991 tambahan dan 59 penghapusan
  1. 6 5
      app/src/main/java/com/sjkj/appthreefloor_tsgz/activity/ResourceDetailsActivity.java
  2. 36 0
      app/src/main/java/com/sjkj/appthreefloor_tsgz/adapter/EventImageShowAdapter.java
  3. 68 0
      app/src/main/java/com/sjkj/appthreefloor_tsgz/adapter/FileCenterAdapter.java
  4. 178 0
      app/src/main/java/com/sjkj/appthreefloor_tsgz/adapter/MessageDetailsAdapter.java
  5. 46 0
      app/src/main/java/com/sjkj/appthreefloor_tsgz/adapter/VideoAdapter.java
  6. 69 0
      app/src/main/java/com/sjkj/appthreefloor_tsgz/bean/EventMessageDetailsBean.java
  7. 184 0
      app/src/main/java/com/sjkj/appthreefloor_tsgz/bean/FeedBackDetailsBean.java
  8. 100 0
      app/src/main/java/com/sjkj/appthreefloor_tsgz/bean/FileCenterBean.java
  9. 1 0
      app/src/main/java/com/sjkj/appthreefloor_tsgz/fragment/EventFragment.java
  10. 205 3
      app/src/main/java/com/sjkj/appthreefloor_tsgz/fragment/EventMessageFragment.java
  11. 36 36
      app/src/main/java/com/sjkj/appthreefloor_tsgz/login/LoginActivity.java
  12. 50 0
      app/src/main/java/com/sjkj/appthreefloor_tsgz/net/EventAddFeedBackRequest.java
  13. 53 0
      app/src/main/java/com/sjkj/appthreefloor_tsgz/net/EventMessageListRequest.java
  14. 9 0
      app/src/main/java/com/sjkj/appthreefloor_tsgz/net/RetrofitService.java
  15. 45 0
      app/src/main/java/com/sjkj/appthreefloor_tsgz/utils/ByImageLoaderUtils.java
  16. 215 0
      app/src/main/java/com/sjkj/appthreefloor_tsgz/utils/DownLoadUtils.java
  17. 26 0
      app/src/main/java/com/sjkj/appthreefloor_tsgz/utils/ImageUtils.java
  18. 284 0
      app/src/main/java/com/sjkj/appthreefloor_tsgz/utils/OpenFileUtil.java
  19. 20 0
      app/src/main/java/com/sjkj/appthreefloor_tsgz/utils/VideoUtils.java
  20. 7 0
      app/src/main/java/com/sjkj/appthreefloor_tsgz/weight/photoview/PhotoViewActivity.java
  21. TEMPAT SAMPAH
      app/src/main/res/drawable-xxhdpi/icon_excel.png
  22. TEMPAT SAMPAH
      app/src/main/res/drawable-xxhdpi/icon_jpg.png
  23. TEMPAT SAMPAH
      app/src/main/res/drawable-xxhdpi/icon_mp3.png
  24. TEMPAT SAMPAH
      app/src/main/res/drawable-xxhdpi/icon_mp4.png
  25. TEMPAT SAMPAH
      app/src/main/res/drawable-xxhdpi/icon_pdf.png
  26. TEMPAT SAMPAH
      app/src/main/res/drawable-xxhdpi/icon_ppt.png
  27. TEMPAT SAMPAH
      app/src/main/res/drawable-xxhdpi/icon_scan.png
  28. TEMPAT SAMPAH
      app/src/main/res/drawable-xxhdpi/icon_send.png
  29. TEMPAT SAMPAH
      app/src/main/res/drawable-xxhdpi/icon_txt.png
  30. TEMPAT SAMPAH
      app/src/main/res/drawable-xxhdpi/icon_word.png
  31. TEMPAT SAMPAH
      app/src/main/res/drawable-xxhdpi/icon_yuan.png
  32. 11 0
      app/src/main/res/drawable/bg_yuan_shape.xml
  33. 9 0
      app/src/main/res/drawable/rounded_30.xml
  34. 6 0
      app/src/main/res/drawable/shape_common_corners_10dp.xml
  35. 8 5
      app/src/main/res/layout/activity_photo_view.xml
  36. 46 9
      app/src/main/res/layout/fragment_event_message.xml
  37. 35 0
      app/src/main/res/layout/item_event_image_list_show.xml
  38. 61 0
      app/src/main/res/layout/item_file_list.xml
  39. 130 0
      app/src/main/res/layout/item_message_details.xml
  40. 41 0
      app/src/main/res/layout/item_video_list.xml
  41. 1 0
      app/src/main/res/values/colors.xml
  42. 5 1
      base-lib/src/main/java/com/sjkj/base_lib/utils/AppTools.java

+ 6 - 5
app/src/main/java/com/sjkj/appthreefloor_tsgz/activity/ResourceDetailsActivity.java

@@ -29,6 +29,7 @@ import com.sjkj.appthreefloor_tsgz.utils.Method;
 import com.sjkj.base_lib.app.AppManager;
 import com.sjkj.base_lib.entity.Params;
 import com.sjkj.base_lib.net.domain.interactor.ProcessErrorSubscriber;
+import com.sjkj.base_lib.utils.AppTools;
 import com.sjkj.base_lib.utils.LocationUtils;
 import com.sjkj.base_lib.utils.ToastUtils;
 import com.sjkj.base_lib.view.BaseActivity;
@@ -175,10 +176,10 @@ public class ResourceDetailsActivity extends BaseActivity {
     public void loadData() {
         super.loadData();
         Params params = new Params();
-//        params.put("tag", getIntent().getStringExtra("tag"));
-//        params.put("id", getIntent().getStringExtra("id"));
-        params.put("tag", "waterintake");
-        params.put("id", "1c6d2c6bb5a84077be00f1d96396c2b0");
+        params.put("tag", getIntent().getStringExtra("tag"));
+        params.put("id", getIntent().getStringExtra("id"));
+//        params.put("tag", "waterintake");
+//        params.put("id", "1c6d2c6bb5a84077be00f1d96396c2b0");
         resureDetailsRequest.setParams(params);
         resureDetailsRequest.execute(new ProcessErrorSubscriber<ResureDetailsBean>() {
             @Override
@@ -202,7 +203,7 @@ public class ResourceDetailsActivity extends BaseActivity {
                         List<ImageBean> imageBeanList = new ArrayList<>();
                         for (int i = 0; i < list.size(); i++) {
                             ImageBean imageBean = new ImageBean();
-                            imageBean.setRealUrl(list.get(i));
+                            imageBean.setRealUrl(AppTools.getImageBaseUrl() + list.get(i));
                             imageBeanList.add(imageBean);
 
                         }

+ 36 - 0
app/src/main/java/com/sjkj/appthreefloor_tsgz/adapter/EventImageShowAdapter.java

@@ -0,0 +1,36 @@
+package com.sjkj.appthreefloor_tsgz.adapter;
+
+import android.content.Context;
+
+import com.sjkj.appthreefloor_tsgz.R;
+import com.sjkj.appthreefloor_tsgz.bean.ImageBean;
+import com.sjkj.appthreefloor_tsgz.databinding.ItemEventImageListShowBinding;
+import com.sjkj.base_lib.adapter.BaseRecAdapter;
+
+import java.util.List;
+
+public class EventImageShowAdapter extends BaseRecAdapter<ImageBean, ItemEventImageListShowBinding> {
+
+    public EventImageShowAdapter(Context context) {
+        super(context);
+    }
+
+    public EventImageShowAdapter(Context context, List<ImageBean> list) {
+        super(context, list);
+    }
+
+    @Override
+    protected int getLayoutResId(int viewType) {
+        return R.layout.item_event_image_list_show;
+    }
+
+    @Override
+    protected void onBindItem(ItemEventImageListShowBinding binding, ImageBean s, int position) {
+        binding.setModel(s);
+        binding.executePendingBindings();
+
+//        binding.titleTv TODO
+    }
+
+
+}

+ 68 - 0
app/src/main/java/com/sjkj/appthreefloor_tsgz/adapter/FileCenterAdapter.java

@@ -0,0 +1,68 @@
+package com.sjkj.appthreefloor_tsgz.adapter;
+
+import android.content.Context;
+import android.text.TextUtils;
+
+import com.sjkj.appthreefloor_tsgz.R;
+import com.sjkj.appthreefloor_tsgz.bean.FileCenterBean;
+import com.sjkj.appthreefloor_tsgz.databinding.ItemFileListBinding;
+import com.sjkj.appthreefloor_tsgz.utils.ByImageLoaderUtils;
+import com.sjkj.base_lib.adapter.BaseRecAdapter;
+
+import java.util.List;
+
+public class FileCenterAdapter extends BaseRecAdapter<FileCenterBean.FileCenter, ItemFileListBinding> {
+
+    public FileCenterAdapter(Context context) {
+        super(context);
+    }
+
+    public FileCenterAdapter(Context context, List<FileCenterBean.FileCenter> list) {
+        super(context, list);
+    }
+
+    @Override
+    protected int getLayoutResId(int viewType) {
+        return R.layout.item_file_list;
+    }
+
+    @Override
+    protected void onBindItem(ItemFileListBinding binding, FileCenterBean.FileCenter fileCenterBean, int position) {
+        binding.setModel(fileCenterBean);
+        binding.executePendingBindings();
+
+        if (!TextUtils.isEmpty(fileCenterBean.getPath())) {
+           String filename = fileCenterBean.getPath().substring(fileCenterBean.getPath().lastIndexOf('/') + 1);//截取url最后的数
+            if (!TextUtils.isEmpty(filename)) {
+                filename = filename.toLowerCase();
+                filename = filename.substring(filename.lastIndexOf('.'));
+
+
+                if (filename.equals(".doc")||filename.equals(".docx")){
+
+                    ByImageLoaderUtils.getInstance().displayIMG(R.drawable.icon_word,binding.filetype,context);
+                }else if (filename.equals(".xls")||filename.equals(".xlsx")){
+                    ByImageLoaderUtils.getInstance().displayIMG(R.drawable.icon_excel,binding.filetype,context);
+                }else if (filename.equals(".pdf")) {
+                    ByImageLoaderUtils.getInstance().displayIMG(R.drawable.icon_pdf, binding.filetype, context);
+                } else if (filename.equals(".ppt") || filename.equals(".pptx")) {
+                    ByImageLoaderUtils.getInstance().displayIMG(R.drawable.icon_ppt, binding.filetype, context);
+                } else if (filename.equals(".jpg") || filename.equals(".png") || filename.equals("jpeg")) {
+                    ByImageLoaderUtils.getInstance().displayIMG(R.drawable.icon_jpg, binding.filetype, context);
+                } else if (filename.equals(".mp3") || filename.equals(".wav")) {
+                    ByImageLoaderUtils.getInstance().displayIMG(R.drawable.icon_mp3, binding.filetype, context);
+                } else if (filename.equals(".mp4")) {
+                    ByImageLoaderUtils.getInstance().displayIMG(R.drawable.icon_mp4, binding.filetype, context);
+                } else if (filename.equals(".txt")) {
+                    ByImageLoaderUtils.getInstance().displayIMG(R.drawable.icon_txt, binding.filetype, context);
+                } else {
+                    ByImageLoaderUtils.getInstance().displayIMG(R.drawable.icon_word,binding.filetype,context);
+                }
+
+            }
+        }
+
+    }
+
+
+}

+ 178 - 0
app/src/main/java/com/sjkj/appthreefloor_tsgz/adapter/MessageDetailsAdapter.java

@@ -0,0 +1,178 @@
+package com.sjkj.appthreefloor_tsgz.adapter;
+
+import android.content.Context;
+import android.text.TextUtils;
+import android.util.Log;
+
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.sjkj.appthreefloor_tsgz.R;
+import com.sjkj.appthreefloor_tsgz.bean.EventMessageDetailsBean;
+import com.sjkj.appthreefloor_tsgz.bean.FileCenterBean;
+import com.sjkj.appthreefloor_tsgz.bean.ImageBean;
+import com.sjkj.appthreefloor_tsgz.databinding.ItemMessageDetailsBinding;
+import com.sjkj.appthreefloor_tsgz.utils.ImageUtils;
+import com.sjkj.appthreefloor_tsgz.utils.VideoUtils;
+import com.sjkj.base_lib.adapter.BaseRecAdapter;
+import com.sjkj.base_lib.utils.AppTools;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class MessageDetailsAdapter extends BaseRecAdapter<EventMessageDetailsBean, ItemMessageDetailsBinding> {
+    private EventImageShowAdapter adapter;
+    private FileCenterAdapter fileAdapter;
+    private VideoAdapter videoAdapter;
+
+    public MessageDetailsAdapter(Context context) {
+        super(context);
+    }
+
+    public MessageDetailsAdapter(Context context, List<EventMessageDetailsBean> list) {
+        super(context, list);
+    }
+
+    @Override
+    protected int getLayoutResId(int viewType) {
+        return R.layout.item_message_details;
+    }
+
+    @Override
+    protected void onBindItem(ItemMessageDetailsBinding binding, EventMessageDetailsBean bean, int position) {
+        //bean.setPosition(position);
+//        if (position == list.size() - 1) {
+//            binding.viewyuan.setVisibility(View.VISIBLE);
+//        } else {
+//            binding.viewyuan.setVisibility(View.GONE);
+//        }
+
+        binding.setModel(bean);
+        binding.executePendingBindings();
+
+        LinearLayoutManager manager = new LinearLayoutManager(this.context);
+        manager.setOrientation(RecyclerView.HORIZONTAL);
+        LinearLayoutManager manager1 = new LinearLayoutManager(this.context);
+        manager1.setOrientation(RecyclerView.HORIZONTAL);
+        LinearLayoutManager manager2 = new LinearLayoutManager(this.context);
+        manager2.setOrientation(RecyclerView.HORIZONTAL);
+        binding.recyclerViewImage.setLayoutManager(manager);
+        binding.recyclerViewFile.setLayoutManager(manager1);
+        binding.recyclerViewVideo.setLayoutManager(manager2);
+        adapter = new EventImageShowAdapter(this.context);
+
+        fileAdapter = new FileCenterAdapter(this.context);
+        binding.recyclerViewFile.setAdapter(fileAdapter);
+
+        videoAdapter = new VideoAdapter(this.context);
+
+        adapter.setItemClick(new OnItemClick<ImageBean>() {
+            @Override
+            public void onItemClick(ImageBean s, int index) {
+                if (onItemPhotoClickListener != null) {
+                    onItemPhotoClickListener.onItemPhotoClick(position, index);
+                }
+            }
+        });
+
+        fileAdapter.setItemClick(new OnItemClick<FileCenterBean.FileCenter>() {
+            @Override
+            public void onItemClick(FileCenterBean.FileCenter bean, int position) {
+                if (onItemFileClickListener != null) {
+                    onItemFileClickListener.onItemFileClick(bean.getName(), bean.getPath());
+                }
+            }
+        });
+
+
+        videoAdapter.setItemClick(new OnItemClick<ImageBean>() {
+            @Override
+            public void onItemClick(ImageBean bean, int position) {
+                if (onItemVideoClickListener != null) {
+                    onItemVideoClickListener.onItemVideoClick(bean.getRealUrl());
+                }
+            }
+        });
+        binding.recyclerViewImage.setAdapter(adapter);
+
+        binding.recyclerViewVideo.setAdapter(videoAdapter);
+
+//        if (!TextUtils.isEmpty(bean.getFiles()) && bean.getFiles() != null) {
+//            List<String> list = Arrays.asList(bean.getFiles().split(","));
+//
+//            List<ImageBean> videoBeanList = new ArrayList<>();
+//            for (int i = 0; i < list.size(); i++) {
+//                ImageBean imageBean = new ImageBean();
+//                imageBean.setRealUrl(AppTools.getBaseUrl()+list.get(i));
+//                videoBeanList.add(imageBean);
+//            }
+//            if (videoBeanList != null && videoBeanList.size() > 0) {
+//                videoAdapter.refreshList(videoBeanList);
+//            }
+//        }
+        if (!TextUtils.isEmpty(bean.getFiles()) && bean.getFiles() != null) {
+            List<String> list = Arrays.asList(bean.getFiles().split(","));
+            List<ImageBean> imageBeanList = new ArrayList<>();
+            List<ImageBean> videoBeanList = new ArrayList<>();
+            List<FileCenterBean.FileCenter> file = new ArrayList<>();
+
+            for (int i = 0; i < list.size(); i++) {
+                if (ImageUtils.isImage(list.get(i))) {
+                    ImageBean imageBean = new ImageBean();
+                    imageBean.setRealUrl(AppTools.getImageBaseUrl() + list.get(i));
+                    Log.d("zhr1111", imageBean.getRealUrl());
+                    imageBeanList.add(imageBean);
+                } else if (VideoUtils.isVideoFile(list.get(i))) {
+                    ImageBean imageBean = new ImageBean();
+                    imageBean.setRealUrl(AppTools.getImageBaseUrl() + list.get(i));
+                    videoBeanList.add(imageBean);
+                } else {
+                    FileCenterBean.FileCenter fileCenter = new FileCenterBean.FileCenter();
+                    fileCenter.setPath(AppTools.getBaseUrl() + list.get(i));
+                    file.add(fileCenter);
+                }
+            }
+
+            if (imageBeanList != null && imageBeanList.size() > 0) {
+                adapter.refreshList(imageBeanList);
+            }
+            if (videoBeanList != null && videoBeanList.size() > 0) {
+                videoAdapter.refreshList(videoBeanList);
+            }
+            if (file != null && file.size() > 0) {
+
+                fileAdapter.refreshList(file);
+
+            }
+        }
+    }
+
+    public interface OnItemPhotoClickListener {
+        void onItemPhotoClick(int position, int index);
+    }
+
+    public interface OnItemFileClickListener {
+        void onItemFileClick(String fileName, String path);
+    }
+
+    public interface OnItemVideoClickListener {
+        void onItemVideoClick(String videoUrl);
+    }
+
+    private OnItemPhotoClickListener onItemPhotoClickListener;
+    private OnItemFileClickListener onItemFileClickListener;
+    private OnItemVideoClickListener onItemVideoClickListener;
+
+    public void setOnItemPhotoClickListener(OnItemPhotoClickListener onItemPhotoClickListener) {
+        this.onItemPhotoClickListener = onItemPhotoClickListener;
+    }
+
+    public void setOnItemVideoClickListener(OnItemVideoClickListener onItemVideoClickListener) {
+        this.onItemVideoClickListener = onItemVideoClickListener;
+    }
+
+    public void setOnItemFileClickListener(OnItemFileClickListener onItemFileClickListener) {
+        this.onItemFileClickListener = onItemFileClickListener;
+    }
+}

+ 46 - 0
app/src/main/java/com/sjkj/appthreefloor_tsgz/adapter/VideoAdapter.java

@@ -0,0 +1,46 @@
+package com.sjkj.appthreefloor_tsgz.adapter;
+
+import android.content.Context;
+
+import com.bumptech.glide.Glide;
+import com.bumptech.glide.request.RequestOptions;
+import com.sjkj.appthreefloor_tsgz.R;
+import com.sjkj.appthreefloor_tsgz.bean.ImageBean;
+import com.sjkj.appthreefloor_tsgz.databinding.ItemVideoListBinding;
+import com.sjkj.base_lib.adapter.BaseRecAdapter;
+
+import java.util.List;
+
+public class VideoAdapter extends BaseRecAdapter<ImageBean, ItemVideoListBinding> {
+
+    public VideoAdapter(Context context) {
+        super(context);
+    }
+
+    public VideoAdapter(Context context, List<ImageBean> list) {
+        super(context, list);
+    }
+
+    @Override
+    protected int getLayoutResId(int viewType) {
+        return R.layout.item_video_list;
+    }
+
+    @Override
+    protected void onBindItem(ItemVideoListBinding binding, ImageBean bean, int position) {
+        binding.setModel(bean);
+        binding.executePendingBindings();
+       //binding.ivVideo.setImageBitmap(VideoUtil.createVideoThumbnail(bean.getRealUrl()));
+
+        Glide.with(context)
+                .setDefaultRequestOptions(
+                        new RequestOptions()
+                                .frame(1000)
+                                .centerCrop()
+                )
+                .load(bean.getRealUrl())
+                .into(binding.ivVideo);
+    }
+
+
+}

+ 69 - 0
app/src/main/java/com/sjkj/appthreefloor_tsgz/bean/EventMessageDetailsBean.java

@@ -0,0 +1,69 @@
+package com.sjkj.appthreefloor_tsgz.bean;
+
+public class EventMessageDetailsBean {
+   private String  address;
+   private String  createName;
+   private String  createTime;
+   private String  eventName;
+   private String  files;
+   private String  remark;
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getCreateName() {
+        return createName;
+    }
+
+    public void setCreateName(String createName) {
+        this.createName = createName;
+    }
+
+    public String getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(String createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getEventName() {
+        return eventName;
+    }
+
+    public void setEventName(String eventName) {
+        this.eventName = eventName;
+    }
+
+    public String getFiles() {
+        return files;
+    }
+
+    public void setFiles(String files) {
+        this.files = files;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    private String  status;
+}
+

+ 184 - 0
app/src/main/java/com/sjkj/appthreefloor_tsgz/bean/FeedBackDetailsBean.java

@@ -0,0 +1,184 @@
+package com.sjkj.appthreefloor_tsgz.bean;
+
+import java.util.List;
+
+public class FeedBackDetailsBean {
+    public static class AttachsBeanMpf {
+
+        private String attachPath;
+
+        public String getAttachPath() {
+            return attachPath;
+        }
+
+        public void setAttachPath(String attachPath) {
+            this.attachPath = attachPath;
+        }
+
+        public String getFileName() {
+            return fileName;
+        }
+
+        public void setFileName(String fileName) {
+            this.fileName = fileName;
+        }
+
+        private String fileName;
+
+
+    }
+
+    public class AttachBean {
+        private String attachPath;
+
+        private String busSource;
+
+        private String fileName;
+
+        private int version;
+
+        public void setAttachPath(String attachPath) {
+            this.attachPath = attachPath;
+        }
+
+        public String getAttachPath() {
+            return this.attachPath;
+        }
+
+        public void setBusSource(String busSource) {
+            this.busSource = busSource;
+        }
+
+        public String getBusSource() {
+            return this.busSource;
+        }
+
+        public void setFileName(String fileName) {
+            this.fileName = fileName;
+        }
+
+        public String getFileName() {
+            return this.fileName;
+        }
+
+        public void setVersion(int version) {
+            this.version = version;
+        }
+
+        public int getVersion() {
+            return this.version;
+        }
+    }
+
+
+    private List<AttachBean> attachs;
+
+    private List<AttachsBeanMpf> attachsMp;
+
+    private String createBy;
+
+    private String createName;
+
+    private String createTime;
+
+    private String eventCode;
+
+    private String id;
+
+    private String logContent;
+
+    private String operation;
+
+    private String operationType;
+
+    private String webUrl;
+
+    public void setAttachs(List<AttachBean> attachs) {
+        this.attachs = attachs;
+    }
+
+    public List<AttachBean> getAttachs() {
+        return this.attachs;
+    }
+
+    public void setAttachsMp(List<AttachsBeanMpf> attachsMp) {
+        this.attachsMp = attachsMp;
+    }
+
+    public List<AttachsBeanMpf> getAttachsMp() {
+        return this.attachsMp;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public String getCreateBy() {
+        return this.createBy;
+    }
+
+    public void setCreateName(String createName) {
+        this.createName = createName;
+    }
+
+    public String getCreateName() {
+        return this.createName;
+    }
+
+    public void setCreateTime(String createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getCreateTime() {
+        return this.createTime;
+    }
+
+    public void setEventCode(String eventCode) {
+        this.eventCode = eventCode;
+    }
+
+    public String getEventCode() {
+        return this.eventCode;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getId() {
+        return this.id;
+    }
+
+    public void setLogContent(String logContent) {
+        this.logContent = logContent;
+    }
+
+    public String getLogContent() {
+        return this.logContent;
+    }
+
+    public void setOperation(String operation) {
+        this.operation = operation;
+    }
+
+    public String getOperation() {
+        return this.operation;
+    }
+
+    public void setOperationType(String operationType) {
+        this.operationType = operationType;
+    }
+
+    public String getOperationType() {
+        return this.operationType;
+    }
+
+    public void setWebUrl(String webUrl) {
+        this.webUrl = webUrl;
+    }
+
+    public String getWebUrl() {
+        return this.webUrl;
+    }
+}
+

+ 100 - 0
app/src/main/java/com/sjkj/appthreefloor_tsgz/bean/FileCenterBean.java

@@ -0,0 +1,100 @@
+package com.sjkj.appthreefloor_tsgz.bean;
+
+import java.util.List;
+
+public class FileCenterBean {
+    private List<FileCenter> rows;
+
+    public List<FileCenter> getRows() {
+        return rows;
+    }
+
+    public void setRows(List<FileCenter> rows) {
+        this.rows = rows;
+    }
+
+    public int getTotal() {
+        return total;
+    }
+
+    public void setTotal(int total) {
+        this.total = total;
+    }
+
+    private int total;
+    public static class  FileCenter{
+        /*    "createTime": "2022-07-08 09:10:15",
+                "dataStatus": "0",
+                "id": "c5ccde3e11a94e0a99109310b898f103",
+                "name": "20220526spdemo.txt",
+                "params": {},
+                "parentId": "1d2aa099d6fd44cb900f1c385d9ab48f",
+                "path": "group1/M00/00/05/wKgA3GLHg-yAF8BHAAAao6BSTxw609.txt",
+                "type": "2"*/
+        private String createTime;
+        private String dataStatus;
+        private String id;
+        private String name;
+
+        public String getCreateTime() {
+            return createTime;
+        }
+
+        public void setCreateTime(String createTime) {
+            this.createTime = createTime;
+        }
+
+        public String getDataStatus() {
+            return dataStatus;
+        }
+
+        public void setDataStatus(String dataStatus) {
+            this.dataStatus = dataStatus;
+        }
+
+        public String getId() {
+            return id;
+        }
+
+        public void setId(String id) {
+            this.id = id;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public String getParentId() {
+            return parentId;
+        }
+
+        public void setParentId(String parentId) {
+            this.parentId = parentId;
+        }
+
+        public String getPath() {
+            return path;
+        }
+
+        public void setPath(String path) {
+            this.path = path;
+        }
+
+        public String getType() {
+            return type;
+        }
+
+        public void setType(String type) {
+            this.type = type;
+        }
+
+        private String parentId;
+        private String path;
+        private String type;
+    }
+
+}

+ 1 - 0
app/src/main/java/com/sjkj/appthreefloor_tsgz/fragment/EventFragment.java

@@ -255,6 +255,7 @@ public class EventFragment extends BaseFragment /*implements View.OnClickListene
                     //  if (AppTools.ceil(bean.getTotal()) > currentPage) {
 
                     if (bean != null && bean.getRows().size() > 0) {
+                        currentPage = currentPage + 1;
                         Gson gson = new Gson();
 
                         for (int i = 0; i < bean.getRows().size(); i++) {

+ 205 - 3
app/src/main/java/com/sjkj/appthreefloor_tsgz/fragment/EventMessageFragment.java

@@ -1,24 +1,82 @@
 package com.sjkj.appthreefloor_tsgz.fragment;
 
+import android.content.Intent;
 import android.os.Bundle;
+import android.text.TextUtils;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 
 import androidx.lifecycle.ViewModelProvider;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
 
+import com.hjq.permissions.OnPermissionCallback;
+import com.hjq.permissions.Permission;
+import com.hjq.permissions.XXPermissions;
 import com.sjkj.appthreefloor_tsgz.R;
-import com.sjkj.appthreefloor_tsgz.databinding.FragmentEventDetailsBinding;
+import com.sjkj.appthreefloor_tsgz.activity.MyVideoPlayerActivity;
+import com.sjkj.appthreefloor_tsgz.adapter.MessageDetailsAdapter;
+import com.sjkj.appthreefloor_tsgz.app.App;
+import com.sjkj.appthreefloor_tsgz.bean.EventMessageDetailsBean;
 import com.sjkj.appthreefloor_tsgz.databinding.FragmentEventMessageBinding;
 import com.sjkj.appthreefloor_tsgz.fragment.viewModel.EventFargmentViewModel;
+import com.sjkj.appthreefloor_tsgz.net.EventAddFeedBackRequest;
+import com.sjkj.appthreefloor_tsgz.net.EventMessageListRequest;
+import com.sjkj.appthreefloor_tsgz.utils.DownLoadUtils;
+import com.sjkj.appthreefloor_tsgz.utils.ImageUtils;
+import com.sjkj.appthreefloor_tsgz.utils.OpenFileUtil;
+import com.sjkj.appthreefloor_tsgz.weight.photoview.PhotoViewActivity;
+import com.sjkj.base_lib.app.AppManager;
+import com.sjkj.base_lib.entity.Params;
+import com.sjkj.base_lib.net.domain.interactor.ProcessErrorSubscriber;
+import com.sjkj.base_lib.utils.AppTools;
+import com.sjkj.base_lib.utils.ToastUtils;
 import com.sjkj.base_lib.view.BaseFragment;
+import com.sjkj.base_lib.weight.LoadingDialog;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
 
 public class EventMessageFragment extends BaseFragment {
     private FragmentEventMessageBinding binding;
     private EventFargmentViewModel viewModel;
+    private MessageDetailsAdapter adapter;
+    private EventMessageListRequest eventMessageListRequest = new EventMessageListRequest(App.getInstance());
+    private EventAddFeedBackRequest addFeedBackRequest = new EventAddFeedBackRequest(App.getInstance());
+    private boolean isauthorization = false;
+    private List<EventMessageDetailsBean> feedBackDetailsBeanList = new ArrayList<>();
+
+    private void requestPermissionsReadAndWrite() {
+        XXPermissions.with(AppManager.getAppManager().currentActivity())
+                .permission(Permission.MANAGE_EXTERNAL_STORAGE)
+                .request(new OnPermissionCallback() {
+                    @Override
+                    public void onGranted(List<String> permissions, boolean all) {
+                        if (all) {
+                            isauthorization = true;
+                        } else {
+                            ToastUtils.show("获取部分权限成功,但部分权限未正常授予");
+                        }
+                    }
+
+                    @Override
+                    public void onDenied(List<String> permissions, boolean never) {
+                        if (never) {
+                            ToastUtils.show("被永久拒绝授权,请手动授予权限");
+                            // 如果是被永久拒绝就跳转到应用权限系统设置页面
+                            XXPermissions.startPermissionActivity(AppManager.getAppManager().currentActivity(), permissions);
+                        } else {
+                            ToastUtils.show("获取权限失败");
+                        }
+                    }
+                });
+    }
+
     @Override
     protected int initLayout() {
-           return R.layout.fragment_event_message;
+        return R.layout.fragment_event_message;
     }
 
     @Override
@@ -32,16 +90,160 @@ public class EventMessageFragment extends BaseFragment {
 
     @Override
     public void initView() {
-
+        LinearLayoutManager manager = new LinearLayoutManager(getActivity());
+        manager.setOrientation(RecyclerView.VERTICAL);
+        binding.fkRecyclerView.setLayoutManager(manager);
+        adapter = new MessageDetailsAdapter(getActivity());
+        binding.fkRecyclerView.setAdapter(adapter);
     }
 
     @Override
     public void initListener() {
+        binding.icSend.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                if (TextUtils.isEmpty(binding.etContent.getText().toString())) {
+                    ToastUtils.show("请输入内容");
+                    return;
+                }
+                showLoadingDialog();
+                Params params = new Params();
+                params.put("eventId", getActivity().getIntent().getStringExtra("id"));
+                params.put("remark", binding.etContent.getText().toString());
+                addFeedBackRequest.setParams(params);
+                addFeedBackRequest.execute(new ProcessErrorSubscriber() {
+                    @Override
+                    public void onError(Throwable e) {
+                        super.onError(e);
+                        hideLoadingDialog(LoadingDialog.LOADING_FAILED);
+                        if (!TextUtils.isEmpty(e.getMessage())) {
+                            ToastUtils.show(e.getMessage());
+                        }
+                    }
+
+                    @Override
+                    public void onNext(Object o) {
+                        super.onNext(o);
+                        hideLoadingDialog(LoadingDialog.LOADING_SUCCESS);
+                        ToastUtils.show("操作成功");
+                        loadData();
+
+                    }
+                });
+            }
+        });
+        //反馈视频列表点击事件
+        adapter.setOnItemVideoClickListener(new MessageDetailsAdapter.OnItemVideoClickListener() {
+            @Override
+            public void onItemVideoClick(String videoUrl) {
+                if (isauthorization) {
+//                    //读写权限授权成功
+                    Intent intent = new Intent(getActivity(), MyVideoPlayerActivity.class);
+                    intent.putExtra("videoUrl", videoUrl);
+                    startActivity(intent);
+                } else {
+                    requestPermissionsReadAndWrite();
+                }
+            }
+        });
+
+        //反馈图片列表点击事件
+        adapter.setOnItemPhotoClickListener(new MessageDetailsAdapter.OnItemPhotoClickListener() {
+            @Override
+            public void onItemPhotoClick(int position, int index) {
+
+                try {
+                    if (feedBackDetailsBeanList != null && feedBackDetailsBeanList.size() > 0) {
+                        if (!TextUtils.isEmpty(feedBackDetailsBeanList.get(position).getFiles()) && feedBackDetailsBeanList.get(position).getFiles() != null) {
+
+
+                            List<String> attachs = Arrays.asList(feedBackDetailsBeanList.get(position).getFiles().split(","));
+                            ArrayList<String> imageList = new ArrayList<>();
+                            if (attachs != null && attachs.size() > 0) {
+                                for (int i = 0; i < attachs.size(); i++) {
+                                    if (ImageUtils.isImage(attachs.get(i))) {
+                                        imageList.add(AppTools.getImageBaseUrl() + attachs.get(i));
+                                    }
+
+                                }
+                            }
+
+                            Intent intent = new Intent(getActivity(), PhotoViewActivity.class);
+                            intent.putStringArrayListExtra("positionDataList", imageList);
+                            intent.putExtra("position", index);
+                            startActivity(intent);
+                        }
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        });
+        //反馈文件列表点击事件
+        adapter.setOnItemFileClickListener(new MessageDetailsAdapter.OnItemFileClickListener() {
+            @Override
+            public void onItemFileClick(String fileName, String path) {
+                if (isauthorization) {
+                    //读写权限授权成功
+//                    String group1 = bean.getPath().substring(0, bean.getPath().indexOf("/"));
+                    String group = path.substring(path.indexOf('?') + 1);//截取url最后的数
+
+                    //String name = bean.getPath().substring(bean.getPath().lastIndexOf("/") + 1);
+
+                    DownLoadFile(fileName, group);
+                } else {
+                    requestPermissionsReadAndWrite();
+                }
+            }
+        });
+    }
+
+    private void DownLoadFile(String name, String group) {
+        DownLoadUtils downLoadUtils = new DownLoadUtils(AppManager.getAppManager().currentActivity());
+        downLoadUtils.DownLoad(name, group, new DownLoadUtils.CallBack() {
+            @Override
+            public void onError(String msg) {
+
+                ToastUtils.show(msg);
+            }
+
+            @Override
+            public void onSuccess(String path) {
+
+                startActivity(OpenFileUtil.openFile(getActivity(), path));
+
+            }
+
 
+        });
     }
 
     @Override
     public void loadData() {
+        showLoadingDialog();
+        Params params = new Params();
+        params.put("eventId", getActivity().getIntent().getStringExtra("id"));
+        eventMessageListRequest.setParams(params);
+        eventMessageListRequest.execute(new ProcessErrorSubscriber<List<EventMessageDetailsBean>>() {
+            @Override
+            public void onError(Throwable e) {
+                super.onError(e);
+                hideLoadingDialog(LoadingDialog.LOADING_FAILED);
+                if (!TextUtils.isEmpty(e.getMessage())) {
+                    ToastUtils.show(e.getMessage());
+                }
+            }
 
+            @Override
+            public void onNext(List<EventMessageDetailsBean> list) {
+                super.onNext(list);
+                hideLoadingDialog(LoadingDialog.LOADING_SUCCESS);
+                if (list != null && list.size() > 0) {
+                    feedBackDetailsBeanList.clear();
+                    feedBackDetailsBeanList.addAll(list);
+                    adapter.refreshList(list);
+                }
+            }
+        });
     }
 }

+ 36 - 36
app/src/main/java/com/sjkj/appthreefloor_tsgz/login/LoginActivity.java

@@ -32,7 +32,7 @@ public class LoginActivity extends BaseLoginActivity {
     private ActivityLoginBinding binding;
     private LoginViewModel viewModel;
 
-    private LoginGetKeyRequest loginGetKeyRequest = new LoginGetKeyRequest(App.getInstance());
+    //private LoginGetKeyRequest loginGetKeyRequest = new LoginGetKeyRequest(App.getInstance());
     public LoginRequest loginRequest = new LoginRequest(App.getInstance());
 
     @Override
@@ -110,37 +110,37 @@ public class LoginActivity extends BaseLoginActivity {
     /**
      * 获取秘钥
      */
-    private void getLoginKey() {
-        showLoadingDialog();
-        loginGetKeyRequest.execute(new ProcessErrorSubscriber<LogInRsaBean>() {
-            @Override
-            public void onError(Throwable e) {
-                super.onError(e);
-                hideLoadingDialog(LoadingDialog.LOADING_FAILED);
-                if (!TextUtils.isEmpty(e.getMessage()) && e.getMessage().contains("connect")) {
-                    ToastUtils.show("连接服务器失败,检查网络连接。");
-                } else {
-                    ToastUtils.show(e.getMessage() + "");
-                }
-            }
-
-            @Override
-            public void onNext(LogInRsaBean bean) {
-                super.onNext(bean);
-                //公钥加密
-                String encryptBytes = "";
-                try {
-                    encryptBytes = RSAUtils.encryptPublicKey(viewModel.password.get().getBytes(), bean.getPublicKey());
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-                viewModel.password2.set(encryptBytes);
-                viewModel.sessionId.set(bean.getSessionId());
-                login();
-            }
-        });
-
-    }
+//    private void getLoginKey() {
+//        showLoadingDialog();
+//        loginGetKeyRequest.execute(new ProcessErrorSubscriber<LogInRsaBean>() {
+//            @Override
+//            public void onError(Throwable e) {
+//                super.onError(e);
+//                hideLoadingDialog(LoadingDialog.LOADING_FAILED);
+//                if (!TextUtils.isEmpty(e.getMessage()) && e.getMessage().contains("connect")) {
+//                    ToastUtils.show("连接服务器失败,检查网络连接。");
+//                } else {
+//                    ToastUtils.show(e.getMessage() + "");
+//                }
+//            }
+//
+//            @Override
+//            public void onNext(LogInRsaBean bean) {
+//                super.onNext(bean);
+//                //公钥加密
+//                String encryptBytes = "";
+//                try {
+//                    encryptBytes = RSAUtils.encryptPublicKey(viewModel.password.get().getBytes(), bean.getPublicKey());
+//                } catch (Exception e) {
+//                    e.printStackTrace();
+//                }
+//                viewModel.password2.set(encryptBytes);
+//                viewModel.sessionId.set(bean.getSessionId());
+//                login();
+//            }
+//        });
+//
+//    }
 
     /**
      * 登录接口
@@ -167,10 +167,10 @@ public class LoginActivity extends BaseLoginActivity {
             public void onError(Throwable e) {
                 super.onError(e);
                 hideLoadingDialog(LoadingDialog.LOADING_FAILED);
-                Intent intent = new Intent(AppManager.getAppManager().currentActivity(), MainActivity.class);
-                AppManager.getAppManager().currentActivity().startActivity(intent);
-                hideLoadingDialog(LoadingDialog.LOADING_SUCCESS);
-                finish();
+//                Intent intent = new Intent(AppManager.getAppManager().currentActivity(), MainActivity.class);
+//                AppManager.getAppManager().currentActivity().startActivity(intent);
+//                hideLoadingDialog(LoadingDialog.LOADING_SUCCESS);
+//                finish();
                 if (!TextUtils.isEmpty(e.getMessage()) && e.getMessage().contains("connect")) {
                     ToastUtils.show("连接服务器失败,检查网络连接。");
                 } else {

+ 50 - 0
app/src/main/java/com/sjkj/appthreefloor_tsgz/net/EventAddFeedBackRequest.java

@@ -0,0 +1,50 @@
+package com.sjkj.appthreefloor_tsgz.net;
+
+import android.content.Context;
+
+import com.sjkj.base_lib.entity.Params;
+import com.sjkj.base_lib.entity.ResponseBean;
+import com.sjkj.base_lib.net.RetrofitFactory;
+import com.sjkj.base_lib.net.data.exception.BusinessException;
+import com.sjkj.base_lib.net.domain.interactor.UseCase;
+import com.sjkj.base_lib.utils.AppTools;
+
+import rx.Observable;
+import rx.functions.Func1;
+
+/**
+ * 上报/新增事件 反馈
+ */
+public class EventAddFeedBackRequest extends UseCase {
+    private Context context;
+    private RetrofitService service;
+
+    private Params params;
+
+    public Params getParams() {
+        return params;
+    }
+
+    public void setParams(Params params) {
+        this.params = params;
+    }
+
+    public EventAddFeedBackRequest(Context context) {
+        this.context = context;
+        service = RetrofitFactory.getRetrofit(AppTools.getBaseUrl()).create(RetrofitService.class);
+    }
+
+    @Override
+    protected Observable buildUseCaseObservable() {
+        return service.addFeedBack(params).flatMap(new Func1<ResponseBean<Object>, Observable<Object>>() {
+            @Override
+            public Observable<Object> call(ResponseBean<Object> responseBean) {
+                if (!ResponseBean.CODE_SUCCESS.
+                        equals(responseBean.getCode())) {
+                    return Observable.error(new BusinessException(responseBean.getMsg()));
+                }
+                return Observable.just(responseBean.getData());
+            }
+        });
+    }
+}

+ 53 - 0
app/src/main/java/com/sjkj/appthreefloor_tsgz/net/EventMessageListRequest.java

@@ -0,0 +1,53 @@
+package com.sjkj.appthreefloor_tsgz.net;
+
+import android.content.Context;
+
+import com.sjkj.appthreefloor_tsgz.bean.EventMessageDetailsBean;
+import com.sjkj.base_lib.entity.Params;
+import com.sjkj.base_lib.entity.ResponseBean;
+import com.sjkj.base_lib.net.RetrofitFactory;
+import com.sjkj.base_lib.net.data.exception.BusinessException;
+import com.sjkj.base_lib.net.domain.interactor.UseCase;
+import com.sjkj.base_lib.utils.AppTools;
+
+import java.util.List;
+
+import rx.Observable;
+import rx.functions.Func1;
+
+/**
+ * 获取全部反馈列表
+ */
+public class EventMessageListRequest extends UseCase {
+    private Context context;
+    private RetrofitService service;
+
+    private Params params;
+
+    public Params getParams() {
+        return params;
+    }
+
+    public void setParams(Params params) {
+        this.params = params;
+    }
+
+    public EventMessageListRequest(Context context) {
+        this.context = context;
+        service = RetrofitFactory.getRetrofit(AppTools.getBaseUrl()).create(RetrofitService.class);
+    }
+
+    @Override
+    protected Observable buildUseCaseObservable() {
+        return service.GetEventMessageList(params).flatMap(new Func1<ResponseBean<List<EventMessageDetailsBean>>, Observable<List<EventMessageDetailsBean>>>() {
+            @Override
+            public Observable<List<EventMessageDetailsBean>> call(ResponseBean<List<EventMessageDetailsBean>> responseBean) {
+                if (!ResponseBean.CODE_SUCCESS.
+                        equals(responseBean.getCode())) {
+                    return Observable.error(new BusinessException(responseBean.getMsg()));
+                }
+                return Observable.just(responseBean.getData());
+            }
+        });
+    }
+}

+ 9 - 0
app/src/main/java/com/sjkj/appthreefloor_tsgz/net/RetrofitService.java

@@ -7,6 +7,7 @@ import com.sjkj.appthreefloor_tsgz.bean.CommonDateBean;
 import com.sjkj.appthreefloor_tsgz.bean.DailyBean;
 import com.sjkj.appthreefloor_tsgz.bean.EventCenterListBean;
 import com.sjkj.appthreefloor_tsgz.bean.EventDetailsBean;
+import com.sjkj.appthreefloor_tsgz.bean.EventMessageDetailsBean;
 import com.sjkj.appthreefloor_tsgz.bean.FileBean;
 import com.sjkj.appthreefloor_tsgz.bean.LogInRsaBean;
 import com.sjkj.appthreefloor_tsgz.bean.NoticeListBean;
@@ -101,4 +102,12 @@ public interface RetrofitService {
     //校验版本信息
     @POST("AppVersionController/getVersionInfo")
     Observable<ResponseBean<VersionBean>> checkVersion(@QueryMap Params params);
+
+    //获取全部反馈列表
+    @GET("event/processList")
+    Observable<ResponseBean<List<EventMessageDetailsBean>>> GetEventMessageList(@QueryMap Map<String, Object> params);
+
+    //事件反馈
+    @POST("event/eventFeedback")
+    Observable<ResponseBean<Object>> addFeedBack(@Body Params params);
 }

+ 45 - 0
app/src/main/java/com/sjkj/appthreefloor_tsgz/utils/ByImageLoaderUtils.java

@@ -0,0 +1,45 @@
+package com.sjkj.appthreefloor_tsgz.utils;
+
+import android.content.Context;
+import android.widget.ImageView;
+
+import androidx.annotation.NonNull;
+
+import com.bumptech.glide.Glide;
+import com.bumptech.glide.load.engine.DiskCacheStrategy;
+import com.bumptech.glide.request.RequestOptions;
+import com.sjkj.appthreefloor_tsgz.R;
+
+
+/**
+ * 图片显示
+ * Created by wupeitao on 15/7/26.
+ */
+public class ByImageLoaderUtils {
+
+
+    public static ByImageLoaderUtils pImageLoaderUtils;
+
+    public static ByImageLoaderUtils getInstance() {
+        if (pImageLoaderUtils == null) {
+            pImageLoaderUtils = new ByImageLoaderUtils();
+        }
+        return pImageLoaderUtils;
+    }
+
+
+    public void displayIMG(@NonNull Object uri, @NonNull ImageView imageView, @NonNull Context context) {
+        RequestOptions options = new RequestOptions();
+        options.placeholder(R.drawable.gray);
+        options.error(R.drawable.gray);
+        Glide.with(context).load(uri).diskCacheStrategy(DiskCacheStrategy.NONE).into(imageView);
+    }
+
+    public void displayIMGCenterCorp(@NonNull int uri, @NonNull ImageView imageView, @NonNull Context context) {
+        RequestOptions options = new RequestOptions();
+        options.placeholder(R.drawable.gray);
+        options.error(R.drawable.gray);
+        options.centerCrop();
+        Glide.with(context).load(uri).diskCacheStrategy(DiskCacheStrategy.NONE).apply(options).into(imageView);
+    }
+}

+ 215 - 0
app/src/main/java/com/sjkj/appthreefloor_tsgz/utils/DownLoadUtils.java

@@ -0,0 +1,215 @@
+package com.sjkj.appthreefloor_tsgz.utils;
+
+import static com.sjkj.base_lib.net.RetrofitFactory.getSslContextForCertificateFile;
+
+import android.app.Activity;
+import android.app.ProgressDialog;
+import android.content.Context;
+import android.os.Environment;
+import android.os.Message;
+import android.text.TextUtils;
+
+import androidx.annotation.NonNull;
+
+import com.sjkj.appthreefloor_tsgz.app.App;
+import com.sjkj.base_lib.utils.AppTools;
+import com.sjkj.base_lib.utils.ToastUtils;
+
+import java.io.BufferedInputStream;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.security.KeyStore;
+import java.util.Arrays;
+import java.util.concurrent.TimeUnit;
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.TrustManagerFactory;
+import javax.net.ssl.X509TrustManager;
+
+import okhttp3.Call;
+import okhttp3.Callback;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.Response;
+import okhttp3.ResponseBody;
+
+public class DownLoadUtils {
+    private Activity activity;
+    public static String apkPath = "";
+
+    public boolean isExistApk() {
+        if (TextUtils.isEmpty(apkPath)) {
+            return false;
+        }
+        return true;
+    }
+
+    public String getApkPath() {
+        return apkPath;
+    }
+
+    public DownLoadUtils(Activity activity) {
+        this.activity = activity;
+    }
+
+    public interface CallBack {
+        void onError(String msg);
+
+        void onSuccess(String paht);
+
+
+    }
+
+    private android.os.Handler handler = new android.os.Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            super.handleMessage(msg);
+            switch (msg.what) {
+                case 0:
+                    ToastUtils.show("安装包地址不存在");
+                    break;
+                case 1:
+                    ToastUtils.show(/*file.getPath()*/"下载成功");
+                    break;
+                case 2:
+                    ToastUtils.show("文件下载出错,请重试");
+                    break;
+                case 999:
+                    ToastUtils.show("暂无打开文件类型为" + OpenFileUtil.getName() + "的APP");
+                    break;
+
+            }
+        }
+    };
+
+    public void DownLoad(String name, String path,CallBack callBack) {
+        downLoadFile(name,path, activity, callBack);
+    }
+
+
+    private void downLoadFile(final String name, final String path, final Context context, final CallBack callBack) {
+        final ProgressDialog pd;
+        // 进度条对话框
+        pd = new ProgressDialog(context);
+        pd.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
+        pd.setMessage("正在下载文件");
+        pd.show();
+        pd.setCancelable(false);
+        pd.setCanceledOnTouchOutside(false);
+        new Thread() {
+            @Override
+            public void run() {
+
+
+                try {
+                   // DownLoadManager2.getFileFromServer(context,name,path,group, pd);
+                    if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
+                        //OkHttpClient okHttpClient = new OkHttpClient();
+                        OkHttpClient.Builder builder = new OkHttpClient.Builder();
+                        builder.readTimeout(120L, TimeUnit.SECONDS);
+                        builder.connectTimeout(120L, TimeUnit.SECONDS);
+                        builder.writeTimeout(120L, TimeUnit.SECONDS);
+                        // Request request = new Request.Builder().url("http://www.baidu.com").method("GET",null).addHeader("AppTools.ACCESS_TOKEN",AppTools.getToken()).build();
+
+                        try {
+                            SSLContext sslContext = getSslContextForCertificateFile("supermap.cer");
+                            TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
+                            trustManagerFactory.init((KeyStore) null);
+                            TrustManager[] trustManagers = trustManagerFactory.getTrustManagers();
+                            if (trustManagers.length != 1 || !(trustManagers[0] instanceof X509TrustManager)) {
+                                throw new IllegalStateException("Unexpected default trust managers:" + Arrays.toString(trustManagers));
+                            }
+                            X509TrustManager trustManager = (X509TrustManager) trustManagers[0];
+                            builder.sslSocketFactory(sslContext.getSocketFactory(), trustManager);
+                            builder.hostnameVerifier(((hostname, session) -> true));
+
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                        Request request = new Request.Builder()
+                                .addHeader(AppTools.ACCESS_TOKEN,AppTools.getToken())
+//                                .url(AppTools.getBaseUrl()+"AppFileController/appDownload?/*fileName="+name+"&path="+path+"&group="+group*/)
+                                .url(AppTools.getBaseUrl()+"AppFileController/appDownload?"+path)
+                                .build();
+
+                        OkHttpClient client = builder.build();
+                        client.newCall(request).enqueue(new Callback() {
+                            //请求失败执行的方法
+                            @Override
+                            public void onFailure(@NonNull Call call, IOException e) {
+                            }
+                            //请求成功执行的方法
+                            @Override
+                            public void onResponse(Call call, Response response) throws IOException {
+                                ResponseBody body = response.body();
+                                byte[] bytes = body.bytes();
+                                if (bytes.length > 0) {
+                                    ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+                                    pd.setMax(bytes.length);
+
+                                    File file = new File(Environment.getExternalStorageDirectory() + File.separator + "Android/data/" + App.getInstance().getPackageName() + "/filetmp");
+                                    if (!file.exists()) {
+                                        file.mkdirs();
+                                    }
+                                    File mF = new File(file.getPath(), name);
+                                    if (mF.exists()) {
+                                        mF.delete();
+                                    }
+                                    FileOutputStream fos = new FileOutputStream(mF);
+                                    BufferedInputStream bis = new BufferedInputStream(bais);
+                                    byte[] buffer = new byte[1024];
+                                    int len;
+                                    int total = 0;
+                                    while ((len = bis.read(buffer)) != -1) {
+                                        fos.write(buffer, 0, len);
+                                        total += len;
+                                        // 获取当前下载量
+                                        pd.setProgress(total);
+                                    }
+                                    fos.close();
+                                    bis.close();
+                                    bais.close();
+
+                                    //OpenFileUtil.openFile(context,mF.getPath());
+                                    //context.startActivity(OpenFileUtil.openFile(context, mF.getPath()));
+                                    pd.dismiss(); // 结束掉进度条对话框
+                                    boolean flag = OpenFileUtil.isIntentAvailable(context, OpenFileUtil.openFile(context, mF.getPath()));
+                                    if (flag) {
+                                        handler.sendEmptyMessage(1);
+                                        OpenFileUtil.openFile(context, mF.getPath());
+                                        if (callBack != null) {
+                                            callBack.onSuccess(mF.getPath());
+                                            return;
+                                        }
+                                    } else {
+                                        handler.sendEmptyMessage(999);
+                                    }
+
+                                } else {
+
+                                    pd.dismiss();
+                                    ToastUtils.show("下载文件为空");
+                                }
+                            }
+
+                        });
+                    }
+                } catch (Exception e) {
+                    if (callBack != null) {
+                        callBack.onError("文件下载失败");
+                        return;
+                    }
+                    handler.sendEmptyMessage(2);
+                    pd.dismiss(); // 结束掉进度条对话框
+                }
+
+
+            }
+        }.start();
+    }
+
+
+}

+ 26 - 0
app/src/main/java/com/sjkj/appthreefloor_tsgz/utils/ImageUtils.java

@@ -0,0 +1,26 @@
+package com.sjkj.appthreefloor_tsgz.utils;
+
+import android.text.TextUtils;
+
+import java.util.Locale;
+
+public class ImageUtils {
+    public static boolean isImage(String path){
+        if (TextUtils.isEmpty(path)){
+            return false;
+        }
+      /*  File file = new File(path);
+        if (!file.exists()) {
+            return false;
+        }*/
+        /* 取得扩展名 */
+        String end = path.substring(path.lastIndexOf(".") + 1, path.length()).toLowerCase(Locale.getDefault());
+        if (end.equals("jpg") || end.equals("gif") || end.equals("png") || end.equals("jpeg") || end.equals("bmp")||end.equals("webp")||end.equals("psd")||end.equals("svg")||end.equals("tiff")) {
+
+            return true;
+        }else {
+            return false;
+        }
+
+    }
+}

+ 284 - 0
app/src/main/java/com/sjkj/appthreefloor_tsgz/utils/OpenFileUtil.java

@@ -0,0 +1,284 @@
+package com.sjkj.appthreefloor_tsgz.utils;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.net.Uri;
+import android.os.Build;
+
+import androidx.core.content.FileProvider;
+
+import com.sjkj.base_lib.utils.AppTools;
+
+import java.io.File;
+import java.util.List;
+import java.util.Locale;
+
+public class OpenFileUtil {
+    public static String fileName;
+
+    /**
+     * 判断Intent 是否存在 防止崩溃
+     *
+     * @param context
+     * @param intent
+     * @return
+     */
+    public static boolean isIntentAvailable(Context context, Intent intent) {
+        final PackageManager packageManager = context.getPackageManager();
+        @SuppressLint("WrongConstant") List<ResolveInfo> list = packageManager.queryIntentActivities(intent,
+                PackageManager.GET_ACTIVITIES);
+        return list.size() > 0;
+    }
+
+    public static String getName() {
+        return fileName;
+
+    }
+
+    public static Intent openFile(Context context, String filePath) {
+
+        File file = new File(filePath);
+        if (!file.exists())
+            return null;
+        /* 取得扩展名 */
+        String end = file.getName().substring(file.getName().lastIndexOf(".") + 1, file.getName().length()).toLowerCase(Locale.getDefault());
+        /* 依扩展名的类型决定MimeType */
+        fileName = end;
+        if (end.equals("m4a") || end.equals("mp3") || end.equals("mid") || end.equals("xmf") || end.equals("ogg") || end.equals("wav")) {
+            return getAudioFileIntent(context, filePath);
+        } else if (end.equals("3gp") || end.equals("mp4")) {
+            return getVideoFileIntent(context, filePath);
+        } else if (end.equals("jpg") || end.equals("gif") || end.equals("png") || end.equals("jpeg") || end.equals("bmp")) {
+            return getImageFileIntent(context, filePath);
+        } else if (end.equals("apk")) {
+            return getApkFileIntent(context, filePath);
+        } else if (end.equals("ppt") || end.equals("pptx")) {
+            return getPptFileIntent(context, filePath);
+        } else if (end.equals("xls") || end.equals("xlsx")) {
+            return getExcelFileIntent(context, filePath);
+        } else if (end.equals("doc") || end.equals("docx")) {
+            return getWordFileIntent(context, filePath);
+        } else if (end.equals("pdf")) {
+            return getPdfFileIntent(context, filePath);
+        } else if (end.equals("chm")) {
+            return getChmFileIntent(context, filePath);
+        } else if (end.equals("txt")) {
+            return getTextFileIntent(context, filePath, false);
+        } else {
+            return getAllIntent(context, filePath);
+        }
+    }
+
+    // Android获取一个用于打开APK文件的intent
+    public static Intent getAllIntent(Context context, String param) {
+
+        Intent intent = new Intent();
+        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        intent.setAction(Intent.ACTION_VIEW);
+        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);//标签,授予目录临时共享权限
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {//Android7.0之后
+            Uri uri = FileProvider.getUriForFile(context, AppTools.getPackageNameProvider(), new File(param));
+            intent.setDataAndType(uri, "*/*");
+        } else {
+            Uri uri = Uri.fromFile(new File(param));
+            intent.setDataAndType(uri, "*/*");
+        }
+
+        return intent;
+    }
+
+    // Android获取一个用于打开APK文件的intent
+    public static Intent getApkFileIntent(Context context, String param) {
+
+        Intent intent = new Intent();
+        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        intent.setAction(Intent.ACTION_VIEW);
+        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);//标签,授予目录临时共享权限
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {//Android7.0之后
+            Uri uri = FileProvider.getUriForFile(context, AppTools.getPackageNameProvider(), new File(param));
+            intent.setDataAndType(uri, "application/vnd.android.package-archive");
+        } else {
+            Uri uri = Uri.fromFile(new File(param));
+            intent.setDataAndType(uri, "application/vnd.android.package-archive");
+        }
+        return intent;
+    }
+
+    // Android获取一个用于打开VIDEO文件的intent
+    public static Intent getVideoFileIntent(Context context, String param) {
+
+        Intent intent = new Intent("android.intent.action.VIEW");
+        intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);//标签,授予目录临时共享权限
+        intent.putExtra("oneshot", 0);
+        intent.putExtra("configchange", 0);
+        //  Uri uri = Uri.fromFile(new File(param));
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {//Android7.0之后
+            Uri uri = FileProvider.getUriForFile(context, AppTools.getPackageNameProvider(), new File(param));
+            intent.setDataAndType(uri, "video/*");
+        } else {
+            Uri uri = Uri.fromFile(new File(param));
+            intent.setDataAndType(uri, "video/*");
+        }
+        return intent;
+    }
+
+    // Android获取一个用于打开AUDIO文件的intent
+    public static Intent getAudioFileIntent(Context context, String param) {
+
+        Intent intent = new Intent("android.intent.action.VIEW");
+        intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);//标签,授予目录临时共享权限
+        intent.putExtra("oneshot", 0);
+        intent.putExtra("configchange", 0);
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {//Android7.0之后
+            Uri uri = FileProvider.getUriForFile(context, AppTools.getPackageNameProvider(), new File(param));
+            intent.setDataAndType(uri, "audio/*");
+        } else {
+            Uri uri = Uri.fromFile(new File(param));
+            intent.setDataAndType(uri, "audio/*");
+        }
+
+
+        return intent;
+    }
+
+    // Android获取一个用于打开Html文件的intent
+    public static Intent getHtmlFileIntent(Context context, String param) {
+
+        Uri uri = Uri.parse(param).buildUpon().encodedAuthority("com.android.htmlfileprovider").scheme("content").encodedPath(param).build();
+        Intent intent = new Intent("android.intent.action.VIEW");
+        intent.setDataAndType(uri, "text/html");
+        return intent;
+    }
+
+    // Android获取一个用于打开图片文件的intent
+    public static Intent getImageFileIntent(Context context, String param) {
+
+        Intent intent = new Intent("android.intent.action.VIEW");
+        intent.addCategory("android.intent.category.DEFAULT");
+        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);//标签,授予目录临时共享权限
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {//Android7.0之后
+            Uri uri = FileProvider.getUriForFile(context, AppTools.getPackageNameProvider(), new File(param));
+            intent.setDataAndType(uri, "image/*");
+        } else {
+            Uri uri = Uri.fromFile(new File(param));
+            intent.setDataAndType(uri, "image/*");
+        }
+        return intent;
+    }
+
+    // Android获取一个用于打开PPT文件的intent
+    public static Intent getPptFileIntent(Context context, String param) {
+
+        Intent intent = new Intent("android.intent.action.VIEW");
+        intent.addCategory("android.intent.category.DEFAULT");
+        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);//标签,授予目录临时共享权限
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {//Android7.0之后
+            Uri uri = FileProvider.getUriForFile(context, AppTools.getPackageNameProvider(), new File(param));
+            intent.setDataAndType(uri, "application/vnd.ms-powerpoint");
+        } else {
+            Uri uri = Uri.fromFile(new File(param));
+            intent.setDataAndType(uri, "application/vnd.ms-powerpoint");
+        }
+        return intent;
+    }
+
+    // Android获取一个用于打开Excel文件的intent
+    public static Intent getExcelFileIntent(Context context, String param) {
+
+        Intent intent = new Intent("android.intent.action.VIEW");
+        intent.addCategory("android.intent.category.DEFAULT");
+        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);//标签,授予目录临时共享权限
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {//Android7.0之后
+            Uri uri = FileProvider.getUriForFile(context, AppTools.getPackageNameProvider(), new File(param));
+            intent.setDataAndType(uri, "application/vnd.ms-excel");
+        } else {
+            Uri uri = Uri.fromFile(new File(param));
+            intent.setDataAndType(uri, "application/vnd.ms-excel");
+        }
+        return intent;
+    }
+
+    // Android获取一个用于打开Word文件的intent
+    public static Intent getWordFileIntent(Context context, String param) {
+
+        Intent intent = new Intent("android.intent.action.VIEW");
+        intent.addCategory("android.intent.category.DEFAULT");
+        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);//标签,授予目录临时共享权限
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {//Android7.0之后
+            Uri uri = FileProvider.getUriForFile(context, AppTools.getPackageNameProvider(), new File(param));
+            intent.setDataAndType(uri, "application/msword");
+        } else {
+            Uri uri = Uri.fromFile(new File(param));
+            intent.setDataAndType(uri, "application/msword");
+        }
+
+        return intent;
+    }
+
+    // Android获取一个用于打开CHM文件的intent
+    public static Intent getChmFileIntent(Context context, String param) {
+
+        Intent intent = new Intent("android.intent.action.VIEW");
+        intent.addCategory("android.intent.category.DEFAULT");
+        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);//标签,授予目录临时共享权限
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {//Android7.0之后
+            Uri uri = FileProvider.getUriForFile(context, AppTools.getPackageNameProvider(), new File(param));
+            intent.setDataAndType(uri, "application/x-chm");
+        } else {
+            Uri uri = Uri.fromFile(new File(param));
+            intent.setDataAndType(uri, "application/x-chm");
+        }
+        return intent;
+    }
+
+    // Android获取一个用于打开文本文件的intent
+    public static Intent getTextFileIntent(Context context, String param, boolean paramBoolean) {
+
+        Intent intent = new Intent("android.intent.action.VIEW");
+        intent.addCategory("android.intent.category.DEFAULT");
+        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);//标签,授予目录临时共享权限
+        if (paramBoolean) {
+            Uri uri1 = Uri.parse(param);
+            intent.setDataAndType(uri1, "text/plain");
+        } else {
+
+            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {//Android7.0之后
+                Uri uri = FileProvider.getUriForFile(context, AppTools.getPackageNameProvider(), new File(param));
+                intent.setDataAndType(uri, "text/plain");
+            } else {
+                Uri uri2 = Uri.fromFile(new File(param));
+                intent.setDataAndType(uri2, "text/plain");
+            }
+        }
+        return intent;
+    }
+
+    // Android获取一个用于打开PDF文件的intent
+    public static Intent getPdfFileIntent(Context context, String param) {
+
+        Intent intent = new Intent("android.intent.action.VIEW");
+        intent.addCategory("android.intent.category.DEFAULT");
+        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);//标签,授予目录临时共享权限
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {//Android7.0之后
+            Uri uri = FileProvider.getUriForFile(context, AppTools.getPackageNameProvider(), new File(param));
+            intent.setDataAndType(uri, "application/pdf");
+        } else {
+            Uri uri = Uri.fromFile(new File(param));
+            intent.setDataAndType(uri, "application/pdf");
+        }
+        return intent;
+    }
+
+}

+ 20 - 0
app/src/main/java/com/sjkj/appthreefloor_tsgz/utils/VideoUtils.java

@@ -0,0 +1,20 @@
+package com.sjkj.appthreefloor_tsgz.utils;
+
+import android.text.TextUtils;
+
+public class VideoUtils {
+
+    public static boolean isVideoFile(String filePath) {
+        if (TextUtils.isEmpty(filePath)){
+            return false;
+        }
+        String[] videoExtensions = {".mp4", ".avi", ".mov", ".mkv",".3gp",".wmv"};
+        String fileExtension = filePath.substring(filePath.lastIndexOf("."));
+        for (String extension : videoExtensions) {
+            if (fileExtension.equalsIgnoreCase(extension)) {
+                return true;
+            }
+        }
+        return false;
+    }
+}

+ 7 - 0
app/src/main/java/com/sjkj/appthreefloor_tsgz/weight/photoview/PhotoViewActivity.java

@@ -1,10 +1,13 @@
 package com.sjkj.appthreefloor_tsgz.weight.photoview;
 
+import android.graphics.drawable.Drawable;
 import android.view.View;
 
+import androidx.core.content.ContextCompat;
 import androidx.lifecycle.ViewModelProvider;
 import androidx.viewpager.widget.ViewPager;
 
+import com.gyf.immersionbar.ImmersionBar;
 import com.sjkj.appthreefloor_tsgz.R;
 import com.sjkj.appthreefloor_tsgz.databinding.ActivityPhotoViewBinding;
 import com.sjkj.base_lib.view.BaseActivity;
@@ -41,6 +44,10 @@ public class PhotoViewActivity extends BaseActivity {
     @Override
     public void initView() {
         super.initView();
+        ImmersionBar.with(PhotoViewActivity.this)
+                .statusBarDarkFont(true, 0.2f)
+                .statusBarColor(R.color.white)
+                .init();
         imageUrls = (ArrayList<String>) getIntent().getStringArrayListExtra("positionDataList");
         if (imageUrls != null) {
             currentPosition = getIntent().getIntExtra("position", 0);

TEMPAT SAMPAH
app/src/main/res/drawable-xxhdpi/icon_excel.png


TEMPAT SAMPAH
app/src/main/res/drawable-xxhdpi/icon_jpg.png


TEMPAT SAMPAH
app/src/main/res/drawable-xxhdpi/icon_mp3.png


TEMPAT SAMPAH
app/src/main/res/drawable-xxhdpi/icon_mp4.png


TEMPAT SAMPAH
app/src/main/res/drawable-xxhdpi/icon_pdf.png


TEMPAT SAMPAH
app/src/main/res/drawable-xxhdpi/icon_ppt.png


TEMPAT SAMPAH
app/src/main/res/drawable-xxhdpi/icon_scan.png


TEMPAT SAMPAH
app/src/main/res/drawable-xxhdpi/icon_send.png


TEMPAT SAMPAH
app/src/main/res/drawable-xxhdpi/icon_txt.png


TEMPAT SAMPAH
app/src/main/res/drawable-xxhdpi/icon_word.png


TEMPAT SAMPAH
app/src/main/res/drawable-xxhdpi/icon_yuan.png


+ 11 - 0
app/src/main/res/drawable/bg_yuan_shape.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="oval"
+    android:useLevel="false">
+
+    <solid android:color="@color/main_blue_color" />
+    <stroke
+        android:width="1dp"
+        android:color="@color/main_blue_color" />
+
+</shape>

+ 9 - 0
app/src/main/res/drawable/rounded_30.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="#F5F5F5"/> <!-- 背景颜色 -->
+    <corners
+        android:topLeftRadius="30dp"
+        android:topRightRadius="30dp"
+        android:bottomLeftRadius="30dp"
+        android:bottomRightRadius="30dp"/>
+</shape>

+ 6 - 0
app/src/main/res/drawable/shape_common_corners_10dp.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <corners
+        android:radius="10dp"/>
+    <solid android:color="#ffffff"/>
+</shape>

+ 8 - 5
app/src/main/res/layout/activity_photo_view.xml

@@ -10,12 +10,13 @@
     </data>
 
     <LinearLayout
+        android:background="@color/white"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:background="@color/black"
         android:orientation="vertical">
 
         <RelativeLayout
+            android:layout_marginTop="15dp"
             android:layout_width="match_parent"
             android:layout_height="45dp" >
 
@@ -24,22 +25,24 @@
                 android:layout_width="wrap_content"
                 android:layout_height="match_parent"
                 android:layout_centerVertical="true"
-                android:paddingLeft="10dp"
-                android:paddingRight="10dp"
+                android:paddingLeft="15dp"
+                android:paddingRight="15dp"
                 android:scaleType="center"
-                android:src="@drawable/ic_back" />
+                android:src="@drawable/icon_back" />
 
             <TextView
                 android:layout_width="wrap_content"
                 android:layout_height="match_parent"
                 android:gravity="center"
+                android:layout_centerVertical="true"
                 android:layout_centerInParent="true"
                 android:text="@{viewModel.title}"
-                android:textColor="@color/color_white" />
+                android:textColor="@color/black" />
         </RelativeLayout>
 
 
         <com.sjkj.appthreefloor_tsgz.weight.photoview.PhotoViewPager
+            android:background="@color/white"
             android:id="@+id/view_pager"
             android:layout_width="match_parent"
             android:layout_height="match_parent" />

+ 46 - 9
app/src/main/res/layout/fragment_event_message.xml

@@ -1,6 +1,5 @@
 <?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">
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
 
     <data>
 
@@ -9,23 +8,61 @@
             type="com.sjkj.appthreefloor_tsgz.fragment.viewModel.EventFargmentViewModel" />
     </data>
 
-    <LinearLayout
+    <RelativeLayout
         android:id="@+id/ll_title"
         android:fadeScrollbars="true"
         android:fitsSystemWindows="true"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
+
         android:orientation="vertical">
 
 
-        <TextView
-            android:text="消息"
-            android:gravity="center_horizontal|center_vertical"
+        <RelativeLayout
+            android:layout_height="wrap_content"
             android:layout_width="match_parent"
-            android:layout_height="match_parent">
+            android:layout_above="@+id/rl_bootm"
+            android:background="#ECEDF4">
+
+            <androidx.recyclerview.widget.RecyclerView
+                android:layout_marginTop="15dp"
+                android:layout_marginBottom="15dp"
+                android:id="@+id/fk_recyclerView"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:overScrollMode="never"
+                android:padding="3dp" />
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:id="@+id/rl_bootm"
+            android:layout_width="match_parent"
+            android:layout_height="60dp"
+            android:layout_alignParentBottom="true"
+            android:background="@color/white">
+
+            <EditText
+                android:id="@+id/et_content"
+                android:layout_width="match_parent"
+                android:layout_height="40dp"
+                android:layout_centerVertical="true"
+                android:layout_marginLeft="15dp"
+                android:layout_toLeftOf="@+id/ic_send"
+                android:background="@drawable/rounded_30"
+                android:hint="请输入内容"
+                android:paddingLeft="20dp" />
 
-        </TextView>
-    </LinearLayout>
+            <ImageView
+                android:id="@+id/ic_send"
+                android:layout_width="35dp"
+                android:layout_height="35dp"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:layout_marginLeft="15dp"
+                android:layout_marginRight="15dp"
+                android:background="@drawable/icon_send"></ImageView>
+        </RelativeLayout>
+    </RelativeLayout>
 
 
 </layout>

+ 35 - 0
app/src/main/res/layout/item_event_image_list_show.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <data>
+
+        <variable
+            name="model"
+            type="com.sjkj.appthreefloor_tsgz.bean.ImageBean" />
+    </data>
+
+    <RelativeLayout
+        android:id="@+id/rl_image"
+        android:layout_width="65dp"
+        android:layout_height="65dp" >
+
+        <ImageView
+            android:id="@+id/iv_icon"
+            android:layout_width="50dp"
+            android:layout_height="50dp"
+            android:layout_centerInParent="true"
+            android:error="@{@drawable/icon_default_image}"
+            android:imgUrl="@{model.realUrl}"
+            android:scaleType="centerCrop"
+            />
+
+        <ImageView
+            android:visibility="gone"
+            android:id="@+id/delete_iv"
+            android:layout_width="16dp"
+            android:layout_height="16dp"
+            android:layout_alignParentRight="true"
+            android:src="@drawable/icon_image_delete"/>
+
+    </RelativeLayout>
+</layout>

+ 61 - 0
app/src/main/res/layout/item_file_list.xml

@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <data>
+
+        <variable
+            name="model"
+            type="com.sjkj.appthreefloor_tsgz.bean.FileCenterBean.FileCenter" />
+    </data>
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="56dp"
+        android:background="@color/color_white"
+        android:paddingLeft="10dp"
+        android:id="@+id/workitem"
+        android:paddingRight="20dp">
+
+        <ImageView
+            android:id="@+id/filetype"
+            android:layout_width="24dp"
+            android:layout_height="24dp"
+            android:layout_centerVertical="true" />
+
+        <TextView
+            android:text="@{model.name}"
+            android:id="@+id/filename"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerVertical="true"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="10dp"
+            android:layout_toLeftOf="@+id/arrow"
+            android:layout_toRightOf="@+id/filetype"
+            android:ellipsize="end"
+            android:lines="1"
+            android:textColor="@color/color_black"
+            android:textSize="16dp" />
+
+
+        <ImageView
+            android:background="@drawable/icon_arrow_right"
+            android:id="@+id/arrow"
+            android:layout_width="wrap_content"
+            android:layout_centerVertical="true"
+            android:layout_alignParentRight="true"
+            android:layout_height="wrap_content">
+
+        </ImageView>
+
+        <View
+            android:visibility="gone"
+            android:id="@+id/lineView"
+            android:layout_width="match_parent"
+            android:layout_height="1dp"
+            android:layout_alignParentBottom="true"
+            android:background="@color/divider_color">
+
+        </View>
+    </RelativeLayout>
+</layout>

+ 130 - 0
app/src/main/res/layout/item_message_details.xml

@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <data>
+
+        <variable
+            name="model"
+            type="com.sjkj.appthreefloor_tsgz.bean.EventMessageDetailsBean" />
+
+        <import type="android.view.View" />
+
+        <import type="android.text.TextUtils" />
+    </data>
+
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="15dp"
+        android:layout_marginRight="15dp"
+        android:orientation="horizontal">
+
+
+        <RelativeLayout
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:orientation="vertical">
+
+            <View
+                android:id="@+id/viewy"
+                android:layout_width="15dp"
+                android:layout_height="15dp"
+                android:layout_alignParentTop="true"
+                android:background="@drawable/icon_yuan" />
+
+            <TextView
+                android:id="@+id/view"
+                android:layout_width="1dp"
+                android:layout_height="match_parent"
+                android:layout_below="@+id/viewy"
+                android:layout_centerHorizontal="true"
+                android:layout_marginLeft="5dp"
+                android:background="#3D71FF">
+
+            </TextView>
+
+            <View
+                android:id="@+id/viewyuan"
+                android:layout_width="15dp"
+                android:layout_height="15dp"
+                android:layout_alignParentBottom="true"
+                android:background="@drawable/icon_yuan"
+                android:visibility="gone" />
+        </RelativeLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="15dp"
+            android:orientation="vertical">
+
+            <TextView
+                android:id="@+id/tv_time"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@{model.createTime}"
+                android:textColor="#1A1A1A">
+
+            </TextView>
+
+            <LinearLayout
+                android:layout_marginBottom="15dp"
+                android:layout_marginTop="10dp"
+                android:orientation="vertical"
+                android:layout_width="match_parent"
+                android:background="@drawable/shape_common_corners_10dp"
+                android:layout_height="wrap_content">
+
+
+            <TextView
+                android:layout_marginLeft="15dp"
+                android:layout_marginRight="15dp"
+
+                android:id="@+id/tv_name"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="10dp"
+                android:text="@{model.createName}"
+                android:textColor="#1A1A1A">
+
+            </TextView>
+
+            <TextView
+                android:id="@+id/tv_content"
+                android:layout_marginRight="15dp"
+                android:layout_marginLeft="15dp"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="10dp"
+                android:layout_marginBottom="10dp"
+                android:text="@{model.remark}"
+                android:textColor="#1A1A1A">
+
+            </TextView>
+
+            <androidx.recyclerview.widget.RecyclerView
+                android:id="@+id/recyclerView_image"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="5dp"
+                android:overScrollMode="never" />
+
+            <androidx.recyclerview.widget.RecyclerView
+                android:id="@+id/recyclerView_file"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="5dp"
+                android:overScrollMode="never" />
+
+            <androidx.recyclerview.widget.RecyclerView
+                android:id="@+id/recyclerView_video"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="5dp"
+                android:overScrollMode="never" />
+        </LinearLayout>
+        </LinearLayout>
+    </LinearLayout>
+
+</layout>

+ 41 - 0
app/src/main/res/layout/item_video_list.xml

@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <data>
+
+        <variable
+            name="model"
+            type="com.sjkj.appthreefloor_tsgz.bean.ImageBean" />
+    </data>
+
+    <LinearLayout
+        android:id="@+id/ll_video"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+
+        android:gravity="center"
+        android:orientation="horizontal">
+
+        <FrameLayout
+
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="5dp"
+            android:layout_marginRight="5dp"
+            android:background="@color/black">
+
+
+            <ImageView
+                android:id="@+id/iv_video"
+                android:layout_width="55dp"
+                android:layout_height="55dp"></ImageView>
+
+            <ImageView
+                android:id="@+id/iv_icon"
+                android:layout_width="20dp"
+                android:layout_height="20dp"
+                android:layout_gravity="center_vertical|center_horizontal"
+                android:background="@drawable/icon_scan" />
+        </FrameLayout>
+    </LinearLayout>
+</layout>

+ 1 - 0
app/src/main/res/values/colors.xml

@@ -72,4 +72,5 @@
     <color name="recyclerview_lefttext_select">#4D4D4D</color>
     <color name="gp_indicator_color">#969696</color>
     <color name="gp_skip_background">#3F000000</color>
+    <drawable name="gray">#D8D8D8</drawable>
 </resources>

+ 5 - 1
base-lib/src/main/java/com/sjkj/base_lib/utils/AppTools.java

@@ -479,9 +479,13 @@ public class AppTools {
 
     public static String getBaseUrl() {
       // return mmkv.decodeString("baseUrl", "http://192.168.4.82:8080/api/");
-        return mmkv.decodeString("baseUrl", "http://192.168.4.16:8080/api/");
+        return mmkv.decodeString("baseUrl", "http://192.168.4.26/api/");
     }
 
+    public static String getImageBaseUrl() {
+        // return mmkv.decodeString("baseUrl", "http://192.168.4.82:8080/api/");
+        return mmkv.decodeString("ImagebaseUrl", "http://192.168.4.26");
+    }
 //    public static final String GATEWAY_URL = "sooka-mobile";
 //    public static final String GATEWAY_URL_SYSTEM = "system";