From 09a903bf670ae635c5ecab36cbdc07d96fd245ed Mon Sep 17 00:00:00 2001 From: wangh <123456> Date: Thu, 9 Nov 2023 11:22:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/common/CommonController.java | 1 + .../src/main/resources/static/board/board.css | 20 ++++++------ .../common/utils/file/FileUploadUtils.java | 2 +- .../haiwei/manage/mapper/BsaeFileMapper.java | 2 ++ .../service/impl/BsaeFileServiceImpl.java | 32 ++++++++++++++++++- .../templates/manage/record_report/add.html | 3 +- .../templates/manage/record_report/edit.html | 3 +- 7 files changed, 49 insertions(+), 14 deletions(-) diff --git a/haiwei-admin/src/main/java/com/haiwei/web/controller/common/CommonController.java b/haiwei-admin/src/main/java/com/haiwei/web/controller/common/CommonController.java index 764375c..4fed237 100644 --- a/haiwei-admin/src/main/java/com/haiwei/web/controller/common/CommonController.java +++ b/haiwei-admin/src/main/java/com/haiwei/web/controller/common/CommonController.java @@ -79,6 +79,7 @@ public class CommonController { // 上传文件路径 String filePath = Global.getUploadPath(); + System.out.println("上传文件大小"+file.getSize()); // 上传并返回新文件名称 String fileName = FileUploadUtils.upload(filePath, file); String url = serverConfig.getUrl() + fileName; diff --git a/haiwei-admin/src/main/resources/static/board/board.css b/haiwei-admin/src/main/resources/static/board/board.css index 5f01a17..edc93b7 100644 --- a/haiwei-admin/src/main/resources/static/board/board.css +++ b/haiwei-admin/src/main/resources/static/board/board.css @@ -88,14 +88,14 @@ body { .winDiv .bg1 { position: absolute; font-size: 0.8vw; - left: 10%; + left: 7%; top: calc(15% + 1.5vw); color: #4888bf; - width: 80%; - height: 25%; + width: 87%; + height: 45%; border-radius: 3px; border: 2px solid #3f65a1; - padding: 5%; + padding: 1%; overflow: auto; } @@ -103,21 +103,21 @@ body { position: absolute; font-size: 1vw; left: 10%; - top: 45%; + top: 67%; color: #fff; } .winDiv .bg2 { position: absolute; font-size: 0.8vw; - left: 10%; - top: calc(45% + 1.5vw); + left: 7%; + top: calc(67% + 1.5vw); color: #4888bf; - width: 80%; - height: 28%; + width: 87%; + height: 26%; border-radius: 3px; border: 2px solid #3f65a1; - padding: 5%; + padding: 1%; overflow: auto; } diff --git a/haiwei-common/src/main/java/com/haiwei/common/utils/file/FileUploadUtils.java b/haiwei-common/src/main/java/com/haiwei/common/utils/file/FileUploadUtils.java index cd5a9b2..987a39f 100644 --- a/haiwei-common/src/main/java/com/haiwei/common/utils/file/FileUploadUtils.java +++ b/haiwei-common/src/main/java/com/haiwei/common/utils/file/FileUploadUtils.java @@ -23,7 +23,7 @@ public class FileUploadUtils /** * 默认大小 50M */ - public static final long DEFAULT_MAX_SIZE = 50 * 1024 * 1024; + public static final long DEFAULT_MAX_SIZE = 1000 * 1024 * 1024; /** * 默认的文件名最大长度 100 diff --git a/haiwei-manage/src/main/java/com/haiwei/manage/mapper/BsaeFileMapper.java b/haiwei-manage/src/main/java/com/haiwei/manage/mapper/BsaeFileMapper.java index a43ec50..26b1d39 100644 --- a/haiwei-manage/src/main/java/com/haiwei/manage/mapper/BsaeFileMapper.java +++ b/haiwei-manage/src/main/java/com/haiwei/manage/mapper/BsaeFileMapper.java @@ -2,6 +2,7 @@ package com.haiwei.manage.mapper; import java.util.List; import com.haiwei.manage.domain.BsaeFile; +import org.springframework.stereotype.Repository; /** * 文档归档Mapper接口 @@ -9,6 +10,7 @@ import com.haiwei.manage.domain.BsaeFile; * @author wangh * @date 2023-09-28 */ +@Repository public interface BsaeFileMapper { /** diff --git a/haiwei-manage/src/main/java/com/haiwei/manage/service/impl/BsaeFileServiceImpl.java b/haiwei-manage/src/main/java/com/haiwei/manage/service/impl/BsaeFileServiceImpl.java index 4ac25df..ba5677a 100644 --- a/haiwei-manage/src/main/java/com/haiwei/manage/service/impl/BsaeFileServiceImpl.java +++ b/haiwei-manage/src/main/java/com/haiwei/manage/service/impl/BsaeFileServiceImpl.java @@ -1,7 +1,13 @@ package com.haiwei.manage.service.impl; +import java.io.File; import java.util.List; + +import com.haiwei.common.config.Global; +import com.haiwei.common.constant.Constants; import com.haiwei.common.utils.DateUtils; +import com.haiwei.common.utils.StringUtils; +import com.haiwei.common.utils.file.FileUtils; import com.haiwei.framework.util.ShiroUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -83,7 +89,13 @@ public class BsaeFileServiceImpl implements IBsaeFileService @Override public int deleteBsaeFileByIds(String ids) { - return bsaeFileMapper.deleteBsaeFileByIds(Convert.toStrArray(ids)); + + String[] objids = Convert.toStrArray(ids); + for (int i = 0; i diff --git a/haiwei-manage/src/main/resources/templates/manage/record_report/edit.html b/haiwei-manage/src/main/resources/templates/manage/record_report/edit.html index 0de9d71..c558001 100644 --- a/haiwei-manage/src/main/resources/templates/manage/record_report/edit.html +++ b/haiwei-manage/src/main/resources/templates/manage/record_report/edit.html @@ -124,7 +124,8 @@ align: 'center', title: '采样时间', formatter: function(value, row, index) { - var html = $.common.sprintf("", index, value); + + var html = $.common.sprintf("", index, value); return html; } },