From 8c7d9c025fd135ffe1b709d5419a31e7899dcaeb Mon Sep 17 00:00:00 2001
From: cjl <276999030@qq.com>
Date: Wed, 27 Sep 2023 17:50:53 +0800
Subject: [PATCH] feat:修改

---
 screen-api/src/main/java/com/moral/api/utils/FileTypeUtils.java                |    4 +++-
 screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java |    8 ++++++--
 screen-api/src/main/java/com/moral/api/pojo/enums/FileType.java                |    5 +++++
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/screen-api/src/main/java/com/moral/api/pojo/enums/FileType.java b/screen-api/src/main/java/com/moral/api/pojo/enums/FileType.java
index c90a951..54f7615 100644
--- a/screen-api/src/main/java/com/moral/api/pojo/enums/FileType.java
+++ b/screen-api/src/main/java/com/moral/api/pojo/enums/FileType.java
@@ -41,6 +41,11 @@
      * ���������
      */
     ZIP(5),
+
+    /**
+     * ���������
+     */
+    MP4(6),
     ;
 
     @EnumValue
diff --git a/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java b/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java
index 2a0cad4..66a37f5 100644
--- a/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java
+++ b/screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java
@@ -218,6 +218,9 @@
             approveTable.setStateName(AllocationApproveEnum.NEW_BUILT.name);
             approveTableService.saveResult(approveTable);
         }
+        if(AllocationApproveEnum.NEW_BUILT.value.equals(allocationUpdateCond.getState())) {
+            allocation.setState(AllocationApproveEnum.UNDER_RECTIFICATION.value);
+        }
         fileTableService.upDateResult(allocationUpdateCond.getFileBaseList(),allocation.getAllocationId(), FileTableEnum.ALLOCATION_FOUNDATION.value);
         allocationMapper.updateById(allocation);
     }
@@ -498,7 +501,7 @@
         approveTable.setStateName(AllocationApproveEnum.UNDER_RECTIFICATION.name);
         approveTable.setApproveModule(FileTableEnum.ALLOCATION_FOUNDATION.value);
         approveTableService.saveResult(approveTable);
-        fileTableService.upDateResult(changeCond.getFileChangeList(),allocation.getAllocationId(), FileTableEnum.ALLOCATION_FOUNDATION.value);
+        fileTableService.upDateResult(changeCond.getFileChangeList(),allocation.getAllocationId(), FileTableEnum.ALLOCATION_RECTIFICATION.value);
     }
 
     @Override
@@ -511,6 +514,7 @@
         QxUser qxUser = UserHelper.getCurrentUser();
         Allocation allocation = new Allocation();
         allocation.setCheckScore(checkCond.getCheckScore());
+        allocation.setAllocationId(checkCond.getAllocationId());
         allocation.setCheckDescribe(checkCond.getCheckDescribe());
         allocation.setCheckName(qxUser.getUserName());
         allocation.setCheckTime(new Date());
@@ -528,7 +532,7 @@
         }
         approveTable.setApproveModule(FileTableEnum.ALLOCATION_FOUNDATION.value);
         approveTableService.saveResult(approveTable);
-        fileTableService.upDateResult(checkCond.getFileApproveList(),checkCond.getAllocationId(), FileTableEnum.ALLOCATION_FOUNDATION.value);
+        fileTableService.upDateResult(checkCond.getFileApproveList(),checkCond.getAllocationId(), FileTableEnum.ALLOCATION_APPROVE.value);
     }
 
     @Override
diff --git a/screen-api/src/main/java/com/moral/api/utils/FileTypeUtils.java b/screen-api/src/main/java/com/moral/api/utils/FileTypeUtils.java
index 7096afb..595736b 100644
--- a/screen-api/src/main/java/com/moral/api/utils/FileTypeUtils.java
+++ b/screen-api/src/main/java/com/moral/api/utils/FileTypeUtils.java
@@ -61,7 +61,7 @@
      * @author fanhq
      * @date 2020/4/20 15:35
      * @param suffix
-     * @return java.lang.Integer   1. ������  * 2. word  * 3. excel * 4. pdf  * 5. ���������
+     * @return java.lang.Integer   1. ������  * 2. word  * 3. excel * 4. pdf  * 5. ���������, 6������
      */
     public static FileType getFileType(String suffix) {
         switch (suffix) {
@@ -83,6 +83,8 @@
             case SUFFIX_RAR:
             case SUFFIX_JAR:
                 return FileType.ZIP;
+            case SUFFIX_MP4:
+                return FileType.MP4;
             default:
                 return FileType.NON;
         }

--
Gitblit v1.8.0