cjl
2023-09-27 8c7d9c025fd135ffe1b709d5419a31e7899dcaeb
feat:修改
3 files modified
17 ■■■■ changed files
screen-api/src/main/java/com/moral/api/pojo/enums/FileType.java 5 ●●●●● patch | view | raw | blame | history
screen-api/src/main/java/com/moral/api/service/impl/AllocationServiceImpl.java 8 ●●●● patch | view | raw | blame | history
screen-api/src/main/java/com/moral/api/utils/FileTypeUtils.java 4 ●●● patch | view | raw | blame | history
screen-api/src/main/java/com/moral/api/pojo/enums/FileType.java
@@ -41,6 +41,11 @@
     * 压缩包
     */
    ZIP(5),
    /**
     * 压缩包
     */
    MP4(6),
    ;
    @EnumValue
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
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;
        }