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

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.DatePicker?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<VBox prefHeight="400.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.ecep.contract.manager.cloud.u8.YongYouU8ConfigWindowController">
<children>
<Label text="用友U8配置" />
<GridPane>
<columnConstraints>
<ColumnConstraints halignment="RIGHT" hgrow="SOMETIMES" minWidth="50.0" prefWidth="250.0" />
<ColumnConstraints fillWidth="false" halignment="RIGHT" hgrow="NEVER" maxWidth="5.0" minWidth="5.0" prefWidth="5.0" />
<ColumnConstraints hgrow="ALWAYS" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints fillHeight="false" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints fillHeight="false" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints fillHeight="false" minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<DatePicker fx:id="auto_create_company_after" GridPane.columnIndex="2" />
<Label text="cloud.u8.auto-create-company-after" />
<Label text="cloud.u8.contract.latestDate" GridPane.rowIndex="1" />
<DatePicker fx:id="contract_latest_date" GridPane.columnIndex="2" GridPane.rowIndex="1" />
<Label text="cloud.u8.contract.latestId" GridPane.rowIndex="2" />
<TextField fx:id="contract_latest_id" GridPane.columnIndex="2" GridPane.rowIndex="2" />
<Label text="cloud.u8.sync.elapse" GridPane.rowIndex="3" />
<TextField fx:id="sync_elapse" GridPane.columnIndex="2" GridPane.rowIndex="3" />
</children>
</GridPane>
</children>
</VBox>

View File

@@ -2,7 +2,7 @@
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.VBox?>
<VBox prefHeight="400.0" prefWidth="640.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1"
<VBox prefHeight="400.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.cloud.u8.YongYouU8ManagerWindowController">
<children>
<MenuBar VBox.vgrow="NEVER">
@@ -18,7 +18,7 @@
<MenuItem mnemonicParsing="false" text="Save As…"/>
<MenuItem mnemonicParsing="false" text="Revert"/>
<SeparatorMenuItem mnemonicParsing="false"/>
<MenuItem mnemonicParsing="false" text="Preferences…"/>
<MenuItem mnemonicParsing="false" text="配置…" onAction="#onConfigAction"/>
<SeparatorMenuItem mnemonicParsing="false"/>
<MenuItem mnemonicParsing="false" text="Quit"/>
</items>

View File

@@ -1,192 +1,192 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.image.*?>
<?import javafx.scene.layout.*?>
<?import org.controlsfx.control.TaskProgressView?>
<VBox fx:id="root" prefHeight="468.0" prefWidth="737.0" xmlns="http://javafx.com/javafx/22"
xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.other.controller.HomeWindowController">
<children>
<MenuBar>
<menus>
<Menu text="文件(_F)">
<items>
<MenuItem mnemonicParsing="false" text="Action 1"/>
<MenuItem mnemonicParsing="false" onAction="#openConfigWindow" text="选项…"/>
<Menu text="数据源">
<MenuItem mnemonicParsing="false" onAction="#openGroupRKResourceWindow" text="集团相关方…"/>
<MenuItem mnemonicParsing="false" onAction="#openTycResourceWindow" text="天眼查…"/>
<MenuItem mnemonicParsing="false" onAction="#openYongYouResourceWindow" text="用友U8…"/>
</Menu>
<children>
<MenuBar>
<menus>
<Menu text="文件(_F)">
<items>
<MenuItem mnemonicParsing="false" text="Action 1"/>
<MenuItem mnemonicParsing="false" onAction="#openConfigWindow" text="选项…"/>
<Menu text="数据源">
<MenuItem mnemonicParsing="false" onAction="#openGroupRKResourceWindow" text="集团相关方…"/>
<MenuItem mnemonicParsing="false" onAction="#openTycResourceWindow" text="天眼查…"/>
</Menu>
</items>
</Menu>
<Menu mnemonicParsing="false" text="公司">
<items>
</items>
</Menu>
<Menu mnemonicParsing="false" text="公司">
<items>
</items>
</Menu>
<Menu mnemonicParsing="false" text="用友U8">
<items>
<MenuItem mnemonicParsing="false" onAction="#createNewU8ContractSyncTaskAction"
text="同步合同"/>
</items>
</Menu>
<Menu text="设置(_S)">
<items>
<MenuItem onAction="#onShowEmployeeManagerWindowAction" text="员工管理(_E)"/>
<MenuItem onAction="#onShowDepartmentManagerWindowAction" text="部门管理(_D)"/>
<MenuItem onAction="#onShowRolesManagerWindowAction" text="角色管理(_R)"/>
<MenuItem onAction="#onShowFunctionManagerWindowAction" text="功能管理(_R)"/>
<SeparatorMenuItem mnemonicParsing="false"/>
<MenuItem onAction="#onShowBankManagerWindowAction" text="银行管理(_B)"/>
<SeparatorMenuItem mnemonicParsing="false"/>
<MenuItem onAction="#onShowTaskMonitorWindowAction" text="任务监控(_M)"/>
<SeparatorMenuItem mnemonicParsing="false"/>
<MenuItem onAction="#onShowInventoryManagerWindowAction" text="存货管理(_I)"/>
</items>
</Menu>
<Menu text="帮助(_H)">
<items>
<MenuItem mnemonicParsing="false" onAction="#openInBrowse" text="国家企业信用信息公示系统"
userData="https://www.gsxt.gov.cn/"/>
<MenuItem mnemonicParsing="false" onAction="#openInBrowse" text="天眼查-商业查询平台"
userData="https://www.tianyancha.com/"/>
<MenuItem mnemonicParsing="false" text="关于"/>
</items>
</Menu>
</menus>
</MenuBar>
<ToolBar prefHeight="40.0" prefWidth="200.0">
<items>
<Button fx:id="openCompanyManagerWindow" mnemonicParsing="false" style="-fx-padding: 6px;"
userData="com.ecep.contract.manager.ds.company.controller.CompanyManagerWindowController">
<graphic>
<VBox alignment="CENTER">
<children>
<ImageView fitHeight="46.0" fitWidth="64.0">
<viewport>
<Rectangle2D height="46.0" width="64.0"/>
</viewport>
<image>
<Image url="@img/f4.png"/>
</image>
</ImageView>
<Label text="公司">
<VBox.margin>
<Insets top="5.0"/>
</VBox.margin>
</Label>
</children>
</VBox>
</graphic>
</Button>
<Button fx:id="openProjectManagerWindow" mnemonicParsing="false" style="-fx-padding: 6px;">
<graphic>
<VBox alignment="CENTER">
<children>
<ImageView fitHeight="46.0" fitWidth="64.0">
<Image url="@img/f0.png"/>
<viewport>
<Rectangle2D height="46.0" width="64.0"/>
</viewport>
</ImageView>
<Label text="项目">
<VBox.margin>
<Insets top="5.0"/>
</VBox.margin>
</Label>
</children>
</VBox>
</graphic>
</Button>
<Button fx:id="openContractManagerWindow" mnemonicParsing="false" style="-fx-padding: 6px;">
<graphic>
<VBox alignment="CENTER">
<children>
<ImageView fitHeight="46.0" fitWidth="64.0">
<Image url="@img/f1.png"/>
<viewport>
<Rectangle2D height="46.0" width="64.0"/>
</viewport>
</ImageView>
<Label text="合同">
<VBox.margin>
<Insets top="5.0"/>
</VBox.margin>
</Label>
</children>
</VBox>
</graphic>
</Button>
<Button fx:id="openVendorManagerWindow" mnemonicParsing="false" style="-fx-padding: 6px;">
<graphic>
<VBox alignment="CENTER">
<children>
<ImageView fitHeight="46.0" fitWidth="64.0">
<Image url="@img/f2.png"/>
<viewport>
<Rectangle2D height="46.0" width="64.0"/>
</viewport>
</ImageView>
<Label text="供应商">
<VBox.margin>
<Insets top="5.0"/>
</VBox.margin>
</Label>
</children>
</VBox>
</graphic>
</Button>
<!-- 客户 -->
<Button fx:id="openCustomManagerWindow" layoutX="138.0" layoutY="10.0" mnemonicParsing="false"
style="-fx-padding: 6px;">
<graphic>
<VBox alignment="CENTER">
<children>
<ImageView fitHeight="46.0" fitWidth="64.0">
<Image url="@img/f3.png"/>
<viewport>
<Rectangle2D height="46.0" width="64.0"/>
</viewport>
</ImageView>
<Label text="客户">
<VBox.margin>
<Insets top="5.0"/>
</VBox.margin>
</Label>
</children>
</VBox>
</graphic>
</Button>
</items>
<opaqueInsets>
<Insets/>
</opaqueInsets>
<padding>
<Insets bottom="6.0" left="6.0" right="6.0" top="6.0"/>
</padding>
</ToolBar>
<AnchorPane prefHeight="248.0" prefWidth="2239.0" VBox.vgrow="ALWAYS"/>
<TaskProgressView fx:id="taskProgressView"/>
<HBox fx:id="statusBar" spacing="5.0">
<children>
<Label fx:id="leftStatusLabel" text="Label" wrapText="true"/>
<Pane prefHeight="12.0" prefWidth="12.0" HBox.hgrow="ALWAYS"/>
<Label fx:id="rightStatusLabel" layoutX="10.0" layoutY="10.0" text="-" wrapText="true"
HBox.hgrow="SOMETIMES">
<HBox.margin>
<Insets left="6.0"/>
</HBox.margin>
</Menu>
<Menu mnemonicParsing="false" text="用友U8">
<items>
<MenuItem mnemonicParsing="false" onAction="#createNewU8ContractSyncTaskAction"
text="同步合同"/>
<MenuItem mnemonicParsing="false" onAction="#openYongYouResourceWindow" text="用友U8…"/>
</items>
</Menu>
<Menu text="设置(_S)">
<items>
<MenuItem onAction="#onShowEmployeeManagerWindowAction" text="员工管理(_E)"/>
<MenuItem onAction="#onShowDepartmentManagerWindowAction" text="部门管理(_D)"/>
<MenuItem onAction="#onShowRolesManagerWindowAction" text="角色管理(_R)"/>
<MenuItem onAction="#onShowFunctionManagerWindowAction" text="功能管理(_R)"/>
<SeparatorMenuItem mnemonicParsing="false"/>
<MenuItem onAction="#onShowBankManagerWindowAction" text="银行管理(_B)"/>
<SeparatorMenuItem mnemonicParsing="false"/>
<MenuItem onAction="#onShowTaskMonitorWindowAction" text="任务监控(_M)"/>
<SeparatorMenuItem mnemonicParsing="false"/>
<MenuItem onAction="#onShowInventoryManagerWindowAction" text="存货管理(_I)"/>
</items>
</Menu>
<Menu text="帮助(_H)">
<items>
<MenuItem mnemonicParsing="false" onAction="#openInBrowse" text="国家企业信用信息公示系统"
userData="https://www.gsxt.gov.cn/"/>
<MenuItem mnemonicParsing="false" onAction="#openInBrowse" text="天眼查-商业查询平台"
userData="https://www.tianyancha.com/"/>
<MenuItem mnemonicParsing="false" text="关于"/>
</items>
</Menu>
</menus>
</MenuBar>
<ToolBar prefHeight="40.0" prefWidth="200.0">
<items>
<Button fx:id="openCompanyManagerWindow" mnemonicParsing="false" style="-fx-padding: 6px;"
userData="com.ecep.contract.manager.ds.company.controller.CompanyManagerWindowController">
<graphic>
<VBox alignment="CENTER">
<children>
<ImageView fitHeight="46.0" fitWidth="64.0">
<viewport>
<Rectangle2D height="46.0" width="64.0"/>
</viewport>
<image>
<Image url="@img/f4.png"/>
</image>
</ImageView>
<Label text="公司">
<VBox.margin>
<Insets top="5.0"/>
</VBox.margin>
</Label>
<Label fx:id="taskMonitorLabel" text="任务监控"></Label>
<Label fx:id="employeeStatusLabel" layoutX="711.0" layoutY="10.0" text="管理员" wrapText="true"
HBox.hgrow="SOMETIMES">
<HBox.margin>
<Insets left="6.0"/>
</HBox.margin>
</children>
</VBox>
</graphic>
</Button>
<Button fx:id="openProjectManagerWindow" mnemonicParsing="false" style="-fx-padding: 6px;">
<graphic>
<VBox alignment="CENTER">
<children>
<ImageView fitHeight="46.0" fitWidth="64.0">
<Image url="@img/f0.png"/>
<viewport>
<Rectangle2D height="46.0" width="64.0"/>
</viewport>
</ImageView>
<Label text="项目">
<VBox.margin>
<Insets top="5.0"/>
</VBox.margin>
</Label>
</children>
</HBox>
</children>
</children>
</VBox>
</graphic>
</Button>
<Button fx:id="openContractManagerWindow" mnemonicParsing="false" style="-fx-padding: 6px;">
<graphic>
<VBox alignment="CENTER">
<children>
<ImageView fitHeight="46.0" fitWidth="64.0">
<Image url="@img/f1.png"/>
<viewport>
<Rectangle2D height="46.0" width="64.0"/>
</viewport>
</ImageView>
<Label text="合同">
<VBox.margin>
<Insets top="5.0"/>
</VBox.margin>
</Label>
</children>
</VBox>
</graphic>
</Button>
<Button fx:id="openVendorManagerWindow" mnemonicParsing="false" style="-fx-padding: 6px;">
<graphic>
<VBox alignment="CENTER">
<children>
<ImageView fitHeight="46.0" fitWidth="64.0">
<Image url="@img/f2.png"/>
<viewport>
<Rectangle2D height="46.0" width="64.0"/>
</viewport>
</ImageView>
<Label text="供应商">
<VBox.margin>
<Insets top="5.0"/>
</VBox.margin>
</Label>
</children>
</VBox>
</graphic>
</Button>
<!-- 客户 -->
<Button fx:id="openCustomManagerWindow" layoutX="138.0" layoutY="10.0" mnemonicParsing="false"
style="-fx-padding: 6px;">
<graphic>
<VBox alignment="CENTER">
<children>
<ImageView fitHeight="46.0" fitWidth="64.0">
<Image url="@img/f3.png"/>
<viewport>
<Rectangle2D height="46.0" width="64.0"/>
</viewport>
</ImageView>
<Label text="客户">
<VBox.margin>
<Insets top="5.0"/>
</VBox.margin>
</Label>
</children>
</VBox>
</graphic>
</Button>
</items>
<opaqueInsets>
<Insets/>
</opaqueInsets>
<padding>
<Insets bottom="6.0" left="6.0" right="6.0" top="6.0"/>
</padding>
</ToolBar>
<AnchorPane prefHeight="248.0" prefWidth="2239.0" VBox.vgrow="ALWAYS"/>
<TaskProgressView fx:id="taskProgressView"/>
<HBox fx:id="statusBar" spacing="5.0">
<children>
<Label fx:id="leftStatusLabel" text="Label" wrapText="true"/>
<Pane prefHeight="12.0" prefWidth="12.0" HBox.hgrow="ALWAYS"/>
<Label fx:id="rightStatusLabel" layoutX="10.0" layoutY="10.0" text="-" wrapText="true"
HBox.hgrow="SOMETIMES">
<HBox.margin>
<Insets left="6.0"/>
</HBox.margin>
</Label>
<Label fx:id="taskMonitorLabel" text="任务监控"/>
<Label fx:id="employeeStatusLabel" layoutX="711.0" layoutY="10.0" text="管理员" wrapText="true"
HBox.hgrow="SOMETIMES">
<HBox.margin>
<Insets left="6.0"/>
</HBox.margin>
</Label>
</children>
</HBox>
</children>
</VBox>