refactor(client): 重构服务类继承关系并统一使用QueryService

重构所有服务类,使其继承自QueryService接口,统一数据查询逻辑。同时为服务类添加@Service注解,确保Spring容器管理。更新相关FXML文件的控制器路径,从manager.ds调整为controller目录结构。调整pom.xml版本号至0.0.84-SNAPSHOT。新增MessageNotitfication和SimpleMessage消息类,提供基础消息结构支持。
This commit is contained in:
2025-09-11 00:06:22 +08:00
parent 23e1f98ae5
commit 375de610ef
163 changed files with 2085 additions and 578 deletions

View File

@@ -1,12 +1,22 @@
# server 模块
Java 21 Java 21
Spring Boot 3.3.7 Spring Boot 3.3.7
Spring Data JPA 3.3.7 Spring Data JPA 3.3.7
JavaFX 21
ControlsFX 11.1.2
MySQL 8.0.33 MySQL 8.0.33
Lombok 1.18.32 Lombok 1.18.32
POI 5.2.5 POI 5.2.5
PDFBox 3.0.1 PDFBox 3.0.1
Redis
# client 模块
Java 21
JavaFX 21
ControlsFX 11.1.2
Lombok 1.18.32
caffeine 3.1.8
.fxml 界面UI, /client/src/main/resources/ui/ 目录下
websocket 与 server 模块通信
ignore: ignore:
- .idea - .idea

View File

@@ -6,12 +6,12 @@
<parent> <parent>
<groupId>com.ecep.contract</groupId> <groupId>com.ecep.contract</groupId>
<artifactId>Contract-Manager</artifactId> <artifactId>Contract-Manager</artifactId>
<version>0.0.80-SNAPSHOT</version> <version>0.0.84-SNAPSHOT</version>
</parent> </parent>
<groupId>com.ecep.contract</groupId> <groupId>com.ecep.contract</groupId>
<artifactId>client</artifactId> <artifactId>client</artifactId>
<version>0.0.80-SNAPSHOT</version> <version>0.0.84-SNAPSHOT</version>
<properties> <properties>
<maven.compiler.source>${java.version}</maven.compiler.source> <maven.compiler.source>${java.version}</maven.compiler.source>
@@ -22,7 +22,7 @@
<dependency> <dependency>
<groupId>com.ecep.contract</groupId> <groupId>com.ecep.contract</groupId>
<artifactId>common</artifactId> <artifactId>common</artifactId>
<version>0.0.80-SNAPSHOT</version> <version>0.0.84-SNAPSHOT</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
@@ -73,12 +73,6 @@
<artifactId>okhttp</artifactId> <artifactId>okhttp</artifactId>
<version>4.12.0</version> <version>4.12.0</version>
</dependency> </dependency>
<!-- WebSocket for OkHttp -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp-ws</artifactId>
<version>3.4.2</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>

View File

@@ -37,10 +37,12 @@ import javafx.scene.text.Text;
import javafx.stage.Stage; import javafx.stage.Stage;
import javafx.stage.StageStyle; import javafx.stage.StageStyle;
import lombok.Getter; import lombok.Getter;
import lombok.Setter;
import okhttp3.Cookie; import okhttp3.Cookie;
import okhttp3.CookieJar; import okhttp3.CookieJar;
import okhttp3.HttpUrl; import okhttp3.HttpUrl;
import okhttp3.OkHttpClient; import okhttp3.OkHttpClient;
import okhttp3.WebSocket;
/** /**
* JavaFx 应用程序 * JavaFx 应用程序
@@ -74,7 +76,6 @@ public class Desktop extends Application {
@Getter @Getter
private OkHttpClient httpClient; private OkHttpClient httpClient;
public void setActiveEmployeeId(int activeEmployeeId) { public void setActiveEmployeeId(int activeEmployeeId) {
activeEmployee.getId().set(activeEmployeeId); activeEmployee.getId().set(activeEmployeeId);
} }
@@ -174,7 +175,7 @@ public class Desktop extends Application {
Properties properties = new Properties(); Properties properties = new Properties();
File configFile = new File("config.properties"); File configFile = new File("config.properties");
if (configFile.exists()) { if (configFile.exists()) {
holder.debug("读取配置文件 " + configFile.getName() + "..."); holder.info("读取配置文件 " + configFile.getAbsolutePath() + "...");
try (FileInputStream input = new FileInputStream(configFile)) { try (FileInputStream input = new FileInputStream(configFile)) {
properties.load(input); properties.load(input);
holder.info("配置文件读取成功."); holder.info("配置文件读取成功.");
@@ -183,6 +184,8 @@ public class Desktop extends Application {
logger.error(e.getMessage(), e); logger.error(e.getMessage(), e);
return; return;
} }
} else {
logger.warn("配置文件{}不存在", configFile.getAbsolutePath());
} }
runAsync(() -> { runAsync(() -> {

View File

@@ -0,0 +1,278 @@
package com.ecep.contract;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ecep.contract.msg.SimpleMessage;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import javafx.application.Platform;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import lombok.Getter;
import lombok.Setter;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.WebSocket;
import okhttp3.WebSocketListener;
import okio.ByteString;
/**
* WebSocket消息服务
* 提供向服务器端发送WebSocket消息的功能
*/
@Service
public class WebSocketService {
private static final Logger logger = LoggerFactory.getLogger(WebSocketService.class);
@Getter
@Setter
private WebSocket webSocket;
@Autowired
private ObjectMapper objectMapper;
private static final int RECONNECT_DELAY_MS = 5000; // 重连延迟时间(毫秒)
private static final int HEARTBEAT_INTERVAL_MS = 30000; // 心跳间隔时间(毫秒)
private String webSocketUrl = "ws://localhost:8080/ws";
private boolean isActive = false; // 标记连接是否活跃
private ScheduledFuture<?> heartbeatTask; // 心跳任务
private ScheduledFuture<?> reconnectFuture; // 修改类型为CompletableFuture<Void>
private SimpleBooleanProperty online = new SimpleBooleanProperty(false);
private SimpleStringProperty message = new SimpleStringProperty("");
// 存储所有活跃的WebSocket会话
private final Map<String, CompletableFuture<JsonNode>> callbacks = Collections.synchronizedMap(new HashMap<>());
WebSocketListener listener = new WebSocketListener() {
@Override
public void onOpen(WebSocket webSocket, Response response) {
Platform.runLater(() -> {
online.setValue(true);
message.setValue("已连接");
});
startHeartbeat(); // 启动心跳
}
@Override
public void onMessage(WebSocket webSocket, String text) {
// 处理收到的文本消息
logger.debug("收到WebSocket消息: {}", text);
// 这里可以根据需要处理从服务器接收的数据
if ("pong".equals(text)) {
// 收到pong响应说明连接正常
logger.debug("收到心跳响应");
return;
}
try {
JsonNode node = objectMapper.readTree(text);
if (node.has("messageId")) {
String messageId = node.get("messageId").asText();
CompletableFuture<JsonNode> future = callbacks.remove(messageId);
if (future != null) {
if (node.has("success")) {
if (!node.get("success").asBoolean()) {
future.completeExceptionally(
new RuntimeException("请求失败:" + node.get("message").asText()));
return;
}
}
// 使用具体类型后,这里不会再出现类型不匹配的错误
if (node.has("data")) {
future.complete(node.get("data"));
} else {
future.complete(node);
}
} else {
logger.error("未找到对应的回调future: {}", messageId);
}
}
} catch (Exception e) {
logger.error("处理WebSocket消息失败: {}", e.getMessage(), e);
}
}
@Override
public void onMessage(WebSocket webSocket, ByteString bytes) {
// 处理收到的二进制消息
logger.debug("收到二进制WebSocket消息长度: " + bytes.size());
}
@Override
public void onClosing(WebSocket webSocket, int code, String reason) {
logger.debug("WebSocket连接正在关闭: 代码=" + code + ", 原因=" + reason);
stopHeartbeat(); // 停止心跳
}
@Override
public void onClosed(WebSocket webSocket, int code, String reason) {
logger.debug("WebSocket连接已关闭: 代码=" + code + ", 原因=" + reason);
stopHeartbeat(); // 停止心跳
// 处理重连逻辑
scheduleReconnect();
}
@Override
public void onFailure(WebSocket webSocket, Throwable t, Response response) {
logger.error("WebSocket连接失败: " + t.getMessage());
Platform.runLater(() -> {
online.setValue(false);
message.set("连接失败: " + t.getMessage());
});
stopHeartbeat(); // 停止心跳
// 处理重连逻辑
scheduleReconnect();
}
};
public void send(String string) {
if (webSocket != null && webSocket.send(string)) {
logger.debug("send message success:{}", string);
} else if (webSocket == null) {
logger.warn("Failed to send message: WebSocket is not initialized");
}
}
public CompletableFuture<JsonNode> send(SimpleMessage msg) {
CompletableFuture<JsonNode> future = new CompletableFuture<>();
try {
if (webSocket == null) {
throw new IllegalStateException("WebSocket is not initialized");
}
String json = objectMapper.writeValueAsString(msg);
if (webSocket.send(json)) {
logger.debug("send message success:{}", json);
callbacks.put(msg.getMessageId(), future);
} else {
future.completeExceptionally(new RuntimeException("Failed to send WebSocket message"));
}
} catch (Exception e) {
logger.error("Failed to send WebSocket message: {}", e.getMessage());
future.completeExceptionally(e);
}
return future;
}
public void initWebSocket() {
isActive = true;
OkHttpClient httpClient = Desktop.instance.getHttpClient();
try {
// 构建WebSocket请求包含认证信息
Request request = new Request.Builder()
.url(webSocketUrl)
.build();
webSocket = httpClient.newWebSocket(request, listener);
} catch (Exception e) {
logger.error("建立WebSocket连接失败: " + e.getMessage());
Platform.runLater(() -> {
online.setValue(false);
message.set("连接失败: " + e.getMessage());
});
// 处理重连逻辑
scheduleReconnect();
}
}
/**
* 启动心跳任务定期发送ping消息保持连接
*/
private void startHeartbeat() {
// 先停止可能存在的心跳任务
stopHeartbeat();
ScheduledExecutorService executorService = Desktop.instance.getExecutorService();
heartbeatTask = executorService.scheduleAtFixedRate(this::heartbeat, RECONNECT_DELAY_MS, HEARTBEAT_INTERVAL_MS,
TimeUnit.MILLISECONDS);
}
void heartbeat() {
if (!isActive) {
return;
}
try {
if (webSocket != null) {
logger.debug("发送心跳 ping");
webSocket.send("ping");
}
} catch (Exception e) {
logger.error("发送心跳失败: {}", e.getMessage());
}
}
/**
* 停止心跳任务
*/
private void stopHeartbeat() {
if (heartbeatTask != null && !heartbeatTask.isCancelled()) {
heartbeatTask.cancel(true);
heartbeatTask = null;
}
}
/**
* 安排重连任务
*/
private void scheduleReconnect() {
if (!isActive) {
return; // 如果连接已被主动关闭,则不再重连
}
// 取消之前可能存在的重连任务
if (reconnectFuture != null && !reconnectFuture.isDone()) {
reconnectFuture.cancel(true);
}
// 创建新的重连任务s
logger.info("计划在 {} 毫秒后尝试重连WebSocket", RECONNECT_DELAY_MS);
reconnectFuture = Desktop.instance.getExecutorService().schedule(() -> {
if (isActive) {
logger.info("尝试重新连接WebSocket");
Platform.runLater(() -> {
online.setValue(false);
message.set("正在重新连接WebSocket...");
});
initWebSocket();
}
}, RECONNECT_DELAY_MS, TimeUnit.MILLISECONDS);
}
/**
* 关闭WebSocket连接
*/
public void closeWebSocket() {
isActive = false;
stopHeartbeat();
if (reconnectFuture != null && !reconnectFuture.isDone()) {
reconnectFuture.cancel(false);
reconnectFuture = null;
}
if (webSocket != null) {
webSocket.close(1000, "主动关闭连接");
webSocket = null;
}
}
public StringProperty getMessageProperty() {
return message;
}
public BooleanProperty getOnlineProperty() {
return online;
}
}

View File

@@ -1,11 +1,13 @@
package com.ecep.contract.controller; package com.ecep.contract.controller;
import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import org.controlsfx.control.TaskProgressView; import org.controlsfx.control.TaskProgressView;
import org.controlsfx.glyphfont.Glyph;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
@@ -16,6 +18,7 @@ import org.springframework.stereotype.Component;
import com.ecep.contract.Desktop; import com.ecep.contract.Desktop;
import com.ecep.contract.DesktopUtils; import com.ecep.contract.DesktopUtils;
import com.ecep.contract.WebSocketService;
import com.ecep.contract.controller.bank.BankManagerWindowController; import com.ecep.contract.controller.bank.BankManagerWindowController;
import com.ecep.contract.controller.company.CompanyManagerWindowController; import com.ecep.contract.controller.company.CompanyManagerWindowController;
import com.ecep.contract.controller.contract.ContractManagerWindowController; import com.ecep.contract.controller.contract.ContractManagerWindowController;
@@ -34,7 +37,6 @@ import com.ecep.contract.util.FxmlPath;
import com.ecep.contract.util.FxmlUtils; import com.ecep.contract.util.FxmlUtils;
import com.ecep.contract.vm.CurrentEmployee; import com.ecep.contract.vm.CurrentEmployee;
import javafx.application.Platform;
import javafx.concurrent.Task; import javafx.concurrent.Task;
import javafx.event.ActionEvent; import javafx.event.ActionEvent;
import javafx.scene.Node; import javafx.scene.Node;
@@ -47,12 +49,6 @@ import javafx.scene.layout.VBox;
import javafx.stage.Modality; import javafx.stage.Modality;
import javafx.stage.Stage; import javafx.stage.Stage;
import javafx.stage.WindowEvent; import javafx.stage.WindowEvent;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.WebSocket;
import okhttp3.WebSocketListener;
import okio.ByteString;
@Lazy @Lazy
@Scope("prototype") @Scope("prototype")
@@ -75,11 +71,10 @@ public class HomeWindowController extends BaseController {
public Button openCustomManagerWindow; public Button openCustomManagerWindow;
public TaskProgressView<Task<?>> taskProgressView; public TaskProgressView<Task<?>> taskProgressView;
public Label taskMonitorLabel; public Label taskMonitorLabel;
public Label webSocketMonitorLabel;
public Glyph webSocketMonitorIcon;
public Label employeeStatusLabel; public Label employeeStatusLabel;
private WebSocket webSocket;
private String webSocketUrl = "ws://localhost:8080/ws";
public void initialize() { public void initialize() {
openCompanyManagerWindow.setOnAction(event -> showInOwner(CompanyManagerWindowController.class)); openCompanyManagerWindow.setOnAction(event -> showInOwner(CompanyManagerWindowController.class));
openProjectManagerWindow.setOnAction(event -> showInOwner(ProjectManagerWindowController.class)); openProjectManagerWindow.setOnAction(event -> showInOwner(ProjectManagerWindowController.class));
@@ -105,7 +100,15 @@ public class HomeWindowController extends BaseController {
employeeStatusLabel.textProperty().bind(Desktop.instance.getActiveEmployee().getName()); employeeStatusLabel.textProperty().bind(Desktop.instance.getActiveEmployee().getName());
Desktop.instance.getTaskMonitorCenter().bindStatusLabel(taskMonitorLabel); Desktop.instance.getTaskMonitorCenter().bindStatusLabel(taskMonitorLabel);
Desktop.instance.getActiveEmployee().initialize(); Desktop.instance.getActiveEmployee().initialize();
initWebSocket();
WebSocketService webSocketService = getBean(WebSocketService.class);
webSocketMonitorIcon.iconProperty()
.bind(webSocketService.getOnlineProperty().map(b -> b ? "CHAIN" : "CHAIN_BROKEN"));
webSocketMonitorLabel.textProperty().bind(webSocketService.getMessageProperty());
webSocketMonitorLabel.setOnMouseClicked(event -> {
webSocketService.send("webSocketUrl - " + LocalDateTime.now().toString());
});
webSocketService.initWebSocket();
} }
@EventListener @EventListener
@@ -140,14 +143,6 @@ public class HomeWindowController extends BaseController {
// scheduledExecutorService.shutdownNow(); // scheduledExecutorService.shutdownNow();
} }
@Override
public void onHidden(WindowEvent windowEvent) {
System.out.println("windowEvent = " + windowEvent);
super.onHidden(windowEvent);
// Platform.exit();
}
/** /**
* 打开 配置 窗口 * 打开 配置 窗口
*/ */
@@ -221,63 +216,11 @@ public class HomeWindowController extends BaseController {
showInOwner(TaskMonitorViewController.class); showInOwner(TaskMonitorViewController.class);
} }
private void initWebSocket() {
OkHttpClient httpClient = Desktop.instance.getHttpClient();
try {
// 构建WebSocket请求包含认证信息
Request request = new Request.Builder()
.url(webSocketUrl)
.build();
webSocket = httpClient.newWebSocket(request, new WebSocketListener() {
@Override @Override
public void onOpen(WebSocket webSocket, Response response) { public void onHidden(WindowEvent windowEvent) {
Platform.runLater(() -> { System.out.println("windowEvent = " + windowEvent);
setStatus("WebSocket连接已建立"); WebSocketService webSocketService = getBean(WebSocketService.class);
// 登录成功后的处理 webSocketService.closeWebSocket(); // 在窗口隐藏时关闭WebSocket连接
System.out.println("WebSocket连接已建立"); super.onHidden(windowEvent);
});
}
@Override
public void onMessage(WebSocket webSocket, String text) {
// 处理收到的文本消息
logger.debug("收到WebSocket消息: " + text);
// 这里可以根据需要处理从服务器接收的数据
}
@Override
public void onMessage(WebSocket webSocket, ByteString bytes) {
// 处理收到的二进制消息
logger.debug("收到二进制WebSocket消息长度: " + bytes.size());
}
@Override
public void onClosing(WebSocket webSocket, int code, String reason) {
logger.debug("WebSocket连接正在关闭: 代码=" + code + ", 原因=" + reason);
}
@Override
public void onClosed(WebSocket webSocket, int code, String reason) {
logger.debug("WebSocket连接已关闭: 代码=" + code + ", 原因=" + reason);
// 可以在这里处理重连逻辑
}
@Override
public void onFailure(WebSocket webSocket, Throwable t, Response response) {
logger.error("WebSocket连接失败: " + t.getMessage());
Platform.runLater(() -> {
setStatus("WebSocket连接失败: " + t.getMessage());
});
}
});
} catch (Exception e) {
logger.error("建立WebSocket连接失败: " + e.getMessage());
Platform.runLater(() -> {
setStatus("建立WebSocket连接失败: " + e.getMessage());
});
}
} }
} }

View File

@@ -254,6 +254,11 @@ public class OkHttpLoginController implements MessageHolder {
CompletableFuture<Void> future = new CompletableFuture<>(); CompletableFuture<Void> future = new CompletableFuture<>();
try { try {
while (!SpringApp.isRunning()) {
holder.info("环境准备中,请稍后...");
Thread.sleep(1000);
}
ObjectMapper objectMapper = SpringApp.getBean(ObjectMapper.class); ObjectMapper objectMapper = SpringApp.getBean(ObjectMapper.class);
ObjectNode objectNode = objectMapper.createObjectNode(); ObjectNode objectNode = objectMapper.createObjectNode();
objectNode.put("username", username); objectNode.put("username", username);
@@ -367,7 +372,6 @@ public class OkHttpLoginController implements MessageHolder {
}); });
} }
// WebSocket消息发送方法 // WebSocket消息发送方法
public void sendMessage(String message) { public void sendMessage(String message) {
if (webSocket != null) { if (webSocket != null) {

View File

@@ -28,27 +28,17 @@ public class YongYouU8ManagerSkin
extends extends
AbstEntityManagerSkin<CloudYu, CloudYuInfoViewModel, YongYouU8ManagerSkin, YongYouU8ManagerWindowController> AbstEntityManagerSkin<CloudYu, CloudYuInfoViewModel, YongYouU8ManagerSkin, YongYouU8ManagerWindowController>
implements ManagerSkin { implements ManagerSkin {
@Setter
private YongYouU8Service u8Service;
@Setter
private CompanyService companyService;
public YongYouU8ManagerSkin(YongYouU8ManagerWindowController controller) { public YongYouU8ManagerSkin(YongYouU8ManagerWindowController controller) {
super(controller); super(controller);
} }
YongYouU8Service getU8Service() { YongYouU8Service getU8Service() {
if (u8Service == null) { return getBean(YongYouU8Service.class);
u8Service = SpringApp.getBean(YongYouU8Service.class);
}
return u8Service;
} }
CompanyService getCompanyService() { CompanyService getCompanyService() {
if (companyService == null) { return getBean(CompanyService.class);
companyService = SpringApp.getBean(CompanyService.class);
}
return companyService;
} }
@Override @Override

View File

@@ -2,16 +2,15 @@ package com.ecep.contract.service;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.Bank; import com.ecep.contract.model.Bank;
import com.ecep.contract.vm.BankViewModel; import com.ecep.contract.vm.BankViewModel;
public class BankService implements ViewModelService<Bank, BankViewModel> { @Service
public class BankService extends QueryService<Bank, BankViewModel> {
public Bank findByName(String name) { public Bank findByName(String name) {
return null; return null;
} }
public List<Bank> search(String searchText) {
return null;
}
} }

View File

@@ -4,6 +4,7 @@ import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import org.controlsfx.control.TaskProgressView; import org.controlsfx.control.TaskProgressView;
import org.springframework.stereotype.Service;
import com.ecep.contract.Desktop; import com.ecep.contract.Desktop;
import com.ecep.contract.MessageHolder; import com.ecep.contract.MessageHolder;
@@ -17,7 +18,8 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import javafx.concurrent.Task; import javafx.concurrent.Task;
import lombok.Data; import lombok.Data;
public class CloudRkService implements ViewModelService<CloudRk, CloudRkViewModel> { @Service
public class CloudRkService extends QueryService<CloudRk, CloudRkViewModel> {
@Data @Data
@JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnoreProperties(ignoreUnknown = true)
public static class EntInfo { public static class EntInfo {
@@ -27,6 +29,7 @@ public class CloudRkService implements ViewModelService<CloudRk, CloudRkViewMode
private String name; private String name;
private boolean nowName; private boolean nowName;
} }
/** /**
* 生成定时同步任务 * 生成定时同步任务
* *

View File

@@ -1,11 +1,8 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import java.time.Instant; import java.time.Instant;
import java.util.List;
import java.util.Map;
import org.springframework.data.domain.Page; import org.springframework.stereotype.Service;
import org.springframework.data.domain.Pageable;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import com.ecep.contract.DesktopUtils; import com.ecep.contract.DesktopUtils;
@@ -18,7 +15,8 @@ import com.ecep.contract.vm.CloudTycInfoViewModel;
import javafx.application.Platform; import javafx.application.Platform;
public class CloudTycService implements ViewModelService<CloudTyc, CloudTycInfoViewModel> { @Service
public class CloudTycService extends QueryService<CloudTyc, CloudTycInfoViewModel> {
/** /**
* 天眼查报告,文件名中必须包含 天眼查 字样 * 天眼查报告,文件名中必须包含 天眼查 字样
* *
@@ -58,36 +56,6 @@ public class CloudTycService implements ViewModelService<CloudTyc, CloudTycInfoV
} }
@Override
public CloudTyc findById(Integer id) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'findById'");
}
@Override
public CloudTyc save(CloudTyc entity) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'save'");
}
@Override
public void delete(CloudTyc entity) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'delete'");
}
@Override
public List<CloudTyc> findAll() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'findAll'");
}
@Override
public Page<CloudTyc> findAll(Map<String, Object> params, Pageable pageable) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'findAll'");
}
public CloudTyc getOrCreateCloudTyc(Company company) { public CloudTyc getOrCreateCloudTyc(Company company) {
throw new UnsupportedOperationException("Unimplemented method 'getOrCreateCloudTyc'"); throw new UnsupportedOperationException("Unimplemented method 'getOrCreateCloudTyc'");
} }

View File

@@ -2,11 +2,14 @@ package com.ecep.contract.service;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.Company; import com.ecep.contract.model.Company;
import com.ecep.contract.model.CompanyBankAccount; import com.ecep.contract.model.CompanyBankAccount;
import com.ecep.contract.vm.CompanyBankAccountViewModel; import com.ecep.contract.vm.CompanyBankAccountViewModel;
public class CompanyBankAccountService implements ViewModelService<CompanyBankAccount, CompanyBankAccountViewModel> { @Service
public class CompanyBankAccountService extends QueryService<CompanyBankAccount, CompanyBankAccountViewModel> {
public List<CompanyBankAccount> searchByCompany(Company company, String searchText) { public List<CompanyBankAccount> searchByCompany(Company company, String searchText) {
throw new UnsupportedOperationException("未实现"); throw new UnsupportedOperationException("未实现");

View File

@@ -1,9 +1,12 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.CompanyBlackReason; import com.ecep.contract.model.CompanyBlackReason;
import com.ecep.contract.vm.CompanyBlackReasonViewModel; import com.ecep.contract.vm.CompanyBlackReasonViewModel;
@Service
public class CompanyBlackReasonService public class CompanyBlackReasonService
implements ViewModelService<CompanyBlackReason, CompanyBlackReasonViewModel> { extends QueryService<CompanyBlackReason, CompanyBlackReasonViewModel> {
} }

View File

@@ -2,11 +2,14 @@ package com.ecep.contract.service;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.Company; import com.ecep.contract.model.Company;
import com.ecep.contract.model.CompanyContact; import com.ecep.contract.model.CompanyContact;
import com.ecep.contract.vm.CompanyContactViewModel; import com.ecep.contract.vm.CompanyContactViewModel;
public class CompanyContactService implements ViewModelService<CompanyContact, CompanyContactViewModel> { @Service
public class CompanyContactService extends QueryService<CompanyContact, CompanyContactViewModel> {
public List<CompanyContact> searchByCompany(Company company, String userText) { public List<CompanyContact> searchByCompany(Company company, String userText) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -5,12 +5,14 @@ import java.util.Map;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.CompanyCustomer; import com.ecep.contract.model.CompanyCustomer;
import com.ecep.contract.model.CompanyCustomerEntity; import com.ecep.contract.model.CompanyCustomerEntity;
import com.ecep.contract.vm.CustomerEntityViewModel; import com.ecep.contract.vm.CustomerEntityViewModel;
public class CompanyCustomerEntityService implements ViewModelService<CompanyCustomerEntity, CustomerEntityViewModel> { @Service
public class CompanyCustomerEntityService extends QueryService<CompanyCustomerEntity, CustomerEntityViewModel> {
public List<CompanyCustomerEntity> findAllByCustomer(CompanyCustomer customer) { public List<CompanyCustomerEntity> findAllByCustomer(CompanyCustomer customer) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }

View File

@@ -6,6 +6,8 @@ import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
import org.springframework.stereotype.Service;
import com.ecep.contract.CompanyCustomerFileType; import com.ecep.contract.CompanyCustomerFileType;
import com.ecep.contract.MessageHolder; import com.ecep.contract.MessageHolder;
import com.ecep.contract.model.CompanyCustomer; import com.ecep.contract.model.CompanyCustomer;
@@ -14,7 +16,8 @@ import com.ecep.contract.model.CompanyCustomerFile;
import com.ecep.contract.model.CompanyCustomerFileTypeLocal; import com.ecep.contract.model.CompanyCustomerFileTypeLocal;
import com.ecep.contract.vm.CompanyCustomerFileViewModel; import com.ecep.contract.vm.CompanyCustomerFileViewModel;
public class CompanyCustomerFileService implements ViewModelService<CompanyCustomerFile, CompanyCustomerFileViewModel> { @Service
public class CompanyCustomerFileService extends QueryService<CompanyCustomerFile, CompanyCustomerFileViewModel> {
public List<CompanyCustomerEvaluationFormFile> findAllCustomerEvaluationFormFiles(CompanyCustomer customer) { public List<CompanyCustomerEvaluationFormFile> findAllCustomerEvaluationFormFiles(CompanyCustomer customer) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }

View File

@@ -1,14 +1,17 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import java.io.File;
import org.springframework.stereotype.Service;
import com.ecep.contract.MessageHolder; import com.ecep.contract.MessageHolder;
import com.ecep.contract.model.Company; import com.ecep.contract.model.Company;
import com.ecep.contract.model.CompanyCustomer; import com.ecep.contract.model.CompanyCustomer;
import com.ecep.contract.model.CustomerCatalog; import com.ecep.contract.model.CustomerCatalog;
import com.ecep.contract.vm.CompanyCustomerViewModel; import com.ecep.contract.vm.CompanyCustomerViewModel;
import java.io.File; @Service
public class CompanyCustomerService extends QueryService<CompanyCustomer, CompanyCustomerViewModel> {
public class CompanyCustomerService implements ViewModelService<CompanyCustomer, CompanyCustomerViewModel> {
public CompanyCustomer findByCompany(Company company) { public CompanyCustomer findByCompany(Company company) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -1,10 +1,13 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.Company; import com.ecep.contract.model.Company;
import com.ecep.contract.model.CompanyExtendInfo; import com.ecep.contract.model.CompanyExtendInfo;
import com.ecep.contract.vm.CompanyExtendInfoViewModel; import com.ecep.contract.vm.CompanyExtendInfoViewModel;
public class CompanyExtendInfoService implements ViewModelService<CompanyExtendInfo, CompanyExtendInfoViewModel> { @Service
public class CompanyExtendInfoService extends QueryService<CompanyExtendInfo, CompanyExtendInfoViewModel> {
public CompanyExtendInfo findByCompany(Company company) { public CompanyExtendInfo findByCompany(Company company) {
throw new UnsupportedOperationException("Unimplemented method 'findByCompany'"); throw new UnsupportedOperationException("Unimplemented method 'findByCompany'");
} }

View File

@@ -5,6 +5,8 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import org.springframework.stereotype.Service;
import com.ecep.contract.CompanyFileType; import com.ecep.contract.CompanyFileType;
import com.ecep.contract.MessageHolder; import com.ecep.contract.MessageHolder;
import com.ecep.contract.model.Company; import com.ecep.contract.model.Company;
@@ -14,7 +16,8 @@ import com.ecep.contract.vm.CompanyFileViewModel;
import javafx.collections.ObservableList; import javafx.collections.ObservableList;
public class CompanyFileService implements ViewModelService<CompanyFile, CompanyFileViewModel> { @Service
public class CompanyFileService extends QueryService<CompanyFile, CompanyFileViewModel> {
public boolean reBuildingFiles(Company company, MessageHolder holder) { public boolean reBuildingFiles(Company company, MessageHolder holder) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -3,11 +3,14 @@ package com.ecep.contract.service;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.Company; import com.ecep.contract.model.Company;
import com.ecep.contract.model.CompanyOldName; import com.ecep.contract.model.CompanyOldName;
import com.ecep.contract.vm.CompanyOldNameViewModel; import com.ecep.contract.vm.CompanyOldNameViewModel;
public class CompanyOldNameService implements ViewModelService<CompanyOldName, CompanyOldNameViewModel> { @Service
public class CompanyOldNameService extends QueryService<CompanyOldName, CompanyOldNameViewModel> {
public boolean makePathAbsent(CompanyOldName companyOldName) { public boolean makePathAbsent(CompanyOldName companyOldName) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -4,22 +4,25 @@ import java.io.File;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service;
import com.ecep.contract.MessageHolder; import com.ecep.contract.MessageHolder;
import com.ecep.contract.model.Company; import com.ecep.contract.model.Company;
import com.ecep.contract.vm.CompanyViewModel; import com.ecep.contract.vm.CompanyViewModel;
public class CompanyService implements ViewModelService<Company, CompanyViewModel> { @Service
public class CompanyService extends QueryService<Company, CompanyViewModel> {
@Override
public String getBeanName() {
return "companyService";
}
public Company findByName(String name) { public Company findByName(String name) {
// return companyRepository.findByName(name); // return companyRepository.findByName(name);
throw new UnsupportedOperationException("Unimplemented method 'findByName'"); throw new UnsupportedOperationException("Unimplemented method 'findByName'");
} }
public List<Company> search(String name) {
// return companyRepository.findByName(name);
throw new UnsupportedOperationException("Unimplemented method 'search'");
}
public List<Company> findAllByName(String name) { public List<Company> findAllByName(String name) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'findAllByName'"); throw new UnsupportedOperationException("Unimplemented method 'findAllByName'");
@@ -60,5 +63,4 @@ public class CompanyService implements ViewModelService<Company, CompanyViewMode
throw new UnsupportedOperationException("Unimplemented method 'retrieveFromDownloadFiles'"); throw new UnsupportedOperationException("Unimplemented method 'retrieveFromDownloadFiles'");
} }
} }

View File

@@ -1,11 +1,15 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.MessageHolder; import com.ecep.contract.MessageHolder;
import com.ecep.contract.model.CompanyVendorApprovedFile; import com.ecep.contract.model.CompanyVendorApprovedFile;
import com.ecep.contract.model.CompanyVendorApprovedList; import com.ecep.contract.model.CompanyVendorApprovedList;
import com.ecep.contract.vm.CompanyVendorApprovedFileViewModel; import com.ecep.contract.vm.CompanyVendorApprovedFileViewModel;
public class CompanyVendorApprovedFileService implements ViewModelService<CompanyVendorApprovedFile, CompanyVendorApprovedFileViewModel> { @Service
public class CompanyVendorApprovedFileService
extends QueryService<CompanyVendorApprovedFile, CompanyVendorApprovedFileViewModel> {
public CompanyVendorApprovedFile findByName(CompanyVendorApprovedList approvedList, String name) { public CompanyVendorApprovedFile findByName(CompanyVendorApprovedList approvedList, String name) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -2,12 +2,16 @@ package com.ecep.contract.service;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.CompanyVendor; import com.ecep.contract.model.CompanyVendor;
import com.ecep.contract.model.CompanyVendorApprovedItem; import com.ecep.contract.model.CompanyVendorApprovedItem;
import com.ecep.contract.model.CompanyVendorApprovedList; import com.ecep.contract.model.CompanyVendorApprovedList;
import com.ecep.contract.vm.CompanyVendorApprovedItemViewModel; import com.ecep.contract.vm.CompanyVendorApprovedItemViewModel;
public class CompanyVendorApprovedItemService implements ViewModelService<CompanyVendorApprovedItem, CompanyVendorApprovedItemViewModel> { @Service
public class CompanyVendorApprovedItemService
extends QueryService<CompanyVendorApprovedItem, CompanyVendorApprovedItemViewModel> {
public List<CompanyVendorApprovedItem> findAllByListAndVendor(CompanyVendorApprovedList approvedList, public List<CompanyVendorApprovedItem> findAllByListAndVendor(CompanyVendorApprovedList approvedList,
CompanyVendor vendor) { CompanyVendor vendor) {

View File

@@ -1,11 +1,14 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.MessageHolder; import com.ecep.contract.MessageHolder;
import com.ecep.contract.model.CompanyVendorApprovedList; import com.ecep.contract.model.CompanyVendorApprovedList;
import com.ecep.contract.vm.CompanyVendorApprovedListViewModel; import com.ecep.contract.vm.CompanyVendorApprovedListViewModel;
@Service
public class CompanyVendorApprovedListService public class CompanyVendorApprovedListService
implements ViewModelService<CompanyVendorApprovedList, CompanyVendorApprovedListViewModel> { extends QueryService<CompanyVendorApprovedList, CompanyVendorApprovedListViewModel> {
public boolean makePathAbsent(CompanyVendorApprovedList list) { public boolean makePathAbsent(CompanyVendorApprovedList list) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -1,8 +1,11 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.CompanyVendorEntity; import com.ecep.contract.model.CompanyVendorEntity;
import com.ecep.contract.vm.CompanyVendorEntityViewModel; import com.ecep.contract.vm.CompanyVendorEntityViewModel;
public class CompanyVendorEntityService implements ViewModelService<CompanyVendorEntity, CompanyVendorEntityViewModel> { @Service
public class CompanyVendorEntityService extends QueryService<CompanyVendorEntity, CompanyVendorEntityViewModel> {
} }

View File

@@ -6,13 +6,16 @@ import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import org.springframework.stereotype.Service;
import com.ecep.contract.CompanyVendorFileType; import com.ecep.contract.CompanyVendorFileType;
import com.ecep.contract.model.CompanyVendor; import com.ecep.contract.model.CompanyVendor;
import com.ecep.contract.model.CompanyVendorFile; import com.ecep.contract.model.CompanyVendorFile;
import com.ecep.contract.model.CompanyVendorFileTypeLocal; import com.ecep.contract.model.CompanyVendorFileTypeLocal;
import com.ecep.contract.vm.CompanyVendorFileViewModel; import com.ecep.contract.vm.CompanyVendorFileViewModel;
public class CompanyVendorFileService implements ViewModelService<CompanyVendorFile, CompanyVendorFileViewModel> { @Service
public class CompanyVendorFileService extends QueryService<CompanyVendorFile, CompanyVendorFileViewModel> {
public LocalDate getNextSignDate(CompanyVendor companyVendor, Consumer<String> state) { public LocalDate getNextSignDate(CompanyVendor companyVendor, Consumer<String> state) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -5,6 +5,8 @@ import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import org.springframework.stereotype.Service;
import com.ecep.contract.MessageHolder; import com.ecep.contract.MessageHolder;
import com.ecep.contract.model.Company; import com.ecep.contract.model.Company;
import com.ecep.contract.model.CompanyVendor; import com.ecep.contract.model.CompanyVendor;
@@ -13,7 +15,8 @@ import com.ecep.contract.model.VendorCatalog;
import com.ecep.contract.model.VendorTypeLocal; import com.ecep.contract.model.VendorTypeLocal;
import com.ecep.contract.vm.CompanyVendorViewModel; import com.ecep.contract.vm.CompanyVendorViewModel;
public class CompanyVendorService implements ViewModelService<CompanyVendor, CompanyVendorViewModel> { @Service
public class CompanyVendorService extends QueryService<CompanyVendor, CompanyVendorViewModel> {
public VendorCatalog findCatalogById(Integer id) { public VendorCatalog findCatalogById(Integer id) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -2,12 +2,15 @@ package com.ecep.contract.service;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.Company; import com.ecep.contract.model.Company;
import com.ecep.contract.model.Contract; import com.ecep.contract.model.Contract;
import com.ecep.contract.model.ContractBidVendor; import com.ecep.contract.model.ContractBidVendor;
import com.ecep.contract.vm.ContractBidVendorViewModel; import com.ecep.contract.vm.ContractBidVendorViewModel;
public class ContractBidVendorService implements ViewModelService<ContractBidVendor, ContractBidVendorViewModel> { @Service
public class ContractBidVendorService extends QueryService<ContractBidVendor, ContractBidVendorViewModel> {
public List<ContractBidVendor> findByContract(Contract contract) { public List<ContractBidVendor> findByContract(Contract contract) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -3,13 +3,16 @@ package com.ecep.contract.service;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.springframework.stereotype.Service;
import com.ecep.contract.ContractFileType; import com.ecep.contract.ContractFileType;
import com.ecep.contract.model.Contract; import com.ecep.contract.model.Contract;
import com.ecep.contract.model.ContractFile; import com.ecep.contract.model.ContractFile;
import com.ecep.contract.model.ContractFileTypeLocal; import com.ecep.contract.model.ContractFileTypeLocal;
import com.ecep.contract.vm.ContractFileViewModel; import com.ecep.contract.vm.ContractFileViewModel;
public class ContractFileService implements ViewModelService<ContractFile, ContractFileViewModel> { @Service
public class ContractFileService extends QueryService<ContractFile, ContractFileViewModel> {
public List<ContractFile> findAllByContract(Contract contract) { public List<ContractFile> findAllByContract(Contract contract) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -1,9 +1,12 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.ContractGroup; import com.ecep.contract.model.ContractGroup;
import com.ecep.contract.vm.ContractGroupViewModel; import com.ecep.contract.vm.ContractGroupViewModel;
public class ContractGroupService implements ViewModelService<ContractGroup, ContractGroupViewModel> { @Service
public class ContractGroupService extends QueryService<ContractGroup, ContractGroupViewModel> {
public ContractGroup findByCode(String groupCode) { public ContractGroup findByCode(String groupCode) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -12,7 +12,7 @@ import com.ecep.contract.model.Inventory;
import com.ecep.contract.vm.ContractItemViewModel; import com.ecep.contract.vm.ContractItemViewModel;
@Service @Service
public class ContractItemService implements ViewModelService<ContractItem, ContractItemViewModel> { public class ContractItemService extends QueryService<ContractItem, ContractItemViewModel> {
@Override @Override
public ContractItem findById(Integer id) { public ContractItem findById(Integer id) {

View File

@@ -1,9 +1,12 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.ContractKind; import com.ecep.contract.model.ContractKind;
import com.ecep.contract.vm.ContractKindViewModel; import com.ecep.contract.vm.ContractKindViewModel;
public class ContractKindService implements ViewModelService<ContractKind, ContractKindViewModel> { @Service
public class ContractKindService extends QueryService<ContractKind, ContractKindViewModel> {
public ContractKind findByName(String name) { public ContractKind findByName(String name) {
throw new UnsupportedOperationException("Unimplemented method 'findByName'"); throw new UnsupportedOperationException("Unimplemented method 'findByName'");

View File

@@ -2,11 +2,14 @@ package com.ecep.contract.service;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.Contract; import com.ecep.contract.model.Contract;
import com.ecep.contract.model.ContractPayPlan; import com.ecep.contract.model.ContractPayPlan;
import com.ecep.contract.vm.ContractPayPlanViewModel; import com.ecep.contract.vm.ContractPayPlanViewModel;
public class ContractPayPlanService implements ViewModelService<ContractPayPlan, ContractPayPlanViewModel> { @Service
public class ContractPayPlanService extends QueryService<ContractPayPlan, ContractPayPlanViewModel> {
public List<ContractPayPlan> findAllByContract(Contract contract) { public List<ContractPayPlan> findAllByContract(Contract contract) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -4,6 +4,8 @@ import java.io.File;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service;
import com.ecep.contract.MessageHolder; import com.ecep.contract.MessageHolder;
import com.ecep.contract.model.CompanyVendor; import com.ecep.contract.model.CompanyVendor;
import com.ecep.contract.model.Contract; import com.ecep.contract.model.Contract;
@@ -12,7 +14,8 @@ import com.ecep.contract.model.ContractGroup;
import com.ecep.contract.model.Project; import com.ecep.contract.model.Project;
import com.ecep.contract.vm.ContractViewModel; import com.ecep.contract.vm.ContractViewModel;
public class ContractService implements ViewModelService<Contract, ContractViewModel> { @Service
public class ContractService extends QueryService<Contract, ContractViewModel> {
public boolean updateParentCode(Contract contract) { public boolean updateParentCode(Contract contract) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
@@ -28,10 +31,6 @@ public class ContractService implements ViewModelService<Contract, ContractViewM
throw new UnsupportedOperationException("Unimplemented method 'findByCode'"); throw new UnsupportedOperationException("Unimplemented method 'findByCode'");
} }
public List<Contract> search(String searchText) {
throw new UnsupportedOperationException("Unimplemented method 'search'");
}
public Contract findByName(String name) { public Contract findByName(String name) {
throw new UnsupportedOperationException("Unimplemented method 'findByName'"); throw new UnsupportedOperationException("Unimplemented method 'findByName'");
} }

View File

@@ -1,20 +1,17 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import java.util.List; import org.springframework.stereotype.Service;
import com.ecep.contract.model.ContractType; import com.ecep.contract.model.ContractType;
import com.ecep.contract.vm.ContractTypeViewModel; import com.ecep.contract.vm.ContractTypeViewModel;
public class ContractTypeService implements ViewModelService<ContractType, ContractTypeViewModel> { @Service
public class ContractTypeService extends QueryService<ContractType, ContractTypeViewModel> {
public ContractType findByName(String name) { public ContractType findByName(String name) {
throw new UnsupportedOperationException("Unimplemented method 'findByName'"); throw new UnsupportedOperationException("Unimplemented method 'findByName'");
} }
public List<ContractType> search(String searchText) {
throw new UnsupportedOperationException("Unimplemented method 'search'");
}
public ContractType findByCode(String typeCode) { public ContractType findByCode(String typeCode) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'findByCode'"); throw new UnsupportedOperationException("Unimplemented method 'findByCode'");

View File

@@ -1,8 +1,12 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.CustomerSatisfactionSurvey; import com.ecep.contract.model.CustomerSatisfactionSurvey;
import com.ecep.contract.vm.CustomerSatisfactionSurveyViewModel; import com.ecep.contract.vm.CustomerSatisfactionSurveyViewModel;
public class CustomerSatisfactionSurveyService implements ViewModelService<CustomerSatisfactionSurvey, CustomerSatisfactionSurveyViewModel> { @Service
public class CustomerSatisfactionSurveyService
extends QueryService<CustomerSatisfactionSurvey, CustomerSatisfactionSurveyViewModel> {
} }

View File

@@ -1,8 +1,11 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.DeliverySignMethod; import com.ecep.contract.model.DeliverySignMethod;
import com.ecep.contract.vm.DeliverySignMethodViewModel; import com.ecep.contract.vm.DeliverySignMethodViewModel;
public class DeliverySignMethodService implements ViewModelService<DeliverySignMethod, DeliverySignMethodViewModel> { @Service
public class DeliverySignMethodService extends QueryService<DeliverySignMethod, DeliverySignMethodViewModel> {
} }

View File

@@ -1,15 +1,11 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import java.util.List; import org.springframework.stereotype.Service;
import com.ecep.contract.model.Department; import com.ecep.contract.model.Department;
import com.ecep.contract.vm.DepartmentViewModel; import com.ecep.contract.vm.DepartmentViewModel;
public class DepartmentService implements ViewModelService<Department, DepartmentViewModel> { @Service
public class DepartmentService extends QueryService<Department, DepartmentViewModel> {
public List<Department> search(String searchText) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'search'");
}
} }

View File

@@ -3,11 +3,13 @@ package com.ecep.contract.service;
import java.util.List; import java.util.List;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.EmployeeAuthBind; import com.ecep.contract.model.EmployeeAuthBind;
import com.ecep.contract.vm.EmployeeAuthBindViewModel; import com.ecep.contract.vm.EmployeeAuthBindViewModel;
public class EmployeeAuthBindService implements ViewModelService<EmployeeAuthBind, EmployeeAuthBindViewModel> { @Service
public class EmployeeAuthBindService extends QueryService<EmployeeAuthBind, EmployeeAuthBindViewModel> {
public List<EmployeeAuthBind> findAllByEmployee(Object object, Sort unsorted) { public List<EmployeeAuthBind> findAllByEmployee(Object object, Sort unsorted) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -1,9 +1,12 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.EmployeeLoginHistory; import com.ecep.contract.model.EmployeeLoginHistory;
import com.ecep.contract.vm.EmployeeLoginHistoryViewModel; import com.ecep.contract.vm.EmployeeLoginHistoryViewModel;
@Service
public class EmployeeLoginHistoryService public class EmployeeLoginHistoryService
implements ViewModelService<EmployeeLoginHistory, EmployeeLoginHistoryViewModel> { extends QueryService<EmployeeLoginHistory, EmployeeLoginHistoryViewModel> {
} }

View File

@@ -2,11 +2,14 @@ package com.ecep.contract.service;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.EmployeeRole; import com.ecep.contract.model.EmployeeRole;
import com.ecep.contract.model.Function; import com.ecep.contract.model.Function;
import com.ecep.contract.vm.EmployeeRoleViewModel; import com.ecep.contract.vm.EmployeeRoleViewModel;
public class EmployeeRoleService implements ViewModelService<EmployeeRole, EmployeeRoleViewModel> { @Service
public class EmployeeRoleService extends QueryService<EmployeeRole, EmployeeRoleViewModel> {
public List<Function> getFunctionsByRoleId(int i) { public List<Function> getFunctionsByRoleId(int i) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -2,11 +2,14 @@ package com.ecep.contract.service;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.Employee; import com.ecep.contract.model.Employee;
import com.ecep.contract.model.EmployeeRole; import com.ecep.contract.model.EmployeeRole;
import com.ecep.contract.vm.EmployeeViewModel; import com.ecep.contract.vm.EmployeeViewModel;
public class EmployeeService implements ViewModelService<Employee, EmployeeViewModel> { @Service
public class EmployeeService extends QueryService<Employee, EmployeeViewModel> {
public static final int DEFAULT_SYSTEM_EMPLOYEE_ID = 26; public static final int DEFAULT_SYSTEM_EMPLOYEE_ID = 26;
@@ -24,12 +27,6 @@ public class EmployeeService implements ViewModelService<Employee, EmployeeViewM
// TODO Auto-generated method stub // TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'updateActive'"); throw new UnsupportedOperationException("Unimplemented method 'updateActive'");
} }
public List<Employee> search(String searchText) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'search'");
}
public Employee findByCode(String personCode) { public Employee findByCode(String personCode) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'findByCode'"); throw new UnsupportedOperationException("Unimplemented method 'findByCode'");

View File

@@ -1,10 +1,13 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.Contract; import com.ecep.contract.model.Contract;
import com.ecep.contract.model.ExtendVendorInfo; import com.ecep.contract.model.ExtendVendorInfo;
import com.ecep.contract.vm.ExtendVendorInfoViewModel; import com.ecep.contract.vm.ExtendVendorInfoViewModel;
public class ExtendVendorInfoService implements ViewModelService<ExtendVendorInfo, ExtendVendorInfoViewModel> { @Service
public class ExtendVendorInfoService extends QueryService<ExtendVendorInfo, ExtendVendorInfoViewModel> {
public ExtendVendorInfo findByContract(Contract contract) { public ExtendVendorInfo findByContract(Contract contract) {
throw new UnsupportedOperationException("Unimplemented method 'findByContract'"); throw new UnsupportedOperationException("Unimplemented method 'findByContract'");

View File

@@ -1,8 +1,11 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.Function; import com.ecep.contract.model.Function;
import com.ecep.contract.vm.FunctionViewModel; import com.ecep.contract.vm.FunctionViewModel;
public class FunctionService implements ViewModelService<Function, FunctionViewModel> { @Service
public class FunctionService extends QueryService<Function, FunctionViewModel> {
} }

View File

@@ -2,19 +2,18 @@ package com.ecep.contract.service;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.InventoryCatalog; import com.ecep.contract.model.InventoryCatalog;
import com.ecep.contract.vm.InventoryCatalogViewModel; import com.ecep.contract.vm.InventoryCatalogViewModel;
public class InventoryCatalogService implements ViewModelService<InventoryCatalog, InventoryCatalogViewModel> { @Service
public class InventoryCatalogService extends QueryService<InventoryCatalog, InventoryCatalogViewModel> {
public InventoryCatalog findByName(String v) { public InventoryCatalog findByName(String v) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'findByName'"); throw new UnsupportedOperationException("Unimplemented method 'findByName'");
} }
public List<InventoryCatalog> search(String searchText) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'findAll'");
}
} }

View File

@@ -1,11 +1,14 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.Inventory; import com.ecep.contract.model.Inventory;
import com.ecep.contract.model.InventoryHistoryPrice; import com.ecep.contract.model.InventoryHistoryPrice;
import com.ecep.contract.vm.InventoryHistoryPriceViewModel; import com.ecep.contract.vm.InventoryHistoryPriceViewModel;
@Service
public class InventoryHistoryPriceService public class InventoryHistoryPriceService
implements ViewModelService<InventoryHistoryPrice, InventoryHistoryPriceViewModel> { extends QueryService<InventoryHistoryPrice, InventoryHistoryPriceViewModel> {
public InventoryHistoryPrice[] findAllByInventory(Inventory parent) { public InventoryHistoryPrice[] findAllByInventory(Inventory parent) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -1,12 +1,13 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import java.util.List; import org.springframework.stereotype.Service;
import com.ecep.contract.MessageHolder; import com.ecep.contract.MessageHolder;
import com.ecep.contract.model.Inventory; import com.ecep.contract.model.Inventory;
import com.ecep.contract.vm.InventoryViewModel; import com.ecep.contract.vm.InventoryViewModel;
public class InventoryService implements ViewModelService<Inventory, InventoryViewModel> { @Service
public class InventoryService extends QueryService<Inventory, InventoryViewModel> {
public Inventory createNewInstance() { public Inventory createNewInstance() {
// TODO Auto-generated method stub // TODO Auto-generated method stub
@@ -18,11 +19,6 @@ public class InventoryService implements ViewModelService<Inventory, InventoryVi
throw new UnsupportedOperationException("Unimplemented method 'syncInventory'"); throw new UnsupportedOperationException("Unimplemented method 'syncInventory'");
} }
public List<Inventory> search(String searchText) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'findAllByProject'");
}
public Inventory findByCode(String code) { public Inventory findByCode(String code) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'findByCode'"); throw new UnsupportedOperationException("Unimplemented method 'findByCode'");

View File

@@ -1,8 +1,11 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.Invoice; import com.ecep.contract.model.Invoice;
import com.ecep.contract.vm.InvoiceViewModel; import com.ecep.contract.vm.InvoiceViewModel;
public class InvoiceService implements ViewModelService<Invoice, InvoiceViewModel> { @Service
public class InvoiceService extends QueryService<Invoice, InvoiceViewModel> {
} }

View File

@@ -2,10 +2,13 @@ package com.ecep.contract.service;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.Permission; import com.ecep.contract.model.Permission;
import com.ecep.contract.vm.PermissionViewModel; import com.ecep.contract.vm.PermissionViewModel;
public class PermissionService implements ViewModelService<Permission, PermissionViewModel> { @Service
public class PermissionService extends QueryService<Permission, PermissionViewModel> {
public List<Permission> findByFunctionId(int i) { public List<Permission> findByFunctionId(int i) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -1,9 +1,12 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.ProductType; import com.ecep.contract.model.ProductType;
import com.ecep.contract.vm.ProductTypeViewModel; import com.ecep.contract.vm.ProductTypeViewModel;
public class ProductTypeService implements ViewModelService<ProductType, ProductTypeViewModel> { @Service
public class ProductTypeService extends QueryService<ProductType, ProductTypeViewModel> {
public ProductType findByName(String name) { public ProductType findByName(String name) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -1,8 +1,11 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.ProductUsage; import com.ecep.contract.model.ProductUsage;
import com.ecep.contract.vm.ProductUsageViewModel; import com.ecep.contract.vm.ProductUsageViewModel;
public class ProductUsageService implements ViewModelService<ProductUsage, ProductUsageViewModel> { @Service
public class ProductUsageService extends QueryService<ProductUsage, ProductUsageViewModel> {
} }

View File

@@ -2,11 +2,14 @@ package com.ecep.contract.service;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.Project; import com.ecep.contract.model.Project;
import com.ecep.contract.model.ProjectBid; import com.ecep.contract.model.ProjectBid;
import com.ecep.contract.vm.ProjectBidViewModel; import com.ecep.contract.vm.ProjectBidViewModel;
public class ProjectBidService implements ViewModelService<ProjectBid, ProjectBidViewModel> { @Service
public class ProjectBidService extends QueryService<ProjectBid, ProjectBidViewModel> {
public List<ProjectBid> findAllByProject(Project project) { public List<ProjectBid> findAllByProject(Project project) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -2,11 +2,14 @@ package com.ecep.contract.service;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.ProjectCost; import com.ecep.contract.model.ProjectCost;
import com.ecep.contract.model.ProjectCostItem; import com.ecep.contract.model.ProjectCostItem;
import com.ecep.contract.vm.ProjectCostItemViewModel; import com.ecep.contract.vm.ProjectCostItemViewModel;
public class ProjectCostItemService implements ViewModelService<ProjectCostItem, ProjectCostItemViewModel> { @Service
public class ProjectCostItemService extends QueryService<ProjectCostItem, ProjectCostItemViewModel> {
public List<ProjectCostItem> findByCost(ProjectCost cost) { public List<ProjectCostItem> findByCost(ProjectCost cost) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -2,12 +2,15 @@ package com.ecep.contract.service;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service;
import com.ecep.contract.MessageHolder; import com.ecep.contract.MessageHolder;
import com.ecep.contract.model.Project; import com.ecep.contract.model.Project;
import com.ecep.contract.model.ProjectCost; import com.ecep.contract.model.ProjectCost;
import com.ecep.contract.vm.ProjectCostViewModel; import com.ecep.contract.vm.ProjectCostViewModel;
public class ProjectCostService implements ViewModelService<ProjectCost, ProjectCostViewModel> { @Service
public class ProjectCostService extends QueryService<ProjectCost, ProjectCostViewModel> {
public ProjectCost findAutoCostByProject(Project project) { public ProjectCost findAutoCostByProject(Project project) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -2,11 +2,14 @@ package com.ecep.contract.service;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.Project; import com.ecep.contract.model.Project;
import com.ecep.contract.model.ProjectFundPlan; import com.ecep.contract.model.ProjectFundPlan;
import com.ecep.contract.vm.ProjectFundPlanViewModel; import com.ecep.contract.vm.ProjectFundPlanViewModel;
public class ProjectFundPlanService implements ViewModelService<ProjectFundPlan, ProjectFundPlanViewModel> { @Service
public class ProjectFundPlanService extends QueryService<ProjectFundPlan, ProjectFundPlanViewModel> {
public List<ProjectFundPlan> findAllByProject(Project project) { public List<ProjectFundPlan> findAllByProject(Project project) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -1,8 +1,11 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.ProjectIndustry; import com.ecep.contract.model.ProjectIndustry;
import com.ecep.contract.vm.ProjectIndustryViewModel; import com.ecep.contract.vm.ProjectIndustryViewModel;
public class ProjectIndustryService implements ViewModelService<ProjectIndustry, ProjectIndustryViewModel> { @Service
public class ProjectIndustryService extends QueryService<ProjectIndustry, ProjectIndustryViewModel> {
} }

View File

@@ -2,11 +2,14 @@ package com.ecep.contract.service;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.Project; import com.ecep.contract.model.Project;
import com.ecep.contract.model.ProjectQuotation; import com.ecep.contract.model.ProjectQuotation;
import com.ecep.contract.vm.ProjectQuotationViewModel; import com.ecep.contract.vm.ProjectQuotationViewModel;
public class ProjectQuotationService implements ViewModelService<ProjectQuotation, ProjectQuotationViewModel>{ @Service
public class ProjectQuotationService extends QueryService<ProjectQuotation, ProjectQuotationViewModel> {
public List<ProjectQuotation> findAllByProject(Project project) { public List<ProjectQuotation> findAllByProject(Project project) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -2,25 +2,18 @@ package com.ecep.contract.service;
import java.util.List; import java.util.List;
import com.ecep.contract.model.ProjectSaleType; import org.springframework.stereotype.Service;
import com.ecep.contract.model.ProjectSaleTypeRequireFileType;
import com.ecep.contract.vm.ProjectSaleTypeViewModel;
public class ProjectSaleTypeRequireFileTypeService implements ViewModelService<ProjectSaleType, ProjectSaleTypeViewModel>{ import com.ecep.contract.model.ProjectSaleTypeRequireFileType;
import com.ecep.contract.vm.ProjectSaleTypeRequireFileTypeViewModel;
@Service
public class ProjectSaleTypeRequireFileTypeService
extends QueryService<ProjectSaleTypeRequireFileType, ProjectSaleTypeRequireFileTypeViewModel> {
public List<ProjectSaleTypeRequireFileType> findBySaleTypeId(Integer id) { public List<ProjectSaleTypeRequireFileType> findBySaleTypeId(Integer id) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'findBySaleTypeId'"); throw new UnsupportedOperationException("Unimplemented method 'findBySaleTypeId'");
} }
public void save(ProjectSaleTypeRequireFileType entity) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'save'");
}
public void delete(ProjectSaleTypeRequireFileType entity) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'delete'");
}
} }

View File

@@ -1,9 +1,12 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.ProjectSaleType; import com.ecep.contract.model.ProjectSaleType;
import com.ecep.contract.vm.ProjectSaleTypeViewModel; import com.ecep.contract.vm.ProjectSaleTypeViewModel;
public class ProjectSaleTypeService implements ViewModelService<ProjectSaleType, ProjectSaleTypeViewModel> { @Service
public class ProjectSaleTypeService extends QueryService<ProjectSaleType, ProjectSaleTypeViewModel> {
public ProjectSaleType findByCode(String substring) { public ProjectSaleType findByCode(String substring) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -1,5 +1,7 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.Contract; import com.ecep.contract.model.Contract;
import com.ecep.contract.model.Project; import com.ecep.contract.model.Project;
import com.ecep.contract.model.ProjectSaleType; import com.ecep.contract.model.ProjectSaleType;
@@ -8,13 +10,10 @@ import com.ecep.contract.vm.ProjectViewModel;
import java.io.File; import java.io.File;
import java.util.List; import java.util.List;
public class ProjectService implements ViewModelService<Project, ProjectViewModel> { @Service
public class ProjectService extends QueryService<Project, ProjectViewModel> {
public List<Project> search(String searchText) {
throw new UnsupportedOperationException();
}
public Project findByName(String name) { public Project findByName(String name) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }

View File

@@ -1,9 +1,12 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.ProjectType; import com.ecep.contract.model.ProjectType;
import com.ecep.contract.vm.ProjectTypeViewModel; import com.ecep.contract.vm.ProjectTypeViewModel;
public class ProjectTypeService implements ViewModelService<ProjectType, ProjectTypeViewModel> { @Service
public class ProjectTypeService extends QueryService<ProjectType, ProjectTypeViewModel> {
public ProjectType findByName(String name) { public ProjectType findByName(String name) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -1,9 +1,12 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.PurchaseBillVoucherItem; import com.ecep.contract.model.PurchaseBillVoucherItem;
import com.ecep.contract.vm.PurchaseBillVoucherItemViewModel; import com.ecep.contract.vm.PurchaseBillVoucherItemViewModel;
@Service
public class PurchaseBillVoucherItemService public class PurchaseBillVoucherItemService
implements ViewModelService<PurchaseBillVoucherItem, PurchaseBillVoucherItemViewModel> { extends QueryService<PurchaseBillVoucherItem, PurchaseBillVoucherItemViewModel> {
} }

View File

@@ -1,8 +1,11 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.PurchaseBillVoucher; import com.ecep.contract.model.PurchaseBillVoucher;
import com.ecep.contract.vm.PurchaseBillVoucherViewModel; import com.ecep.contract.vm.PurchaseBillVoucherViewModel;
public class PurchaseBillVoucherService implements ViewModelService<PurchaseBillVoucher, PurchaseBillVoucherViewModel> { @Service
public class PurchaseBillVoucherService extends QueryService<PurchaseBillVoucher, PurchaseBillVoucherViewModel> {
} }

View File

@@ -1,8 +1,11 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.PurchaseOrderItem; import com.ecep.contract.model.PurchaseOrderItem;
import com.ecep.contract.vm.PurchaseOrderItemViewModel; import com.ecep.contract.vm.PurchaseOrderItemViewModel;
public class PurchaseOrderItemService implements ViewModelService<PurchaseOrderItem, PurchaseOrderItemViewModel> { @Service
public class PurchaseOrderItemService extends QueryService<PurchaseOrderItem, PurchaseOrderItemViewModel> {
} }

View File

@@ -1,8 +1,11 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.PurchaseOrder; import com.ecep.contract.model.PurchaseOrder;
import com.ecep.contract.vm.PurchaseOrderViewModel; import com.ecep.contract.vm.PurchaseOrderViewModel;
public class PurchaseOrdersService implements ViewModelService<PurchaseOrder, PurchaseOrderViewModel> { @Service
public class PurchaseOrdersService extends QueryService<PurchaseOrder, PurchaseOrderViewModel> {
} }

View File

@@ -0,0 +1,156 @@
package com.ecep.contract.service;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import com.ecep.contract.WebSocketService;
import com.ecep.contract.model.IdentityEntity;
import com.ecep.contract.msg.SimpleMessage;
import com.ecep.contract.vm.IdentityViewModel;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
public class QueryService<T extends IdentityEntity, TV extends IdentityViewModel<T>>
implements ViewModelService<T, TV> {
@Autowired
protected WebSocketService webSocketService;
@Autowired
protected ObjectMapper objectMapper;
private long readTimeout = 30000;
@SuppressWarnings("unchecked")
public TV createNewViewModel() {
try {
Type genericSuperclass = getClass().getGenericSuperclass();
System.out.println("genericSuperclass = " + genericSuperclass.getClass());
String typeName = genericSuperclass.getTypeName();
// System.out.println("typeName = " + typeName);
String clz = typeName.split("<")[1].split(">")[0].split(",")[1].trim();
// System.out.println("clz = " + clz);
Class<?> clazz = Class.forName(clz);
return (TV) clazz.getDeclaredConstructor().newInstance();
} catch (Exception e) {
throw new RuntimeException("无法创建ViewModel实例", e);
}
}
@SuppressWarnings("unchecked")
public T createNewEntity() {
try {
Type genericSuperclass = getClass().getGenericSuperclass();
String typeName = genericSuperclass.getTypeName();
// System.out.println("typeName = " + typeName);
String clz = typeName.split("<")[1].split(">")[0].split(",")[0].trim();
// System.out.println("clz = " + clz);
Class<?> clazz = Class.forName(clz);
return (T) clazz.getDeclaredConstructor().newInstance();
} catch (Exception e) {
throw new RuntimeException("无法创建Entity实例", e);
}
}
@Override
public T save(T entity) {
SimpleMessage msg = new SimpleMessage();
msg.setService(getBeanName());
msg.setMethod("save");
msg.setArguments(entity);
try {
Object response = webSocketService.send(msg).get(readTimeout, TimeUnit.MILLISECONDS);
if (response != null) {
objectMapper.updateValue(entity, response);
}
} catch (Exception e) {
e.printStackTrace();
}
return entity;
}
@Override
public void delete(T entity) {
SimpleMessage msg = new SimpleMessage();
msg.setService(getBeanName());
msg.setMethod("delete");
msg.setArguments(entity);
try {
JsonNode response = webSocketService.send(msg).get(readTimeout, TimeUnit.MILLISECONDS);
if (response != null) {
objectMapper.updateValue(entity, response);
}
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public T findById(Integer id) {
SimpleMessage msg = new SimpleMessage();
msg.setService(getBeanName());
msg.setMethod("findById");
msg.setArguments(id);
try {
JsonNode response = webSocketService.send(msg).get(readTimeout, TimeUnit.MILLISECONDS);
if (response != null) {
T newEntity = createNewEntity();
objectMapper.updateValue(newEntity, response);
return newEntity;
}
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
@Override
public Page<T> findAll(Map<String, Object> params, Pageable pageable) {
SimpleMessage msg = new SimpleMessage();
msg.setService(getBeanName());
msg.setMethod("findAll");
msg.setArguments(params, pageable);
try {
JsonNode response = webSocketService.send(msg).get(readTimeout, TimeUnit.MILLISECONDS);
if (response != null) {
List<T> content = new ArrayList<>();
JsonNode contentNode = response.get("content");
if (contentNode != null && contentNode.isArray()) {
for (JsonNode node : contentNode) {
T newEntity = createNewEntity();
objectMapper.updateValue(newEntity, node);
content.add(newEntity);
}
}
JsonNode pageNode = response.get("page");
int total = pageNode.get("totalElements").asInt();
int totalPages = pageNode.get("totalPages").asInt();
int size = pageNode.get("size").asInt();
int number = pageNode.get("number").asInt();
PageRequest newPageable = PageRequest.of(number, size);
return new PageImpl<>(content, newPageable, total);
}
} catch (Exception e) {
throw new RuntimeException(e);
}
return null;
}
public List<T> search(String searchText) {
Map<String, Object> params = getSpecification(searchText);
List<T> list = findAll(params, Pageable.ofSize(10)).getContent();
return list;
}
}

View File

@@ -1,8 +1,11 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.SalesOrder; import com.ecep.contract.model.SalesOrder;
import com.ecep.contract.vm.SalesOrderViewModel; import com.ecep.contract.vm.SalesOrderViewModel;
public class SaleOrdersService implements ViewModelService<SalesOrder, SalesOrderViewModel> { @Service
public class SaleOrdersService extends QueryService<SalesOrder, SalesOrderViewModel> {
} }

View File

@@ -1,9 +1,12 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.ProjectSaleType; import com.ecep.contract.model.ProjectSaleType;
import com.ecep.contract.vm.ProjectSaleTypeViewModel; import com.ecep.contract.vm.ProjectSaleTypeViewModel;
public class SaleTypeService implements ViewModelService<ProjectSaleType, ProjectSaleTypeViewModel> { @Service
public class SaleTypeService extends QueryService<ProjectSaleType, ProjectSaleTypeViewModel> {
public ProjectSaleType findByName(String name) { public ProjectSaleType findByName(String name) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -1,8 +1,11 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.SalesBillVoucher; import com.ecep.contract.model.SalesBillVoucher;
import com.ecep.contract.vm.SalesBillVoucherViewModel; import com.ecep.contract.vm.SalesBillVoucherViewModel;
public class SalesBillVoucherService implements ViewModelService<SalesBillVoucher, SalesBillVoucherViewModel> { @Service
public class SalesBillVoucherService extends QueryService<SalesBillVoucher, SalesBillVoucherViewModel> {
} }

View File

@@ -1,8 +1,11 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.SalesOrderItem; import com.ecep.contract.model.SalesOrderItem;
import com.ecep.contract.vm.SalesOrderItemViewModel; import com.ecep.contract.vm.SalesOrderItemViewModel;
public class SalesOrderItemService implements ViewModelService<SalesOrderItem, SalesOrderItemViewModel> { @Service
public class SalesOrderItemService extends QueryService<SalesOrderItem, SalesOrderItemViewModel> {
} }

View File

@@ -5,9 +5,11 @@ import java.util.Map;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.SysConf; import com.ecep.contract.model.SysConf;
@Service
public class SysConfService { public class SysConfService {
public SysConf findById(String id) { public SysConf findById(String id) {

View File

@@ -2,11 +2,14 @@ package com.ecep.contract.service;
import java.util.List; import java.util.List;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.VendorGroupRequireFileType; import com.ecep.contract.model.VendorGroupRequireFileType;
import com.ecep.contract.vm.VendorGroupRequireFileTypeViewModel; import com.ecep.contract.vm.VendorGroupRequireFileTypeViewModel;
@Service
public class VendorGroupRequireFileTypeService public class VendorGroupRequireFileTypeService
implements ViewModelService<VendorGroupRequireFileType, VendorGroupRequireFileTypeViewModel> { extends QueryService<VendorGroupRequireFileType, VendorGroupRequireFileTypeViewModel> {
public List<VendorGroupRequireFileType> findByGroupId(Integer id) { public List<VendorGroupRequireFileType> findByGroupId(Integer id) {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -1,9 +1,12 @@
package com.ecep.contract.service; package com.ecep.contract.service;
import org.springframework.stereotype.Service;
import com.ecep.contract.model.VendorGroup; import com.ecep.contract.model.VendorGroup;
import com.ecep.contract.vm.VendorGroupViewModel; import com.ecep.contract.vm.VendorGroupViewModel;
public class VendorGroupService implements ViewModelService<VendorGroup, VendorGroupViewModel> { @Service
public class VendorGroupService extends QueryService<VendorGroup, VendorGroupViewModel> {
public VendorGroup newInstance() { public VendorGroup newInstance() {
// TODO Auto-generated method stub // TODO Auto-generated method stub

View File

@@ -5,6 +5,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
@@ -15,14 +16,27 @@ import com.ecep.contract.vm.IdentityViewModel;
/** /**
* 视图模型服务接口 * 视图模型服务接口
* *
* @param <T> 实体类型 * @pahor 2025-08-02
* @param <TV> 视图模型类型
* @author 2025-08-02
*/ */
public interface ViewModelService<T extends IdentityEntity, TV extends IdentityViewModel<T>> public interface ViewModelService<T extends IdentityEntity, TV extends IdentityViewModel<T>>
extends IEntityService<T> { extends IEntityService<T> {
// <ID, R extends MyRepository<T, ID>> R getRepository(); // <ID, R extends MyRepository<T, ID>> R getRepository();
default String getBeanName() {
String className = getClass().getSimpleName();
// 按照Spring默认的bean命名规则转换
// 1. 如果类名长度大于1且首两个字符都是大写则不转换
// 2. 否则,将首字母转为小写,其余部分保持不变
if (className.length() > 1 && Character.isUpperCase(className.charAt(0))
&& Character.isUpperCase(className.charAt(1))) {
return className;
}
// 将首字母转为小写
if (className.length() > 0) {
className = Character.toLowerCase(className.charAt(0)) + className.substring(1);
}
return className;
}
default T findById(Integer id) { default T findById(Integer id) {
return null; return null;
@@ -74,7 +88,6 @@ public interface ViewModelService<T extends IdentityEntity, TV extends IdentityV
@Override @Override
default T save(T entity) { default T save(T entity) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'save'"); throw new UnsupportedOperationException("Unimplemented method 'save'");
} }
@@ -85,8 +98,7 @@ public interface ViewModelService<T extends IdentityEntity, TV extends IdentityV
@Override @Override
default List<T> findAll() { default List<T> findAll() {
// TODO Auto-generated method stub return findAll(null, Pageable.unpaged()).getContent();
throw new UnsupportedOperationException("Unimplemented method 'findAll'");
} }
default Page<T> findAll(Map<String, Object> params, Pageable pageable) { default Page<T> findAll(Map<String, Object> params, Pageable pageable) {
@@ -105,5 +117,4 @@ public interface ViewModelService<T extends IdentityEntity, TV extends IdentityV
return params; return params;
} }
} }

View File

@@ -4,6 +4,7 @@ import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import org.controlsfx.control.TaskProgressView; import org.controlsfx.control.TaskProgressView;
import org.springframework.stereotype.Service;
import com.ecep.contract.Desktop; import com.ecep.contract.Desktop;
import com.ecep.contract.model.CloudYu; import com.ecep.contract.model.CloudYu;
@@ -16,7 +17,8 @@ import com.ecep.contract.vm.CloudYuInfoViewModel;
import javafx.concurrent.Task; import javafx.concurrent.Task;
public class YongYouU8Service implements ViewModelService<CloudYu, CloudYuInfoViewModel> { @Service
public class YongYouU8Service extends QueryService<CloudYu, CloudYuInfoViewModel> {
/** /**
* 生成定时同步任务 * 生成定时同步任务
@@ -51,4 +53,5 @@ public class YongYouU8Service implements ViewModelService<CloudYu, CloudYuInfoVi
// TODO Auto-generated method stub // TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getOrCreateCloudYu'"); throw new UnsupportedOperationException("Unimplemented method 'getOrCreateCloudYu'");
} }
} }

View File

@@ -3,7 +3,7 @@
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.layout.VBox?> <?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" <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"> fx:controller="com.ecep.contract.controller.YongYouU8ManagerWindowController">
<children> <children>
<MenuBar VBox.vgrow="NEVER"> <MenuBar VBox.vgrow="NEVER">
<menus> <menus>
@@ -45,7 +45,6 @@
</Menu> </Menu>
<Menu mnemonicParsing="false" text="Help"> <Menu mnemonicParsing="false" text="Help">
<items> <items>
<MenuItem mnemonicParsing="false" onAction="#onDateTransferAction" text="数据迁移"/>
<MenuItem mnemonicParsing="false" text="About MyHelloApp"/> <MenuItem mnemonicParsing="false" text="About MyHelloApp"/>
</items> </items>
</Menu> </Menu>

View File

@@ -7,7 +7,7 @@
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<BorderPane fx:id="root" maxHeight="900" maxWidth="1024" minHeight="300" minWidth="200" prefHeight="600.0" <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" prefWidth="800.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.company.controller.bank_account.BankAccountWindowController"> fx:controller="com.ecep.contract.controller.bank.account.BankAccountWindowController">
<center> <center>
<TabPane fx:id="tabPane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minWidth="150.0" <TabPane fx:id="tabPane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minWidth="150.0"
tabClosingPolicy="UNAVAILABLE" tabMaxWidth="100.0" tabMinWidth="40.0"> tabClosingPolicy="UNAVAILABLE" tabMaxWidth="100.0" tabMinWidth="40.0">

View File

@@ -3,7 +3,7 @@
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<VBox prefHeight="680.0" prefWidth="737.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" <VBox prefHeight="680.0" prefWidth="737.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.company.controller.CompanyManagerWindowController"> fx:controller="com.ecep.contract.controller.company.CompanyManagerWindowController">
<children> <children>
<MenuBar VBox.vgrow="NEVER"> <MenuBar VBox.vgrow="NEVER">
<menus> <menus>

View File

@@ -3,7 +3,7 @@
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" xmlns:fx="http://javafx.com/fxml/1" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.company.controller.CompanyTabSkinBankAccount"> fx:controller="com.ecep.contract.controller.company.CompanyTabSkinBankAccount">
<HBox spacing="3.0"> <HBox spacing="3.0">
<children> <children>
<TextField fx:id="bankAccountSearchKeyField" promptText="检索关键字"/> <TextField fx:id="bankAccountSearchKeyField" promptText="检索关键字"/>

View File

@@ -3,7 +3,7 @@
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" xmlns:fx="http://javafx.com/fxml/1" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.company.controller.CompanyTabSkinBlackReason"> fx:controller="com.ecep.contract.controller.tab.CompanyTabSkinBlackReason">
<children> <children>
<HBox spacing="3.0"> <HBox spacing="3.0">
<children> <children>

View File

@@ -3,7 +3,7 @@
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" xmlns:fx="http://javafx.com/fxml/1" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.company.controller.CompanyTabSkinContact"> fx:controller="com.ecep.contract.controller.company.CompanyTabSkinContact">
<HBox spacing="3.0"> <HBox spacing="3.0">
<children> <children>
<TextField fx:id="contactSearchKeyField" promptText="检索关键字"/> <TextField fx:id="contactSearchKeyField" promptText="检索关键字"/>

View File

@@ -11,7 +11,7 @@
<?import javafx.scene.control.ContextMenu?> <?import javafx.scene.control.ContextMenu?>
<?import javafx.scene.control.MenuItem?> <?import javafx.scene.control.MenuItem?>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" xmlns:fx="http://javafx.com/fxml/1" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.company.controller.CompanyTabSkinContract"> fx:controller="com.ecep.contract.controller.tab.CompanyTabSkinContract">
<children> <children>
<HBox spacing="3.0"> <HBox spacing="3.0">
<children> <children>

View File

@@ -10,7 +10,7 @@
<?import javafx.scene.control.TextField?> <?import javafx.scene.control.TextField?>
<?import javafx.scene.control.Separator?> <?import javafx.scene.control.Separator?>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" xmlns:fx="http://javafx.com/fxml/1" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.company.controller.CompanyTabSkinFile"> fx:controller="com.ecep.contract.controller.tab.CompanyTabSkinFile">
<children> <children>
<HBox spacing="3.0"> <HBox spacing="3.0">
<children> <children>

View File

@@ -3,7 +3,7 @@
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" xmlns:fx="http://javafx.com/fxml/1" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.company.controller.CompanyTabSkinInvoice"> fx:controller="com.ecep.contract.controller.tab.CompanyTabSkinInvoice">
<children> <children>
<HBox spacing="3.0"> <HBox spacing="3.0">
<children> <children>

View File

@@ -3,7 +3,7 @@
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" xmlns:fx="http://javafx.com/fxml/1" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.company.controller.CompanyTabSkinOldName"> fx:controller="com.ecep.contract.controller.tab.CompanyTabSkinOldName">
<HBox spacing="3.0"> <HBox spacing="3.0">
<children> <children>
<TextField fx:id="oldNameSearchKeyField" promptText="检索关键字"/> <TextField fx:id="oldNameSearchKeyField" promptText="检索关键字"/>

View File

@@ -5,7 +5,7 @@
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<ScrollPane fitToWidth="true" minHeight="300.0" minWidth="400.0" xmlns="http://javafx.com/javafx/22" <ScrollPane fitToWidth="true" minHeight="300.0" minWidth="400.0" xmlns="http://javafx.com/javafx/22"
xmlns:fx="http://javafx.com/fxml/1" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.company.controller.CompanyTabSkinOther"> fx:controller="com.ecep.contract.controller.tab.CompanyTabSkinOther">
<content> <content>
<VBox spacing="5.0"> <VBox spacing="5.0">
<children> <children>

View File

@@ -7,7 +7,7 @@
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<BorderPane fx:id="root" prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/22" <BorderPane fx:id="root" prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/22"
xmlns:fx="http://javafx.com/fxml/1" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.company.controller.CompanyWindowController"> fx:controller="com.ecep.contract.controller.company.CompanyWindowController">
<top> <top>
<ToolBar prefHeight="40.0" prefWidth="200.0" BorderPane.alignment="CENTER"> <ToolBar prefHeight="40.0" prefWidth="200.0" BorderPane.alignment="CENTER">
<items> <items>

View File

@@ -4,7 +4,7 @@
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<VBox prefHeight="680.0" prefWidth="1120.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" <VBox prefHeight="680.0" prefWidth="1120.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.vendor.controller.CompanyVendorManagerWindowController"> fx:controller="com.ecep.contract.controller.vendor.CompanyVendorManagerWindowController">
<children> <children>
<MenuBar VBox.vgrow="NEVER"> <MenuBar VBox.vgrow="NEVER">
<menus> <menus>

View File

@@ -4,7 +4,7 @@
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<VBox prefHeight="680.0" prefWidth="1120.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" <VBox prefHeight="680.0" prefWidth="1120.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.contract.controller.ContractManagerWindowController"> fx:controller="com.ecep.contract.controller.contract.ContractManagerWindowController">
<children> <children>
<MenuBar VBox.vgrow="NEVER"> <MenuBar VBox.vgrow="NEVER">
<menus> <menus>

View File

@@ -5,7 +5,7 @@
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"
xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.contract.controller.ContractTabSkinVendorBid"> fx:controller="com.ecep.contract.controller.contract.ContractTabSkinVendorBid">
<children> <children>
<HBox spacing="3.0"> <HBox spacing="3.0">
<children> <children>

View File

@@ -11,7 +11,7 @@
<?import javafx.scene.layout.RowConstraints?> <?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.VBox?>
<ScrollPane pannable="true" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.ecep.contract.manager.ds.contract.controller.ContractTabSkinExtendVendorInfo"> <ScrollPane pannable="true" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.ecep.contract.controller.contract.ContractTabSkinExtendVendorInfo">
<content> <content>
<VBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minWidth="100.0"> <VBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minWidth="100.0">
<children> <children>

View File

@@ -4,7 +4,7 @@
<?import javafx.scene.control.*?> <?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" xmlns:fx="http://javafx.com/fxml/1" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.contract.controller.ContractTabSkinFiles"> fx:controller="com.ecep.contract.controller.contract.ContractTabSkinFiles">
<children> <children>
<HBox spacing="3.0"> <HBox spacing="3.0">
<children> <children>

View File

@@ -5,7 +5,7 @@
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"
xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.contract.controller.ContractTabSkinItemsV2"> fx:controller="com.ecep.contract.controller.contract.ContractTabSkinItemsV2">
<children> <children>
<HBox spacing="3.0"> <HBox spacing="3.0">
<children> <children>

View File

@@ -5,7 +5,7 @@
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"
xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.contract.controller.ContractTabSkinItems"> fx:controller="com.ecep.contract.controller.contract.ContractTabSkinItems">
<children> <children>
<HBox spacing="3.0"> <HBox spacing="3.0">
<children> <children>

View File

@@ -5,7 +5,7 @@
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"
xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.contract.controller.ContractTabSkinPayPlan"> fx:controller="com.ecep.contract.controller.contract.ContractTabSkinPayPlan">
<children> <children>
<HBox spacing="3.0"> <HBox spacing="3.0">
<children> <children>

View File

@@ -5,7 +5,7 @@
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="400.0" prefWidth="600.0" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="400.0" prefWidth="600.0"
xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.contract.controller.ContractTabSkinPurchaseOrders" fx:controller="com.ecep.contract.controller.contract.ContractTabSkinPurchaseOrders"
> >
<children> <children>
<HBox spacing="3.0"> <HBox spacing="3.0">

View File

@@ -5,7 +5,7 @@
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"
xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.contract.controller.ContractTabSkinSaleOrders" fx:controller="com.ecep.contract.controller.contract.ContractTabSkinSaleOrders"
> >
<children> <children>
<HBox spacing="3.0"> <HBox spacing="3.0">

View File

@@ -5,7 +5,7 @@
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"
xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.contract.controller.ContractTabSkinSubContract" fx:controller="com.ecep.contract.controller.contract.ContractTabSkinSubContract"
> >
<children> <children>
<HBox spacing="3.0"> <HBox spacing="3.0">

View File

@@ -6,7 +6,7 @@
<?import javafx.scene.paint.Color?> <?import javafx.scene.paint.Color?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<VBox prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" <VBox prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.contract.controller.ContractVerifyWindowController"> fx:controller="com.ecep.contract.controller.contract.ContractVerifyWindowController">
<children> <children>
<MenuBar VBox.vgrow="NEVER"> <MenuBar VBox.vgrow="NEVER">
<menus> <menus>

View File

@@ -6,7 +6,7 @@
<?import org.controlsfx.glyphfont.Glyph?> <?import org.controlsfx.glyphfont.Glyph?>
<BorderPane fx:id="root" maxHeight="900" maxWidth="1024" minHeight="300" minWidth="200" prefHeight="561.0" <BorderPane fx:id="root" maxHeight="900" maxWidth="1024" minHeight="300" minWidth="200" prefHeight="561.0"
prefWidth="800.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" prefWidth="800.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.contract.controller.ContractWindowController"> fx:controller="com.ecep.contract.controller.contract.ContractWindowController">
<top> <top>
<ToolBar prefHeight="40.0" prefWidth="800.0" BorderPane.alignment="CENTER"> <ToolBar prefHeight="40.0" prefWidth="800.0" BorderPane.alignment="CENTER">
<items> <items>

View File

@@ -5,7 +5,7 @@
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"
xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.contract.controller.purchase_bill.PurchaseBillVoucherTabSkinItems"> fx:controller="com.ecep.contract.controller.contract.purchase_bill.PurchaseBillVoucherTabSkinItems">
<children> <children>
<HBox spacing="3.0"> <HBox spacing="3.0">
<children> <children>

Some files were not shown because too many files have changed in this diff Show More