|
@@ -17,6 +17,8 @@ import com.zjugis.module.adm.remote.dto.ProjectDto;
|
|
import com.zjugis.module.adm.remote.vo.ProjectVO;
|
|
import com.zjugis.module.adm.remote.vo.ProjectVO;
|
|
import com.zjugis.module.infra.api.ding.DingApi;
|
|
import com.zjugis.module.infra.api.ding.DingApi;
|
|
import com.zjugis.module.infra.api.ding.dto.DingMessageDto;
|
|
import com.zjugis.module.infra.api.ding.dto.DingMessageDto;
|
|
|
|
+import com.zjugis.module.infra.api.ding.dto.Form;
|
|
|
|
+import com.zjugis.module.infra.api.ding.dto.OA;
|
|
import com.zjugis.module.infra.api.ding.enums.DingMsg;
|
|
import com.zjugis.module.infra.api.ding.enums.DingMsg;
|
|
import com.zjugis.module.system.api.user.AdminUserApi;
|
|
import com.zjugis.module.system.api.user.AdminUserApi;
|
|
import com.zjugis.module.system.api.user.dto.AdminUserRespDTO;
|
|
import com.zjugis.module.system.api.user.dto.AdminUserRespDTO;
|
|
@@ -68,16 +70,16 @@ public class ReportDingServiceImpl {
|
|
|
|
|
|
String url = "/logsDetail?id= " + reportRequestVO.getReportId();
|
|
String url = "/logsDetail?id= " + reportRequestVO.getReportId();
|
|
for (String receiveUserId : receiveUserIds) {
|
|
for (String receiveUserId : receiveUserIds) {
|
|
- OapiMessageCorpconversationAsyncsendV2Request.OA oa = new OapiMessageCorpconversationAsyncsendV2Request.OA();
|
|
|
|
|
|
+ OA oa = new OA();
|
|
oa.setMessageUrl(URL + url);
|
|
oa.setMessageUrl(URL + url);
|
|
oa.setPcMessageUrl(URL + url);
|
|
oa.setPcMessageUrl(URL + url);
|
|
- OapiMessageCorpconversationAsyncsendV2Request.Head head = new OapiMessageCorpconversationAsyncsendV2Request.Head();
|
|
|
|
|
|
+ OA.Head head = new OA.Head();
|
|
head.setBgcolor("FFBBBBBB");
|
|
head.setBgcolor("FFBBBBBB");
|
|
head.setText("浙江万维OA");
|
|
head.setText("浙江万维OA");
|
|
oa.setHead(head);
|
|
oa.setHead(head);
|
|
|
|
|
|
//消息实体
|
|
//消息实体
|
|
- OapiMessageCorpconversationAsyncsendV2Request.Body body = new OapiMessageCorpconversationAsyncsendV2Request.Body();
|
|
|
|
|
|
+ OA.Body body = new OA.Body();
|
|
|
|
|
|
//消息标题
|
|
//消息标题
|
|
String userNickName = userMap.get(reportRequestVO.getUserId()) != null ? userMap.get(reportRequestVO.getUserId()).getNickname() : "(异常人员)";
|
|
String userNickName = userMap.get(reportRequestVO.getUserId()) != null ? userMap.get(reportRequestVO.getUserId()).getNickname() : "(异常人员)";
|
|
@@ -85,18 +87,18 @@ public class ReportDingServiceImpl {
|
|
body.setTitle(userNickName + "的" + reportType);
|
|
body.setTitle(userNickName + "的" + reportType);
|
|
|
|
|
|
//消息内容
|
|
//消息内容
|
|
- List<OapiMessageCorpconversationAsyncsendV2Request.Form> formList = new ArrayList<>();
|
|
|
|
- OapiMessageCorpconversationAsyncsendV2Request.Form formStartDate = new OapiMessageCorpconversationAsyncsendV2Request.Form();
|
|
|
|
|
|
+ List<Form> formList = new ArrayList<>();
|
|
|
|
+ Form formStartDate = new Form();
|
|
formStartDate.setKey("开始日期:");
|
|
formStartDate.setKey("开始日期:");
|
|
formStartDate.setValue(LocalDateTimeUtils.format(reportRequestVO.getReportStartDate(), "yyyy-MM-dd"));
|
|
formStartDate.setValue(LocalDateTimeUtils.format(reportRequestVO.getReportStartDate(), "yyyy-MM-dd"));
|
|
formList.add(formStartDate);
|
|
formList.add(formStartDate);
|
|
|
|
|
|
- OapiMessageCorpconversationAsyncsendV2Request.Form formEndDate = new OapiMessageCorpconversationAsyncsendV2Request.Form();
|
|
|
|
|
|
+ Form formEndDate = new Form();
|
|
formEndDate.setKey("结束日期:");
|
|
formEndDate.setKey("结束日期:");
|
|
formEndDate.setValue(LocalDateTimeUtils.format(reportRequestVO.getReportEndDate(), "yyyy-MM-dd"));
|
|
formEndDate.setValue(LocalDateTimeUtils.format(reportRequestVO.getReportEndDate(), "yyyy-MM-dd"));
|
|
formList.add(formEndDate);
|
|
formList.add(formEndDate);
|
|
|
|
|
|
- OapiMessageCorpconversationAsyncsendV2Request.Form formContent = new OapiMessageCorpconversationAsyncsendV2Request.Form();
|
|
|
|
|
|
+ Form formContent = new Form();
|
|
formContent.setKey("本周完成工作:\n");
|
|
formContent.setKey("本周完成工作:\n");
|
|
formContent.setValue(reportRequestVO.getReportContent());
|
|
formContent.setValue(reportRequestVO.getReportContent());
|
|
formList.add(formContent);
|
|
formList.add(formContent);
|
|
@@ -111,7 +113,7 @@ public class ReportDingServiceImpl {
|
|
formWorkTimeValue.append("(").append(workLoad.getWorkTime()).append("小时)").append("(异常项目)").append("\n");
|
|
formWorkTimeValue.append("(").append(workLoad.getWorkTime()).append("小时)").append("(异常项目)").append("\n");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- OapiMessageCorpconversationAsyncsendV2Request.Form formWorkTime = new OapiMessageCorpconversationAsyncsendV2Request.Form();
|
|
|
|
|
|
+ Form formWorkTime = new Form();
|
|
formWorkTime.setKey("工作量分配:\n");
|
|
formWorkTime.setKey("工作量分配:\n");
|
|
formWorkTime.setValue(formWorkTimeValue.toString());
|
|
formWorkTime.setValue(formWorkTimeValue.toString());
|
|
formList.add(formWorkTime);
|
|
formList.add(formWorkTime);
|
|
@@ -141,16 +143,16 @@ public class ReportDingServiceImpl {
|
|
ReportDO reportDO = reportMapper.selectById(reportCommentCreateReqVO.getReportId());
|
|
ReportDO reportDO = reportMapper.selectById(reportCommentCreateReqVO.getReportId());
|
|
String url = "/logsDetail?id= " + reportDO.getId();
|
|
String url = "/logsDetail?id= " + reportDO.getId();
|
|
//发送钉钉消息
|
|
//发送钉钉消息
|
|
- OapiMessageCorpconversationAsyncsendV2Request.OA oa = new OapiMessageCorpconversationAsyncsendV2Request.OA();
|
|
|
|
|
|
+ OA oa = new OA();
|
|
oa.setMessageUrl(URL + url);
|
|
oa.setMessageUrl(URL + url);
|
|
oa.setPcMessageUrl(URL + url);
|
|
oa.setPcMessageUrl(URL + url);
|
|
|
|
|
|
- OapiMessageCorpconversationAsyncsendV2Request.Head head = new OapiMessageCorpconversationAsyncsendV2Request.Head();
|
|
|
|
|
|
+ OA.Head head = new OA.Head();
|
|
head.setBgcolor("FFBBBBBB");
|
|
head.setBgcolor("FFBBBBBB");
|
|
head.setText("浙江万维OA");
|
|
head.setText("浙江万维OA");
|
|
oa.setHead(head);
|
|
oa.setHead(head);
|
|
|
|
|
|
- OapiMessageCorpconversationAsyncsendV2Request.Body body = new OapiMessageCorpconversationAsyncsendV2Request.Body();
|
|
|
|
|
|
+ OA.Body body = new OA.Body();
|
|
|
|
|
|
String commentUserNickName = userMap.get(reportCommentCreateReqVO.getCommentUserId()) != null ? userMap.get(reportCommentCreateReqVO.getCommentUserId()).getNickname() : "(异常人员)";
|
|
String commentUserNickName = userMap.get(reportCommentCreateReqVO.getCommentUserId()) != null ? userMap.get(reportCommentCreateReqVO.getCommentUserId()).getNickname() : "(异常人员)";
|
|
String reportAuthor = userMap.get(reportDO.getUserId()) != null ? userMap.get(reportDO.getUserId()).getNickname() : "(异常人员)";
|
|
String reportAuthor = userMap.get(reportDO.getUserId()) != null ? userMap.get(reportDO.getUserId()).getNickname() : "(异常人员)";
|
|
@@ -164,8 +166,8 @@ public class ReportDingServiceImpl {
|
|
+ "~" + LocalDateTimeUtils.format(reportDO.getReportStartDate(), "yyyy-MM-dd") + "」的" + reportType);
|
|
+ "~" + LocalDateTimeUtils.format(reportDO.getReportStartDate(), "yyyy-MM-dd") + "」的" + reportType);
|
|
|
|
|
|
//消息内容
|
|
//消息内容
|
|
- List<OapiMessageCorpconversationAsyncsendV2Request.Form> formList = new ArrayList<>();
|
|
|
|
- OapiMessageCorpconversationAsyncsendV2Request.Form formContent = new OapiMessageCorpconversationAsyncsendV2Request.Form();
|
|
|
|
|
|
+ List<Form> formList = new ArrayList<>();
|
|
|
|
+ Form formContent = new Form();
|
|
formContent.setKey("评论内容:\n");
|
|
formContent.setKey("评论内容:\n");
|
|
formContent.setValue(reportCommentCreateReqVO.getCommentContent());
|
|
formContent.setValue(reportCommentCreateReqVO.getCommentContent());
|
|
formList.add(formContent);
|
|
formList.add(formContent);
|
|
@@ -187,8 +189,8 @@ public class ReportDingServiceImpl {
|
|
+ "~" + LocalDateTimeUtils.format(reportDO.getReportStartDate(), "yyyy-MM-dd") + "」" + reportType + "下的评论");
|
|
+ "~" + LocalDateTimeUtils.format(reportDO.getReportStartDate(), "yyyy-MM-dd") + "」" + reportType + "下的评论");
|
|
|
|
|
|
//消息内容
|
|
//消息内容
|
|
- List<OapiMessageCorpconversationAsyncsendV2Request.Form> formList = new ArrayList<>();
|
|
|
|
- OapiMessageCorpconversationAsyncsendV2Request.Form formContent = new OapiMessageCorpconversationAsyncsendV2Request.Form();
|
|
|
|
|
|
+ List<Form> formList = new ArrayList<>();
|
|
|
|
+ Form formContent = new Form();
|
|
formContent.setKey("回复内容:\n");
|
|
formContent.setKey("回复内容:\n");
|
|
|
|
|
|
int index = reportCommentCreateReqVO.getCommentContent().indexOf(":");
|
|
int index = reportCommentCreateReqVO.getCommentContent().indexOf(":");
|