Merge branch 'version_performance_2.0' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management into version_performance_2.0

This commit is contained in:
杜建超 2020-12-10 11:01:13 +08:00
commit c053fcb25d
3 changed files with 39 additions and 1 deletions

View File

@ -25,6 +25,7 @@ public enum WorkMsgTypeEnum {
TRANSFER(11, "绩效转交", "转交", "# @的绩效\n ## 己经转交"),
CLEARN(12, "绩效转交", "转交", "# @的绩效\n ## 己经转交"),
TASK_COMMENT(13, "任务评论", "去查看", "# 任务评论\n ## @1评论了你的@2的任务"),
TASK_UPDATE(14, "任务更新", "去更新", "# 任务更新\n ## 记得每天来更新任务哦"),
// 您的2020年10月绩效考核已经开始请尽快制定绩效目标
// 吴林的2020年12月绩效考核的目标需要您确认点击前往确认
;

View File

@ -661,6 +661,43 @@ public class DingtalkBusiness {
}
public String sendTaskInputMsg(List<StaffEntity> staffs){
int m = 0;
String userIds = "";
ThirdAppConfig thirdAppConfig = thirdAppConfigService.getByAppId(appid);
String token = dingTalkUtil.getAccessTokenWitchEntity(thirdAppConfig);
if(token != null && token.length() > 0){
String url = homeUrl;
if(url.contains("?")){
url += "&halokit=" + System.currentTimeMillis();
}else{
url += "?halokit=" + System.currentTimeMillis();
}
url = URLEncoder.encode(url);
url = "dingtalk://dingtalkclient/action/openapp?corpid=" + thirdAppConfig.getCorpId() +
"&container_type=work_platform&app_id=0_" +
appid + "&redirect_type=jump&redirect_url=" + url;
for (StaffEntity staff:staffs
) {
if(m < 100){
userIds += (staff.getEmployeeId() + ",");
}else{
//发送消息
StaffEntity info = new StaffEntity();
info.setId(0L);
info.setEmployeeId(userIds);
dingTalkUtil.sendSingleActionCardMSG(appid, info, WorkMsgTypeEnum.TASK_UPDATE.getTitle(),
WorkMsgTypeEnum.TASK_UPDATE.getContent(), WorkMsgTypeEnum.TASK_UPDATE.getBtnText(), url, token);
m = 0;
userIds = staff.getEmployeeId() + ",";
}
m++;
}
}
return "OK";
}

View File

@ -111,7 +111,7 @@
select gmt_create,remark,label,type from lz_task_process_record where is_delete = 0
and
task_id in
<foreach collection="taskIds" item="taskId"separator="," open="(" close=")">
<foreach collection="taskIds" item="taskId" separator="," open="(" close=")">
#{taskId}
</foreach>
order by gmt_create desc