Commit 8afba924 authored by 赵啸非's avatar 赵啸非

修改考勤汇总

parent 05dc1d22
......@@ -33,7 +33,7 @@ public class MessageServiceImpl implements MessageService {
msg.setMsgtype("link");
Link link = new Link();
//link.setMessageUrl(webUrl + dingMsg.getPath());
link.setMessageUrl(webUrl );
link.setMessageUrl(webUrl + dingMsg.getPath());
if (SubAddTypeEnum.增加.getValue() == dingMsg.getSubAddType()) {
link.setText(String.format("你好,经人工核实后你在%%-%s" +
......
......@@ -134,7 +134,8 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
checkDingMsg.setPerformTypeStr(PerformTypeEnum.评价投诉绩效.getDesc());
checkDingMsg.setScore(entity.getScore().toString());
checkDingMsg.setSubAddType(entity.getSubAddType());
checkDingMsg.setPath(String.format("#/api/v1/perform/info?id=%s&&performType=complain", entity.getId()));
//#/appealinfo?id=1&performType=effect&subAddType=2&appealStatus=1
checkDingMsg.setPath(String.format("#/appealinfo?id=%s&&performType=%s&subAddType=%s", entity.getId(),PerformTypeEnum.考勤绩效.getValue(),entity.getSubAddType()));
messageService.sendDingTalkWorkMsg(checkDingMsg);
} else {
log.error("根据手机号码获取人员错误,msg:{}", personRest.getMsg());
......
......@@ -133,7 +133,10 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
checkDingMsg.setPerformTypeStr(PerformTypeEnum.评价投诉绩效.getDesc());
checkDingMsg.setScore(entity.getScore().toString());
checkDingMsg.setSubAddType(entity.getSubAddType());
checkDingMsg.setPath(String.format("/api/v1/perform/info?id=%s&&performType=complain", entity.getId()));
checkDingMsg.setPath(String.format("#/appealinfo?id=%s&&performType=%s&subAddType=%s", entity.getId(),PerformTypeEnum.评价投诉绩效.getValue(),entity.getSubAddType()));
//checkDingMsg.setPath(String.format("/api/v1/perform/info?id=%s&&performType=complain", entity.getId()));
Rest<String> msgRest = messageService.sendDingTalkWorkMsg(checkDingMsg);
} else {
log.error("根据手机号码获取人员错误,msg:{}", personRest.getMsg());
......
......@@ -133,7 +133,9 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
checkDingMsg.setPerformTypeStr(PerformTypeEnum.办件绩效.getDesc());
checkDingMsg.setScore(entity.getScore().toString());
checkDingMsg.setSubAddType(entity.getSubAddType());
checkDingMsg.setPath(String.format("/api/v1/perform/info?id=%s&&performType=effect", entity.getId()));
// checkDingMsg.setPath(String.format("/api/v1/perform/info?id=%s&&performType=effect", entity.getId()));
checkDingMsg.setPath(String.format("#/appealinfo?id=%s&&performType=%s&subAddType=%s", entity.getId(),PerformTypeEnum.效能绩效.getValue(),entity.getSubAddType()));
// checkDingMsg.setPath(String.format("/api/v1/perform/info?id=%s&&performType=effect", entity.getId()));
Rest<String> msgRest = messageService.sendDingTalkWorkMsg(checkDingMsg);
} else {
log.error("根据手机号码获取人员错误,msg:{}", personRest.getMsg());
......
......@@ -132,7 +132,9 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
checkDingMsg.setPerformTypeStr(PerformTypeEnum.办件绩效.getDesc());
checkDingMsg.setScore(entity.getScore().toString());
checkDingMsg.setSubAddType(entity.getSubAddType());
checkDingMsg.setPath(String.format("/api/v1/perform/info?id=%s&&performType=gowork", entity.getId()));
checkDingMsg.setPath(String.format("#/appealinfo?id=%s&&performType=%s&subAddType=%s", entity.getId(),PerformTypeEnum.办件绩效.getValue(),entity.getSubAddType()));
// checkDingMsg.setPath(String.format("/api/v1/perform/info?id=%s&&performType=gowork", entity.getId()));
Rest<String> msgRest = messageService.sendDingTalkWorkMsg(checkDingMsg);
} else {
log.error("根据手机号码获取人员错误,msg:{}", personRest.getMsg());
......
......@@ -135,7 +135,9 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
checkDingMsg.setPerformTypeStr(PerformTypeEnum.评价差评绩效.getDesc());
checkDingMsg.setScore(entity.getScore().toString());
checkDingMsg.setSubAddType(entity.getSubAddType());
checkDingMsg.setPath(String.format("/api/v1/perform/info?id=%s&&performType=other", entity.getId()));
checkDingMsg.setPath(String.format("#/appealinfo?id=%s&&performType=%s&subAddType=%s", entity.getId(),PerformTypeEnum.其它绩效.getValue(),entity.getSubAddType()));
// checkDingMsg.setPath(String.format("/api/v1/perform/info?id=%s&&performType=other", entity.getId()));
Rest<String> msgRest = messageService.sendDingTalkWorkMsg(checkDingMsg);
} else {
log.error("根据手机号码获取人员错误,msg:{}", personRest.getMsg());
......
......@@ -137,7 +137,8 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
checkDingMsg.setPerformTypeStr(PerformTypeEnum.评价差评绩效.getDesc());
checkDingMsg.setScore(entity.getScore().toString());
checkDingMsg.setSubAddType(entity.getSubAddType());
checkDingMsg.setPath(String.format("/api/v1/perform/info?id=%s&&performType=review", entity.getId()));
checkDingMsg.setPath(String.format("#/appealinfo?id=%s&&performType=%s&subAddType=%s", entity.getId(),PerformTypeEnum.评价差评绩效.getValue(),entity.getSubAddType()));
// checkDingMsg.setPath(String.format("/api/v1/perform/info?id=%s&&performType=review", entity.getId()));
Rest<String> msgRest = messageService.sendDingTalkWorkMsg(checkDingMsg);
} else {
log.error("根据手机号码获取人员错误,msg:{}", personRest.getMsg());
......
......@@ -36,7 +36,7 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
OapiV2UserGetbymobileResponse rsp = client.execute(req, getToken());
log.info("OapiV2UserGetbymobileResponse:{}", rsp.getBody());
if (rsp.getErrcode() == 0) {
return Rest.ok("成功",rsp.getResult().getUserid());
return Rest.ok("成功", rsp.getResult().getUserid());
} else {
return Rest.fail(String.format("code:%s,msg:%s", rsp.getErrcode(), rsp.getErrmsg()));
}
......@@ -56,7 +56,7 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
OapiV2UserGetuserinfoResponse rsp = client.execute(req, getToken());
log.info("OapiV2UserGetuserinfoResponse:{}", rsp.getBody());
if (rsp.getErrcode() == 0) {
return Rest.ok("成功",rsp.getResult().getUserid());
return Rest.ok("成功", rsp.getResult().getUserid());
} else {
return Rest.fail(String.format("code:%s,msg:%s", rsp.getErrcode(), rsp.getErrmsg()));
}
......@@ -75,24 +75,26 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
req.setAgentId(agentId);
req.setUseridList(workMsgReq.getUseridList());
//.setMsg(JSON.toJSONString(workMsgReq.getMsg()));
log.info("workMsgReq:{}",JSON.toJSONString(workMsgReq));
log.info("workMsgReq:{}", JSON.toJSONString(workMsgReq));
OapiMessageCorpconversationAsyncsendV2Request.Msg msg = new OapiMessageCorpconversationAsyncsendV2Request.Msg();
OapiMessageCorpconversationAsyncsendV2Request.Link link = new OapiMessageCorpconversationAsyncsendV2Request.Link();
if(!ObjectUtils.isEmpty(workMsgReq.getMsg())&&!ObjectUtils.isEmpty(workMsgReq.getMsg().getLink())){
if ("link".equals(workMsgReq.getMsg().getMsgtype())) {
OapiMessageCorpconversationAsyncsendV2Request.Link link = new OapiMessageCorpconversationAsyncsendV2Request.Link();
link.setMessageUrl(workMsgReq.getMsg().getLink().getMessageUrl());
link.setText(workMsgReq.getMsg().getLink().getText());
link.setTitle(workMsgReq.getMsg().getLink().getTitle());
}
link.setPicUrl("@lADOADmaWMzazQKA");
msg.setLink(link);
msg.setMsgtype("link");
link.setPicUrl("@lADOADmaWMzazQKA");
msg.setLink(link);
msg.setMsgtype("link");
} else if ("text".equals(workMsgReq.getMsg().getMsgtype())) {
OapiMessageCorpconversationAsyncsendV2Request.Text text = new OapiMessageCorpconversationAsyncsendV2Request.Text();
text.setContent(workMsgReq.getMsg().getText().getContent());
msg.setMsgtype("text");
msg.setText(text);
}
req.setMsg(msg);
// workMsgReq.getMsg().getLink().setPicUrl("@lADOADmaWMzazQKA");
// workMsgReq.getMsg().getLink().setPicUrl("@lADOADmaWMzazQKA");
log.info("sendWorkMsg:{}", JSON.toJSONString(req));
OapiMessageCorpconversationAsyncsendV2Response rsp = client.execute(req, getToken());
log.info("OapiMessageResponse:{}", rsp.getBody());
......@@ -109,6 +111,7 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
/**
* 使用 Token 初始化账号Client
*
* @return Client
* @throws Exception
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment