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 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 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 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> </select>
</mapper> </mapper>

View File

@ -58,6 +58,10 @@ public class NoticeModel implements Serializable {
* 接收人 * 接收人
*/ */
private List<Receiver> receivers; 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.annotation.Resource;
import javax.mail.MessagingException; import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -81,6 +82,14 @@ public class MailNoticeSender extends AbstractNoticeSender {
return; 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() String[] users = userIds.stream()
.distinct() .distinct()
.toArray(String[]::new); .toArray(String[]::new);
@ -88,6 +97,14 @@ public class MailNoticeSender extends AbstractNoticeSender {
LogUtil.info("收件人地址: {}", userIds); LogUtil.info("收件人地址: {}", userIds);
helper.setText(context, true); helper.setText(context, true);
helper.setTo(users); helper.setTo(users);
if(CollectionUtils.isNotEmpty(recipients)){
String[] ccArr = recipients.stream()
.distinct()
.toArray(String[]::new);
helper.setCc(ccArr);
}
javaMailSender.send(mimeMessage); 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", trash: "Trash",
yes: "yes", yes: "yes",
no: "no", no: "no",
example: "Demo",
excelFile: "Excel", excelFile: "Excel",
xmindFile: "Xmind", xmindFile: "Xmind",
default: "default", default: "default",
@ -50,6 +51,7 @@ export default {
save_as: 'Save as', save_as: 'Save as',
update: 'Update', update: 'Update',
save_success: 'Saved successfully', save_success: 'Saved successfully',
send_success: 'Send successfully',
delete_success: 'Deleted successfully', delete_success: 'Deleted successfully',
modify_success: 'Modify Success', modify_success: 'Modify Success',
copy_success: 'Copy Success', copy_success: 'Copy Success',

View File

@ -6,6 +6,7 @@ export default {
trash: "回收站", trash: "回收站",
yes: "是", yes: "是",
no: "否", no: "否",
example: "示例",
excelFile: "表格文件.xls", excelFile: "表格文件.xls",
xmindFile: "思维导图.xmind", xmindFile: "思维导图.xmind",
default: "默认值", default: "默认值",
@ -49,6 +50,7 @@ export default {
save_as: '另存为', save_as: '另存为',
update: '更新', update: '更新',
save_success: '保存成功', save_success: '保存成功',
send_success: '发送成功',
delete_success: '删除成功', delete_success: '删除成功',
copy_success: '复制成功', copy_success: '复制成功',
modify_success: '修改成功', modify_success: '修改成功',
@ -67,7 +69,7 @@ export default {
input_limit: '长度在 {0} 到 {1} 个字符', input_limit: '长度在 {0} 到 {1} 个字符',
login: '登录', login: '登录',
welcome: '一站式开源持续测试平台', welcome: '一站式开源持续测试平台',
theme_color:'主题色', theme_color: '主题色',
username: '姓名', username: '姓名',
password: '密码', password: '密码',
input_username: '请输入用户姓名', input_username: '请输入用户姓名',
@ -403,8 +405,8 @@ export default {
custom_num: '自定义编号', custom_num: '自定义编号',
version: '版本', version: '版本',
is_new: "是否新建", is_new: "是否新建",
form_config:"表单配置", form_config: "表单配置",
form_content:"表单内容" form_content: "表单内容"
}, },
login: { login: {
normal_Login: "普通登录", normal_Login: "普通登录",
@ -635,8 +637,8 @@ export default {
zentao_account: '禅道账户', zentao_account: '禅道账户',
zentao_password: '禅道密码', zentao_password: '禅道密码',
zentao_prompt_information: '该信息为通过禅道提交缺陷的的用户名、密码,若未填写,则使用工作空间中配置的默认信息', zentao_prompt_information: '该信息为通过禅道提交缺陷的的用户名、密码,若未填写,则使用工作空间中配置的默认信息',
zentao_config_tip:"参考禅道配置文件中 $config->requestType 的值 ", zentao_config_tip: "参考禅道配置文件中 $config->requestType 的值 ",
zentao_config_path:"配置文件参考路径:/opt/zbox/app/zentao/config/my.php", zentao_config_path: "配置文件参考路径:/opt/zbox/app/zentao/config/my.php",
use_tip: '使用指引:', use_tip: '使用指引:',
use_tip_tapd: 'Tapd Basic Auth 账号信息在"公司管理-安全与集成-开放平台"中查询', use_tip_tapd: 'Tapd Basic Auth 账号信息在"公司管理-安全与集成-开放平台"中查询',
use_tip_jira: 'Jira software server 认证信息为 账号密码Jira software cloud 认证信息为 账号+令牌(账户设置-安全-创建API令牌)', use_tip_jira: 'Jira software server 认证信息为 账号密码Jira software cloud 认证信息为 账号+令牌(账户设置-安全-创建API令牌)',
@ -798,7 +800,7 @@ export default {
add_project_batch: '批量添加到项目', add_project_batch: '批量添加到项目',
add_workspace_batch: "批量添加到工作空间", add_workspace_batch: "批量添加到工作空间",
add_project_batch_tip: '默认为成员添加只读用户组(系统)', add_project_batch_tip: '默认为成员添加只读用户组(系统)',
import_user_tip:'用户组只支持系统默认用户组', import_user_tip: '用户组只支持系统默认用户组',
}, },
group: { group: {
add: '添加用户组', add: '添加用户组',
@ -893,7 +895,7 @@ export default {
file_id: '文件ID', file_id: '文件ID',
avg_response_time: '平均响应时间', avg_response_time: '平均响应时间',
tps: '每秒传输的事物处理个数', tps: '每秒传输的事物处理个数',
plan_share_url:'链接跳转是否登陆' plan_share_url: '链接跳转是否登陆'
}, },
load_test: { load_test: {
id: '测试ID', id: '测试ID',
@ -1059,13 +1061,13 @@ export default {
jar_config: { jar_config: {
title: "上传jar包", title: "上传jar包",
jar_file: "jar包", jar_file: "jar包",
jar_manage:"JAR包管理", jar_manage: "JAR包管理",
delete_tip: "删除需重启服务后生效", delete_tip: "删除需重启服务后生效",
file_exist: "该项目下已存在该jar包", file_exist: "该项目下已存在该jar包",
upload_limit_size: "上传文件大小不能超过 30MB!", upload_limit_size: "上传文件大小不能超过 30MB!",
upload_limit_size_warn: "上传文件大小不能超过 {0} MB!", upload_limit_size_warn: "上传文件大小不能超过 {0} MB!",
upload_limit: "上传文件大小不能超过", upload_limit: "上传文件大小不能超过",
upload_tip:"只能上传JAR包" upload_tip: "只能上传JAR包"
}, },
batch_menus: { batch_menus: {
select_all_data: "选择所有数据(共{0}条)", select_all_data: "选择所有数据(共{0}条)",
@ -2219,8 +2221,8 @@ export default {
status_delete: '删除', status_delete: '删除',
status_in_progress: '接受/处理', status_in_progress: '接受/处理',
status_rejected: '拒绝', status_rejected: '拒绝',
status_upcoming:'待办', status_upcoming: '待办',
status_reopened:'重新打开', status_reopened: '重新打开',
please_choose_current_owner: "请选择处理人", please_choose_current_owner: "请选择处理人",
tapd_current_owner: "Tapd 处理人", tapd_current_owner: "Tapd 处理人",
zentao_bug_build: "禅道 影响版本", zentao_bug_build: "禅道 影响版本",
@ -2532,7 +2534,7 @@ export default {
script_entry: "脚本执行入口", script_entry: "脚本执行入口",
plugin_id: "插件ID", plugin_id: "插件ID",
script_view: "查看脚本", script_view: "查看脚本",
warning_tip:'未找到脚本内容' warning_tip: '未找到脚本内容'
}, },
mail: { mail: {
input_mail_subject: "请输入邮件主题", input_mail_subject: "请输入邮件主题",

View File

@ -6,6 +6,7 @@ export default {
trash: "回收站", trash: "回收站",
yes: "是", yes: "是",
no: "否", no: "否",
example: "示例",
excelFile: "表格文件.xls", excelFile: "表格文件.xls",
xmindFile: "思維導圖.xmind", xmindFile: "思維導圖.xmind",
default: "默認值", default: "默認值",
@ -49,6 +50,7 @@ export default {
save_as: '另存為', save_as: '另存為',
update: '更新', update: '更新',
save_success: '保存成功', save_success: '保存成功',
send_success: '發送成功',
delete_success: '刪除成功', delete_success: '刪除成功',
copy_success: '復製成功', copy_success: '復製成功',
modify_success: '修改成功', modify_success: '修改成功',
@ -67,7 +69,7 @@ export default {
input_limit: '長度在 {0} 到 {1} 個字符', input_limit: '長度在 {0} 到 {1} 個字符',
login: '登錄', login: '登錄',
welcome: '一站式開源持續測試平臺', welcome: '一站式開源持續測試平臺',
theme_color:'主題色', theme_color: '主題色',
username: '姓名', username: '姓名',
password: '密碼', password: '密碼',
input_username: '請輸入用戶姓名', input_username: '請輸入用戶姓名',
@ -403,8 +405,8 @@ export default {
custom_num: '自定義編號', custom_num: '自定義編號',
version: '版本', version: '版本',
is_new: "是否新建", is_new: "是否新建",
form_config:"表單配置", form_config: "表單配置",
form_content:"表單內容" form_content: "表單內容"
}, },
login: { login: {
normal_Login: "普通登錄", normal_Login: "普通登錄",
@ -635,8 +637,8 @@ export default {
zentao_account: '禪道賬戶', zentao_account: '禪道賬戶',
zentao_password: '禪道密碼', zentao_password: '禪道密碼',
zentao_prompt_information: '該信息為通過禪道提交缺陷的的用戶名、密碼,若未填寫,則使用工作空間中配置的默認信息', zentao_prompt_information: '該信息為通過禪道提交缺陷的的用戶名、密碼,若未填寫,則使用工作空間中配置的默認信息',
zentao_config_tip:"參考禪道配置文件中 $config->requestType 的值 ", zentao_config_tip: "參考禪道配置文件中 $config->requestType 的值 ",
zentao_config_path:"配置文件參考路徑:/opt/zbox/app/zentao/config/my.php", zentao_config_path: "配置文件參考路徑:/opt/zbox/app/zentao/config/my.php",
use_tip: '使用指引:', use_tip: '使用指引:',
use_tip_tapd: 'Tapd Basic Auth 賬號信息在"公司管理-安全與集成-開放平臺"中查詢', use_tip_tapd: 'Tapd Basic Auth 賬號信息在"公司管理-安全與集成-開放平臺"中查詢',
use_tip_jira: 'Jira software server 認證信息為 賬號密碼Jira software cloud 認證信息為 賬號+令牌(賬戶設置-安全-創建API令牌)', use_tip_jira: 'Jira software server 認證信息為 賬號密碼Jira software cloud 認證信息為 賬號+令牌(賬戶設置-安全-創建API令牌)',
@ -798,7 +800,7 @@ export default {
add_project_batch: '批量添加到項目', add_project_batch: '批量添加到項目',
add_workspace_batch: "批量添加到工作空間", add_workspace_batch: "批量添加到工作空間",
add_project_batch_tip: '默認為成員添加只讀用戶組(系統)', add_project_batch_tip: '默認為成員添加只讀用戶組(系統)',
import_user_tip:'用戶組只支持系統默認用戶組' import_user_tip: '用戶組只支持系統默認用戶組'
}, },
group: { group: {
add: '添加用戶組', add: '添加用戶組',
@ -893,7 +895,7 @@ export default {
file_id: '文件ID', file_id: '文件ID',
avg_response_time: '平均響應時間', avg_response_time: '平均響應時間',
tps: '每秒傳輸的事物處理個數', tps: '每秒傳輸的事物處理個數',
plan_share_url:'鏈接跳轉是否登陸' plan_share_url: '鏈接跳轉是否登陸'
}, },
load_test: { load_test: {
id: '測試ID', id: '測試ID',
@ -1059,13 +1061,13 @@ export default {
jar_config: { jar_config: {
title: "上傳jar包", title: "上傳jar包",
jar_file: "jar包", jar_file: "jar包",
jar_manage:"JAR包管理", jar_manage: "JAR包管理",
delete_tip: "刪除需重啟服務後生效", delete_tip: "刪除需重啟服務後生效",
file_exist: "該項目下已存在該jar包", file_exist: "該項目下已存在該jar包",
upload_limit_size: "上傳文件大小不能超過 30MB!", upload_limit_size: "上傳文件大小不能超過 30MB!",
upload_limit_size_warn: "上傳文件大小不能超過 {0} MB!", upload_limit_size_warn: "上傳文件大小不能超過 {0} MB!",
upload_limit: "上傳文件大小不能超過", upload_limit: "上傳文件大小不能超過",
upload_tip:"只能上傳JAR包" upload_tip: "只能上傳JAR包"
}, },
batch_menus: { batch_menus: {
select_all_data: "選擇所有數據(共{0}條)", select_all_data: "選擇所有數據(共{0}條)",
@ -2219,8 +2221,8 @@ export default {
status_delete: '刪除', status_delete: '刪除',
status_in_progress: '接受/處理', status_in_progress: '接受/處理',
status_rejected: '拒絕', status_rejected: '拒絕',
status_upcoming:'待辦', status_upcoming: '待辦',
status_reopened:'重新打開', status_reopened: '重新打開',
please_choose_current_owner: "請選擇處理人", please_choose_current_owner: "請選擇處理人",
tapd_current_owner: "Tapd 處理人", tapd_current_owner: "Tapd 處理人",
zentao_bug_build: "禪道 影響版本", zentao_bug_build: "禪道 影響版本",
@ -2532,7 +2534,7 @@ export default {
script_entry: "腳本執行入口", script_entry: "腳本執行入口",
plugin_id: "插件ID", plugin_id: "插件ID",
script_view: "查看腳本", script_view: "查看腳本",
warning_tip:'未找到腳本內容' warning_tip: '未找到腳本內容'
}, },
mail: { mail: {
input_mail_subject: "請輸入郵件主題", input_mail_subject: "請輸入郵件主題",