Compare commits
4 Commits
35b33d401b
...
866e08224a
| Author | SHA1 | Date | |
|---|---|---|---|
| 866e08224a | |||
| 8aac509e51 | |||
| 35a15f4702 | |||
| 3c3003fdf3 |
@@ -1,24 +1,5 @@
|
|||||||
package com.ecep.contract;
|
package com.ecep.contract;
|
||||||
|
|
||||||
import com.ecep.contract.constant.WebSocketConstant;
|
|
||||||
import com.ecep.contract.msg.SimpleMessage;
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import javafx.application.Platform;
|
|
||||||
import javafx.beans.property.BooleanProperty;
|
|
||||||
import javafx.beans.property.SimpleBooleanProperty;
|
|
||||||
import javafx.beans.property.SimpleStringProperty;
|
|
||||||
import javafx.beans.property.StringProperty;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
import okhttp3.*;
|
|
||||||
import okio.ByteString;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -28,6 +9,32 @@ import java.util.concurrent.ScheduledFuture;
|
|||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.ecep.contract.constant.WebSocketConstant;
|
||||||
|
import com.ecep.contract.controller.OkHttpLoginController;
|
||||||
|
import com.ecep.contract.msg.SimpleMessage;
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
|
import javafx.application.Platform;
|
||||||
|
import javafx.beans.property.BooleanProperty;
|
||||||
|
import javafx.beans.property.SimpleBooleanProperty;
|
||||||
|
import javafx.beans.property.SimpleStringProperty;
|
||||||
|
import javafx.beans.property.StringProperty;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import okhttp3.OkHttpClient;
|
||||||
|
import okhttp3.Request;
|
||||||
|
import okhttp3.Response;
|
||||||
|
import okhttp3.WebSocket;
|
||||||
|
import okhttp3.WebSocketListener;
|
||||||
|
import okio.ByteString;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WebSocket消息服务
|
* WebSocket消息服务
|
||||||
* 提供向服务器端发送WebSocket消息的功能
|
* 提供向服务器端发送WebSocket消息的功能
|
||||||
@@ -90,7 +97,10 @@ public class WebSocketClientService {
|
|||||||
} else {
|
} else {
|
||||||
logger.error("未找到对应的回调future: {}", messageId);
|
logger.error("未找到对应的回调future: {}", messageId);
|
||||||
}
|
}
|
||||||
} else if (node.has(WebSocketConstant.SESSION_ID_FIELD_NAME)) {
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node.has(WebSocketConstant.SESSION_ID_FIELD_NAME)) {
|
||||||
String sessionId = node.get(WebSocketConstant.SESSION_ID_FIELD_NAME).asText();
|
String sessionId = node.get(WebSocketConstant.SESSION_ID_FIELD_NAME).asText();
|
||||||
WebSocketClientSession session = sessions.get(sessionId);
|
WebSocketClientSession session = sessions.get(sessionId);
|
||||||
if (session != null) {
|
if (session != null) {
|
||||||
@@ -100,18 +110,26 @@ public class WebSocketClientService {
|
|||||||
session.updateMessage(java.util.logging.Level.SEVERE, "会话异常: " + e.getMessage());
|
session.updateMessage(java.util.logging.Level.SEVERE, "会话异常: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (node.has(WebSocketConstant.ERROR_CODE_FIELD_NAME)) {
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node.has(WebSocketConstant.ERROR_CODE_FIELD_NAME)) {
|
||||||
int errorCode = node.get(WebSocketConstant.ERROR_CODE_FIELD_NAME).asInt();
|
int errorCode = node.get(WebSocketConstant.ERROR_CODE_FIELD_NAME).asInt();
|
||||||
String errorMsg = node.get(WebSocketConstant.MESSAGE_FIELD_NAME).asText();
|
String errorMsg = node.get(WebSocketConstant.MESSAGE_FIELD_NAME).asText();
|
||||||
// TODO 需要重新登录
|
|
||||||
logger.error("收到错误消息: 错误码={}, 错误信息={}", errorCode, errorMsg);
|
logger.error("收到错误消息: 错误码={}, 错误信息={}", errorCode, errorMsg);
|
||||||
|
if (errorCode == WebSocketConstant.ERROR_CODE_UNAUTHORIZED) {
|
||||||
|
// 处理未授权错误,重新登录
|
||||||
|
OkHttpLoginController controller = new OkHttpLoginController();
|
||||||
|
controller.tryLogin();
|
||||||
|
// 需要把窗口顶置
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("处理WebSocket消息失败: {}", e.getMessage(), e);
|
logger.error("处理WebSocket消息失败: {}", e.getMessage(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMessage(WebSocket webSocket, ByteString bytes) {
|
public void onMessage(WebSocket webSocket, ByteString bytes) {
|
||||||
// 处理收到的二进制消息
|
// 处理收到的二进制消息
|
||||||
@@ -149,7 +167,8 @@ public class WebSocketClientService {
|
|||||||
if (node.has(WebSocketConstant.SUCCESS_FIELD_VALUE)) {
|
if (node.has(WebSocketConstant.SUCCESS_FIELD_VALUE)) {
|
||||||
if (!node.get(WebSocketConstant.SUCCESS_FIELD_VALUE).asBoolean()) {
|
if (!node.get(WebSocketConstant.SUCCESS_FIELD_VALUE).asBoolean()) {
|
||||||
future.completeExceptionally(
|
future.completeExceptionally(
|
||||||
new RuntimeException("请求失败:来自服务器的消息=" + node.get(WebSocketConstant.MESSAGE_FIELD_NAME).asText()));
|
new RuntimeException(
|
||||||
|
"请求失败:来自服务器的消息=" + node.get(WebSocketConstant.MESSAGE_FIELD_NAME).asText()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ public class ComboBoxUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T extends IdentityEntity & NamedEntity> void initialComboBox(
|
public static <T extends IdentityEntity> void initialComboBox(
|
||||||
ComboBox<T> comboBox, Property<Integer> property, IEntityService<T> queryService, boolean hasNull) {
|
ComboBox<T> comboBox, Property<Integer> property, IEntityService<T> queryService, boolean hasNull) {
|
||||||
ObservableList<T> list = FXCollections.observableArrayList();
|
ObservableList<T> list = FXCollections.observableArrayList();
|
||||||
if (hasNull) {
|
if (hasNull) {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import org.slf4j.Logger;
|
|||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyCustomerFileType;
|
import com.ecep.contract.CustomerFileType;
|
||||||
import com.ecep.contract.MessageHolder;
|
import com.ecep.contract.MessageHolder;
|
||||||
import com.ecep.contract.SpringApp;
|
import com.ecep.contract.SpringApp;
|
||||||
import com.ecep.contract.vo.CloudTycVo;
|
import com.ecep.contract.vo.CloudTycVo;
|
||||||
@@ -127,7 +127,7 @@ public class CompanyCustomerEvaluationFormUpdateTask extends Tasker<Object> {
|
|||||||
CompanyCustomerFileVo customerFile = new CompanyCustomerFileVo();
|
CompanyCustomerFileVo customerFile = new CompanyCustomerFileVo();
|
||||||
customerFile.setCustomer(customer.getId());
|
customerFile.setCustomer(customer.getId());
|
||||||
customerFile.setFilePath(destFile.getAbsolutePath());
|
customerFile.setFilePath(destFile.getAbsolutePath());
|
||||||
customerFile.setType(CompanyCustomerFileType.General);
|
customerFile.setType(CustomerFileType.General);
|
||||||
save(customerFile);
|
save(customerFile);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
holder.error(e.getMessage());
|
holder.error(e.getMessage());
|
||||||
@@ -192,7 +192,7 @@ public class CompanyCustomerEvaluationFormUpdateTask extends Tasker<Object> {
|
|||||||
|
|
||||||
// 检索评估表
|
// 检索评估表
|
||||||
List<CompanyCustomerFileVo> customerFiles = getCompanyCustomerFileService().findAllByCustomerAndType(customer,
|
List<CompanyCustomerFileVo> customerFiles = getCompanyCustomerFileService().findAllByCustomerAndType(customer,
|
||||||
CompanyCustomerFileType.EvaluationForm);
|
CustomerFileType.EvaluationForm);
|
||||||
|
|
||||||
List<CompanyCustomerEvaluationFormFileVo> filteredList = customerFiles.stream().filter(file -> {
|
List<CompanyCustomerEvaluationFormFileVo> filteredList = customerFiles.stream().filter(file -> {
|
||||||
return file.getSignDate() != null && file.isValid();
|
return file.getSignDate() != null && file.isValid();
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import java.util.function.Consumer;
|
|||||||
|
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyCustomerFileType;
|
import com.ecep.contract.CustomerFileType;
|
||||||
import com.ecep.contract.DesktopUtils;
|
import com.ecep.contract.DesktopUtils;
|
||||||
import com.ecep.contract.Message;
|
import com.ecep.contract.Message;
|
||||||
import com.ecep.contract.MyDateTimeUtils;
|
import com.ecep.contract.MyDateTimeUtils;
|
||||||
@@ -106,7 +106,7 @@ public class CustomerTabSkinFile
|
|||||||
table.disableProperty().bind(viewModel.getPath().isEmpty());
|
table.disableProperty().bind(viewModel.getPath().isEmpty());
|
||||||
fileTable_idColumn.setCellValueFactory(param -> param.getValue().getId());
|
fileTable_idColumn.setCellValueFactory(param -> param.getValue().getId());
|
||||||
CompanyCustomerFileTypeService fileTypeService = getCachedBean(CompanyCustomerFileTypeService.class);
|
CompanyCustomerFileTypeService fileTypeService = getCachedBean(CompanyCustomerFileTypeService.class);
|
||||||
ObservableMap<CompanyCustomerFileType, CompanyCustomerFileTypeLocal> observableMapByLocal = FXCollections
|
ObservableMap<CustomerFileType, CompanyCustomerFileTypeLocal> observableMapByLocal = FXCollections
|
||||||
.observableMap(fileTypeService.findAll(getLocale()));
|
.observableMap(fileTypeService.findAll(getLocale()));
|
||||||
fileTable_typeColumn.setCellValueFactory(param -> Bindings.valueAt(observableMapByLocal,
|
fileTable_typeColumn.setCellValueFactory(param -> Bindings.valueAt(observableMapByLocal,
|
||||||
param.getValue().getType()).map(BaseEnumEntity::getValue));
|
param.getValue().getType()).map(BaseEnumEntity::getValue));
|
||||||
@@ -156,8 +156,8 @@ public class CustomerTabSkinFile
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onTableRowDoubleClickedAction(CompanyCustomerFileViewModel item) {
|
protected void onTableRowDoubleClickedAction(CompanyCustomerFileViewModel item) {
|
||||||
CompanyCustomerFileType fileType = item.getType().get();
|
CustomerFileType fileType = item.getType().get();
|
||||||
if (fileType == CompanyCustomerFileType.EvaluationForm) {
|
if (fileType == CustomerFileType.EvaluationForm) {
|
||||||
CompanyCustomerEvaluationFormFileVo evaluationFormFile = getCachedBean(
|
CompanyCustomerEvaluationFormFileVo evaluationFormFile = getCachedBean(
|
||||||
CompanyCustomerEvaluationFormFileService.class).findByCustomerFile(item.getId().get());
|
CompanyCustomerEvaluationFormFileService.class).findByCustomerFile(item.getId().get());
|
||||||
// 文件不是 Excel 文件时,打开编辑UI
|
// 文件不是 Excel 文件时,打开编辑UI
|
||||||
@@ -201,7 +201,7 @@ public class CustomerTabSkinFile
|
|||||||
if (file.renameTo(dest)) {
|
if (file.renameTo(dest)) {
|
||||||
CompanyCustomerFileVo ccf = new CompanyCustomerFileVo();
|
CompanyCustomerFileVo ccf = new CompanyCustomerFileVo();
|
||||||
ccf.setCustomer(companyCustomer.getId());
|
ccf.setCustomer(companyCustomer.getId());
|
||||||
ccf.setType(CompanyCustomerFileType.EvaluationForm);
|
ccf.setType(CustomerFileType.EvaluationForm);
|
||||||
ccf.setFilePath(dest.getAbsolutePath());
|
ccf.setFilePath(dest.getAbsolutePath());
|
||||||
ccf.setSignDate(nextSignDate);
|
ccf.setSignDate(nextSignDate);
|
||||||
ccf.setValid(false);
|
ccf.setValid(false);
|
||||||
@@ -228,7 +228,7 @@ public class CustomerTabSkinFile
|
|||||||
if (file.renameTo(dest)) {
|
if (file.renameTo(dest)) {
|
||||||
CompanyCustomerFileVo ccf = new CompanyCustomerFileVo();
|
CompanyCustomerFileVo ccf = new CompanyCustomerFileVo();
|
||||||
ccf.setCustomer(companyCustomer.getId());
|
ccf.setCustomer(companyCustomer.getId());
|
||||||
ccf.setType(CompanyCustomerFileType.General);
|
ccf.setType(CustomerFileType.General);
|
||||||
ccf.setFilePath(dest.getAbsolutePath());
|
ccf.setFilePath(dest.getAbsolutePath());
|
||||||
ccf.setValid(false);
|
ccf.setValid(false);
|
||||||
getCompanyCustomerFileService().save(ccf);
|
getCompanyCustomerFileService().save(ccf);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.ecep.contract.controller.project.bid;
|
package com.ecep.contract.controller.project.bid;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyCustomerFileType;
|
import com.ecep.contract.CustomerFileType;
|
||||||
import com.ecep.contract.ContractFileType;
|
import com.ecep.contract.ContractFileType;
|
||||||
import com.ecep.contract.DesktopUtils;
|
import com.ecep.contract.DesktopUtils;
|
||||||
import com.ecep.contract.MyDateTimeUtils;
|
import com.ecep.contract.MyDateTimeUtils;
|
||||||
@@ -10,10 +10,7 @@ import com.ecep.contract.controller.tab.AbstEntityBasedTabSkin;
|
|||||||
import com.ecep.contract.controller.tab.TabSkin;
|
import com.ecep.contract.controller.tab.TabSkin;
|
||||||
import com.ecep.contract.converter.CompanyStringConverter;
|
import com.ecep.contract.converter.CompanyStringConverter;
|
||||||
import com.ecep.contract.converter.EmployeeStringConverter;
|
import com.ecep.contract.converter.EmployeeStringConverter;
|
||||||
import com.ecep.contract.converter.EntityStringConverter;
|
|
||||||
import com.ecep.contract.service.*;
|
import com.ecep.contract.service.*;
|
||||||
import com.ecep.contract.util.ParamUtils;
|
|
||||||
import com.ecep.contract.util.ProxyUtils;
|
|
||||||
import com.ecep.contract.util.UITools;
|
import com.ecep.contract.util.UITools;
|
||||||
import com.ecep.contract.vm.ProjectBidViewModel;
|
import com.ecep.contract.vm.ProjectBidViewModel;
|
||||||
import com.ecep.contract.vo.*;
|
import com.ecep.contract.vo.*;
|
||||||
@@ -28,10 +25,8 @@ import javafx.util.converter.LocalDateStringConverter;
|
|||||||
import javafx.util.converter.LocalDateTimeStringConverter;
|
import javafx.util.converter.LocalDateTimeStringConverter;
|
||||||
import javafx.util.converter.NumberStringConverter;
|
import javafx.util.converter.NumberStringConverter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.springframework.data.domain.Pageable;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.text.NumberFormat;
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
@@ -281,7 +276,7 @@ public class ProjectBidTabSkinBase
|
|||||||
|
|
||||||
// 获取客户资信评估表
|
// 获取客户资信评估表
|
||||||
List<CompanyCustomerFileVo> list = fileService.findAllByCustomerAndType(customer,
|
List<CompanyCustomerFileVo> list = fileService.findAllByCustomerAndType(customer,
|
||||||
CompanyCustomerFileType.EvaluationForm);
|
CustomerFileType.EvaluationForm);
|
||||||
if (list.isEmpty()) {
|
if (list.isEmpty()) {
|
||||||
// 没有评估表
|
// 没有评估表
|
||||||
return;
|
return;
|
||||||
@@ -292,7 +287,7 @@ public class ProjectBidTabSkinBase
|
|||||||
LocalDate verifyDate = applyTime.toLocalDate();
|
LocalDate verifyDate = applyTime.toLocalDate();
|
||||||
CompanyCustomerFileVo file = list.stream()
|
CompanyCustomerFileVo file = list.stream()
|
||||||
.filter(v -> v.getSignDate() != null && v.isValid())
|
.filter(v -> v.getSignDate() != null && v.isValid())
|
||||||
.filter(v -> v.getType() == CompanyCustomerFileType.EvaluationForm)
|
.filter(v -> v.getType() == CustomerFileType.EvaluationForm)
|
||||||
.filter(v -> MyDateTimeUtils.dateValidFilter(verifyDate, v.getSignDate(), v.getSignDate().plusYears(1),
|
.filter(v -> MyDateTimeUtils.dateValidFilter(verifyDate, v.getSignDate(), v.getSignDate().plusYears(1),
|
||||||
7))
|
7))
|
||||||
.findFirst().orElse(null);
|
.findFirst().orElse(null);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyCustomerFileType;
|
import com.ecep.contract.CustomerFileType;
|
||||||
import com.ecep.contract.MyDateTimeUtils;
|
import com.ecep.contract.MyDateTimeUtils;
|
||||||
import com.ecep.contract.controller.tab.AbstEntityBasedTabSkin;
|
import com.ecep.contract.controller.tab.AbstEntityBasedTabSkin;
|
||||||
import com.ecep.contract.controller.tab.TabSkin;
|
import com.ecep.contract.controller.tab.TabSkin;
|
||||||
@@ -235,7 +235,7 @@ public class CustomerSatisfactionSurveyTabSkinBase
|
|||||||
|
|
||||||
CompanyCustomerFileService companyCustomerFileService = getBean(CompanyCustomerFileService.class);
|
CompanyCustomerFileService companyCustomerFileService = getBean(CompanyCustomerFileService.class);
|
||||||
List<CompanyCustomerFileVo> list = companyCustomerFileService.findAllByCustomerAndType(customer,
|
List<CompanyCustomerFileVo> list = companyCustomerFileService.findAllByCustomerAndType(customer,
|
||||||
CompanyCustomerFileType.EvaluationForm);
|
CustomerFileType.EvaluationForm);
|
||||||
if (list.isEmpty()) {
|
if (list.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -244,7 +244,7 @@ public class CustomerSatisfactionSurveyTabSkinBase
|
|||||||
LocalDate verifyDate = applyTime.toLocalDate();
|
LocalDate verifyDate = applyTime.toLocalDate();
|
||||||
CompanyCustomerFileVo file = list.stream()
|
CompanyCustomerFileVo file = list.stream()
|
||||||
.filter(v -> v.getSignDate() != null && v.isValid())
|
.filter(v -> v.getSignDate() != null && v.isValid())
|
||||||
.filter(v -> v.getType() == CompanyCustomerFileType.EvaluationForm)
|
.filter(v -> v.getType() == CustomerFileType.EvaluationForm)
|
||||||
.filter(v -> MyDateTimeUtils.dateValidFilter(verifyDate, v.getSignDate(), v.getSignDate().plusYears(1),
|
.filter(v -> MyDateTimeUtils.dateValidFilter(verifyDate, v.getSignDate(), v.getSignDate().plusYears(1),
|
||||||
7))
|
7))
|
||||||
.findFirst().orElse(null);
|
.findFirst().orElse(null);
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import java.time.LocalDateTime;
|
|||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
|
import com.ecep.contract.controller.ComboBoxUtils;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import com.ecep.contract.DesktopUtils;
|
import com.ecep.contract.DesktopUtils;
|
||||||
@@ -123,11 +124,7 @@ public class CompanyTabSkinContract
|
|||||||
|
|
||||||
contractSearchBtn.setOnAction(this::onTableRefreshAction);
|
contractSearchBtn.setOnAction(this::onTableRefreshAction);
|
||||||
|
|
||||||
ObservableList<ContractGroupVo> contractGroups = FXCollections.observableArrayList();
|
ComboBoxUtils.initialComboBox(contractGroupSelector, null, getContractGroupService(), true);
|
||||||
contractGroups.add(null);
|
|
||||||
contractGroups.addAll(getContractGroupService().findAll());
|
|
||||||
contractGroupSelector.setItems(contractGroups);
|
|
||||||
contractGroupSelector.setConverter(new ContractGroupStringConverter(contractGroups));
|
|
||||||
contractSearchKeyField.setOnKeyReleased(event -> {
|
contractSearchKeyField.setOnKeyReleased(event -> {
|
||||||
if (event.getCode() == KeyCode.ENTER) {
|
if (event.getCode() == KeyCode.ENTER) {
|
||||||
contractSearchBtn.fire();
|
contractSearchBtn.fire();
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import java.util.function.Consumer;
|
|||||||
|
|
||||||
import com.ecep.contract.service.CompanyFileTypeService;
|
import com.ecep.contract.service.CompanyFileTypeService;
|
||||||
import com.ecep.contract.service.ContractFileTypeService;
|
import com.ecep.contract.service.ContractFileTypeService;
|
||||||
|
import com.ecep.contract.vo.CompanyFileTypeLocalVo;
|
||||||
import com.ecep.contract.vo.CompanyFileVo;
|
import com.ecep.contract.vo.CompanyFileVo;
|
||||||
import com.ecep.contract.vo.CompanyVo;
|
import com.ecep.contract.vo.CompanyVo;
|
||||||
import org.springframework.util.FileSystemUtils;
|
import org.springframework.util.FileSystemUtils;
|
||||||
@@ -64,7 +65,7 @@ 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;
|
||||||
|
|
||||||
private final ObservableMap<CompanyFileType, CompanyFileTypeLocal> fileTypeLocalMap = FXCollections
|
private final ObservableMap<CompanyFileType, CompanyFileTypeLocalVo> fileTypeLocalMap = FXCollections
|
||||||
.observableHashMap();
|
.observableHashMap();
|
||||||
|
|
||||||
public CompanyTabSkinFile(CompanyWindowController controller) {
|
public CompanyTabSkinFile(CompanyWindowController controller) {
|
||||||
@@ -96,7 +97,7 @@ public class CompanyTabSkinFile
|
|||||||
idColumn.setCellValueFactory(param -> param.getValue().getId());
|
idColumn.setCellValueFactory(param -> param.getValue().getId());
|
||||||
|
|
||||||
typeColumn.setCellValueFactory(param -> Bindings.valueAt(fileTypeLocalMap, param.getValue().getType())
|
typeColumn.setCellValueFactory(param -> Bindings.valueAt(fileTypeLocalMap, param.getValue().getType())
|
||||||
.map(CompanyFileTypeLocal::getValue));
|
.map(CompanyFileTypeLocalVo::getValue));
|
||||||
filePathColumn.setCellValueFactory(param -> param.getValue().getFilePath());
|
filePathColumn.setCellValueFactory(param -> param.getValue().getFilePath());
|
||||||
filePathColumn.setCellFactory(param -> new CompanyFilePathTableCell<>(viewModel.getPath()));
|
filePathColumn.setCellFactory(param -> new CompanyFilePathTableCell<>(viewModel.getPath()));
|
||||||
applyDateColumn.setCellValueFactory(param -> param.getValue().getApplyDate());
|
applyDateColumn.setCellValueFactory(param -> param.getValue().getApplyDate());
|
||||||
|
|||||||
@@ -203,9 +203,13 @@ public class ContractTabSkinBase extends AbstContractBasedTabSkin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void parentCodeFieldAutoCompletion(TextField textField) {
|
private void parentCodeFieldAutoCompletion(TextField textField) {
|
||||||
ContractStringConverter converter = SpringApp.getBean(ContractStringConverter.class);
|
ContractService contractService = getContractService();
|
||||||
converter.setFormater(ContractVo::getCode);
|
TextFields.bindAutoCompletion(textField, suggest -> contractService.search(suggest.getUserText()), new ContractStringConverter(contractService) {
|
||||||
TextFields.bindAutoCompletion(textField, converter::suggest, converter);
|
@Override
|
||||||
|
public String toString(ContractVo object) {
|
||||||
|
return object.getCode();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void calcMainContractNoAction(ActionEvent event) {
|
private void calcMainContractNoAction(ActionEvent event) {
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ package com.ecep.contract.controller.table.cell;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
|
|
||||||
import com.ecep.contract.service.QueryService;
|
|
||||||
import com.ecep.contract.util.ProxyUtils;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@@ -13,6 +11,7 @@ import com.ecep.contract.model.BasedEntity;
|
|||||||
import com.ecep.contract.model.IdentityEntity;
|
import com.ecep.contract.model.IdentityEntity;
|
||||||
import com.ecep.contract.model.NamedEntity;
|
import com.ecep.contract.model.NamedEntity;
|
||||||
import com.ecep.contract.service.IEntityService;
|
import com.ecep.contract.service.IEntityService;
|
||||||
|
import com.ecep.contract.util.ProxyUtils;
|
||||||
|
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
|
|
||||||
@@ -22,7 +21,7 @@ import javafx.application.Platform;
|
|||||||
* @param <V>
|
* @param <V>
|
||||||
* @param <T>
|
* @param <T>
|
||||||
*/
|
*/
|
||||||
public class AsyncUpdateTableCell<V, T extends IdentityEntity> extends javafx.scene.control.TableCell<V, Integer> {
|
public class AsyncUpdateTableCell<V, K, T extends IdentityEntity> extends javafx.scene.control.TableCell<V, K> {
|
||||||
private static final Logger logger = LoggerFactory.getLogger(AsyncUpdateTableCell.class);
|
private static final Logger logger = LoggerFactory.getLogger(AsyncUpdateTableCell.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -66,7 +65,7 @@ public class AsyncUpdateTableCell<V, T extends IdentityEntity> extends javafx.sc
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void updateItem(Integer itemId, boolean empty) {
|
protected void updateItem(K itemId, boolean empty) {
|
||||||
super.updateItem(itemId, empty);
|
super.updateItem(itemId, empty);
|
||||||
// 取消之前的异步任务
|
// 取消之前的异步任务
|
||||||
if (syncFuture != null) {
|
if (syncFuture != null) {
|
||||||
@@ -103,7 +102,11 @@ public class AsyncUpdateTableCell<V, T extends IdentityEntity> extends javafx.sc
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
protected T initialize() {
|
protected T initialize() {
|
||||||
return getService().findById(getItem());
|
K k = getItem();
|
||||||
|
if (k instanceof Integer id) {
|
||||||
|
return getService().findById(id);
|
||||||
|
}
|
||||||
|
throw new UnsupportedOperationException("Not supported yet.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -143,7 +146,7 @@ public class AsyncUpdateTableCell<V, T extends IdentityEntity> extends javafx.sc
|
|||||||
// 保存当前需要更新的项目信息,避免闭包引用导致的问题
|
// 保存当前需要更新的项目信息,避免闭包引用导致的问题
|
||||||
final T updatedEntity = entity;
|
final T updatedEntity = entity;
|
||||||
final String updatedText = texted;
|
final String updatedText = texted;
|
||||||
final Integer finalCurrentLoadingItem = getItem();
|
final K finalCurrentLoadingItem = getItem();
|
||||||
|
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
// 检查单元格是否仍然显示相同的项目
|
// 检查单元格是否仍然显示相同的项目
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import com.ecep.contract.vo.BankVo;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class BankTableCell<T> extends AsyncUpdateTableCell<T, BankVo> {
|
public class BankTableCell<T> extends AsyncUpdateTableCell<T, Integer, BankVo> {
|
||||||
public BankTableCell(BankService service) {
|
public BankTableCell(BankService service) {
|
||||||
setService(service);
|
setService(service);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import lombok.NoArgsConstructor;
|
|||||||
* 公司单元格
|
* 公司单元格
|
||||||
*/
|
*/
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class CompanyTableCell<V> extends AsyncUpdateTableCell<V, CompanyVo> {
|
public class CompanyTableCell<V> extends AsyncUpdateTableCell<V, Integer, CompanyVo> {
|
||||||
/**
|
/**
|
||||||
* 创建单元格工厂
|
* 创建单元格工厂
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import lombok.NoArgsConstructor;
|
|||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class CompanyVendorTableCell<T> extends AsyncUpdateTableCell<T, CompanyVendorVo> {
|
public class CompanyVendorTableCell<T> extends AsyncUpdateTableCell<T, Integer, CompanyVendorVo> {
|
||||||
public static <S> Callback<TableColumn<S, Integer>, TableCell<S, Integer>> forTableColumn() {
|
public static <S> Callback<TableColumn<S, Integer>, TableCell<S, Integer>> forTableColumn() {
|
||||||
return forTableColumn(SpringApp.getBean(CompanyVendorService.class));
|
return forTableColumn(SpringApp.getBean(CompanyVendorService.class));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import javafx.util.Callback;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class ContractFileTableCell<V> extends AsyncUpdateTableCell<V, ContractVo> {
|
public class ContractFileTableCell<V> extends AsyncUpdateTableCell<V, Integer, ContractVo> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建一个ContractFileTableCell的TableCell工厂,自动获取ContractService实例
|
* 创建一个ContractFileTableCell的TableCell工厂,自动获取ContractService实例
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import static com.ecep.contract.SpringApp.getBean;
|
|||||||
import com.ecep.contract.service.ContractGroupService;
|
import com.ecep.contract.service.ContractGroupService;
|
||||||
import com.ecep.contract.vo.ContractGroupVo;
|
import com.ecep.contract.vo.ContractGroupVo;
|
||||||
|
|
||||||
public class ContractGroupTableCell<V> extends AsyncUpdateTableCell<V, ContractGroupVo> {
|
public class ContractGroupTableCell<V> extends AsyncUpdateTableCell<V, Integer, ContractGroupVo> {
|
||||||
public ContractGroupTableCell() {
|
public ContractGroupTableCell() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import static com.ecep.contract.SpringApp.getBean;
|
|||||||
import com.ecep.contract.service.ContractKindService;
|
import com.ecep.contract.service.ContractKindService;
|
||||||
import com.ecep.contract.vo.ContractKindVo;
|
import com.ecep.contract.vo.ContractKindVo;
|
||||||
|
|
||||||
public class ContractKindTableCell<V> extends AsyncUpdateTableCell<V, ContractKindVo> {
|
public class ContractKindTableCell<V> extends AsyncUpdateTableCell<V, Integer, ContractKindVo> {
|
||||||
|
|
||||||
public ContractKindTableCell() {
|
public ContractKindTableCell() {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import com.ecep.contract.vo.ContractVo;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class ContractTableCell<T> extends AsyncUpdateTableCell<T, ContractVo> {
|
public class ContractTableCell<T> extends AsyncUpdateTableCell<T, Integer, ContractVo> {
|
||||||
public ContractTableCell(ContractService service) {
|
public ContractTableCell(ContractService service) {
|
||||||
setService(service);
|
setService(service);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import com.ecep.contract.vo.ContractTypeVo;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class ContractTypeTableCell<V> extends AsyncUpdateTableCell<V, ContractTypeVo> {
|
public class ContractTypeTableCell<V> extends AsyncUpdateTableCell<V, Integer, ContractTypeVo> {
|
||||||
public ContractTypeTableCell(ContractTypeService contractService) {
|
public ContractTypeTableCell(ContractTypeService contractService) {
|
||||||
setService(contractService);
|
setService(contractService);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import javafx.util.Callback;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class CustomerCatalogTableCell<T> extends AsyncUpdateTableCell<T, CustomerCatalogVo> {
|
public class CustomerCatalogTableCell<T> extends AsyncUpdateTableCell<T, Integer, CustomerCatalogVo> {
|
||||||
public CustomerCatalogTableCell(CustomerCatalogService service) {
|
public CustomerCatalogTableCell(CustomerCatalogService service) {
|
||||||
setService(service);
|
setService(service);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import com.ecep.contract.vo.DepartmentVo;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class DepartmentTableCell<T> extends AsyncUpdateTableCell<T, DepartmentVo> {
|
public class DepartmentTableCell<T> extends AsyncUpdateTableCell<T, Integer, DepartmentVo> {
|
||||||
public DepartmentTableCell(DepartmentService service) {
|
public DepartmentTableCell(DepartmentService service) {
|
||||||
setService(service);
|
setService(service);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import lombok.NoArgsConstructor;
|
|||||||
* @param <V>
|
* @param <V>
|
||||||
*/
|
*/
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class EmployeeRoleTableCell<V> extends AsyncUpdateTableCell<V, EmployeeRoleVo> {
|
public class EmployeeRoleTableCell<V> extends AsyncUpdateTableCell<V, Integer, EmployeeRoleVo> {
|
||||||
|
|
||||||
public EmployeeRoleTableCell(EmployeeRoleService service) {
|
public EmployeeRoleTableCell(EmployeeRoleService service) {
|
||||||
setService(service);
|
setService(service);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import javafx.util.Callback;
|
|||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
@Setter
|
@Setter
|
||||||
public class EmployeeTableCell<V> extends AsyncUpdateTableCell<V, EmployeeVo> {
|
public class EmployeeTableCell<V> extends AsyncUpdateTableCell<V, Integer, EmployeeVo> {
|
||||||
|
|
||||||
public static <S> Callback<TableColumn<S, Integer>, TableCell<S, Integer>> forTableColumn() {
|
public static <S> Callback<TableColumn<S, Integer>, TableCell<S, Integer>> forTableColumn() {
|
||||||
return forTableColumn(getBean(EmployeeService.class));
|
return forTableColumn(getBean(EmployeeService.class));
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import lombok.NoArgsConstructor;
|
|||||||
* 评估文件 TableCell
|
* 评估文件 TableCell
|
||||||
*/
|
*/
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class EvaluationFileTableCell<V> extends AsyncUpdateTableCell<V, CompanyCustomerEvaluationFormFileVo> {
|
public class EvaluationFileTableCell<V> extends AsyncUpdateTableCell<V, Integer, CompanyCustomerEvaluationFormFileVo> {
|
||||||
private CompanyCustomerFileService fileService;
|
private CompanyCustomerFileService fileService;
|
||||||
private CompanyCustomerEvaluationFormFileService evaluationFormFileService;
|
private CompanyCustomerEvaluationFormFileService evaluationFormFileService;
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import com.ecep.contract.vo.InventoryCatalogVo;
|
|||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
@Setter
|
@Setter
|
||||||
public class InventoryCatalogTableCell<V> extends AsyncUpdateTableCell<V, InventoryCatalogVo> {
|
public class InventoryCatalogTableCell<V> extends AsyncUpdateTableCell<V, Integer, InventoryCatalogVo> {
|
||||||
|
|
||||||
public InventoryCatalogTableCell() {
|
public InventoryCatalogTableCell() {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import javafx.util.Callback;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class InventoryTableCell<V> extends AsyncUpdateTableCell<V, InventoryVo> {
|
public class InventoryTableCell<V> extends AsyncUpdateTableCell<V, Integer, InventoryVo> {
|
||||||
/**
|
/**
|
||||||
* 创建单元格工厂
|
* 创建单元格工厂
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import javafx.util.Callback;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class InvoiceTableCell<V> extends AsyncUpdateTableCell<V, InvoiceVo> {
|
public class InvoiceTableCell<V> extends AsyncUpdateTableCell<V, Integer, InvoiceVo> {
|
||||||
|
|
||||||
public InvoiceTableCell(InvoiceService invoiceService) {
|
public InvoiceTableCell(InvoiceService invoiceService) {
|
||||||
setService(invoiceService);
|
setService(invoiceService);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import lombok.NoArgsConstructor;
|
|||||||
* 产品类型单元格
|
* 产品类型单元格
|
||||||
*/
|
*/
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class ProductTypeTableCell<V> extends AsyncUpdateTableCell<V, ProductTypeVo> {
|
public class ProductTypeTableCell<V> extends AsyncUpdateTableCell<V, Integer, ProductTypeVo> {
|
||||||
|
|
||||||
public ProductTypeTableCell(ProductTypeService productTypeService) {
|
public ProductTypeTableCell(ProductTypeService productTypeService) {
|
||||||
setService(productTypeService);
|
setService(productTypeService);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import lombok.NoArgsConstructor;
|
|||||||
* 项目销售类型单元格
|
* 项目销售类型单元格
|
||||||
*/
|
*/
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class ProjectSaleTypeTableCell<V> extends AsyncUpdateTableCell<V, ProjectSaleTypeVo> {
|
public class ProjectSaleTypeTableCell<V> extends AsyncUpdateTableCell<V, Integer, ProjectSaleTypeVo> {
|
||||||
|
|
||||||
public ProjectSaleTypeTableCell(ProjectSaleTypeService projectSaleTypeService) {
|
public ProjectSaleTypeTableCell(ProjectSaleTypeService projectSaleTypeService) {
|
||||||
setService(projectSaleTypeService);
|
setService(projectSaleTypeService);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import javafx.util.Callback;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class ProjectTableCell<V> extends AsyncUpdateTableCell<V, ProjectVo> {
|
public class ProjectTableCell<V> extends AsyncUpdateTableCell<V, Integer, ProjectVo> {
|
||||||
public static <S> Callback<TableColumn<S, Integer>, TableCell<S, Integer>> forTableColumn() {
|
public static <S> Callback<TableColumn<S, Integer>, TableCell<S, Integer>> forTableColumn() {
|
||||||
return forTableColumn(getBean(ProjectService.class));
|
return forTableColumn(getBean(ProjectService.class));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import lombok.NoArgsConstructor;
|
|||||||
* 项目类型单元格
|
* 项目类型单元格
|
||||||
*/
|
*/
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class ProjectTypeTableCell<V> extends AsyncUpdateTableCell<V, ProjectTypeVo> {
|
public class ProjectTypeTableCell<V> extends AsyncUpdateTableCell<V, Integer, ProjectTypeVo> {
|
||||||
|
|
||||||
public ProjectTypeTableCell(ProjectTypeService projectTypeService) {
|
public ProjectTypeTableCell(ProjectTypeService projectTypeService) {
|
||||||
setService(projectTypeService);
|
setService(projectTypeService);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import com.ecep.contract.vo.PurchaseOrderItemVo;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class PurchaseOrderItemTableCell<V> extends AsyncUpdateTableCell<V, PurchaseOrderItemVo> {
|
public class PurchaseOrderItemTableCell<V> extends AsyncUpdateTableCell<V, Integer, PurchaseOrderItemVo> {
|
||||||
PurchaseOrdersService purchaseOrdersService;
|
PurchaseOrdersService purchaseOrdersService;
|
||||||
PurchaseOrderItemService purchaseOrderItemService;
|
PurchaseOrderItemService purchaseOrderItemService;
|
||||||
private InventoryService inventoryService;
|
private InventoryService inventoryService;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import com.ecep.contract.vo.UnitVo;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class UnitTableCell<T> extends AsyncUpdateTableCell<T, UnitVo> {
|
public class UnitTableCell<T> extends AsyncUpdateTableCell<T, Integer, UnitVo> {
|
||||||
public UnitTableCell(UnitService service) {
|
public UnitTableCell(UnitService service) {
|
||||||
setService(service);
|
setService(service);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import javafx.util.Callback;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class VendorCatalogTableCell<T> extends AsyncUpdateTableCell<T, VendorCatalogVo> {
|
public class VendorCatalogTableCell<T> extends AsyncUpdateTableCell<T, Integer, VendorCatalogVo> {
|
||||||
public static <S> Callback<TableColumn<S, Integer>, TableCell<S, Integer>> forTableColumn() {
|
public static <S> Callback<TableColumn<S, Integer>, TableCell<S, Integer>> forTableColumn() {
|
||||||
return forTableColumn(SpringApp.getBean(VendorCatalogService.class));
|
return forTableColumn(SpringApp.getBean(VendorCatalogService.class));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.ecep.contract.controller.table.cell;
|
||||||
|
|
||||||
|
import com.ecep.contract.SpringApp;
|
||||||
|
import com.ecep.contract.VendorType;
|
||||||
|
import com.ecep.contract.service.VendorTypeService;
|
||||||
|
import com.ecep.contract.vo.VendorTypeLocalVo;
|
||||||
|
|
||||||
|
import javafx.scene.control.TableCell;
|
||||||
|
import javafx.scene.control.TableColumn;
|
||||||
|
import javafx.util.Callback;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商类型单元格,用于在表格中显示供应商类型信息
|
||||||
|
*/
|
||||||
|
public class VendorTypeTableCell<T> extends AsyncUpdateTableCell<T, VendorType, VendorTypeLocalVo> {
|
||||||
|
private VendorTypeService vendorTypeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建一个用于表格列的单元格工厂
|
||||||
|
*/
|
||||||
|
public static <T> Callback<TableColumn<T, VendorType>, TableCell<T, VendorType>> forTableColumn(
|
||||||
|
VendorTypeService service) {
|
||||||
|
return param -> new VendorTypeTableCell<>(service);
|
||||||
|
}
|
||||||
|
|
||||||
|
public VendorTypeTableCell() {
|
||||||
|
this.vendorTypeService = SpringApp.getBean(VendorTypeService.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public VendorTypeTableCell(VendorTypeService service) {
|
||||||
|
setService(service);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected VendorTypeService getServiceBean() {
|
||||||
|
if (vendorTypeService == null) {
|
||||||
|
vendorTypeService = SpringApp.getBean(VendorTypeService.class);
|
||||||
|
}
|
||||||
|
return vendorTypeService;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected VendorTypeLocalVo initialize() {
|
||||||
|
VendorType item = getItem();
|
||||||
|
return getServiceBean().findByType(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,16 +1,11 @@
|
|||||||
package com.ecep.contract.controller.vendor;
|
package com.ecep.contract.controller.vendor;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import com.ecep.contract.MyDateTimeUtils;
|
import com.ecep.contract.MyDateTimeUtils;
|
||||||
import com.ecep.contract.controller.AbstEntityManagerSkin;
|
import com.ecep.contract.controller.AbstEntityManagerSkin;
|
||||||
import com.ecep.contract.controller.ComboBoxUtils;
|
import com.ecep.contract.controller.ComboBoxUtils;
|
||||||
import com.ecep.contract.controller.table.cell.CompanyTableCell;
|
import com.ecep.contract.controller.table.cell.CompanyTableCell;
|
||||||
import com.ecep.contract.model.CompanyVendor;
|
import com.ecep.contract.controller.table.cell.VendorCatalogTableCell;
|
||||||
import com.ecep.contract.model.VendorCatalog;
|
import com.ecep.contract.controller.table.cell.VendorTypeTableCell;
|
||||||
import com.ecep.contract.model.VendorTypeLocal;
|
|
||||||
import com.ecep.contract.service.CompanyService;
|
import com.ecep.contract.service.CompanyService;
|
||||||
import com.ecep.contract.service.CompanyVendorService;
|
import com.ecep.contract.service.CompanyVendorService;
|
||||||
import com.ecep.contract.service.VendorCatalogService;
|
import com.ecep.contract.service.VendorCatalogService;
|
||||||
@@ -18,11 +13,7 @@ import com.ecep.contract.service.VendorTypeService;
|
|||||||
import com.ecep.contract.util.ParamUtils;
|
import com.ecep.contract.util.ParamUtils;
|
||||||
import com.ecep.contract.vm.CompanyVendorViewModel;
|
import com.ecep.contract.vm.CompanyVendorViewModel;
|
||||||
import com.ecep.contract.vo.CompanyVendorVo;
|
import com.ecep.contract.vo.CompanyVendorVo;
|
||||||
import com.ecep.contract.vo.VendorCatalogVo;
|
|
||||||
|
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.beans.binding.Bindings;
|
|
||||||
import javafx.beans.property.SimpleObjectProperty;
|
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
public class CompanyVendorManagerSkin
|
public class CompanyVendorManagerSkin
|
||||||
@@ -63,41 +54,21 @@ public class CompanyVendorManagerSkin
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initializeTable() {
|
public void initializeTable() {
|
||||||
List<VendorTypeLocal> vendorTypeLocals = getBean(VendorTypeService.class).findAll();
|
ComboBoxUtils.initialComboBox(controller.typeSelector, null, getBean(VendorTypeService.class), true);
|
||||||
ComboBoxUtils.initialComboBox(controller.typeSelector, vendorTypeLocals, true);
|
|
||||||
controller.typeSelector.valueProperty().addListener((observable, oldValue, newValue) -> {
|
|
||||||
loadTableDataSet(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
controller.idColumn.setCellValueFactory(param -> param.getValue().getId());
|
controller.idColumn.setCellValueFactory(param -> param.getValue().getId());
|
||||||
controller.codeColumn.setCellValueFactory(param -> param.getValue().getCode());
|
controller.codeColumn.setCellValueFactory(param -> param.getValue().getCode());
|
||||||
|
|
||||||
controller.catalogColumn.setCellValueFactory(param -> Bindings.createStringBinding(() -> {
|
controller.catalogColumn.setCellValueFactory(param -> param.getValue().getCatalog());
|
||||||
SimpleObjectProperty<Integer> catalog = param.getValue().getCatalog();
|
controller.catalogColumn.setCellFactory(VendorCatalogTableCell.forTableColumn(getBean(VendorCatalogService.class)));
|
||||||
Integer catalogId = catalog.get();
|
|
||||||
if (catalogId == null) {
|
|
||||||
return "-";
|
|
||||||
}
|
|
||||||
VendorCatalogVo vendorCatalog = getBean(VendorCatalogService.class).findById(catalogId);
|
|
||||||
if (vendorCatalog == null) {
|
|
||||||
return "-";
|
|
||||||
} else {
|
|
||||||
return vendorCatalog.getName();
|
|
||||||
}
|
|
||||||
}, param.getValue().getCatalog()));
|
|
||||||
|
|
||||||
controller.typeColumn.setCellValueFactory(param -> param.getValue().getType().map(type -> {
|
|
||||||
VendorTypeLocal local = vendorTypeLocals.stream().filter(v -> v.getType() == type).findFirst().orElse(null);
|
controller.typeColumn.setCellValueFactory(param -> param.getValue().getType());
|
||||||
if (local == null) {
|
controller.typeColumn.setCellFactory(VendorTypeTableCell.forTableColumn(getBean(VendorTypeService.class)));
|
||||||
return type.name();
|
|
||||||
} else {
|
|
||||||
return local.getValue();
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
controller.purchaseColumn.setCellValueFactory(param -> param.getValue().getPurchase());
|
controller.purchaseColumn.setCellValueFactory(param -> param.getValue().getPurchase());
|
||||||
controller.companyColumn.setCellValueFactory(param -> param.getValue().getCompany());
|
controller.companyColumn.setCellValueFactory(param -> param.getValue().getCompany());
|
||||||
controller.companyColumn.setCellFactory(param -> new CompanyTableCell<>(getCompanyService()));
|
controller.companyColumn.setCellFactory(CompanyTableCell.forTableColumn(getCompanyService()));
|
||||||
|
|
||||||
controller.developDateColumn.setCellValueFactory(param -> param.getValue().getDevelopDate());
|
controller.developDateColumn.setCellValueFactory(param -> param.getValue().getDevelopDate());
|
||||||
controller.pathColumn.setCellValueFactory(param -> param.getValue().getPath());
|
controller.pathColumn.setCellValueFactory(param -> param.getValue().getPath());
|
||||||
|
|||||||
@@ -12,11 +12,10 @@ import org.springframework.data.domain.Pageable;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import com.ecep.contract.MessageHolder;
|
import com.ecep.contract.MessageHolder;
|
||||||
|
import com.ecep.contract.VendorType;
|
||||||
import com.ecep.contract.controller.AbstManagerWindowController;
|
import com.ecep.contract.controller.AbstManagerWindowController;
|
||||||
import com.ecep.contract.controller.vendor.approved_list.CompanyVendorApprovedListManagerWindowController;
|
import com.ecep.contract.controller.vendor.approved_list.CompanyVendorApprovedListManagerWindowController;
|
||||||
import com.ecep.contract.controller.vendor.group.VendorGroupManagerWindowController;
|
import com.ecep.contract.controller.vendor.group.VendorGroupManagerWindowController;
|
||||||
import com.ecep.contract.model.CompanyVendor;
|
|
||||||
import com.ecep.contract.model.VendorTypeLocal;
|
|
||||||
import com.ecep.contract.service.CompanyService;
|
import com.ecep.contract.service.CompanyService;
|
||||||
import com.ecep.contract.service.CompanyVendorService;
|
import com.ecep.contract.service.CompanyVendorService;
|
||||||
import com.ecep.contract.task.VendorVerifyAllTasker;
|
import com.ecep.contract.task.VendorVerifyAllTasker;
|
||||||
@@ -24,6 +23,7 @@ import com.ecep.contract.util.FxmlPath;
|
|||||||
import com.ecep.contract.util.UITools;
|
import com.ecep.contract.util.UITools;
|
||||||
import com.ecep.contract.vm.CompanyVendorViewModel;
|
import com.ecep.contract.vm.CompanyVendorViewModel;
|
||||||
import com.ecep.contract.vo.CompanyVendorVo;
|
import com.ecep.contract.vo.CompanyVendorVo;
|
||||||
|
import com.ecep.contract.vo.VendorTypeLocalVo;
|
||||||
|
|
||||||
import javafx.event.ActionEvent;
|
import javafx.event.ActionEvent;
|
||||||
import javafx.scene.control.ComboBox;
|
import javafx.scene.control.ComboBox;
|
||||||
@@ -41,14 +41,14 @@ public class CompanyVendorManagerWindowController
|
|||||||
public TableColumn<CompanyVendorViewModel, Number> idColumn;
|
public TableColumn<CompanyVendorViewModel, Number> idColumn;
|
||||||
public TableColumn<CompanyVendorViewModel, Integer> companyColumn;
|
public TableColumn<CompanyVendorViewModel, Integer> companyColumn;
|
||||||
public TableColumn<CompanyVendorViewModel, String> codeColumn;
|
public TableColumn<CompanyVendorViewModel, String> codeColumn;
|
||||||
public TableColumn<CompanyVendorViewModel, String> catalogColumn;
|
public TableColumn<CompanyVendorViewModel, Integer> catalogColumn;
|
||||||
public TableColumn<CompanyVendorViewModel, String> typeColumn;
|
public TableColumn<CompanyVendorViewModel, VendorType> typeColumn;
|
||||||
public TableColumn<CompanyVendorViewModel, String> purchaseColumn;
|
public TableColumn<CompanyVendorViewModel, String> purchaseColumn;
|
||||||
public TableColumn<CompanyVendorViewModel, LocalDate> developDateColumn;
|
public TableColumn<CompanyVendorViewModel, LocalDate> developDateColumn;
|
||||||
public TableColumn<CompanyVendorViewModel, String> pathColumn;
|
public TableColumn<CompanyVendorViewModel, String> pathColumn;
|
||||||
public TableColumn<CompanyVendorViewModel, String> createdColumn;
|
public TableColumn<CompanyVendorViewModel, String> createdColumn;
|
||||||
|
|
||||||
public ComboBox<VendorTypeLocal> typeSelector;
|
public ComboBox<VendorTypeLocalVo> typeSelector;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private CompanyService companyService;
|
private CompanyService companyService;
|
||||||
|
|||||||
@@ -1,32 +1,24 @@
|
|||||||
package com.ecep.contract.converter;
|
package com.ecep.contract.converter;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.context.annotation.Lazy;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import com.ecep.contract.service.BankService;
|
import com.ecep.contract.service.BankService;
|
||||||
import com.ecep.contract.vo.BankVo;
|
import com.ecep.contract.vo.BankVo;
|
||||||
|
import javafx.util.StringConverter;
|
||||||
|
|
||||||
import jakarta.annotation.PostConstruct;
|
public class BankStringConverter extends StringConverter<BankVo> {
|
||||||
|
|
||||||
@Lazy
|
|
||||||
@Component
|
|
||||||
@Deprecated
|
|
||||||
public class BankStringConverter extends EntityStringConverter<BankVo> {
|
|
||||||
|
|
||||||
@Lazy
|
|
||||||
@Autowired
|
|
||||||
BankService service;
|
BankService service;
|
||||||
|
|
||||||
public BankStringConverter() {
|
public BankStringConverter(BankService service) {
|
||||||
|
this.service = service;
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostConstruct
|
@Override
|
||||||
private void init() {
|
public String toString(BankVo object) {
|
||||||
// #2
|
return object == null ? "" : object.getCode() + " " + object.getName();
|
||||||
setInitialized(project -> service.findById(project.getId()));
|
}
|
||||||
setSuggestion(service::search);
|
|
||||||
setFromString(service::findByName);
|
@Override
|
||||||
|
public BankVo fromString(String string) {
|
||||||
|
return service.findByName(string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,19 +2,17 @@ package com.ecep.contract.converter;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ecep.contract.service.ContractGroupService;
|
||||||
|
import javafx.util.StringConverter;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import com.ecep.contract.vo.ContractGroupVo;
|
import com.ecep.contract.vo.ContractGroupVo;
|
||||||
|
|
||||||
public class ContractGroupStringConverter extends EntityStringConverter<ContractGroupVo> {
|
public class ContractGroupStringConverter extends StringConverter<ContractGroupVo> {
|
||||||
|
private ContractGroupService service;
|
||||||
|
|
||||||
private List<ContractGroupVo> dataset;
|
public ContractGroupStringConverter(ContractGroupService contractGroupService) {
|
||||||
|
this.service = contractGroupService;
|
||||||
public ContractGroupStringConverter() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public ContractGroupStringConverter(List<ContractGroupVo> dataset) {
|
|
||||||
this.dataset = dataset;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -22,32 +20,14 @@ public class ContractGroupStringConverter extends EntityStringConverter<Contract
|
|||||||
if (group == null) {
|
if (group == null) {
|
||||||
return "All";
|
return "All";
|
||||||
}
|
}
|
||||||
return group.getName();
|
return group.getCode() + " " + group.getName() + " " + group.getTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ContractGroupVo fromString(String string) {
|
public ContractGroupVo fromString(String string) {
|
||||||
if (dataset == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (!StringUtils.hasText(string)) {
|
if (!StringUtils.hasText(string)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
return service.findByCode(string);
|
||||||
for (ContractGroupVo group : dataset) {
|
|
||||||
if (group == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (toString(group).equals(string)) {
|
|
||||||
return group;
|
|
||||||
}
|
|
||||||
if (group.getCode().equals(string)) {
|
|
||||||
return group;
|
|
||||||
}
|
|
||||||
if (group.getName().contains(string)) {
|
|
||||||
return group;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.ecep.contract.converter;
|
package com.ecep.contract.converter;
|
||||||
|
|
||||||
|
import javafx.util.StringConverter;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -9,21 +10,20 @@ import com.ecep.contract.vo.ContractVo;
|
|||||||
|
|
||||||
import jakarta.annotation.PostConstruct;
|
import jakarta.annotation.PostConstruct;
|
||||||
|
|
||||||
@Lazy
|
public class ContractStringConverter extends StringConverter<ContractVo> {
|
||||||
@Component
|
|
||||||
public class ContractStringConverter extends EntityStringConverter<ContractVo> {
|
|
||||||
@Lazy
|
|
||||||
@Autowired
|
|
||||||
ContractService service;
|
ContractService service;
|
||||||
|
|
||||||
public ContractStringConverter() {
|
public ContractStringConverter(ContractService service) {
|
||||||
|
this.service = service;
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostConstruct
|
@Override
|
||||||
private void init() {
|
public String toString(ContractVo cc) {
|
||||||
setInitialized(project -> service.findById(project.getId()));
|
return cc.getCode() + " " + cc.getName();
|
||||||
setSuggestion(service::search);
|
}
|
||||||
// TODO 按名称找出,容易出问题
|
|
||||||
setFromString(service::findByName);
|
@Override
|
||||||
|
public ContractVo fromString(String string) {
|
||||||
|
return service.findByCode(string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,19 +2,30 @@ package com.ecep.contract.converter;
|
|||||||
|
|
||||||
import com.ecep.contract.service.ContractTypeService;
|
import com.ecep.contract.service.ContractTypeService;
|
||||||
import com.ecep.contract.vo.ContractTypeVo;
|
import com.ecep.contract.vo.ContractTypeVo;
|
||||||
|
import javafx.util.StringConverter;
|
||||||
|
|
||||||
public class ContractTypeStringConverter extends EntityStringConverter<ContractTypeVo> {
|
/**
|
||||||
|
* 合同类型字符串转换器
|
||||||
|
*
|
||||||
|
* @author songqq
|
||||||
|
*/
|
||||||
|
public class ContractTypeStringConverter extends StringConverter<ContractTypeVo> {
|
||||||
ContractTypeService contractTypeService;
|
ContractTypeService contractTypeService;
|
||||||
|
|
||||||
public ContractTypeStringConverter(ContractTypeService contractTypeService) {
|
public ContractTypeStringConverter(ContractTypeService contractTypeService) {
|
||||||
this.contractTypeService = contractTypeService;
|
this.contractTypeService = contractTypeService;
|
||||||
init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init() {
|
@Override
|
||||||
setInitialized(project -> contractTypeService.findById(project.getId()));
|
public String toString(ContractTypeVo object) {
|
||||||
setSuggestion(contractTypeService::search);
|
return object.getCode() + " " + object.getCatalog() + " " + object.getName() + " " + object.getTitle()
|
||||||
setFromString(contractTypeService::findByName);
|
+ "("
|
||||||
|
+ object.getDirection() + ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ContractTypeVo fromString(String string) {
|
||||||
|
return contractTypeService.findByCode(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
package com.ecep.contract.service;
|
package com.ecep.contract.service;
|
||||||
|
|
||||||
|
import com.ecep.contract.converter.BankStringConverter;
|
||||||
|
import com.ecep.contract.util.ParamUtils;
|
||||||
|
import com.ecep.contract.vm.BankViewModel;
|
||||||
|
import com.ecep.contract.vo.BankVo;
|
||||||
|
import javafx.util.StringConverter;
|
||||||
import org.springframework.cache.annotation.CacheConfig;
|
import org.springframework.cache.annotation.CacheConfig;
|
||||||
import org.springframework.cache.annotation.CacheEvict;
|
import org.springframework.cache.annotation.CacheEvict;
|
||||||
import org.springframework.cache.annotation.Cacheable;
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
@@ -8,15 +13,12 @@ import org.springframework.data.domain.Page;
|
|||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.ecep.contract.util.ParamUtils;
|
|
||||||
import com.ecep.contract.vm.BankViewModel;
|
|
||||||
import com.ecep.contract.vo.BankVo;
|
|
||||||
|
|
||||||
import javafx.util.StringConverter;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@CacheConfig(cacheNames = "bank")
|
@CacheConfig(cacheNames = "bank")
|
||||||
public class BankService extends QueryService<BankVo, BankViewModel> {
|
public class BankService extends QueryService<BankVo, BankViewModel> {
|
||||||
|
|
||||||
|
private final BankStringConverter stringConverter = new BankStringConverter(this);
|
||||||
|
|
||||||
@Cacheable(key = "#p0")
|
@Cacheable(key = "#p0")
|
||||||
@Override
|
@Override
|
||||||
public BankVo findById(Integer id) {
|
public BankVo findById(Integer id) {
|
||||||
@@ -31,32 +33,20 @@ public class BankService extends QueryService<BankVo, BankViewModel> {
|
|||||||
return page.getContent().getFirst();
|
return page.getContent().getFirst();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Caching(evict = { @CacheEvict(key = "#p0.id") })
|
@Caching(evict = {@CacheEvict(key = "#p0.id")})
|
||||||
@Override
|
@Override
|
||||||
public BankVo save(BankVo entity) {
|
public BankVo save(BankVo entity) {
|
||||||
return super.save(entity);
|
return super.save(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Caching(evict = { @CacheEvict(key = "#p0.id") })
|
@Caching(evict = {@CacheEvict(key = "#p0.id")})
|
||||||
@Override
|
@Override
|
||||||
public void delete(BankVo entity) {
|
public void delete(BankVo entity) {
|
||||||
super.delete(entity);
|
super.delete(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
private StringConverter<BankVo> stringConverter = new StringConverter<BankVo>() {
|
|
||||||
@Override
|
|
||||||
public String toString(BankVo object) {
|
|
||||||
return object == null ? "" : object.getName();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BankVo fromString(String string) {
|
|
||||||
return findByName(string);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StringConverter<BankVo> getStringConverter() {
|
public BankStringConverter getStringConverter() {
|
||||||
return stringConverter;
|
return stringConverter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import org.springframework.cache.annotation.Cacheable;
|
|||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyCustomerFileType;
|
import com.ecep.contract.CustomerFileType;
|
||||||
import com.ecep.contract.MessageHolder;
|
import com.ecep.contract.MessageHolder;
|
||||||
import com.ecep.contract.SpringApp;
|
import com.ecep.contract.SpringApp;
|
||||||
import com.ecep.contract.model.CompanyCustomer;
|
import com.ecep.contract.model.CompanyCustomer;
|
||||||
@@ -49,7 +49,7 @@ public class CompanyCustomerFileService extends QueryService<CompanyCustomerFile
|
|||||||
|
|
||||||
// 检索评估表
|
// 检索评估表
|
||||||
List<CompanyCustomerFileVo> files = findAllByCustomerAndType(companyCustomer,
|
List<CompanyCustomerFileVo> files = findAllByCustomerAndType(companyCustomer,
|
||||||
CompanyCustomerFileType.EvaluationForm);
|
CustomerFileType.EvaluationForm);
|
||||||
CompanyCustomerFileVo latestFile = files.stream()
|
CompanyCustomerFileVo latestFile = files.stream()
|
||||||
.filter(v -> v.getSignDate() != null && v.isValid())
|
.filter(v -> v.getSignDate() != null && v.isValid())
|
||||||
.max(Comparator.comparing(CompanyCustomerFileVo::getSignDate))
|
.max(Comparator.comparing(CompanyCustomerFileVo::getSignDate))
|
||||||
@@ -104,7 +104,7 @@ public class CompanyCustomerFileService extends QueryService<CompanyCustomerFile
|
|||||||
.getContent();
|
.getContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<CompanyCustomerFileVo> findAllByCustomerAndType(CompanyCustomerVo customer, CompanyCustomerFileType type) {
|
public List<CompanyCustomerFileVo> findAllByCustomerAndType(CompanyCustomerVo customer, CustomerFileType type) {
|
||||||
return findAll(ParamUtils.builder()
|
return findAll(ParamUtils.builder()
|
||||||
.equals("customer", customer.getId())
|
.equals("customer", customer.getId())
|
||||||
.equals("type", type.name())
|
.equals("type", type.name())
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.ecep.contract.service;
|
package com.ecep.contract.service;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyCustomerFileType;
|
import com.ecep.contract.CustomerFileType;
|
||||||
import com.ecep.contract.model.CompanyCustomerFileTypeLocal;
|
import com.ecep.contract.model.CompanyCustomerFileTypeLocal;
|
||||||
import com.ecep.contract.vm.CompanyCustomerFileTypeLocalViewModel;
|
import com.ecep.contract.vm.CompanyCustomerFileTypeLocalViewModel;
|
||||||
import org.springframework.cache.annotation.CacheConfig;
|
import org.springframework.cache.annotation.CacheConfig;
|
||||||
@@ -18,7 +18,7 @@ import java.util.stream.Collectors;
|
|||||||
@CacheConfig(cacheNames = "company-file-type")
|
@CacheConfig(cacheNames = "company-file-type")
|
||||||
public class CompanyCustomerFileTypeService extends QueryService<CompanyCustomerFileTypeLocal, CompanyCustomerFileTypeLocalViewModel>{
|
public class CompanyCustomerFileTypeService extends QueryService<CompanyCustomerFileTypeLocal, CompanyCustomerFileTypeLocalViewModel>{
|
||||||
@Cacheable
|
@Cacheable
|
||||||
public Map<CompanyCustomerFileType, CompanyCustomerFileTypeLocal> findAll(Locale locale) {
|
public Map<CustomerFileType, CompanyCustomerFileTypeLocal> findAll(Locale locale) {
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put("lang", locale.toLanguageTag());
|
params.put("lang", locale.toLanguageTag());
|
||||||
return findAll(params, Pageable.unpaged()).stream()
|
return findAll(params, Pageable.unpaged()).stream()
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import java.util.Map;
|
|||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import com.ecep.contract.util.ParamUtils;
|
||||||
|
import com.ecep.contract.vo.CompanyFileTypeLocalVo;
|
||||||
import org.springframework.cache.annotation.CacheConfig;
|
import org.springframework.cache.annotation.CacheConfig;
|
||||||
import org.springframework.cache.annotation.Cacheable;
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
@@ -17,13 +19,11 @@ import com.ecep.contract.vm.CompanyFileTypeLocalViewModel;
|
|||||||
|
|
||||||
@Service
|
@Service
|
||||||
@CacheConfig(cacheNames = "company-file-type")
|
@CacheConfig(cacheNames = "company-file-type")
|
||||||
public class CompanyFileTypeService extends QueryService<CompanyFileTypeLocal, CompanyFileTypeLocalViewModel> {
|
public class CompanyFileTypeService extends QueryService<CompanyFileTypeLocalVo, CompanyFileTypeLocalViewModel> {
|
||||||
|
|
||||||
@Cacheable
|
@Cacheable
|
||||||
public Map<CompanyFileType, CompanyFileTypeLocal> findAll(Locale locale) {
|
public Map<CompanyFileType, CompanyFileTypeLocalVo> findAll(Locale locale) {
|
||||||
Map<String, Object> params = new HashMap<>();
|
return findAll(ParamUtils.builder().equals("lang", locale.toLanguageTag()).build(), Pageable.unpaged()).stream()
|
||||||
params.put("lang", locale.toLanguageTag());
|
.collect(Collectors.toMap(CompanyFileTypeLocalVo::getType, Function.identity()));
|
||||||
return findAll(params, Pageable.unpaged()).stream()
|
|
||||||
.collect(Collectors.toMap(CompanyFileTypeLocal::getType, Function.identity()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javafx.util.StringConverter;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.cache.annotation.CacheConfig;
|
import org.springframework.cache.annotation.CacheConfig;
|
||||||
import org.springframework.cache.annotation.Cacheable;
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
@@ -210,4 +211,8 @@ public class CompanyService extends QueryService<CompanyVo, CompanyViewModel> {
|
|||||||
return retrieved;
|
return retrieved;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StringConverter<CompanyVo> getStringConverter() {
|
||||||
|
return super.getStringConverter();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,25 @@
|
|||||||
package com.ecep.contract.service;
|
package com.ecep.contract.service;
|
||||||
|
|
||||||
import java.util.List;
|
import com.ecep.contract.converter.ContractGroupStringConverter;
|
||||||
|
import com.ecep.contract.util.ParamUtils;
|
||||||
|
import com.ecep.contract.vm.ContractGroupViewModel;
|
||||||
|
import com.ecep.contract.vo.ContractGroupVo;
|
||||||
|
import javafx.util.StringConverter;
|
||||||
import org.springframework.cache.annotation.CacheConfig;
|
import org.springframework.cache.annotation.CacheConfig;
|
||||||
import org.springframework.cache.annotation.CacheEvict;
|
import org.springframework.cache.annotation.CacheEvict;
|
||||||
import org.springframework.cache.annotation.Cacheable;
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
import org.springframework.cache.annotation.Caching;
|
import org.springframework.cache.annotation.Caching;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.ecep.contract.vm.ContractGroupViewModel;
|
import java.util.List;
|
||||||
import com.ecep.contract.vo.ContractGroupVo;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@CacheConfig(cacheNames = "contract-group")
|
@CacheConfig(cacheNames = "contract-group")
|
||||||
public class ContractGroupService extends QueryService<ContractGroupVo, ContractGroupViewModel> {
|
public class ContractGroupService extends QueryService<ContractGroupVo, ContractGroupViewModel> {
|
||||||
|
|
||||||
|
private final ContractGroupStringConverter converter = new ContractGroupStringConverter(this);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Cacheable(key = "#p0")
|
@Cacheable(key = "#p0")
|
||||||
public ContractGroupVo findById(Integer id) {
|
public ContractGroupVo findById(Integer id) {
|
||||||
@@ -22,19 +27,14 @@ public class ContractGroupService extends QueryService<ContractGroupVo, Contract
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ContractGroupVo findByCode(String code) {
|
public ContractGroupVo findByCode(String code) {
|
||||||
try {
|
return findAll(ParamUtils.builder().equals("code", code).build(), Pageable.ofSize(1)).stream().findFirst().orElse(null);
|
||||||
return async("findByCode", code, String.class).handle((response, ex) -> {
|
|
||||||
if (ex != null) {
|
|
||||||
throw new RuntimeException("远程方法+findByCode+调用失败", ex);
|
|
||||||
}
|
|
||||||
ContractGroupVo newEntity = createNewEntity();
|
|
||||||
return updateValue(newEntity, response);
|
|
||||||
}).get();
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new RuntimeException("查询实体失败" + code, e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ContractGroupVo findByName(String name) {
|
||||||
|
return findAll(ParamUtils.builder().equals("name", name).build(), Pageable.ofSize(1)).stream().findFirst().orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Cacheable(key = "'groups'")
|
@Cacheable(key = "'groups'")
|
||||||
@Override
|
@Override
|
||||||
public List<ContractGroupVo> findAll() {
|
public List<ContractGroupVo> findAll() {
|
||||||
@@ -56,4 +56,9 @@ public class ContractGroupService extends QueryService<ContractGroupVo, Contract
|
|||||||
public void delete(ContractGroupVo entity) {
|
public void delete(ContractGroupVo entity) {
|
||||||
super.delete(entity);
|
super.delete(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StringConverter<ContractGroupVo> getStringConverter() {
|
||||||
|
return converter;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,7 @@ package com.ecep.contract.service;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ecep.contract.converter.ContractTypeStringConverter;
|
||||||
import org.springframework.cache.annotation.CacheConfig;
|
import org.springframework.cache.annotation.CacheConfig;
|
||||||
import org.springframework.cache.annotation.CacheEvict;
|
import org.springframework.cache.annotation.CacheEvict;
|
||||||
import org.springframework.cache.annotation.Cacheable;
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
@@ -16,6 +17,8 @@ import javafx.util.StringConverter;
|
|||||||
@Service
|
@Service
|
||||||
@CacheConfig(cacheNames = "contract-type")
|
@CacheConfig(cacheNames = "contract-type")
|
||||||
public class ContractTypeService extends QueryService<ContractTypeVo, ContractTypeViewModel> {
|
public class ContractTypeService extends QueryService<ContractTypeVo, ContractTypeViewModel> {
|
||||||
|
private final ContractTypeStringConverter stringConverter = new ContractTypeStringConverter(this);
|
||||||
|
|
||||||
@Cacheable(key = "#p0")
|
@Cacheable(key = "#p0")
|
||||||
@Override
|
@Override
|
||||||
public ContractTypeVo findById(Integer id) {
|
public ContractTypeVo findById(Integer id) {
|
||||||
@@ -70,19 +73,7 @@ public class ContractTypeService extends QueryService<ContractTypeVo, ContractTy
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StringConverter<ContractTypeVo> getStringConverter() {
|
public ContractTypeStringConverter getStringConverter() {
|
||||||
return new StringConverter<ContractTypeVo>() {
|
return stringConverter;
|
||||||
@Override
|
|
||||||
public String toString(ContractTypeVo object) {
|
|
||||||
return object.getCode() + " " + object.getCatalog() + " " + object.getName() + " " + object.getTitle()
|
|
||||||
+ "("
|
|
||||||
+ object.getDirection() + ")";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ContractTypeVo fromString(String string) {
|
|
||||||
return findByCode(string);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.ecep.contract.service;
|
package com.ecep.contract.service;
|
||||||
|
|
||||||
import org.springframework.cache.annotation.CacheConfig;
|
import org.springframework.cache.annotation.CacheConfig;
|
||||||
|
import org.springframework.cache.annotation.CacheEvict;
|
||||||
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -10,10 +12,18 @@ import com.ecep.contract.vm.DeliverySignMethodViewModel;
|
|||||||
import com.ecep.contract.vo.DeliverySignMethodVo;
|
import com.ecep.contract.vo.DeliverySignMethodVo;
|
||||||
import com.ecep.contract.vo.ProjectSaleTypeVo;
|
import com.ecep.contract.vo.ProjectSaleTypeVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@CacheConfig(cacheNames = "delivery-sign-method")
|
@CacheConfig(cacheNames = "delivery-sign-method")
|
||||||
public class DeliverySignMethodService extends QueryService<DeliverySignMethodVo, DeliverySignMethodViewModel> {
|
public class DeliverySignMethodService extends QueryService<DeliverySignMethodVo, DeliverySignMethodViewModel> {
|
||||||
|
|
||||||
|
@Cacheable(key = "#id")
|
||||||
|
@Override
|
||||||
|
public DeliverySignMethodVo findById(Integer id) {
|
||||||
|
return super.findById(id);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据销售类型和编码查询发货方式
|
* 根据销售类型和编码查询发货方式
|
||||||
*
|
*
|
||||||
@@ -29,4 +39,23 @@ public class DeliverySignMethodService extends QueryService<DeliverySignMethodVo
|
|||||||
}
|
}
|
||||||
return page.stream().filter(v -> v.getCode().equals(code)).findFirst().orElse(null);
|
return page.stream().filter(v -> v.getCode().equals(code)).findFirst().orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Cacheable(key = "'all'")
|
||||||
|
@Override
|
||||||
|
public List<DeliverySignMethodVo> findAll() {
|
||||||
|
return super.findAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
@CacheEvict(allEntries = true)
|
||||||
|
@Override
|
||||||
|
public DeliverySignMethodVo save(DeliverySignMethodVo entity) {
|
||||||
|
return super.save(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@CacheEvict(allEntries = true)
|
||||||
|
@Override
|
||||||
|
public void delete(DeliverySignMethodVo entity) {
|
||||||
|
super.delete(entity);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public class ProductUsageService extends QueryService<ProductUsageVo, ProductUsa
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Cacheable(unless = "'all'")
|
@Cacheable(key = "'all'")
|
||||||
public java.util.List<ProductUsageVo> findAll() {
|
public java.util.List<ProductUsageVo> findAll() {
|
||||||
return super.findAll();
|
return super.findAll();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,23 @@
|
|||||||
package com.ecep.contract.service;
|
package com.ecep.contract.service;
|
||||||
|
|
||||||
|
import com.ecep.contract.PageArgument;
|
||||||
|
import com.ecep.contract.PageContent;
|
||||||
|
import com.ecep.contract.WebSocketClientService;
|
||||||
|
import com.ecep.contract.model.IdentityEntity;
|
||||||
|
import com.ecep.contract.model.NamedEntity;
|
||||||
|
import com.ecep.contract.util.ParamUtils;
|
||||||
|
import com.ecep.contract.vm.IdentityViewModel;
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import javafx.util.StringConverter;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -7,25 +25,6 @@ import java.util.Map;
|
|||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.data.domain.Page;
|
|
||||||
import org.springframework.data.domain.Pageable;
|
|
||||||
|
|
||||||
import com.ecep.contract.PageArgument;
|
|
||||||
import com.ecep.contract.PageContent;
|
|
||||||
import com.ecep.contract.WebSocketClientService;
|
|
||||||
import com.ecep.contract.model.IdentityEntity;
|
|
||||||
import com.ecep.contract.util.ParamUtils;
|
|
||||||
import com.ecep.contract.vm.IdentityViewModel;
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
||||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
|
|
||||||
import javafx.util.StringConverter;
|
|
||||||
|
|
||||||
public class QueryService<T extends IdentityEntity, TV extends IdentityViewModel<T>>
|
public class QueryService<T extends IdentityEntity, TV extends IdentityViewModel<T>>
|
||||||
implements ViewModelService<T, TV> {
|
implements ViewModelService<T, TV> {
|
||||||
// 添加日志记录器
|
// 添加日志记录器
|
||||||
@@ -166,7 +165,7 @@ public class QueryService<T extends IdentityEntity, TV extends IdentityViewModel
|
|||||||
return pageContent.toPage();
|
return pageContent.toPage();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// 处理转换过程中的异常,包装为RuntimeException并附带响应内容
|
// 处理转换过程中的异常,包装为RuntimeException并附带响应内容
|
||||||
throw new RuntimeException(response.toString(), e);
|
throw new RuntimeException("响应结果转换失败, JSON = " + response.toString(), e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -189,7 +188,7 @@ public class QueryService<T extends IdentityEntity, TV extends IdentityViewModel
|
|||||||
return asyncFindAll(params, pageable).get();
|
return asyncFindAll(params, pageable).get();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// 处理异步查询过程中的任何异常,转换为运行时异常抛出
|
// 处理异步查询过程中的任何异常,转换为运行时异常抛出
|
||||||
throw new RuntimeException("查询所有实体失败", e);
|
throw new RuntimeException("查询失败, 参数:" + params, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -261,6 +260,9 @@ public class QueryService<T extends IdentityEntity, TV extends IdentityViewModel
|
|||||||
return new StringConverter<>() {
|
return new StringConverter<>() {
|
||||||
@Override
|
@Override
|
||||||
public String toString(T object) {
|
public String toString(T object) {
|
||||||
|
if (object instanceof NamedEntity named) {
|
||||||
|
return named.getName();
|
||||||
|
}
|
||||||
return object.toString();
|
return object.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,39 +1,50 @@
|
|||||||
package com.ecep.contract.service;
|
package com.ecep.contract.service;
|
||||||
|
|
||||||
import com.ecep.contract.model.VendorTypeLocal;
|
|
||||||
import com.ecep.contract.vm.VendorTypeLocalViewModel;
|
|
||||||
import org.springframework.cache.annotation.CacheConfig;
|
|
||||||
import org.springframework.cache.annotation.CachePut;
|
|
||||||
import org.springframework.cache.annotation.Cacheable;
|
|
||||||
import org.springframework.cache.annotation.Caching;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.cache.annotation.CacheConfig;
|
||||||
|
import org.springframework.cache.annotation.CacheEvict;
|
||||||
|
import org.springframework.cache.annotation.CachePut;
|
||||||
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
|
import org.springframework.cache.annotation.Caching;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.ecep.contract.VendorType;
|
||||||
|
import com.ecep.contract.util.ParamUtils;
|
||||||
|
import com.ecep.contract.vm.VendorTypeLocalViewModel;
|
||||||
|
import com.ecep.contract.vo.VendorTypeLocalVo;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@CacheConfig(cacheNames = "vendor-type")
|
@CacheConfig(cacheNames = "vendor-type")
|
||||||
public class VendorTypeService extends QueryService<VendorTypeLocal, VendorTypeLocalViewModel> {
|
public class VendorTypeService extends QueryService<VendorTypeLocalVo, VendorTypeLocalViewModel> {
|
||||||
@Cacheable(key = "#p0")
|
@Cacheable(key = "#p0")
|
||||||
@Override
|
@Override
|
||||||
public VendorTypeLocal findById(Integer id) {
|
public VendorTypeLocalVo findById(Integer id) {
|
||||||
return super.findById(id);
|
return super.findById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Cacheable(key = "'type-'+#p0")
|
||||||
|
public VendorTypeLocalVo findByType(VendorType type) {
|
||||||
|
return findAll(ParamUtils.builder().equals("type", type).build(), Pageable.ofSize(1)).stream().findFirst()
|
||||||
|
.orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
@Cacheable(key = "'all'")
|
@Cacheable(key = "'all'")
|
||||||
@Override
|
@Override
|
||||||
public List<VendorTypeLocal> findAll() {
|
public List<VendorTypeLocalVo> findAll() {
|
||||||
return super.findAll();
|
return super.findAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Caching(put = {@CachePut(key = "#p0.id"), @CachePut(key = "'all'")})
|
@Caching(put = { @CachePut(key = "#p0.id"), @CachePut(key = "'type-'+#p0.type"), @CachePut(key = "'all'") })
|
||||||
@Override
|
@Override
|
||||||
public VendorTypeLocal save(VendorTypeLocal entity) {
|
public VendorTypeLocalVo save(VendorTypeLocalVo entity) {
|
||||||
return super.save(entity);
|
return super.save(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Caching(put = {@CachePut(key = "#p0.id"), @CachePut(key = "'all'")})
|
@Caching(evict = { @CacheEvict(key = "#p0.id"), @CacheEvict(key = "'type-'+#p0.type"), @CacheEvict(key = "'all'") })
|
||||||
@Override
|
@Override
|
||||||
public void delete(VendorTypeLocal entity) {
|
public void delete(VendorTypeLocalVo entity) {
|
||||||
super.delete(entity);
|
super.delete(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import java.util.stream.Collectors;
|
|||||||
import com.ecep.contract.vo.*;
|
import com.ecep.contract.vo.*;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyCustomerFileType;
|
import com.ecep.contract.CustomerFileType;
|
||||||
import com.ecep.contract.ContractFileType;
|
import com.ecep.contract.ContractFileType;
|
||||||
import com.ecep.contract.ContractPayWay;
|
import com.ecep.contract.ContractPayWay;
|
||||||
import com.ecep.contract.MessageHolder;
|
import com.ecep.contract.MessageHolder;
|
||||||
@@ -24,9 +24,7 @@ import com.ecep.contract.MyDateTimeUtils;
|
|||||||
import com.ecep.contract.SpringApp;
|
import com.ecep.contract.SpringApp;
|
||||||
import com.ecep.contract.controller.project.cost.ProjectCostImportItemsFromContractsTasker;
|
import com.ecep.contract.controller.project.cost.ProjectCostImportItemsFromContractsTasker;
|
||||||
import com.ecep.contract.model.Contract;
|
import com.ecep.contract.model.Contract;
|
||||||
import com.ecep.contract.model.ContractBidVendor;
|
|
||||||
import com.ecep.contract.model.ContractFileTypeLocal;
|
import com.ecep.contract.model.ContractFileTypeLocal;
|
||||||
import com.ecep.contract.model.VendorGroupRequireFileType;
|
|
||||||
import com.ecep.contract.service.CompanyCustomerFileService;
|
import com.ecep.contract.service.CompanyCustomerFileService;
|
||||||
import com.ecep.contract.service.CompanyCustomerService;
|
import com.ecep.contract.service.CompanyCustomerService;
|
||||||
import com.ecep.contract.service.CompanyExtendInfoService;
|
import com.ecep.contract.service.CompanyExtendInfoService;
|
||||||
@@ -690,7 +688,7 @@ public class ContractVerifyComm {
|
|||||||
for (LocalDate verifyDate : verifyDates) {
|
for (LocalDate verifyDate : verifyDates) {
|
||||||
CompanyCustomerFileVo customerFile = files.stream()
|
CompanyCustomerFileVo customerFile = files.stream()
|
||||||
.filter(v -> v.getSignDate() != null && v.isValid())
|
.filter(v -> v.getSignDate() != null && v.isValid())
|
||||||
.filter(v -> v.getType() == CompanyCustomerFileType.EvaluationForm)
|
.filter(v -> v.getType() == CustomerFileType.EvaluationForm)
|
||||||
.filter(v -> MyDateTimeUtils.dateValidFilter(verifyDate, v.getSignDate(),
|
.filter(v -> MyDateTimeUtils.dateValidFilter(verifyDate, v.getSignDate(),
|
||||||
v.getSignDate().plusYears(1), 7))
|
v.getSignDate().plusYears(1), 7))
|
||||||
.findFirst().orElse(null);
|
.findFirst().orElse(null);
|
||||||
@@ -701,7 +699,7 @@ public class ContractVerifyComm {
|
|||||||
|
|
||||||
CompanyCustomerFileVo latestFile = files.stream()
|
CompanyCustomerFileVo latestFile = files.stream()
|
||||||
.filter(v -> v.getSignDate() != null && v.isValid())
|
.filter(v -> v.getSignDate() != null && v.isValid())
|
||||||
.filter(v -> v.getType() == CompanyCustomerFileType.EvaluationForm)
|
.filter(v -> v.getType() == CustomerFileType.EvaluationForm)
|
||||||
.max(Comparator.comparing(CompanyCustomerFileVo::getSignDate))
|
.max(Comparator.comparing(CompanyCustomerFileVo::getSignDate))
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package com.ecep.contract.vm;
|
package com.ecep.contract.vm;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyCustomerFileType;
|
import com.ecep.contract.CustomerFileType;
|
||||||
import com.ecep.contract.model.CompanyCustomerFileTypeLocal;
|
import com.ecep.contract.model.CompanyCustomerFileTypeLocal;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class CompanyCustomerFileTypeLocalViewModel extends EnumViewModel<CompanyCustomerFileType, CompanyCustomerFileTypeLocal> {
|
public class CompanyCustomerFileTypeLocalViewModel extends EnumViewModel<CustomerFileType, CompanyCustomerFileTypeLocal> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.ecep.contract.vm;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyCustomerFileType;
|
import com.ecep.contract.CustomerFileType;
|
||||||
import com.ecep.contract.vo.CompanyCustomerFileVo;
|
import com.ecep.contract.vo.CompanyCustomerFileVo;
|
||||||
|
|
||||||
import javafx.beans.property.SimpleBooleanProperty;
|
import javafx.beans.property.SimpleBooleanProperty;
|
||||||
@@ -32,7 +32,7 @@ public class CompanyCustomerFileViewModel extends IdentityViewModel<CompanyCusto
|
|||||||
/**
|
/**
|
||||||
* 类型
|
* 类型
|
||||||
*/
|
*/
|
||||||
private SimpleObjectProperty<CompanyCustomerFileType> type = new SimpleObjectProperty<>();
|
private SimpleObjectProperty<CustomerFileType> type = new SimpleObjectProperty<>();
|
||||||
|
|
||||||
private SimpleStringProperty filePath = new SimpleStringProperty();
|
private SimpleStringProperty filePath = new SimpleStringProperty();
|
||||||
|
|
||||||
|
|||||||
@@ -3,22 +3,25 @@ package com.ecep.contract.vm;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyFileType;
|
import com.ecep.contract.CompanyFileType;
|
||||||
import com.ecep.contract.model.CompanyFileTypeLocal;
|
|
||||||
|
|
||||||
|
import com.ecep.contract.vo.CompanyFileTypeLocalVo;
|
||||||
import javafx.beans.property.SimpleObjectProperty;
|
import javafx.beans.property.SimpleObjectProperty;
|
||||||
import javafx.beans.property.SimpleStringProperty;
|
import javafx.beans.property.SimpleStringProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件类型本地化信息
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class CompanyFileTypeLocalViewModel extends IdentityViewModel<CompanyFileTypeLocal> {
|
public class CompanyFileTypeLocalViewModel extends IdentityViewModel<CompanyFileTypeLocalVo> {
|
||||||
private SimpleObjectProperty<CompanyFileType> type = new SimpleObjectProperty<>();
|
private SimpleObjectProperty<CompanyFileType> type = new SimpleObjectProperty<>();
|
||||||
private SimpleStringProperty lang = new SimpleStringProperty();
|
private SimpleStringProperty lang = new SimpleStringProperty();
|
||||||
private SimpleStringProperty value = new SimpleStringProperty();
|
private SimpleStringProperty value = new SimpleStringProperty();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void updateFrom(CompanyFileTypeLocal v) {
|
protected void updateFrom(CompanyFileTypeLocalVo v) {
|
||||||
super.updateFrom(v);
|
super.updateFrom(v);
|
||||||
type.set(v.getType());
|
type.set(v.getType());
|
||||||
lang.set(v.getLang());
|
lang.set(v.getLang());
|
||||||
@@ -26,7 +29,7 @@ public class CompanyFileTypeLocalViewModel extends IdentityViewModel<CompanyFile
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean copyTo(CompanyFileTypeLocal v) {
|
public boolean copyTo(CompanyFileTypeLocalVo v) {
|
||||||
boolean ret = super.copyTo(v);
|
boolean ret = super.copyTo(v);
|
||||||
if (!Objects.equals(type.get(), v.getType())) {
|
if (!Objects.equals(type.get(), v.getType())) {
|
||||||
v.setType(type.get());
|
v.setType(type.get());
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.ecep.contract.vm;
|
package com.ecep.contract.vm;
|
||||||
|
|
||||||
import com.ecep.contract.VendorType;
|
import com.ecep.contract.VendorType;
|
||||||
import com.ecep.contract.model.VendorTypeLocal;
|
import com.ecep.contract.vo.VendorTypeLocalVo;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class VendorTypeLocalViewModel extends EnumViewModel<VendorType, VendorTypeLocal> {
|
public class VendorTypeLocalViewModel extends EnumViewModel<VendorType, VendorTypeLocalVo> {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.ecep.contract;
|
package com.ecep.contract;
|
||||||
|
|
||||||
public enum CompanyCustomerFileType {
|
public enum CustomerFileType {
|
||||||
/**
|
/**
|
||||||
* 普通文件,一般文件
|
* 普通文件,一般文件
|
||||||
*/
|
*/
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.ecep.contract;
|
package com.ecep.contract;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商类型
|
||||||
|
*/
|
||||||
public enum VendorType {
|
public enum VendorType {
|
||||||
/**
|
/**
|
||||||
* 合格供应商
|
* 合格供应商
|
||||||
|
|||||||
@@ -13,4 +13,5 @@ public class WebSocketConstant {
|
|||||||
|
|
||||||
|
|
||||||
public static final String SESSION_ID_FIELD_NAME = "sessionId";
|
public static final String SESSION_ID_FIELD_NAME = "sessionId";
|
||||||
|
public static final int ERROR_CODE_UNAUTHORIZED = 401;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,5 +35,4 @@ public abstract class BaseEnumEntity<T extends Enum<?>> implements IdentityEntit
|
|||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@ import java.util.Objects;
|
|||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
|
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.CloudRkVo;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -25,7 +26,7 @@ import lombok.ToString;
|
|||||||
@Setter
|
@Setter
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "CLOUD_RK", schema = "supplier_ms")
|
@Table(name = "CLOUD_RK", schema = "supplier_ms")
|
||||||
public class CloudRk implements IdentityEntity, Serializable {
|
public class CloudRk implements IdentityEntity, Serializable, Voable<CloudRkVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -153,4 +154,27 @@ public class CloudRk implements IdentityEntity, Serializable {
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CloudRkVo toVo() {
|
||||||
|
CloudRkVo vo = new CloudRkVo();
|
||||||
|
vo.setId(getId());
|
||||||
|
vo.setCloudId(getCloudId());
|
||||||
|
vo.setCompanyId(getCompany() != null ? getCompany().getId() : null);
|
||||||
|
vo.setAutoUpdate(isAutoUpdate());
|
||||||
|
vo.setUpdateDays(getUpdateDays());
|
||||||
|
vo.setCustomerGrade(getCustomerGrade());
|
||||||
|
vo.setCustomerScore(getCustomerScore());
|
||||||
|
vo.setCustomerDescription(getCustomerDescription());
|
||||||
|
vo.setVendorGrade(getVendorGrade());
|
||||||
|
vo.setVendorScore(getVendorScore());
|
||||||
|
vo.setVendorDescription(getVendorDescription());
|
||||||
|
vo.setRank(getRank());
|
||||||
|
vo.setRankDescription(getRankDescription());
|
||||||
|
vo.setCloudLatest(getCloudLatest());
|
||||||
|
vo.setCloudBlackListUpdated(getCloudBlackListUpdated());
|
||||||
|
vo.setCloudEntUpdate(getCloudEntUpdate());
|
||||||
|
vo.setDescription(getDescription());
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,7 @@ import java.io.Serializable;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.CompanyBankAccountVo;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.FetchType;
|
import jakarta.persistence.FetchType;
|
||||||
@@ -21,7 +22,7 @@ import lombok.ToString;
|
|||||||
@Setter
|
@Setter
|
||||||
@jakarta.persistence.Entity
|
@jakarta.persistence.Entity
|
||||||
@Table(name = "COMPANY_BANK_ACCOUNT", schema = "supplier_ms")
|
@Table(name = "COMPANY_BANK_ACCOUNT", schema = "supplier_ms")
|
||||||
public class CompanyBankAccount implements IdentityEntity, BasedEntity, CompanyBasedEntity, Serializable {
|
public class CompanyBankAccount implements IdentityEntity, BasedEntity, CompanyBasedEntity, Serializable, Voable<CompanyBankAccountVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@@ -72,4 +73,17 @@ public class CompanyBankAccount implements IdentityEntity, BasedEntity, CompanyB
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompanyBankAccountVo toVo() {
|
||||||
|
CompanyBankAccountVo vo = new CompanyBankAccountVo();
|
||||||
|
vo.setId(getId());
|
||||||
|
vo.setCompanyId(getCompany() != null ? getCompany().getId() : null);
|
||||||
|
vo.setBankId(getBank() != null ? getBank().getId() : null);
|
||||||
|
vo.setAccount(getAccount());
|
||||||
|
vo.setOpeningBank(getOpeningBank());
|
||||||
|
vo.setDescription(getDescription());
|
||||||
|
vo.setActive(false); // 默认值
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import org.hibernate.annotations.OnDeleteAction;
|
|||||||
|
|
||||||
import com.ecep.contract.BlackReasonType;
|
import com.ecep.contract.BlackReasonType;
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.CompanyBlackReasonVo;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
@@ -33,7 +34,7 @@ import lombok.Setter;
|
|||||||
})
|
})
|
||||||
// @org.springframework.data.relational.core.mapping.Table("COMPANY_BLACK_REASON")
|
// @org.springframework.data.relational.core.mapping.Table("COMPANY_BLACK_REASON")
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class CompanyBlackReason implements IdentityEntity, CompanyBasedEntity, Serializable {
|
public class CompanyBlackReason implements IdentityEntity, CompanyBasedEntity, Serializable, Voable<CompanyBlackReasonVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@@ -90,4 +91,21 @@ public class CompanyBlackReason implements IdentityEntity, CompanyBasedEntity, S
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompanyBlackReasonVo toVo() {
|
||||||
|
CompanyBlackReasonVo vo = new CompanyBlackReasonVo();
|
||||||
|
vo.setId(getId());
|
||||||
|
vo.setCompanyId(getCompany() != null ? getCompany().getId() : null);
|
||||||
|
vo.setType(getType());
|
||||||
|
vo.setApplyName(getApplyName());
|
||||||
|
vo.setApplyDate(getApplyDate());
|
||||||
|
vo.setUpdateTime(getUpdateTime());
|
||||||
|
vo.setCreateTime(getCreateTime());
|
||||||
|
vo.setIncludeDate(getIncludeDate());
|
||||||
|
vo.setBlackReason(getBlackReason());
|
||||||
|
vo.setDescription(getDescription());
|
||||||
|
vo.setKey(getKey());
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,7 @@ import java.util.Map;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.CompanyContractVo;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -31,7 +32,7 @@ import lombok.ToString;
|
|||||||
|
|
||||||
})
|
})
|
||||||
@ToString(exclude = { "company", "contract" })
|
@ToString(exclude = { "company", "contract" })
|
||||||
public class CompanyContract implements IdentityEntity, CompanyBasedEntity, Serializable {
|
public class CompanyContract implements IdentityEntity, CompanyBasedEntity, Serializable, Voable<CompanyContractVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@@ -75,4 +76,15 @@ public class CompanyContract implements IdentityEntity, CompanyBasedEntity, Seri
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompanyContractVo toVo() {
|
||||||
|
CompanyContractVo vo = new CompanyContractVo();
|
||||||
|
vo.setId(getId());
|
||||||
|
vo.setCompanyId(getCompany() != null ? getCompany().getId() : null);
|
||||||
|
vo.setContractId(getContract() != null ? getContract().getId() : null);
|
||||||
|
vo.setContractCode(getContract() != null ? getContract().getCode() : null);
|
||||||
|
vo.setContractName(getContract() != null ? getContract().getName() : null);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
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.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@@ -9,6 +8,7 @@ import java.util.Objects;
|
|||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
|
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.CompanyCustomerVo;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -29,7 +29,7 @@ import lombok.ToString;
|
|||||||
|
|
||||||
})
|
})
|
||||||
@ToString
|
@ToString
|
||||||
public class CompanyCustomer implements IdentityEntity, CompanyBasedEntity, Serializable {
|
public class CompanyCustomer implements IdentityEntity, CompanyBasedEntity, Serializable, Voable<CompanyCustomerVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@Column(name = "ID", nullable = false)
|
@Column(name = "ID", nullable = false)
|
||||||
@@ -91,4 +91,18 @@ public class CompanyCustomer implements IdentityEntity, CompanyBasedEntity, Seri
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompanyCustomerVo toVo() {
|
||||||
|
CompanyCustomerVo vo = new CompanyCustomerVo();
|
||||||
|
vo.setId(id);
|
||||||
|
vo.setCompanyId(company != null ? company.getId() : null);
|
||||||
|
vo.setDevelopDate(developDate);
|
||||||
|
vo.setPath(path);
|
||||||
|
vo.setContactId(contact != null ? contact.getId() : null);
|
||||||
|
vo.setDescription(description);
|
||||||
|
vo.setCreated(created);
|
||||||
|
vo.setVersion(version);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,7 @@ import java.io.Serializable;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.CompanyCustomerEvaluationFormFileVo;
|
||||||
|
|
||||||
import jakarta.persistence.CascadeType;
|
import jakarta.persistence.CascadeType;
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
@@ -29,7 +30,7 @@ import lombok.ToString;
|
|||||||
@Setter
|
@Setter
|
||||||
@ToString
|
@ToString
|
||||||
@Table(name = "COMPANY_CUSTOMER_EVALUATION_FORM_FILE")
|
@Table(name = "COMPANY_CUSTOMER_EVALUATION_FORM_FILE")
|
||||||
public class CompanyCustomerEvaluationFormFile implements IdentityEntity, BasedEntity, Serializable {
|
public class CompanyCustomerEvaluationFormFile implements IdentityEntity, BasedEntity, Serializable, Voable<CompanyCustomerEvaluationFormFileVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@Column(name = "ID", nullable = false)
|
@Column(name = "ID", nullable = false)
|
||||||
@@ -85,4 +86,21 @@ public class CompanyCustomerEvaluationFormFile implements IdentityEntity, BasedE
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompanyCustomerEvaluationFormFileVo toVo() {
|
||||||
|
CompanyCustomerEvaluationFormFileVo vo = new CompanyCustomerEvaluationFormFileVo();
|
||||||
|
vo.setId(getId());
|
||||||
|
vo.setCustomerFile(getCustomerFile() != null ? getCustomerFile().getId() : null);
|
||||||
|
vo.setCatalog(getCatalog());
|
||||||
|
vo.setLevel(getLevel());
|
||||||
|
vo.setCreditLevel(getCreditLevel() != null ? getCreditLevel() : 0);
|
||||||
|
vo.setScore1(getScore1() != null ? getScore1() : 0);
|
||||||
|
vo.setScore2(getScore2() != null ? getScore2() : 0);
|
||||||
|
vo.setScore3(getScore3() != null ? getScore3() : 0);
|
||||||
|
vo.setScore4(getScore4() != null ? getScore4() : 0);
|
||||||
|
vo.setScore5(getScore5() != null ? getScore5() : 0);
|
||||||
|
vo.setScoreTemplateVersion(getScoreTemplateVersion() != null ? getScoreTemplateVersion() : 1);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ import java.io.Serializable;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyCustomerFileType;
|
import com.ecep.contract.CustomerFileType;
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.CompanyCustomerFileVo;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -27,7 +28,7 @@ import lombok.ToString;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "COMPANY_CUSTOMER_FILE")
|
@Table(name = "COMPANY_CUSTOMER_FILE")
|
||||||
@ToString
|
@ToString
|
||||||
public class CompanyCustomerFile implements CompanyBasicFile<CompanyCustomerFileType>, Serializable {
|
public class CompanyCustomerFile implements CompanyBasicFile<CustomerFileType>, Serializable, Voable<CompanyCustomerFileVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@@ -41,7 +42,7 @@ public class CompanyCustomerFile implements CompanyBasicFile<CompanyCustomerFile
|
|||||||
|
|
||||||
@Column(name = "TYPE")
|
@Column(name = "TYPE")
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
private CompanyCustomerFileType type;
|
private CustomerFileType type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件路径
|
* 文件路径
|
||||||
@@ -78,4 +79,17 @@ public class CompanyCustomerFile implements CompanyBasicFile<CompanyCustomerFile
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompanyCustomerFileVo toVo() {
|
||||||
|
CompanyCustomerFileVo vo = new CompanyCustomerFileVo();
|
||||||
|
vo.setId(getId());
|
||||||
|
vo.setCustomer(getCustomer() != null ? getCustomer().getId() : null);
|
||||||
|
vo.setType(getType());
|
||||||
|
vo.setFilePath(getFilePath());
|
||||||
|
vo.setEditFilePath(getEditFilePath());
|
||||||
|
vo.setSignDate(getSignDate());
|
||||||
|
vo.setValid(isValid());
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,9 @@ package com.ecep.contract.model;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyCustomerFileType;
|
import com.ecep.contract.CustomerFileType;
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.CompanyCustomerFileTypeLocalVo;
|
||||||
|
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
@@ -17,7 +18,7 @@ import lombok.ToString;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "COMPANY_CUSTOMER_FILE_TYPE_LOCAL")
|
@Table(name = "COMPANY_CUSTOMER_FILE_TYPE_LOCAL")
|
||||||
@ToString
|
@ToString
|
||||||
public class CompanyCustomerFileTypeLocal extends BaseEnumEntity<CompanyCustomerFileType> implements Serializable {
|
public class CompanyCustomerFileTypeLocal extends BaseEnumEntity<CustomerFileType> implements Serializable, Voable<CompanyCustomerFileTypeLocalVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -37,4 +38,14 @@ public class CompanyCustomerFileTypeLocal extends BaseEnumEntity<CompanyCustomer
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompanyCustomerFileTypeLocalVo toVo() {
|
||||||
|
CompanyCustomerFileTypeLocalVo vo = new CompanyCustomerFileTypeLocalVo();
|
||||||
|
vo.setId(getId());
|
||||||
|
vo.setType(getType());
|
||||||
|
vo.setLang(getLang());
|
||||||
|
vo.setValue(getValue());
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import java.util.Objects;
|
|||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
|
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.CompanyExtendInfoVo;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -26,7 +27,7 @@ import lombok.ToString;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "COMPANY_EXTEND_INFO", schema = "supplier_ms")
|
@Table(name = "COMPANY_EXTEND_INFO", schema = "supplier_ms")
|
||||||
@ToString
|
@ToString
|
||||||
public class CompanyExtendInfo implements IdentityEntity, Serializable {
|
public class CompanyExtendInfo implements IdentityEntity, Serializable, Voable<CompanyExtendInfoVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@@ -64,4 +65,14 @@ public class CompanyExtendInfo implements IdentityEntity, Serializable {
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompanyExtendInfoVo toVo() {
|
||||||
|
CompanyExtendInfoVo vo = new CompanyExtendInfoVo();
|
||||||
|
vo.setId(getId());
|
||||||
|
vo.setCompanyId(getCompany() != null ? getCompany().getId() : null);
|
||||||
|
vo.setDisableVerify(isDisableVerify());
|
||||||
|
vo.setVersion(getVersion());
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
import com.ecep.contract.CompanyFileType;
|
import com.ecep.contract.CompanyFileType;
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.CompanyFileTypeLocalVo;
|
||||||
|
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
@@ -17,7 +18,7 @@ import lombok.ToString;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "COMPANY_FILE_TYPE_LOCAL")
|
@Table(name = "COMPANY_FILE_TYPE_LOCAL")
|
||||||
@ToString
|
@ToString
|
||||||
public class CompanyFileTypeLocal extends BaseEnumEntity<CompanyFileType> implements Serializable {
|
public class CompanyFileTypeLocal extends BaseEnumEntity<CompanyFileType> implements Serializable, Voable<CompanyFileTypeLocalVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -37,4 +38,15 @@ public class CompanyFileTypeLocal extends BaseEnumEntity<CompanyFileType> implem
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompanyFileTypeLocalVo toVo() {
|
||||||
|
CompanyFileTypeLocalVo vo = new CompanyFileTypeLocalVo();
|
||||||
|
vo.setId(getId());
|
||||||
|
vo.setType(getType());
|
||||||
|
vo.setLang(getLang());
|
||||||
|
vo.setValue(getValue());
|
||||||
|
vo.setActive(false); // 设置默认值,因为实体中没有这个字段
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.time.LocalDate;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.CompanyVendorApprovedFileVo;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -27,7 +28,7 @@ import lombok.ToString;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "COMPANY_VENDOR_APPROVED_FILE")
|
@Table(name = "COMPANY_VENDOR_APPROVED_FILE")
|
||||||
@ToString
|
@ToString
|
||||||
public class CompanyVendorApprovedFile implements IdentityEntity, Serializable {
|
public class CompanyVendorApprovedFile implements IdentityEntity, Serializable, Voable<CompanyVendorApprovedFileVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@@ -74,4 +75,15 @@ public class CompanyVendorApprovedFile implements IdentityEntity, Serializable {
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompanyVendorApprovedFileVo toVo() {
|
||||||
|
CompanyVendorApprovedFileVo vo = new CompanyVendorApprovedFileVo();
|
||||||
|
vo.setId(getId());
|
||||||
|
vo.setListId(getList() != null ? getList().getId() : null);
|
||||||
|
vo.setFileName(getFileName());
|
||||||
|
vo.setSignDate(getSignDate());
|
||||||
|
vo.setDescription(getDescription());
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
import com.ecep.contract.VendorType;
|
import com.ecep.contract.VendorType;
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.CompanyVendorApprovedItemVo;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -27,7 +28,7 @@ import lombok.ToString;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "COMPANY_VENDOR_APPROVED_ITEM")
|
@Table(name = "COMPANY_VENDOR_APPROVED_ITEM")
|
||||||
@ToString
|
@ToString
|
||||||
public class CompanyVendorApprovedItem implements IdentityEntity, Serializable {
|
public class CompanyVendorApprovedItem implements IdentityEntity, Serializable, Voable<CompanyVendorApprovedItemVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@@ -80,4 +81,16 @@ public class CompanyVendorApprovedItem implements IdentityEntity, Serializable {
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompanyVendorApprovedItemVo toVo() {
|
||||||
|
CompanyVendorApprovedItemVo vo = new CompanyVendorApprovedItemVo();
|
||||||
|
vo.setId(getId());
|
||||||
|
vo.setListId(getList() != null ? getList().getId() : null);
|
||||||
|
vo.setVendorId(getVendor() != null ? getVendor().getId() : null);
|
||||||
|
vo.setVendorName(getVendorName());
|
||||||
|
vo.setType(getType());
|
||||||
|
vo.setDescription(getDescription());
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.time.LocalDate;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.CompanyVendorApprovedListVo;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -26,7 +27,7 @@ import lombok.ToString;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "COMPANY_VENDOR_APPROVED")
|
@Table(name = "COMPANY_VENDOR_APPROVED")
|
||||||
@ToString
|
@ToString
|
||||||
public class CompanyVendorApprovedList implements IdentityEntity, Serializable {
|
public class CompanyVendorApprovedList implements IdentityEntity, Serializable, Voable<CompanyVendorApprovedListVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@@ -74,4 +75,15 @@ public class CompanyVendorApprovedList implements IdentityEntity, Serializable {
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompanyVendorApprovedListVo toVo() {
|
||||||
|
CompanyVendorApprovedListVo vo = new CompanyVendorApprovedListVo();
|
||||||
|
vo.setId(getId());
|
||||||
|
vo.setTitle(getTitle());
|
||||||
|
vo.setPublishDate(getPublishDate());
|
||||||
|
vo.setPath(getPath());
|
||||||
|
vo.setDescription(getDescription());
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
import com.ecep.contract.VendorFileType;
|
import com.ecep.contract.VendorFileType;
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.CompanyVendorFileVo;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -30,7 +31,7 @@ import lombok.ToString;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "COMPANY_VENDOR_FILE")
|
@Table(name = "COMPANY_VENDOR_FILE")
|
||||||
@ToString
|
@ToString
|
||||||
public class CompanyVendorFile implements CompanyBasicFile<VendorFileType>, Serializable {
|
public class CompanyVendorFile implements CompanyBasicFile<VendorFileType>, Serializable, Voable<CompanyVendorFileVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@@ -84,4 +85,19 @@ public class CompanyVendorFile implements CompanyBasicFile<VendorFileType>, Seri
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CompanyVendorFileVo toVo() {
|
||||||
|
CompanyVendorFileVo vo = new CompanyVendorFileVo();
|
||||||
|
vo.setId(getId());
|
||||||
|
if (getVendor() != null) {
|
||||||
|
vo.setVendorId(getVendor().getId());
|
||||||
|
}
|
||||||
|
vo.setType(getType());
|
||||||
|
vo.setFilePath(getFilePath());
|
||||||
|
vo.setEditFilePath(getEditFilePath());
|
||||||
|
vo.setSignDate(getSignDate());
|
||||||
|
vo.setValid(isValid());
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class ContractFileTypeLocal extends BaseEnumEntity<ContractFileType> impl
|
|||||||
public ContractFileTypeLocalVo toVo() {
|
public ContractFileTypeLocalVo toVo() {
|
||||||
ContractFileTypeLocalVo vo = new ContractFileTypeLocalVo();
|
ContractFileTypeLocalVo vo = new ContractFileTypeLocalVo();
|
||||||
vo.setId(getId());
|
vo.setId(getId());
|
||||||
vo.setLanguage(getLang());
|
vo.setLang(getLang());
|
||||||
vo.setType(getType());
|
vo.setType(getType());
|
||||||
vo.setDescription(getDescription());
|
vo.setDescription(getDescription());
|
||||||
vo.setSuggestFileName(suggestFileName);
|
vo.setSuggestFileName(suggestFileName);
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import java.time.LocalDateTime;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.CustomerSatisfactionSurveyVo;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -28,7 +29,7 @@ import lombok.ToString;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "PROJECT_CUSTOMER_SATISFACTION_SURVEY", schema = "supplier_ms")
|
@Table(name = "PROJECT_CUSTOMER_SATISFACTION_SURVEY", schema = "supplier_ms")
|
||||||
@ToString
|
@ToString
|
||||||
public class CustomerSatisfactionSurvey implements IdentityEntity, ProjectBasedEntity, Serializable {
|
public class CustomerSatisfactionSurvey implements IdentityEntity, ProjectBasedEntity, Serializable, Voable<CustomerSatisfactionSurveyVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@@ -99,4 +100,23 @@ public class CustomerSatisfactionSurvey implements IdentityEntity, ProjectBasedE
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CustomerSatisfactionSurveyVo toVo() {
|
||||||
|
CustomerSatisfactionSurveyVo vo = new CustomerSatisfactionSurveyVo();
|
||||||
|
vo.setId(getId());
|
||||||
|
if (getProject() != null) {
|
||||||
|
vo.setProject(getProject().getId());
|
||||||
|
}
|
||||||
|
vo.setCode(getCode());
|
||||||
|
vo.setDate(getDate());
|
||||||
|
vo.setTotalScore(getTotalScore());
|
||||||
|
vo.setData(getData());
|
||||||
|
if (getApplicant() != null) {
|
||||||
|
vo.setApplicantId(getApplicant().getId());
|
||||||
|
}
|
||||||
|
vo.setApplyTime(getApplyTime());
|
||||||
|
vo.setDescription(getDescription());
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import java.io.Serializable;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.DeliverySignMethodVo;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -25,7 +26,7 @@ import lombok.ToString;
|
|||||||
@Setter
|
@Setter
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "PRODUCT_DELIVERY_SIGN_METHOD", schema = "supplier_ms")
|
@Table(name = "PRODUCT_DELIVERY_SIGN_METHOD", schema = "supplier_ms")
|
||||||
public class DeliverySignMethod implements BasedEntity, IdentityEntity , Serializable {
|
public class DeliverySignMethod implements BasedEntity, IdentityEntity , Serializable, Voable<DeliverySignMethodVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@Column(name = "ID", nullable = false)
|
@Column(name = "ID", nullable = false)
|
||||||
@@ -68,4 +69,17 @@ public class DeliverySignMethod implements BasedEntity, IdentityEntity , Seriali
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DeliverySignMethodVo toVo() {
|
||||||
|
DeliverySignMethodVo vo = new DeliverySignMethodVo();
|
||||||
|
vo.setId(id);
|
||||||
|
vo.setName(name);
|
||||||
|
vo.setCode(code);
|
||||||
|
vo.setSaleTypeId(saleType != null ? saleType.getId() : null);
|
||||||
|
vo.setDescription(description);
|
||||||
|
vo.setActive(false);
|
||||||
|
vo.setCreated(null);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,13 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.EmployeeRoleVo;
|
||||||
|
import com.ecep.contract.vo.FunctionVo;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
|
||||||
import jakarta.persistence.CascadeType;
|
import jakarta.persistence.CascadeType;
|
||||||
@@ -23,7 +27,7 @@ import lombok.Setter;
|
|||||||
@Setter
|
@Setter
|
||||||
@jakarta.persistence.Entity
|
@jakarta.persistence.Entity
|
||||||
@Table(name = "EMPLOYEE_ROLE", schema = "supplier_ms")
|
@Table(name = "EMPLOYEE_ROLE", schema = "supplier_ms")
|
||||||
public class EmployeeRole implements IdentityEntity, NamedEntity, Serializable {
|
public class EmployeeRole implements IdentityEntity, NamedEntity, Serializable, Voable<EmployeeRoleVo> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@@ -82,4 +86,32 @@ public class EmployeeRole implements IdentityEntity, NamedEntity, Serializable {
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EmployeeRoleVo toVo() {
|
||||||
|
EmployeeRoleVo vo = new EmployeeRoleVo();
|
||||||
|
vo.setId(getId());
|
||||||
|
vo.setCode(getCode());
|
||||||
|
vo.setName(getName());
|
||||||
|
vo.setSystemAdministrator(isSystemAdministrator());
|
||||||
|
vo.setManager(isManager());
|
||||||
|
vo.setActive(isActive());
|
||||||
|
|
||||||
|
// 转换functions列表
|
||||||
|
if (getFunctions() != null && !getFunctions().isEmpty()) {
|
||||||
|
List<FunctionVo> functionVos = new ArrayList<>();
|
||||||
|
for (Function function : getFunctions()) {
|
||||||
|
if (function != null) {
|
||||||
|
FunctionVo functionVo = new FunctionVo();
|
||||||
|
functionVo.setId(function.getId());
|
||||||
|
functionVo.setName(function.getName());
|
||||||
|
functionVo.setKey(function.getKey());
|
||||||
|
functionVos.add(functionVo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vo.setFunctions(functionVos);
|
||||||
|
}
|
||||||
|
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.ExtendVendorInfoVo;
|
||||||
|
import com.ecep.contract.model.Voable;
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
@@ -14,7 +16,7 @@ import java.util.Objects;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "CONTRACT_EXTEND_VENDOR_INFO", schema = "supplier_ms")
|
@Table(name = "CONTRACT_EXTEND_VENDOR_INFO", schema = "supplier_ms")
|
||||||
@ToString
|
@ToString
|
||||||
public class ExtendVendorInfo implements IdentityEntity, Serializable {
|
public class ExtendVendorInfo implements IdentityEntity, Serializable, Voable<ExtendVendorInfoVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@@ -66,4 +68,20 @@ public class ExtendVendorInfo implements IdentityEntity, Serializable {
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ExtendVendorInfoVo toVo() {
|
||||||
|
ExtendVendorInfoVo vo = new ExtendVendorInfoVo();
|
||||||
|
vo.setId(id);
|
||||||
|
if (contract != null) {
|
||||||
|
vo.setContractId(contract.getId());
|
||||||
|
}
|
||||||
|
if (group != null) {
|
||||||
|
vo.setGroupId(group.getId());
|
||||||
|
}
|
||||||
|
vo.setCodeSequenceNumber(codeSequenceNumber);
|
||||||
|
vo.setAssignedProvider(assignedProvider);
|
||||||
|
vo.setPrePurchase(prePurchase);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import java.io.Serializable;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.ProductTypeVo;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -21,7 +22,7 @@ import lombok.Setter;
|
|||||||
@Setter
|
@Setter
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "PRODUCT_TYPE")
|
@Table(name = "PRODUCT_TYPE")
|
||||||
public class ProductType implements BasedEntity, IdentityEntity, Serializable {
|
public class ProductType implements BasedEntity, IdentityEntity, Serializable, Voable<ProductTypeVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@Column(name = "ID", nullable = false)
|
@Column(name = "ID", nullable = false)
|
||||||
@@ -59,4 +60,19 @@ public class ProductType implements BasedEntity, IdentityEntity, Serializable {
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ProductTypeVo toVo() {
|
||||||
|
ProductTypeVo vo = new ProductTypeVo();
|
||||||
|
vo.setId(getId());
|
||||||
|
vo.setName(getName());
|
||||||
|
vo.setCode(getCode());
|
||||||
|
vo.setDescription(getDescription());
|
||||||
|
// parentId和order字段在ProductType中不存在,设置为null
|
||||||
|
vo.setParentId(null);
|
||||||
|
vo.setOrder(null);
|
||||||
|
// active字段设置为默认值false
|
||||||
|
vo.setActive(false);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@ import java.util.Objects;
|
|||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
|
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.ProjectBidVo;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -31,7 +32,7 @@ import lombok.ToString;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "PROJECT_BID")
|
@Table(name = "PROJECT_BID")
|
||||||
@ToString
|
@ToString
|
||||||
public class ProjectBid implements IdentityEntity, ProjectBasedEntity, Serializable {
|
public class ProjectBid implements IdentityEntity, ProjectBasedEntity, Serializable, Voable<ProjectBidVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@@ -153,4 +154,40 @@ public class ProjectBid implements IdentityEntity, ProjectBasedEntity, Serializa
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ProjectBidVo toVo() {
|
||||||
|
ProjectBidVo vo = new ProjectBidVo();
|
||||||
|
vo.setId(id);
|
||||||
|
if (project != null) {
|
||||||
|
vo.setProject(project.getId());
|
||||||
|
}
|
||||||
|
vo.setLevel(level);
|
||||||
|
vo.setAmount(amount);
|
||||||
|
if (evaluationFile != null) {
|
||||||
|
vo.setEvaluationFileId(evaluationFile.getId());
|
||||||
|
}
|
||||||
|
if (cost != null) {
|
||||||
|
vo.setCostId(cost.getId());
|
||||||
|
}
|
||||||
|
vo.setStandardPayWay(standardPayWay);
|
||||||
|
vo.setNoStandardPayWayText(noStandardPayWayText);
|
||||||
|
vo.setStandardContractText(standardContractText);
|
||||||
|
vo.setNoStandardContractText(noStandardContractText);
|
||||||
|
vo.setAuthorizationFile(authorizationFile);
|
||||||
|
vo.setBidAcceptanceLetterFile(bidAcceptanceLetterFile);
|
||||||
|
if (applicant != null) {
|
||||||
|
vo.setApplicantId(applicant.getId());
|
||||||
|
vo.setApplicantName(applicant.getName());
|
||||||
|
}
|
||||||
|
vo.setApplyTime(applyTime);
|
||||||
|
if (authorizer != null) {
|
||||||
|
vo.setAuthorizerId(authorizer.getId());
|
||||||
|
vo.setAuthorizerName(authorizer.getName());
|
||||||
|
}
|
||||||
|
vo.setAuthorizationTime(authorizationTime);
|
||||||
|
vo.setDescription(description);
|
||||||
|
// active字段默认为false,在ProjectBidVo类中已经设置
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import java.util.Objects;
|
|||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
|
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.ProjectCostVo;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -26,7 +27,7 @@ import lombok.ToString;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "PROJECT_COST")
|
@Table(name = "PROJECT_COST")
|
||||||
@ToString
|
@ToString
|
||||||
public class ProjectCost implements IdentityEntity, ProjectBasedEntity, Serializable {
|
public class ProjectCost implements IdentityEntity, ProjectBasedEntity, Serializable, Voable<ProjectCostVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@@ -220,4 +221,42 @@ public class ProjectCost implements IdentityEntity, ProjectBasedEntity, Serializ
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ProjectCostVo toVo() {
|
||||||
|
ProjectCostVo vo = new ProjectCostVo();
|
||||||
|
vo.setId(id);
|
||||||
|
vo.setContractId(contract != null ? contract.getId() : null);
|
||||||
|
vo.setProject(project != null ? project.getId() : null);
|
||||||
|
vo.setVersion(version);
|
||||||
|
vo.setStandardPayWay(standardPayWay);
|
||||||
|
vo.setNoStandardPayWayText(noStandardPayWayText);
|
||||||
|
vo.setStandardContractText(standardContractText);
|
||||||
|
vo.setNoStandardContractText(noStandardContractText);
|
||||||
|
vo.setStampTax(stampTax);
|
||||||
|
vo.setStampTaxFee(stampTaxFee);
|
||||||
|
vo.setOnSiteServiceFee(onSiteServiceFee);
|
||||||
|
vo.setAssemblyServiceFee(assemblyServiceFee);
|
||||||
|
vo.setTechnicalServiceFee(technicalServiceFee);
|
||||||
|
vo.setBidServiceFee(bidServiceFee);
|
||||||
|
vo.setFreightCost(freightCost);
|
||||||
|
vo.setGuaranteeLetterFee(guaranteeLetterFee);
|
||||||
|
vo.setTaxAndSurcharges(taxAndSurcharges);
|
||||||
|
vo.setTaxAndSurchargesFee(taxAndSurchargesFee);
|
||||||
|
vo.setInQuantities(inQuantities);
|
||||||
|
vo.setInTaxAmount(inTaxAmount);
|
||||||
|
vo.setInExclusiveTaxAmount(inExclusiveTaxAmount);
|
||||||
|
vo.setOutQuantities(outQuantities);
|
||||||
|
vo.setOutTaxAmount(outTaxAmount);
|
||||||
|
vo.setOutExclusiveTaxAmount(outExclusiveTaxAmount);
|
||||||
|
vo.setGrossProfitMargin(grossProfitMargin);
|
||||||
|
vo.setApplicantId(applicant != null ? applicant.getId() : null);
|
||||||
|
vo.setApplyTime(applyTime);
|
||||||
|
vo.setAuthorizerId(authorizer != null ? authorizer.getId() : null);
|
||||||
|
vo.setAuthorizationTime(authorizationTime);
|
||||||
|
vo.setAuthorizationFile(authorizationFile);
|
||||||
|
vo.setDescription(description);
|
||||||
|
vo.setImportLock(importLock);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.time.LocalDateTime;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.ProjectCostItemVo;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -24,7 +25,7 @@ import lombok.ToString;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "PROJECT_COST_ITEM")
|
@Table(name = "PROJECT_COST_ITEM")
|
||||||
@ToString
|
@ToString
|
||||||
public class ProjectCostItem implements IdentityEntity, BasedEntity, Serializable {
|
public class ProjectCostItem implements IdentityEntity, BasedEntity, Serializable, Voable<ProjectCostItemVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@@ -155,4 +156,27 @@ public class ProjectCostItem implements IdentityEntity, BasedEntity, Serializabl
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ProjectCostItemVo toVo() {
|
||||||
|
ProjectCostItemVo vo = new ProjectCostItemVo();
|
||||||
|
vo.setId(id);
|
||||||
|
vo.setCostId(cost != null ? cost.getId() : null);
|
||||||
|
vo.setTitle(title);
|
||||||
|
vo.setSpecification(specification);
|
||||||
|
vo.setUnit(unit);
|
||||||
|
vo.setInventoryId(inventory != null ? inventory.getId() : null);
|
||||||
|
vo.setInTaxRate(inTaxRate);
|
||||||
|
vo.setInExclusiveTaxPrice(inExclusiveTaxPrice);
|
||||||
|
vo.setInQuantity(inQuantity);
|
||||||
|
vo.setOutTaxRate(outTaxRate);
|
||||||
|
vo.setOutExclusiveTaxPrice(outExclusiveTaxPrice);
|
||||||
|
vo.setOutQuantity(outQuantity);
|
||||||
|
vo.setRemark(remark);
|
||||||
|
vo.setCreateDate(createDate);
|
||||||
|
vo.setCreatorId(creator != null ? creator.getId() : null);
|
||||||
|
vo.setUpdateDate(updateDate);
|
||||||
|
vo.setUpdaterId(updater != null ? updater.getId() : null);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
import com.ecep.contract.ProjectFileType;
|
import com.ecep.contract.ProjectFileType;
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.ProjectFileTypeLocalVo;
|
||||||
|
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
@@ -17,8 +18,10 @@ import lombok.ToString;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "PROJECT_FILE_TYPE_LOCAL")
|
@Table(name = "PROJECT_FILE_TYPE_LOCAL")
|
||||||
@ToString
|
@ToString
|
||||||
public class ProjectFileTypeLocal extends BaseEnumEntity<ProjectFileType> implements java.io.Serializable {
|
public class ProjectFileTypeLocal extends BaseEnumEntity<ProjectFileType>
|
||||||
|
implements java.io.Serializable, Voable<ProjectFileTypeLocalVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object) {
|
if (this == object) {
|
||||||
@@ -38,4 +41,14 @@ public class ProjectFileTypeLocal extends BaseEnumEntity<ProjectFileType> implem
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ProjectFileTypeLocalVo toVo() {
|
||||||
|
ProjectFileTypeLocalVo vo = new ProjectFileTypeLocalVo();
|
||||||
|
vo.setId(getId());
|
||||||
|
vo.setLang(getLang());
|
||||||
|
vo.setValue(getValue());
|
||||||
|
vo.setType(getType());
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import java.util.Objects;
|
|||||||
import org.hibernate.annotations.ColumnDefault;
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
|
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.ProjectQuotationVo;
|
||||||
|
import com.ecep.contract.model.Voable;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -30,7 +32,7 @@ import lombok.ToString;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "PROJECT_QUOTATION")
|
@Table(name = "PROJECT_QUOTATION")
|
||||||
@ToString
|
@ToString
|
||||||
public class ProjectQuotation implements IdentityEntity, ProjectBasedEntity, java.io.Serializable {
|
public class ProjectQuotation implements IdentityEntity, ProjectBasedEntity, java.io.Serializable, Voable<ProjectQuotationVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@@ -132,4 +134,31 @@ public class ProjectQuotation implements IdentityEntity, ProjectBasedEntity, jav
|
|||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ProjectQuotationVo toVo() {
|
||||||
|
ProjectQuotationVo vo = new ProjectQuotationVo();
|
||||||
|
vo.setId(id);
|
||||||
|
if (project != null) {
|
||||||
|
vo.setProject(project.getId());
|
||||||
|
}
|
||||||
|
vo.setLevel(level);
|
||||||
|
vo.setStandardPayWay(standardPayWay);
|
||||||
|
vo.setNoStandardPayWayText(noStandardPayWayText);
|
||||||
|
vo.setAmount(amount);
|
||||||
|
if (applicant != null) {
|
||||||
|
vo.setApplicantId(applicant.getId());
|
||||||
|
}
|
||||||
|
vo.setApplyTime(applyTime);
|
||||||
|
if (authorizer != null) {
|
||||||
|
vo.setAuthorizerId(authorizer.getId());
|
||||||
|
}
|
||||||
|
vo.setAuthorizationTime(authorizationTime);
|
||||||
|
vo.setAuthorizationFile(authorizationFile);
|
||||||
|
vo.setDescription(description);
|
||||||
|
if (evaluationFile != null) {
|
||||||
|
vo.setEvaluationFileId(evaluationFile.getId());
|
||||||
|
}
|
||||||
|
// active字段默认为false,在ProjectQuotationVo类中已经设置
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
import com.ecep.contract.VendorFileType;
|
import com.ecep.contract.VendorFileType;
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.VendorFileTypeLocalVo;
|
||||||
|
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
@@ -20,8 +21,9 @@ import lombok.ToString;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "COMPANY_VENDOR_FILE_TYPE_LOCAL")
|
@Table(name = "COMPANY_VENDOR_FILE_TYPE_LOCAL")
|
||||||
@ToString
|
@ToString
|
||||||
public class VendorFileTypeLocal extends BaseEnumEntity<VendorFileType> implements Serializable {
|
public class VendorFileTypeLocal extends BaseEnumEntity<VendorFileType> implements Serializable, Voable<VendorFileTypeLocalVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean equals(Object object) {
|
public final boolean equals(Object object) {
|
||||||
if (this == object)
|
if (this == object)
|
||||||
@@ -39,4 +41,14 @@ public class VendorFileTypeLocal extends BaseEnumEntity<VendorFileType> implemen
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VendorFileTypeLocalVo toVo() {
|
||||||
|
VendorFileTypeLocalVo vo = new VendorFileTypeLocalVo();
|
||||||
|
vo.setId(getId());
|
||||||
|
vo.setLang(getLang());
|
||||||
|
vo.setValue(getValue());
|
||||||
|
vo.setType(getType());
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.ecep.contract.model;
|
package com.ecep.contract.model;
|
||||||
|
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.VendorGroupVo;
|
||||||
|
import com.ecep.contract.model.Voable;
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
@@ -17,7 +19,7 @@ import java.util.Objects;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "VENDOR_GROUP", schema = "supplier_ms")
|
@Table(name = "VENDOR_GROUP", schema = "supplier_ms")
|
||||||
@ToString
|
@ToString
|
||||||
public class VendorGroup implements IdentityEntity, NamedEntity, BasedEntity, Serializable {
|
public class VendorGroup implements IdentityEntity, NamedEntity, BasedEntity, Serializable, Voable<VendorGroupVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@@ -74,4 +76,22 @@ public class VendorGroup implements IdentityEntity, NamedEntity, BasedEntity, Se
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VendorGroupVo toVo() {
|
||||||
|
VendorGroupVo vo = new VendorGroupVo();
|
||||||
|
vo.setId(id);
|
||||||
|
vo.setName(name);
|
||||||
|
vo.setCode(code);
|
||||||
|
vo.setDescription(description);
|
||||||
|
vo.setActive(active);
|
||||||
|
vo.setPriceComparison(priceComparison);
|
||||||
|
vo.setRequireQuotationSheetForBid(requireQuotationSheetForBid);
|
||||||
|
vo.setCanPrePurchase(canPrePurchase);
|
||||||
|
// path字段在VendorGroup中没有对应字段,设置为null
|
||||||
|
vo.setPath(null);
|
||||||
|
// version字段在VendorGroup中没有对应字段,设置为0
|
||||||
|
vo.setVersion(0);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import java.util.Objects;
|
|||||||
|
|
||||||
import com.ecep.contract.ContractFileType;
|
import com.ecep.contract.ContractFileType;
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.VendorGroupRequireFileTypeVo;
|
||||||
|
import com.ecep.contract.model.Voable;
|
||||||
|
|
||||||
import jakarta.persistence.Column;
|
import jakarta.persistence.Column;
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
@@ -28,7 +30,7 @@ import lombok.ToString;
|
|||||||
@Setter
|
@Setter
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "VENDOR_GROUP_REQ_FILE_TYPE")
|
@Table(name = "VENDOR_GROUP_REQ_FILE_TYPE")
|
||||||
public class VendorGroupRequireFileType implements IdentityEntity, BasedEntity, Serializable {
|
public class VendorGroupRequireFileType implements IdentityEntity, BasedEntity, Serializable, Voable<VendorGroupRequireFileTypeVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@Column(name = "ID", nullable = false)
|
@Column(name = "ID", nullable = false)
|
||||||
@@ -73,4 +75,16 @@ public class VendorGroupRequireFileType implements IdentityEntity, BasedEntity,
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VendorGroupRequireFileTypeVo toVo() {
|
||||||
|
VendorGroupRequireFileTypeVo vo = new VendorGroupRequireFileTypeVo();
|
||||||
|
vo.setId(id);
|
||||||
|
if (group != null) {
|
||||||
|
vo.setGroupId(group.getId());
|
||||||
|
}
|
||||||
|
vo.setFileType(fileType);
|
||||||
|
vo.setFrequency(frequency);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
import com.ecep.contract.VendorType;
|
import com.ecep.contract.VendorType;
|
||||||
import com.ecep.contract.util.HibernateProxyUtils;
|
import com.ecep.contract.util.HibernateProxyUtils;
|
||||||
|
import com.ecep.contract.vo.VendorTypeLocalVo;
|
||||||
|
|
||||||
import jakarta.persistence.Entity;
|
import jakarta.persistence.Entity;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
@@ -20,7 +21,7 @@ import lombok.ToString;
|
|||||||
@Entity
|
@Entity
|
||||||
@Table(name = "VENDOR_TYPE_LOCAL")
|
@Table(name = "VENDOR_TYPE_LOCAL")
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
public class VendorTypeLocal extends BaseEnumEntity<VendorType> implements Serializable {
|
public class VendorTypeLocal extends BaseEnumEntity<VendorType> implements Serializable, Voable<VendorTypeLocalVo> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -42,4 +43,14 @@ public class VendorTypeLocal extends BaseEnumEntity<VendorType> implements Seria
|
|||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return HibernateProxyUtils.hashCode(this);
|
return HibernateProxyUtils.hashCode(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VendorTypeLocalVo toVo() {
|
||||||
|
VendorTypeLocalVo vo = new VendorTypeLocalVo();
|
||||||
|
vo.setId(getId());
|
||||||
|
vo.setLang(getLang());
|
||||||
|
vo.setValue(getValue());
|
||||||
|
vo.setType(getType());
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
package com.ecep.contract.vo;
|
package com.ecep.contract.vo;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyCustomerFileType;
|
import com.ecep.contract.CustomerFileType;
|
||||||
|
import com.ecep.contract.model.BaseEnumEntity;
|
||||||
import com.ecep.contract.model.IdentityEntity;
|
import com.ecep.contract.model.IdentityEntity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class CompanyCustomerFileTypeLocalVo implements IdentityEntity {
|
public class CompanyCustomerFileTypeLocalVo extends BaseEnumEntity<CustomerFileType> implements IdentityEntity {
|
||||||
private Integer id;
|
|
||||||
private String name;
|
|
||||||
private CompanyCustomerFileType value;
|
|
||||||
private Integer orderNum = 0;
|
|
||||||
private boolean active = false;
|
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.ecep.contract.vo;
|
package com.ecep.contract.vo;
|
||||||
|
|
||||||
import com.ecep.contract.model.IdentityEntity;
|
import com.ecep.contract.model.IdentityEntity;
|
||||||
import com.ecep.contract.CompanyCustomerFileType;
|
import com.ecep.contract.CustomerFileType;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ import lombok.Data;
|
|||||||
public class CompanyCustomerFileVo implements IdentityEntity {
|
public class CompanyCustomerFileVo implements IdentityEntity {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
private Integer customer;
|
private Integer customer;
|
||||||
private CompanyCustomerFileType type;
|
private CustomerFileType type;
|
||||||
private String filePath;
|
private String filePath;
|
||||||
private String editFilePath;
|
private String editFilePath;
|
||||||
private LocalDate signDate;
|
private LocalDate signDate;
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
public class CompanyCustomerVo implements IdentityEntity, CompanyBasedVo {
|
public class CompanyCustomerVo implements IdentityEntity, CompanyBasedVo {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
/**
|
||||||
|
* 公司
|
||||||
|
*/
|
||||||
private Integer companyId;
|
private Integer companyId;
|
||||||
private LocalDate developDate;
|
private LocalDate developDate;
|
||||||
private String path;
|
private String path;
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
package com.ecep.contract.vo;
|
package com.ecep.contract.vo;
|
||||||
|
|
||||||
import com.ecep.contract.CompanyFileType;
|
import com.ecep.contract.CompanyFileType;
|
||||||
|
import com.ecep.contract.model.BaseEnumEntity;
|
||||||
import com.ecep.contract.model.IdentityEntity;
|
import com.ecep.contract.model.IdentityEntity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class CompanyFileTypeLocalVo implements IdentityEntity {
|
public class CompanyFileTypeLocalVo extends BaseEnumEntity<CompanyFileType> implements IdentityEntity {
|
||||||
private Integer id;
|
|
||||||
private String name;
|
|
||||||
private CompanyFileType value;
|
|
||||||
private Integer orderNum = 0;
|
|
||||||
private boolean active = false;
|
private boolean active = false;
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,6 @@ import lombok.Data;
|
|||||||
public class CompanyVendorFileVo implements IdentityEntity {
|
public class CompanyVendorFileVo implements IdentityEntity {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
private Integer vendorId;
|
private Integer vendorId;
|
||||||
private String vendorName;
|
|
||||||
private VendorFileType type;
|
private VendorFileType type;
|
||||||
private String filePath;
|
private String filePath;
|
||||||
private String editFilePath;
|
private String editFilePath;
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
package com.ecep.contract.vo;
|
package com.ecep.contract.vo;
|
||||||
|
|
||||||
|
import com.ecep.contract.VendorFileType;
|
||||||
|
import com.ecep.contract.model.BaseEnumEntity;
|
||||||
import com.ecep.contract.model.IdentityEntity;
|
import com.ecep.contract.model.IdentityEntity;
|
||||||
import com.ecep.contract.ContractFileType;
|
import com.ecep.contract.ContractFileType;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class ContractFileTypeLocalVo implements IdentityEntity {
|
public class ContractFileTypeLocalVo extends BaseEnumEntity<ContractFileType> implements IdentityEntity {
|
||||||
private Integer id;
|
|
||||||
private String language;
|
|
||||||
private ContractFileType type;
|
|
||||||
private String description;
|
private String description;
|
||||||
private String suggestFileName;
|
private String suggestFileName;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.ecep.contract.vo;
|
||||||
|
|
||||||
|
import com.ecep.contract.CustomerFileType;
|
||||||
|
import com.ecep.contract.model.BaseEnumEntity;
|
||||||
|
import com.ecep.contract.model.IdentityEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CustomerFileTypeLocalVo
|
||||||
|
extends BaseEnumEntity<CustomerFileType>
|
||||||
|
implements IdentityEntity {
|
||||||
|
private Integer orderNum = 0;
|
||||||
|
private boolean active = false;
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package com.ecep.contract.vo;
|
||||||
|
|
||||||
|
import com.ecep.contract.ProjectFileType;
|
||||||
|
import com.ecep.contract.model.BaseEnumEntity;
|
||||||
|
import com.ecep.contract.model.IdentityEntity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ProjectFileTypeLocalVo extends BaseEnumEntity<ProjectFileType> implements IdentityEntity {
|
||||||
|
private boolean active = false;
|
||||||
|
}
|
||||||
@@ -15,13 +15,17 @@ public class ProjectQuotationVo implements IdentityEntity, ProjectBasedVo {
|
|||||||
private String noStandardPayWayText;
|
private String noStandardPayWayText;
|
||||||
private double amount;
|
private double amount;
|
||||||
private Integer applicantId;
|
private Integer applicantId;
|
||||||
private String applicantName;
|
|
||||||
private LocalDateTime applyTime;
|
private LocalDateTime applyTime;
|
||||||
private Integer authorizerId;
|
private Integer authorizerId;
|
||||||
private String authorizerName;
|
|
||||||
private LocalDateTime authorizationTime;
|
private LocalDateTime authorizationTime;
|
||||||
|
/**
|
||||||
|
* 审核文件
|
||||||
|
*/
|
||||||
private String authorizationFile;
|
private String authorizationFile;
|
||||||
private String description;
|
private String description;
|
||||||
|
/**
|
||||||
|
* 评价表单文件, CompanyCustomerEvaluationFormFile
|
||||||
|
*/
|
||||||
private Integer evaluationFileId;
|
private Integer evaluationFileId;
|
||||||
private boolean active = false;
|
private boolean active = false;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.ecep.contract.vo;
|
||||||
|
|
||||||
|
import com.ecep.contract.VendorFileType;
|
||||||
|
import com.ecep.contract.model.BaseEnumEntity;
|
||||||
|
import com.ecep.contract.model.IdentityEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class VendorFileTypeLocalVo extends BaseEnumEntity<VendorFileType>
|
||||||
|
implements IdentityEntity {
|
||||||
|
}
|
||||||
@@ -1,14 +1,11 @@
|
|||||||
package com.ecep.contract.vo;
|
package com.ecep.contract.vo;
|
||||||
|
|
||||||
|
import com.ecep.contract.model.BaseEnumEntity;
|
||||||
import com.ecep.contract.model.IdentityEntity;
|
import com.ecep.contract.model.IdentityEntity;
|
||||||
import com.ecep.contract.VendorType;
|
import com.ecep.contract.VendorType;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class VendorTypeLocalVo implements IdentityEntity {
|
public class VendorTypeLocalVo extends BaseEnumEntity<VendorType> implements IdentityEntity {
|
||||||
private Integer id;
|
|
||||||
private String language;
|
|
||||||
private VendorType type;
|
|
||||||
private String name;
|
|
||||||
private String description;
|
|
||||||
}
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user