From 9401041312dab1a5defb550c1364e0bb6e80c81d Mon Sep 17 00:00:00 2001 From: 15036302109 Date: Fri, 22 Dec 2023 16:13:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5-=E5=B1=80?= =?UTF-8?q?=E7=AB=AF=EF=BC=8C=E7=BB=9F=E8=AE=A1=E5=8A=9F=E8=83=BD=EF=BC=8C?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E4=B8=8A=E4=BC=A0=E6=88=90=E5=8A=9F=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E9=83=A8=E9=97=A8=E5=90=8D=E7=A7=B0=E6=B6=88=E5=A4=B1?= =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/ehs/EhsNoticeMessageFileController.java | 6 ++++++ .../main/resources/mapper/ehs/EhsNoticeMessageMapper.xml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsNoticeMessageFileController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsNoticeMessageFileController.java index 3c3d552..7e3ec77 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsNoticeMessageFileController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsNoticeMessageFileController.java @@ -145,9 +145,15 @@ public class EhsNoticeMessageFileController extends BaseController j++; } List fileList = ehsNoticeMessageFileService.selectEhsNoticeMessageFileList(ehsNoticeMessageFile); + // fileList里面有deptId,但没有deptName,这里给他设置把,以后再说循环查库的问题 String cids=","; for(EhsNoticeMessageFile efile:fileList){ cids= efile.getDeptId()+","; + // 避免循环查数据库库 + efile.setDeptName(comMap.get(efile.getDeptId())); + //SysDept sysDept = deptService.selectDeptById(efile.getDeptId()); + //efile.setDeptName(sysDept.getDeptName()); + } //String[] cc = ehsNoticeMessageFile.getCompaynList().split(","); for(int i=0;i SELECT m.notice_message_id, m.create_user_id, m.create_time, m.dept_id, m.title, m.display_content, m.STATUS, m.dept_list, GROUP_CONCAT( ft.dept_name SEPARATOR ';' ) dept_name, - m.mesg_type, m.read_dept_id, m.all_dept,m.file_temp_name,m.file_temp_original_name, + m.mesg_type, m.read_dept_id, m.all_dept,m.file_temp_name,m.file_temp_original_name, m.remark, ( SELECT count( 1 ) FROM ehs_notice_message_file f WHERE f.notice_message_id = m.notice_message_id ) file_count FROM ehs_notice_message m LEFT JOIN sys_user e ON e.user_id = m.CREATE_USER_ID