Merge branch 'master' into docker_package
This commit is contained in:
commit
de73c653b0
|
@ -209,8 +209,6 @@ public class ActTaskService extends BaseServiceImpl {
|
||||||
for (Task task : list) {
|
for (Task task : list) {
|
||||||
TaskDTO dto = new TaskDTO();
|
TaskDTO dto = new TaskDTO();
|
||||||
this.convertTaskInfo(task, dto);
|
this.convertTaskInfo(task, dto);
|
||||||
//Optional<SysUserEntity> sysUserEntity = Optional.ofNullable(sysUserService.selectById(dto.getUserId()));
|
|
||||||
//dto.setUserName(sysUserEntity.get().getRealName());
|
|
||||||
Map<String, Object> processVariable = new LinkedHashMap<>();
|
Map<String, Object> processVariable = new LinkedHashMap<>();
|
||||||
|
|
||||||
if (dto.getBusinessKey().startsWith("{") || dto.getBusinessKey().startsWith("[")) { // 为json内容 (特殊处理批量)
|
if (dto.getBusinessKey().startsWith("{") || dto.getBusinessKey().startsWith("[")) { // 为json内容 (特殊处理批量)
|
||||||
|
|
|
@ -31,6 +31,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
|
|
||||||
|
@ -141,16 +142,14 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
|
||||||
|
|
||||||
//全部用户
|
//全部用户
|
||||||
if (notice.getReceiverType() == ReceiverTypeEnum.ALL.value()) {
|
if (notice.getReceiverType() == ReceiverTypeEnum.ALL.value()) {
|
||||||
executor.execute(() -> {
|
CompletableFuture.runAsync(() -> {
|
||||||
//发送给全部用户
|
//发送给全部用户
|
||||||
sendAllUser(notice);
|
sendAllUser(notice);
|
||||||
});
|
}, executor).thenRunAsync(() -> {
|
||||||
|
|
||||||
executor.execute(() -> {
|
|
||||||
//通过WebSocket,提示全部用户,有新通知
|
//通过WebSocket,提示全部用户,有新通知
|
||||||
MessageData<String> message = new MessageData<String>().msg(notice.getTitle());
|
MessageData<String> message = new MessageData<String>().msg(notice.getTitle());
|
||||||
webSocketServer.sendMessageAll(message);
|
webSocketServer.sendMessageAll(message);
|
||||||
});
|
}, executor);
|
||||||
|
|
||||||
} else { //选中用户
|
} else { //选中用户
|
||||||
List<Long> userIdList = new ArrayList<>();
|
List<Long> userIdList = new ArrayList<>();
|
||||||
|
@ -167,16 +166,13 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Long> finalUserIdList = userIdList;
|
List<Long> finalUserIdList = userIdList;
|
||||||
executor.execute(() -> {
|
CompletableFuture.runAsync(() -> {
|
||||||
//发送给选中用户
|
|
||||||
sendUser(notice, finalUserIdList);
|
sendUser(notice, finalUserIdList);
|
||||||
});
|
}, executor).thenRunAsync(() -> {
|
||||||
|
|
||||||
executor.execute(() -> {
|
|
||||||
//通过WebSocket,提示选中用户,有新通知
|
//通过WebSocket,提示选中用户,有新通知
|
||||||
MessageData<String> message = new MessageData<String>().msg(notice.getTitle());
|
MessageData<String> message = new MessageData<String>().msg(notice.getTitle());
|
||||||
webSocketServer.sendMessage(finalUserIdList, message);
|
webSocketServer.sendMessage(finalUserIdList, message);
|
||||||
});
|
}, executor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -791,6 +791,7 @@
|
||||||
WHERE 1 = 1
|
WHERE 1 = 1
|
||||||
AND del_flag = 0
|
AND del_flag = 0
|
||||||
AND dept_id = #{deptId}
|
AND dept_id = #{deptId}
|
||||||
|
LIMIT 30
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectDeptCountList" resultType="java.util.Map">
|
<select id="selectDeptCountList" resultType="java.util.Map">
|
||||||
|
@ -857,6 +858,7 @@
|
||||||
AND su.id = taa.user_id
|
AND su.id = taa.user_id
|
||||||
AND taa.resource_id = tdr.id
|
AND taa.resource_id = tdr.id
|
||||||
AND su.dept_id = #{deptId}
|
AND su.dept_id = #{deptId}
|
||||||
|
LIMIT 30
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectApplyDeptCountList" resultType="java.util.Map">
|
<select id="selectApplyDeptCountList" resultType="java.util.Map">
|
||||||
|
|
Loading…
Reference in New Issue