|
|
@ -269,35 +269,20 @@ public class DingUtil { |
|
|
String nowTime = LocalDateTime.now().format(formatter); |
|
|
String nowTime = LocalDateTime.now().format(formatter); |
|
|
|
|
|
|
|
|
boolean approved = appealDTO.getStatus() != null && appealDTO.getStatus() == 2; |
|
|
boolean approved = appealDTO.getStatus() != null && appealDTO.getStatus() == 2; |
|
|
String resultLine = approved |
|
|
StringBuilder markdown = new StringBuilder(); |
|
|
? "- ✅ **审核通过**" |
|
|
markdown.append(String.format("### 【%s】中<font color=#64BCF2>第%d题</font>的申诉结果如下:\n\n" , "教育云平台知识考试",appealDTO.getQuestionSort())) |
|
|
: "- ❌ **审核不通过**"; |
|
|
.append(String.format("处理结果:%s\n\n" ,approved ? "同意" : "不同意")) |
|
|
String markdownText = String.format( |
|
|
.append(String.format("处理理由:%s" , appealDTO.getReason())); |
|
|
"### AI考核-申诉审批完成\n\n" + |
|
|
|
|
|
"#### 任务信息\n" + |
|
|
|
|
|
"- 题目名称:%s\n" + |
|
|
|
|
|
"- 申诉理由:%s\n\n" + |
|
|
|
|
|
"#### 审批结果\n" + |
|
|
|
|
|
"%s\n\n" + |
|
|
|
|
|
"---\n" + |
|
|
|
|
|
"- 📅 审批时间:%s\n" + |
|
|
|
|
|
"- 👤 审批人:%s\n" + |
|
|
|
|
|
"- 💬 审批意见:%s", |
|
|
|
|
|
appealDTO.getQuestionContent(), |
|
|
|
|
|
appealDTO.getRemark(), |
|
|
|
|
|
resultLine, |
|
|
|
|
|
nowTime, |
|
|
|
|
|
appealDTO.getAppealUsername(), |
|
|
|
|
|
appealDTO.getReason() |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
//发送工作通知
|
|
|
//发送工作通知
|
|
|
DtCorpConversationMessage corpConversationMessage = DtCorpConversationMessage.builder() |
|
|
DtCorpConversationMessage corpConversationMessage = DtCorpConversationMessage.builder() |
|
|
.agentId(dtService.getDtConfigStorage().getAgentId()) |
|
|
.agentId(dtService.getDtConfigStorage().getAgentId()) |
|
|
.userIds(Lists.newArrayList(appealDTO.getUserId())) |
|
|
.userIds(Lists.newArrayList(appealDTO.getUserId())) |
|
|
.msg(DtMessage.MARKDOWN() |
|
|
.msg(DtMessage.ACTIONCARD() |
|
|
.content("AI考核-审批申诉结果") |
|
|
.title("产品知识考核") |
|
|
.text(markdownText) |
|
|
.markdown(markdown.toString()) |
|
|
|
|
|
.singleTitle("查看详情") |
|
|
|
|
|
.singleUrl("https://www.baidu.com/") |
|
|
.build()) |
|
|
.build()) |
|
|
.build(); |
|
|
.build(); |
|
|
|
|
|
|
|
|
|