fix(项目报告): 项目报告展示优化,修复报表图片显示不全的问题

--bug=1009029 --user=宋天阳 【项目报告】-报告内容选择报表-内容中报表显示不全
https://www.tapd.cn/55049933/s/1084468
This commit is contained in:
song-tianyang 2021-12-21 17:53:39 +08:00 committed by song-tianyang
parent 1ced090be8
commit e71eb1351c
9 changed files with 55 additions and 27 deletions

View File

@ -74,7 +74,8 @@
<select id="getUserGroupInfo" resultType="io.metersphere.dto.UserGroupInfoDTO">
select distinct user.id AS userId, user.name AS userName, user.email AS userEmail, g.`name` AS groupName, g.id AS groupId
from user INNER JOIN user_group ug on user.id = ug.user_id
INNER JOIN `group` g ON ug.group_id = g.id;
INNER JOIN `group` g ON ug.group_id = g.id
order by ug.create_time ASC;
</select>
</mapper>

View File

@ -58,6 +58,10 @@ public class NoticeModel implements Serializable {
* 接收人
*/
private List<Receiver> receivers;
/**
* 抄送人
*/
private List<Receiver> recipients;
/**
*
*/

View File

@ -15,6 +15,7 @@ import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@ -81,6 +82,14 @@ public class MailNoticeSender extends AbstractNoticeSender {
return;
}
List<String> recipients = new ArrayList<>();
if(CollectionUtils.isNotEmpty(noticeModel.getRecipients())){
recipients = noticeModel.getRecipients().stream()
.map(Receiver::getUserId)
.distinct()
.collect(Collectors.toList());
}
String[] users = userIds.stream()
.distinct()
.toArray(String[]::new);
@ -88,6 +97,14 @@ public class MailNoticeSender extends AbstractNoticeSender {
LogUtil.info("收件人地址: {}", userIds);
helper.setText(context, true);
helper.setTo(users);
if(CollectionUtils.isNotEmpty(recipients)){
String[] ccArr = recipients.stream()
.distinct()
.toArray(String[]::new);
helper.setCc(ccArr);
}
javaMailSender.send(mimeMessage);
}

@ -1 +1 @@
Subproject commit 8e54dfc4cd510f2d676787dad1599067ac02f2d9
Subproject commit 25fa8fc0d7972b56f86fb466417ec55588a4812d

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 KiB

@ -1 +1 @@
Subproject commit a598375541a45898616db5085fd38c192bd6df4b
Subproject commit 4ab83e897bdbc55729fd7418b6a77e73e39b1df9

View File

@ -6,6 +6,7 @@ export default {
trash: "Trash",
yes: "yes",
no: "no",
example: "Demo",
excelFile: "Excel",
xmindFile: "Xmind",
default: "default",
@ -50,6 +51,7 @@ export default {
save_as: 'Save as',
update: 'Update',
save_success: 'Saved successfully',
send_success: 'Send successfully',
delete_success: 'Deleted successfully',
modify_success: 'Modify Success',
copy_success: 'Copy Success',

View File

@ -6,6 +6,7 @@ export default {
trash: "回收站",
yes: "是",
no: "否",
example: "示例",
excelFile: "表格文件.xls",
xmindFile: "思维导图.xmind",
default: "默认值",
@ -49,6 +50,7 @@ export default {
save_as: '另存为',
update: '更新',
save_success: '保存成功',
send_success: '发送成功',
delete_success: '删除成功',
copy_success: '复制成功',
modify_success: '修改成功',

View File

@ -6,6 +6,7 @@ export default {
trash: "回收站",
yes: "是",
no: "否",
example: "示例",
excelFile: "表格文件.xls",
xmindFile: "思維導圖.xmind",
default: "默認值",
@ -49,6 +50,7 @@ export default {
save_as: '另存為',
update: '更新',
save_success: '保存成功',
send_success: '發送成功',
delete_success: '刪除成功',
copy_success: '復製成功',
modify_success: '修改成功',