|
@@ -1,5 +1,14 @@
|
|
|
package com.qmth.teachcloud.mark.service.impl;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+import java.util.Set;
|
|
|
+
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
+
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
@@ -8,15 +17,8 @@ import com.qmth.teachcloud.mark.bean.scananswer.SheetUploadVo;
|
|
|
import com.qmth.teachcloud.mark.entity.ScanPackage;
|
|
|
import com.qmth.teachcloud.mark.mapper.ScanPackageMapper;
|
|
|
import com.qmth.teachcloud.mark.service.FileService;
|
|
|
+import com.qmth.teachcloud.mark.service.ScanFilePropertyService;
|
|
|
import com.qmth.teachcloud.mark.service.ScanPackageService;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
-
|
|
|
-import java.util.List;
|
|
|
-import java.util.Set;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -30,7 +32,9 @@ import java.util.Set;
|
|
|
public class ScanPackageServiceImpl extends ServiceImpl<ScanPackageMapper, ScanPackage> implements ScanPackageService {
|
|
|
@Autowired
|
|
|
private FileService fileService;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private ScanFilePropertyService scanFilePropertyService;
|
|
|
+
|
|
|
@Override
|
|
|
public int getCount(Long examId) {
|
|
|
QueryWrapper<ScanPackage> wrapper = new QueryWrapper<>();
|
|
@@ -76,6 +80,7 @@ public class ScanPackageServiceImpl extends ServiceImpl<ScanPackageMapper, ScanP
|
|
|
}
|
|
|
sp.setMd5(md5);
|
|
|
sp.setPath(path);
|
|
|
+ scanFilePropertyService.save(examId, path, md5, file.getSize());
|
|
|
this.saveOrUpdate(sp);
|
|
|
} catch (Exception e) {
|
|
|
log.error("原图上传失败,examId=" + examId + ", coursePaperId=" + coursePaperId + ",packageCode=" + packageCode
|