refactor: 重构供应商文件类型枚举及相关服务
feat: 为多个服务添加缓存支持 fix: 修复WebSocket任务管理和远程调用异常处理 refactor: 重命名CompanyVendorFileType为VendorFileType refactor: 优化项目成本导入任务实现 fix: 修复ContractTabSkinBase中的空指针问题 refactor: 统一WebSocket客户端任务调用接口
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package com.ecep.contract;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public interface WebSocketClientTasker {
|
||||
@@ -10,4 +13,17 @@ public interface WebSocketClientTasker {
|
||||
void updateTitle(String title);
|
||||
|
||||
void updateProgress(long current, long total);
|
||||
|
||||
default Object callRemoteTask(MessageHolder holder, Locale locale, Object... args) {
|
||||
WebSocketClientService webSocketService = SpringApp.getBean(WebSocketClientService.class);
|
||||
webSocketService.withSession(session -> {
|
||||
try {
|
||||
session.submitTask(this, locale, args);
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
});
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user