feat: 实现SMB文件服务并优化合同文件管理
- 新增SmbFileService服务类,支持SMB/CIFS协议的文件操作 - 修改合同文件管理逻辑,支持SMB路径检查与目录创建 - 优化BankTableCell实现工厂模式并更新相关文档 - 调整Redis配置并添加连接测试 - 修复合同发票视图模型的时间处理问题 - 更新项目版本至0.0.134-SNAPSHOT
This commit is contained in:
@@ -6,12 +6,12 @@
|
||||
<parent>
|
||||
<groupId>com.ecep.contract</groupId>
|
||||
<artifactId>Contract-Manager</artifactId>
|
||||
<version>0.0.129-SNAPSHOT</version>
|
||||
<version>0.0.134-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.ecep.contract</groupId>
|
||||
<artifactId>client</artifactId>
|
||||
<version>0.0.129-SNAPSHOT</version>
|
||||
<version>0.0.134-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
@@ -22,7 +22,7 @@
|
||||
<dependency>
|
||||
<groupId>com.ecep.contract</groupId>
|
||||
<artifactId>common</artifactId>
|
||||
<version>0.0.129-SNAPSHOT</version>
|
||||
<version>0.0.134-SNAPSHOT</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
@@ -53,7 +53,6 @@ public class WebSocketClientService {
|
||||
@Getter
|
||||
@Setter
|
||||
private long readTimeout = 30000;
|
||||
private String webSocketUrl = "ws://localhost:8080/ws";
|
||||
private boolean isActive = false; // 标记连接是否活跃
|
||||
private ScheduledFuture<?> heartbeatTask; // 心跳任务
|
||||
private ScheduledFuture<?> reconnectFuture; // 修改类型为CompletableFuture<Void>
|
||||
@@ -248,6 +247,8 @@ public class WebSocketClientService {
|
||||
|
||||
try {
|
||||
// 构建WebSocket请求,包含认证信息
|
||||
var myProperties = SpringApp.getBean(MyProperties.class);
|
||||
String webSocketUrl = "ws://" + myProperties.getServerHost() + ":" + myProperties.getServerPort() + "/ws";
|
||||
Request request = new Request.Builder()
|
||||
.url(webSocketUrl)
|
||||
.build();
|
||||
|
||||
@@ -62,8 +62,9 @@ public class CompanyTabSkinBankAccount
|
||||
bankAccountSearchBtn.setOnAction(this::onTableRefreshAction);
|
||||
|
||||
bankAccountTable_idColumn.setCellValueFactory(param -> param.getValue().getId());
|
||||
|
||||
bankAccountTable_bankColumn.setCellValueFactory(param -> param.getValue().getBankId());
|
||||
bankAccountTable_bankColumn.setCellFactory(param -> new BankTableCell<>(getBankService()));
|
||||
bankAccountTable_bankColumn.setCellFactory(BankTableCell.forTableColumn(getBankService()));
|
||||
|
||||
bankAccountTable_openingBankColumn.setCellValueFactory(param -> param.getValue().getOpeningBank());
|
||||
bankAccountTable_accountColumn.setCellValueFactory(param -> param.getValue().getAccount());
|
||||
|
||||
@@ -1,20 +1,39 @@
|
||||
package com.ecep.contract.controller.table.cell;
|
||||
|
||||
import com.ecep.contract.SpringApp;
|
||||
import com.ecep.contract.service.BankService;
|
||||
import com.ecep.contract.vo.BankVo;
|
||||
|
||||
import javafx.util.Callback;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import static com.ecep.contract.SpringApp.getBean;
|
||||
|
||||
/**
|
||||
* 银行单元格
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
public class BankTableCell<T> extends AsyncUpdateTableCell<T, Integer, BankVo> {
|
||||
/**
|
||||
* 创建单元格工厂
|
||||
*
|
||||
* @param bankService 银行服务
|
||||
* @return 单元格工厂
|
||||
*/
|
||||
public static <V> Callback<javafx.scene.control.TableColumn<V, Integer>, javafx.scene.control.TableCell<V, Integer>> forTableColumn(
|
||||
BankService bankService) {
|
||||
return param -> new BankTableCell<V>(bankService);
|
||||
}
|
||||
|
||||
public BankTableCell(BankService service) {
|
||||
setService(service);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BankService getServiceBean() {
|
||||
return SpringApp.getBean(BankService.class);
|
||||
return getBean(BankService.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String format(BankVo entity) {
|
||||
return getService().getStringConverter().toString(entity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.ecep.contract.vm;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ecep.contract.util.NumberUtils;
|
||||
import com.ecep.contract.vo.ContractInvoiceVo;
|
||||
|
||||
import javafx.beans.property.SimpleDoubleProperty;
|
||||
import javafx.beans.property.SimpleIntegerProperty;
|
||||
import javafx.beans.property.SimpleObjectProperty;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
import lombok.Data;
|
||||
@@ -20,6 +22,11 @@ public class ContractInvoiceViewModel extends IdentityViewModel<ContractInvoiceV
|
||||
* 关联的合同对象, Contract
|
||||
*/
|
||||
private final SimpleObjectProperty<Integer> contract = new SimpleObjectProperty<>();
|
||||
/**
|
||||
* 关联的合同项目对象, ContractItem
|
||||
*/
|
||||
private final SimpleObjectProperty<Integer> contractItem = new SimpleObjectProperty<>();
|
||||
|
||||
/**
|
||||
* 关联的发票对象, Invoice
|
||||
*/
|
||||
@@ -46,7 +53,7 @@ public class ContractInvoiceViewModel extends IdentityViewModel<ContractInvoiceV
|
||||
invoice.set(v.getInvoiceId());
|
||||
amount.set(v.getAmount() != null ? v.getAmount() : 0.0);
|
||||
remark.set(v.getRemark());
|
||||
|
||||
createDate.set(v.getSetupDate());
|
||||
updateDate.set(v.getUpdateDate());
|
||||
creator.set(v.getSetupPersonId());
|
||||
updater.set(v.getUpdatePersonId());
|
||||
@@ -85,23 +92,27 @@ public class ContractInvoiceViewModel extends IdentityViewModel<ContractInvoiceV
|
||||
v.setRemark(remark.get());
|
||||
modified = true;
|
||||
}
|
||||
if (!Objects.equals(creator.get(), v.getSetupPersonId())) {
|
||||
v.setSetupPersonId(creator.get());
|
||||
modified = true;
|
||||
}
|
||||
if (!Objects.equals(updater.get(), v.getUpdatePersonId())) {
|
||||
v.setUpdatePersonId(updater.get());
|
||||
modified = true;
|
||||
}
|
||||
|
||||
if (!Objects.equals(createDate.get(), v.getSetupDate())) {
|
||||
v.setSetupDate(createDate.get());
|
||||
modified = true;
|
||||
}
|
||||
|
||||
if (!Objects.equals(updateDate.get(), v.getUpdateDate())) {
|
||||
v.setUpdateDate(updateDate.get());
|
||||
modified = true;
|
||||
}
|
||||
|
||||
if (!Objects.equals(creator.get(), v.getSetupPersonId())) {
|
||||
v.setSetupPersonId(creator.get());
|
||||
modified = true;
|
||||
}
|
||||
|
||||
if (!Objects.equals(updater.get(), v.getUpdatePersonId())) {
|
||||
v.setUpdatePersonId(updater.get());
|
||||
modified = true;
|
||||
}
|
||||
|
||||
return modified;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
# my.downloadsPath = C:\\Users\\SQQ\\Downloads\\
|
||||
@@ -20,7 +20,7 @@
|
||||
<?import javafx.scene.paint.Color?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
||||
<BorderPane fx:id="root" maxHeight="900" maxWidth="1024" minHeight="300" minWidth="200" prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.ecep.contract.ds.company.controller.contact.CompanyContactWindowController">
|
||||
<BorderPane fx:id="root" maxHeight="900" maxWidth="1024" minHeight="300" minWidth="200" prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.ecep.contract.controller.company.CompanyContactWindowController">
|
||||
<center>
|
||||
<TabPane fx:id="tabPane" tabClosingPolicy="UNAVAILABLE" tabMaxWidth="100.0" tabMinWidth="40.0">
|
||||
<tabs>
|
||||
|
||||
Reference in New Issue
Block a user