修改待办实现发送
This commit is contained in:
parent
0124793b11
commit
dd39148874
@ -270,32 +270,31 @@ public class DingtalkBusiness {
|
|||||||
|
|
||||||
|
|
||||||
public String sendWorkMSGWithAsyn(StaffSimpleInfo fromStaff, List<StaffSimpleInfo> toStaffids, int type) {
|
public String sendWorkMSGWithAsyn(StaffSimpleInfo fromStaff, List<StaffSimpleInfo> toStaffids, int type) {
|
||||||
if(toStaffids != null && toStaffids.size() > 0){
|
|
||||||
if (toStaffids.get(0).getEmployeeId() == null || toStaffids.get(0).getEmployeeId().length() == 0) {
|
if (toStaffids != null && toStaffids.size() > 0 && (toStaffids.get(0).getEmployeeId() == null || toStaffids.get(0).getEmployeeId().length() == 0)) {
|
||||||
//查询第三方id
|
//查询第三方id
|
||||||
List<Long> ids = toStaffids.stream().map(new Function<StaffSimpleInfo, Long>() {
|
List<Long> ids = toStaffids.stream().map(new Function<StaffSimpleInfo, Long>() {
|
||||||
@Override
|
@Override
|
||||||
public Long apply(StaffSimpleInfo staffSimpleInfo) {
|
public Long apply(StaffSimpleInfo staffSimpleInfo) {
|
||||||
return staffSimpleInfo.getId();
|
return staffSimpleInfo.getId();
|
||||||
}
|
|
||||||
}).collect(Collectors.toList());
|
|
||||||
List<StaffSimpleInfo> staffSimpleInfos = staffService.selectStaffSimpleInfos(ids);
|
|
||||||
Map<Long, StaffSimpleInfo> map = toStaffids.stream().collect(Collectors.toMap(StaffSimpleInfo::getId, e -> e));
|
|
||||||
for (StaffSimpleInfo staff : staffSimpleInfos
|
|
||||||
) {
|
|
||||||
StaffSimpleInfo staff1 = map.get(staff.getId());
|
|
||||||
staff1.setEmployeeId(staff1.getEmployeeId());
|
|
||||||
}
|
}
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
List<StaffSimpleInfo> staffSimpleInfos = staffService.selectStaffSimpleInfos(ids);
|
||||||
|
Map<Long, StaffSimpleInfo> map = toStaffids.stream().collect(Collectors.toMap(StaffSimpleInfo::getId, e -> e));
|
||||||
|
for (StaffSimpleInfo staff : staffSimpleInfos
|
||||||
|
) {
|
||||||
|
StaffSimpleInfo staff1 = map.get(staff.getId());
|
||||||
|
staff1.setEmployeeId(staff1.getEmployeeId());
|
||||||
}
|
}
|
||||||
WorkMsgTypeEnum workMsgTypeEnum = WorkMsgTypeEnum.findRoleTypeByCode(type);
|
|
||||||
|
|
||||||
ThreadSendMessage threadSendMessage = new ThreadSendMessage(fromStaff, toStaffids, workMsgTypeEnum, appid);
|
|
||||||
Thread thread = new Thread(threadSendMessage);
|
|
||||||
thread.start();
|
|
||||||
|
|
||||||
return "OK";
|
|
||||||
}
|
}
|
||||||
return "error";
|
WorkMsgTypeEnum workMsgTypeEnum = WorkMsgTypeEnum.findRoleTypeByCode(type);
|
||||||
|
|
||||||
|
ThreadSendMessage threadSendMessage = new ThreadSendMessage(fromStaff, toStaffids, workMsgTypeEnum, appid);
|
||||||
|
Thread thread = new Thread(threadSendMessage);
|
||||||
|
thread.start();
|
||||||
|
|
||||||
|
return "OK";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user