月球大数据地理空间分析展示平台-【后端】-月球后台服务
1
13693261870
2024-11-17 796b44ea813a1133beae4f3a67f1c0263510c0c7
src/main/java/com/moon/server/service/data/DataQueryService.java
@@ -16,11 +16,8 @@
import java.util.ArrayList;
import java.util.List;
/**
 * 数据检索服务
 * @author WWW
 */
@Service
@SuppressWarnings("ALL")
public class DataQueryService {
    @Autowired
    PathHelper pathHelper;
@@ -28,9 +25,6 @@
    @Autowired
    AttachService attachService;
    /**
     * 上传文件
     */
    public Integer uploadFiles(UserEntity ue, String tabName, String eventid, MultipartFile[] files, HttpServletRequest req) throws IOException {
        List<AttachEntity> list = new ArrayList<AttachEntity>();
        for (MultipartFile file : files) {
@@ -38,14 +32,12 @@
                continue;
            }
            // 传输文件
            String fileName = file.getOriginalFilename();
            String filePath = pathHelper.getTempPath() + File.separator + fileName;
            File newFile = new File(filePath);
            file.transferTo(newFile);
            double sizes = FileHelper.sizeToMb(file.getSize());
            // 获取MD5
            String md5 = FileHelper.getFileMd5(filePath);
            AttachEntity entity = attachService.selectByGuid(md5);
@@ -71,9 +63,6 @@
        return attachService.inserts(list);
    }
    /**
     * 获取附件实体类
     */
    protected AttachEntity getAttachEntity(UserEntity ue, String tabName, String eventid, String fileName, String md5, double sizes) {
        AttachEntity entity = new AttachEntity();
        entity.setTab(tabName);