Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
holmes
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
holmes
Commits
cc517e42
Commit
cc517e42
authored
Jun 09, 2022
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改供应链业务提醒文案
parent
45a0bb9e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
1 deletion
+41
-1
BugNotifyTask.java
src/main/java/cn/qg/holmes/task/BugNotifyTask.java
+1
-1
DingdingUtils.java
src/main/java/cn/qg/holmes/utils/DingdingUtils.java
+40
-0
No files found.
src/main/java/cn/qg/holmes/task/BugNotifyTask.java
View file @
cc517e42
...
@@ -207,7 +207,7 @@ public class BugNotifyTask {
...
@@ -207,7 +207,7 @@ public class BugNotifyTask {
public
void
gylBusinessProdBugDailyNotifyTask
()
throws
Exception
{
public
void
gylBusinessProdBugDailyNotifyTask
()
throws
Exception
{
if
(
scheduledTaskStart
.
equals
(
"true"
))
{
if
(
scheduledTaskStart
.
equals
(
"true"
))
{
Iterable
<
Issue
>
jrUnsolvedList
=
jiraService
.
getIssueListByJQL
(
"project = GYLYW AND resolution = Unresolved ORDER BY priority DESC, created DESC"
);
Iterable
<
Issue
>
jrUnsolvedList
=
jiraService
.
getIssueListByJQL
(
"project = GYLYW AND resolution = Unresolved ORDER BY priority DESC, created DESC"
);
DingdingUtils
.
sendToDingding
(
DingdingUtils
.
buildDailyProdBugNotifyMsg
(
jrUnsolvedList
),
gylywProdDingUrl
);
DingdingUtils
.
sendToDingding
(
DingdingUtils
.
buildDailyProdBugNotifyMsg
ForBusiness
(
jrUnsolvedList
),
gylywProdDingUrl
);
}
}
}
}
}
}
src/main/java/cn/qg/holmes/utils/DingdingUtils.java
View file @
cc517e42
...
@@ -349,6 +349,46 @@ public class DingdingUtils {
...
@@ -349,6 +349,46 @@ public class DingdingUtils {
return
buildMarkdownMsg
(
title
,
content
,
true
);
return
buildMarkdownMsg
(
title
,
content
,
true
);
}
}
/**
* 构建每日线上未解决工单统计
* @param issues jira bug 列表
* @return
*/
public
static
String
buildDailyProdBugNotifyMsgForBusiness
(
Iterable
<
Issue
>
issues
)
{
String
title
=
"线上未解决工单统计"
;
String
content
=
"📣线上未解决工单统计:"
+
"\n\n"
;
List
<
Issue
>
issueList
=
new
ArrayList
<>();
for
(
Issue
issue:
issues
)
{
issueList
.
add
(
issue
);
}
if
(
issueList
.
size
()
>
0
)
{
int
count
=
0
;
for
(
Issue
issue:
issueList
)
{
count
=
count
+
1
;
String
issueUrl
=
"http://jira2.quantgroup.cn/browse/"
+
issue
.
getKey
();
content
=
content
+
count
+
"、["
+
issue
.
getSummary
().
replace
(
"\""
,
""
)
+
"]("
+
issueUrl
+
")\n"
;
content
=
content
+
"- 优先级:"
+
issue
.
getPriority
().
getName
()
+
"\n"
;
content
=
content
+
"- 状态:"
+
issue
.
getStatus
().
getName
()
+
"\n"
;
String
assignee
=
""
;
if
(
issue
.
getAssignee
()
==
null
)
{
assignee
=
"未分配"
;
}
else
{
assignee
=
issue
.
getAssignee
().
getDisplayName
();
}
content
=
content
+
"- 经办人:"
+
assignee
+
"\n"
;
DateTime
startDate
=
issue
.
getCreationDate
();
DateTime
curDate
=
new
DateTime
();
int
duration
=
calculateBugFixTime
(
startDate
,
curDate
);
content
+=
"- 持续时间:"
+
duration
+
"小时\n\n"
;
}
content
+=
"**截止当前,共有"
+
String
.
valueOf
(
count
)
+
"个工单未解决,请对应经办人尽快跟进解决**"
;
}
if
(
issueList
.
size
()
==
0
)
{
content
+=
"**截止当前,所有工单都已经解决完毕👍🏻**"
;
}
return
buildMarkdownMsg
(
title
,
content
,
true
);
}
/**
/**
* 计算BUG持续时间
* 计算BUG持续时间
* @param startDate 开始日期
* @param startDate 开始日期
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment