feat(u8): 添加用友U8配置窗口和数据迁移功能

新增用友U8配置窗口,支持日期和文本配置项的编辑与保存。实现从CloudInfo到CloudYu的数据迁移任务,优化任务执行方式。重构多个同步任务类继承Tasker基类,统一任务处理逻辑。扩展YongYouU8Service功能,添加配置相关接口。调整UI布局和菜单项,增加配置入口。

refactor: 重命名CompanyTableCell为EmployeeRoleTableCell

style: 清理无用导入和格式化代码

fix: 修复ContractTypeSyncTask中分类和方向字段设置错误
This commit is contained in:
2025-08-25 18:57:17 +08:00
parent 17e326b35c
commit 6711657663
24 changed files with 821 additions and 498 deletions

View File

@@ -1,14 +1,16 @@
package com.ecep.contract.manager.util;
import com.ecep.contract.manager.AppV2;
import com.ecep.contract.manager.SpringApp;
import javafx.application.Platform;
import javafx.fxml.FXMLLoader;
import java.io.IOException;
import java.net.URL;
import java.util.concurrent.CompletableFuture;
import com.ecep.contract.manager.AppV2;
import com.ecep.contract.manager.Desktop;
import com.ecep.contract.manager.SpringApp;
import javafx.application.Platform;
import javafx.fxml.FXMLLoader;
public class FxmlUtils {
public static FXMLLoader newLoader(String path) {
@@ -22,8 +24,8 @@ public class FxmlUtils {
return loader;
}
public static CompletableFuture<FXMLLoader> newLoaderAsync(String path, java.util.function.Consumer<FXMLLoader> consumer) {
public static CompletableFuture<FXMLLoader> newLoaderAsync(String path,
java.util.function.Consumer<FXMLLoader> consumer) {
return CompletableFuture.supplyAsync(() -> {
FXMLLoader loader = newLoader(path);
try {
@@ -43,16 +45,15 @@ public class FxmlUtils {
/**
* 异步载入显示界面
*
* @param path fxml文件路径类地址 / 开头 根路径
* @param path fxml文件路径类地址 / 开头 根路径
* @param initializeLoader fxml 文件加载完毕后,回调函数
* @param runLater 在JavaFx线程中执行的回调函数
* @param runLater 在JavaFx线程中执行的回调函数
* @return CompletableFuture
*/
public static CompletableFuture<Void> newLoaderAsyncWithRunLater(
String path,
java.util.function.Consumer<FXMLLoader> initializeLoader,
java.util.function.Consumer<FXMLLoader> runLater
) {
java.util.function.Consumer<FXMLLoader> runLater) {
CompletableFuture<Void> future = new CompletableFuture<>();
CompletableFuture.runAsync(() -> {
try {
@@ -72,7 +73,7 @@ public class FxmlUtils {
} catch (IOException e) {
future.completeExceptionally(new RuntimeException("Unable open " + path, e));
}
}).whenComplete((v, ex) -> {
}, Desktop.instance.getExecutorService()).whenComplete((v, ex) -> {
if (ex != null) {
future.completeExceptionally(ex);
}