feat: 添加日志配置和Logback依赖
refactor: 重构实体类equals和hashCode方法 fix: 修复WebSocketService消息发送逻辑 style: 格式化代码和优化导入 docs: 更新JacksonConfig日期序列化格式 test: 添加CompanyFilePathTableCell测试类 chore: 清理无用代码和注释
This commit is contained in:
@@ -73,6 +73,13 @@
|
|||||||
<artifactId>okhttp</artifactId>
|
<artifactId>okhttp</artifactId>
|
||||||
<version>4.12.0</version>
|
<version>4.12.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Logback 日志实现 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>ch.qos.logback</groupId>
|
||||||
|
<artifactId>logback-classic</artifactId>
|
||||||
|
<version>1.4.14</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import com.ecep.contract.controller.BaseController;
|
|||||||
import com.ecep.contract.controller.HomeWindowController;
|
import com.ecep.contract.controller.HomeWindowController;
|
||||||
import com.ecep.contract.controller.OkHttpLoginController;
|
import com.ecep.contract.controller.OkHttpLoginController;
|
||||||
import com.ecep.contract.task.TaskMonitorCenter;
|
import com.ecep.contract.task.TaskMonitorCenter;
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
import com.ecep.contract.util.TextMessageHolder;
|
import com.ecep.contract.util.TextMessageHolder;
|
||||||
import com.ecep.contract.util.UITools;
|
import com.ecep.contract.util.UITools;
|
||||||
import com.ecep.contract.vm.CurrentEmployee;
|
import com.ecep.contract.vm.CurrentEmployee;
|
||||||
@@ -37,12 +38,10 @@ 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 应用程序
|
||||||
@@ -187,6 +186,7 @@ public class Desktop extends Application {
|
|||||||
} else {
|
} else {
|
||||||
logger.warn("配置文件{}不存在", configFile.getAbsolutePath());
|
logger.warn("配置文件{}不存在", configFile.getAbsolutePath());
|
||||||
}
|
}
|
||||||
|
HibernateProxyUtils.useProxy(false);
|
||||||
|
|
||||||
runAsync(() -> {
|
runAsync(() -> {
|
||||||
SpringApp.launch(properties, holder);
|
SpringApp.launch(properties, holder);
|
||||||
@@ -204,12 +204,11 @@ public class Desktop extends Application {
|
|||||||
controller.setHolder(holder);
|
controller.setHolder(holder);
|
||||||
controller.setPrimaryStage(primaryStage);
|
controller.setPrimaryStage(primaryStage);
|
||||||
controller.setProperties(properties);
|
controller.setProperties(properties);
|
||||||
// while (true) {
|
while (true) {
|
||||||
controller.tryLogin().whenComplete((v, e) -> {
|
try {
|
||||||
if (e != null) {
|
controller.tryLogin().get();
|
||||||
holder.error("登录失败:" + e.getMessage());
|
|
||||||
} else {
|
|
||||||
holder.info("登录成功");
|
holder.info("登录成功");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
while (!SpringApp.isRunning()) {
|
while (!SpringApp.isRunning()) {
|
||||||
System.out.println("等待启动");
|
System.out.println("等待启动");
|
||||||
@@ -221,13 +220,13 @@ public class Desktop extends Application {
|
|||||||
|
|
||||||
// 必须要等待启动成功后才能关闭主场景,否则进程结束程序退出
|
// 必须要等待启动成功后才能关闭主场景,否则进程结束程序退出
|
||||||
HomeWindowController.show().thenRun(() -> Platform.runLater(primaryStage::close));
|
HomeWindowController.show().thenRun(() -> Platform.runLater(primaryStage::close));
|
||||||
}
|
|
||||||
});
|
|
||||||
// if (getActiveEmployeeId() > 0) {
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
break;
|
||||||
|
} catch (Exception ex) {
|
||||||
|
holder.error(ex.getMessage());
|
||||||
|
Thread.sleep(3000);
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
holder.error("登录失败:" + e.getMessage());
|
holder.error("登录失败:" + e.getMessage());
|
||||||
logger.error(e.getMessage(), e);
|
logger.error(e.getMessage(), e);
|
||||||
|
|||||||
@@ -237,14 +237,18 @@ public class SpringApp {
|
|||||||
public ObjectMapper objectMapper() {
|
public ObjectMapper objectMapper() {
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
JavaTimeModule javaTimeModule = new JavaTimeModule();
|
JavaTimeModule javaTimeModule = new JavaTimeModule();
|
||||||
|
// LocalDate
|
||||||
javaTimeModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ISO_LOCAL_DATE));
|
javaTimeModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ISO_LOCAL_DATE));
|
||||||
javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(
|
|
||||||
DateTimeFormatter.ofPattern(MyDateTimeUtils.DEFAULT_DATETIME_FORMAT_PATTERN)));
|
|
||||||
javaTimeModule.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
|
|
||||||
javaTimeModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ISO_LOCAL_DATE));
|
javaTimeModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ISO_LOCAL_DATE));
|
||||||
javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(
|
// LocalTime
|
||||||
DateTimeFormatter.ofPattern(MyDateTimeUtils.DEFAULT_DATETIME_FORMAT_PATTERN)));
|
javaTimeModule.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ISO_LOCAL_TIME));
|
||||||
javaTimeModule.addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ISO_LOCAL_TIME));
|
javaTimeModule.addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ISO_LOCAL_TIME));
|
||||||
|
// LocalDateTime
|
||||||
|
javaTimeModule.addSerializer(LocalDateTime.class,
|
||||||
|
new LocalDateTimeSerializer(DateTimeFormatter.ISO_LOCAL_DATE_TIME));
|
||||||
|
javaTimeModule.addDeserializer(LocalDateTime.class,
|
||||||
|
new LocalDateTimeDeserializer(DateTimeFormatter.ISO_LOCAL_DATE_TIME));
|
||||||
|
|
||||||
objectMapper.registerModule(javaTimeModule);
|
objectMapper.registerModule(javaTimeModule);
|
||||||
return objectMapper;
|
return objectMapper;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ public class WebSocketService {
|
|||||||
if (node.has("success")) {
|
if (node.has("success")) {
|
||||||
if (!node.get("success").asBoolean()) {
|
if (!node.get("success").asBoolean()) {
|
||||||
future.completeExceptionally(
|
future.completeExceptionally(
|
||||||
new RuntimeException("请求失败:" + node.get("message").asText()));
|
new RuntimeException("请求失败:来自服务器的消息=" + node.get("message").asText()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -153,9 +153,9 @@ public class WebSocketService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String json = objectMapper.writeValueAsString(msg);
|
String json = objectMapper.writeValueAsString(msg);
|
||||||
|
callbacks.put(msg.getMessageId(), future);
|
||||||
if (webSocket.send(json)) {
|
if (webSocket.send(json)) {
|
||||||
logger.debug("send message success:{}", json);
|
logger.debug("send message success:{}", json);
|
||||||
callbacks.put(msg.getMessageId(), future);
|
|
||||||
} else {
|
} else {
|
||||||
future.completeExceptionally(new RuntimeException("Failed to send WebSocket message"));
|
future.completeExceptionally(new RuntimeException("Failed to send WebSocket message"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.ecep.contract.controller.tab.AbstEntityBasedTabSkin;
|
|||||||
import com.ecep.contract.controller.tab.RefreshableSkin;
|
import com.ecep.contract.controller.tab.RefreshableSkin;
|
||||||
import com.ecep.contract.controller.tab.TabSkin;
|
import com.ecep.contract.controller.tab.TabSkin;
|
||||||
import com.ecep.contract.model.IdentityEntity;
|
import com.ecep.contract.model.IdentityEntity;
|
||||||
|
import com.ecep.contract.service.QueryService;
|
||||||
import com.ecep.contract.service.ViewModelService;
|
import com.ecep.contract.service.ViewModelService;
|
||||||
import com.ecep.contract.util.UITools;
|
import com.ecep.contract.util.UITools;
|
||||||
import com.ecep.contract.vm.BaseViewModel;
|
import com.ecep.contract.vm.BaseViewModel;
|
||||||
@@ -46,15 +47,28 @@ public abstract class AbstEntityController<T extends IdentityEntity, TV extends
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onShown(WindowEvent windowEvent) {
|
public void onShown(WindowEvent windowEvent) {
|
||||||
Class<?> aClass = getClass();
|
|
||||||
super.onShown(windowEvent);
|
super.onShown(windowEvent);
|
||||||
loadedFuture = CompletableFuture.supplyAsync(() -> {
|
ViewModelService<T, TV> service = getViewModelService();
|
||||||
T entity = loadEntity();
|
|
||||||
if (entity == null) {
|
if (service instanceof QueryService<T, TV> queryService) {
|
||||||
|
setStatus("读取...");
|
||||||
|
loadedFuture = queryService.asyncFindById(viewModel.getId().get());
|
||||||
|
loadedFuture.thenAccept(entity -> {
|
||||||
// fixed, bind change if new view model create
|
// fixed, bind change if new view model create
|
||||||
if (viewModel != null) {
|
if (viewModel != null) {
|
||||||
viewModel.bindListener();
|
viewModel.bindListener();
|
||||||
}
|
}
|
||||||
|
setStatus();
|
||||||
|
// BaseViewModel.updateInFxApplicationThread(entity, viewModel);
|
||||||
|
});
|
||||||
|
loadedFuture.exceptionally(ex -> {
|
||||||
|
handleException("载入失败,#" + viewModel.getId().get(), ex);
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
loadedFuture = CompletableFuture.supplyAsync(() -> {
|
||||||
|
T entity = getViewModelService().findById(viewModel.getId().get());
|
||||||
|
if (entity == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
@@ -64,6 +78,7 @@ public abstract class AbstEntityController<T extends IdentityEntity, TV extends
|
|||||||
viewModel.bindListener();
|
viewModel.bindListener();
|
||||||
return entity;
|
return entity;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
registerTabSkins();
|
registerTabSkins();
|
||||||
if (saveBtn != null) {
|
if (saveBtn != null) {
|
||||||
@@ -74,10 +89,6 @@ public abstract class AbstEntityController<T extends IdentityEntity, TV extends
|
|||||||
installTabSkins();
|
installTabSkins();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected T loadEntity() {
|
|
||||||
return getViewModelService().findById(viewModel.getId().get());
|
|
||||||
}
|
|
||||||
|
|
||||||
public T getEntity() {
|
public T getEntity() {
|
||||||
return getLoadedFuture().join();
|
return getLoadedFuture().join();
|
||||||
}
|
}
|
||||||
@@ -193,10 +204,20 @@ public abstract class AbstEntityController<T extends IdentityEntity, TV extends
|
|||||||
|
|
||||||
public CompletableFuture<Void> refresh() {
|
public CompletableFuture<Void> refresh() {
|
||||||
CompletableFuture<Void> future = new CompletableFuture<>();
|
CompletableFuture<Void> future = new CompletableFuture<>();
|
||||||
T entity = loadEntity();
|
ViewModelService<T, TV> service = getViewModelService();
|
||||||
|
if (service instanceof QueryService<T, TV> queryService) {
|
||||||
Platform.runLater(() -> {
|
loadedFuture = queryService.asyncFindById(viewModel.getId().get());
|
||||||
|
loadedFuture.whenComplete((entity, ex) -> {
|
||||||
|
if (ex != null) {
|
||||||
|
future.completeExceptionally(ex);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
BaseViewModel.updateInFxApplicationThread(entity, viewModel);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
T entity = service.findById(viewModel.getId().get());
|
||||||
setEntity(entity);
|
setEntity(entity);
|
||||||
|
}
|
||||||
|
|
||||||
List<RefreshableSkin> list = tabSkins.stream()
|
List<RefreshableSkin> list = tabSkins.stream()
|
||||||
.filter(v -> v instanceof RefreshableSkin)
|
.filter(v -> v instanceof RefreshableSkin)
|
||||||
@@ -204,10 +225,10 @@ public abstract class AbstEntityController<T extends IdentityEntity, TV extends
|
|||||||
|
|
||||||
if (list.isEmpty()) {
|
if (list.isEmpty()) {
|
||||||
future.complete(null);
|
future.complete(null);
|
||||||
return;
|
return future;
|
||||||
}
|
}
|
||||||
|
|
||||||
CompletableFuture.allOf(list
|
return CompletableFuture.allOf(list
|
||||||
.stream()
|
.stream()
|
||||||
.map(RefreshableSkin::refresh)
|
.map(RefreshableSkin::refresh)
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
@@ -219,9 +240,6 @@ public abstract class AbstEntityController<T extends IdentityEntity, TV extends
|
|||||||
future.complete(null);
|
future.complete(null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
|
||||||
return future;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract ViewModelService<T, TV> getViewModelService();
|
public abstract ViewModelService<T, TV> getViewModelService();
|
||||||
|
|||||||
@@ -104,26 +104,17 @@ public class OkHttpLoginController implements MessageHolder {
|
|||||||
String userName = getUserName();
|
String userName = getUserName();
|
||||||
String password = getPassword();
|
String password = getPassword();
|
||||||
|
|
||||||
CompletableFuture<Void> loginFuture = new CompletableFuture<>();
|
|
||||||
|
|
||||||
if (StringUtils.hasText(userName) && StringUtils.hasText(password)) {
|
if (StringUtils.hasText(userName) && StringUtils.hasText(password)) {
|
||||||
login(userName, password).whenComplete((v, e) -> {
|
return login(userName, password);
|
||||||
if (e != null) {
|
|
||||||
loginFuture.completeExceptionally(e);
|
|
||||||
} else {
|
|
||||||
loginFuture.complete(v);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
|
CompletableFuture<Void> loginFuture = new CompletableFuture<>();
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
showLoginDialog();
|
showLoginDialog();
|
||||||
if (!loginFuture.isDone()) {
|
|
||||||
loginFuture.complete(null);
|
loginFuture.complete(null);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
return loginFuture;
|
return loginFuture;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private String getUserName() {
|
private String getUserName() {
|
||||||
return properties.getProperty("user.name", "");
|
return properties.getProperty("user.name", "");
|
||||||
|
|||||||
@@ -12,14 +12,10 @@ import com.ecep.contract.vm.CompanyBasedViewModel;
|
|||||||
import com.ecep.contract.vm.CompanyViewModel;
|
import com.ecep.contract.vm.CompanyViewModel;
|
||||||
import com.ecep.contract.vm.IdentityViewModel;
|
import com.ecep.contract.vm.IdentityViewModel;
|
||||||
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
public abstract class AbstCompanyTableTabSkin<T extends IdentityEntity, TV extends IdentityViewModel<T>>
|
public abstract class AbstCompanyTableTabSkin<T extends IdentityEntity, TV extends IdentityViewModel<T>>
|
||||||
extends AbstEntityTableTabSkin<CompanyWindowController, Company, CompanyViewModel, T, TV>
|
extends AbstEntityTableTabSkin<CompanyWindowController, Company, CompanyViewModel, T, TV>
|
||||||
implements TabSkin, TableOfTabSkin<Company, T, TV> {
|
implements TabSkin, TableOfTabSkin<Company, T, TV> {
|
||||||
|
|
||||||
@Setter
|
|
||||||
private CompanyService companyService;
|
|
||||||
|
|
||||||
public AbstCompanyTableTabSkin(CompanyWindowController controller) {
|
public AbstCompanyTableTabSkin(CompanyWindowController controller) {
|
||||||
super(controller);
|
super(controller);
|
||||||
@@ -40,10 +36,7 @@ public abstract class AbstCompanyTableTabSkin<T extends IdentityEntity, TV exten
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected CompanyService getParentService() {
|
protected CompanyService getParentService() {
|
||||||
if (companyService == null) {
|
return controller.getViewModelService();
|
||||||
companyService = getBean(CompanyService.class);
|
|
||||||
}
|
|
||||||
return companyService;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -156,16 +156,6 @@ public class CompanyWindowController
|
|||||||
getTitle().set("[" + viewModel.getId().get() + "] " + viewModel.getName().getValue() + " 公司详情");
|
getTitle().set("[" + viewModel.getId().get() + "] " + viewModel.getName().getValue() + " 公司详情");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Company loadEntity() {
|
|
||||||
return companyService.findById(viewModel.getId().get());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Company saveEntity(Company entity) {
|
|
||||||
return companyService.save(entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void registerTabSkins() {
|
protected void registerTabSkins() {
|
||||||
registerTabSkin(baseInfoTab, tab1 -> new CompanyTabSkinBase(this));
|
registerTabSkin(baseInfoTab, tab1 -> new CompanyTabSkinBase(this));
|
||||||
|
|||||||
@@ -72,16 +72,6 @@ public class CompanyOldNameWindowController extends AbstEntityController<Company
|
|||||||
getTitle().set("[" + viewModel.getId().get() + "] " + viewModel.getName().getValue() + " 曾用名详情");
|
getTitle().set("[" + viewModel.getId().get() + "] " + viewModel.getName().getValue() + " 曾用名详情");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected CompanyOldName loadEntity() {
|
|
||||||
return getViewModelService().findById(viewModel.getId().get());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected CompanyOldName saveEntity(CompanyOldName entity) {
|
|
||||||
return getViewModelService().save(entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void registerTabSkins() {
|
protected void registerTabSkins() {
|
||||||
registerTabSkin(baseInfoTab, this::createBaseTabSkin);
|
registerTabSkin(baseInfoTab, this::createBaseTabSkin);
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package com.ecep.contract.controller.contract;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.context.annotation.Scope;
|
import org.springframework.context.annotation.Scope;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -23,7 +22,6 @@ import com.ecep.contract.model.Company;
|
|||||||
import com.ecep.contract.model.Contract;
|
import com.ecep.contract.model.Contract;
|
||||||
import com.ecep.contract.service.CompanyService;
|
import com.ecep.contract.service.CompanyService;
|
||||||
import com.ecep.contract.service.ContractService;
|
import com.ecep.contract.service.ContractService;
|
||||||
import com.ecep.contract.service.ProjectService;
|
|
||||||
import com.ecep.contract.task.ContractRepairTask;
|
import com.ecep.contract.task.ContractRepairTask;
|
||||||
import com.ecep.contract.task.ContractVerifyTasker;
|
import com.ecep.contract.task.ContractVerifyTasker;
|
||||||
import com.ecep.contract.util.FxmlPath;
|
import com.ecep.contract.util.FxmlPath;
|
||||||
|
|||||||
@@ -103,9 +103,6 @@ public class InventoryWindowController extends AbstEntityController<Inventory, I
|
|||||||
@FXML
|
@FXML
|
||||||
public TextField packagedVolumeField;
|
public TextField packagedVolumeField;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private InventoryService service;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onShown(WindowEvent windowEvent) {
|
public void onShown(WindowEvent windowEvent) {
|
||||||
super.onShown(windowEvent);
|
super.onShown(windowEvent);
|
||||||
@@ -116,16 +113,6 @@ public class InventoryWindowController extends AbstEntityController<Inventory, I
|
|||||||
root.getScene().getStylesheets().add("/ui/inventory/inventory.css");
|
root.getScene().getStylesheets().add("/ui/inventory/inventory.css");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Inventory loadEntity() {
|
|
||||||
return service.findById(viewModel.getId().get());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Inventory saveEntity(Inventory entity) {
|
|
||||||
return service.save(entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void registerTabSkins() {
|
protected void registerTabSkins() {
|
||||||
registerTabSkin(baseInfoTab, tab -> new InventoryTabSkinBase(this));
|
registerTabSkin(baseInfoTab, tab -> new InventoryTabSkinBase(this));
|
||||||
@@ -135,6 +122,6 @@ public class InventoryWindowController extends AbstEntityController<Inventory, I
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InventoryService getViewModelService() {
|
public InventoryService getViewModelService() {
|
||||||
return service;
|
return getCachedBean(InventoryService.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,17 +71,6 @@ public class EmployeeRoleWindowController extends AbstEntityController<EmployeeR
|
|||||||
@Autowired
|
@Autowired
|
||||||
EmployeeRoleService employeeRoleService;
|
EmployeeRoleService employeeRoleService;
|
||||||
|
|
||||||
@Override
|
|
||||||
protected EmployeeRole loadEntity() {
|
|
||||||
return employeeRoleService.findById(viewModel.getId().get());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected EmployeeRole saveEntity(EmployeeRole role) {
|
|
||||||
return employeeRoleService.save(role);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onShown(WindowEvent windowEvent) {
|
public void onShown(WindowEvent windowEvent) {
|
||||||
super.onShown(windowEvent);
|
super.onShown(windowEvent);
|
||||||
|
|||||||
@@ -151,16 +151,6 @@ public class ProjectWindowController extends AbstEntityController<Project, Proje
|
|||||||
getTitle().bind(Bindings.createStringBinding(() -> "[" + viewModel.getId().get() + "] " + viewModel.getCode().get() + " " + viewModel.getName().getValue() + " 项目详情", viewModel.getCode(), viewModel.getName()));
|
getTitle().bind(Bindings.createStringBinding(() -> "[" + viewModel.getId().get() + "] " + viewModel.getCode().get() + " " + viewModel.getName().getValue() + " 项目详情", viewModel.getCode(), viewModel.getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Project loadEntity() {
|
|
||||||
return projectService.findById(viewModel.getId().get());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Project saveEntity(Project entity) {
|
|
||||||
return projectService.save(entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void registerTabSkins() {
|
protected void registerTabSkins() {
|
||||||
registerTabSkin(baseInfoTab, this::createBaseTabSkin);
|
registerTabSkin(baseInfoTab, this::createBaseTabSkin);
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ public abstract class AbstGenericTabSkin<C extends BaseController> implements Ta
|
|||||||
this.controller = controller;
|
this.controller = controller;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public <T> T getBean(Class<T> requiredType) throws BeansException {
|
||||||
|
return controller.getCachedBean(requiredType);
|
||||||
|
}
|
||||||
|
|
||||||
public <T> T getCachedBean(Class<T> requiredType) throws BeansException {
|
public <T> T getCachedBean(Class<T> requiredType) throws BeansException {
|
||||||
return controller.getCachedBean(requiredType);
|
return controller.getCachedBean(requiredType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import java.util.Map;
|
|||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
import org.springframework.beans.BeansException;
|
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import com.ecep.contract.DesktopUtils;
|
import com.ecep.contract.DesktopUtils;
|
||||||
@@ -21,7 +20,6 @@ import com.ecep.contract.controller.table.cell.ContractTypeTableCell;
|
|||||||
import com.ecep.contract.controller.table.cell.EmployeeTableCell;
|
import com.ecep.contract.controller.table.cell.EmployeeTableCell;
|
||||||
import com.ecep.contract.controller.table.cell.LocalDateTimeTableCell;
|
import com.ecep.contract.controller.table.cell.LocalDateTimeTableCell;
|
||||||
import com.ecep.contract.converter.ContractGroupStringConverter;
|
import com.ecep.contract.converter.ContractGroupStringConverter;
|
||||||
import com.ecep.contract.converter.EmployeeStringConverter;
|
|
||||||
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.ContractGroup;
|
import com.ecep.contract.model.ContractGroup;
|
||||||
@@ -32,7 +30,6 @@ import com.ecep.contract.service.ContractGroupService;
|
|||||||
import com.ecep.contract.service.ContractKindService;
|
import com.ecep.contract.service.ContractKindService;
|
||||||
import com.ecep.contract.service.ContractService;
|
import com.ecep.contract.service.ContractService;
|
||||||
import com.ecep.contract.service.ContractTypeService;
|
import com.ecep.contract.service.ContractTypeService;
|
||||||
import com.ecep.contract.service.YongYouU8Service;
|
|
||||||
import com.ecep.contract.task.ContractRepairByCompanyTask;
|
import com.ecep.contract.task.ContractRepairByCompanyTask;
|
||||||
import com.ecep.contract.util.FxmlPath;
|
import com.ecep.contract.util.FxmlPath;
|
||||||
import com.ecep.contract.util.UITools;
|
import com.ecep.contract.util.UITools;
|
||||||
@@ -117,7 +114,7 @@ public class CompanyTabSkinContract
|
|||||||
|
|
||||||
ObservableList<ContractGroup> contractGroups = FXCollections.observableArrayList();
|
ObservableList<ContractGroup> contractGroups = FXCollections.observableArrayList();
|
||||||
contractGroups.add(null);
|
contractGroups.add(null);
|
||||||
contractGroups.addAll(getViewModelService().findAllGroups());
|
contractGroups.addAll(getContractGroupService().findAll());
|
||||||
contractGroupSelector.setItems(contractGroups);
|
contractGroupSelector.setItems(contractGroups);
|
||||||
contractGroupSelector.setConverter(new ContractGroupStringConverter(contractGroups));
|
contractGroupSelector.setConverter(new ContractGroupStringConverter(contractGroups));
|
||||||
contractSearchKeyField.setOnKeyReleased(event -> {
|
contractSearchKeyField.setOnKeyReleased(event -> {
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import com.ecep.contract.constant.CloudServiceConstant;
|
|||||||
import com.ecep.contract.controller.company.AbstCompanyTableTabSkin;
|
import com.ecep.contract.controller.company.AbstCompanyTableTabSkin;
|
||||||
import com.ecep.contract.controller.company.CompanyWindowController;
|
import com.ecep.contract.controller.company.CompanyWindowController;
|
||||||
import com.ecep.contract.controller.table.EditableEntityTableTabSkin;
|
import com.ecep.contract.controller.table.EditableEntityTableTabSkin;
|
||||||
|
import com.ecep.contract.controller.table.cell.CompanyFilePathTableCell;
|
||||||
import com.ecep.contract.model.Company;
|
import com.ecep.contract.model.Company;
|
||||||
import com.ecep.contract.model.CompanyFile;
|
import com.ecep.contract.model.CompanyFile;
|
||||||
import com.ecep.contract.model.CompanyFileTypeLocal;
|
import com.ecep.contract.model.CompanyFileTypeLocal;
|
||||||
@@ -36,9 +37,7 @@ import javafx.scene.control.Button;
|
|||||||
import javafx.scene.control.ButtonType;
|
import javafx.scene.control.ButtonType;
|
||||||
import javafx.scene.control.MenuItem;
|
import javafx.scene.control.MenuItem;
|
||||||
import javafx.scene.control.Tab;
|
import javafx.scene.control.Tab;
|
||||||
import javafx.scene.control.TableCell;
|
|
||||||
import javafx.scene.control.TableColumn;
|
import javafx.scene.control.TableColumn;
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -61,8 +60,6 @@ public class CompanyTabSkinFile
|
|||||||
public MenuItem fileTable_menu_del;
|
public MenuItem fileTable_menu_del;
|
||||||
public MenuItem fileTable_menu_copy_as_matched_by_contract;
|
public MenuItem fileTable_menu_copy_as_matched_by_contract;
|
||||||
|
|
||||||
@Setter
|
|
||||||
private CompanyFileService companyFileService;
|
|
||||||
private final ObservableMap<CompanyFileType, CompanyFileTypeLocal> fileTypeLocalMap = FXCollections
|
private final ObservableMap<CompanyFileType, CompanyFileTypeLocal> fileTypeLocalMap = FXCollections
|
||||||
.observableHashMap();
|
.observableHashMap();
|
||||||
|
|
||||||
@@ -72,11 +69,12 @@ public class CompanyTabSkinFile
|
|||||||
setDragAndDropFileHandler(this::moveFileToCompany);
|
setDragAndDropFileHandler(this::moveFileToCompany);
|
||||||
}
|
}
|
||||||
|
|
||||||
CompanyFileService getCompanyFileService() {
|
protected CompanyFileService getViewModelService() {
|
||||||
if (companyFileService == null) {
|
return getCompanyFileService();
|
||||||
companyFileService = getBean(CompanyFileService.class);
|
|
||||||
}
|
}
|
||||||
return companyFileService;
|
|
||||||
|
CompanyFileService getCompanyFileService() {
|
||||||
|
return getBean(CompanyFileService.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -96,7 +94,7 @@ public class CompanyTabSkinFile
|
|||||||
typeColumn.setCellValueFactory(param -> Bindings.valueAt(fileTypeLocalMap, param.getValue().getType())
|
typeColumn.setCellValueFactory(param -> Bindings.valueAt(fileTypeLocalMap, param.getValue().getType())
|
||||||
.map(CompanyFileTypeLocal::getValue));
|
.map(CompanyFileTypeLocal::getValue));
|
||||||
filePathColumn.setCellValueFactory(param -> param.getValue().getFilePath());
|
filePathColumn.setCellValueFactory(param -> param.getValue().getFilePath());
|
||||||
filePathColumn.setCellFactory(param -> new FileTableFilePathTableCell());
|
filePathColumn.setCellFactory(param -> new CompanyFilePathTableCell<>(viewModel.getPath()));
|
||||||
applyDateColumn.setCellValueFactory(param -> param.getValue().getApplyDate());
|
applyDateColumn.setCellValueFactory(param -> param.getValue().getApplyDate());
|
||||||
expiringDateColumn.setCellValueFactory(param -> param.getValue().getExpiringDate());
|
expiringDateColumn.setCellValueFactory(param -> param.getValue().getExpiringDate());
|
||||||
|
|
||||||
@@ -151,7 +149,7 @@ public class CompanyTabSkinFile
|
|||||||
* 把文件从 老系统中移到 \\10.84.209.8\项目信息\相关方信息 目录中
|
* 把文件从 老系统中移到 \\10.84.209.8\项目信息\相关方信息 目录中
|
||||||
*/
|
*/
|
||||||
private void onTableMoveFileAction(ActionEvent event) {
|
private void onTableMoveFileAction(ActionEvent event) {
|
||||||
CompanyFileService companyFileService = getViewModelService();
|
CompanyFileService companyFileService = getCompanyFileService();
|
||||||
Company company = getParent();
|
Company company = getParent();
|
||||||
List<CompanyFile> list = companyFileService.findByCompany(company);
|
List<CompanyFile> list = companyFileService.findByCompany(company);
|
||||||
if (list.isEmpty()) {
|
if (list.isEmpty()) {
|
||||||
@@ -354,26 +352,4 @@ public class CompanyTabSkinFile
|
|||||||
DesktopUtils.showInExplorer(file);
|
DesktopUtils.showInExplorer(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class FileTableFilePathTableCell extends TableCell<CompanyFileViewModel, String> {
|
|
||||||
@Override
|
|
||||||
protected void updateItem(String item, boolean empty) {
|
|
||||||
super.updateItem(item, empty);
|
|
||||||
if (empty || item == null) {
|
|
||||||
setText("");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
String path = viewModel.getPath().get();
|
|
||||||
if (StringUtils.hasText(path)) {
|
|
||||||
if (item.startsWith(path)) {
|
|
||||||
item = "~" + item.substring(path.length());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setText(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected CompanyFileService getViewModelService() {
|
|
||||||
return getCompanyFileService();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,35 +49,18 @@ public class ContractManagerSkin
|
|||||||
public ContractService getContractService() {
|
public ContractService getContractService() {
|
||||||
return controller.getViewModelService();
|
return controller.getViewModelService();
|
||||||
}
|
}
|
||||||
|
|
||||||
public CompanyService getCompanyService() {
|
public CompanyService getCompanyService() {
|
||||||
if (companyService == null) {
|
return getBean(CompanyService.class);
|
||||||
companyService = getBean(CompanyService.class);
|
|
||||||
}
|
}
|
||||||
return companyService;
|
|
||||||
}
|
|
||||||
|
|
||||||
private ContractTypeService getContractTypeService() {
|
private ContractTypeService getContractTypeService() {
|
||||||
if (contractTypeService == null) {
|
return getBean(ContractTypeService.class);
|
||||||
contractTypeService = getBean(ContractTypeService.class);
|
|
||||||
}
|
}
|
||||||
return contractTypeService;
|
|
||||||
}
|
|
||||||
|
|
||||||
private ContractKindService getContractKindService() {
|
private ContractKindService getContractKindService() {
|
||||||
if (contractKindService == null) {
|
return getBean(ContractKindService.class);
|
||||||
contractKindService = getBean(ContractKindService.class);
|
|
||||||
}
|
}
|
||||||
return contractKindService;
|
|
||||||
}
|
|
||||||
|
|
||||||
private ContractGroupService getContractGroupService() {
|
private ContractGroupService getContractGroupService() {
|
||||||
if (contractGroupService == null) {
|
return getBean(ContractGroupService.class);
|
||||||
contractGroupService = getBean(ContractGroupService.class);
|
|
||||||
}
|
}
|
||||||
return contractGroupService;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<String, Object> getSpecification() {
|
public Map<String, Object> getSpecification() {
|
||||||
Map<String, Object> params = super.getSpecification();
|
Map<String, Object> params = super.getSpecification();
|
||||||
if (controller.composeViewBtn.isSelected()) {
|
if (controller.composeViewBtn.isSelected()) {
|
||||||
@@ -108,7 +91,7 @@ public class ContractManagerSkin
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public void initializeTable() {
|
public void initializeTable() {
|
||||||
ComboBoxUtils.initialComboBox(controller.groupSelector, getContractService().findAllGroups(), true);
|
ComboBoxUtils.initialComboBox(controller.groupSelector, getContractGroupService().findAll(), true);
|
||||||
controller.groupSelector.valueProperty().addListener((observable, oldValue, newValue) -> {
|
controller.groupSelector.valueProperty().addListener((observable, oldValue, newValue) -> {
|
||||||
loadTableDataSet(false);
|
loadTableDataSet(false);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ public class ContractTabSkinBase extends AbstContractBasedTabSkin {
|
|||||||
initializeBaseTabCompanyFieldAutoCompletion(controller.companyField);
|
initializeBaseTabCompanyFieldAutoCompletion(controller.companyField);
|
||||||
|
|
||||||
controller.groupField.textProperty().bind(viewModel.getGroup().map(group -> {
|
controller.groupField.textProperty().bind(viewModel.getGroup().map(group -> {
|
||||||
ContractGroupService groupService = controller.getCachedBean(ContractGroupService.class);
|
ContractGroupService groupService = getContractGroupService();
|
||||||
if (!ProxyUtils.isInitialized(group)) {
|
if (!ProxyUtils.isInitialized(group)) {
|
||||||
group = groupService.findById(group.getId());
|
group = groupService.findById(group.getId());
|
||||||
}
|
}
|
||||||
@@ -506,22 +506,26 @@ public class ContractTabSkinBase extends AbstContractBasedTabSkin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public CompanyCustomerService getCompanyCustomerService() {
|
public CompanyCustomerService getCompanyCustomerService() {
|
||||||
return controller.getCachedBean(CompanyCustomerService.class);
|
return getCachedBean(CompanyCustomerService.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProjectService getProjectService() {
|
public ProjectService getProjectService() {
|
||||||
return controller.getCachedBean(ProjectService.class);
|
return getCachedBean(ProjectService.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProjectSaleTypeService getSaleTypeService() {
|
public ProjectSaleTypeService getSaleTypeService() {
|
||||||
return controller.getCachedBean(ProjectSaleTypeService.class);
|
return getCachedBean(ProjectSaleTypeService.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExtendVendorInfoService getExtendVendorInfoService() {
|
public ExtendVendorInfoService getExtendVendorInfoService() {
|
||||||
return controller.getCachedBean(ExtendVendorInfoService.class);
|
return getCachedBean(ExtendVendorInfoService.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ContractGroupService getContractGroupService() {
|
||||||
|
return getCachedBean(ContractGroupService.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public VendorGroupService getVendorGroupService() {
|
public VendorGroupService getVendorGroupService() {
|
||||||
return controller.getCachedBean(VendorGroupService.class);
|
return getCachedBean(VendorGroupService.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.ecep.contract.controller.table.cell;
|
||||||
|
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
|
import javafx.beans.property.SimpleStringProperty;
|
||||||
|
import javafx.scene.control.TableCell;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class CompanyFilePathTableCell<T> extends TableCell<T, String> {
|
||||||
|
private SimpleStringProperty companyPathProperty;
|
||||||
|
|
||||||
|
public void setCompanyPathProperty(SimpleStringProperty property) {
|
||||||
|
this.companyPathProperty = property;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void updateItem(String item, boolean empty) {
|
||||||
|
super.updateItem(item, empty);
|
||||||
|
if (empty || item == null) {
|
||||||
|
setText("");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (companyPathProperty != null) {
|
||||||
|
String path = companyPathProperty.get();
|
||||||
|
if (StringUtils.hasText(path)) {
|
||||||
|
if (item.startsWith(path)) {
|
||||||
|
item = "~" + item.substring(path.length());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setText(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -29,17 +29,6 @@ public class PurchaseBillVoucherWindowController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private PurchaseBillVoucherService service;
|
private PurchaseBillVoucherService service;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected PurchaseBillVoucher loadEntity() {
|
|
||||||
return service.findById(viewModel.getId().get());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected PurchaseBillVoucher saveEntity(PurchaseBillVoucher entity) {
|
|
||||||
return service.save(entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void show(Stage stage) {
|
public void show(Stage stage) {
|
||||||
super.show(stage);
|
super.show(stage);
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import com.ecep.contract.model.CompanyBlackReason;
|
|||||||
import com.ecep.contract.vm.CompanyBlackReasonViewModel;
|
import com.ecep.contract.vm.CompanyBlackReasonViewModel;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class CompanyBlackReasonService
|
public class CompanyBlackReasonService extends QueryService<CompanyBlackReason, CompanyBlackReasonViewModel> {
|
||||||
extends QueryService<CompanyBlackReason, CompanyBlackReasonViewModel> {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
package com.ecep.contract.service;
|
package com.ecep.contract.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import org.springframework.data.domain.Page;
|
|
||||||
import org.springframework.data.domain.Pageable;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.ecep.contract.model.ContractItem;
|
import com.ecep.contract.model.ContractItem;
|
||||||
@@ -14,31 +11,6 @@ import com.ecep.contract.vm.ContractItemViewModel;
|
|||||||
@Service
|
@Service
|
||||||
public class ContractItemService extends QueryService<ContractItem, ContractItemViewModel> {
|
public class ContractItemService extends QueryService<ContractItem, ContractItemViewModel> {
|
||||||
|
|
||||||
@Override
|
|
||||||
public ContractItem findById(Integer id) {
|
|
||||||
throw new UnsupportedOperationException("Unimplemented method 'findById'");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ContractItem save(ContractItem entity) {
|
|
||||||
throw new UnsupportedOperationException("Unimplemented method 'save'");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void delete(ContractItem entity) {
|
|
||||||
throw new UnsupportedOperationException("Unimplemented method 'delete'");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ContractItem> findAll() {
|
|
||||||
throw new UnsupportedOperationException("Unimplemented method 'findAll'");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Page<ContractItem> findAll(Map<String, Object> params, Pageable pageable) {
|
|
||||||
throw new UnsupportedOperationException("Unimplemented method 'findAll'");
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ContractItem> findAllByInventory(Inventory parent) {
|
public List<ContractItem> findAllByInventory(Inventory parent) {
|
||||||
throw new UnsupportedOperationException("Unimplemented method 'findAllByInventory'");
|
throw new UnsupportedOperationException("Unimplemented method 'findAllByInventory'");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ 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;
|
||||||
import com.ecep.contract.model.ContractFile;
|
import com.ecep.contract.model.ContractFile;
|
||||||
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;
|
||||||
|
|
||||||
@@ -22,10 +21,6 @@ public class ContractService extends QueryService<Contract, ContractViewModel> {
|
|||||||
throw new UnsupportedOperationException("Unimplemented method 'updateParentCode'");
|
throw new UnsupportedOperationException("Unimplemented method 'updateParentCode'");
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<ContractGroup> findAllGroups() {
|
|
||||||
throw new UnsupportedOperationException("Unimplemented method 'findAllGroups'");
|
|
||||||
}
|
|
||||||
|
|
||||||
public Contract findByCode(String string) {
|
public Contract findByCode(String string) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
throw new UnsupportedOperationException("Unimplemented method 'findByCode'");
|
throw new UnsupportedOperationException("Unimplemented method 'findByCode'");
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import java.lang.reflect.Type;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -12,10 +13,12 @@ import org.springframework.data.domain.PageImpl;
|
|||||||
import org.springframework.data.domain.PageRequest;
|
import org.springframework.data.domain.PageRequest;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
|
import com.ecep.contract.PageArgument;
|
||||||
import com.ecep.contract.WebSocketService;
|
import com.ecep.contract.WebSocketService;
|
||||||
import com.ecep.contract.model.IdentityEntity;
|
import com.ecep.contract.model.IdentityEntity;
|
||||||
import com.ecep.contract.msg.SimpleMessage;
|
import com.ecep.contract.msg.SimpleMessage;
|
||||||
import com.ecep.contract.vm.IdentityViewModel;
|
import com.ecep.contract.vm.IdentityViewModel;
|
||||||
|
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
@@ -31,8 +34,6 @@ public class QueryService<T extends IdentityEntity, TV extends IdentityViewModel
|
|||||||
public TV createNewViewModel() {
|
public TV createNewViewModel() {
|
||||||
try {
|
try {
|
||||||
Type genericSuperclass = getClass().getGenericSuperclass();
|
Type genericSuperclass = getClass().getGenericSuperclass();
|
||||||
System.out.println("genericSuperclass = " + genericSuperclass.getClass());
|
|
||||||
|
|
||||||
String typeName = genericSuperclass.getTypeName();
|
String typeName = genericSuperclass.getTypeName();
|
||||||
// System.out.println("typeName = " + typeName);
|
// System.out.println("typeName = " + typeName);
|
||||||
String clz = typeName.split("<")[1].split(">")[0].split(",")[1].trim();
|
String clz = typeName.split("<")[1].split(">")[0].split(",")[1].trim();
|
||||||
@@ -92,31 +93,49 @@ public class QueryService<T extends IdentityEntity, TV extends IdentityViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public CompletableFuture<T> asyncFindById(Integer id) {
|
||||||
public T findById(Integer id) {
|
|
||||||
SimpleMessage msg = new SimpleMessage();
|
SimpleMessage msg = new SimpleMessage();
|
||||||
msg.setService(getBeanName());
|
msg.setService(getBeanName());
|
||||||
msg.setMethod("findById");
|
msg.setMethod("findById");
|
||||||
msg.setArguments(id);
|
msg.setArguments(id);
|
||||||
try {
|
return webSocketService.send(msg).orTimeout(readTimeout, TimeUnit.MILLISECONDS).handle((response, ex) -> {
|
||||||
JsonNode response = webSocketService.send(msg).get(readTimeout, TimeUnit.MILLISECONDS);
|
if (ex != null) {
|
||||||
if (response != null) {
|
return null;
|
||||||
T newEntity = createNewEntity();
|
|
||||||
objectMapper.updateValue(newEntity, response);
|
|
||||||
return newEntity;
|
|
||||||
}
|
}
|
||||||
|
if (response == null) {
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
T newEntity = createNewEntity();
|
||||||
|
try {
|
||||||
|
objectMapper.updateValue(newEntity, response);
|
||||||
|
} catch (JsonMappingException e) {
|
||||||
|
throw new RuntimeException(response.toString(), e);
|
||||||
|
}
|
||||||
|
return newEntity;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public T findById(Integer id) {
|
||||||
|
try {
|
||||||
|
return asyncFindById(id).get();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<T> findAll() {
|
||||||
|
return findAll(null, Pageable.unpaged()).getContent();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<T> findAll(Map<String, Object> params, Pageable pageable) {
|
public Page<T> findAll(Map<String, Object> params, Pageable pageable) {
|
||||||
SimpleMessage msg = new SimpleMessage();
|
SimpleMessage msg = new SimpleMessage();
|
||||||
msg.setService(getBeanName());
|
msg.setService(getBeanName());
|
||||||
msg.setMethod("findAll");
|
msg.setMethod("findAll");
|
||||||
msg.setArguments(params, pageable);
|
msg.setArguments(params, PageArgument.of(pageable));
|
||||||
try {
|
try {
|
||||||
JsonNode response = webSocketService.send(msg).get(readTimeout, TimeUnit.MILLISECONDS);
|
JsonNode response = webSocketService.send(msg).get(readTimeout, TimeUnit.MILLISECONDS);
|
||||||
if (response != null) {
|
if (response != null) {
|
||||||
@@ -147,7 +166,6 @@ public class QueryService<T extends IdentityEntity, TV extends IdentityViewModel
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<T> search(String searchText) {
|
public List<T> search(String searchText) {
|
||||||
Map<String, Object> params = getSpecification(searchText);
|
Map<String, Object> params = getSpecification(searchText);
|
||||||
List<T> list = findAll(params, Pageable.ofSize(10)).getContent();
|
List<T> list = findAll(params, Pageable.ofSize(10)).getContent();
|
||||||
|
|||||||
@@ -20,8 +20,10 @@ public class IdentityViewModel<T extends IdentityEntity> extends BaseViewModel<T
|
|||||||
@Override
|
@Override
|
||||||
protected void updateFrom(T v) {
|
protected void updateFrom(T v) {
|
||||||
super.updateFrom(v);
|
super.updateFrom(v);
|
||||||
|
if (v.getId() != null) {
|
||||||
id.set(v.getId());
|
id.set(v.getId());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean copyTo(T v) {
|
public boolean copyTo(T v) {
|
||||||
|
|||||||
22
client/src/main/resources/logback.xml
Normal file
22
client/src/main/resources/logback.xml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<configuration>
|
||||||
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 设置 com.ecep.contract 包下的日志级别为 DEBUG -->
|
||||||
|
<logger name="com.ecep.contract" level="DEBUG" additivity="false">
|
||||||
|
<appender-ref ref="CONSOLE" />
|
||||||
|
</logger>
|
||||||
|
|
||||||
|
<!-- 特别设置 WebSocketService 类的日志级别为 DEBUG -->
|
||||||
|
<logger name="com.ecep.contract.WebSocketService" level="DEBUG" additivity="false">
|
||||||
|
<appender-ref ref="CONSOLE" />
|
||||||
|
</logger>
|
||||||
|
|
||||||
|
<!-- 根日志配置 -->
|
||||||
|
<root level="INFO">
|
||||||
|
<appender-ref ref="CONSOLE" />
|
||||||
|
</root>
|
||||||
|
</configuration>
|
||||||
@@ -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.controller.contract.ContractTabSkinVendorBid">
|
fx:controller="com.ecep.contract.controller.tab.ContractTabSkinVendorBid">
|
||||||
<children>
|
<children>
|
||||||
<HBox spacing="3.0">
|
<HBox spacing="3.0">
|
||||||
<children>
|
<children>
|
||||||
|
|||||||
@@ -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.controller.contract.ContractTabSkinFiles">
|
fx:controller="com.ecep.contract.controller.tab.ContractTabSkinFiles">
|
||||||
<children>
|
<children>
|
||||||
<HBox spacing="3.0">
|
<HBox spacing="3.0">
|
||||||
<children>
|
<children>
|
||||||
|
|||||||
@@ -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.controller.contract.ContractTabSkinItemsV2">
|
fx:controller="com.ecep.contract.controller.tab.ContractTabSkinItemsV2">
|
||||||
<children>
|
<children>
|
||||||
<HBox spacing="3.0">
|
<HBox spacing="3.0">
|
||||||
<children>
|
<children>
|
||||||
|
|||||||
@@ -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.controller.contract.ContractTabSkinItems">
|
fx:controller="com.ecep.contract.controller.tab.ContractTabSkinItems">
|
||||||
<children>
|
<children>
|
||||||
<HBox spacing="3.0">
|
<HBox spacing="3.0">
|
||||||
<children>
|
<children>
|
||||||
|
|||||||
@@ -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.controller.contract.ContractTabSkinPayPlan">
|
fx:controller="com.ecep.contract.controller.tab.ContractTabSkinPayPlan">
|
||||||
<children>
|
<children>
|
||||||
<HBox spacing="3.0">
|
<HBox spacing="3.0">
|
||||||
<children>
|
<children>
|
||||||
|
|||||||
@@ -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.controller.contract.ContractTabSkinPurchaseOrders"
|
fx:controller="com.ecep.contract.controller.tab.ContractTabSkinPurchaseOrders"
|
||||||
>
|
>
|
||||||
<children>
|
<children>
|
||||||
<HBox spacing="3.0">
|
<HBox spacing="3.0">
|
||||||
|
|||||||
@@ -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.controller.contract.ContractTabSkinSaleOrders"
|
fx:controller="com.ecep.contract.controller.tab.ContractTabSkinSaleOrders"
|
||||||
>
|
>
|
||||||
<children>
|
<children>
|
||||||
<HBox spacing="3.0">
|
<HBox spacing="3.0">
|
||||||
|
|||||||
@@ -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.controller.contract.ContractTabSkinSubContract"
|
fx:controller="com.ecep.contract.controller.tab.ContractTabSkinSubContract"
|
||||||
>
|
>
|
||||||
<children>
|
<children>
|
||||||
<HBox spacing="3.0">
|
<HBox spacing="3.0">
|
||||||
|
|||||||
76
common/src/main/java/com/ecep/contract/PageArgument.java
Normal file
76
common/src/main/java/com/ecep/contract/PageArgument.java
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
package com.ecep.contract;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import org.springframework.data.domain.PageRequest;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.data.domain.Sort;
|
||||||
|
import org.springframework.data.domain.Sort.Direction;
|
||||||
|
import org.springframework.data.domain.Sort.NullHandling;
|
||||||
|
import org.springframework.data.domain.Sort.Order;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PageArgument {
|
||||||
|
|
||||||
|
private boolean paged = false;
|
||||||
|
private int pageNumber = 0;
|
||||||
|
private int pageSize = 0;
|
||||||
|
private long offset = 0;
|
||||||
|
private List<OrderArgument> orders;
|
||||||
|
|
||||||
|
public static PageArgument of(Pageable pageable) {
|
||||||
|
PageArgument page = new PageArgument();
|
||||||
|
page.setPaged(pageable.isPaged());
|
||||||
|
if (page.isPaged()) {
|
||||||
|
page.setPageNumber(pageable.getPageNumber());
|
||||||
|
page.setPageSize(pageable.getPageSize());
|
||||||
|
page.setOffset(pageable.getOffset());
|
||||||
|
}
|
||||||
|
|
||||||
|
Sort sort = pageable.getSort();
|
||||||
|
if (sort != null && sort.isSorted()) {
|
||||||
|
page.setOrders(sort.stream().map(OrderArgument::of).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Pageable toPageable() {
|
||||||
|
Sort sort = null;
|
||||||
|
if (orders != null && !orders.isEmpty()) {
|
||||||
|
sort = Sort.by(orders.stream().map(order -> new Order(order.getDirection(), order.getProperty(),
|
||||||
|
order.isIgnoreCase(), order.getNullHandling()))
|
||||||
|
.collect(Collectors.toList()));
|
||||||
|
} else {
|
||||||
|
sort = Sort.unsorted();
|
||||||
|
}
|
||||||
|
if (isPaged()) {
|
||||||
|
return PageRequest.of(pageNumber, pageSize, sort);
|
||||||
|
}
|
||||||
|
return Pageable.unpaged(sort);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isUnpaged() {
|
||||||
|
return !isPaged();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public static class OrderArgument {
|
||||||
|
private Direction direction;
|
||||||
|
private String property;
|
||||||
|
private boolean ignoreCase;
|
||||||
|
private NullHandling nullHandling;
|
||||||
|
|
||||||
|
public static OrderArgument of(Order order) {
|
||||||
|
return new OrderArgument(order.getDirection(), order.getProperty(), order.isIgnoreCase(),
|
||||||
|
order.getNullHandling());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@ package com.ecep.contract.model;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -40,15 +40,7 @@ public class Bank implements BasedEntity, IdentityEntity, Serializable {
|
|||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object)
|
if (this == object)
|
||||||
return true;
|
return true;
|
||||||
if (object == null)
|
if (object == null || HibernateProxyUtils.isNotEffectiveClassEquals(this, object))
|
||||||
return false;
|
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy
|
|
||||||
? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: object.getClass();
|
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy
|
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: this.getClass();
|
|
||||||
if (thisEffectiveClass != oEffectiveClass)
|
|
||||||
return false;
|
return false;
|
||||||
Bank bank = (Bank) object;
|
Bank bank = (Bank) object;
|
||||||
return getId() != null && Objects.equals(getId(), bank.getId());
|
return getId() != null && Objects.equals(getId(), bank.getId());
|
||||||
@@ -56,8 +48,6 @@ public class Bank implements BasedEntity, IdentityEntity, Serializable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy
|
return HibernateProxyUtils.hashCode(this);
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode()
|
|
||||||
: getClass().hashCode();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import lombok.ToString;
|
|||||||
@Setter
|
@Setter
|
||||||
@MappedSuperclass
|
@MappedSuperclass
|
||||||
@ToString
|
@ToString
|
||||||
public class BaseEnumEntity<T extends Enum<?>> implements IdentityEntity {
|
public abstract class BaseEnumEntity<T extends Enum<?>> implements IdentityEntity {
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@Column(name = "ID", nullable = false)
|
@Column(name = "ID", nullable = false)
|
||||||
@@ -33,4 +33,5 @@ public class BaseEnumEntity<T extends Enum<?>> implements IdentityEntity {
|
|||||||
|
|
||||||
@Column(name = "VALUE")
|
@Column(name = "VALUE")
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.Instant;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.FetchType;
|
import jakarta.persistence.FetchType;
|
||||||
@@ -133,4 +135,22 @@ public class CloudRk implements IdentityEntity, Serializable {
|
|||||||
*/
|
*/
|
||||||
@Column(name = "VERSION", nullable = false)
|
@Column(name = "VERSION", nullable = false)
|
||||||
private Integer version = 0;
|
private Integer version = 0;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null)
|
||||||
|
return false;
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
CloudRk cloudRk = (CloudRk) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), cloudRk.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,8 @@ import java.time.Instant;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -71,28 +72,21 @@ public class CloudTyc implements IdentityEntity, Serializable {
|
|||||||
private int version;
|
private int version;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object o) {
|
public final boolean equals(Object object) {
|
||||||
if (this == o)
|
if (this == object)
|
||||||
return true;
|
return true;
|
||||||
if (o == null)
|
if (object == null)
|
||||||
return false;
|
return false;
|
||||||
Class<?> oEffectiveClass = o instanceof HibernateProxy
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
? ((HibernateProxy) o).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: o.getClass();
|
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy
|
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: this.getClass();
|
|
||||||
if (thisEffectiveClass != oEffectiveClass)
|
|
||||||
return false;
|
return false;
|
||||||
CloudTyc cloudInfo = (CloudTyc) o;
|
}
|
||||||
|
CloudTyc cloudInfo = (CloudTyc) object;
|
||||||
return getId() != null && Objects.equals(getId(), cloudInfo.getId());
|
return getId() != null && Objects.equals(getId(), cloudInfo.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy
|
return HibernateProxyUtils.hashCode(this);
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode()
|
|
||||||
: getClass().hashCode();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3,9 +3,12 @@ package com.ecep.contract.model;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.FetchType;
|
import jakarta.persistence.FetchType;
|
||||||
@@ -69,4 +72,22 @@ public class CloudYu implements IdentityEntity, Serializable {
|
|||||||
*/
|
*/
|
||||||
@Column(name = "CLOUD_LATEST")
|
@Column(name = "CLOUD_LATEST")
|
||||||
private Instant cloudLatest;
|
private Instant cloudLatest;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null)
|
||||||
|
return false;
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
CloudYu cloudYu = (CloudYu) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), cloudYu.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import java.time.LocalDate;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -185,15 +186,7 @@ public class Company implements IdentityEntity, NamedEntity, BasedEntity, Serial
|
|||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object)
|
if (this == object)
|
||||||
return true;
|
return true;
|
||||||
if (object == null)
|
if (object == null || HibernateProxyUtils.isNotEffectiveClassEquals(this, object))
|
||||||
return false;
|
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy
|
|
||||||
? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: object.getClass();
|
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy
|
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: this.getClass();
|
|
||||||
if (thisEffectiveClass != oEffectiveClass)
|
|
||||||
return false;
|
return false;
|
||||||
Company company = (Company) object;
|
Company company = (Company) object;
|
||||||
return getId() != null && Objects.equals(getId(), company.getId());
|
return getId() != null && Objects.equals(getId(), company.getId());
|
||||||
@@ -201,9 +194,7 @@ public class Company implements IdentityEntity, NamedEntity, BasedEntity, Serial
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy
|
return HibernateProxyUtils.hashCode(this);
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode()
|
|
||||||
: getClass().hashCode();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.FetchType;
|
import jakarta.persistence.FetchType;
|
||||||
import jakarta.persistence.GeneratedValue;
|
import jakarta.persistence.GeneratedValue;
|
||||||
@@ -49,9 +53,23 @@ public class CompanyBankAccount implements IdentityEntity, BasedEntity, Company
|
|||||||
@Column(name = "DESCRIPTION")
|
@Column(name = "DESCRIPTION")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toPrettyString() {
|
public String toPrettyString() {
|
||||||
return account;
|
return account;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null || HibernateProxyUtils.isNotEffectiveClassEquals(this, object))
|
||||||
|
return false;
|
||||||
|
CompanyBankAccount that = (CompanyBankAccount) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,13 @@ package com.ecep.contract.model;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.annotations.OnDelete;
|
import org.hibernate.annotations.OnDelete;
|
||||||
import org.hibernate.annotations.OnDeleteAction;
|
import org.hibernate.annotations.OnDeleteAction;
|
||||||
|
|
||||||
import com.ecep.contract.BlackReasonType;
|
import com.ecep.contract.BlackReasonType;
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
@@ -71,4 +73,21 @@ public class CompanyBlackReason implements IdentityEntity, CompanyBasedEntity,
|
|||||||
@Column(name = "`KEY`")
|
@Column(name = "`KEY`")
|
||||||
private String key;
|
private String key;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null)
|
||||||
|
return false;
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
CompanyBlackReason that = (CompanyBlackReason) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,8 @@ import java.time.LocalDate;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -85,15 +86,7 @@ public class CompanyContact implements IdentityEntity, NamedEntity, BasedEntity,
|
|||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object)
|
if (this == object)
|
||||||
return true;
|
return true;
|
||||||
if (object == null)
|
if (object == null || HibernateProxyUtils.isNotEffectiveClassEquals(this, object))
|
||||||
return false;
|
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy
|
|
||||||
? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: object.getClass();
|
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy
|
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: this.getClass();
|
|
||||||
if (thisEffectiveClass != oEffectiveClass)
|
|
||||||
return false;
|
return false;
|
||||||
CompanyContact that = (CompanyContact) object;
|
CompanyContact that = (CompanyContact) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
@@ -101,9 +94,7 @@ public class CompanyContact implements IdentityEntity, NamedEntity, BasedEntity,
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy
|
return HibernateProxyUtils.hashCode(this);
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode()
|
|
||||||
: getClass().hashCode();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,9 @@ package com.ecep.contract.model;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -27,7 +30,7 @@ import lombok.ToString;
|
|||||||
}, uniqueConstraints = {
|
}, uniqueConstraints = {
|
||||||
|
|
||||||
})
|
})
|
||||||
@ToString(exclude = {"company", "contract"})
|
@ToString(exclude = { "company", "contract" })
|
||||||
public class CompanyContract implements IdentityEntity, CompanyBasedEntity, Serializable {
|
public class CompanyContract implements IdentityEntity, CompanyBasedEntity, Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@@ -54,4 +57,22 @@ public class CompanyContract implements IdentityEntity, CompanyBasedEntity, Seri
|
|||||||
contact.getPhone() +
|
contact.getPhone() +
|
||||||
contact.getEmail();
|
contact.getEmail();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null)
|
||||||
|
return false;
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
CompanyContract that = (CompanyContract) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ import java.time.LocalDate;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -79,15 +80,7 @@ public class CompanyCustomer implements IdentityEntity, CompanyBasedEntity, Seri
|
|||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object)
|
if (this == object)
|
||||||
return true;
|
return true;
|
||||||
if (object == null)
|
if (object == null || HibernateProxyUtils.isNotEffectiveClassEquals(this, object))
|
||||||
return false;
|
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy
|
|
||||||
? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: object.getClass();
|
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy
|
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: this.getClass();
|
|
||||||
if (thisEffectiveClass != oEffectiveClass)
|
|
||||||
return false;
|
return false;
|
||||||
CompanyCustomer that = (CompanyCustomer) object;
|
CompanyCustomer that = (CompanyCustomer) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
@@ -95,8 +88,6 @@ public class CompanyCustomer implements IdentityEntity, CompanyBasedEntity, Seri
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy
|
return HibernateProxyUtils.hashCode(this);
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode()
|
|
||||||
: getClass().hashCode();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@ import java.time.LocalDate;
|
|||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -102,22 +102,15 @@ public class CompanyCustomerEntity implements IdentityEntity, Serializable {
|
|||||||
return true;
|
return true;
|
||||||
if (object == null)
|
if (object == null)
|
||||||
return false;
|
return false;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: object.getClass();
|
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy
|
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: this.getClass();
|
|
||||||
if (thisEffectiveClass != oEffectiveClass)
|
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
CompanyCustomerEntity that = (CompanyCustomerEntity) object;
|
CompanyCustomerEntity that = (CompanyCustomerEntity) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy
|
return HibernateProxyUtils.hashCode(this);
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode()
|
|
||||||
: getClass().hashCode();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.CascadeType;
|
import jakarta.persistence.CascadeType;
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -62,9 +66,23 @@ public class CompanyCustomerEvaluationFormFile implements IdentityEntity, BasedE
|
|||||||
@Column(name = "SCORE_TEMPLATE_VER")
|
@Column(name = "SCORE_TEMPLATE_VER")
|
||||||
private Integer scoreTemplateVersion = 1;
|
private Integer scoreTemplateVersion = 1;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toPrettyString() {
|
public String toPrettyString() {
|
||||||
return getCatalog() + ", level=" + getCreditLevel();
|
return getCatalog() + ", level=" + getCreditLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null || HibernateProxyUtils.isNotEffectiveClassEquals(this, object))
|
||||||
|
return false;
|
||||||
|
CompanyCustomerEvaluationFormFile that = (CompanyCustomerEvaluationFormFile) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,10 @@ package com.ecep.contract.model;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyCustomerFileType;
|
import com.ecep.contract.CompanyCustomerFileType;
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -61,4 +63,19 @@ public class CompanyCustomerFile implements CompanyBasicFile<CompanyCustomerFile
|
|||||||
|
|
||||||
@Column(name = "VALID")
|
@Column(name = "VALID")
|
||||||
private boolean valid = false;
|
private boolean valid = false;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null || HibernateProxyUtils.isNotEffectiveClassEquals(this, object))
|
||||||
|
return false;
|
||||||
|
CompanyCustomerFile that = (CompanyCustomerFile) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyCustomerFileType;
|
import com.ecep.contract.CompanyCustomerFileType;
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
@@ -18,4 +20,21 @@ import lombok.ToString;
|
|||||||
public class CompanyCustomerFileTypeLocal extends BaseEnumEntity<CompanyCustomerFileType> implements Serializable {
|
public class CompanyCustomerFileTypeLocal extends BaseEnumEntity<CompanyCustomerFileType> implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null)
|
||||||
|
return false;
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
CompanyCustomerFileTypeLocal that = (CompanyCustomerFileTypeLocal) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ import java.io.Serializable;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -49,20 +50,18 @@ public class CompanyExtendInfo implements IdentityEntity, Serializable {
|
|||||||
@ToString.Exclude
|
@ToString.Exclude
|
||||||
private int version;
|
private int version;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null || HibernateProxyUtils.isNotEffectiveClassEquals(this, object))
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
|
||||||
CompanyExtendInfo that = (CompanyExtendInfo) object;
|
CompanyExtendInfo that = (CompanyExtendInfo) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,10 @@ package com.ecep.contract.model;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyFileType;
|
import com.ecep.contract.CompanyFileType;
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -61,4 +63,22 @@ public class CompanyFile implements IdentityEntity, CompanyBasedEntity, Seriali
|
|||||||
*/
|
*/
|
||||||
@Column(name = "FILE_PATH")
|
@Column(name = "FILE_PATH")
|
||||||
private String filePath;
|
private String filePath;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null)
|
||||||
|
return false;
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
CompanyFile that = (CompanyFile) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyFileType;
|
import com.ecep.contract.CompanyFileType;
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
@@ -17,4 +19,22 @@ import lombok.ToString;
|
|||||||
@ToString
|
@ToString
|
||||||
public class CompanyFileTypeLocal extends BaseEnumEntity<CompanyFileType> implements Serializable {
|
public class CompanyFileTypeLocal extends BaseEnumEntity<CompanyFileType> implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null)
|
||||||
|
return false;
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
CompanyFileTypeLocal that = (CompanyFileTypeLocal) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.ecep.contract.model;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -63,18 +63,20 @@ public class CompanyInvoiceInfo implements IdentityEntity, NamedEntity, BasedEnt
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object o) {
|
public final boolean equals(Object object) {
|
||||||
if (this == o) return true;
|
if (this == object)
|
||||||
if (o == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = o instanceof HibernateProxy ? ((HibernateProxy) o).getHibernateLazyInitializer().getPersistentClass() : o.getClass();
|
if (object == null)
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
CompanyInvoiceInfo that = (CompanyInvoiceInfo) o;
|
return false;
|
||||||
|
}
|
||||||
|
CompanyInvoiceInfo that = (CompanyInvoiceInfo) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import java.time.LocalDate;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -62,18 +63,20 @@ public class CompanyOldName implements IdentityEntity, NamedEntity, Serializable
|
|||||||
private int version;
|
private int version;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object o) {
|
public final boolean equals(Object object) {
|
||||||
if (this == o) return true;
|
if (this == object)
|
||||||
if (o == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = o instanceof HibernateProxy ? ((HibernateProxy) o).getHibernateLazyInitializer().getPersistentClass() : o.getClass();
|
if (object == null)
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
CompanyOldName that = (CompanyOldName) o;
|
return false;
|
||||||
|
}
|
||||||
|
CompanyOldName that = (CompanyOldName) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,9 +7,9 @@ import java.util.List;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
|
|
||||||
import com.ecep.contract.VendorType;
|
import com.ecep.contract.VendorType;
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -46,7 +46,6 @@ public class CompanyVendor implements IdentityEntity, CompanyBasedEntity, Serial
|
|||||||
@Column(name = "TYPE")
|
@Column(name = "TYPE")
|
||||||
private VendorType type;
|
private VendorType type;
|
||||||
|
|
||||||
|
|
||||||
@ColumnDefault("false")
|
@ColumnDefault("false")
|
||||||
@Column(name = "PROTOCOL_PROVIDER", nullable = false)
|
@Column(name = "PROTOCOL_PROVIDER", nullable = false)
|
||||||
private boolean protocolProvider = false;
|
private boolean protocolProvider = false;
|
||||||
@@ -107,17 +106,19 @@ public class CompanyVendor implements IdentityEntity, CompanyBasedEntity, Serial
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null)
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
CompanyVendor that = (CompanyVendor) object;
|
CompanyVendor that = (CompanyVendor) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,9 @@ package com.ecep.contract.model;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -31,13 +34,11 @@ public class CompanyVendorApprovedFile implements IdentityEntity, Serializable {
|
|||||||
@Column(name = "ID", nullable = false)
|
@Column(name = "ID", nullable = false)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "LIST_ID", nullable = false)
|
@JoinColumn(name = "LIST_ID", nullable = false)
|
||||||
@ToString.Exclude
|
@ToString.Exclude
|
||||||
private CompanyVendorApprovedList list;
|
private CompanyVendorApprovedList list;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件名,不含目录,目录使用目录的目录
|
* 文件名,不含目录,目录使用目录的目录
|
||||||
*/
|
*/
|
||||||
@@ -56,4 +57,21 @@ public class CompanyVendorApprovedFile implements IdentityEntity, Serializable {
|
|||||||
@Column(name = "DESCRIPTION")
|
@Column(name = "DESCRIPTION")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null)
|
||||||
|
return false;
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
CompanyVendorApprovedFile that = (CompanyVendorApprovedFile) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ package com.ecep.contract.model;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
|
|
||||||
import com.ecep.contract.VendorType;
|
import com.ecep.contract.VendorType;
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -66,17 +65,19 @@ public class CompanyVendorApprovedItem implements IdentityEntity, Serializable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null)
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
CompanyVendorApprovedItem that = (CompanyVendorApprovedItem) object;
|
CompanyVendorApprovedItem that = (CompanyVendorApprovedItem) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import java.io.Serializable;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -16,7 +16,6 @@ import lombok.Getter;
|
|||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合格供应商名录
|
* 合格供应商名录
|
||||||
* 每年一条记录
|
* 每年一条记录
|
||||||
@@ -60,17 +59,19 @@ public class CompanyVendorApprovedList implements IdentityEntity, Serializable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null)
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
CompanyVendorApprovedList that = (CompanyVendorApprovedList) object;
|
CompanyVendorApprovedList that = (CompanyVendorApprovedList) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import java.time.LocalDate;
|
|||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -20,7 +20,6 @@ import lombok.Getter;
|
|||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 供应商的关联详细项,关联信息用于绑定U8系统中的供应商编号
|
* 供应商的关联详细项,关联信息用于绑定U8系统中的供应商编号
|
||||||
*/
|
*/
|
||||||
@@ -96,20 +95,18 @@ public class CompanyVendorEntity implements IdentityEntity, Serializable {
|
|||||||
@Column(name = "FETCHED_TIME")
|
@Column(name = "FETCHED_TIME")
|
||||||
private LocalDateTime fetchedTime;
|
private LocalDateTime fetchedTime;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null || HibernateProxyUtils.isNotEffectiveClassEquals(this, object))
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
|
||||||
CompanyVendorEntity that = (CompanyVendorEntity) object;
|
CompanyVendorEntity that = (CompanyVendorEntity) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,10 @@ package com.ecep.contract.model;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyVendorFileType;
|
import com.ecep.contract.CompanyVendorFileType;
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -64,4 +66,22 @@ public class CompanyVendorFile implements CompanyBasicFile<CompanyVendorFileType
|
|||||||
|
|
||||||
@Column(name = "VALID")
|
@Column(name = "VALID")
|
||||||
private boolean valid = false;
|
private boolean valid = false;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null)
|
||||||
|
return false;
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
CompanyVendorFile that = (CompanyVendorFile) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyVendorFileType;
|
import com.ecep.contract.CompanyVendorFileType;
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
@@ -17,5 +20,21 @@ import lombok.ToString;
|
|||||||
@Table(name = "COMPANY_VENDOR_FILE_TYPE_LOCAL")
|
@Table(name = "COMPANY_VENDOR_FILE_TYPE_LOCAL")
|
||||||
@ToString
|
@ToString
|
||||||
public class CompanyVendorFileTypeLocal extends BaseEnumEntity<CompanyVendorFileType> {
|
public class CompanyVendorFileTypeLocal extends BaseEnumEntity<CompanyVendorFileType> {
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null)
|
||||||
|
return false;
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
CompanyVendorFileTypeLocal that = (CompanyVendorFileTypeLocal) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import java.time.LocalDateTime;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
|
|
||||||
import com.ecep.contract.ContractPayWay;
|
import com.ecep.contract.ContractPayWay;
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -71,11 +71,26 @@ public class Contract implements IdentityEntity, NamedEntity, BasedEntity, Compa
|
|||||||
* 合同状态,U8 系统中的合同状态,目前含义未知
|
* 合同状态,U8 系统中的合同状态,目前含义未知
|
||||||
* <table>
|
* <table>
|
||||||
* <caption>各个状态值的统计情况如下,数据样本日期:2025-02-08</caption>
|
* <caption>各个状态值的统计情况如下,数据样本日期:2025-02-08</caption>
|
||||||
* <tr><th>State</th><th>Count</th></tr>
|
* <tr>
|
||||||
* <tr><td>null</td><td>3891</td></tr>
|
* <th>State</th>
|
||||||
* <tr><td>A</td><td>9</td></tr>
|
* <th>Count</th>
|
||||||
* <tr><td>B</td><td>6499</td></tr>
|
* </tr>
|
||||||
* <tr><td>C</td><td>79</td></tr>
|
* <tr>
|
||||||
|
* <td>null</td>
|
||||||
|
* <td>3891</td>
|
||||||
|
* </tr>
|
||||||
|
* <tr>
|
||||||
|
* <td>A</td>
|
||||||
|
* <td>9</td>
|
||||||
|
* </tr>
|
||||||
|
* <tr>
|
||||||
|
* <td>B</td>
|
||||||
|
* <td>6499</td>
|
||||||
|
* </tr>
|
||||||
|
* <tr>
|
||||||
|
* <td>C</td>
|
||||||
|
* <td>79</td>
|
||||||
|
* </tr>
|
||||||
* </table>
|
* </table>
|
||||||
*/
|
*/
|
||||||
@Column(name = "STATE")
|
@Column(name = "STATE")
|
||||||
@@ -83,21 +98,21 @@ public class Contract implements IdentityEntity, NamedEntity, BasedEntity, Compa
|
|||||||
/**
|
/**
|
||||||
* 合同分组
|
* 合同分组
|
||||||
*/
|
*/
|
||||||
// @ManyToOne(fetch = FetchType.EAGER)
|
// @ManyToOne(fetch = FetchType.EAGER)
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "GROUP_ID")
|
@JoinColumn(name = "GROUP_ID")
|
||||||
private ContractGroup group;
|
private ContractGroup group;
|
||||||
/**
|
/**
|
||||||
* 分类
|
* 分类
|
||||||
*/
|
*/
|
||||||
// @ManyToOne(fetch = FetchType.EAGER)
|
// @ManyToOne(fetch = FetchType.EAGER)
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "TYPE_ID")
|
@JoinColumn(name = "TYPE_ID")
|
||||||
private ContractType type;
|
private ContractType type;
|
||||||
/**
|
/**
|
||||||
* 性质
|
* 性质
|
||||||
*/
|
*/
|
||||||
// @ManyToOne(fetch = FetchType.EAGER)
|
// @ManyToOne(fetch = FetchType.EAGER)
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "KIND_ID")
|
@JoinColumn(name = "KIND_ID")
|
||||||
private ContractKind kind;
|
private ContractKind kind;
|
||||||
@@ -267,7 +282,6 @@ public class Contract implements IdentityEntity, NamedEntity, BasedEntity, Compa
|
|||||||
@Column(name = "EXEC_UNTAX_AMOUNT")
|
@Column(name = "EXEC_UNTAX_AMOUNT")
|
||||||
private double execUnTaxAmount;
|
private double execUnTaxAmount;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toPrettyString() {
|
public String toPrettyString() {
|
||||||
return getCode() + " " + getName();
|
return getCode() + " " + getName();
|
||||||
@@ -275,17 +289,19 @@ public class Contract implements IdentityEntity, NamedEntity, BasedEntity, Compa
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null)
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
Contract contract = (Contract) object;
|
Contract contract = (Contract) object;
|
||||||
return getId() != null && Objects.equals(getId(), contract.getId());
|
return getId() != null && Objects.equals(getId(), contract.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -57,22 +59,15 @@ public class ContractBidVendor implements IdentityEntity, ContractBasedEntity, S
|
|||||||
return true;
|
return true;
|
||||||
if (object == null)
|
if (object == null)
|
||||||
return false;
|
return false;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: object.getClass();
|
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy
|
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: this.getClass();
|
|
||||||
if (thisEffectiveClass != oEffectiveClass)
|
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
ContractBidVendor that = (ContractBidVendor) object;
|
ContractBidVendor that = (ContractBidVendor) object;
|
||||||
return equals(that);
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy
|
return HibernateProxyUtils.hashCode(this);
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode()
|
|
||||||
: getClass().hashCode();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.ecep.contract.model;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -53,17 +53,19 @@ public class ContractCatalog implements IdentityEntity, NamedEntity, Serializabl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null)
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
ContractCatalog that = (ContractCatalog) object;
|
ContractCatalog that = (ContractCatalog) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,8 @@ import java.io.Serializable;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
|
|
||||||
import com.ecep.contract.ContractFileType;
|
import com.ecep.contract.ContractFileType;
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -68,17 +67,19 @@ public class ContractFile implements IdentityEntity, ContractBasedEntity, Serial
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null)
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
ContractFile that = (ContractFile) object;
|
ContractFile that = (ContractFile) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.ContractFileType;
|
import com.ecep.contract.ContractFileType;
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -24,4 +27,21 @@ public class ContractFileTypeLocal extends BaseEnumEntity<ContractFileType> {
|
|||||||
@Column(name = "SUGGEST_FILE_NAME")
|
@Column(name = "SUGGEST_FILE_NAME")
|
||||||
private String suggestFileName;
|
private String suggestFileName;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null)
|
||||||
|
return false;
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ContractFileTypeLocal that = (ContractFileTypeLocal) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.ecep.contract.model;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -51,17 +51,19 @@ public class ContractGroup implements IdentityEntity, NamedEntity, Serializable
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null)
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
ContractGroup that = (ContractGroup) object;
|
ContractGroup that = (ContractGroup) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import java.time.LocalDate;
|
|||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -76,7 +76,6 @@ public class ContractItem implements IdentityEntity, ContractBasedEntity, BasedE
|
|||||||
@ToString.Exclude
|
@ToString.Exclude
|
||||||
private Inventory inventory;
|
private Inventory inventory;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 不含税单价
|
* 不含税单价
|
||||||
*/
|
*/
|
||||||
@@ -148,17 +147,19 @@ public class ContractItem implements IdentityEntity, ContractBasedEntity, BasedE
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null)
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
ContractItem that = (ContractItem) object;
|
ContractItem that = (ContractItem) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.ecep.contract.model;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -39,7 +39,6 @@ public class ContractKind implements IdentityEntity, NamedEntity, Serializable {
|
|||||||
@Column(name = "NAME")
|
@Column(name = "NAME")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
@Column(name = "TITLE")
|
@Column(name = "TITLE")
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
@@ -53,17 +52,19 @@ public class ContractKind implements IdentityEntity, NamedEntity, Serializable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null)
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
ContractKind that = (ContractKind) object;
|
ContractKind that = (ContractKind) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ package com.ecep.contract.model;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -41,7 +44,6 @@ public class ContractPayPlan implements IdentityEntity, ContractBasedEntity, Ser
|
|||||||
@Column(name = "REF_ID")
|
@Column(name = "REF_ID")
|
||||||
private Integer refId;
|
private Integer refId;
|
||||||
|
|
||||||
|
|
||||||
@Column(name = "PAY_DATE")
|
@Column(name = "PAY_DATE")
|
||||||
private LocalDate payDate;
|
private LocalDate payDate;
|
||||||
|
|
||||||
@@ -66,4 +68,22 @@ public class ContractPayPlan implements IdentityEntity, ContractBasedEntity, Ser
|
|||||||
*/
|
*/
|
||||||
@Column(name = "UPDATE_TIME")
|
@Column(name = "UPDATE_TIME")
|
||||||
private LocalDateTime updateDate;
|
private LocalDateTime updateDate;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null)
|
||||||
|
return false;
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ContractPayPlan that = (ContractPayPlan) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,7 @@ package com.ecep.contract.model;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -59,17 +59,19 @@ public class ContractType implements IdentityEntity, NamedEntity, Serializable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null)
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
ContractType that = (ContractType) object;
|
ContractType that = (ContractType) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,18 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
import jakarta.persistence.*;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.GeneratedValue;
|
||||||
|
import jakarta.persistence.GenerationType;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* U8系统的 客户分类
|
* U8系统的 客户分类
|
||||||
@@ -45,22 +51,15 @@ public class CustomerCatalog implements BasedEntity {
|
|||||||
return true;
|
return true;
|
||||||
if (object == null)
|
if (object == null)
|
||||||
return false;
|
return false;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: object.getClass();
|
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy
|
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: this.getClass();
|
|
||||||
if (thisEffectiveClass != oEffectiveClass)
|
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
CustomerCatalog that = (CustomerCatalog) object;
|
CustomerCatalog that = (CustomerCatalog) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy
|
return HibernateProxyUtils.hashCode(this);
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode()
|
|
||||||
: getClass().hashCode();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ package com.ecep.contract.model;
|
|||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -76,4 +79,22 @@ public class CustomerSatisfactionSurvey implements IdentityEntity, ProjectBasedE
|
|||||||
*/
|
*/
|
||||||
@Column(name = "DESCRIPTION")
|
@Column(name = "DESCRIPTION")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null)
|
||||||
|
return false;
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
CustomerSatisfactionSurvey that = (CustomerSatisfactionSurvey) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.ecep.contract.model;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -51,17 +51,19 @@ public class DeliverySignMethod implements BasedEntity, IdentityEntity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null)
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
DeliverySignMethod that = (DeliverySignMethod) object;
|
DeliverySignMethod that = (DeliverySignMethod) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,7 @@ package com.ecep.contract.model;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.FetchType;
|
import jakarta.persistence.FetchType;
|
||||||
@@ -31,7 +31,6 @@ public class Department implements BasedEntity, IdentityEntity, Serializable {
|
|||||||
@Column(name = "CODE")
|
@Column(name = "CODE")
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
|
|
||||||
@Column(name = "NAME")
|
@Column(name = "NAME")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@@ -50,17 +49,16 @@ public class Department implements BasedEntity, IdentityEntity, Serializable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null || HibernateProxyUtils.isNotEffectiveClassEquals(this, object))
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
|
||||||
Department that = (Department) object;
|
Department that = (Department) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,7 @@ import java.io.Serializable;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
|
||||||
@@ -118,15 +117,7 @@ public class Employee implements BasedEntity, IdentityEntity, NamedEntity, Seria
|
|||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object)
|
if (this == object)
|
||||||
return true;
|
return true;
|
||||||
if (object == null)
|
if (object == null || HibernateProxyUtils.isNotEffectiveClassEquals(this, object))
|
||||||
return false;
|
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy
|
|
||||||
? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: object.getClass();
|
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy
|
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: this.getClass();
|
|
||||||
if (thisEffectiveClass != oEffectiveClass)
|
|
||||||
return false;
|
return false;
|
||||||
Employee employee = (Employee) object;
|
Employee employee = (Employee) object;
|
||||||
return getId() != null && Objects.equals(getId(), employee.getId());
|
return getId() != null && Objects.equals(getId(), employee.getId());
|
||||||
@@ -134,8 +125,6 @@ public class Employee implements BasedEntity, IdentityEntity, NamedEntity, Seria
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy
|
return HibernateProxyUtils.hashCode(this);
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode()
|
|
||||||
: getClass().hashCode();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,22 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import jakarta.persistence.*;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.FetchType;
|
||||||
|
import jakarta.persistence.GeneratedValue;
|
||||||
|
import jakarta.persistence.GenerationType;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.JoinColumn;
|
||||||
|
import jakarta.persistence.ManyToOne;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@@ -50,7 +58,6 @@ public class EmployeeAuthBind implements BasedEntity, IdentityEntity, Serializab
|
|||||||
@Column(name = "DESCRIPTION")
|
@Column(name = "DESCRIPTION")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toPrettyString() {
|
public String toPrettyString() {
|
||||||
return ip + " " + mac;
|
return ip + " " + mac;
|
||||||
@@ -58,17 +65,19 @@ public class EmployeeAuthBind implements BasedEntity, IdentityEntity, Serializab
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null)
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
EmployeeAuthBind bank = (EmployeeAuthBind) object;
|
EmployeeAuthBind bank = (EmployeeAuthBind) object;
|
||||||
return getId() != null && Objects.equals(getId(), bank.getId());
|
return getId() != null && Objects.equals(getId(), bank.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,27 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
import jakarta.persistence.*;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.FetchType;
|
||||||
|
import jakarta.persistence.GeneratedValue;
|
||||||
|
import jakarta.persistence.GenerationType;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.JoinColumn;
|
||||||
|
import jakarta.persistence.ManyToOne;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@jakarta.persistence.Entity
|
@jakarta.persistence.Entity
|
||||||
@Table(name = "EMPLOYEE_LOGIN_HISTORY", schema = "supplier_ms")
|
@Table(name = "EMPLOYEE_LOGIN_HISTORY", schema = "supplier_ms")
|
||||||
public class EmployeeLoginHistory implements BasedEntity ,IdentityEntity, Serializable {
|
public class EmployeeLoginHistory implements BasedEntity, IdentityEntity, Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@@ -37,7 +45,6 @@ public class EmployeeLoginHistory implements BasedEntity ,IdentityEntity, Serial
|
|||||||
@Column(name = "LATEST_ACTIVE")
|
@Column(name = "LATEST_ACTIVE")
|
||||||
private LocalDateTime activeTime;
|
private LocalDateTime activeTime;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toPrettyString() {
|
public String toPrettyString() {
|
||||||
return ip + " " + mac;
|
return ip + " " + mac;
|
||||||
@@ -45,17 +52,19 @@ public class EmployeeLoginHistory implements BasedEntity ,IdentityEntity, Serial
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null)
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
EmployeeLoginHistory bank = (EmployeeLoginHistory) object;
|
return false;
|
||||||
return getId() != null && Objects.equals(getId(), bank.getId());
|
}
|
||||||
|
EmployeeLoginHistory that = (EmployeeLoginHistory) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,24 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
import jakarta.persistence.*;
|
import java.io.Serializable;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
|
||||||
|
import jakarta.persistence.CascadeType;
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.FetchType;
|
||||||
|
import jakarta.persistence.GeneratedValue;
|
||||||
|
import jakarta.persistence.GenerationType;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.JoinColumn;
|
||||||
|
import jakarta.persistence.JoinTable;
|
||||||
|
import jakarta.persistence.ManyToMany;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@jakarta.persistence.Entity
|
@jakarta.persistence.Entity
|
||||||
@@ -53,4 +64,22 @@ public class EmployeeRole implements IdentityEntity, NamedEntity, Serializable {
|
|||||||
@JoinTable(name = "EMPLOYEE_ROLES", joinColumns = @JoinColumn(name = "ROLE_ID"), inverseJoinColumns = @JoinColumn(name = "EMPLOYEE_ID"))
|
@JoinTable(name = "EMPLOYEE_ROLES", joinColumns = @JoinColumn(name = "ROLE_ID"), inverseJoinColumns = @JoinColumn(name = "EMPLOYEE_ID"))
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
private java.util.List<Employee> employees = new java.util.ArrayList<>();
|
private java.util.List<Employee> employees = new java.util.ArrayList<>();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null)
|
||||||
|
return false;
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
EmployeeRole that = (EmployeeRole) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.ecep.contract.model;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -62,22 +62,15 @@ public class ExtendVendorInfo implements IdentityEntity {
|
|||||||
return true;
|
return true;
|
||||||
if (object == null)
|
if (object == null)
|
||||||
return false;
|
return false;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: object.getClass();
|
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy
|
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: this.getClass();
|
|
||||||
if (thisEffectiveClass != oEffectiveClass)
|
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
ExtendVendorInfo that = (ExtendVendorInfo) object;
|
ExtendVendorInfo that = (ExtendVendorInfo) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy
|
return HibernateProxyUtils.hashCode(this);
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode()
|
|
||||||
: getClass().hashCode();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,18 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
import jakarta.persistence.*;
|
import java.io.Serializable;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.GeneratedValue;
|
||||||
|
import jakarta.persistence.GenerationType;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@jakarta.persistence.Entity
|
@jakarta.persistence.Entity
|
||||||
@@ -35,4 +42,22 @@ public class Function implements IdentityEntity, NamedEntity, Serializable {
|
|||||||
|
|
||||||
@Column(name = "DESCRIPTION", columnDefinition = "VARCHAR(255)")
|
@Column(name = "DESCRIPTION", columnDefinition = "VARCHAR(255)")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null)
|
||||||
|
return false;
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Function that = (Function) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import org.hibernate.annotations.JdbcTypeCode;
|
||||||
|
import org.hibernate.type.SqlTypes;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
@@ -7,10 +15,6 @@ import jakarta.persistence.Table;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import org.hibernate.annotations.JdbcTypeCode;
|
|
||||||
import org.hibernate.type.SqlTypes;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@@ -26,4 +30,21 @@ public class HolidayTable {
|
|||||||
@Column(name = "IS_HOLIDAY", nullable = false)
|
@Column(name = "IS_HOLIDAY", nullable = false)
|
||||||
private boolean holiday;
|
private boolean holiday;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null)
|
||||||
|
return false;
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
HolidayTable that = (HolidayTable) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import java.time.LocalDate;
|
|||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.AttributeOverride;
|
import jakarta.persistence.AttributeOverride;
|
||||||
import jakarta.persistence.AttributeOverrides;
|
import jakarta.persistence.AttributeOverrides;
|
||||||
@@ -23,7 +23,6 @@ import lombok.Getter;
|
|||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 存货物品清单
|
* 存货物品清单
|
||||||
*/
|
*/
|
||||||
@@ -101,17 +100,17 @@ public class Inventory implements IdentityEntity, BasedEntity, Serializable {
|
|||||||
* 重量单位
|
* 重量单位
|
||||||
*/
|
*/
|
||||||
@Column(name = "WEIGHT_UNIT")
|
@Column(name = "WEIGHT_UNIT")
|
||||||
private String weightUnit="kg";
|
private String weightUnit = "kg";
|
||||||
/**
|
/**
|
||||||
* 体积单位
|
* 体积单位
|
||||||
*/
|
*/
|
||||||
@Column(name = "VOLUME_UNIT")
|
@Column(name = "VOLUME_UNIT")
|
||||||
private String volumeUnit="m³";
|
private String volumeUnit = "m³";
|
||||||
/**
|
/**
|
||||||
* 尺寸单位
|
* 尺寸单位
|
||||||
*/
|
*/
|
||||||
@Column(name = "VOLUME_SIZE_UNIT")
|
@Column(name = "VOLUME_SIZE_UNIT")
|
||||||
private String sizeUnit="mm";
|
private String sizeUnit = "mm";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 体积尺寸(不含包装)
|
* 体积尺寸(不含包装)
|
||||||
@@ -136,7 +135,6 @@ public class Inventory implements IdentityEntity, BasedEntity, Serializable {
|
|||||||
})
|
})
|
||||||
private VolumeSize packagedVolumeSize = new VolumeSize();
|
private VolumeSize packagedVolumeSize = new VolumeSize();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
*/
|
*/
|
||||||
@@ -169,17 +167,19 @@ public class Inventory implements IdentityEntity, BasedEntity, Serializable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null)
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
Inventory that = (Inventory) object;
|
Inventory that = (Inventory) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,18 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
import jakarta.persistence.*;
|
import java.io.Serializable;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.GeneratedValue;
|
||||||
|
import jakarta.persistence.GenerationType;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 存货分类
|
* 存货分类
|
||||||
@@ -14,7 +21,8 @@ import java.util.Objects;
|
|||||||
@Setter
|
@Setter
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "INVENTORY_CATALOG", schema = "supplier_ms")
|
@Table(name = "INVENTORY_CATALOG", schema = "supplier_ms")
|
||||||
public class InventoryCatalog implements IdentityEntity, BasedEntity {
|
public class InventoryCatalog implements IdentityEntity, BasedEntity, Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@Column(name = "ID", nullable = false)
|
@Column(name = "ID", nullable = false)
|
||||||
@@ -32,18 +40,17 @@ public class InventoryCatalog implements IdentityEntity, BasedEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object o) {
|
public final boolean equals(Object object) {
|
||||||
if (this == o) return true;
|
if (this == object)
|
||||||
if (o == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = o instanceof HibernateProxy ? ((HibernateProxy) o).getHibernateLazyInitializer().getPersistentClass() : o.getClass();
|
if (object == null || HibernateProxyUtils.isNotEffectiveClassEquals(this, object))
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
InventoryCatalog that = (InventoryCatalog) object;
|
||||||
InventoryCatalog that = (InventoryCatalog) o;
|
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,26 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
import jakarta.persistence.Entity;
|
|
||||||
import jakarta.persistence.*;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
import lombok.ToString;
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
|
|
||||||
import java.time.Year;
|
import java.time.Year;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
|
import jakarta.persistence.AttributeOverride;
|
||||||
|
import jakarta.persistence.AttributeOverrides;
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.Embedded;
|
||||||
|
import jakarta.persistence.Entity;
|
||||||
|
import jakarta.persistence.FetchType;
|
||||||
|
import jakarta.persistence.GeneratedValue;
|
||||||
|
import jakarta.persistence.GenerationType;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.JoinColumn;
|
||||||
|
import jakarta.persistence.ManyToOne;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@ToString
|
@ToString
|
||||||
@@ -92,18 +103,20 @@ public class InventoryHistoryPrice implements IdentityEntity {
|
|||||||
private HistoryPrice maxSalePrice = new HistoryPrice();
|
private HistoryPrice maxSalePrice = new HistoryPrice();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object o) {
|
public final boolean equals(Object object) {
|
||||||
if (this == o) return true;
|
if (this == object)
|
||||||
if (o == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = o instanceof HibernateProxy ? ((HibernateProxy) o).getHibernateLazyInitializer().getPersistentClass() : o.getClass();
|
if (object == null)
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
InventoryHistoryPrice that = (InventoryHistoryPrice) o;
|
return false;
|
||||||
|
}
|
||||||
|
InventoryHistoryPrice that = (InventoryHistoryPrice) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,10 @@ import java.io.Serializable;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.FetchType;
|
import jakarta.persistence.FetchType;
|
||||||
@@ -71,27 +72,20 @@ public class Invoice implements IdentityEntity, BasedEntity, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object o) {
|
public final boolean equals(Object object) {
|
||||||
if (this == o)
|
if (this == object)
|
||||||
return true;
|
return true;
|
||||||
if (o == null)
|
if (object == null)
|
||||||
return false;
|
return false;
|
||||||
Class<?> oEffectiveClass = o instanceof HibernateProxy
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
? ((HibernateProxy) o).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: o.getClass();
|
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy
|
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: this.getClass();
|
|
||||||
if (thisEffectiveClass != oEffectiveClass)
|
|
||||||
return false;
|
return false;
|
||||||
Invoice invoice = (Invoice) o;
|
}
|
||||||
return getId() != null && Objects.equals(getId(), invoice.getId());
|
Invoice that = (Invoice) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy
|
return HibernateProxyUtils.hashCode(this);
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode()
|
|
||||||
: getClass().hashCode();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,18 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import jakarta.persistence.*;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
|
import jakarta.persistence.Column;
|
||||||
|
import jakarta.persistence.FetchType;
|
||||||
|
import jakarta.persistence.GeneratedValue;
|
||||||
|
import jakarta.persistence.GenerationType;
|
||||||
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.JoinColumn;
|
||||||
|
import jakarta.persistence.ManyToOne;
|
||||||
|
import jakarta.persistence.Table;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
@@ -27,4 +38,22 @@ public class Permission implements IdentityEntity, NamedEntity, Serializable {
|
|||||||
|
|
||||||
@Column(name = "PERMISSION_KEY")
|
@Column(name = "PERMISSION_KEY")
|
||||||
private String key;
|
private String key;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null)
|
||||||
|
return false;
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Permission that = (Permission) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.ecep.contract.model;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -48,22 +48,15 @@ public class ProductType implements BasedEntity, IdentityEntity, Serializable {
|
|||||||
return true;
|
return true;
|
||||||
if (object == null)
|
if (object == null)
|
||||||
return false;
|
return false;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: object.getClass();
|
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy
|
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: this.getClass();
|
|
||||||
if (thisEffectiveClass != oEffectiveClass)
|
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
ProductType that = (ProductType) object;
|
ProductType that = (ProductType) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy
|
return HibernateProxyUtils.hashCode(this);
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode()
|
|
||||||
: getClass().hashCode();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,7 @@ package com.ecep.contract.model;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -44,17 +44,16 @@ public class ProductUsage implements BasedEntity, IdentityEntity, Serializable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null || HibernateProxyUtils.isNotEffectiveClassEquals(this, object))
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
|
||||||
ProductUsage that = (ProductUsage) object;
|
ProductUsage that = (ProductUsage) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,8 @@ import java.time.LocalDate;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -45,7 +46,6 @@ public class Project implements IdentityEntity, NamedEntity, BasedEntity, Serial
|
|||||||
@ToString.Exclude
|
@ToString.Exclude
|
||||||
private Company customer;
|
private Company customer;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目名称
|
* 项目名称
|
||||||
*/
|
*/
|
||||||
@@ -53,7 +53,9 @@ public class Project implements IdentityEntity, NamedEntity, BasedEntity, Serial
|
|||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目代码,{@link #saleType saleType.Code}+{@link #codeYear}+{@link #codeSequenceNumber codeSequenceNumber} 组成
|
* 项目代码,{@link #saleType
|
||||||
|
* saleType.Code}+{@link #codeYear}+{@link #codeSequenceNumber
|
||||||
|
* codeSequenceNumber} 组成
|
||||||
*/
|
*/
|
||||||
@Column(name = "CODE")
|
@Column(name = "CODE")
|
||||||
private String code;
|
private String code;
|
||||||
@@ -109,7 +111,6 @@ public class Project implements IdentityEntity, NamedEntity, BasedEntity, Serial
|
|||||||
@ToString.Exclude
|
@ToString.Exclude
|
||||||
private ProjectIndustry industry;
|
private ProjectIndustry industry;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 销售类型
|
* 销售类型
|
||||||
*/
|
*/
|
||||||
@@ -126,7 +127,6 @@ public class Project implements IdentityEntity, NamedEntity, BasedEntity, Serial
|
|||||||
@ToString.Exclude
|
@ToString.Exclude
|
||||||
private ProjectType projectType;
|
private ProjectType projectType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 产品类型
|
* 产品类型
|
||||||
*/
|
*/
|
||||||
@@ -135,7 +135,6 @@ public class Project implements IdentityEntity, NamedEntity, BasedEntity, Serial
|
|||||||
@ToString.Exclude
|
@ToString.Exclude
|
||||||
private ProductType productType;
|
private ProductType productType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交货签收方式
|
* 交货签收方式
|
||||||
* Delivery signature method
|
* Delivery signature method
|
||||||
@@ -229,7 +228,6 @@ public class Project implements IdentityEntity, NamedEntity, BasedEntity, Serial
|
|||||||
@ToString.Exclude
|
@ToString.Exclude
|
||||||
private int version;
|
private int version;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toPrettyString() {
|
public String toPrettyString() {
|
||||||
return code + " " + name;
|
return code + " " + name;
|
||||||
@@ -237,17 +235,16 @@ public class Project implements IdentityEntity, NamedEntity, BasedEntity, Serial
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null || HibernateProxyUtils.isNotEffectiveClassEquals(this, object))
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
|
||||||
Project project = (Project) object;
|
Project project = (Project) object;
|
||||||
return getId() != null && Objects.equals(getId(), project.getId());
|
return getId() != null && Objects.equals(getId(), project.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.FetchType;
|
import jakarta.persistence.FetchType;
|
||||||
@@ -27,7 +31,8 @@ import lombok.ToString;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "PROJECT_BID")
|
@Table(name = "PROJECT_BID")
|
||||||
@ToString
|
@ToString
|
||||||
public class ProjectBid implements IdentityEntity, ProjectBasedEntity {
|
public class ProjectBid implements IdentityEntity, ProjectBasedEntity, Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@Column(name = "ID", nullable = false)
|
@Column(name = "ID", nullable = false)
|
||||||
@@ -91,7 +96,6 @@ public class ProjectBid implements IdentityEntity, ProjectBasedEntity {
|
|||||||
@Column(name = "NO_STANDARD_CONTRACT_TEXT")
|
@Column(name = "NO_STANDARD_CONTRACT_TEXT")
|
||||||
private String noStandardContractText;
|
private String noStandardContractText;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审核文件
|
* 审核文件
|
||||||
*/
|
*/
|
||||||
@@ -129,12 +133,24 @@ public class ProjectBid implements IdentityEntity, ProjectBasedEntity {
|
|||||||
@Column(name = "AUTHORIZER_DATE")
|
@Column(name = "AUTHORIZER_DATE")
|
||||||
private LocalDateTime authorizationTime;
|
private LocalDateTime authorizationTime;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 说明
|
* 说明
|
||||||
*/
|
*/
|
||||||
@Column(name = "DESCRIPTION", columnDefinition = "TEXT")
|
@Column(name = "DESCRIPTION", columnDefinition = "TEXT")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final boolean equals(Object object) {
|
||||||
|
if (this == object)
|
||||||
|
return true;
|
||||||
|
if (object == null || HibernateProxyUtils.isNotEffectiveClassEquals(this, object))
|
||||||
|
return false;
|
||||||
|
ProjectBid projectBid = (ProjectBid) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), projectBid.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -24,7 +26,8 @@ import lombok.ToString;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "PROJECT_COST")
|
@Table(name = "PROJECT_COST")
|
||||||
@ToString
|
@ToString
|
||||||
public class ProjectCost implements IdentityEntity, ProjectBasedEntity {
|
public class ProjectCost implements IdentityEntity, ProjectBasedEntity, Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@Column(name = "ID", nullable = false)
|
@Column(name = "ID", nullable = false)
|
||||||
@@ -46,7 +49,6 @@ public class ProjectCost implements IdentityEntity, ProjectBasedEntity {
|
|||||||
@Column(name = "VER")
|
@Column(name = "VER")
|
||||||
private int version;
|
private int version;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否标准付款方式
|
* 是否标准付款方式
|
||||||
*/
|
*/
|
||||||
@@ -201,23 +203,21 @@ public class ProjectCost implements IdentityEntity, ProjectBasedEntity {
|
|||||||
@Column(name = "DESCRIPTION", columnDefinition = "TEXT")
|
@Column(name = "DESCRIPTION", columnDefinition = "TEXT")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
|
|
||||||
@Column(name = "IMPORT_LOCK")
|
@Column(name = "IMPORT_LOCK")
|
||||||
private boolean importLock;
|
private boolean importLock;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object)
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
if (object == null || HibernateProxyUtils.isNotEffectiveClassEquals(this, object))
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
return false;
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
ProjectCost projectCost = (ProjectCost) object;
|
||||||
ProjectCost that = (ProjectCost) object;
|
return getId() != null && Objects.equals(getId(), projectCost.getId());
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import java.io.Serializable;
|
|||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -138,17 +138,21 @@ public class ProjectCostItem implements IdentityEntity, BasedEntity, Serializabl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object) {
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
}
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
if (object == null) {
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
return false;
|
||||||
|
}
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
ProjectCostItem that = (ProjectCostItem) object;
|
ProjectCostItem that = (ProjectCostItem) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ package com.ecep.contract.model;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
|
|
||||||
import com.ecep.contract.ProjectFileType;
|
import com.ecep.contract.ProjectFileType;
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -57,15 +56,7 @@ public class ProjectFile implements IdentityEntity, ProjectBasedEntity, Serializ
|
|||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object)
|
if (this == object)
|
||||||
return true;
|
return true;
|
||||||
if (object == null)
|
if (object == null || HibernateProxyUtils.isNotEffectiveClassEquals(this, object))
|
||||||
return false;
|
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy
|
|
||||||
? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: object.getClass();
|
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy
|
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass()
|
|
||||||
: this.getClass();
|
|
||||||
if (thisEffectiveClass != oEffectiveClass)
|
|
||||||
return false;
|
return false;
|
||||||
ProjectFile that = (ProjectFile) object;
|
ProjectFile that = (ProjectFile) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
@@ -73,8 +64,6 @@ public class ProjectFile implements IdentityEntity, ProjectBasedEntity, Serializ
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy
|
return HibernateProxyUtils.hashCode(this);
|
||||||
? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode()
|
|
||||||
: getClass().hashCode();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,8 @@ package com.ecep.contract.model;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
|
||||||
|
|
||||||
import com.ecep.contract.ProjectFileType;
|
import com.ecep.contract.ProjectFileType;
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
@@ -20,17 +19,21 @@ import lombok.ToString;
|
|||||||
public class ProjectFileTypeLocal extends BaseEnumEntity<ProjectFileType> {
|
public class ProjectFileTypeLocal extends BaseEnumEntity<ProjectFileType> {
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object) {
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
}
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
if (object == null) {
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
return false;
|
||||||
|
}
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
ProjectFileTypeLocal that = (ProjectFileTypeLocal) object;
|
ProjectFileTypeLocal that = (ProjectFileTypeLocal) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,10 @@ package com.ecep.contract.model;
|
|||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.ContractPayWay;
|
import com.ecep.contract.ContractPayWay;
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -66,7 +68,6 @@ public class ProjectFundPlan implements IdentityEntity, ProjectBasedEntity {
|
|||||||
@Column(name = "PAY_TERM")
|
@Column(name = "PAY_TERM")
|
||||||
private String payTerm;
|
private String payTerm;
|
||||||
|
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "CONTRACT_PAY_PLAN_ID")
|
@JoinColumn(name = "CONTRACT_PAY_PLAN_ID")
|
||||||
private ContractPayPlan contractPayPlan;
|
private ContractPayPlan contractPayPlan;
|
||||||
@@ -76,4 +77,24 @@ public class ProjectFundPlan implements IdentityEntity, ProjectBasedEntity {
|
|||||||
*/
|
*/
|
||||||
@Column(name = "UPDATE_TIME")
|
@Column(name = "UPDATE_TIME")
|
||||||
private LocalDateTime updateDate;
|
private LocalDateTime updateDate;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object object) {
|
||||||
|
if (this == object) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (object == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ProjectFundPlan that = (ProjectFundPlan) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.ecep.contract.model;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -48,17 +48,21 @@ public class ProjectIndustry implements BasedEntity, IdentityEntity, NamedEntity
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object) {
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
}
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
if (object == null) {
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
return false;
|
||||||
|
}
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
ProjectIndustry that = (ProjectIndustry) object;
|
ProjectIndustry that = (ProjectIndustry) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.FetchType;
|
import jakarta.persistence.FetchType;
|
||||||
@@ -108,4 +111,24 @@ public class ProjectQuotation implements IdentityEntity, ProjectBasedEntity {
|
|||||||
@ToString.Exclude
|
@ToString.Exclude
|
||||||
private CompanyCustomerEvaluationFormFile evaluationFile;
|
private CompanyCustomerEvaluationFormFile evaluationFile;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object object) {
|
||||||
|
if (this == object) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (object == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ProjectQuotation that = (ProjectQuotation) object;
|
||||||
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final int hashCode() {
|
||||||
|
return HibernateProxyUtils.hashCode(this);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.ecep.contract.model;
|
|||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import org.hibernate.proxy.HibernateProxy;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -63,17 +63,21 @@ public class ProjectSaleType implements IdentityEntity, NamedEntity, BasedEntity
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) return true;
|
if (this == object) {
|
||||||
if (object == null) return false;
|
return true;
|
||||||
Class<?> oEffectiveClass = object instanceof HibernateProxy ? ((HibernateProxy) object).getHibernateLazyInitializer().getPersistentClass() : object.getClass();
|
}
|
||||||
Class<?> thisEffectiveClass = this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass() : this.getClass();
|
if (object == null) {
|
||||||
if (thisEffectiveClass != oEffectiveClass) return false;
|
return false;
|
||||||
|
}
|
||||||
|
if (HibernateProxyUtils.isNotEffectiveClassEquals(object, this)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
ProjectSaleType that = (ProjectSaleType) object;
|
ProjectSaleType that = (ProjectSaleType) object;
|
||||||
return getId() != null && Objects.equals(getId(), that.getId());
|
return getId() != null && Objects.equals(getId(), that.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return this instanceof HibernateProxy ? ((HibernateProxy) this).getHibernateLazyInitializer().getPersistentClass().hashCode() : getClass().hashCode();
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user